YSI Data Scout Advanced User Manual

Page 110

Advertising
background image

This meta-command has only one parameter: any text string suitable for prompting the operator. It is also written to the log file, as is
any meta-command.

The MESSAGE meta-command is used to prompt the operator of the Execute Script while the script is running. The script will pause
for exactly five (5) seconds. In such a fixed time period, the operator “may observe” the display prompting message, after which the
script file execution resumes on its own.

message <text message>

The meta-command has only one parameter: any text string suitable for prompting the operator. It is also written to the log file.

The WAIT meta-command causes the script to pause for a specified time period (in whole or fractional seconds). During any such
time period that exceeds 0.5 sec, the operator may also observe a special Delay Box on the form that shows the number of seconds
remaining in the specified period. When delay period expires the script file’s execution continues and any Delay Box disappears.

wait <seconds | special constant | script variable>

The resultant value of the single argument is a time in seconds, and may be entered directly as a number, or as the value of a special
constant
(see below) or as the current value of a script variable (A-Z). The time base used is a high-resolution value measured
accurately from a 64-bit timing register on any Pentium class CPU. It may be specified as an integer or as any fractional double
precision number (e.g., 0.002 sec).

Certain “measurement” commands return a response value in seconds that predicts when that command’s data will be ready to be read
by a special read data (D0) command. The Execute Script program will extract that value from all responses of such commands and
make it available to a wait meta-command if you reference the special constant named PrvRspSec (Previous Response’s ‘Seconds’
Field) instead of a direct numerical value. For example, the following meta-command will utilize that time value extracted from the
last response from the transducer:

Wait PrvRspSec Wait till transducer says its data will be ready

If you need to add additional time simply call Wait again with the explicit added amount of time you need to wait (for example an
additional 20 milliseconds):

Wait PrvRspSec

Wait 0.020

The “response” line of wait that is written to the log file includes two time-of-day (hh:mm:ss) values that indicate the beginning and
end of the wait period.

Alternately, you may use a special form of the command:

Wait 0

The may be used repeatedly in your script to write relative time stamps to the log file wherever you need to measure time accurately..
Such relative time stamps show time in seconds, relative to when the script started executing (and to a resolution of 1 microsecond
(e.g., 0.000001 sec.)). There is, of course, an overhead associated with using this special form of Wait. To measure the overhead (and
check resolution of the time stamps), simply execute a series of such commands in a row. Then check the time differences between
each command as indicated by the Log file annotations on the “right half of the page”.

You may also pre-assign a time value in seconds to a script variable and reference that variable by its name (A-Z) in the Wait
command.

:

T=0.000100‘Pre-assign 100 microseconds to variable t

:
:

Wait T‘Wait amount of time assigned to variable t

:

YSI Incorporated

Data Scout Advanced

106

Advertising