Command 2001 direct output to digital-out port – Vernier LabPro User Manual
Page 72

Revision Date: 08/02/02
LabPro Technical Manual
72
Command 2001
Direct Output to Digital-Out Port
This command outputs data to the digital output port during a sampling run, thus giving the user
interactive control of some types of hardware using LabPro digital output lines. Please note the following:
•
One to sixteen data points may be output. If more than one point is sent, all the points will be sent
out at about 200
µ
sec intervals before the next command is parsed. This allows the LabPro to
clock data into a latch with a single command.
•
The output data goes to the DIG/SONIC channels. Therefore, sending this command while the
sonic port is being sampled will corrupt the data.
•
Sending this command does not stop the sampling, and it should not affect the analog channels.
•
Syntax: {2001,data1, data2, data3, . . ., dataN}
Parameter List:
data1. . .dataN
- Data values must be between 0-15. For values outside this range, behavior is
undefined.
Return values: No information is returned. The output will be effective when sampling begins.
Example 1:Turn off all lines.
Computer
Calculator
s{2001,0}
:Send({2001,0})
Example 2:Turn on all lines.
Computer
Calculator
s{2001,255}
:Send({2001,255})
Example 3:Turn on first line of port1.
Computer
Calculator
s{2001,1}
:Send({2001,1})
Example 4:Turn on first line of port2.
Computer
Calculator
s{2001,16}
:Send({2001,16})