User manual

Automation Protocol Transport Layer
Miranda Technologies Ltd Page 28
ACK / NAK
If the STX is wrong then neither ACK nor NAK is returned and Automation
will have to deal with a time-out.
If the STX was correct but the CRC wrong, then a NAK is sent back to
Automation by the Oxtel unit
If both the STX and CRC are correct for a packet then an ACK0 or ACK1
character (corresponding to the STX) is sent back to Automation. ACKs will
be returned even if the command list contains invalid commands or
parameters, or errors occur during the processing of the commands.
Command Terminator
Since the command terminator character “:” (colon) marks the end of a
command list, this character must not occur within the command list. When a
command list includes a string parameter that needs a colon character (for
example, the m003 command), it can be escaped as “\3A”.
Command Separator
Multiple automation commands may be included within a single command
list by concatenating them with the command separator character “;” (semi-
colon). When a command list includes a string parameter that needs a semi-
colon character, it can be escaped as “\3B”.
Status Responses
Status requests from the controller cause the following message to be
returned:
Field Contents
Byte 0 STX0/1
Byte 1..n-1 Status Response
Byte n Status Terminator ‘:’
Byte n+1 CRC low
Byte n+2 CRC high
Status messages must not be acknowledged by Automation, and cannot be re-
transmitted. The STX value sent matches the STX value of the original status
request. If Automation fails to receive a status message it must request the
status again.