Mach3 post processor drill cycle

Mach3 post processor drill cycle

philip
Participant Participant
598 Views
8 Replies
Message 1 of 9

Mach3 post processor drill cycle

philip
Participant
Participant

Hopefully my last newbie question...

 

In my other post I mentioned the background which hopefully explains my perspective. The TLDR version is, I've never used fusion's manufacturing capabilities before. I used a simple program called meshcam. Took a mult-year hiatus from milling anything and I'm trying to jump back in. Hobby mill (taig) and mach3 control.

 

I'm still just testing/simulating before even turning the mill on for the first time in years (though I've set it up and tested it's all working fine). When I setup drilling operations in meshcam, the resulting output was (what I think I'm learning) really simple.

 

Example snippet of a section of some code I generated using meshcam for a drilling operation:


(Spot Drilling)
G0X0.9674Y0.3490
G1A0.0000Z-0.0105F1.0
G0Z0.1000
G0X1.3175Y0.3500
G1Z-0.0105F1.0
G0Z0.1000
G0Y0.7338
G1Z-0.0105F1.0

 

Everything below that is just more holes.

 

So I have a job setup in fusion which is similar and I believe I have everything set correctly. It simulates fine. No errors etc. and looks to be as expected. However, there's some "new to me" stuff here that I've been researching and trying to wrap my head around. I was running the resulting tap file through Ncviewer, which is what caused me to be concerned, but I think I have it figured out and want to confirm.

 

Here's a snippet of the resulting post from fusion:

G90 G94 G91.1 G40 G49 G17
G20
T1 M6
S5000 M3
G17 G90 G94
G54
M8
G0 X0.8346 Y0.4732
G43 Z0.9843 H1
G0 Z0.1969
G98 G83 X0.8346 Y0.4732 Z-0.0229 R0. Q0.0049 F1.
X0.8316 Y0.6113
X0.8712 Y0.7736
X0.947 Y0.7753
X0.9653 Y0.8709
X0.8895 Y0.8691
X0.6663 Y1.1144

 

Then just more holes. In Ncviewer it's not showing any retracts. So the drill moves to a hole, drills, then moves to the next x,y spot, then the next etc. without any z movement, but that's controlled by the canned drilling cycle in this line: G98 G83 X0.8346 Y0.4732 Z-0.0229 R0. Q0.0049 F1. right? The whole canned cycle thing is new to me.

 

I intend to dry run this on the machine with safe positioning for the work zero and confirm it behaves correctly in mach3/on the machine, but I just wanted to confirm I'm thinking about this correctly. I've seen other similar posts by folks, and I suspect the ncviewer simulation part is something we're all seeing. 

 

Also, just to clarify, that's a .5mm drill, hence the crazy feedrate and pecking.

0 Likes
Accepted solutions (1)
599 Views
8 Replies
Replies (8)
Message 2 of 9

philip
Participant
Participant

Well, 2 steps forward and 3 steps back. I thought I was learning something new, but now I'm at a loss.

 

I got the machine setup and ran an old file w/ a pencil in the spindle and it worked perfectly. Didn't break any graphite.

 

So I tried running what I output from fusion and it didn't go as well. I should've noticed this and thought about it more in the fusion simulation because the issue is there too. Only broke some graphite though, so there's that.

 

I'm starting at what I have setup as G55 WCS in mach3. I changed the setup to 2 in the WCS option. That all works as expected. What's "wrong" though is that I have that work offset setup with z at what would be the top of the stock in the lower left corner of the stock. That's how I have the setup in fusion too. Origin is a stock box point and I selected the top of the stock in the lower left corner of the stock.

 

The drilling operation though just moves in the X,Y to the first hole location. There's no z retract to the clearance plane, then the X,Y move, then the drilling. I can't seem to figure out how to make it move to the clearance plane first, then move to the first operation location. 

 

So is my solution here to manually move z up to the clearance plane first, then run the gcode? Is there any way to get the post processor to insert that z move? I guess I could "trick it" by setting the origin in the setup WCS settings to be offset from from the stock by the clearance height distance? If that's the case it would sure be nice for there to be an offset option there. 


What am I missing here?

0 Likes
Message 3 of 9

philip
Participant
Participant

So I slept on this and I think what I’d really like to do is get around the canned drill cycle thing all together. I suppose that’s probably not best practice, but I’m doing hobby stuff here. My gcode projects are tiny. Maybe 128 lines of code is a typical project. 

Is there a way to get the mach3 post processor to just output longhand drill moves? If I could just get it to output simple gcode that behaves like its showing in simulation I think I’d be golden.

0 Likes
Message 4 of 9

programming2C78B
Advisor
Advisor

Your post should be using a G53 G00 Z0. at the very beginning of the program. 

Please click "Accept Solution" if what I wrote solved your issue!
0 Likes
Message 5 of 9

philip
Participant
Participant

Thanks! I did arrive at that part at some point in my madness last night.

 

I'm starting to wonder if part of my "issue" is looking at this in ncviewer. It's not showing any retracts on the canned holes, but I'm starting to wonder if that's just the viewer? I'm not keen on the canned cycle thing. I understand the point and that's great, but it's just hard getting used to seeing things that are effectively macros doing things and I can't see the basic/simple machine language in the code which concerns me.

 

My plan was to try the attached (wouldn't let me attach the .tap file so pasted below) on the machine (with a pencil again) and see if this behaves correctly in mach3/on the machine. It looks perfectly fine in the fusion simulator. When I ran an earlier iteration on the mill, it did seem like all the feeds and speeds were good for what I was trying to do. Only the z retract stuff in the holes seemed off.

 

Current Drill section:

G90 G94 G91.1 G40 G49 G17
G20
G53 G0 Z0.

(DRILL1)
M0 (CHANGE TOOL)
T1
S5000 M3
G17 G90 G94
G55
M8
G0 X0.8346 Y0.4732
G43 Z0.4528 H1
G0 Z0.1575
G98 G81 X0.8346 Y0.4732 Z-0.0229 R0.0984 F1.
X0.8316 Y0.6113
X0.8712 Y0.7736
X0.947 Y0.7753
X0.9653 Y0.8709
X0.8895 Y0.8691
X0.6663 Y1.1144
X0.619
Y0.9766
X0.6663
X0.6793 Y0.8772
X0.755 Y0.8789
X0.7453 Y0.7715
X0.6695 Y0.7698
X0.6315 Y0.5971
X0.6345 Y0.459
X0.4592 Y0.4574
Y0.5977
X0.4096 Y0.7357
X0.2386 Y0.74
X0.2845 Y0.5934
Y0.4531
X0.2568 Y0.9766
Y1.1144
G80
Z0.4528
M5
G53 G0 Z0.

 

0 Likes
Message 6 of 9

programming2C78B
Advisor
Advisor
Accepted solution

yes, nc veiwer does not show the retracts of your canned cycles. I don't use it for that.

Your code looks good to me. Its implied that when you change your tool you're doing it at the highest Z position. IF you're manually touching it off, you must raise it above your stock and fixtures.

Please click "Accept Solution" if what I wrote solved your issue!
Message 7 of 9

philip
Participant
Participant

Oh Good. That really answers my long-winded and difficult-to-suss-out question. 😉

 

I have gathered that I need to change my process a bit from how I used to do things, which is fine and for the best. It's somewhat relevant/irrelevant, but I'm planning to set up a permanent tool depth probe on the table so I can more efficiently and accurately do tool changes. That will require the same tool change>manually jog above the workpiece/fixtures to a safe z height>cycle start, too.

 

Thanks!

0 Likes
Message 8 of 9

programming2C78B
Advisor
Advisor

Just include the G00 G53 Z0 at the end of your tool touch-off macro so the machine does it for you!

Please click "Accept Solution" if what I wrote solved your issue!
Message 9 of 9

philip
Participant
Participant

Can't thank you enough. I guess all I needed was some confidence and reassurance that ncviewer wasn't showing the retracts.

 

Success!

 

IMG_7687 Large.jpeg

0 Likes