Search the Community
Showing results for tags 'Socket'.
-
Hi, For a test setup between my Laptop en a PLC i'm trying to configure an Ethernet connection. Easy peasy you would say. Well, apparently not. Init of the TCP/IP card and the socket (socket 1 in this case) is all successful. I made the following settings on de PLC: TCP/IP card init: IP address -> 192.168.0.1, subnetmask -> 255.255.255.0, Default gateway -> 192.168.0.254 Socket init: Socket 1, Protocol -> TCP, Port -> 20256, client/server -> client (master). My laptop's IP address is set to 192.168.0.10 When I ping the PLC from my laptop is this successful. The PLC is set als Master (intentionally). For testing I've also tried set the PLC to Slave. This had no positive result. I can't find the reason why the socket status will not switch to connected. Explanation for the attached picture. please read MB0 as SB2. MB0 is set on start up by SB2. When all initialization is done, MB0 will be reset. In advance, thanks for any help. Leyke
-
At random times sockets 0 and 1, 20255 and 20256, server (slave) on V430 and SM43 are freezing up. Usually not both.... thinking it's more port 20255. I've played with the SI for timeouts. SB168 is set to power up at "1". it will still email, web server (V430) will still work, and usually port 20256 will work to let me connect and remote REBOOT the PLC, then the frozen port comes back to life. Any ideas!? I worked a long time on getting a reliable "EMAIL" logical construct; I believe I got that whipped and have had no issues lately. This STICKY PORT issue has plagued me for sometime. Any suggestions/solutions would be greatly appreciated.
-
Hi everyone! I´m using the four sockets in a Vision 130, and I need more! So, I tried to redifine a socket in run time according to some conditions, but I find out that once the socket was defined, I can´t redefine it. The socket is first initialized as TCP / Port 502 / Server. A Modbus IP configuration is attached to this socket, and running as Modbus IP Slave. Then, I close the socket... ...and redefine it as UDP The result is that the socket never loose the Modbus definition, and can´t connect via UDP. When the second socket definition is executed, the socket state goes from 20 to 34. If I insert a reset of the PLC before the second definition, all runs correctly. So, I think that the only way to "release" the socket definition is restarting the PLC. Is this right? Or (more likely) I am doing something wrong? Thank you very much!!
-
My end goal is to send data over ethernet using the TCP/IP protocol to a raspberry pi. I already have the pi coded in python to look for a connection to its ip on a socket that I bound to it. My problem I believe is within the V570 PLC programming logic itself. I have initialized the card with ip 10.1.10.160 and my laptop with ip 10.1.10.100. Those two communicate correctly over ethernet. My pi is at ip 10.1.10.166. The pi is bound to a socket and currently waiting for something to connect to it on port 8888. I initialized socket 3 on the PLC as a Master on port 20257 and set the name to 'raspberryplc' Like I mentioned, the PLC and PC communicate correctly over ethernet. Lastly I have the TCP/IP config block which is initialized to socket 3 at ip 10.1.10.166 on port 8888. I then use SB142, 146 and 150 to check if I'm ready to attempt a connection, all still good and expected. I get a status 0 from the TCP/IP config block which signifies an all set response. I then have my TCP/IP CONNECT block set to Socket 3 to remote ip 10.1.10.166 on port 8888. At this point SB150 never goes high and I don't establish a connection. I can see something must be happening as when I stop and start the connection attempt on the PLC side, I can see the ethernet lights blinking on the raspberry pi. Thoughts? Either I'm missing something or it's correct but my raspberry pi is messed up. Thank you for any help anyone can offer.
-
Hello! Another one topic PLC/E-mail. Unfortunately, I'm not able to copy with the problems. I use the ladder from Example (of course). In CMD I write "telnet pop.gmail.com 25" and I can see the protocol type used by the server. After that i tape "pin pop.gmail.com" and see the IP address of the server. The first change that I make in the ladder is IP in "TCP/IP - Tcp connect" block. The new IP is the same as IP address of the server. The second change is in the "E-mail" block. "From:" e-mail is Support@unitronics.com and the receiving e-mail is "..........gmail.com". When I press "connect" in HMI the system is able to connect. However, when I press "Send E-mail" there are two mistakes: "The server cannot receive data (DATA mode error)" and "From address format incorrect " I have tried many settings but non of them was workable. Please, give me an advise where might be the mistake!
-
Hello, I am having an issue with intermittant connection to a remote PLC. The setup is as follows: Server has a VPN connection to a GSM router on site. This is connected via ethernet to the PLC. What I have found: I lose the ability to do a socket ping to the PLC on 20256. When I lose this ability, I also lose the ability to pull telemetry data off the PLC from the registers. (makes sense, they use the same port). I am doing this ping test from the local router on site, over the VPN. The issue is therefore not with the VPN itself, but the connection between the router and the PLC. The ladder logic code that manages the connection is attached. Can you see where I have gone wrong? How can I increase the robustness? Additionally, can you suggest timeout/keepalive settings that would help? At the moment, I can regain the connection by restarting the router (set to a automatic timed restart at the moment). Additionally, I have noticed more than once that if I go into the socket parameter screen on the PLC, it has sprung back into life. (maybe coincidence?) Many thanks in advance for any help!
-
I am currently working a program that is similar to a counter. It takes the photo eye pulses sends the TCP packet to a server. The server then interprets the message depending on which line the pulse is from the message will be different. Then updates a database. I am currently testing this program between two V130s. The socket connects it sends the information. It gets a successful bit back from the tcp layer. The problem I have is that the FB Scan just gives me a -1 in the index of message. From what the help says is an invalid format or message to be received. Review PLC master TCP/IP 192.168.10.130 port 5000 makes the connection to PLC slave TCP/IP 192.168.10.131 port 5000 Sends all the messages RX on slave socket accumulate correct number of sent messages FB scan function on slave gives me -1 on index of messages. Also to make the connect tcp work I must give it a true to false transition for it to connect is this correct. It works flawlessly as is but not sure why itd be set up that way?