Instructions
UM-0085-B09  DT80 Range User Manual  Page 353 
RG 
Control String – Input Actions 
The table below lists the commands available to interpret the information coming back into the Serial Channel from the 
serial device. Input actions are not enclosed by 
{} in the control string. 
Expected data 
Input Action syntax 
Description 
Characters 
text 
For each character in the input action string, the DT80 will 
read and discard all incoming characters from the serial 
device until that particular character is seen. It then discards 
the matching character and starts looking for the next 
character in the input action text. 
For example, if the input action string is abc and the input 
data from the serial device is 3c3aabaAAc123 then all 
characters up to and including the second "c" will match, i.e. 
they will be read and discarded. 
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 Table (P389). 
To include a literal %, { or  } character, use \% or \{ or \} 
respectively. 
Control signal 
state 
\c1[n] or 
\c1[nCV] 
wait up to n or nCV milliseconds for CTS input to be set 
(high) – RS232 only 
\c0[n] or 
\c0[nCV] 
wait up to n or nCV milliseconds for CTS input to be cleared 
(low) – RS232 only 
(Wait) 
\w[n]
 or
\w[nCV] 
Delay for n or nCV milliseconds. Actual delay time will be 
approximately 2ms or 2 character times, whichever is longer. 
(Erase receive 
buffer) 
\e 
Clear all previously received characters from the receive 
buffer 
Fixed text string 
\m[text] or 
\m[
n
$]
Read and discard incoming characters until the exact string 
text (or the text in n$) is seen, then discard the matching 
string 
Numeric data 
%{width}type{[nCV]} 
e.g. %d[2CV], %9f 
Interpret the received data according to the specified numeric 
format and store the result into nCV. If the [nCV] is not 
specified, the result will be returned as the return value of the 
channel. Note that { } signifies "optional" 
String data 
%{width}type[n$] 
e.g. %6s[5$] 
Interpret the received data according to the specified string 
format and store the result into n$ 
Data to skip 
%*{width}type 
e.g. 
%*6s
, 
%*f
Interpret the received data according to the specified 
numeric/string format but do not store the result. In other 
words, skip over this data value. 
One of a set of 
strings 
%{width}type['str1','str2',...,nCV{=m}] 
e.g. %9s['goose','moose',23CV=2] 
If the incoming string matches str1 then set nCV=0 
If the incoming string matches str2 then set nCV=1 
If the incoming string matches str3 then set nCV=2 (etc.) 
If a default value (=m) is specified and the incoming string 
matches none of the strings then set nCV=m 
Numeric and String Formats 
These tables describe the possible values for type – that is, the different ways in which the incoming string of characters 
can be interpreted. 
Type 
Description 
Example, assumes input data string is 123.456 
f 
floating point 
1SERIAL("%f[1CV]") 
→
 1CV = 123.456 (nothing left in receive buffer) 
d 
decimal integer 
1SERIAL("%d[1CV]") 
→
 1CV = 123 (.456 left in receive buffer) 
x 
hexadecimal integer 
1SERIAL("%x[1CV]")
  → 1CV = 291 (
.456
 left in receive buffer)
o 
octal integer 
1SERIAL("%o[1CV]") 
→
 1CV = 73 (.456 left in receive buffer) 
i 
decimal/hex/octal integer 
1SERIAL("%i[1CV]")
  → 1CV = 123 (
.456
 left in receive buffer)
c 
character 
1SERIAL("%c[1CV]") 
→
 1CV = 49 (23.456 left in receive buffer) 
b 
binary (no conversion) 
1SERIAL("%b[1CV]") 
→
 1CV = 49 (23.456 left in receive buffer) 
Type 
Description 
Example, assumes input data string is aaba cxyab↵ 
s 
string (
↵
 terminated) 
1SERIAL("%s[1$]") 
→ 1$ = "aaba cxyab" (nothing left in receive buffer)
S 
string (whitespace 
terminated) 
1SERIAL("%S[1$]")  → 1$ = "aaba" (cxyab↵ left in receive buffer) 
[chars] 
string containing only 
specified chars 
1SERIAL("%[abc ][1$]")  → 1$ = "aaba c" (xyab↵ left in receive buffer) 
[~chars] 
string not containing 
specified chars 
1SERIAL("%[~bc][1$]") 
→ 1$ = "aa" (ba cxyab↵ left in receive buffer)










