Clockset (source), Data (datalong), read, restore – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 359

Advertising
background image

Section 9. Program Control Instructions

ClockSet (Source).

Sets the CR9000X clock from the values in an array. The most likely use for
this is where the CR9000X can input the time from a more accurate clock than
its own (e.g., a GPS receiver). The input time would periodically or
conditionally be converted into the required variable array and ClockSet
would be used to set the CR9000X clock.

Source
Array

The source must be a seven element array . Array(1)..array(7) should hold respectively
year, month, day, hours, minutes, seconds, and microseconds..

Data (DataLong), Read, Restore

Data (DataLong) is used to mark the beginning of a data list that can then be
read (using Read) into a variable array later in the program. Each constant in
the list is separated by a comma.

The Read statement is used to begin reading constants from the list defined by
Data or DataLong into a variable array. A subsequent Read picks up where
the last Read left off. The Read function does not assume a data type;
therefore, it is up to the user to ensure that the variable/variable array into
which the constants are loaded is the correct type (Float or Long).

The Restore statement is used to reset the location of the Read pointer back to
the first value in the list defined by Data. The next Read following Restore
will begin with the first value of the Data list.

Syntax

Data

list of constants

Data function: A list of floating point constants that can be read (using
Read) into an Array Variable dimensioned as float.

Parameter: A list of floating point constants.

Syntax

DataLong

list of constants

Datalong function: A list of Long integer constants that can be read (using
Read) into an Array Variable dimensioned as long.

Parameter: A list of floating point constants.

Syntax

Read

[VarExpr]

Reads Data from Data declaration into an array. Subsequent Read picks
up where current Read leaves off.

Parameter: Variable destination.

Syntax

Restore

Restore pointer to Data to beginning. Used in conjunction with Data and
Read.

9-29

Advertising