Jump to content

Block "modbus set slave ID"


Recommended Posts

  • 7 months later...
  • 2 months later...
  • MVP 2023

Advanced Modbus will set you free.  It's more complicated but gives you the control of the Vision function blocks.  See this topic-

I set up all my slaves in this application in a couple of  data tables.  It worked quite well, as I wrote a State Machine that loops through the appropriate table until it finds a slave ID of 0.  I wrote four separate functions for read coils, write coils, read registers, and write registers to keep it "simple".  You can put your Slave ID, Start Address, Length, and a pointer to a an array element for a local tag in the table. 

Unfortunately, the application I wrote is for a customer and I can't post it but if you take a swing at it and PM me I can work with you.

Joe T.

 

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.