beautypg.com

Appendix e: calculator programming examples, Example 2: temperature realtime data collection – Vernier LabPro User Manual

Page 92

background image

Revision Date: 08/02/02

LabPro Technical Manual

E-1

Appendix E: Calculator Programming Examples

Although you can create and edit your programs using the calculator keypad, calculator programs are most
easily dealt with on a computer using the TI-GRAPH LINK software (available from

www.ti.com/calc

). Once

written, the program can be transferred to the calculator via a TI-GRAPH LINK cable (available from Vernier
Software). Samples of various types of programs follow. Each of the following programming examples
includes both program commands and comments explaining what the commands do. These examples are
written using a TI-83 calculator.

Example 1: Temperature Non-Realtime Data Collection

&OU$OO/LVWV

&OU+RPH

6HQG^`

6HQG^`

6HQG^`

6HQG^`

*HW/

*HW/

3ORW6FDWWHU/

/

=RRP6WDW

Reset LabPro. (This clears LabPro RAM.)
Turn LabPro sound on.
Set up Channel 1 for data collection.
Take temperature sample every .1 second.
Retrieve temperature data to L

2

.

Retrieve time data to L

1

.

Plot temperature versus time.

Example 2: Temperature Realtime Data Collection

&OU$OO/LVWV

3ORWV2II)XQF

)Q2II$[HV2Q

;PLQ;PD[;VFO

&OU+RPH

6HQG^`

6HQG^`

6HQG^`

GLP/

6HQG^`

&OU'UDZ

)RU,

*HW/

,

3W2Q,/

,

(QG

Initialize graphing functions.

Set up the min/max range and scale factors as needed.

Reset LabPro. (This clears LabPro RAM.)
Turn LabPro sound on.
Set up Channel 3 for data collection.
Dimension List
Take a sample once every second; re-arm immediately and get
next sample.
Get a sample and plot it on the graph for 30 points.

Example 3: Distance and Velocity Non-Realtime Data Collection

3ORWV2II

&OU$OO/LVWV

&OU+RPH

&OU'UDZ

6HQG^`

6HQG^`

6HQG^`

6HQG^`

*HW/

*HW/

*HW/

3ORW6FDWWHU/

/

3ORW6FDWWHU/

/

Reset LabPro. (This clears LabPro RAM.)
Turn LabPro sound on.
Set up Channel 11 (Sonic)to collect distance and velocity data.
Take a sample every .1 second, 100 times.
Retrieve distance data to L

2

.

Retrieve velocity data to L

3

.

Retrieve time data to L

1

.

Plot distance versus time.
Plot velocity versus time.