Open RobWPink opened 8 months ago
The CSE_ModbusRTU library supports multiple Servers and Clients running on a single device. You can create as many objects as you want. Just make sure to use unique addresses (and names optionally) to identify them on the bus.
Ok great, Thank you! Last question, it appears this library uses std::vector, which Arduino AVR's standard library doesn't (and can't) include, is there anyway around this? I'm using an Arduino Mega for its multiple Serial ports.
I think I overlooked that side of the library. Since Modbus data sizes will be fixed and only set during the instantiation, we can use fixed memory allocation for them. I will soon add a workaround for the problem.
Hi Vishnu. First of all a would like to appreciate your effort to create this library. I have started to implement it to Mega 2560. I have been facing an issue with std::vector. Finally I have found an solution for that and I put this line to code #include
Hi @PedroPiko. Thanks for sharing the workaround for using CSE_ModbusRTU
library with Arduino AVR boards. I will try to fix the compatibility issue in the upcoming version.
All the examples and explainations are for a single master and slave. Do I need to make multiple Client objects?