Dear Josh,
We have encountered an issue where the AI module powers off during a trial causing our protocol to crash.
We load the following serial messages:
LoadSerialMessages('AnalogIn1', ['L' 1], 88); % start logging
LoadSerialMessages('AnalogIn1', ['L' 0], 99); % stop logging
Early in the trial we send a Serial Message to the AI module to start acquiring (go cue state):
GoCueOutputActions = {'AnalogIn1', 88, 'Wire1', 1, 'WavePlayer1', 12, 'PWM2', 255};
Late in the trial we send a message to stop acquiring (timeout state):
TimeoutOutputActions = {'AnalogIn1', 99};
We notice that if the elapsed time between the two states is less than roughly one second (which happens in some trials), the AI module powers down and the protocol crashes. For the moment, we solve the issue by making sure that the time elapsed between the two states (i.e. the start and stop serial messages sent to the AI module) is greater than 1 second.
Is there a way to fix this without having to worry about the timing of the successive serial messages sent to the AI module?
Thanks!