
7
4. Transmission protocol
Transmission via the RS485 interface takes place in ASCII
format (American Standard Code for Information
Interchange), the same as via the COMPAX's RS232
interface, i.e. all transmitted characters are genuinely
representable ASCII characters - with the exception of CR,
LF, XON/XOFF, and the Block-Check Character (BCC).
4.1 Frame format for transmitting
from PC to COMPAX
Necessary data Optional extra characters
Device address
Command code or execute
character ("!" ≡21 hex)
Buffer character ("," ≡2C hex)
No ackn. character ("/" ≡2F hex)
Echo character ("?" ≡3F hex)
End-of-text character
("CR"≡0Dhex)
Block-Check Character BCC
4.2 Meaning of the various trans-
mission elements
Device address: Possible settings are from 1 to 32.
It is possible, by means of address 32
(broadcast address), to address all connected
devices simultaneously. The addressed
devices, however, do not send a reply.
Command code:The possible commands and their
functions are explained in detail in the
COMPAX-M Operating Instructions, in the
description of the RS232 interface, in the
Section "Interface functions".
Execute: character "!" ≡21 hex.
When this character is sent, a command
previously stored in the buffer is executed.
When transmitting, you can send either a command
code or the execute character.
Buffer: (character "," ≡2C hex)
If this character is appended to a command
code, the command in question will not be
executed immediately; it will be stored in the
COMPAX buffer.
No acknow- (character "/" ≡2F hex)
ledgement: If this character is appended to a command
code, COMPAX will not send a reply or
acknowledgement.
Echo: (character "?" ≡3F hex)
If this character is appended to a command
code, COMPAX will send the received data
back in full, completing the return transmission
with CRLF>.
End-of-text : (character "CR" ≡0D hex)
"CR" indicates the end of the character string
being transmitted.
BCC If the BCC function has been activated, you
must, in this position, transmit the byte-by-byte
logical XOR of the characters you have
transmitted (up until but not including CR).
It is possible, for the purposes of particularly time-critical
applications, to transmit a series of commands in COMPAX's
specific binary form. Time can be saved by thus omitting the
format conversion from ASCII to COMPAX-internal binary.
Transmission in normal ASCII format is, even in these
circumstances, still possible (i.e. mixed mode).
4.3 Frame format of the COMPAX
response
Transmission, if error-free, is concluded with:
!CRLF>
or
!the desired reply and CRLF> BCC
(BCC only if this function has been activated)
Transmission, if subject to error, is concluded with:
!Exx CRLF> BCC
(BCC only if this function has been activated)
where "Exx" = error message resulting from detected error
As first part of the reply there will be sent, if adjusted
via P196, the address of the answering device.