UM-0085-B09 DT80 Range User Manual Page 351
RG
Control String – Output Actions
The table below lists the ways in which prompts and text strings can be sent from the DT80 to the device connected to
the Serial Channel. These commands must be enclosed by
{} in the control string.
Text
text
e.g. abc\009def\013,
GETVAL^M^J
A sequence of characters to be sent.
Non-printable characters may be specified using \nnn (where
nnn is the ASCII code, 1-255). ^char notation may also be
used for control characters (ASCII 1-31), see ASCII-Decimal
Break character
Transmit a "break" (set the Tx line to logic-0 state) for n or nCV
character periods
Control signal
Set
(to a value >+3.5V) – RS232 only
Clear RTS (to a value <–3.5V) – RS232 only
(Wait)
Delay for n or nCV milliseconds. Actual delay time will be
approximately 2ms or 2 character times, whichever is longer.
reserved
characters
\% or \{ or \}
Output a %, { or } character. (
may also be used to output a
single % character.)
CV value
%{flag}{width}.{precision}type[nCV]
e.g. %d[2CV] or %9.3f[7CV] or
Output the value of nCV in the specified numeric format (see
below). Note that { } signifies "optional"
string value
%{flag}{width}.{precision}s[n$]
e.g.
Output the value of string variable n$
Numeric Formats
This table describes the possible values for type – that is, the different ways in which a CV value can be converted into a
string of characters.
Example, assumes 1CV = 74.36
1SERIAL("{%f[1CV]}") → 74.36
floating point, exponential format
1SERIAL("{%e[1CV]}") → 7.436e01
floating point, exponential format
1SERIAL("{%E[1CV]}") → 7.436E01
f or e format depending on value
1SERIAL("{%g[1CV]}") → 74.36
or
format depending on value
1SERIAL("{%G[1CV]}") → 74.36
1SERIAL("{%d[1CV]}") → 74
hexadecimal integer
1SERIAL("{%x[1CV]}") → 4a
1SERIAL("{%X[1CV]}") → 4A
octal integer
1SERIAL("{%o[1CV]}") → 112
Note that
• The
%c conversion outputs the value of nCV as a single 8-bit character. Only the lower 8 bits of the integer
portion of n
CV are output. So in the above example the character value 74 (ASCII "J") will be sent.
• The
%g and %G conversions select exponential notation if the exponent is less than –4, or greater than or equal
to the specified
Width, Precision and Flag
The various conversion types described above can be further qualified using the optional width, precision and flag
specifiers. These allow you to control exactly how the transmitted data will be formatted.
Field Width
The width value specifies the minimum output field width – that is, the minimum number of characters that will be
output. If the converted value requires fewer characters than the specified field width, then space or zero characters are
used to pad the field to the specified width. If the converted value results in more characters than the specified field
width, then all characters will still be output. The width parameter is not applicable for the
%c conversion type.