Example of complete script file – YSI Data Scout Advanced User Manual

Page 112

Advertising
background image

transducer or an incorrect command being sent to a transducer. If you can tell, by the display of the commands in the Latest
Command
status box and the responses in the Latest Response status box that a script has stalled on a command, click the Skip Cmd.
button. Such action will force the script to move on to the next command in the file, abandoning its natural wait for the current
command’s response (figure C-1).

This Skip Cmd. button will also cancel any long delays (e.g., wait meta-commands) in progress, if you loose patience waiting for it to
finish.

Above each of the status boxes (labeled Latest Command or Latest Response) is a check-box, normally checked by default. If you
uncheck the box, then the program will not display items (commands or responses) in that box. This is only useful when you are
trying to cut out overhead in the script program to make it handle high-speed scripts efficiently. If additional overhead reduction is
required, you might also uncheck the options labeled Annotate Log and Convert Data on the form.

The options labeled Annotate Log and Convert Data (if checked) cause useful comments to be added to the Log file when a script is
executed. The first describes the command line. The second converts all data fields in a transducer response line to human-readable
form and describes each field. Such conversion depends on the actual command executed. Most SDI-12 commands return response
data already in a readable decimal numerical form. Normally, a bad (unrecognized) transducer command will cause the script to
abort. Un-checking the option Stop on Err makes the script continue running after a bad command is marked erroneous, but
executed anyway.

EXAMPLE OF COMPLETE SCRIPT FILE

The following complete script file for a Level Scout transducer, with loops, is annotated partially by added comments at the far right
(not part of the script file), and with additional comments at the end.

(#1)U OPEN

Unlock features of Xducer #1

DO LOOP1 2

Begin outer loop (#1) and repeat 2 times

DO LOOP2

Begin inner loop (#2) – no repeat cnt.

(#1)I

Read ID string from Xducer #1

LOOP2 4

End inner loop (#2) and repeat 4 times

(#1)XM+1

Request Raw Temp./Press. meas.in Xducer

Wait PrvRspSec

Delay until Xducer says data is ready

(#1)

Read Service Request from Xducer ready

(#1)D0

Read data now ready in Xducer

(#1)C5

Request PCB Temp. meas. in Xducer

Wait PrvRspSec

Delay until Xducer says data is ready

(#1)D0

Read data now ready in Xducer

(#1)C6

Request Batt.Volts meas. in Xducer

Wait PrvRspSec

Delay until Xducer says data is ready

(#1)D0

Read data now ready in Xducer

LOOP1

End

outer

loop

(#1)L

Lock features of Xducer #1

YSI Incorporated

Data Scout Advanced

108

Advertising