Ok so I've been looking all night for an anser to this. It just hit me the other day that it "should" be very simple to have the CNC machine do a rapid move towards the homing switches and just stop like 10 mm shy of the switch. Then slowly do the homing and DRO zero of all axes. How ever, I cant get it to work.
Im using the 2010-screen set and Im editing the VB-script files for the homing buttons for X Y & Z.
So, this is what I've tried.
Code "G53 G0 Z-10"
DoButton(24)
Gode "G53 G0 Z-5"
While IsMoving()
Wend
One would thing that this code would first rapidly go to Z-10 and then rund the "DoButton(24) command. After that do a rapid move to Z-5. But NOOoooOOO!
Im guessing Ive missed something here, or I do not know how the "DoButton()" commands work. But as long as I have a "DoButton()" command anywhere in the code, it will FIRST rund that command. Then everything else.
What am I doing wrong?
Worth to mention, for this to work I have checked "PersistanceDRO" function.
What I want to do, in the end, is, when I push the "Ref all button", I want the CNC machine to do a rapid move to -10 mm from the homing switchen in all three axis, before doing the homing thingy

Is this possible? And if yes.. how do I make it so?
Regards
Magnus