beautypg.com

Newfieldnames (oldnames, newnames), Portset (exslot, port, state, delay) – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 375

background image

Section 9. Program Control Instructions

NewFieldNames (OldNames, NewNames)

When using the NewFieldNames instruction, a variable array is given a
generic name. Whenever the NewFieldNames instruction is executed, the next
available generic variable in a data table will be assigned a new name from the
NewNames string.

This instruction accommodates smart sensors that return a unique name as part
of a data string (where the unique name can be parsed out of the string and
used for the NewName) or the addition of a Campbell Scientific wireless
sensor into an existing wireless sensor network.

When a NewName is assigned to a generic variable, the table
definitions in the datalogger will change. Thus, any operation
that relies on the datalogger's table definitions will be affected
(for example, if scheduled data collection is taking place, when
the generic variable's name is changed a backup file will be
created for the existing *.dat file and a new file, with the new
header information, will be written).

NOTE

Parameter
& Data Type

Enter

NEWFIELDNAMES PARAMETERS

OldNames

Variable array

The OldNames parameter is the name for the variable array assigned to the generic variable(s).

NewNames

Variable Array

The NewNames parameter is a string that will be used to populate the generic variable field
names when the NewFieldNames instruction is run. Multiple names in a list should be
separated with commas.

PortSet (ExSlot, Port, State, Delay)

This Instruction will set the specified control port on the CR9060 Excitation
Module high or low.

This instruction is controlled by the task sequencer, which sets up the
measurement order. This results in the PortSet operation always occurring
directly after the measurement instruction preceding it in the program. The
State parameter can be set conditionally.

This instruction must not be placed inside a conditional
statement, Slow Sequence Scan or Sub Scan.

NOTE

Parameter
& Data Type

Enter

PORTSET PARAMETERS

ExSlot

Constant

The slot that holds the 9060 Excitation Module on which to set the port.

Port

Constant

The number of the port to set with the instruction.

State

The state (high or low) to set the port to.

Constant,

Value State

Variable, or

0 Low

Expression

≠ 0

High

Delay

Constant

The time, in microseconds, to delay the task sequencer after setting the designated port to the
state declared by the State argument.

9-45