(25.07.2018, 08:52)David Wrote:(25.07.2018, 06:59)admin Wrote: You should really use a profile here
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