niyaz

CP1L-E Socket service porgamme

11 posts in this topic

Hi Guys, i am trying to send the data to pc through tcp/ip socket service programme.I am using CP1L-E plc. . I am facing problem in connectivity it self. not able to connect to my pc. ( plc is client and my pc is server.bmpserver). Always showing listening only. i am using port number same in both sides. using OPEN SOCKET Funtion block in plc side.

after monitoring i found A47.0 bit is ON and A567.14 is turn on which means that result storage error falg. i am facing problem to recover this.

 Thanks in advance.

Share this post


Link to post
Share on other sites

Please post the code.  It will have a .cxp extension.

Share this post


Link to post
Share on other sites

You open the socket to 192.168.25.5 in the code above.  In the comment above, you said that your PC server was 192.168.25.7.

Share this post


Link to post
Share on other sites

Sorry. In my pc (server) side ip address is 192.168.25.5 only. i tried so many times but not able to communicate. In my programme after i turn on the socket no.1,  monitored the A567(TCP/UDP Socket No.1 status). First its showing A567.01  turns on , after few seconds  A567.14 (BIT -14 )turns ON  and A567.01 turns off (Bit-14 means - results storage error flag).  

may i know how to trouble shoot for this problem. thanks in advance.

Edited by niyaz

Share this post


Link to post
Share on other sites

I used your ladder code on my PLC (only changed IP Addresses) and I was able to open the port, send some data, receive data and then close the port.  I have no issues here.  Perhaps you should try a different test Client.  I am using a shareware called TCP Client / Server.

Share this post


Link to post
Share on other sites

okay thank you. Now its working with the other TCP client server software.is it possible to turn on all 3 sockets together and want to send the data by using all 3 sockets .For that , how can i split my programme . I am not getting exactly how can i use open socket function block for all 3 sockets at a time if possible. For all 3 sockets need to use different port numbers?

Thanks in advance.

Edited by niyaz

Share this post


Link to post
Share on other sites

Yes.  Three sockets, three ports.

Share this post


Link to post
Share on other sites

I AM NEW IN PLC PROGRAMMING. I AM TRYING TO COMMUNICATE TWO PLC OVER ETHERNET. I USED SAME POSTED PROGRAMMED. 

THE PLC 1 IS ON 192.168.250.1 PORT NUMBER 9600. AND PLC 2 IS ON 192.168.250.12 PORT NUMBER 9600. I AM TRYING TO OPEN TCP SOCKET FROM PLC BUT, I COULD NOT GET DONE BIT. AS WELL, WHEN I SEND MASSAGE FROM SEND FUNCTION, IT SHOWS THAT SOCKET IS NOT OPEN YET. 

CAN YOU EXPLAIN ME MORE ABOUT THIS FUNCTION. AND HOW CAN I COMMUNICATE BOTH PLC WITHOUT ERROR. 

THANK YOU

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