Error using "Streaming" protocol
floesche opened this issue · 2 comments
floesche commented
Trying to run a protocol with streaming on 9fc7bd3 results in a Main Host with log activated, but the conductor stops working without a single trial sent to the Host:
The G4 Host receives:
09/11/2023 14:44:20.527 : TCP Connection Established
09/11/2023 14:44:20.905 : Change Root Directory received
09/11/2023 14:44:20.906 : Root Directory Path - C:\matlabroot\BurnettLE\CL_Protocol_TwoPatDiscrim_LB_90_08-25-23_14-46-03
09/11/2023 14:44:20.932 : Set Active Analog Output Channels received
09/11/2023 14:44:22.950 : Start Log received
The MATLAB command window shows:
Error using PanelsController/setActiveAIChannels
ctlr.setActiveAIChannels(active_ai_channels);
↑
Invalid argument at position 1. Value must be less than or equal to 3.
Error in G4_default_run_protocol_streaming (line 195)
ctlr.setActiveAIChannels(active_ai_channels);
Error in G4_conductor_controller/run (line 632)
eval(run_command);
Error in G4_conductor_view/run_exp (line 603)
self.con.run();
Error in G4_conductor_view>@(varargin)self.run_exp(varargin{:}) (line 140)
'units', 'pixels', 'Position', [15, self.fig_size(4)- 305, 115, 85],'Callback', @self.run_exp);
Error while evaluating UIControl Callback.
taylorlm88 commented
I believe the error is due to this line in the streaming run protocol.
active_ai_channels = nonzeros([p.chan1_rate>0 p.chan2_rate>0 p.chan3_rate>0 p.chan4_rate>0] .* [1 2 3 4])';
This produces an array [1 2 3 4] if all channels are active, but don't the channels need to be numbered [0 1 2 3] to be passed to the controller? Subtracting 1 from the end result should fix it if that is the problem, but I'll need to test it out on the arena to be sure that fixes it.
taylorlm88 commented
resolved with commit f621372