Can't get LinuxCNC to stop taking "shortcuts"
- Hakan
- Offline
- Platinum Member
- Posts: 501
- Thank you received: 156
Always put G64 in the start of the g-code program.
Please Log in or Create an account to join the conversation.
- radom
- Offline
- Senior Member
- Posts: 60
- Thank you received: 7
The G64 setting is forgotten when e-stop is activated. If it hasn't changed in a year or two.
is this deliberate or is it a bug?
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
- Posts: 88
- Thank you received: 5
Here's what my path looks like in FreeCAD:
Here is what the machine says it will do (note that I made this picture too late, when the first incorrect traced path was already removed from the view; but you can still see that the later chamfering path had the same problem, just with a smaller radius):
And here is what the machine does:
As you can see, what is supposed to be a square path becomes an arc.
Interestingly, the gcode preview shows the intended path correctly, but the pink line tracing the actual path is shown rounded, too.
Here is the relavant part from the gcode that is supposed to make the outer square:
(Pocket_Shape002)
G0 Z5.000
G0 X199.250 Y139.250
G0 Z3.000
G1 X199.250 Y139.250 Z-3.000 F2000.000
G1 X31.750 Y139.250 Z-3.000 F5000.000
G1 X31.750 Y41.750 Z-3.000 F5000.000
G1 X199.250 Y41.750 Z-3.000 F5000.000
G1 X199.250 Y139.250 Z-3.000 F5000.000
G0 Z5.000
So the machine never actually attempts to drive to this point:
G1 X31.750 Y139.250 Z-3.000 F5000.000
Note that I added G61 after the problems a year ago:
RS274NGC_STARTUP_CODE = G17 G21 G40 G49 G61 G80 G90 G94 G97 G98
My full machine config is here:
github.com/knipknap/cutty
Attachments:
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
- Posts: 88
- Thank you received: 5
- When I add G61 into the gcode file, the problem disappears.
- If I then remove it again and start the file again, the G61 setting is remembered.
- If I then turn the machine off and on again using the button in Gmoccapy, the problem re-appears - no emergency mode needed!
So for some reason, switch off the machine using Gmoccapy clears the G61 setting, causing this issue.
Man, finally. So the "solution" is indeed to put this into every gcode file - that sucks, because how on earth will I ever remember that. Now I'll have to go through every gcode file I ever created and add that setting, not very practical.
Any alternative recommendations?
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
- Posts: 19430
- Thank you received: 6508
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G90 G94 G97 G64 P0.025
0.025 is the amount in mm the machine cad deviate from the original path.
Adjust accordingly if using inches.
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
- Posts: 88
- Thank you received: 5
RS274NGC_STARTUP_CODE = G17 G21 G40 G49 G61 G80 G90 G94 G97 G98
The problem is, this isn't executed when turning the machine on in Gmoccapy.
Please Log in or Create an account to join the conversation.
- Aciera
- Online
- Administrator
- Posts: 3982
- Thank you received: 1723
I don't see a G64 presetting, what makes you think it's not executed?I already have this in the ini file:
RS274NGC_STARTUP_CODE = G17 G21 G40 G49 G61 G80 G90 G94 G97 G98
The problem is, this isn't executed when turning the machine on in Gmoccapy.
Just checked on 2.9 Gmoccapy and it seems to work just fine for me:
Attachments:
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
- Posts: 88
- Thank you received: 5
The RS274NGC_STARTUP_CODE is executed on first start of LinuxCNC machine, but the G61 setting is lost after "soft-cycling" power following the steps I explained above.
Please Log in or Create an account to join the conversation.
- Aciera
- Online
- Administrator
- Posts: 3982
- Thank you received: 1723
Ah, yes. I missed that.There's no G64, but theres G61, which disables G64. It means "exact travel mode", i.e. hit every point exactly, no tolerance.
I remember an issue where an estop reset the G64 setting but testing on version 2.9.2 seems to work just fine for me. G61 set in the STARTUP_CODE and neither estop nor machine ON/OFF change it.The RS274NGC_STARTUP_CODE is executed on first start of LinuxCNC machine, but the G61 setting is lost after "soft-cycling" power following the steps I explained above.
What version of linuxcnc are you running?
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
- Posts: 88
- Thank you received: 5
I'm hesitant to update, don't want to risk being unable to use the machine...
Please Log in or Create an account to join the conversation.