Exectuting test scripts, Script file format, Appendix c - exectuting test scripts – YSI Data Scout Advanced User Manual

Page 106

Advertising
background image

A P P E N D I X C

EXECTUTING TEST SCRIPTS

This appendix details the formats of Script files and their complementary Log files. These files are read and written, respectively, by the
program activated by selecting the Test | Execute Script menu item. This program is hereafter referred to as the Execute Script window
or program. Examples of scripts using this program are included at the end.

See Chapter 5 for additional information on how to select and operate the Script program

All Script files (sometimes called Command files) are recognized by the .cmd file name extension. The Log files generated when these
scripts are executed have the .log file name extension. All such files are stored in the Cmd-Log subfolder of DSAdv.

The CMD-Log subfolder is also used to hold any System Log files created during a DSAdv execution session. These files have names
like SYS_<date>_<time>.LOG. See the ‘Configure | General Options (DSAdv)’ form in Chapter 3 for enabling/disabling the option
that creates these event logging files.

A Script file may contain any number of low-level transducer “base” commands, written one per text line. Such commands may
address any transducer appearing on the Transducer Net Map of Data Scout Advanced. Each addressed transducer must be operable,
and its commands must begin with the same transducer address assigned to it on the map. A “base” command is a simpler pure-text
representation of a low level command that may have other protocol-dependent characters added to it later when executed by the
protocol-sensitive drivers built into Data Scout Advanced.

Also allowed in a script are comment lines and special meta-commands, also written one per text line. The comment lines are written
to the log file and simply ignored. The meta-commands are interpreted by the Execute Script program and not sent to transducers.
They either control the progression and timing of the executed script itself (e.g., Pause, Wait) or some special SDI-12 protocol-
dependent wait function.

SCRIPT FILE FORMAT

A Script file is a simple text file, easily written and edited with any simple text editor.

When it’s necessary to addresses a transducer in a Script file, add one or more base commands of that transducer to individual text
lines in the file. The first part (i.e., transducer address) of each command may be entered literally if known, such as:

0D0 - Read Data (D0) from Transducer with Address 0

Or, it may be entered as an address macro of the form “(#n)” where n is a particular transducer number value (1-16) or a script
variable (a-z or A-Z) currently assigned as a transducer number.

(#1)D0

-

Read Data from Xducer #1 on Transducer Site Net Map

(#x)D0 - Read Data from Xducer # currently assigned to script variable X

The concept of script variables will be described formally below. This address macro will cause the Execute Script program to “look-
up” the currently assigned address of the indexed transducer, and substitute it when the command is expanded and then executed.

Each text line containing a transducer’s base command, whether literal or containing macro substitutions, is eventually “executed” by
sending it to the target transducer, and then reading back the response from the transducer. Both the command and its response are
written on two separate lines of the Log file. For example:

Cmd<0022>: (#1)D0 - Expanded cmd: 0D0 (Read Data)

Rsp<0022>: _0D0!0+22.712+0__

YSI Incorporated

Data Scout Advanced

102

Advertising