beautypg.com

15 show defaults, Programming the datalogger, 1 crbasic programming – Campbell Scientific TX312 High Data Rate GOES Transmitter User Manual

Page 20: 1 goesdata, 1 result code, 2 data table, 3 table option

background image

TX312 Transmitter

4.5.2.15 Show Defaults

The Show Defaults will populate the edit window with default values, which
are not valid for transmission. Selecting show defaults, then sending the
defaults to the transmitter will return the transmitter to factory default settings
and prevent transmission of data. Once the defaults are loaded to the edit
window, the defaults can be edited. Sometimes it is useful to start from a
known condition.

5. Programming the Datalogger

5.1 CRBasic Programming

This section covers CRBasic programming concepts for the CR295(X),
CR800, CR850, CR1000, CR3000, and CR5000 dataloggers. Not all options
are available for the CR5000 and CR295(X) dataloggers. There are four
program instructions directly related to the TX312 GOES transmitter:
GoesData, GoesStatus, GoesGPS and GoesSetup.

5.1.1 GoesData

The GoesData instruction is used to send data from the datalogger to the
TX312 transmitter. Each time GoesData is executed, data is ordered with the
newest data to be transmitted first, which is opposite of how Edlog dataloggers
arrange data.

There are five parameters to the GoesData instruction: Result Code, Data
Table, Table Option, Buffer Control, and Data format.

In GoesData(), Table Option, Buffer Control, and Data Format can be
variables declared as type long. Error checking is done at run time instead of
compile time. See Table 5.1-7 for runtime error codes.

Using CRBasic dataloggers, time of Max, Min, etc. are stored as number of
seconds since 1990, which does not work for GOES transmission.

5.1.1.1 Result Code

The result code is used to determine if the GoesData instruction executed
successfully. When successful, GoesData will return a zero to the Result Code
variable. When GoesData executes successfully, but there is no new data in
the specified table, the result code is set to 100. See Table 5.1-6 for details
regarding result codes.

5.1.1.2 Data Table

The Data Table argument is used to specify which data table the GoesData
instruction is to copy data from.

5.1.1.3 Table Option

The Table Option is used to specify what data is copied from the data table.
There are three options. Use zero to specify all new data. Use one to specify
only the most current record. Use any other positive number to specify the

14