How can I force a g43 on new operation?

How can I force a g43 on new operation?

mxdawg121
Contributor Contributor
481 Views
9 Replies
Message 1 of 10

How can I force a g43 on new operation?

mxdawg121
Contributor
Contributor

I run several machines - many times I have an M00 programmed mid program to flip parts for other sides. 
ex

setup1

M00

setup2

M00

setup3

M00

 

ill shift click them all then post. Been doing it like this for a while, however 

None of my post force a g43 on a new operation (doesn’t change tools)

 

most of machines don’t care they run as they should. One of them is picky and needs a g43 after each m00. 

I’ve tried to modify a post to force a g43 on every initial zmove but can’t figure it out. 

anybody able to help?

0 Likes
482 Views
9 Replies
Replies (9)
Message 2 of 10

seth.madore
Community Manager
Community Manager

You can put in an Manual NC of "Force Tool Change", which would send the machine to Z home and reinitialize the tool and height call. Put this in between operations.

2023-07-27_12h26_32.png

 What post processor are you using, and would you have a sample file you can share?


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 3 of 10

mxdawg121
Contributor
Contributor

That is a great solution.

 I'd prefer to have it always post a g43 whenever theres a new operation. Our mastercam always post a g43 - im tyring to make everything uniform if possible.

0 Likes
Message 4 of 10

seth.madore
Community Manager
Community Manager

What's your post processor and do you have a sample part you could share? (saves me from having to reinvent the wheel).

If you are working with a post processor that you're already fiddling around with, please share that here as well


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 5 of 10

mxdawg121
Contributor
Contributor

Yes, of course i'd love to share. I have a few changes to this post, mostly QOL changes. 

 

 

0 Likes
Message 6 of 10

seth.madore
Community Manager
Community Manager

Easiest thing to do is already in your post, it's called "Safe Start All Operations". This will spit out this:

N1005 (Bore2)
(1/4 Endmill)
N1010 G90
N1015 G53 G0 Z0.
/ N1020 T2 M6 G90
/ N1025 S6500 M3
/ N1030 G54
/ N1035 M8
N1040 G1 X2.3022 Y-0.5452 F650.
N1045 G0 G43 Z0.6 H2

 

Now, you might want to remove the "/" in front of each line, but that's an easy post edit.


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 7 of 10

seth.madore
Community Manager
Community Manager

2023-07-27_12h43_52.png


Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 8 of 10

mxdawg121
Contributor
Contributor

Im aware of this, when i use this feature - our campro mill goes up to toolchange location, turns the spindle off and back on really quick and it sounds quite unhealthy.

0 Likes
Message 9 of 10

seth.madore
Community Manager
Community Manager

Alright, here's what you want to do:

Towards the end of the "onSection", replace this:

   if (xyzFormat.getResultingValue(getCurrentPosition().z) < xyzFormat.getResultingValue(initialPosition.z)) {
      writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z));
      zIsOutput = true;
    }

With this:

   zOutput.reset();
    writeBlock(
      gMotionModal.format(0),
      conditional(!currentSection.isMultiAxis() || !operationSupportsTCP, gFormat.format(43)),
      conditional(currentSection.isMultiAxis() && operationSupportsTCP, gFormat.format(234)),
      zOutput.format(initialPosition.z),
      hFormat.format(tool.lengthOffset)
    );

 

I've tested this in your file and it looks like it's doing exactly what you'd like:

N2150 G90 G0 G54 X15.
N2155 G91 G28 Y0
N2160 M00
N2165 (ROTATE)

N2170 (Bore3)
(1/4 Endmill)
N2175 G90
N2180 G0 G43 Z0.6 H2
N2185 G1 X1.865 Y-1.1688 F650.
N2190 G0 Z0.11
N2195 G1 Z0.055 F60.

Seth Madore
Customer Advocacy Manager - Manufacturing


0 Likes
Message 10 of 10

mxdawg121
Contributor
Contributor

That does work, i just have concern of the z move before the x and y. Is it possible to add a button to the post preference screen that "Force Tool change all operations" like the safe start - without all the spindle business

 

0 Likes