Hello Guest it is April 19, 2024, 05:14:24 AM

Author Topic: Auto tool setting help.  (Read 5392 times)

0 Members and 1 Guest are viewing this topic.

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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Auto tool setting help.
« Reply #1 on: February 20, 2015, 12:24:20 AM »
Are you getting ANY error messages ? Are you using an OUTSIDE controller ??

(;-) TP

Re: Auto tool setting help.
« Reply #2 on: February 20, 2015, 01:14:17 AM »
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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Auto tool setting help.
« Reply #3 on: February 20, 2015, 01:30:46 AM »
Sorry But I can't help you with the ESS as IT controls the G31 not Mach3.

Check with Greg over at Warp9.

(;-) TP

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Auto tool setting help.
« Reply #4 on: February 20, 2015, 09:58:44 AM »
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.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Auto tool setting help.
« Reply #5 on: February 20, 2015, 07:42:42 PM »
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

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Auto tool setting help.
« Reply #6 on: February 20, 2015, 07:47:58 PM »
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.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Auto tool setting help.
« Reply #7 on: February 20, 2015, 08:33:16 PM »
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.
Re: Auto tool setting help.
« Reply #8 on: March 08, 2015, 05:30:19 AM »
search for hoss auto zero script and use that