MMX4x2 series – User's Manual 122
Sending a Binary Message (HEX-format) via RS-232
The command is for sending a binary message in Hexadecimal format. This method does not require escaping
the control and non-printable characters.
Command and Response
ç <message>)
æ
Example
ç
æ
The '433030' message is sent out via the P1 serial port.
Using Hexadecimal Codes
Hexadecimal codes can be inserted in the ASCII message when using:
sendMessage command: CALL /MEDIA/UART/P1:sendMessage(C00\x0D)
tcpMessage command: CALL /MEDIA/ETHERNET:tcpMessage(C00\x0D)
udpMessage command: CALL /MEDIA/ETHERNET:udpMessage(C00\x0D)
▪ C00: the message.
▪ \x: indicates that the following is a hexadecimal code.
▪ 0D: the hexadecimal code (Carriage Return).
RS-232 Message Recognizer
DIFFERENCE:
Working Method
▪ The set DelimiterHex is detected in the message, or
▪ The set TimeOut has passed since receiving the last data bit.
DelimiterHex is detected
later, or the TimeOut parameter is set in the meantime, the data appears in the Rx, RxHex, Hash and ActiveRx,
ActiveRxHex, ActiveRxHash properties.
Command and Response
ç <serial_port>
æ <serial_port>
Parameters
Parameter Parameter description
<serial_port> Serial port number
P1, P2
true
false
Example
ç
æ
#recognizer #rs232recognizer #rs-232recognizer
MESSAGE
saved in Rx property
MESSAGE
MESSAGE
saved in ActiveRx property
ActiveRx property is cleared
ActiveProperty
Timeout
MESSAGE
saved in Rx property
MESSAGE
saved in ActiveRx property
ActiveRx property is cleared
ActiveProperty
Timeout
Delimiter
MESSAGE
TimeOut
with timeout
MESSAGE
no timeout,
no delimiter
*