Handshaking And Echoes - Ametek 7280 Instruction Manual

Wide bandwidth dsp lock-in amplifier
Table of Contents

Advertisement

Chapter 6, COMPUTER OPERATION

6.3.08 Handshaking and Echoes

A handshake is a method of ensuring that the transmitter does not send a byte until
the receiver is ready to receive it, and, in the case of a parallel interface, that the
receiver reads the data lines only when they contain a valid byte.
GPIB Handshaking
The GPIB interface includes three lines (*DAV, *NRFD, *NDAC) which are used to
implement a three-wire handshake. The operation of this is completely defined by the
IEEE-488 standard and is fully automatic, so that the user does not need to know
anything about the handshake when writing programs for the GPIB. Note that each
command must be correctly terminated.
RS232 Handshaking
In the RS232 standard there are several control lines called handshake lines (RTS,
DTR outputs and CTS, DSR, DCD inputs) in addition to the data lines (TD output
and RD input). However, these lines are not capable of implementing the
handshaking function required by the model 7280 on a byte-by-byte basis and are not
connected in the model 7280 apart from the RTS and DTR outputs which are
constantly asserted.
Note that some computer applications require one or more of the computer's RS232
handshake lines to be asserted. If this is the case, and if the requirement cannot be
changed by the use of a software switch, the cable may be used in conjunction with a
null modem. A null modem is an adapter which connects TD on each side through to
RD on the other side, and asserts CTS, DSR, and DCD on each side when RTS and
DTR are asserted on the opposite sides.
With most modern software there is no need to assert any RS232 handshake lines and
a simple three-wire connection can be used. The actual handshake function is
performed by means of bytes transmitted over the interface.
The more critical handshake is the one controlling the transfer of a command from
the computer to the lock-in amplifier, because the computer typically operates much
faster than the lock-in amplifier and bytes can easily be lost if the command is sent
from a program. (Note that because of the limited speed of human typing, there is no
problem in the terminal mode.) To overcome the problem an echo handshake is used.
This works in the following way: after receiving each byte, the lock-in amplifier
sends back an echo, that is a byte which is a copy of the one that it has just received,
to indicate that it is ready to receive the next byte. Correspondingly, the computer
does not send the next byte until it has read the echo of the previous one. Usually the
computer makes a comparison of each byte with its echo, and this constitutes a useful
check on the validity of the communications.
Where the echo is not required, it can be suppressed by negating bit 3 in the RS232
parameter byte. The default (power-up) state of this bit is for it to be asserted.
The program RSCOM2.BAS in section C.2 illustrates the use of the echo handshake.
6-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents