pb_vRunTrial.m 862 Bytes
Newer Older
Jesse Heckman's avatar
Jesse Heckman committed
1
function pb_vRunTrial(zbus, trialdur)
Jesse Heckman's avatar
Jesse Heckman committed
2 3 4 5 6 7 8 9
% PB_VRUNTRIAL(HANDLES)
%
% PB_VRUNTRIAL(HANDLES)  ...
%
% See also ...

% PBToolbox (2018): JJH: j.heckman@donders.ru.nl

Jesse Heckman's avatar
Jesse Heckman committed
10
   %% Run zBus
Jesse Heckman's avatar
Jesse Heckman committed
11
   zbus.zBusTrigA(0, 0, 2); % reset, clock start, (0,0,2): trigger entire rack, with a pulse structure, and 2 ms delay(2 ms = minimum).
Jesse Heckman's avatar
Jesse Heckman committed
12

Jesse Heckman's avatar
Jesse Heckman committed
13
   %% Trigger event 1
Jesse Heckman's avatar
Jesse Heckman committed
14
   zbus.zBusTrigB(0, 0, 2); % start event 1/trial onset; trigger zBus 4 = RA16;
Jesse Heckman's avatar
Jesse Heckman committed
15 16

   t = tic;
Jesse Heckman's avatar
Jesse Heckman committed
17
   while toc(t) < trialdur
Jesse Heckman's avatar
Jesse Heckman committed
18 19
      pause(0.05);
   end
Jesse Heckman's avatar
Jesse Heckman committed
20 21 22 23 24 25 26 27 28
end
 
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
%                                                           %
%       Part of Programmeer Beer Toolbox (PBToolbox)        %
%       Written by: Jesse J. Heckman (2018)                 %
%                                                           %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %