User manual

Automation Protocol Transport Layer
Miranda Technologies Ltd Page 27
Transport Layer
RS232/RS422 Point-to-Point Packet Flow
Command List
For transmission over point-to-point links, the command list is encapsulated
in packets as described below:
Field Contents
Byte 0 STX0/1
Byte 1..n-1 Command List
Byte n Command Terminator ‘:’
Byte n+1 CRC low
Byte n+2 CRC high
STX0 / STX1
Oxtel units expect the STX values in successive packets that are transmitted
by Automation to alternate between STX0 and STX1.
On receipt of a good packet the Oxtel unit will transmit a single character
response of either ACK0 or ACK1 – (where the ACK matches the STX that
was originally sent).
Automation should wait for an ACK before sending the next packet.
However if no ACK is received, then Automation must resend the same
message with the same STX value. This procedure means that lost ACKs will
not cause message duplication.
If message transmission fails (i.e. all retries either receive a NAK response or
they time-out), then the next attempt to send a message should use the
alternate STX value. This is important in older products and software, as a
system reset could cause the Oxtel unit to be waiting for the wrong STX.
However in later software either STX is accepted for:
The first packet at start-up
The packet following one with a CRC error or incorrect STX