Jump to content

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

Link to comment
Share on other sites

  • MVP 2023

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
Link to comment
Share on other sites

  • MVP 2023

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
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.