Description
This example shows the how to write or read to any XCON(TCP/UDP) connection. The connection can be handled with LUA function. The write value can be written from any selected item, and the read value also be written to an output item.
The Read function should handle the incoming values and convert them to their HEX values.
This tutorial has two functions:
...
Now o use this in LUA, you can define a server task that is connected to the :('NETx\\VAR\\String\\Item001') item – this means when you want to send data, your LUA Function is invoked and you can parse and send data for to the server.
Info | ||
---|---|---|
| ||
MyTCP_OnReceiveEvent function is invoked when an XCON connection has been established, connection will be established when the serve starts in OnStartEvent() function. |
...