beautypg.com

Example 11: command 8 program, Example 12: command 9 program, Example 13: command 10 program – Vernier LabPro User Manual

Page 95

background image

Revision Date: 08/02/02

LabPro Technical Manual

E-4

. . .....

. . . .....

. ... . . . .`/

^

`/

)RU1

6HQG^/

1/

1`

(QG

ones for 0.3 seconds.

Enter each note value in the list.

Send each time and note to LabPro so that it can
play every note in the order of the lists.

Example 11: Command 8 Program

This is a program to receive data points while sampling.

6HQG^`

6HQG^`

6HQG^`

)RU1

6HQG^`

*HW/

'LVS /

(QG

*HW/

Clear sampling settings.
Set up Channel 1 with auto-ID.
Take 100 samples in 20 seconds.

Use a loop to get samples as they are taken.
Ask for Channel 1’s last sampled data point.
Get the sensor type, most recent data point, and position in list.
Display the three-element list to the screen.

Get the resulting list of data.

Example 12: Command 9 Program

This is a program used to read a single data point.

6HQG^`

6HQG^`

6HQG^`

*HW$

'LVS $

Clear sampling settings.
Auto-ID a TI temperature sensor.
Send Command 9 to get a single data point from Channel 1.
Get the single data point.
Display the one data point.

Example 13: Command 10 Program

This program uses Command 10 with the Temperature Sensor. This test is used to find a sinusoidal-like
pattern in temperature as it rises and falls constantly in an experiment that lasts 10 minutes.

6HQG^`

6HQG^`

6HQG^`

*HW/

6HQG^`

*HW$

Clear sampling settings.
Auto-ID the TI temperature sensor.
Collect 1 sample every 6 seconds for 10 minutes.
Get the data for later use or display.

Send the advanced data reduction command with the heartbeat
algorithm. Set the lower threshold to 20% above the minimum
point. Set the upper threshold to 80% above the minimum point.
Set the standard temperature variance to 5

ϒ

C. If the maximum

temperature minus the minimum temperature is less than 5

ϒ

C,

then the test proves there are no oscillations in temperature outside
of 5

ϒ

C in the 10-minute experiment. If the variance is more than

5

ϒ

C, then this will count how many times it goes over the 80%

threshold level plus how many times it goes below the 20%
threshold level.

Get the number of times the samples went above the upper
threshold and went below the lower threshold (the edge count). If
the data range was less than 5

ϒ

C, the result is zero.