Left ArrowBack to discussions page
Tim_SmithTim_Smith Posts: 35 Apprentice

Hi DoF Community,

I am working on a machine tending application for a customer and I think that UR would be a perfect fit. However, I haven’t been able to find very much information on how to interface the robot and the CNC machine. I would like to use modbus to communicate with the CNC machine since it is the communication protocol used by UR. I am looking to send a signal to the CNC machine to start the program when the part has been placed in the chuck and have the CNC machine send a signal to the robot when the program is finished.


  • SebastienSebastien Posts: 194 Handy
    What CNC brand and model do you have?
    What we have seen the most in exchanging signals between a CNC and a UR was discrete IO signals rather than modbus communication. Any reasons why you are willing to use Modbus?
  • matthewd92matthewd92 Posts: 385Founding Pro, Tactile Sensor Beta Testers Handy
    edited October 2016
    @Tim_Smith We did a Haas integration and just used the M codes for all the communication.  We wired an output to one of the M code input relays and then had the program wait to see that M code turn on (M22 I believe) and then the CNC would turn on M21 which is an output relay on the CNC and we wired that to the robot input.  That way we could tell the CNC when to do something and it could tell us when it was ready for us to start working.

    We actually moved the table around and everything using these simple IO connections.  I haven't seen any CNC's that use modbus around us at least.

  • Tim_SmithTim_Smith Posts: 35 Apprentice
    @Sebastien This project would be with a HAAS CNC machine. I was interested in learning more about Modbus because I thought that UR used Modbus as their native communication protocol. So I was thinking that this would be the easiest way to interface the UR with a CNC machine.

    So the easiest way is to use I/O signals to enable communication between the robot and the CNC? I can use an Input on the to tell the robot when the CNC has finished running the program? And I could use an Output on the robot to tell the CNC when the robot has finished placing the part in the chuck? All these connections can be done directly on the UR's controller?

    @matthewd92 I haven't explored the CNC machine's outputs very much yet. Do HAAS machines have designated output relays for most M codes? Or are the relays configurable to any M code?
  • matthewd92matthewd92 Posts: 385Founding Pro, Tactile Sensor Beta Testers Handy
    @tim_smith  We were working with older VF4 mills.  I will probably get the M-Codes messed up as its been a while since we did the project but basically there is a single output M21 that you can have the program call, the robot then listens for this as a 'ready' signal from the CNC.  The G-Code is then waiting on one of the M-Code relays to go high, I think we used M22.  These are relays meaning all you need to do is supply a common (0V from UR) and signal into the relay.  The M21 you have to wire to a relay that triggers the robot as it is on the CNC 24V bus.  You would wire this to the input side of the relay and then have your common and signal wire from the robot tied to the NO side of the relay.

    The mills we were working with basically had 4 or 5 M-Code relays that you could use.  They are generally used for running stuff like chip conveyors or coolant pumps that are ancillary to the built in equipment.  TO get access to the M21 there is a port on the electrical panel on the back where all of the other signal cables come out.  The first mill that we worked on did not have this cable installed from the factory, we stole it off another one due to time but I believe you can order it and its like $400 or $500 from Haas.  It plugs into one of the cards in the electrical enclosure.
  • SebastienSebastien Posts: 194 Handy
    We are currently working on a machine tending application. And figuring out which output (M Code) can be used is always a pain. We never know if the M codes are available or not. Do you have some tips or tricks that you use? This is for a Fanuc CNC and so far our plan is to hook up to M30 which lets the robot know when program is done. But we would like to exchange more information. 
Sign In or Register to comment.
Left ArrowBack to discussions page