Help with probe z setting....

Having problems with or questions about SheetCam? Post them here.
Post Reply
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Help with probe z setting....

Post by Davek0974 »

Hi all, first post, I'm building a plasma table with sheetcam and mach3 and want to add auto material sensing with a floating head, I want to ref the material before every M3 command.

I have been searching and found I can use the "mach3with THC and scriber" post processor and that seems to do what I need but when I mentioned it over in the mach forum they advised me not to use it because it uses axis offsets and these remain in place after the job is run and can upset further jobs unless a G92.1 code is issued to reset the offsets at the end of a job.

So what I am asking is, are they right, am I just fused or does the post processor work as it should?

I am very new to this and learning a lot but having been advised on the mach forum to just go and search is very helpful!

All I want is for the torch to ref the material before every cut starts.

Any help will be much appreciated.

Thanks
Dave
User avatar
Les Newell
Site Admin
Posts: 3686
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Yes it does use axis offsets but this is not a problem. The only time you need to be a bit careful is if you switch from thin material to much thicker material (e.g going from 1/4" to 1/2"). As the code does not know you have switched, it may run the torch too low for the first move. The easy solution to this problem is to jog the torch down until it is close to the surface then zero the Z axis.

There are hundreds of people using this post or variations of it.
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Post by Davek0974 »

Thanks Les, but wouldn't the probe switch tell it the thickness has changed?
User avatar
Les Newell
Site Admin
Posts: 3686
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

When you change from thin material to thick material it is possible that the torch will hit the work before it starts probing. This can only happen on the first probing cycle after you change thickness. After that it will be fine.

Generally you only need to worry about this if you increase the thickness of the work by more than the pierce height.
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Post by Davek0974 »

Having fitted the floating head today and manually played with entering the g-codes that sheetcam will use, I am a bit confused as to why it might fail when thickness is increased??

Obviously the torch will be well above the material following a reload, I was guessing I would then rapid the z down a bit and let it sort the rest out itself.

Does the g31 probing not instantly start looking for a probe input signal?

Here's what I have been telling it to do...

G31 Z-100 F300 this lowered the head from wherever it was sitting and stopped when the probe switch closed.
G92 Z0 Set offset to zero.
G00 Z20 This moved the head back up by the amount of float head travel I have.
G92 Z0 Set offset to zero.
G00 Z1 This raised the head a further millimetre.

Surely that would work regardless of work thickness???

Very interesting to watch it work.
User avatar
Les Newell
Site Admin
Posts: 3686
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

To save time the code generated by the post rapids to pierce height before probing. Due to the way the post processor system works changing it to probe from clearance height is a little tricky.
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Post by Davek0974 »

Beginning to get a little clearer now.

What would this macro do inside mach3 if placed at the start of the M3 command??

DoOEMButton (1010) 'reset z DRO
Code "G4 P1" 'wait
Code "G31 Z-100 F250" 'probe surface
While isMoving()
Wend
ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
While IsMoving()
Wend
DoOEMButton (1010) 'reset z DRO
Code "G0 Z20" 'remove floating head travel
DoOEMButton (1010) 'reset the z DRO

Would that not probe the surface and leave my Z DRO at zero ready for the M3 command to complete?

This is all theory but I do write VB programs in my day job and it's very similar :)
User avatar
Les Newell
Site Admin
Posts: 3686
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

At a quick glance the code looks fine. The problem is that the post issues M03 after it has moved to pierce height so you still have the same problem.

Are you likely to change the thickness a lot?
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Post by Davek0974 »

Possibly, no idea, never used a CNC plasma before :)

This is mostly educational and I like figuring out ways to do what I want so it's a learning exercise too.

Looking at a print of a .tap file created by sheetcam I see what you mean now, pierce height before M3 then wait then cut height.

Interesting conumdrum, I guess I will go with the built in post option first while thinking this out :)

Looking further at the post generated file, I can't yet see where it rapids down to pierce height?

The G31 is before the G0 Z (pierce height) line?

It goes,
G21 metric
F1
G00 Xpos Ypos
G92 Z0
G31...
G00 Z switch height
G92 Z0
G00 Z (pierce height)
M03
G04 P (pierce delay)
G01 Z (cut height) F(cut speed)

Unless I'm reading it wrong?

I can't see why that code wouldn't reference from any height?


I am looking at code generated by the THC with scriber post processor file.
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Post by Davek0974 »

Looking further into the post generated file, it seems the first time g31 is called, it works from any height, subsequent calls are from rapid clearance height, which in my case is 10mm.

This makes sense as the workpiece won't vary much from the first time it is measured, just a mm or two.

So it looks to me like your code is better than a macro option?

To get around the persistent offset issue, could we not just tack on a G92.1 command at the end of the file?

That would have all bases covered I think?
User avatar
Les Newell
Site Admin
Posts: 3686
Joined: Thu May 11, 2006 8:12 pm

Post by Les Newell »

Heh, I forgot I did that. OK, forget what I said about needing to reset Z zero when you change to a thicker material :)
To get around the persistent offset issue, could we not just tack on a G92.1 command at the end of the file?
I don't see any need for this. In fact if anything it is good that it remembers the thickness of the work. If you really want to cancel the offset, it is easy enough. Edit the post and look for function OnFinish. Change
post.Text (" M05 M30\n")
to
post.Text ("G92.1 M05 M30\n")
Davek0974
Posts: 286
Joined: Sat Feb 01, 2014 2:07 pm

Post by Davek0974 »

Les Newell wrote:Heh, I forgot I did that. OK, forget what I said about needing to reset Z zero when you change to a thicker material :)
Great, that means at least I'm reading the code correctly:)

It also means it works exactly as I want it to.
Les Newell wrote:
To get around the persistent offset issue, could we not just tack on a G92.1 command at the end of the file?
I don't see any need for this. In fact if anything it is good that it remembers the thickness of the work. If you really want to cancel the offset, it is easy enough. Edit the post and look for function OnFinish. Change
post.Text (" M05 M30\n")
to
post.Text ("G92.1 M05 M30\n")
Great. The only time I see it being an issue is if I were to manually issue a Z command and use the DRO as my guide or use the jog to set the z axis, I guess both issues are pretty much a non-starter as I would always jog down to the plate and set zero manually anyway, what the DRO reads is pretty meaningless in that case, but I have tested again today and I can at least see where having an offset could be an issue.

Good to go then, thanks
Post Reply