This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Exchange data between two LM5
#4
First you have to enable remote services and export objects.
You can ether read value or write to other LM.

Code:
require('socket.http')
socket.http.TIMEOUT = 5

-- Read from object
local reply = socket.http.request('http://remote:remote@192.168.0.10/scada-remote?m=json&r=grp&fn=getvalue&alias=0/0/8')
grp.write('0/0/7', reply)

-- Write to object
value = grp.getvalue('0/0/7')
local reply = socket.http.request('http://remote:remote@192.168.0.10/scada-remote?m=json&r=grp&fn=write&alias=0/0/8&value=' .. value .. '')
------------------------------
Ctrl+F5
Reply


Messages In This Thread
Exchange data between two LM5 - by Fahd - 05.08.2022, 09:39
RE: Exchange data between two LM5 - by admin - 05.08.2022, 09:43
RE: Exchange data between two LM5 - by Fahd - 05.08.2022, 09:57
RE: Exchange data between two LM5 - by Daniel - 05.08.2022, 11:10
RE: Exchange data between two LM5 - by Fahd - 05.08.2022, 12:41
RE: Exchange data between two LM5 - by Daniel - 05.08.2022, 12:44

Forum Jump: