4. Device Concept
RAP-B511 series
– User's Manual
20
4.3.2.
RS-232 Recognizer
This tool is able to recognize and store the incoming RS-232 message until the previously defined string
(delimiter) is arrived or the timeout elapsed after the last data. The last incoming serial data is stored and it
can trigger an action in Event Manager.
ATTENTION!
The recognizer function works, when the operation mode of the RS-232 port is control or
command injection (in this case, one of the Ethernet socket have to be opened). For more details about
the operation modes see
RS-232 Recognizer Example
The lamp can be turned on and off with the light switch and the RAP-B511. When the lamp turned off by the
switch, the relay box sends an RS-232 status message to the RAP-B511 to inform, and that the lamp was
turned off. When the lamp is controlled with RAP-B511 next time, the device sends the 'turn on' command to
the relay box of the lamp. This example shows how to syncronize the same control function in the RAP with
an other device.
At first, configure the recognizer for the serial communication, after that, configure the Button1.
Step 1.
Enable the operation of the recognizer, set an optimal timeout (e.g. 30 ms). Set the RS-232 operation
mode to Control.
The flowcharts below show the process of the system. The blue highlight boxes display the settings which
connected to the RS-232 recognizer.
Turn on the lamp
ON
OFF
AUTO
Relay box
Lamp
RAP-B511
Light switch
RS-232
User interaction
Button press 1.
Interaction state
TRUE
Result
The lamp is
turned on
Incoming
RS-232 mes
sage
‘the lamp is
turned on’
Send
RS-232 mes
sage
‘turn on
the lamp’
Turn off the lamp
Do the following setting on the UI Config page
:
Step 2.
Select the
Button1
and set the operation mode to
Toggle
. The first button press changes the interaction
state to true. It happens automatically.
Step 3.
Choose the
TRUE feedbacks
tab and click on the
RS-232 message recognized
condition. Write the serial
message which is sent by the relay box about the lamp status in the entry field of the pop-up window
(e.g. 'the lamp is turned on'). Click
Ok
to save.
Step 4.
Choose the
FALSE feedbacks
tab and click on the
RS-232 message recognized
condition. Write the serial
message which is sent by the relay box about the lamp status in the entry field of the pop-up window
(e.g. 'the lamp is turned off'). Click
Ok
to save.
The RS-232 recognizer settings has to be done with Lightware Device Controller Software (see
details in see
section) or with LW3 protocol commands (see more information in
section).
For more information about the button configuration, see
section.
User interaction
Button press 2.
‘the lamp is
turned off’
Interaction state
FALSE
Result
The lamp is
turned off
Send
RS-232 mes
sage
‘turn off the
lamp’
Incoming
RS-232 mes
sage