G0 and G1 in macros

Post Reply
Neale
Posts: 6
Joined: Fri May 01, 2020 7:09 pm

G0 and G1 in macros

Post by Neale »

I am currently writing a few simple macros for tool change and tool height setting for my CNC router. I am used to using G0 for machine rapid moves and G1 with an F parameter for slower-speed moves. However, I have found that using G1 in macros gives unpredictable results but I can use G0 with the F parameter. Looking at other sample macros in the macro list and in the documentation, I do not see G1 used.

Is this correct? Should I always use G0, and give an F parameter value for slower-speed moves?

Thanks,

ivan
Posts: 292
Joined: Tue Apr 16, 2019 5:30 pm
Location: Ottawa, Canada

Re: G0 and G1 in macros

Post by ivan »

Hello there,

The G53 code for machine coordinates is supported only when using G0. Since your positioning (for automatic tool changes, etc) is largely done using machine coordinates, we recommend to use G0 at all times. Since the F-codes can be used to regulate the speed, that would be the proper way to implement this.

In addition to that, you will likely find the macro wizard for tool change useful (Settings > Config > Macro Wizard > Tool Change), this way you won't have to write the macro from scratch. This wizard can create the bare-bones macros that can later be expanded with additional PLC procedures (for tool clamping/unclamping sensors, etc).

Neale
Posts: 6
Joined: Fri May 01, 2020 7:09 pm

Re: G0 and G1 in macros

Post by Neale »

Many thanks, Ivan. I used the wizards to create the macro basic structure and then extended them to suit my machine. The wizards work well but they are not always a "one size fits all" solution all the time!

Post Reply