I am very new to this and trying to establish communication between our UR10e robot and a FANUC i0 CNC control.
I have connected the robot with the ethernet port in back of the control and seem to have a good connection.
I want to be able to have the robot tell the machine to open auto doors, start the program, open/ close chuck, etc.
Is it possible to send M codes from the robot to the CNC control to achieve this. If so, do I do this through script or some other means?
I have looked extensively online and have not found much on this.
We have two UR10e’s, one with auto doors (similar to your setup) and one without (the robot physically opens and closes the door).
For both of our workcenters we have a single digital Input set that comes from the CNC when machining is done and a single digital output that is sent to the CNC when the robot is done. We also have digital outputs for opening and closing pneumatic vises.
On the setup similar to yours we control the auto-doors via the CNC with M codes (M53 closes, M52 opens) at the beginning and end of the NC program. I imagine you could set up a couple of IOs on the robot to do this though.
To start the process we reset the CNC and put it in Memory mode waiting for cycle-start, then we start the robot which picks up a part, loads it in the vise, closes the vise, checks that it’s loaded correctly, moves clear of the machine, sends a cycle start output, then picks up another part and stages in front of the door.
When the CNC finishes it opens the door then sends a Machining Done input to the robot. The robot waits 4 seconds for the door to open, opens the vise, picks up the part, places a new part, closes the vise, checks that it is loaded correctly, moves clear of the machine and sends the cycle start output.
We use an if-then script to start the robot when machining_done = true.
Hopefully this is enough to get you started.
Thank you for your reply.
For your DI/ Do are you communicating through an ethernet IP or are you directly wired to the switches?
I am wondering if you can control all this through ethernet using modbus or some other way to limit wires and ease mobility.
If so, what does the defining of them look like?
We are directly connected but I think you can do just about any type of communication you want, including ethernet from what I’ve read here and elsewhere.
Not sure how that would be set up but someone else should be able to help you or at least point you to the correct documentation.
I have also done similar things as fuknrekd, and I’ve got to say, the simple handshaking via discrete signals can be a blessing when it comes to integration.
You can certainly give MODBUS a try if you have your CNC’s documentation and it supports MODBUS. The UR has MODBUS built into it, so you should be able to quickly get in and at least try some things
Just add whatever signals the CNC’s documentation says and toggle some values around and see if it does anything.
As for communication over ethernet, you will need to look at the protocol your CNC uses. For example, we use EthernetIP to talk to our welders. In this case, both the UR10e and the Welder are EthernetIP slaves. As a result, we use a cheap little PLC to pass the data back and forth. We just dump in the EDS file for the robot and the welder, and map the data into the GP_BOOLS/INTS/FLOATS according to the EDS file.
Here’s a link talking about EthernetIP, with links to the object model PDF at the bottom of that page.