PDA

View Full Version : Mach3 Auto Tool Zero help



piper1
11-06-2017, 10:00 AM
Hi can anyone tell me what I'm doing wrong or missing out please.
I’m trying to set up my Auto tool zero in Mach 3, for some reason it’s decided not to function correctly anymore.

When i select the Auto tool zero button the Z axis starts to lower it’s self and stops when it make contact with the tool sensor.
It then raises 10 mm and stops.
When i select the GOTO switch the Z axis only lowers 10 mm and doesn't take into account the sensor thickness.

This is the Script in my VB editor.

'chengdu xhc tec. probe z surface macro
FeedCurrent = GetOemDRO(818) 'Get the current settings, OEM DROs (818)=Feedrate DRO
ZCurrent = GetOemDro(802) 'OEM DROs (802)=Z DRO
GageH = GetOEMDRO(1001) 'OEMDRO(1001)=Gage Block Height
ZNew = ZCurrent - 300 'probe down 20 mm

Code "G90F200" 'slow feed rate to 100 MM/MIN
SetOemDRO(818,200)
Rem Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "G31 Z" &ZNew
While IsMoving()
Sleep(10)
Wend
Call SetDro (2,GageH) 'DRO(2)=Z DRO

FinalMove = GageH + 10
Code "G0 Z" &FinalMove
Code "F" &FeedCurrent 'restore starting feed rate
SetOemDRO(818,FeedCurrent)

Thank you
Kev

Ger21
11-06-2017, 11:50 AM
Are you entering the sensor thickness into the gauge height DRO?

piper1
11-06-2017, 12:09 PM
Hi Gerry thank you for the reply.
I have tried to enter the sensor thickness in the DRO (Z axis) on the front screen but it cancels out when i select the GOTO button.
I also tried entering it in the VB Script “Call SetDro (2,GageH) 'DRO(2)=Z DRO”
To be honest i don't have a lot of knowledge in the subject

piper1
11-06-2017, 12:31 PM
I've Manged to work out the issue.
The sensor thickness in the Offset colum didn't save the thickness reading.

Thank you
Kev

Ger21
11-06-2017, 01:30 PM
I have tried to enter the sensor thickness in the DRO (Z axis) on the front screen but it cancels out when i select the GOTO button.

No.
The macro is looking in the Gage Height DRO for the sensor thickness. If you don't have it entered there, it's not going to work.

stepmores
11-06-2017, 03:59 PM
hi you can use this

FeedCurrent = GetOemDRO(818) 'Get the current settings, OEM DROs (818)=Feedrate DRO
ZCurrent = GetOemDro(802) 'OEM DROs (802)=Z DRO
GageH = GetOEMDRO(1001) 'OEMDRO(1001)=Gage Block Height
ZNew = ZCurrent - 20 'probe down 20 mm

Code "G90F100" 'slow feed rate to 100 MM/MIN
Rem Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "G31 Z" &ZNew
While IsMoving()
Sleep(10)
Wend
Call SetDro (2,GageH) 'DRO(2)=Z DRO

FinalMove = GageH + 10
Code "G0 Z" &FinalMove
Code "F" &FeedCurrent 'restore starting feed rate

piper1
11-06-2017, 04:14 PM
hi you can use this

FeedCurrent = GetOemDRO(818) 'Get the current settings, OEM DROs (818)=Feedrate DRO
ZCurrent = GetOemDro(802) 'OEM DROs (802)=Z DRO
GageH = GetOEMDRO(1001) 'OEMDRO(1001)=Gage Block Height
ZNew = ZCurrent - 20 'probe down 20 mm

Code "G90F100" 'slow feed rate to 100 MM/MIN
Rem Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "G31 Z" &ZNew
While IsMoving()
Sleep(10)
Wend
Call SetDro (2,GageH) 'DRO(2)=Z DRO

FinalMove = GageH + 10
Code "G0 Z" &FinalMove
Code "F" &FeedCurrent 'restore starting feed rate


Thank you for the reply, i've managed to get it working now but i will keep it for futher refence.

Cheers
Kev

kell
26-04-2021, 04:41 AM
If my gauge height is 19.10mm how would the code change as i am unsure where it is entered.
And i will try this code on my machine as i am trying to get a zero z script to work

JAZZCNC
26-04-2021, 03:08 PM
If my gauge height is 19.10mm how would the code change as i am unsure where it is entered.
And i will try this code on my machine as i am trying to get a zero z script to work

It will be a constant in the probe macro you are using. Post the macro and will take a look.

