isn't it annoying when you type out a long post and the system times out before you submit it. grr
Anyway, I have been away from playing with my machine for a few weeks due to work commitments and have now started to complete the missing link of my toolchanger macro, namely the spindle dog alignment.
I have tried various combinations of If and While commands but have failed at every step and I am coming perilously close to causing some serious damage after crashing the carousel into the still spinning spindle on more than one occasion. ouch!
What I am trying to do, as mentioned in the original post, is to run the spindle at a very low speed, say 60rpm, and then switch off the spindle relay as the INDEX proximity passes the detector. As the detector is about 90degrees off from the correct dog position i am also trying to put in a Sleep delay so I can 'tune' the position. If this is impractical I could physically move the proximity to perfectly align with the dog position which might be better.
As I wasn't getting much success with IsActive(INDEX) I have duplicated the Index port and pins for a seperate input so I can use IsActive(INPUT2). Whilst I can get the spindle running, Code "M3 S60", I don't seem to be able to figure how to get the thing to stop before the program steps further into the macro and sends the carousel into the spindle.
I don't suppose it really matters at what early point in the macro the spindle alignment commmands are executed, be it before or after the table moves safe (Code "G00 G53 Z" & z etc), so please feel free to make any suggestions.
I am just worried that if I carry on 'trying' to get it right i'm going to detroy my machine in the process.
As always, your assistance would be greatly appreciated ...Sweep