beautypg.com

Command 8 request channel status – Vernier LabPro User Manual

Page 47

background image

Revision Date: 08/02/02

LabPro Technical Manual

47

Command 8

Request Channel Status

This command is used during data collection to read the operation or sensor type, the last valid data point
and the number of samples collected. Calculators must use the “Get” command to retreive this
information. Using this does not interfere with the active data collection.

Syntax: {8,channel, reqtype}

Parameter List:
channel

– indicates which channel on which this command operates. The possible values are

Channel number

Description

1 – 4

Analog channels 1 through 4

11, 12

Sonic Channel 1, Sonic Channel 2

reqtype

– determines whether the current sampled data is returned (reqtype = 0) or the data stored
when channel was last setup (reqtype = 1.)

Reqtype value

Description

0

current sampled data is returned

1

previously sampled data is returned

Return values: Three values are returned – operation, lastdata and lastposn. Calculators must
send a Get to retrieve these values.!!!Need to add info about –999.

operation

= same operation used in Command 1

lastdata = last valid data read from sensor, if any. This is not applicable to CH1 with operations 5, 6, 7;

CH21 Digital In; or CH31 Digital Out.

lastposn = last valid data position or the sample number where stored in the resulting list.

Example 1: Get the last sampled data collected. In the case of the calculator, store the data in list L1.
Computer

Calculator

s{8,1,0}

:Send({8,1,0})

g

:Get(L1)

In a terminal session, the host-LabPro conversation appears as follows:
Host

LabPro

s{1,14,1}
s{3,0.5,21,0}
s{8,1,0}
sent after the
6

th

data point

was collected

{ +0.00000E+00, +2.24176E+00, +6.00000E+00 }

g

{ +2.14530E+00, +3.32112E-01, +2.30891E+00, +1.70085E+00, +1.10256E+00,
+2.24176E+00, +2.44200E-01, +2.32357E+00, +2.02076E+00, +5.44567E-01,
+2.29060E+00, +1.29670E+00, +1.81441E+00, +2.18071E+00, +2.69841E-01,
+2.31502E+00, +1.81929E+00, +8.96215E-01, +2.26007E+00, +6.28816E-01,
+2.32723E+00 }

The values returned from the Command 8 line show that during data collection, point 6 was the last valid
measured row.