niyaz Posted May 27, 2016 Report Posted May 27, 2016 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. Quote
niyaz Posted May 27, 2016 Author Report Posted May 27, 2016 (edited) server.bmpserver.bmp; PLC2.bmp; PLC1-(IP SETTING).bmp; tcp socket1.bmp Hi, Please find the attached programme. i am using this open socket programme to connect with my server pc. ( SERVER PC IP ADDRESS 192.168.25.7). Thanks in advance. Edited May 27, 2016 by niyaz Quote
Michael Walsh Posted May 27, 2016 Report Posted May 27, 2016 Please post the code. It will have a .cxp extension. Quote
niyaz Posted May 27, 2016 Author Report Posted May 27, 2016 Hi, Please find the attached programme . Thanks in advance tcp socket.cxp Quote
Michael Walsh Posted May 27, 2016 Report Posted May 27, 2016 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. Quote
niyaz Posted May 30, 2016 Author Report Posted May 30, 2016 (edited) 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 May 30, 2016 by niyaz Quote
Michael Walsh Posted May 31, 2016 Report Posted May 31, 2016 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. Quote
niyaz Posted June 1, 2016 Author Report Posted June 1, 2016 (edited) 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 June 1, 2016 by niyaz Quote
HARSHAL Posted September 2, 2021 Report Posted September 2, 2021 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.