Changing default of G64 to add parameters or set to G61

More
17 Jan 2021 00:10 #195606 by phillc54

Agreed. I have already created a modified post processor that accomplishes it, but I was thinking that it made more sense to change it in LinuxCNC


There is no harm, and some potential benefit in doing it everywhere.

If you set it in LinuxCNC then any G-code program can change it, and it will stay changed.
So it should be set in g-code that needs it set as well as defaulting on in your config.

+1

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

More
25 Mar 2022 02:46 #238302 by bradcozine

"RS274NGC_STARTUP_CODE = G17 G20 G40 G49 G64 P0.001 G80 G90 G92 G94 G97 G98 - A string of NC codes that the interpreter is initialized with. This is not a substitute for specifying modal g-codes at the top of each ngc file, because the modal codes of machines differ, and may be changed by g-code interpreted earlier in the session."

Is that note basically discouraging people from setting it in the ini file, or is that how I should make the change? Would I add the following to my ini file, or do I need to include all of the other default modals in this list?

It is not discouraging you from setting modal g-codes, it is warning you that modal g-codes are "sticky". By that, I mean that once they are set, they stay set until being overridden... and they stay overridden until being overridden again. Setting the RS274NGC_STARTUP_CODE established the preferred settings for LinuxCNC at start-up. As a scenario, let's say you set units of measurement at start-up to US Imperial with G20, as in the example above and don't specify G20 in your file that uses US measures. When you run it, it will behave as you expect. In the future, if the ini changes to G21 Metric or you use it on a machine that starts up with G21 as it's default, you will not get the expected behavior. Further, if you run a gcode file that sets G21 inside of it, then rerun your file, you will also not get the expected behavior because the previously run file has changed the modal "sticky" setting.

In short, it's a good practice to set your default values, and to also reestablish the desired settings in your files. This allows the files to execute as expected AND to have manually entered gcode behave as expected. I tend to restart my LinuxCNC session at the beginning of each job.

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

More
25 Mar 2022 07:33 #238308 by elf
I shared a post processor for Fusion 360 with G64 changes here: forum.linuxcnc.org/38-general-linuxcnc-q...t-processor-with-g64

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

Time to create page: 0.072 seconds
Powered by Kunena Forum