Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: mutski47 on November 12, 2020, 08:29:09 PM

Title: How to run same file in different G55-G59 offsets?
Post by: mutski47 on November 12, 2020, 08:29:09 PM
Hi all

This seems like a simple question, but google doesn't seem to be my friend right now.

I understand using different work offsets using G55-59 etc. What I'm wondering is, is there a way to have my code, call seperate file containing the sub code for each position? I want to setup a jig to hold 4 panels for cutting out. Each panel will be the same. I know I can set G55 to one panel, G56 to the next and so on etc. Currently I've been selecting G55, hitting run, wait till it finished, selecting G56, hitting run, etc. Would be good if I could just program it to run all 4.

I know I can copy/paste the code 4 times, changing work offset between each one, but that seems problematic if I have to change the panel at all. I know I could also call a subroutine using M98 P1000 which only repeats once (then move offset and run again).

I'd like something like:

G55
run panel.tap
G56
run panel.tap
G57
run panel.tap

etc

Possible?

Cheers - MAtt
Title: Re: How to run same file in different G55-G59 offsets?
Post by: TPS on November 13, 2020, 02:28:54 AM
have a look here:

https://www.machsupport.com/forum/index.php?topic=43838.msg281917#msg281917

https://www.machsupport.com/forum/index.php?topic=7684.0
Title: Re: How to run same file in different G55-G59 offsets?
Post by: mutski47 on November 14, 2020, 07:47:41 PM
Thanks TPS. Looks close enough to what I'm after. Will have a play next week when I'm back near the CNC to actually try it.

Cheers - Matt
Title: Re: How to run same file in different G55-G59 offsets?
Post by: boydage on December 01, 2020, 03:46:17 AM
Fusion 360 will program in your offsets if you ask. And even different non identical parts. It took me a wee while to work out how to do it but once the light comes on it all appears nice and easy. Looking through the G Code it produces exactly what you need.