Station name, Units, Sub, exit sub, end sub – Campbell Scientific CR5000 Measurement and Control Module User Manual
Page 91

Section 5. Program Declarations
5-3
Public Declaration Example
The example shows the use of the Public declaration.
Dim x( 3 ), y, z( 2, 3, 4 )
Public x, y, z
Public Dim x( 3 ), y, z( 2, 3, 4 )
'Dim is optional
Public x( 3 ),y, z( 2, 3, 4 )
Public w
Station Name
Sets the station name.
Syntax
StationName StaName
Remarks
StationName is used to set the datalogger station name with the program. The
station name is displayed by PC9000 and stored in the data table headers
(Section 2.4).
Units
Used to assign a unit name to a field associated with a variable.
Syntax
Units Variable = UnitName
Remarks
Units allows assigning a unit name to a field. Units are displayed on demand
in the real-time windows of PC9000. The unit name also appears in the header
of the output files and in the Data Table Info file of PC9000. The unit name is
a text field that allows the user to label data. When the user modifies the units,
the text entered is not checked by PC9000 or the CR5000.
Example
Dim TCTemp( 1 )
Units TCTemp( 1 ) = Deg_C
Sub, Exit Sub, End Sub
Declares the name, variables, and code that form a Subroutine.
Syntax
Sub
SubName [(VariableList )]
[ statementblock ]
[ Exit Sub ]
[ statementblock ]
End Sub