7. LW3 Programmers’ Reference
RAP-B511 series
– User's Manual
92
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
7.17.4.
Setting the Message Header
Command and Response
ç
SET·/CTRL/HTTP/C1.Header=
<header_text>
æ
pw·/CTRL/HTTP/C1.Header=
<header_text>
Example
ç
SET /CTRL/HTTP/C1.Header=Host: 192.168.0.220\r\nContent-Type: text/xml\r\nAuthorization: Basic
YWRtaW46TGlnaHR3YXJlMDE=
æ
pw /CTRL/HTTP/C1.Header=Host: 192.168.0.220\r\nContent-Type: text/xml\r\nAuthorization: Basic
YWRtaW46TGlnaHR3YXJlMDE=
7.17.5.
Sending a Post Message
Command and Response
ç
CALL·/CTRL/HTTP/C1:post(
<body_text>
)
æ
mO·/CTRL/HTTP/C1:post
Example
ç
CALL /CTRL/HTTP/C1:post(<Command><Message><Send><Text>LI1R_P</Text></Send></
Message></Command>)
æ
mO /CTRL/HTTP/C1:post
7.17.6.
Sending a Put Message
Command and Response
ç
CALL·/CTRL/HTTP/C1:put(
<body_text>
)
æ
mO·/CTRL/HTTP/C1:put
Example
ç
CALL /CTRL/HTTP/C1:put(<Command><Message><Send><Text>LI1R_P</Text></Send></Message></
Command>)
æ
mO /CTRL/HTTP/C1:put
7.18.
TCP Message Recognizer
DIFFERENCE:
This feature and below commands are available from FW package v1.1.0b3.
This tool can be used to recognize messages coming from a TCP server. You can link an immediate
event Action that is run when a message is recognized, but you can also use it in Event manager.
#tcprecognizer #message #new
Preparation
Step 1.
Set a TCP client in the Lightware device (three TCP clients can be run at the same time), set the
properties of the target TCP server.
Step 2.
Set the
DelimiterHex
and the
TimeOut
settings for the proper message processing
Step 3.
Make sure the TCP/IP port is opened in the target device (think about Firewall settings in the network).
Step 4.
Connect to the TCP server.
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.18.1.
Setting the IP Address of the TCP Server
Command and Response
ç
SET·/CTRL/TCP/C
<loc>
.ServerIP(
<IP_address>
)
æ
pw·/CTRL/TCP/C
<loc>
.ServerIP(
<IP_address>
)
Parameters
The
<loc>
parameter can be 1, 2 or 3 as at most three TCP connections can be established at the same time.
Example
ç
SET /CTRL/TCP/C1.ServerIP(192.168.1.14)
æ
pw /CTRL/TCP/C1.ServerIP(192.168.1.14)
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
*