Hello,
I am trying to implement a arduino controlled Hass indexing head into the g code for indexing. I have an arduino running a stepper motor index head. I have a fanuc 0mc on a supermax max 3 mill. The MTB has supplied a couple of m codes that can be used. M40, M80. I can call a M40 and it will turn on a relay to activate the index cycle on the head. The ladder then requires a limit switch input to turn off the m40 code and continue with the g code. According to the ladder diagram when m40 is called It turns on r538.2. I am not very familiar with Macros. The machine has macro a. From reading the fanuc manual it looks like you can manipulate some register bits with macros. I am not sure if this one is one of them or not.
What I am trying to do is call m40 in the code and use a g04 to set a dwell time as a variable while the index head makes its move, say one second or so. Then cancel the m40 command so that the g code continues on until the next indexing command. Is this something that is possible or is the only way to cancel this type of command through a limit switch input being x20.2.
Any help would be greatly appreciated.
Thanks
Scott