![]() |
|
Use of address_scale with read_count and read_offset Modbus Profiles - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: Use of address_scale with read_count and read_offset Modbus Profiles (/showthread.php?tid=6174) |
Use of address_scale with read_count and read_offset Modbus Profiles - merlin - 01.11.2025 Hi i Hope this is relative simple question When using read_count and read_offset features in a modbus profile, can i use address_scale in the same process and if so what value do you use for address_scale, the offset from the block read point or the actual address. I have in fact tried both and Neither work I know when using the read_count and read_offset on there own return the correct value, but when using with address_scale I just get 0 back. Examples of what i have tried below from my profile, i have tested each of these with no address_scale using the block read and i get results so i know the registeres and offsets are all working fine. and note the SF location are all in the block that is read /* I_AC_Current (A) @40071, SF @ Address Location 40075 */ { "name": "I_AC_Current", "type": "register", "address": 40069, "read_count": 50, "read_offset": 2, "datatype": "uint16", "bus_datatype": "float32", "address_scale": 40075, "units": "A", "value_nan": [65535], "value_default": 0 }, /* I_AC_CurrentA (A) @40072, SF @ Offset Location */ { "name": "I_AC_CurrentA", "type": "register", "address": 40069, "read_count": 50, "read_offset": 3, "datatype": "uint16", "bus_datatype": "float32", "address_scale": 6, "units": "A", "value_nan": [65535], "value_default": 0 }, /* I_AC_VoltageAN (V) @40079, SF Note Defined (this works)*/ { "name": "I_AC_VoltageAN", "type": "register", "address": 40069, "read_count": 50, "read_offset": 10, "datatype": "uint16", "bus_datatype": "float32", "units": "V", "value_nan": [65535], "value_default": 0 }, Any help here would be appreciated. If you have to ask why using block read, it is because i need to get all values back with the same time stamp for calculations, reading each item individually introduces errors . |