Reading a robot pick coordinates from the PLC

Hi all.

I would like to update a robot pick position of the square/rectangular parts on the basis of the position and orientation from the PLC. The parts are placed randomly on a conveyor and go through a measuring machine, where dimensions of the parts are measured. The parts stop at a predefined point on the other end of a conveyor, with all three pick coordinates + orientation angle known. The PLC will send these coordinates and rotation of the pick point to the robot controller.

I thought to use the RelTool for this task, where a zero point would be on the conveyor and according to the coordinates, an offset point would be generated. What I don't know is how to "read" these numeric values, when the PLC sends them to the robot controller. Is there any instruction for this? I have read on the forum something with the group inputs but I don't quite get that.

Thank you in advance.

Kind regards.


  • soupsoup USA ✭✭✭
    The forum probably mentioned converting a Group Input signal to a num -- GInput or GInputDnum -- then using those nums in a RelTool -- but first, you need the IO connection setup. Do you already have signals going back and forth from the PLC to the robot controller? Example: An EthernetIP IO card that allows for inputs and outputs to and from the PLC.
  • TilenMTilenM Austria


    Thank you for the answer soup.

    Yes, the communication will run via a ProfiNet. The positions will be stored in a .csv file.

  • lemster68lemster68 United States ✭✭✭
    How will the csv file get to the robot?
    Lee Justice
  • TilenMTilenM Austria
    Sorry for the late reply lemster68.
    Basically, I don't know? That is what I would like to find out. Any right direction given will be appreciated.

    Kind regards,
  • PabaPaba Germany
    So the positions are stored in a csv file which is read by the plc and the plc should send the position&orientation to the robot?
    Or should the robot just store the received position&orientation in a local csv file?

    if its just about the profinet connection and how to send/receive data, take a look at the forum posts.. i discussed the same issue a few months ago
  • TilenMTilenM Austria
    Hi Paba.
    Thanks for the answer.
    Sorry for the confusion in my first post. So, the external inspection system will inspect the part on the conveyor for the dimensions (length, width and height; and orientation), store them in a .csv file and send this file to a plc. In this .csv file will be also position (x, y, z) with the orientation of the part at the end of the conveyor, where the robot could pick it up. The robot has to "read" these values from the .csv file. So I am looking for a way how to receive this .csv file using profinet communication (if it possible) in a robot controller and read the values from it.
  • PabaPaba Germany
    edited November 2019
    okey so i dont know how to send a csv file from plc to robot controller, but you should easily parse/read the csv file in the plc and send the coordinates&orientation over profinet to robot.
    -i guess the robot have profinet-option installed?
    -add robot gsdml file to plc and setup adress space on plc side.
    -setup network configuration
    -use robotstudio io-configurator to setup adress space on robot side (Group Signals can only communicate positive integers but they're easy to handle)
    -for receiving e.g. 2byte data, map group input signal from 0-15 (16bit) and set outputvariable at plc like QW.0 (siemens plc),
    -parse csv and "send" signal from plc
    -read the signal with   nXCoord := GInput(GI_xCoord);
    -when struggling with negative numbers add an offset, for other decimals multiply with a few thousands and do vice versa at robot side

    hope thats not too confusing

  • whywhy USA
    edited November 2019
  • soupsoup USA ✭✭✭

    Assuming all the devices are connected to a LAN, if you have (or can get) the FTP/NFS (or SFTP on newer controllers) option -- the robot controller can read the file from a PC or PLC that has the ability to serve the file as an FTP server (robot controller would be the FTP “client”). Google "filezilla server" for an example of a free FTP server for a PC. If the vision system doesn't already have a PC, I'd just throw one in the network to be the bridge to get this CSV to the robot controller. The robot controller can Read the file and parse the data just like any other programming language and as long as the CSV is in a consistent format.

    Other less good options to think about:

    -          If you get the CSV to the PLC, could feed the numbers one-by-one via serial or socket messaging.

    -          Some Ethernet hard drives and flash drives can share themselves on the local network, maybe they can serve as the FTP server where the vision system sends a file to it and the robot reads the file from it. Some routers have USB drives in back that allow the USB drive to be setup as a network drive, maybe it could be setup as FTP too.

    -          You could get a USB sharing switch which is hardware that would allow two computers to read the same USB drive, figure out a way to break into the switch part and connect it to a relay and signal which allows the PLC or robot controller to switch the USB drive to the vision system to get the CSV file, then switch to allow the robot controller to access the USB drive. Never done, probably never will, but could potentially get around the network, FTP option route.

    -          Could probably think of a few more ideas, but they’ll just get crazier and further away from the “right” way to do it.

  • TilenMTilenM Austria

    Hi all.

    Thank you for all explanations and tips. I will take a look into it.

    Kind regards

Sign In or Register to comment.