Jump to content

Recommended Posts

I am encountering several problems with my project.

I am trying to connect a V 350 to a Yaskawa mp 2600 by using modbus protocol through ethernet.

I was wondering what sockets must be initialized to establish a connection between these devices?

Must I use socket 2? or socket 2 and socket 0?

The master plc (v 350)  could send a string to the yaskawa which responds sending a bit back to the V350.

From the unitronics side I cant understand what address i should use to read a coil in yaskawa mp 2600.

According to the modbus memory model ( found on yaskawa help) if I want to read a coil ( 10001 modbus model ) which is %XB 24560.0 in yaskawa memory map, what slave address should I use to read this coil from Unitronics?

 

 

Share this post


Link to post
Share on other sites

The sockets do have default values set up, but they can be changed and initialized to suit your application. You will have to run the MODBUS IP configuration block on start up, and as long as you have one socket set up as a TCP master you will be able to send out MODBUS commands. You will also have to set up a TCP slave socket and have the MODBUS ScanEX function block constantly scanning for that MODBUS configuration.

 

Once you have performed the connect function using the slaves IP and port number you can then send MODBUS commands. Yaskawa should provide the slave address table that shows which registers to read from, and what MODBUS commands should be used with each. In this case the slave address appears to be 10001 as provided by the documentation that you have.

 

The device can then connect and send information back to the V350 using the Ethernet cards IP and the TCP/IP slave socket port number that was initialized.

Share this post


Link to post
Share on other sites

this is what I have done so far.

In the first TCP socket Init, I set the socket 2 and port 502( as default), and the second block I set the socket 0 and the port 20000 ( as default).

Int the second  modbus config, i set the Ip address of my yaskawa and the port 502 in the slave devices list.

In the first Modbus config I havent set anything since it should be the socket 2 for the slave.

In the connect socket 2 block , I set the remote port 502 and my yaskawa ip address.

in the connect socket 0 block, I set the remote port 20000 and the yaskawa ip address.

I still dont understand how these blocks work, there are too many degrees of freedom in this modbus configuration.

I read the help file, but it didnt help me at all.

 

post-20585-0-08926000-1384852396_thumb.png

Share this post


Link to post
Share on other sites

The network ID will be 255 for all MODBUS IP configuration blocks. Have you been able to connect to the Yaskawa? It will have it's own individual port number, and it will not be the same as the port you set in the socket configuration. The socket configuration port will only be referenced when you are connecting to the V350 only if it is set up as a slave. Only once you are connected can you use the regular MODBUS commands to read/write information.

 

When receiving information from the Yaskawa you will not perform the connection, the Yaskawa will have to perform the connection to a slave socket on the V350. You will also need to run the MODBUS scan function for the slave socket so it can receive MODBUS commands.

 

We have webinars on both Ethernet and MODBUS communication that should help explain how to configure the logic in greater detail.

 

http://www.unitronics.com/support/webinars

Share this post


Link to post
Share on other sites

Dear alexander,

 

Thank you for your help.

For ethernet communication yaskawa has the port number 44818.

The funny thing is I can not see that number in my slave devices list in the modbus configuration block.

Anyway tomorrow I will do as you just told me, hoping that it's going to work.

thank you again.

 

Matteo

Share this post


Link to post
Share on other sites

It is not required to have these devices set up within the MODBUS configuration block. You only need to know the IP and port number for the Yaskawa when using the TCP/IP connect function block.

Share this post


Link to post
Share on other sites

When I try to read a coil at address '00001' ( according to the modbus memory) %IX24560.0 in the yaskawa modbus memory, I always get a wrong value.

I use the 502 and it should be the right port since I can read the value of some coils in yaskawa by using KEPserver.

I set yaskawa as modbus slave device, so I cant understand what I am getting wrong, I initialized the socket 3 in the V350 following the webinars found on your website.

At this point I dont know what to do, connecting two devices of the same type is really easy.. but connecting two devices from different competitors looks like a really complicated operation.

Share this post


Link to post
Share on other sites

Each Modbus command function will have an attached status operand if an error occurs. These status message values can be found in the VisiLogic help files. Though the value is not what you are expecting, it appears as if the PLC and Yaskawa are communicating but just not being addressed correctly. I would double check the slave address table for the Yaskawa which should describe the function and addresses for each register/coil.

Share this post


Link to post
Share on other sites

thank you Grabiel for your answer.

but my project still doesn't work. I was wondering why you didn't use the Connect Socket (2) block on your project?

The communication can not be established without that block... I guess so...

kind regards, Matteo

Share this post


Link to post
Share on other sites

Matteo, as it is UDP instead of TCP, does not need connect block to stablish comms. If Yaskawa specifically needs TCP, so you need connect to remote IP and port (Checking Ethernet card and socket are initialized) prior trying to get info from slave using any of modbus ip functions.

 

Did you tried modbus ip master example included in Visilogic?

Share this post


Link to post
Share on other sites

http://forum.unitronics.com/index.php?/blog/16/entry-46-simple-1-node-modbus-tcp-master/?mode=show

 

This may be of some help to you.  It was written for a Vision 570, but should port pretty easily.

 

It's a fully functional program I've used myself several times.  Change the IPs, ports and addresses to match yours, and it may get you a bit closer.

 

Best of luck,

 

TM

Share this post


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

×