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.

Multi-proxy modbus connection
#1
Hi everybody!

I have a problem about modbus writing.
In this work there is two airconditioning connected to modbus and it have the same modbus ID (49). I can't change it because the company don't allow it.
I connected this two device to the two different port of RS485.
But the problem is to open comunication with proxy. You can't specificate where it have to open comunication. 
I use this script:
Code:
-- get value of object with group address 1/1/1
setpoint_z2 = grp.getvalue('1/1/1')
setpoint_z2_mb = setpoint_z2*2


-- proxy works only when RTU is enabled in Modbus settings
mb = require('mbproxy').new()
mb:setslave(49)

-- set register at address 6
mb:writeregisters(6, setpoint_z2_mb)

-- read from address 6
value_rmb = mb:readregisters(6)
Reply


Messages In This Thread
Multi-proxy modbus connection - by gianluca_depascali@hotmail.it - 09.09.2024, 09:00
RE: Multi-proxy modbus connection - by admin - 09.09.2024, 09:21

Forum Jump: