Search the Community

Showing results for tags 'socket tcp/ip'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 14 results

  1. I am trying to POST API to a meter in Maximo using a socket in a 5069-L320 controller. I am able to successfully create and open the socket. The write and read instructions get the DN bit but I do not see the meter updating in Maximo. I was able POST successfully using Postman, so I know I am sending the correct information. Do I need to be formatting the POST differently? I'm not getting errors so don't have a direction to go from here. (I will fix the obvious username and password vulnerability, one step at a time) Thanks
  2. Hi, I'm new to this forum. I'm trying to talk to a Mettler Toledo load cell with TCP socket on a Omron NX102. The load cell port is 23 (telnet). I can talk to the load cell with my laptop using their software or with Putty without any issues. I use the SktTCPConnect function as follow: SktTCPConnect_instance( Execute :=TRUE, SrcTcpPort :=UINT#0, // Local TCP port number: Automatically assigned. DstAdr :='192.168.250.50', // Remote IP address DstTcpPort :=UINT#23, // Destination TCP port number Socket =>WkSocket); // Socket But the SktTCPConnect instance .Done output never returns true so I can't move forward with the next instructions. I made sure all the SktTCP functions have their Execute inputs intialised to False before that.  In the built-in Ethernet IP port settings, the TCP/UDP message service is set to Use and I left the default 64000 under Port 1 - Port No.  What am I doing wrong? Thanks     
  3. Hello,  When i get error 2003 with sktTCPAccept what is causing it? Can it be caused if something was left open from previous session, is something wrong on server or client side? From F1 help i think error causes can be narrowed down to either open/close processing is in progress for SrcTcpPort although it doesnt specifically state that it causes error 2003. After closing port is there delay needed before i can use sktTCPAccept again?
  4. I want to send tcp/ip socket directly from 3rd party device to Mitsubishi PLC. The data is in  json format as attached example. Is this possible? I'm totally new to the PLC world  
  5. I'm trying to send an int over TCP using a MSG Socket,  Compactlogix ==> Arduino Ethernet Shield I have set up TCP communication between two Arduino Uno's using Ethernet shield. I've set up the one as a server, the other as a client. server IP: 192.168.1.21 port 23. If the client is connected it reads incoming data as a byte or an array of bytes. The data between the two has been verified to work. I'm now trying to transition the communications between a compact logix-L32E. I'm looking to send a byte (or int being as there's no byte data type) from the Compactlogix to the Arduino using TCP. To my understanding I need to use a socket create, open, read/write, close. The manual to do this is vague as a step by step procedure. Does anyone have an example code for socket programming? I can open rs500, rs5000, and studio 5000 programs. If I can open a file to use as a reference I can translate it on my own. Any help/advice would be greatly appreciated. 
  6. CP1L-EM Socket Communication

    Good afternoon. I am trying to carry out the communication of a CP1L-EM by TCP socket with a scale module, however I still haven't been successful. I have the Open_socket, Send_Socket and Close_Socket blocks. I tried to make a Receive_socket block but I don't know if something is wrong. Does anyone have the Receive_Socket block tested with CP1L-EM available to supply me? I am very grateful!
  7. Looking for Socket TCP/IP communications program examples for Mitsubishi PLC iQ-R R04CPU using GX Works3, to compliment the Mitsubishi Ethernet manual Socket commands instructions. Unfortunately, the manual is missing real application ladder logic illustration examples of these commands. For example, the Socket Open Connection command, does not describe in what order or format to enter the IP Address.   For example, to enter IP Address 192.168.1.100, does the most significant octet 192 is entered or stored first in the lowest memory storage register (Big Endian format) or does the least significant octet 100 is entered or stored first in the lowest memory storage register (Little Endian format)? I am trying to write a simple Socket TCP/IP communications command that will write about four registers from an existing Mitsubishi PLC R04CPU (Socket Client) to an Allen Bradley PLC ControlLogix (Socket Server). .
  8. I'm using Controllogix L61 redundancy system as a slave with DCS using ethernet tcp/ip socket programming. The communication between master and slave will fail after a switchover. Kindly give solution for this. Thanks and regards, Rasu
  9. Hi everyone, I'm a newbie in the ladder logic programming languages. For my thesis project I've to develop a scenario but I'm stuck with the creation of a socket connection from the Modicon M340 PLC to a server for transfer continuous data given from sensors or similar. Does anyone have a sample program that could have such a functionality so that I can change it based on my needs? Thanks in advice for any further reply!
  10. CJ2 to V680S (ETN version) using Socket Service function blocks View File This is a short bit of sample code using Socket Service function blocks to read and write data from / to a V680S RFID tag using the Modbus TCP (-ETN) version of the V680S. Submitter Michael Walsh Submitted 04/09/16 Category PLC Sample Code
  11. Hi everyone ! I have a little project wich involves communication between two Micro820 controllers via TCP/IP. To do that, I started to work with TCP/IP socket. Within CCW (Connected Components Workbench), I tried to create a new socket instance using the instruction SOCKET_CREATE and set the socket address to 127.0.0.1:21. Basically, my computer through the FTP port. The problem was that it couldn't create a new socket instance (error variable is set to TRUE and status is set to 4, wich I don't know the meaning) because I didn't have a server-side application that listens to TCP/IP socket requests. That said, I found an open source application called SocketTest that listens for TCP/IP socket requests on a specified IP address and port. So, I started a listener on the following address : 127.0.0.1:21, but the error variable is still set to TRUE and status is still set to 4. So, my questions are : Is my IP address OK ? Is my port number OK ? What means the status code 4 ? Is SocketTest doing what I think it does ? Do I need to do something else before using the SOCKET_CREATE instruction ? Thank you in advance for your help !
  12. Q03UDVCPU UDP Connection

    Is there someone who has well known of UDP socket communication between Q03UDv CPU or Q03UDV and LCPU? I try to establish a socket between 2 Q03UDV cpus. Inittially evrything goes ok but after some days of well communication the socket breaks down. The connected HMI (GT1675) becomes inactive or responds extra too slow. In order to re-establish the socket comm i have to reset the cpus. I think it is ubnormal!!! Attached you can find the program of socket connection Do you know if the SC_SOCOPEN and SC_SOCCLOSE  instructions are requested? According to the manual "Q PLC Comm Via Bulit In Ethernet Port - 01042010 SH(NA)080811 Version C) on page 3-35 I think that instructions are not requested Thank you in advance for any help!  
  13. Hi all, I'm having a hard time with this socket service to consistently read all of my data. It seems like there is a race condition where I miss a status of the Message instruction. If you have any insight, it would be much appreciated. Thank you. My application data is greater than 484 bytes, it can be variable up to hundreds of thousands of bytes. I've began to notice that when there is a lot of non-zero data, I start to miss chunks when I read them and put them into my buffer array. So I created a simplified testing application that always reads 484 bytes, and accumulates it. I manually send the plc 133164 bytes, which amounts to 276 times that the message instruction returns data. ((275 reads * 484 bytes) + (1 read * 64 bytes)). Sometimes my program accumulates to 133164 bytes with a count of 276 reads. Often however, it accumulates to 132680 bytes with a count of 275, 132196 bytes with a count of 274, or 131712 bytes with a count of 273. Because it is always off by a multiple of 484 bytes, and generally only once or twice in the stream, it makes me think my program has a race condition somewhere. I couldn't find information in the socket manual about how to signal that data is ready, so I followed the message timing diagram in the help file as best I could. Maybe this is my issue. I'll attach some pictures of my current implementation (they are arranged in order of program flow). I'm planning to access KB 33672, but waiting on a quote from my AB supplier. It might have some helpful information for me.   If you would rather see the project, let me know. I have not attached it because there is a lot of socket maintenance code around it. I thought this would be the best way to show my steps directly. Thank you all in advance,                
  14. Version 1.0.0

    302 downloads

    This is a short bit of sample code using Socket Service function blocks to read and write data from / to a V680S RFID tag using the Modbus TCP (-ETN) version of the V680S.