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.

Visualizing Modbus objects
#1
Question 
Hi, 

I am working with the example of writing and reading in the modbus:

http://openrb.com/example-write-modbus-r...addresses/

and generate reading to a meter, my question is: to be able to read the data I got, from another logical machine, how should I work? Through an object or a function?

Thanks.
Reply
#2
If both LMs have KNX/IP enabled, they will exchange object values automatically.
Reply
#3
Thank you, Admin.
But maybe I did not know how to explain myself,
I have a server that reads modbus TCP ip and I need to pass the logic data to this server, how do I do it?
Reply
#4
Then I don't fully understand your question: does your server support Modbus TCP?
Reply
#5
This generating a test to be able to check the Modbus TCP communication, but when I put four data it jumps to the next address and does not take me in data that I send it. What could be failing?
I am using this code: http://openrb.com/lm-as-modbus-tcp-slave

CODE:
if not mb1 then
require('luamodbus')
mb1 = luamodbus.tcp()
mb1:open('192.168.0.10', 502)
mb1:connect()
end


--Data1ModbusTCP
coil = mb1:readcoils(0)
grp.write('5/1/1', coil)

--Dato2ModbusTCP
coil2 = mb1:readcoils(0)
grp.write('5/1/2', coil2)

--Dato3ModbusTCP
register = mb1:readregisters(0)
grp.write('5/1/3', register)

--register2 = mb1:readregisters(0)
--grp.write('5/1/4', register2)
Reply
#6
Are you running both modbus TCP master and slave on the same LM? Which kind of script are you using to read data - event or resident?
Reply
#7
Hi,

No, I am using a logic 2 as a slave and a logic3 as a master, I am reading them through a resident function and writing the data into objects.
Reply
#8
Can you show both scripts? Keep in mind that if KNX/IP features are enabled on both devices, they will automatically exchange object values.
Reply


Forum Jump: