14.03.2023, 07:39 (This post was last modified: 14.03.2023, 08:02 by rw_echo.)
(14.03.2023, 06:18)admin Wrote: holdingregisters = registers, you need to use inputregisters instead.
mb.setfloat16precision(2) sets how float16 is converted to integer. By default it's 2 decimals (0.01 precision). Change 2 to 0 to convert to integer without any decimals.
I tried to change "registers" to "inputegisters", but it still doesn't work. I disabled and then re-enabled the resident script, but the address mapped by "inputegister" still doesn't work.
In addition, I want to implement the knx address' 1/1/1 'to' 1/1/100 'to map the continuous list of registered addresses [0] to [100]. Now I need to write 100 mapping statements to implement it. Is there a fast implementation method?
14.03.2023, 08:27 (This post was last modified: 14.03.2023, 08:28 by Fahd.)
(14.03.2023, 07:39)rw_echo Wrote:
(14.03.2023, 06:18)admin Wrote: holdingregisters = registers, you need to use inputregisters instead.
mb.setfloat16precision(2) sets how float16 is converted to integer. By default it's 2 decimals (0.01 precision). Change 2 to 0 to convert to integer without any decimals.
I tried to change "registers" to "inputegisters", but it still doesn't work. I disabled and then re-enabled the resident script, but the address mapped by "inputegister" still doesn't work.
In addition, I want to implement the knx address' 1/1/1 'to' 1/1/100 'to map the continuous list of registered addresses [0] to [100]. Now I need to write 100 mapping statements to implement it. Is there a fast implementation method?
(14.03.2023, 08:15)admin Wrote: Check that the name is exactly inputregisters, you have the name misspelled twice in your post.
I did make two errors in my post, but I checked that the "inputegisters" in the code were correct.
I saw that there is no relevant description of "inputegisters" in the user library 'mbtcp' script in Daniel's post. Is "user. mbtcp" missing the command statement of "inputegisters"?
I have tried to connect one LogicMachine ModbusRTU as Slave, and another LogicMachine ModbusRTU as Master (using profiles), and it doesnt word, then
I have tested using one LogicMachine ModbusTCP as Slave, and another LogicMachine ModbusTCP as Master (using profiles), and it works, very well.
I have connected both Logicmachine using interface RS485-1 (A-A, B-B)
The code I am using is:
local mb = require('user.mbslave')
local mbrtu = require('luamodbus').rtu()
I want to connect a Kostal Smart Energy Meter to the universal Modbus Slave running on LM. Unfortunately I do not know right now what registers the Energy Meter expects to run correctly. Is there any possibility to log/which registers the Energy Meter is requesting/polling from universal Modbus Slave on LM?
many thanks for the quick reply. I having a documentation what registers generally existing, but I don‘t know which one are getting polled. If I would know this I could make a match. Any ideas with this additional information?
That depends on your script or profile, there you set the registers that you want to read/write and is matching the registers described in your device document..
This is how it meant to work. You need to convert it back to float on master device.
mb.setfloat16precision(2) sets how float16 is converted to integer. By default it's 2 decimals (0.01 precision). Change 2 to 0 to convert to integer without any decimals.