- Jun 3, 2017
- Reaction score
My name is Scott and I have been following this post for quite a while. Thank you for all of the time and effort you have put into this project. I have finally collected all of the parts I need to make this work for my application. I plan on using a Hass 5c collet stepper indexing head for use on my cnc mill. I have got the Hass head to index like it should and it works great. I now just need to figure out how to interface it to my cnc mill. It is a VMC with a fanuc control. I plan on doing the same thing as Scott did by using a remote switch to index the head. I have some available M codes I can use on my machine to call for the arduino to make the step move. The problem I have is that when I request an m40 code in the g code The cnc will activate a relay which will simulate a right button push. That m40 relay then stays active until the cnc gets a signal to de activate m40. The machine will not progress with nc code until this condition is met. I have looked though your code and I have not found what looks like a finish movement signal. If I can capture that signal and activate a relay to end m40 that will let the nc code continue. I would appreciate if you could point me in the right direction and maybe give me a little help with the code part of it. I am not super savvy on the arduino side of things. It could be as simple as a potentiometer going to an analog input that changes the length of time before the arduino activates a pulse to de activate the M40 code. I think that you would want to use interrupts to time this so that the processor is not counting and waiting for that time period. I would appreciate any help you can give me
Now I'm by no means any kind of an Arduino expert, but would it not be possible to just make a digital pin go high when the code is not active, AKA signal is not being sent to the stepper motor?