02-14-2017, 06:32 PM
I was measuring some signal delay between TTL and PWM sent from the same state matrix (basically a BNC + PWM pulse) with our new fancy oscilloscope (a PicoScope one), but I had some strange signals.
Basically, if I use the protocol
for currentTrial = 1:100;
sma = NewStateMatrix();
sma = AddState(sma, 'Name', 'On2', ...
'Timer', .001,...
'StateChangeConditions', {'Tup', 'exit'},...
'OutputActions', {'BNCState', 1, 'PWM1', 255});
things works normally (see attached 001.jpg), but if i set the 'Timer' to .01 the train of signals has a huge gap after it starts (see attached 01.jpg). Note: gap position is not constant, in a few cases there were two of them. All 100 pulses are sent in every case.
The same happened if I used two sma like
sma = AddState(sma, 'Name', 'On2', ...
'Timer', .01,...
'StateChangeConditions', {'Tup', 'pause'},...
'OutputActions', {'BNCState', 1, 'PWM1', 255});
sma = AddState(sma, 'Name', 'pause', ...
'Timer', .01,...
'StateChangeConditions', {'Tup', 'exit'},...
'OutputActions', {});
The same kind of gap was present also using Time values of .009, .005, .02, .03, .05 but not .002.
I also tried to send a single .001 pulse and then a .01 train but I had always the gap. Oddly, sending a first train of one hundred 0.1 pulse and then another equal ( the code was with a for currentTrial = 1:100 followed by a for currentTrial = 101:201), the gap was present only in the first chunk of signals.
I updated the Bpod firmware to the last version (the Bpod_MainModule_0_6 from Github) but the situation was the same.
Currently using Win10.
Any idea about whats the issue?
Thanks
Nicola
Nicola
Basically, if I use the protocol
for currentTrial = 1:100;
sma = NewStateMatrix();
sma = AddState(sma, 'Name', 'On2', ...
'Timer', .001,...
'StateChangeConditions', {'Tup', 'exit'},...
'OutputActions', {'BNCState', 1, 'PWM1', 255});
things works normally (see attached 001.jpg), but if i set the 'Timer' to .01 the train of signals has a huge gap after it starts (see attached 01.jpg). Note: gap position is not constant, in a few cases there were two of them. All 100 pulses are sent in every case.
The same happened if I used two sma like
sma = AddState(sma, 'Name', 'On2', ...
'Timer', .01,...
'StateChangeConditions', {'Tup', 'pause'},...
'OutputActions', {'BNCState', 1, 'PWM1', 255});
sma = AddState(sma, 'Name', 'pause', ...
'Timer', .01,...
'StateChangeConditions', {'Tup', 'exit'},...
'OutputActions', {});
The same kind of gap was present also using Time values of .009, .005, .02, .03, .05 but not .002.
I also tried to send a single .001 pulse and then a .01 train but I had always the gap. Oddly, sending a first train of one hundred 0.1 pulse and then another equal ( the code was with a for currentTrial = 1:100 followed by a for currentTrial = 101:201), the gap was present only in the first chunk of signals.
I updated the Bpod firmware to the last version (the Bpod_MainModule_0_6 from Github) but the situation was the same.
Currently using Win10.
Any idea about whats the issue?
Thanks
Nicola
Nicola