Hello Guest it is April 18, 2024, 10:10:39 PM

Author Topic: Mach3 dead after executing Micro Script  (Read 2217 times)

0 Members and 1 Guest are viewing this topic.

Mach3 dead after executing Micro Script
« on: October 31, 2012, 03:22:14 AM »
Newbie with poor English & poor coding skill need help~.
Problem : After running the code in MDI, everything else seized. no response to jogging... etc even after RESET.
Suspect I need an end statement but I might be wrong.
Appreciate help.

my code
' M3 Code

Dim Z_Zero, Pierce_Height, Cut_Height
DoSpinStop()
EndTHC()
Pierce_Height=GetUserDRO(1000)
code "G31 Z-50 F300"
While IsMoving()
Wend
Z_Zero=GetDRO(2)
code "G0 Z"&(Z_Zero+Pierce_Height)
While IsMoving()
Wend
DoSpinCW()
While Not GetOEMLED(36)
Wend
EndTHC()
Cut_Height=Z_Zero + Pierce_Height / 2
code "Go Z"&(Cut Height)
While IsMoving()
Wend
StartTHC()

The M5 code
'M5 code
Dim Travel_Height
EndTHC()
DoSpinStop()
Travel_Height=GetDRO(2) + 50
code "G0 Z"&(Travel_Height)
Re: Mach3 dead after executing Micro Script
« Reply #1 on: October 31, 2012, 07:31:18 AM »
Problem solved
END
is required at the end of the code.