04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A. CRBasic Programming Instructions<br />

Syntax<br />

Sub subname (argument list)<br />

[statement block]<br />

Exit Sub<br />

[statement block]<br />

End Sub<br />

WebPageBegin / WebPageEnd<br />

See Information Services (p. 166).<br />

A.1.1 Variable Declarations & Modifiers<br />

Alias<br />

Assigns a second name to a variable.<br />

Syntax<br />

Alias [variable] = [alias name]; Alias [array(4)] = [alias<br />

name], [alias name(2)], [alias name]<br />

As<br />

Sets data type for Dim or Public variables.<br />

Syntax<br />

Dim [variable] AS [data type]<br />

Dim<br />

Declares and dimensions private variables. Dimensions are optional.<br />

Syntax<br />

Dim [variable name (x,y,z)]<br />

ESSVariables<br />

Automatically declares all the variables required for the datalogger when used in<br />

an Environmental Sensor Station application. Used in conjunction with<br />

ESSInitialize.<br />

Syntax<br />

ESSVariables<br />

NewFieldNames<br />

Assigns a new name to a generic variable or array. Designed for use with<br />

<strong>Campbell</strong> <strong>Scientific</strong> wireless sensor networks.<br />

Syntax<br />

NewFieldNames(GenericName, NewNames)<br />

PreserveVariables<br />

Retains values in Dim or Public variables when program restarts after a power<br />

failure or manual stop.<br />

Syntax<br />

PreserveVariables<br />

Public<br />

Declares and dimensions public variables. Dimensions are optional.<br />

Syntax<br />

Public [variable name (x,y,z)]<br />

474

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!