1 table-data dataloggers, 2 mixed-array dataloggers – Campbell Scientific LoggerNet-SDK Software Development Kit User Manual

Page 25

Advertising
background image

Section 4. CsiCoraScript Control

4.3.2.1 Table-Data Dataloggers

The LoggerNet server, by default, creates a collect area for the Public or
InLocs table of table-data dataloggers such as the CR9000 or CR10X-TD. The
basic CoraScript commands that are used to enable collection and establish
scheduled collection are:

set-collect-area-setting

– used to enable a device for collection

set-device-setting

– used to activate scheduled collection for a device

If you have added a CR9000 to the datalogger network and you have a program
running on that device, the following command will enable the public table for
collection by activating the collect-area-setting scheduleEnabled (id = 2):

set-collect-area-setting CR9000 public 2 1;

Every time a manual poll or any other collection occurs, data will be collected
for the public table of the CR9000. If a DataSource advisor has been created, it
will trigger and display the new values. If you want to automate the data
collection process, set the device's scheduled collection interval through the
device setting collectSched (id = 5):

set-device-setting CR9000 5 {1 19900101 300000 120000 3 86400000};

With the above setting, the LoggerNet server will automatically collect all
tables enabled for collection from the CR9000 every 300000 milliseconds.
Once this setting is in place, the activated DataSource advisor will display
updates as they are automatically collected.

4.3.2.2 Mixed-Array Dataloggers

Although the DataSource control can create a temporary data cache to watch
all input locations, mixed-array dataloggers, like the CR7 and CR10X, require
additional commands to create a permanent collect area for input locations.
Input Locations (InLocs) contain values that are usually stored every time the
program executes. However, the LoggerNet server does not create a permanent
data cache by default containing data from InLocs for a mixed-array
datalogger. If a permanent collect area for InLocs is desired or only specific
InLocs are needed, the collect area must be created manually in the LoggerNet
server. The following commands are used to set up a permanent InLocs collect
area for a mixed-array datalogger:

create-inlocs-area

– create a collect area containing specified input

locations

set-collect-area-setting

– used to enable a device for collection

set-device-setting

– used to activate scheduled collection for a device

The following example sets up collection for two input locations of a CR10X
by identifying the station, declaring a name for the collect area, and listing the
input locations to include:

create-inlocs-area CR10X InLocsArea {1 "inlocs1"} {2 {inlocs2}};

4-3

Advertising