7
« on: December 06, 2014, 11:32:21 AM »
Hi all,
to reference Z, X, Y and A I use a macro (see below).
The A is a rotational axis, sothe refrence switch can be active when starting the refrence run.
I check it with "If getoemled(839) Then".
If active, then I would like to rotate the axis by some degrees, and do the refrence run after that.
Simple so far.
But often it doesn't work.
I think I have towait until the move is done with the famous IsMoving function.
See "'*" in the macro.
If the IsMoving is in the macro, Mach3 hangs.
What can be the reason, and how to avoid it?
Greetings,
Gregor
'ref Z first
DoOEMButton(1024)
'ref XY
RefCombination(3)
'check for active switch
If getoemled(839) Then
code("G91 G0 A-14")
'*While IsMoving()
'*Wend
End If
DoOEMButton(1025)
'code("G90 G53 G0 A47")