Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: camoit 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
-
Are you getting ANY error messages ? Are you using an OUTSIDE controller ??
(;-) TP
-
I hope I under stand the question but, what I have is a smoothstepper ESS running the machine. The machine it's self is a china machine that I have upgraded.
The strange thing is some times the tool set will work and others when I touch the ground to the pad, the Z will just keep moving down. But if I go in through the button editor and hit the run arrow the program will just lock up.
If there is some other script that will work with less problems I'm all ears. The height of the block is 19.40MM
-
Sorry But I can't help you with the ESS as IT controls the G31 not Mach3.
Check with Greg over at Warp9.
(;-) TP
-
Make sure you're in the correct G90 or G91 mode before running this, as you'll get different results depending on which mode you're in.
-
Make sure you're in the correct G90 or G91 mode before running this, as you'll get different results depending on which mode you're in.
What do you mean by the "correct mode"? Where is that checked at.
As for the ESS it works just fine. Much better then what came with it.
Sorry for the dumb question but I'm new to this part of Mach
-
Is your macro written to work in Absolute or Incremental mode? Whichever mode it works in would be the correct mode.
Your macro should be checking what mode Mach3 is currently in, then set it to what you need it to be in, and return it back to its original mode when finished.
-
I'm sorry but it was a pre written thing that came with the machine, so I have no idea how it was done or where is was done.
Some times it will work many times it will just stop when I hit the touch pad, some times it does not stop at all. And since I'm totally new to this part of the program. Is there some place where I can learn about the script and how it works?
Thanks.
-
search for hoss auto zero script and use that