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.

transmit value via ETH
#1
Good morning,
I need to transmit the value of a group address (rain security) from one logic machine to another on the same network. The group address to be transmitted on LM with IP 192.168.0.213 is 1/4/15, which I need to replicate on LM with IP 192.168.0.225 and address 16/6/27.

How can I do this?

Thank you very much.
Reply
#2
Two options, one is to make an event script on one of the LMs and create one extra group on the M t match the address and write let say 16/6/27 and write value of 1/4/15 to it.
Another alternative(I would use) is to use MQTT cient app. You can then map both groups to same topic and then they will exchange the data. You will need a local broker on one of the LMs.
------------------------------
Ctrl+F5
Reply
#3
You can also use Remote services if you need to transfer only one or several values: https://kb.logicmachine.net/misc/remote/
Reply
#4
(Today, 07:05)Daniel Wrote: Two options, one is to make an event script on one of the LMs and create one extra group on the M t match the address and write let say 16/6/27 and write value of 1/4/15 to it.
Another alternative(I would use) is to use MQTT cient app. You can then map both groups to same topic and then they will exchange the data. You will need a local broker on one of the LMs.

How do I install the MQTT broker on the LM? Where can I find a configuration example?
Thanks
Reply
#5
Here's a complete example for Remote services.

1. Enable Remote services on 192.168.0.225
- Go to System config > Services > Remote services.
- Create a password, but make sure that it doesn't have @ symbol or the script will fail
- For extra security enable "Allow only exported objects" option

2. Enable Export property for 16/6/27 on 192.168.0.225

3. Create an event script on 192.168.0.213 that is mapped to 1/4/15. Put the correct password into the password variable value.

4. Test the script. If the value does not update on 192.168.0.225 then check the Logs tab on 192.168.0.213. An error message will be provided there.

Code:
password = 'put_password_here' ip = '192.168.0.225' addr = '16/6/27' http = require('socket.http') value = event.getvalue() qs = 'm=json&r=grp&fn=write&alias=' .. addr .. '&value=' .. tostring(value) url = 'https://remote:' .. password .. '@' .. ip .. '/scada-remote?' ..qs res, err = http.request(url) if not res then   log('request failed', err) end
Reply


Forum Jump: