|
RS-232-C Operation 4
Editing Features
Message Terminators
Examples
The flow of characters coming from the oscilloscope may be con-
trolled either by a signal level on the CTS line (pin 5) or by the
<XON>/<XOFF> pair of characters.
When the oscilloscope is directly connected to a terminal, the fol-
lowing features will facilitate the correction of typing errors:
<BS> or <DELETE> Delete the last character.
CTRL U Delete the last line.
"Message terminators" are markers that indicate to the receiver
that a message has been completed.
On input to the oscilloscope, the Program Message Terminator
is one character which can be selected by the user. A good choice
would be a character that is never used for anything else. The
character is chosen using the command COMM_RS232 and the
keyword EI. The default Program Message Terminator is the
ASCII character <CR>, whose decimal value is 13.
The oscilloscope appends a Response Message Terminator to the
end of each of its responses. It is a string, like a computer prompt,
chosen by the user. This string must not be empty. The default
Response Message Terminator is "\n\r" which means
<LF><CR>.
COMM_RS232 EI,3
This command informs the oscilloscope that each message it
receives will be terminated with the ASCII character <ETX>
which corresponds to 3 in decimal.
(2) COMM_RS232 EO,"\r\nEND\r\n"
This command indicates to the oscilloscope that it must ap-
pend the string "\r\nEND\r\n" to each response.
After these settings, a host command will look like:
TDIV?<ETX>
The oscilloscope responds:
TDIV 1. S
END
Note: Having sent a COMM_RS232 command, the host must wait
for the oscilloscope to change its behavior before sending a com-
mand in the new mode. A safe way to do this is to include a query
on the line which contains the COMM_RS232 command and wait
until the response is received. For example,
COMM RS232 EI,3; *STB?
31