Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: khinhaw 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)
-
Problem solved
END
is required at the end of the code.