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.

LogicMachine as Modbus RTU multi-slave
#1
Hi,
I have a Ventilation system which uses Modbus RTU to access it’s CO2 sensors.
I want to replace those Modbus sensors with LogicMachine which will read CO2 values from KNX sensors.
Can single LogicMachine pretend to be multiple Modbus slaves?
Reply
#2
One RTU can only be one slave.
------------------------------
Ctrl+F5
Reply
#3
(13.09.2021, 08:00)Daniel Wrote: One RTU can only be one slave.

Hi Daniel,
Is this protocol (Modbus RTU), hardware (LM5) or software (luamodbus) limitation?


I thought that the process is next:
1. LM5 receives RTU packet
2. Checks if Slave ID matches
3. Sends response, according to requested command
Reply
#4
In theory this is possible but this will require modbus library modification. As this is rarely used feature we are not planning this.
------------------------------
Ctrl+F5
Reply
#5
(13.09.2021, 10:24)Daniel Wrote: In theory this is possible but this will require modbus library modification. As this is rarely used feature we are not planning this.

Ok, thank you.

Do you have any manuals about compiling C libs (for LM5) for further usage inside LUA modules?
Reply
#6
Unfortunately we do not provide compilation tools. Which library do you want to use? If it's easy enough to compile then we can provide a ready package for it.
Reply
#7
(14.09.2021, 07:48)admin Wrote: Unfortunately we do not provide compilation tools. Which library do you want to use? If it's easy enough to compile then we can provide a ready package for it.

Hi,

I just want to fix, what already exists (at least for myself). 
I'm going to modify and compile libmodbus with multi-slave support + rebuild lua-libmodbus, if needed.

1. I would be grateful, if you can provided specific gcc compile/optimization flags you are using (if there are any).
2. What is recommended way of installing updated library into system?
Do I have direct access to file-system or only ipk package will work?
(my LM5 on the way, so I can't check that by myself now, and I don't want to break your http://4n.lv:7999)
Reply
#8
We do not use lua-libmodbus but our own Lua library. Accessing the filesystem and custom package compilation is out of standard support scope.
Maybe if you don't have many registers it would be easier to implement modbus using the serial library purely in Lua.
Reply
#9
(14.09.2021, 12:40)admin Wrote: We do not use lua-libmodbus but our own Lua library. Accessing the filesystem and custom package compilation is out of standard support scope.
Maybe if you don't have many registers it would be easier to implement modbus using the serial library purely in Lua.

Got it.
Thank you.
Reply


Forum Jump: