07.02.2018, 14:40
hi everyone, i havent found anything yet so:
is there a full documentation for the luamodbus libery we are using here?
is there a full documentation for the luamodbus libery we are using here?
luamodbus documentation
|
07.02.2018, 14:40
hi everyone, i havent found anything yet so:
is there a full documentation for the luamodbus libery we are using here?
13.02.2018, 11:23
There's no full documentation right now, are you looking for some specific functions?
15.02.2018, 08:32
(13.02.2018, 11:23)admin Wrote: There's no full documentation right now, are you looking for some specific functions? yeah, i would like to know if its possible it be a Modbus TCP slave (yes its possible) but with more than one slave id. so i will provide for example 10 diffrent modbus devices with diffrent slave ids and diffrent register mappings. is this possible?
15.02.2018, 09:25
That's not possible to do from a single script. You can use different script for each slave and different TCP ports. Does your master device support non-default TCP ports for slaves?
16.02.2018, 12:41
i think thats not a nice solution. There isnt a defined Master Device. it would be nice to make one TCP "Slave" and handle alle requests.
isnt it possible the get the requested slave id in the "handle request function" or some thing like that?
16.02.2018, 13:04
No, only one id can be set for each slave instance.
20.06.2019, 15:47
Hi
Can you send me a short description of writereadregisters function please? What I'm looking for is: My device returns actual state after every write. I think this function writes a value to a register and waits for reply from the same register. But I'm not sure how to use ti. Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
20.06.2019, 16:59
By standard response to write request contains exactly the same data. So any Luamodbus write function returns just true/false.
21.06.2019, 11:32
(20.06.2019, 16:59)admin Wrote: By standard response to write request contains exactly the same data. So any Luamodbus write function returns just true/false. Does really readregister wait for this reply and read full answer? Not only number of bytes that were sent? Because if I do this: Code: for index, value in ipairs(self.modbus_mapping) do Can you please send me list of parameters for writereadregisters? Thank you
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
21.06.2019, 12:05
You can enable debug mode to see what data is sent/received:
Code: require('luamodbus') You can also add mb:flush() after sleep to discard any invalid data that could be received. Code: mb:writereadregisters(write_reg_start, write_reg_value_1, write_reg_value_2, write_reg_value_3..., read_reg_start, read_reg_count)
10.01.2023, 15:19
Hi;
I have a RS232/RS422/RS485 / Modbus converter that allows interfacing a Modbus device with one or more generic serial devices (such as printers, barcode readers, scales, etc.). Then I need to send a command with several register as 0a 05 a2 04 00 04 af 0b, so the device replays with another several register but the number of byte can be different. How can I read the response? Thanks
11.01.2023, 08:22
Do you have documentation on this device? The request looks like Modbus but the value that is written is not fully correct.
11.01.2023, 10:08
The device is not a standard modbus system, so I have to install a gateway to convert the data to standard RS485 modbus. I have to send a special command and the device responds with data. I don't really understand what I have to send to the device and what I have to read out....... I want to use an adfweb converter.
What is this function log(table.concat(buffer))? what data is buffer? I can use this "mb:writereadregisters(write_reg_start, write_reg_value_1, write_reg_value_2, write_reg_value_3..., read_reg_start, read_reg_count)" to send the correct command but how do I get the response? Thanks
11.01.2023, 10:14
buffer is for debugging the serial communication. It's not needed in normal operation.
mb:writereadregisters will return values that are read after writing. The number of values depends on the read_reg_count argument.
11.01.2023, 11:57
perfect, just I want. Thanks.
|
« Next Oldest | Next Newest »
|