MX-FR Series Modular Matrix Frames – User's Manual 115
Sending Data in Binary Format
Description:
sign.
"0D0AAD" is sent out on the 17th output. The matrix does not response. If the remote controlled
device responses the matrix is able to receive and show it.
Legend
Every 2 characters represent a hexadecimal code. The maximum length of the data is 64 characters, so the
max length of the string is 128 char; any special character can be sent.
Receiving Data from the Far Endpoint
Every port can operate either in ASCII or Binary mode. The mode can be set up with the :SERIAL command,
see the next section. Depending on the selected mode, different messages are sent by the router when it
receives data from the far endpoint. These messages arrive from the router asynchronously without any
query command. (The router sends out the message immediately when it receives the data). Therefore it
may happen that this message inserted between another command from the controller and the response
from the router. The controller must be able to handle this case. See below example:
▪ Controller:
▪ Router:
▪ Router:
ASCII
(S#In=[received text]) or (S#On=[received text])
where n is the port number, I is the input, and O is the output port. See the example:
Far endpoint sends: Simple math: 2\[3-(2+8)]. Solve it!
The router sends: (S#I1=Simple math: 2\\[3-\x282+8\x29]. Solve it!)
The received data is represented as plain ASCII text and the maximum length of it is 54 byte. The ( and
) characters are frame delimiters, so they cannot be inside a message. Therefore all ( characters will be
replaced to \x28, while all ) will be replaced to \x29 escape sequences, while \ will be escaped as \\. No other
characters will be escaped. If the programmer of the controller does not want to parse escape sequences (it
is in fact just a sprintf(...) function call), the Binary mode should be used.
Format
Command
→
{:b#17@so=0d0aad}
Response No response from the matrix No response from the matrix
Parameter Description Parameter Values
<in
2
>/<out
2
> Input or output port number Output number in 1 or 2 digit ASCII format (01, 3, 04 etc.)
<I/O> Input or output port type I = input, O = output
HEX string String to be sent
Binary
(B#In=[received text as binary data, e.g. 736F6D657468696E67]) or
(B#On=[received text as binary data, eg. 736F6D657468696E67])
where n is the port number, I is the input, and O is the output port.
The received text is translated to binary form. The maximum length of the received text is 54 byte, so the
length of the hex data can be up to 108 characters. See the example:
Far endpoint, connected to input port 1 is sending data, the router sends:
(B#I1=736F6D657468696E67)
Description: The properties of the serial pass-through can be queried on the input and the output side.
Serial pass-through sending and receiving is enabled on the 24th output port with 9600 baud.
Legend
Setting the Serial Parameters
Description:
Serial pass-through sending and receiving is enabled on the 24th output port with 9600 baud.
Legend: See the previous section.
Format
Command
→
{:serial#24@so=?}
Response
←
(SERIAL#24@SO=1;9600;1;1)CrLf
Parameter Description Parameter Values
Read/write parameters
<in
2
>/<out
2
> Input or output port number Port number in 1 or 2 digit ASCII format (01, 3, 04, etc.)
<I/O> Input or output port type I = input, O = output
<a> Receiving is enabled
0: Incoming data is rejected.
1: The incoming data is sent to the controllers in ASCII mode.
(default)
2: The incoming data is sent to the controllers in HEX mode.
<b> Current baud rate 9600 (default), 14400, 19200, 38400, 57600
<c> Serial pass-through enable 1: enabled, 0: disabled
Read-only parameter
<d>
The presence of a serial
pass-through capable device
1: Serial link is active
0: There is no active serial link
Format
Command
→
{:serial#24@so=1;9600;1;1}
Response
←
(SERIAL#24@SO=1;9600;1;1)CrLf