Vernier LabPro User Manual
Page 34

Revision Date: 08/02/02
LabPro Technical Manual
34
The parameters shown in this table are used when measuring period or frequency.
Trigger Type
Edge Polarity Used
Hardware Threshold Used
0
Rising (+)
Trigger Threshold parameter
2–5
Specified by trigger type
Trigger Threshold parameter
6
Not allowed (E.34 error).
Measuring Frequency
Assume a frequency measurement is requested on CH 1, and 20 measurements are desired at a .5 second
sample time.
The following commands would set up LabPro for this example:
{1,1,6}
{3,.5,20,2,0,1}
3 = Sample and Trigger setup command
.5 = Sample time of 0.5 seconds
20 = Number of samples to take
2 = Trigger from rising edge to rising edge for frequency
0 = Trigger channel not applicable
1 = Trigger at 1 Volt
Assume a ±10 Volt, 20 Hz sine wave is the input signal on pin 1. LabPro follows the sequence of steps
indicated below when the first trigger occurs (a trigger occurs every 0.05 seconds).
1.
Trigger occurs on the rising edge.
2.
Start counter and timer.
3.
Stop timer at next rising edge.
4.
Wait until 0.25 seconds has elapsed.
5.
Stop counter (count should be about 5).
6.
Count is less than 150 (or 600 Hz); therefore, frequency is computed from the time interval
for one period.
7.
Wait for 0.5 seconds specified in Sample Time.
8.
Wait for additional processing time to complete. (This time depends on what processing is
currently being performed and is typically about 0.25 additional seconds.)
9.
Repeat steps 1 through 8 for nineteen more samples.
In this example, LabPro takes approximately 15 seconds to complete all the sampling.