2 corascript, 1 corascript fundamentals, 2 useful corascript operations – Campbell Scientific LoggerNet Datalogger Support Software User Manual

Page 413: Corascript -7, Corascript fundamentals -7, Useful corascript operations -7

Advertising
background image

Section 10. Utilities Installed with LoggerNet

10.2 CoraScript

10.2.1 CoraScript Fundamentals

CoraScript is a command line interpreter that reads its commands as text from

its standard input device and writes the results of those commands as text to its

standard output device. This style of input and output makes it possible to

externally control the LoggerNet server operation using input and output

redirection. It also makes it possible to string together commands in scripts

that can be executed from the command line.

The CoraScript command interpreter is started by executing the program file

Cora_Cmd.exe in a command prompt environment. CoraScript is also

available through the LoggerNet Toolbar’s Utilities category. When the script

processor starts up it will output a response:

CoraScript 1,1,1,30

The numbers indicate the version number of the current CoraScript.

CoraScript is a batch processing interpreter. It treats its input (from the

standard input device) as a sequence of commands that are processed serially

from the first to the last. As a command is processed, the results are written to

the standard output device. A command is defined as the text up to a

semicolon (;). The semicolon tells CoraScript that the command is complete

and ready to execute.

The flexibility of the commands available within CoraScript and the

independence from user interface considerations make CoraScript a valuable

tool for testing, troubleshooting, and automating LoggerNet server operations.

Because the commands available in CoraScript operate directly on

the LoggerNet server and not through a user interface, there are no

confirmation prompts for critical operations. Care should be

exercised in using the commands to avoid interrupting normal

server operations.

There is an extensive on-line help file available for CoraScript. To bring up

the help file, type “help;” on the command line. (Make sure to include the

semicolon ‘;’ at the end and leave off the quotes.) Read through the directions

and try some examples.

10.2.2 Useful CoraScript Operations

The following sections provide an overview of some common and very useful

commands available with CoraScript. Some rules about formatting input and

interpreting the responses:

Always end the command with the semicolon (;) character. CoraScript

uses the semicolon to mark the end of the command input and will not

process anything until it is detected.

NOTE

10-7

Advertising