Setting The Tcp/Ip Port Number Of The Tcp Server; Connecting To A Tcp Server; Disconnecting From A Tcp Server; Setting The Delimiter Hex - Lightware RAP-B511-EU User Manual

Room automation panel
Table of Contents

Advertisement

 
7. LW3 Programmers' Reference
7.18.2. Setting the TCP/IP Port Number of the TCP Server
Command and Response
ç SET·/CTRL/TCP/C<loc>.ServerPort(<port_no>)
æ pw·/CTRL/TCP/C<loc>.ServerPort(<port_no>)
Example
ç SET /CTRL/TCP/C1.ServerPort(4999)
æ pw /CTRL/TCP/C1.ServerPort(4999)
7.18.3. Connecting to a TCP Server
Command and Response
ç CALL·/CTRL/TCP/C<loc>:connect()
æ mO·/CTRL/TCP/C<loc>:connect
Example
ç CALL /CTRL/TCP/C1:connect()
æ mO /CTRL/TCP/C1:connect
7.18.4. Disconnecting from a TCP Server
Command and Response
ç CALL·/CTRL/TCP/C<loc>:disconnect()
æ mO·/CTRL/TCP/C<loc>:disconnect
Example
ç CALL /CTRL/TCP/C1:disconnect()
æ mO /CTRL/TCP/C1:disconnect
7.18.5. Setting 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·/CTRL/TCP/C<loc>.DelimiterHex=<delimiter>
ç
pw·/CTRL/TCP/C<loc>.DelimiterHex=<delimiter>
æ
Parameters
The
<delimiter>
parameter can be max. 8-character long (16 hex digit) in hex format.
Example
ç SET /CTRL/TCP/C1.DelimiterHex=00
æ pw /CTRL/TCP/C1.DelimiterHex=00
RAP-B511 series – User's Manual
7.18.6. Setting 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
ç
æ
Parameters
The
is 10.
Example
ç SET /CTRL/TCP/C1.TimeOut=20
æ pw /CTRL/TCP/C1.TimeOut=20
7.18.7. Querying the Last Recognized Message (String)
The recognized message is stored as a string in the below property till the next recognized message or until
the clear() method is called.

TIPS AND TRICKS:
follow each other, the action will execute once. (A Condition can be detected in Event Manager if a change
happens. But if the same string is saved into the property after each other, it will not cause a change.)
Command and Response
ç GET·/CTRL/TCP/C<loc>.Rx
æ pr·/CTRL/TCP/C<loc>.Rx=
Parameters
The
Delimiter
Delimiter
Example
ç GET /CTRL/TCP/C1.Rx
...00PWR_0100...
æ pr /CTRL/TCP/C1.Rx=PWR_off
Stored string
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
SET·/CTRL/TCP/C<loc>.TimeOut=<timeout>
pw·/CTRL/TCP/C<loc>.TimeOut=<timeout>
<timeout>
parameter sets the time value in milliseconds: 0 means the timeout is disabled, min. value
When this property is set as a condition in the Event Manager, and the same strings
<recognized_string>
<recognized_string>
parameter can be max. 128 byte long.
93

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rap-b511-kRap-b511-wRap-b511-sRap-b511-ukRap-b511-us

Table of Contents