- Posts: 18
- Thank you received: 0
Changing default of G64 to add parameters or set to G61
I see this in the ini documentation, but I don't see this line in my ini file, so I don't think it's getting set with this method:
"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?
RS274NGC_STARTUP_CODE = G61
I strictly use Fusion 360 for CAM, and the post processor for LinuxCNC never sets G64 or G61 in any files, so I'm thinking it shouldn't be a problem to change the LinuxCNC default, right?
Alternatively, I know I could modify the post processor to add the desired path mode at the beginning of the file (I've already done so just to learn how). I think I would prefer to control it from my LinuxCNC configuration.
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22010
- Thank you received: 3
It can also be added using MDI, but that gets tedious after a while.
Please Log in to join the conversation.
[HALUI] section
MDI_COMMAND = G61
Would that be preferred to using RS274NGC_STARTUP_CODE, or is there no difference either way?
Please Log in to join the conversation.
It is also good practice to set modal codes in your gcode files as the documentation you quoted suggests.
Please Log in to join the conversation.
jpvonoy wrote: According to this I think I could also set it using MDI commands from the ini file using this method:
[HALUI] section
MDI_COMMAND = G61?
MDI_COMMANDS execute when a HAL pin changes state. They are generally connected to physical (or onscreen) buttons.
I don't see that being the best way to do what you want to do.
Please Log in to join the conversation.
andypugh wrote: MDI_COMMANDS execute when a HAL pin changes state. They are generally connected to physical (or onscreen) buttons.
Thanks for that clarification. I didn't realize that.
Please Log in to join the conversation.
You may want to change the P value based on the cutter size and accuracy levels you would like to achieve.
Please Log in to join the conversation.
It would be fairly easy to add a G64 at the same point in the code that it inserts a G21.
Please Log in to join the conversation.
Please Log in to join the conversation.
jpvonoy wrote: 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 to join the conversation.
