Over Tps Commands; Sending Data In Text Format; Sending Data In Binary Format - Lightware MX-FR Series User Manual

Table of Contents

Advertisement

 
7. Programmer's Reference
7.12. RS-232 over APS Commands
INFO:

The control interfaces on the router (USB, IP and RS232) have 57600 bit/sec maximum bandwidth,
so heavy traffic should be avoided.

AAAENAIONG!
If the endpoint (the controlled device) sends more than 54 bytes at once without at least
100ms break between the data packets then the sent data could be lost.
Important Notices
Maximum 128-byte data can be sent and 64-byte data can be received at once.
There are two methods for sending data: ASCII and binary modes.
The data rate can be 9600, 14400, 19200, 38400, 57600 baud. The number of the stop bit(s) and the
parity can be set up as well.
If the TPS link operation is HDBaseT (and not long reach) mode and if there is no video signal
transmission then the link can only operate on 9600 baud data rate.
The communication parameters are not detected automatically, so the right values must be set for
both the input and the output boards.
7.12.1. Sending Data in Text Format
Description: Sends the data from the matrix's input or output port in text format which is after the equal sign.
Format
Command {:S#<in2/out2>@<S>I/O=<ascii text>}
Response No response from the matrix
Explanation: 'Blind text' with <CrLf> is sent out on the 9th output. The matrix does not response. If the
remote controlled device responses, the matrix is able to receive and show it.
Legend
Identifier
Parameter Description
<in
>/<out
> Input or output port number Output number in 1 or 2 digit ASCII format (01, 3, 04 etc.)
2
2
<I/O>
Input or output port type
<ascii text> ASCII text
Important Notices about the Escape Characters
The text may contain any characters except "{" and "}" which are used for command framing. The following
escape sequences are supported: \r (carriage return); \n (new line); \t (bs); \x [hex code].
Example: send the {power on}\r\n string to the second output:
{:S#2@SO=\x7Bpower on\x7D\r\n}
It is possible to send the real characters (new line-carriage return) instead of \r\n, but curly brackets must
be escaped. Other characters can also be escaped if it is preferred:
{:S#1@SO=\x7Bpower\x20on\x7D\r\n}
Example
→ {:s#9@so=Blind text\r\n}
No response from the matrix
Parameter Values
I = input, O = output
Text to be sent
MX-FR Series Modular Matrix Frames – User's Manual
7.12.2. Sending Data in Binary Format
Description: Sends the data from the matrix's input or output port in binary format.
Command {:B#<in2/out2>@<S>I/O=<hex string>}
Response No response by the matrix
Explanation: '0D 0A AD is sent out on the 9th output. The matrix does not response. If the remote controlled
device responses the matrix is able to receive and show it.
Legend
Identifier
<in
>/<out
> Input or output port number Output number in 1 or 2 digit ASCII format (01, 3, 04 etc.)
2
2
<I/O>
Input or output port type
<hex string> HDX string
Dvery 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. With this method, it is possible to send any special characters.
Receiving Data from the Far Endpoint
Dvery port can operate either in ASCII or Binary mode. The mode can be set up with the :SDRIAL 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 the data is received). Thus it may
happen that the message inserted between another command from the controller and the response from
the router. The controller must be able to handle this case. For example a simple switch:
Controller:
Router:
Router:
ASCII
When the router receives a message, the next message will be sent to the controllers:
(S#In=[received text]) or (S#On=[received text])
where n is the port number, I is the input, 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
→ {:b#9@so=0d0aad}
No response by the matrix
Parameter Description
Parameter Values
I = input, O = output
String to be sent
{2@3} //sending a switch command
(S#I3=Powered on) //asynchrony serial message
(O03 I02) //response to the switch command
116
Example

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mx-fr9Mx-fr17Mx-fr33lMx-fr33rMx-fr65rMx-fr80r

Table of Contents