YSI Data Scout Advanced User Manual

Page 107

Advertising
background image

Please note that the term “base” in transducer base command means that certain special protocol dependent parts of commands
should not be included in the script. For example, any SDI-12 command (like the examples above) requires a leading “break” and
“mark” period and a trailing exclamation point (!) character be added before command is transmitted to the serial network. However,
these items are added by Data Scout Advanced, and should not appear on a script line.

Because all SDI-12 a transducer networks use a single serial data line (i.e., the Xmt and Rcv lines are tied together) all command
responses actually begin with a command echo as well. The extra “items” added by Data Scout Advanced do show up in this
“command echo”. A leading underline (_) character (see Rsp<0022>: example above) replaces an unprintable NUL character that
results from the “break” added by Data Scout Advanced. The exclamation point (!) marks the end of the “command echo” and the
next character begins the “true” response returned from the transducer. Finally, two trailing underline (__) characters replace the
unprintable <CR><LF> character sequence that ends each command’s true response.

The natural <CR> <LF> characters that delimit each Script file’s lines are simply used to separate its various text lines (or commands).
For transducer base command lines, these characters should not be thought of as being sent to a transducer.

Command file lines may contain meta-commands. These special commands may be written with mixed-, upper-, or lower-case letters
(unlike transducer base commands which are case-sensitive). They are interpreted by the script program as control functions that it
should perform (i.e., they are not sent to an “addressed transducer”).

Each meta-command also has one or more arguments, separated from the meta-command keyword (and each other) by a single
<space> character. The form and meaning of such arguments are shown within angular brackets < > below. Like the keyword, most
meta-command arguments are not case sensitive. Thus, various script constant names or script variable names may be specified in
upper, lower, or mixed case. Such items are described formally later.

The following meta-commands are available to include in a script file:

set <var> <various>

Assigns the value of a script variable (A-Z);

addto <var> <various>

Adds a value to a script variable (A-Z);

wait <various>

Inserts precise timed delays in a script;

waitSR <various>

Inserts an SDI-12 variable Service Request wait with an ultimate specified timeout in a script;

message <text message>

Passes a message line directly to Log file;

pause <text message>

Same as message, but pauses script execution until a prompted operator resumes it;

do

loop[x] <various>

Starts a repetition loop (x=1-8) in script;

loop[x] <various>

Ends a repetition loop (x=1-8) in a script.

All the meta-commands listed above are discussed in more detail below.

Any number of comment lines may be added anywhere in a script. These lines will be ignored (but copied to the Log file) as long as
the first (non-blank) character of the line is an apostrophe ('):

' <comment text>

Do not add comments to the end of any transducer base command line. However, there is a normally “checked” option on the
Execute Script window, labeled Annotate Log, which automatically adds a trailing comment on the right “half” of each command line
as it is copied to the Log file. Such added comments describe the basic functionality of each recognized transducer command. There is
a similar option (labeled Convert Data) for generating similar comments on the right “half” of each response line as it is copied to the
Log file. This feature parses all fields in a returned transducer response and describes the function of each, bit-by-bit, byte-by-byte.
Any non-obvious data fields (e.g., 4-byte hex copies of IEEE floats) in the response are converted to a more human-readable (e.g.,
decimal) format. If the commands or responses themselves already extend into the right “half” of a Log file’s line, the added
comments are printed on extra (indented) lines instead.

Each command line of a Script file, whether it contains a transducer base command, a comment, or a meta-command, may have
leading <space> characters added before the first recognized character. You may use this feature for “indenting” loops and other
command constructs in the script. Any leading <space> characters will be removed as the command line is processed by the Execute

YSI Incorporated

Data Scout Advanced

103

Advertising