Calling next subroutine messes up offsets

More
21 May 2025 15:16 #328862 by Routerworks
Replied by Routerworks on topic Calling next subroutine messes up offsets
I believe I should be able to assemble this code myself with subroutines. Don't want to make something rocket science that isn't.

Example:

Parameters G90, G17 etc.
Variables
Offsets

Subroutines
o100 Sub
code
0100 endsub

o101 Sub
code
o100 endsub

o102 sub
code
o102 endsub

G0 X0 Y0 F70 (Go somewhere you can change the tool, first op work zero)
M6 (change the tool, move to top of part)
G54 Z height (set the height to top of part)

G54
o100 Call
G55
o100 Call
G56
o100 Call
G56
o100 Call
G57
o100 Call

G54
G0 Z1.0 (get too up out of the way)
G0 X0 Y0 (go back to first tool change position, work zero)

o101 Call
G55
o101 Call
G56
o101 Call

and on and on

At the end the tool should stop at the last program Z height.

Please offer any comments. Going to try this without the drivers turned on.

Please Log in or Create an account to join the conversation.

More
21 May 2025 20:40 #328875 by Routerworks
Replied by Routerworks on topic Calling next subroutine messes up offsets
Have to thank you for all your help. I finally got this running very well following my above plan. Freecad is great for many things but not so sure it is the best for programs with subroutines.
Again, thanks for your patience.

Routerworks

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum