Section 4. protocol, Parameters, Timeouts – MagTek MCP User Manual

Page 29: Character wait timeout (cwt), Block wait timeout (bwt)

Advertising
background image

23

SECTION 4. PROTOCOL


This section describes the protocol used for nodes to communicate using the frame formats and
S-frame command described previously.

PARAMETERS

After two nodes are synchronized and before they begin exchanging frames, the nodes must
retrieve any required communication parameters from each other. The Supported EDC Type
parameter is an example of a parameter that may be desired. For a complete list of the supported
parameters, see the S-frame Get Communication Parameters command.

TIMEOUTS

This section defines the three types of timeouts a node uses.

Character Wait Timeout (CWT)

This timeout is used by the node receiving a frame. This timeout is the maximum period of time
allowed between characters of a frame being received. The period is measured from the time a
character is received to the time the next character is received. The purpose of this timeout is to
provide an end of frame indicator for damaged frames that are being received. Under error free
conditions, the expected number of bytes in a frame can be determined by the information in the
PCB and the length fields of the frame. The end of a frame can be determined by counting the
bytes received and comparing the count to the expected number of bytes in the frame. When
there is an error in the frame the CWT ensures that the end of the frame is detected. The CWT
should not be used to detect the end of frames under error free conditions because it would slow
down the protocol. Devices will use a minimum CWT value of 10ms.

Block Wait Timeout (BWT)

This timeout is used by the node transmitting a frame. This timeout is the maximum period of
time allowed between transmitting a frame and receiving a frame that acknowledges the
transmitted frame. Not all frames require an acknowledgement frame. The period is measured
from the time the last character of a frame is transmitted to the time an acknowledgement frame
is received. If the time expires while receiving a frame, then the timeout will be extended until
the entire frame is received and processed. If this timeout expires, the transmitting node should
initiate error recovery. Devices will use a minimum BWT value of 250ms. See the S-frame
sections get communications parameter and set communication parameters command for
information on how to get and set the value of BWT.

Advertising