ALMAR

PLC iQ-R R04CPU Socket TCP/IP communication via build in Ethernet port program example

10 posts in this topic

Looking for Socket TCP/IP communications program examples for Mitsubishi PLC iQ-R R04CPU using GX Works3, to compliment the Mitsubishi Ethernet manual Socket commands instructions.

Unfortunately, the manual is missing real application ladder logic illustration examples of these commands. For example, the Socket Open Connection command, does not describe in what order or format to enter the IP Address.  
For example, to enter IP Address 192.168.1.100, does the most significant octet 192 is entered or stored first in the lowest memory storage register (Big Endian format) or does the least significant octet 100 is entered or stored first in the lowest memory storage register (Little Endian format)?

I am trying to write a simple Socket TCP/IP communications command that will write about four registers from an existing Mitsubishi PLC R04CPU (Socket Client) to an Allen Bradley PLC ControlLogix (Socket Server).

.

Share this post


Link to post
Share on other sites

You must have the e-manual viewer. it's all in there. (MELSEC iQ-R Ethernet User's manual application)

However why aren't you using the parameters to set up the connection.
Then just use the FB M+RCPU_ConnectionOpen.  and M+RCPU_Send_Socket....

Alternatively you would also be able to use pre-defined protocol where you can set up your own protocol easily.
Tools=> predefined protocol support function

viewer.thumb.JPG.64017d5fa12715563c02da1

Share this post


Link to post
Share on other sites

I will use FB and/or predefined protocols.Thanks.

Share this post


Link to post
Share on other sites

Just checked the Predefined Protocols library for Mitsubishi PLC R04CPU build-in Ethernet port and the only protocol listed is SLMP (Device Read). Unfortunately, AB PLC ControlLogix does not support SLMP. That is why I am trying to use Socket TCP/IP communications protocol, which is supported by both AB and Mitsubishi PLCs.

Share this post


Link to post
Share on other sites

 I checked the Standard FB available in the GX Works3 for R04CPU build-in Ethernet port and it does not list any FB M+RCPU_ConnectionOpen, nor M+RCPU_Send_Socket.

Do these M+RCPU FB need to be download and added-installed to GX Works3?

Do they work with R04CPU build-in Ethernet port?

 

Share this post


Link to post
Share on other sites

Per MELSEC iQ-R Ethernet_CC-Link IE Function Block Reference manual, the FB M+RCPU... Socket commands are similar to what Ladder Logic R04CPU build-in Ethernet port commands SP.SOC..., and required the same arguments-parameters to be configured or set. The FB M+RCPU commands set uses one additional parameter  to identify if these M+RCPU commands are via PLC Ethernet module or build-in PLC Ethernet port. SP.SOC commands are PLC CPU build-in Ethernet port specific; therefore, this additional parameter is not required. I am using the ladder logic SP.SOC command set. 

The MELSEC iQ-R Ethernet_CC-Link IE Function Block Reference manual is much better written than the MELSEC iQ-R Programming Manual( Instructions, Standard Functions/Function Blocks), including additional details on how to enter the order of IP Address in the memory registers.

I was not aware that this Function Block Reference manual existed.

I thank you very much for forcing me to expand my search.

Share this post


Link to post
Share on other sites

Gambit:

Thanks to your reply, my Mitsubishi PLC R04CPU (Socket Client) is finally, successfully, reliably, and repeatably Socket communicating with Rockwell Automation EWEB Socket Test PC Application, which is simulating AB PLC (Socket Server).
 
The next step is tomorrow connect the AB and Mitsubishi PLC in the same Ethernet network and confirm Socket communication transfer directly from Mitsubishi to AB PLC.  
 
Thanks again. Indeed a true THANKSGIVING CELEBRATION! 

Share this post


Link to post
Share on other sites

Glad you got it working. If yuo need anymore info let me know

Edited by Gambit

Share this post


Link to post
Share on other sites
On ‎11‎/‎25‎/‎2017 at 9:42 PM, ALMAR said:

The next step is tomorrow connect the AB and Mitsubishi PLC in the same Ethernet network and confirm Socket communication transfer directly from Mitsubishi to AB PLC.

This is very interesting. Would you be willing to share your work when you are successful?

We have (maybe 30 or so) Q Series PLCs that we will be sending data to a single Control Logix. Our tentative solution is use an AnyBus CC Link to EtherNet/IP gateway.

Share this post


Link to post
Share on other sites

One of my 1st option was to use a ProSoft Gateway Mitsubishi CC-Link to AB EtherNet IP, but they are too expensive.

Last night Mitsubishi PLC successfully transmitted four ASCII characters ABCD to AB PLC, and  AB PLC successfully transmitted four ASCII characters 1234 to Mitsubishi PLC.

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