1
VB and the development of wizards / Auto tool setting help.
« on: February 19, 2015, 11:34:44 PM »
So I have a code that works to a point then causes Mach3 to just lock up. It was working before now it's causing a problem.
Can someone please take a look at this and point out what is wrong. When it works it will hit the touch pad then reset the DRO and retract -20.000
Thanks in advanced.
'Rem Probe Down
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZCurrent = GetDro(2)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F100" 'slow feed rate to 100 MM/MIN
GageH = GetOEMDRO (1002)
'Rem Probe Down
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZCurrent = GetOemDro(802)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F100" 'slow feed rate to 100 MM/MIN
GageH = GetUserDRO(1152)
ZNew = ZCurrent - 20 'probe down 20 mm
Code "G31 Z" &ZNew
While IsMoving()
Wend
Call SetDro (2,GageH)
FinalMove = GageH * 1
Code "G0 Z" &FinalMove
Code "G0 Z" &25
Code "F" &FeedCurrent 'restore starting feed rate
Can someone please take a look at this and point out what is wrong. When it works it will hit the touch pad then reset the DRO and retract -20.000
Thanks in advanced.
'Rem Probe Down
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZCurrent = GetDro(2)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F100" 'slow feed rate to 100 MM/MIN
GageH = GetOEMDRO (1002)
'Rem Probe Down
FeedCurrent = GetOemDRO(818) 'Get the current settings
ZCurrent = GetOemDro(802)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F100" 'slow feed rate to 100 MM/MIN
GageH = GetUserDRO(1152)
ZNew = ZCurrent - 20 'probe down 20 mm
Code "G31 Z" &ZNew
While IsMoving()
Wend
Call SetDro (2,GageH)
FinalMove = GageH * 1
Code "G0 Z" &FinalMove
Code "G0 Z" &25
Code "F" &FeedCurrent 'restore starting feed rate