Intercon G43 or G49 changing Zref0 after tool changes?

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
richardb15
Posts: 144
Joined: Fri Jan 17, 2025 4:01 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0701240191
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Victoria, Australia

Intercon G43 or G49 changing Zref0 after tool changes?

Post by richardb15 »

I have my mill set up with a fixed location tool touch off device and use the Mfunc6 done by Scott with some small mods to suit my setup, but it basically touches off then uses #9071 (tool touch off height from a ref point) & #159 (distance from job intended Z0 to the ref point) to reset the job Z0 on each tool change. I have all H values in the tool library set to zero. This works fine and allows me to use multiple tools on jobs where the tools required outnumber my collet holders.

I can use MDI and an M6 Txx command to swap tools all day long and it always correctly keeps the part Z0 where it should be regardless of tool used as the macro does the maths. I seem to have a problem when using multiple tools in Intercon postprocessed programmes though and I can't understand the reason.

When intercon posts a CAM file I've put together it seems to apply a G49 before the tool change, homes Z with M25, calls the M6 macro for the new tool, that runs through the macro and I can see the WCS #54 Z value change to the correct value when the touch off is touched the second (slow) time. The spindle then retracts, starts spinning, turns coolant on, waits 3 seconds, then before anything moves the WCS #54 Z value jumps/is reconfigured and is now wrong. Here below is a sample of code from intercon.
; ; --- Drill ---
N0030 X-68.0 Y-68.0 Z2.54
G81 X-68.0 Y-68.0 Z-12.0 R2.5 F30.0
G80
; --- Tool #7 ---
;Tool Diameter = 10.0000 Spindle Speed = 700
;dia 10mm drill
G49 H0 M25
G0 X0.0 Y0.0
N0031 T7 M6
F30.0 S700 M3
M8
G4 P3.00 ; pause for dwell
G43 D7
; --- Comment ---
N0032 ; dia 10mm holes
; --- Drill ---
N0033 X-128.0 Y-90.0 Z2.54 H7
G81 X-128.0 Y-90.0 Z-26.0 R2.5 F30.0
G80
I don't understand what is causing this reference in the Z to change, or why the G43 is written with a Dxx value by intercon. G43 is supposed to be a height offset, not a diameter function, and in the above its a drill cycle so it shouldn't care about diameters anyway? If I go through the G-code file and change all the G43 Dxx lines to G43 Hxx, with all my library H values set to zero, it works fine. The H7 in the above example does get written by Intercon on the next movement line, N0033 in the above example but the Z ref is already changed to a wrong value by then so I have to stop the cycle before it drives the tool into the job. Why is the H7 automatically written after movements are called, or why is it called at all if it wasn't chosen in the toolchange line?

Could someone explain the logic of what is going on here with the intercon and post processor?

Here is the icn file:


and here is the full cnc file created by CNC12:


Report is attached if it is any use
Attachments
report_0008DC111213-0701240191_2025-05-15_15-01-46.zip
(1.01 MiB) Downloaded 3 times


cnckeith
Site Admin
Posts: 8855
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Intercon G43 or G49 changing Zref0 after tool changes?

Post by cnckeith »

probably the M6 code you are running, how about posting it?
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html


richardb15
Posts: 144
Joined: Fri Jan 17, 2025 4:01 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0701240191
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Victoria, Australia

Re: Intercon G43 or G49 changing Zref0 after tool changes?

Post by richardb15 »

My M6 is attached, but also in the report attached in the first post. It is the one that Scott published with small mods for my W axis setup and additional comments/notes.
Attachments
mfunc6.mac
(10.45 KiB) Downloaded 2 times


richardb15
Posts: 144
Joined: Fri Jan 17, 2025 4:01 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0701240191
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Victoria, Australia

Re: Intercon G43 or G49 changing Zref0 after tool changes?

Post by richardb15 »

Well I don't know, I rebooted everything and ran a load of similar intercon programmes today and all was fine, I didn't change anything. No idea what was going on yesterday. Will just keep running and see if this issue occurs again.


richardb15
Posts: 144
Joined: Fri Jan 17, 2025 4:01 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0701240191
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Victoria, Australia

Re: Intercon G43 or G49 changing Zref0 after tool changes?

Post by richardb15 »

I've managed to replicate this behaviour a few times. So the machine requests the tool change and runs the M6 macro, goes to the tool touch off, the G54 Z height is reset as it should via the G92 Z[0+[#9071] - #159] as I can see that in the WCS G54 display on the screen so it has written the value, the Z retracts home at the end of the macro, it then asks with an M225 to press cycle start to continue and that is the last command in the M6 macro. But as soon as I press cycle start and it starts the move back to the job, the G54 Z value reverts back to what it was before the M6 was called so to the value of the previous tool. So it seems that the G92 correctly gets written, then gets overwritten sometimes. Rebooting the PC makes no difference, I have to shut down and restart the Acorn6, then it will run fine. Saturday it did it, Monday it didn't all day, today it did it once. A rather annoying bonus feature I could do without.

So I can stop it doing it, I'll try and identify what preceding behaviour sets it up. I would have thought running the M6 macro would override anything else that might have been going on but somehow and sometimes the PC or Acorn is holding onto the old G92 value and bringing it back without being explicitly asked.


Ken Rychlik
Posts: 511
Joined: Wed Jan 23, 2019 4:19 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 80F5B5B92C3A-0213236854
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Intercon G43 or G49 changing Zref0 after tool changes?

Post by Ken Rychlik »

So you are using a M6 (tool change) macro, but your machine parameters are not set to atc . param 3 is normally 6 and yours is 18 param 6 is norally 1 for atc and yours is 0

To set up atc, the parms you need to investigate are 3, 6, 160, and 161

It is ok to call it an atc even if you manually change to tool. G43 does turn on tool offset and G49 turns it off.

It seems intercon is being run as if you have an atc machine but your params are not set to atc.
Ken


richardb15
Posts: 144
Joined: Fri Jan 17, 2025 4:01 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: Yes
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0008DC111213-0701240191
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Victoria, Australia

Re: Intercon G43 or G49 changing Zref0 after tool changes?

Post by richardb15 »

Ken, many thanks I will review this all tomorrow and see. I hadn't classed myself as an auto tool changer!

My settings, as you rightly point out:
P3 = 18.00000 - Modal Tool and Height Offset Control Add 1: Reset Tool and Height Offset numbers upon job completion Add 2: Set Tool Height Measurement Z Reference position at the Z home position Add 4: Turn on Tool Height Offset Retention Add 16: Probe Protection base on Tool Number
P6 = 0.00000 - Auto Tool Changer Installed

So my P3 is 18 so set up as tool height Zref at Zhome (+2), plus probe protect based on Tool number (my probe is T10) (+16)
For it to be a 6 that would be tool height Zref at Zhome (+2), plus Turn on Tool Height Offset Retention (+4)

All my tool heights are set at zero in the tool table so not sure if that would make any difference. I guess I'll set P3 at 6 or 22, and try P6 at 0 and 1, cover all 4 options and see what happens, thanks for taking the time to review and suggest :)


Post Reply