Changing default of G64 to add parameters or set to G61
- phillc54
- Offline
- Platinum Member
- Posts: 5709
- Thank you received: 2087
+1
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.
Please Log in or Create an account to join the conversation.
- bradcozine
- Offline
- New Member
- Posts: 1
- Thank you received: 0
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."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?
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.
- elf
- Offline
- Junior Member
- Posts: 32
- Thank you received: 14
Please Log in or Create an account to join the conversation.