Jump to content
Rifet

Using visilogic to read parameters from another device via modbus rs485

Recommended Posts

Hi there, this is my first time working with unitronix plc and I have some problems with understeanding how does modbus communication works.

I am using visilogic 1210 plc and I want to read some parameters from Iskra FPC400. I want to use modbus because FPC400 only supports rs485 communication.

First I did set up com port and configured modbus. (As you can see from pictures that I included)

I want to read 27 parameters from FPC400 (As you can see from picture that I included, I want to read  27 parameters from adress 4112 - 4139 ) and store them in 27 different variables in my plc. (MI4000 - MI4027)

As I understood, I need to set start of vector for reading variables  as 4112 and length needs to be 27, and start of vector on my plc is 4000. Does this means that program will read 27 parameters and store them into my plc starting from MI 4000 to MI4027?

61632634_2619160678111765_6853501575042695168_n.jpg

Screenshot_1.png

Share this post


Link to post
Share on other sites

I'm only looking quickly and might miss something, but SB2 in your third rung is only calling the actual read on power up.  You need this to be an actual call from other parts of your program, whenever you want it to happen.  Would be nice to see the actual settings in Com Init 2.  And don't use PLC Net ID, especially 0.  If you look at the dropdowns that then happen, you will find preset determinations of what they do.  Instead, do a direct store into SI8 of whatever unit ID number you want the plc to be.  For Modbus I generally make the master "2".  This allows for some later additions to a network that might default to 0 or 1.  Your other understandings seem good enough, but no doubt I have missed something somewhere.    Try my suggestions and see how you go.

cheers, Aus

  • Like 1

Share this post


Link to post
Share on other sites

In revisiting this after some zzzzz, also don't forget that Modbus addressing starts at 1, whereas Vision starts at 0.  Sometimes you have to allow for this "difference of 1" when specifying the addresses.  It depends on how the slave is set up....some also use the Vision style.   Easy enough to find out for sure once you actually get a successful connection.  Also, you have fallen into the trap of counts starting with 0......   MI4000-MI4027 is actually 28 MIs.

cheers, Aus

  • Like 1

Share this post


Link to post
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...