Sign in to follow this  
Followers 0
PLCBEGINNER

FINS/TCP COMMUNICATION

5 posts in this topic

Hi all! I am trying to communicate with a cj1mcpu12+etn21 with fins/tcp commands, i'm using winsock(VB) and socket(Java), both have same problem. I had Mutliway software which help me understanding Fins Header and frame but When I started connecting, the LED light on Ethernet card flashing 3 times, and connecting fail so that I couldn't send FINS header + FINS frame binary string. I appreciate any advices, suggestions. Many Thanks in advance. Kevin.

Share this post


Link to post
Share on other sites
... Hi, To open a TCP connection to the PLC takes several steps: 1. Establish TCP Connection 2. PC sends local (PC) FINS node number to PLC 3. PLC sends the PLC FINS node number to the PC (TCP indicator on ETN unit should light at this point) After this 'handshaking FINS communications can take place, (using node numbers as above) You need to read section 7-4 of manual W421 for a more detailed explanation, including the commands and repsonses required for steps 2 and 3. There are also sequences to implement to handle re-establishing connections which were improperly terminated etc. (although if your application is simple you may not need to bother with these) ( I am currently in the process of writing some C# .net classes to deal with FINS, FINS using UDP, FINS using TCP, FINS using Hostlink, FINS using Toolbus etc so have a little experience with this ...) Nibroc See connection diagram Edited by Nibroc

Share this post


Link to post
Share on other sites
Hi Nibroc Thanks for replying my post. My problem on first step, couln't Establish TCP Connection. Everytimes, i try to connect, I got connecting error. ON VB, After I setup LocalIP and remove IP, then try "winsock.connect", the LED light on PLC flashing, but i get connecting error (winsock.state = 9). Thanks. Trung.

Share this post


Link to post
Share on other sites
... Sorry, I do not have any experience using winsock - have been using .net TCP Client class - do you supply the PLC IP address and the port number ? You may also wish to confirm that you ETN21 is set up correctly ... Nibroc

Share this post


Link to post
Share on other sites
Sorry, it is a long time ago, I made a test with winsock FINS/ TCP. But I have found following file on my computer. It is a VB V6.0 program, sorry comments are in german. may it gives you some hints. Harald tcpClient.txt Edited by Harald_Brueck

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