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.

Modbus RTU485-2
#4
(25.07.2018, 08:52)David Wrote:
(25.07.2018, 06:59)admin Wrote: You should really use a profile here Smile

You have an issue with multiplier, there should be a dot separator instead of comma:
Code:
grp.update('32/2/1', res101*0.01)

There's an optional third argument for readregistervalue - word/byte swap. Default value is w. More info here: http://openrb.com/docs/modbus.htm
Code:
res103 = mb:readregistervalue(3, "uint32", "n")

In this case we need to use scripting instead of profile because we're already using profile for RS485-1 modbus communication with a different baud rate. 

Appart from these issues, is the script ok?
Is it correct to use os.sleep into the script?

Thanks,

update modbus package to genohm-scada-modbus_20171103_mxs.ipk - it can work with 3 rs lines with different settings
for imx6 use this genohm-scada-modbus_20171103_imx6.ipk
Reply


Messages In This Thread
Modbus RTU485-2 - by josep - 24.07.2018, 18:25
RE: Modbus RTU485-2 - by admin - 25.07.2018, 06:59
RE: Modbus RTU485-2 - by David - 25.07.2018, 08:52
RE: Modbus RTU485-2 - by AEK - 25.07.2018, 09:38
RE: Modbus RTU485-2 - by josep - 25.07.2018, 10:13
RE: Modbus RTU485-2 - by AEK - 25.07.2018, 11:00
RE: Modbus RTU485-2 - by josep - 25.07.2018, 11:38
RE: Modbus RTU485-2 - by admin - 25.07.2018, 11:44
RE: Modbus RTU485-2 - by AEK - 25.07.2018, 12:20
RE: Modbus RTU485-2 - by josep - 25.07.2018, 13:03
RE: Modbus RTU485-2 - by admin - 26.07.2018, 06:11

Forum Jump: