
7. LW3 Programmers’ Reference
UMX-TPS-TX100 series – User's Manual
133
Applied firmware packages: (UMX-TPS): v1.5.0b4 | (WP-UMX-TPS): v1.4.0b8 | (FP-UMX-TPS): v1.4.0b8 | LDC software: v2.5.6b2
7.19.
RS-232 Message Recognizer
DIFFERENCE:
This feature is available only in UMX-TPS-TX140K and UMX-TPS-TX140-Plus models from
FW package v1.3.0b11.
This tool can be used to recognize messages coming from the RS-232 port. The message can be used as a
Condition in Event manager and define an Action for it.
Working Method
A message got recognized from the incoming data, if one of the following occurs:
▪
The set DelimiterHex is detected in the message, or
▪
The set TimeOut has been elapsed since receiving the last data bit.
* In that case, the not-recognized data is kept in the memory (up to 128 bytes). If the
DelimiterHex
is detected
later, or the
TimeOut
parameter is set meanwhile, the data appears in the
Rx
,
RxHex, Hash
and
ActiveRx
,
ActiveRxHex, ActiveRxHash
properties.
7.19.1.
Enable the Recognizer
Command and Response
ç
SET·/MEDIA/UART/
<serial_port>
.RecognizerEnable=
<recognizer_enable>
æ
pw·/MEDIA/UART/
<serial_port>
.RecognizerEnable=
<recognizer_enable>
Parameters
Parameter
Parameter description
Values
Value description
<serial_port>
Serial port number
P1, P2
<recognizer_enable>
Recognizer mode
true
Recognizer is enabled
false
Recognizer is disabled
Example
ç
SET /MEDIA/UART/P1.RecognizerEnable=true
æ
pw /MEDIA/UART/P1.RecognizerEnable=true
#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
with delimiter
Time
Delimiter
MESSAGE
TimeOut
with timeout
MESSAGE
no timeout,
no delimiter
*
7.19.2.
Set the Delimiter Hex
This property stores the delimiter that is between the messages (e.g. Cr, Lf, Space). The value has to be in
hex format (e.g.0D, 0A, 20).
Command and Response
ç
SET·/MEDIA/UART/RECOGNIZER.DelimiterHex=
<delimiter>
æ
pw·/MEDIA/UART/RECOGNIZER.DelimiterHex=
<delimiter>
Parameters
The
<delimiter>
parameter can be max. 8-character long (or 16 hex digit) in
hex
format.
Example
ç
SET /MEDIA/UART/RECOGNIZER.DelimiterHex=3a
æ
pw /MEDIA/UART/RECOGNIZER.DelimiterHex=3a
7.19.3.
Set the Timeout
When the set time is elapsed after the last received message and delimiter was not detected, the device
saves the data into the
Rx, RxHex, Hash
properties. The timeout setting is useful if there is no special or easily
defined delimiter in the incoming data, but there is a time gap between the messages.
Command and Response
ç
SET·/MEDIA/UART/RECOGNIZER.TimeOut=
<timeout>
æ
pw·/MEDIA/UART/RECOGNIZER.TimeOut=
<timeout>
Parameters
The
<timeout>
parameter sets the timeout value in milliseconds:
0
means the timeout is disabled, min.
value is 10.
Example
ç
SET /MEDIA/UART/RECOGNIZER.TimeOut=20
æ
pw /MEDIA/UART/RECOGNIZER.TimeOut=20
... Password :
Login name :
...
Delimiter (hex format: 3A)
Stored string