kell
26-04-2021, 03:42 PM
It will be a constant in the probe macro you are using. Post the macro and will take a look.

Hi dean
long time. i have a code here that is on machine but it gose down and touches then gose up about 50mm then when i remove probe and click goto zero it only moves about 25mm down

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31 Z-50 F255" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, 19.10) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z25 F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If

Neale
26-04-2021, 07:20 PM
[deleted - was looking at wrong code!]

JAZZCNC
26-04-2021, 07:20 PM
Mark, can't see anything in the code that would make it do that. These are the lines that set the new Zero by entering the thickness of your probe plate into the Z DRO and then it retracts up to 25mm above new Zero so shouldn't go anywhere near 50mm.?

Do you have any tool height offset's set in the tool table.?


Call SetDro (2, 19.10) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z25 F50" 'put the Z retract height you want here, must be greater than the touch plate thickness

JAZZCNC
26-04-2021, 07:27 PM
The macro you are using (I believe) picks up the gauge block height from an internal value OEMDRO(1001) - see third line of macro.

Which post are you answering here the one from 2017 or Kell's (mark) current post.? Mark's post doesn't use the gauge block variable.

Neale
26-04-2021, 07:42 PM
Jazz - so many bits of code here I ended up looking at the wrong one. My mistake - I've deleted wrong post.

Don't see any obvious reason why the macro does what Kell says - unless it's a tool table issue, as you suggest. I had a lot of problems getting the touch probe macros working on my new mill because of that. Mach3 seems to have some slightly odd ways of using tool offsets. I would try using the macro with the gauge block, and checking what's actually showing on the Z DRO. Should be 25 in work coordinates with the macro as written - can we check that?

I would still use the internal gauge block height value as set on the "offsets" page as I don't like programming things like that into the code, but that doesn't make any difference to the problem being reported - just a matter of taste.

JAZZCNC
26-04-2021, 08:39 PM
Jazz - so many bits of code here I ended up looking at the wrong one. My mistake - I've deleted wrong post.

Don't see any obvious reason why the macro does what Kell says - unless it's a tool table issue, as you suggest. I had a lot of problems getting the touch probe macros working on my new mill because of that. Mach3 seems to have some slightly odd ways of using tool offsets. I would try using the macro with the gauge block, and checking what's actually showing on the Z DRO. Should be 25 in work coordinates with the macro as written - can we check that?

I would still use the internal gauge block height value as set on the "offsets" page as I don't like programming things like that into the code, but that doesn't make any difference to the problem being reported - just a matter of taste.

No problem I just wasn't sure which post.?

I'm with you on the code, it's poor code and could be done much better.

Regards Mach3 then I'm finally done with it.!! . . . I've been fitting AXBB-E and UCCNC software to the routers I've been building for the last year or so and to be honest it's blown me away. It's rock-solid stable and just gets the job done much better than mach3 ever did, SO this weekend I changed out my IP-S controller for an AXBB-E and UCCNC on my own router... After nearly 20yrs of using I'm sad to say it's RIP MACH3..:sorrow:

Neale
26-04-2021, 10:00 PM
My new mill uses Mach3 with an Ethernet SmoothStepper. I hoped that this would be a reliable combination but I get the occasional hang for no apparent reason, and it can then be a pain to reset and pick up from a specific point in the gcode. Don't know if it's the ESS, Mach3, or the pair of them together. The mill has both a tool touchplate plus touchprobe (a really cheap version but it's OK - and I can make new probes for when I break them...) and to get those both to work with Mach3, it turns out that you need to use an undocumented Mach3 command to switch probe inputs on the fly. Took ages to find that one. Mach3 is getting to be less and less fun these days. I'm using the PV ET6 on my router, although that has its moments as well. I'm probably going to switch to running it on Linux rather than Windows to see if that's a bit better.

So, I'm also wondering about changing controllers on the mill, although it's going to be a bit of a faff as all the probe/motor/limit switch etc sockets are mounted on a single board that also has the ESS plugged in. Quick question, then - does the 300ETH etc plus UCCNC support multiple probe inputs?

JAZZCNC
27-04-2021, 07:36 AM
So, I'm also wondering about changing controllers on the mill, although it's going to be a bit of a faff as all the probe/motor/limit switch etc sockets are mounted on a single board that also has the ESS plugged in. Quick question, then - does the 300ETH etc plus UCCNC support multiple probe inputs?

Yes, it does. If you download the software you can run it in demo mode and you will see on the main screen probe 1 probe 2 buttons, there's also a probe page full of all the usual probe functions. the default screen also comes with 2 park positions.