Stationname – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 181

Section 5. Program Declarations
As a special case, a string can be declared as String * 1. This allows the
efficient storage of a single character. The string will take up 4 bytes in
memory and when stored in a data table, but it will hold only one character.
Strings can be dimensioned only up to 2 dimensions instead of the 3 allowed
for other data types. (This is because the least significant dimension is actually
used as the size of the string.) To begin reading or modifying a string at a
particular location into the string, enter the location or begin reading a string at
a particular character, enter the character as a third dimension; e.g.,
String(x,y,n) where n is the desired character.
See Section 4.2.4.5 Data Type Operational Detail for in-depth discussion
about the data types supported by the CR9000X.
Initialize
Variables can be initialized when declared. For example:
Public MyVar = 3.5 or Public MyVar = {3.5}
Public MyArray(3) = {3, 6, 9}
The braces are optional if a scalar is being initialized or if only the first
variable in an array is being initialized.
When declaring a data type for the variable, the variable is declared before
initialization:
Public StringVar as String * 30 = "Test String"
For all arrays, including multi-dimensional arrays, the least significant
elements are initialized first. In other words, if the array is not fully initialized,
the first elements will be initialized first, and the remainder will be initialized
to the default value of 0:
Public Array (2,3) = (1,2,3,4)
Results in ,
Array(1,1) = 1
Array(1,2) = 2
Array(1,3) = 3
Array(2,1) = 4
Array(2,2) = 0
Array(2,3) = 0
StationName
Sets the station name. Limited to 8 characters.
Syntax
StationName StaName
Remarks
StationName is used to set the datalogger station name with the program. The
station name is displayed by RTDaq and stored in the data table headers
(Section 2.4). The Station Name can be changed from the Logger's Status
Table. Changing the Station Name is not a legal procedure if the running
program stored data to a PC card.
5-11