E-Series Modbus Master RTU library with multi slave support?

Hello,

I have been using a library called modbusMaster successfully in some test firmware where the E-Series board is acting as the Modbus Master, but I am currently only polling data from one slave device.
Can anyone recommend a proven Modbus RTU library that supports multiple slave device addresses?For this project we will be connecting a total of two slave devices.

Thank you in advance for any recommendations.

Hi, I’m not sure if this will work but it’s worth to try :wink:
I modify a ModbusMaster lib a little, namely I added a new method:

void ModbusMaster::update_slv_addr(uint8_t u8MBSlave) {
	_u8MBSlave = u8MBSlave;
}

I don’t have any modbus dev at the moment so I can’t tested it but is compiling fine over photon v2.0.1 and the code is borowed from this topic

full code can be found here:
https://go.particle.io/shared_apps/6078e72f346dc30016695e6b

hope will help

@dreamER thank you so much for the reply.
I will give this a try as soon as I can and will update the post on how it goes.

NP :grin: there is still a lot of “TODO” it’s just my idea how the real modbus master should work
The lib without ability to pool for different device at different addresses doesn’t have any sence :man_shrugging:t3:

Hi, any update on your project ?
Just curious if you where abbe to pull for more than 1 slave ?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.