1
VB and the development of wizards / Re: M6Start macro problem
« on: March 23, 2022, 04:28:24 AM »
Well if I think about the problem a little deeper, macro actually stuck in this sub while waiting for move.
But just after it calls this G0 move that is never actually done.
So it stuck in endless loop while waiting for move to end.
What can prevent "G53 G0 Z-104" to cause actual move and why IsMoving() wait for move infinitely?
Looks like Mach3 set some variables for G0 move used by IsMoving() but it does not proceed and result is forever loop.
Code: [Select]
' -----------------------------------------------------------------------------
Sub WaitForMove
CntLoop = 60
While(IsMoving() And CntLoop > 0 )
CurPos = GetOemDRO(802)
Pom = CurPos - Destination
Sleep(250)
CntLoop = CntLoop - 1
If CntLoop = 0 Then
If RetryDialog("Error!!!", "IsMoving() timeout, Retry?") Then
CntLoop = 20
Else
End
End If
End If
Wend
End Sub
But just after it calls this G0 move that is never actually done.
Code: [Select]
code("G53 G00 Z"& ToolZlockPos & "F" & ATCFEEDRATE)
So it stuck in endless loop while waiting for move to end.
What can prevent "G53 G0 Z-104" to cause actual move and why IsMoving() wait for move infinitely?
Looks like Mach3 set some variables for G0 move used by IsMoving() but it does not proceed and result is forever loop.