Sign in to follow this  
Followers 0
PdL

RECV Fins command over UDP/IP using different UDP ports

12 posts in this topic

Hi guys, For a project where I have an KepserverEXv5 OPC server sitting on top of 22 CJ1/2 PLC's, I want to use the OPC servers possibility to define multiple channels so communications run in parallel. With multiple channels, a different UDP port number has to be assigned for each PLC as all traffic runs over 1 NIC. However, at the same time I want to run some RECV instructions between the CPU's, I did a little bench test which shows that the RECV instruction over UDP/IP seems to require the UDP port numbers of the nodes which exchange data are the same. The OPC server only supports FINS UDP. Any trick to overcome this so I can define unique UDP port numbers for the PLC's and at the same time still run the RECV instructions? * the CJ2 CPU's have integrated EIP units, so I could use an Ethernet I/P Datalink instead of RECV, however this project requires approx 190 words to be transferred from one master CPU to all others, which would require full blown CJ1W-EIP units instead of the on-board ones which have far less (640 words TOTAL as opposed to 180.000+). Buying another 22 EIP units... that's a no go. * I could assign multiple IP's to the OPC servers NIC (multihoming) but the O/S performance overhead will most likely cancel out the comms performance gain.

Share this post


Link to post
Share on other sites
Disregard my PM. I see you are already up to 640 words. Let's see what PMCR has to say. Also. what about CX Server OPC?

Share this post


Link to post
Share on other sites
The port restrictions are Fins protocol specific. If you multi-home the NIC and bind each channel to a different IP it is not going to impact performance. The impact will come if you are running applications that browse the network or connect to the internet. Those application will use all the IP's to find a connection. I did find a reference that said that performance may start to degrade after 15 IP addresses however it was related to an XP OS and a slow processor. Newer processors and more RAM will probably allow for more connections.

Share this post


Link to post
Share on other sites
Hi Fred, nice to see you here. Don't know if you remember, I was the guy at the Novotek seminar Nov. 2nd in Breda asking about linked tags, we had a little chat afterwards. I figured that multihoming was not going to help me. So, when will Kepware support FINS TCP?

Share this post


Link to post
Share on other sites
There is a way , but there may be a limit to the no of connections.... See attached doc for a couple of screen shots of a config that I have done before. Basically, you set the FINS/UDP port to be unique & the FINS/TCP port to be common. Then you have to add the remote PLC to the FINS/TCP connection setting tab. You can see in the 1st shot that the PLC is 192.168.20.22 & wants to communicate with 192.168.20.5. This should be all you need to do. PMCR helped me get this setup a couple of years back, hopefully he will stop by & offer some solid sound technical comments also.. We were also using Kepware with multiple ports on the NIC. I have rushed & cobbled this together, hopefully it is enough for someone like yourself to sort out!! If you need any more info let me know & I can send you the PLC files... Doc1.pdf
1 person likes this

Share this post


Link to post
Share on other sites
Interesting, thanks for your reply! I did had a short look at this, and figured ideally I basically need NAT functionality for the UDP connections so didn't look further into the TCP options. So if I understand correctly, you had Kepware connect to your CPU's on different channels through one NIC using unique UDP ports, and then was still able to have nodes maintain direct FINS connections? I don't see yet how the TCP part comes in here, but I will do some reading up on the FINS/TCP connection setting options...

Share this post


Link to post
Share on other sites
Yes, correct! The original setup was to 3x PLC's, so we implemented the recomended unique UDP port config as per the Kepware manuals. Then the issue came up of having to communicate between 2 of the PLC's. This was where the FINS connections came into play. Thinking about it, each PLC may be able to have 16x FINS/TCP connections. If you need more, you may be able to structure it such that you have some 'concentrators', therefore overcoming the limit of 16x connections.
1 person likes this

Share this post


Link to post
Share on other sites
Right, so I need to step away from exchanging data using RECV instruction (UDP) and start looking at establishing a TCP connection and using direct FINS commands? Still in the process of grasping the overall picture. If you could PM me an example of your ladder code I would be grateful! Wait... I think I got it, I just need to use the settings in your screenshots to have the TCP connections established, and once they are I can run the RECV as I would normally... right?

Share this post


Link to post
Share on other sites
You my friend, are a genius! You did say, but I never expected this to be that easy, didn't change a single line of code, added the client's IP, and presto! Attached my setup. And like you said, the max 16 connections can be overcome with some concentrators. Setup TCP connection.pdf

Share this post


Link to post
Share on other sites
Yep, really easy. From looking at you setup, I did leave off the Server/Client connection selection but looks like you got that bit sorted! Incidentally, you may of seen a IP in a different subnet in one of those tables, so PLC's can also be communicated relatively easily via a gateway of needed.

Share this post


Link to post
Share on other sites
PDL Sorry, I was asleep at the switch (also know as programming a Trajexia at a customer site). I actually wrote up a tech note on this topic 2 years ago. Jay Anthony brought this thread to my attention. Better late then never. FINS Send and Receive using TCP.pdf

Share this post


Link to post
Share on other sites
Thanks a lot PMCR and lostcontrol, it works like a charm. This forum rocks!

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
Sign in to follow this  
Followers 0