Jump to content

Best practice for modbus slaves

Recommended Posts

I am working on a project that has a single  unistream PLC with 11 Samba PLC as slaves. The slaves are in every way identical except of course for there address and name. I have made the current setup with arrays for the data that i am reading and writing, For example:

valve_status[0-10] which contains the status of particular valve from all of the slaves or vent_start[0-10] which i can manually start a fan on all the slaves.

Now for my question, i have to expand the current program and i have to exchange more data between the slaves which i can do manually. In this case it is 6 operations to add for each slave so in total 66 operations to add. Not fun but can be done. The other option i see is change 1 slave, delete the rest and then duplicate the first slave and change all the addresses, both the IP and the array numbers. Also not a fun job.

Am i missing an option? or is there perhaps a way to make a setup that is easier changed? The thing is that this probably the first of a number of expansions that i have to make so i would rahter spend more time now then repeating the same mistakes.

Link to comment
Share on other sites

  • MVP 2023

Sounds like you're in the same boat I am but in a different section.

See this post-


You didn't mention how fast the communication has to run.  In my case it's slow (about 1 minute update is fine) so I can set up a slave table and loop through it without affecting scan time.

The Modbus Advanced Ladder Functions are not for the faint of heart or the neophyte but they do allow a lot more flexibility.

Joe T.

Link to comment
Share on other sites

Thanks for info, Now i have some homework to do i think :) . I have worked with visilogic modbus functions in the past so i have to refresh my memory a bit before i start. But this certainly gives more options.

To give a little bit more information about my setup, i have a USC-B5-TR22 which works as an intermediate between PRIVA (building ventilation) and our production machines which are running on a V560 and a SM35. So it allows me to automatically start the ventilation when a machine is started, or working the other way PRIVA can request to turn on exhaust fans on the machine if it gets to hot in The building and there are machines that are not running production.

At the moment i have different communication speeds, most are just status checks so i have the cyclicly running on 60 sec, There is one exception and that is a write action that basically has to be as fast a possible, i could change it to something apericodic maybe. 

I am going to experiment and report back here.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.