Jump to content

Block "modbus set slave ID"


Zinenko Alex

Recommended Posts

  • 7 months later...
  • 2 months later...

Tried this on Panel Ethernet master Modbus, but here this is not working 😪.....

I have about 50 slave's I have to read....

So I tought, I only make 1 routine for all 50 slaves, just changing it's slave ID nr, but no...

any suggestions ?

Link to comment
Share on other sites

  • MVP 2021

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...