Single-stepping through a G-file
- kb58
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 3
11 Oct 2025 04:19 - 11 Oct 2025 06:00 #336261
by kb58
Single-stepping through a G-file was created by kb58
I recently completed a wire EDM machine (not my design) and LinuxCNC runs it, and though I have a sw background, I have zero experience with it.
The very first job it's running, "First Cut" is very simple, checking that the hardware works, powering everything up, making a simple straight cut, then backing out and powering everything down. Because of all the new hardware, I want to single-step through this short job. See below.
The issues:
There are two buttons, "Run" and "Step." I first tried repeatedly pressing Stop and it seemed to work at first, but after about the fourth press, the program took off as though I'd pressed Run. An online reference (AI generated) said to press Step once, then repeatedly press Run, which will advance one line of G-code at a time. Thing is, when I press Step, Run grays out and cannot be pressed, so I don't understand (hence why I pressed Step repeatedly.)
On a related note, when pressing Step, I expected LinuxCNC to indicate the line of G-code that's being executed, but it does not. It's possible that's because I'm not using Step correctly, that it's never being activated, but I don't know.
Lastly, after pressing Step once or twice (don't remember), I get the following error message: "Cannot use axis values without a G code that uses them." I don't know what this means. [Edit: looking online, it appears that this is due to the line "X20" appearing along by itself, with no G-code ahead of it. A puzzle is how the program advanced all the way to the X20 line when I only pressed Step a couple times...]
Thanks!
PS: the last line of the attached file is G30 (it was on the following page)
The very first job it's running, "First Cut" is very simple, checking that the hardware works, powering everything up, making a simple straight cut, then backing out and powering everything down. Because of all the new hardware, I want to single-step through this short job. See below.
The issues:
There are two buttons, "Run" and "Step." I first tried repeatedly pressing Stop and it seemed to work at first, but after about the fourth press, the program took off as though I'd pressed Run. An online reference (AI generated) said to press Step once, then repeatedly press Run, which will advance one line of G-code at a time. Thing is, when I press Step, Run grays out and cannot be pressed, so I don't understand (hence why I pressed Step repeatedly.)
On a related note, when pressing Step, I expected LinuxCNC to indicate the line of G-code that's being executed, but it does not. It's possible that's because I'm not using Step correctly, that it's never being activated, but I don't know.
Lastly, after pressing Step once or twice (don't remember), I get the following error message: "Cannot use axis values without a G code that uses them." I don't know what this means. [Edit: looking online, it appears that this is due to the line "X20" appearing along by itself, with no G-code ahead of it. A puzzle is how the program advanced all the way to the X20 line when I only pressed Step a couple times...]
Thanks!
PS: the last line of the attached file is G30 (it was on the following page)
Attachments:
Last edit: 11 Oct 2025 06:00 by kb58.
Please Log in or Create an account to join the conversation.
- kb58
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 3
11 Oct 2025 15:27 #336280
by kb58
Replied by kb58 on topic Single-stepping through a G-file
Please Log in or Create an account to join the conversation.
- kb58
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 3
11 Oct 2025 18:00 - 11 Oct 2025 19:10 #336286
by kb58
Replied by kb58 on topic Single-stepping through a G-file
Solved!
To use Single-Step, you must:
1. Press Run ("R")
2. Press Pause ("P")
3. Press Execute Next Line as required (why it's not called Step I don't know) ("T")
Quirks:
While it does single-step, it only does so for motion-related instructions; everything else gets executed and full speed. If there's a way to truly perform single-stepping, I'd like to know.
Due to the above, single-step only highlights motion-related lines, so everything else doesn't get highlighted.
This thread can be closed!
To use Single-Step, you must:
1. Press Run ("R")
2. Press Pause ("P")
3. Press Execute Next Line as required (why it's not called Step I don't know) ("T")
Quirks:
While it does single-step, it only does so for motion-related instructions; everything else gets executed and full speed. If there's a way to truly perform single-stepping, I'd like to know.
Due to the above, single-step only highlights motion-related lines, so everything else doesn't get highlighted.
This thread can be closed!
Last edit: 11 Oct 2025 19:10 by kb58.
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds