Vernier LabPro User Manual
Page 16

Revision Date: 08/02/02
LabPro Technical Manual
16
Poll channel 1 for a new event. Once an event has occurred, poll for an event change on channel 2. Once
this event occurs, retrieve the latest pulse widths from both these channels.
12,41,0
poll until you get a change in return value, store this in a variable, e.g., j
12,42,0
After channel one event change is detected, poll channel two until you get a change in
return value, store this in a variable, e.g., k
12,41,-1,j,j
get pulse width from channel one
12,42,-1,k,k
get pulse width from channel two
Store these events and begin polling again until the user terminates the experiment.
Timing from the time of blocking of one photogate until the blocking of the second photogate (Pulse
Timing)
This may be done by requesting the times back rather than the pulse width for the photogates. Setup is the
same as that for time with two photogates as mentioned above. However, now the times of interest are
different. Polling is done in the same manner in that an event must occur on channel one prior to channel
2. However, now the time of interest is the time from edge to edge of the pulses. Using Gate Timing with
two gates as the model, data retrieval now changes to:
12,41,-1,j,j
get pulse width from channel one. For equation below this is
∆
t(j)
12,42,-1,k,k
get pulse width from channel two. For equation below this is
∆
t(k)
12,41,-2,j,j
get pulse trailing edge time from channel one. For equation below this is rt(j)
12,42,-2,k,k
get pulse trailing edge time from channel two. For equation below this is rt(k)
Calculate the time from the blocking of photogate one to photogate two as follows:
T = (rt(k) -
∆
t(k))-(rt(j) –
∆
t(j))
The user terminates the experiment.
Motion Timing
This is used to measure a continuous stream of pulses. For example, if an object with clear and opaque
sections (sometimes called a picket fence) is moved through a photogate. Many time measurements are
made. Each represents the time between successive blockings of the photogate. This uses a slightly
different mode than the previous examples, mode 4, for period measurement. For DIG/SONIC1, the setup
is as follows:
0
Clear all channels and reset the device
102,-1
Turn power on continuously
1,1,14
Set up one dummy analog channel, if no other analog channels have been assigned
12,41,4,1
Set period - continuous pulse mode for DIG/SONIC1
3,60,1000,0
Send trigger information for arbitrarily long experiment unless real analog data is being
collected. This example sets the experiment length for 1000 minutes.
Events retrieved are:
12,41,-1,n,m
Requests the a subset of the data beginning at event n and ending at event m.
For instance, if 10 data points were collected and only points 8 to 10 were needed