Control Robot Position from PLC

  • Is it possible to send position or offset data from a PLC (Ethernet/IP) to a Fanuc robot (R-30ib controller, M-20ia robot)?


    I need to pick up parts with the robot, but the machine the robots are integrated with needs to be able to run several different part numbers of different lengths.


    Originally I was going to teach a pickup position for each part number and then just send the part number from the PLC to the controller and use that to determine which move to run before gripping that particular part.


    The problem now is that the customer wants the ability to add additional part numbers to the machine via the HMI and then set a part length parameter. I need to be able to use this parameter to send an offset to the robot or somehow alter the position it moves to when it runs the pickup job (as long as the length parameter is within an acceptable range).


    Any ideas on whether this is even possible and what the simplest/best approach would be?


    I'm pretty new to FANUC. My experience is more on the YASKAWA side.


    Thanks.

  • Hello,


    You have at least two ways to do it:
    1. Use GO/GI (group inputs / outputs) to get the length and then do an offset.
    2. Use Karel to build a socket messaging on Ethernet and then you can exchange a lot of data.


    I will go for the second choice. At every new cycle check if the product number has changed. If it's changed call the Karel program and store the data in some register / position reg.

  • Depending on what HMI is used, you may be able to communicate directly to the robot from the HMI. I use GE Intelligent Platforms Quickpanel View (now Quickpanel +) HMI's and I communicate over ethernet using the GE TCPIP driver. This gives the HMI full access to the Registers, DO, DI, etc. I have not used Position Registers but it is possible. You need the HMI option for the Fanuc robot. I don't know which HMI's are compatible with this option.


    This would only be to/from the HMI to the robot. A script could be used to set the HMI variables equal to the PLC variables if those were needed to be sent to the robot.

    Edited once, last by DaveP ().

  • To expand on using GI for this...


    I do something similiar over ethernetIP. I send the data a to group of inputs, then move that into the location of the PR (postion register) that I am using as the offset to my point.
    The PR is an array that you can address any of the locations in the array. PR[10,3] for example. That way you can offset in just the X,Y, or Z direction.


    I don't have the pendant in front of me and I am no expert... but if I remember right, at any move point in your program you move the cursor over the the blank area on the right and one
    of your F keys should say choice, hit that then you can select offset, then choose the PR that you moved the data to.


    I'm sure someone else in the forum can walk you through it better than I can by memory, but it's pretty simple.

  • Both ways work well. We use ProFace hmi's w/ SNPX to input PR values directly and it works well. We also use explicit messaging in EIP to send an entire PR register. Those two ways require using every element of a PR. Using GI would allow a single element and require a line to move it into the PR element. (PR[1,3]=GI[1]; PR 1 Z element = GI 1). Depending on the PLC you're using you could create a recipe structure that contains this length as an element and then just send it when the part number changes. I do this with gantry systems to keep fingers off of the tp.


    PR's can be used in general program instead of hard coded positions. (the hardcoded position numbers are relevant only in that program, pr's are global). kmcgregor instructions explain how to select this. You can use the PR for a world offset or tool offset.

Advertising from our partners