beautypg.com

Setstatus ("fieldname", value) – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 349

background image

Section 9. Program Control Instructions

SetStatus ("FieldName", Value)

The SetStatus instruction is used to change the value for a setting in the
datalogger's Status table.
Syntax
SetStatus(
"FieldName, Value)

Remarks
The FieldName parameter is the name of the setting to be changed; the name
must be enclosed in quotes. The Value parameter is the value to which that
field should be set. If the value being set is a string (such as in Messages or
StationName), it must be enclosed in quotes. For all Status table settings except
Messages and StationName, setting the value to 0 resets the error indicator.
This can be useful for troubleshooting purposes. If a SetStatus instruction is in
the program, it will be executed and could reset a setting that the user changed
manually.

The settings shown below in the SetStatus Parameters Table are some of the

more common fields that users set.

Parameter
& Data Type

Enter

SETSTATUS PARAMETERS

FieldName
Text in quotes

The FieldName parameter is the name of the setting to be
changed; the name must be enclosed in quotes. The FieldName
options are:

Low12VCount

An error counter indicating the number of times the 12V supply
has dropped below the allowable level.

Low5VCount

An error counter indicating the number of times the 5V supply
has dropped below the allowable level.

MaxProcTime

The maximum amount of time that it has taken to execute the
program.

Messages

A field that can be used to hold a string value in the datalogger's
Status table. The string must be enclosed in quotes.

SkippedScans

An error counter indicating the number of times a Scan has been
missed because the datalogger was busy with another task (such
as the previous scan).

SkippedSlowScans

An error counter indicating the number of times a SlowScan has
been missed.

SkippedRecord

An error counter indicating the number of times a record was
supposed to be stored but wasn't.

Station Name

The name of the datalogger station.

VarOutOfBound

An indication that a variable is not dimensioned large enough to
hold the values being returned.

WatchDogErrors

An error counter indicating the number of times the datalogger
has had to reset its processor. Set to 0 to reset counter.

Value
String or Constant

The Value parameter is the value to which that field should be
set. If the value being set is a string (such as in Messages or
StationName), it must be enclosed in quotes.

9-19