how to start an .ngc file somewhere in the middle?
- tommylight
- Away
- Moderator
Less
More
- Posts: 19460
- Thank you received: 6529
07 Dec 2022 18:23 #258823
by tommylight
Replied by tommylight on topic how to start an .ngc file somewhere in the middle?
I use axis daily, it works, i use that feature consistently.
Can you upload the gcode here so we can have a look, please?
Can you upload the gcode here so we can have a look, please?
Please Log in or Create an account to join the conversation.
- Wusel
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 8
29 Dec 2022 23:31 #260517
by Wusel
Replied by Wusel on topic how to start an .ngc file somewhere in the middle?
sorry to keep you waiting,
attached you find one example. The same happens on my LuxTurn in the same way so I thought, this must me a bug in Axis or LinuxCNC. But maybe, you spot where this misbehaviour comes from
regards
attached you find one example. The same happens on my LuxTurn in the same way so I thought, this must me a bug in Axis or LinuxCNC. But maybe, you spot where this misbehaviour comes from
regards
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19460
- Thank you received: 6529
29 Dec 2022 23:47 #260520
by tommylight
Replied by tommylight on topic how to start an .ngc file somewhere in the middle?
N6451 X31.048 Y13.897 Z2.407
That is just a random line form the gcode file you attached, trying to run this will probably fail due to missing G00 or G01
Set your CAM to output G01 for feed moves and/or straight lines.
That is just a random line form the gcode file you attached, trying to run this will probably fail due to missing G00 or G01
Set your CAM to output G01 for feed moves and/or straight lines.
Please Log in or Create an account to join the conversation.
- Wusel
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 8
29 Dec 2022 23:53 #260522
by Wusel
Replied by Wusel on topic how to start an .ngc file somewhere in the middle?
that is a very good point. It has to know the history of cource
When I write the code by hand I always use G0 and G1 but the cam system wants to be clever an skips them where not necessary. I'll check that out tomorrow right away
When I write the code by hand I always use G0 and G1 but the cam system wants to be clever an skips them where not necessary. I'll check that out tomorrow right away
Please Log in or Create an account to join the conversation.
- Wusel
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 8
30 Dec 2022 16:44 #260552
by Wusel
Replied by Wusel on topic how to start an .ngc file somewhere in the middle?
ok, so I tried that today and it works. Maybe I can ask my posprocessor to add the complete information in each line ie. G1.XYZ..., F...
Then I should be fine.
Thanks for looking into the file.
Another curious thing occured to me today. I ran a program with the G59.1 coordinate system set. After finishing the program LinuxCNC went back to G54. Sadly I noticed too late and after issuing a G0 Zxx command the end mitt went straight into the workpiece because in G54 the Z Height was set differently than in G59.1.
Would I had to expect this?
Then I should be fine.
Thanks for looking into the file.
Another curious thing occured to me today. I ran a program with the G59.1 coordinate system set. After finishing the program LinuxCNC went back to G54. Sadly I noticed too late and after issuing a G0 Zxx command the end mitt went straight into the workpiece because in G54 the Z Height was set differently than in G59.1.
Would I had to expect this?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
07 Jan 2023 21:45 #261205
by andypugh
It is a standard (not a good one, I don't think)
linuxcnc.org/docs/stable/html/gcode/m-code.html#mcode:m2-m30
Lists all the things that are reset by M2.
Replied by andypugh on topic how to start an .ngc file somewhere in the middle?
Yes. If you had read 100% of the documentation and remembered all of it.Would I had to expect this?
It is a standard (not a good one, I don't think)
linuxcnc.org/docs/stable/html/gcode/m-code.html#mcode:m2-m30
Lists all the things that are reset by M2.
Please Log in or Create an account to join the conversation.
- Wusel
- Offline
- Premium Member
Less
More
- Posts: 85
- Thank you received: 8
08 Jan 2023 08:17 #261243
by Wusel
Replied by Wusel on topic how to start an .ngc file somewhere in the middle?
ok, you're right. I guess I should start reading through the complete documentation (and remember it all)
Rainer
Rainer
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
09 Jan 2023 10:19 #261343
by andypugh
I am still working on it, so set a few years aside.
I think that if you wrap the code in % signs (which I think is a really old format of G-code from paper tape days) then it doesn't do the resets. But then you get trouble with subroutines as % terminators don't nest properly.
The normal advice is to make sure that your G-code always explicitly sets coordinate system, incremental modes etc for each file.
Replied by andypugh on topic how to start an .ngc file somewhere in the middle?
ok, you're right. I guess I should start reading through the complete documentation (and remember it all)
I am still working on it, so set a few years aside.
I think that if you wrap the code in % signs (which I think is a really old format of G-code from paper tape days) then it doesn't do the resets. But then you get trouble with subroutines as % terminators don't nest properly.
The normal advice is to make sure that your G-code always explicitly sets coordinate system, incremental modes etc for each file.
Please Log in or Create an account to join the conversation.
- mighty_mick
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 5
22 Sep 2023 13:08 #281370
by mighty_mick
Replied by mighty_mick on topic how to start an .ngc file somewhere in the middle?
I am struggling with this issue in these days. Here is my considerations.
First of all, i figured out that the machine is trying to measure all of available tools if m6 tool probe is enabled when you started from the middle of file. You are setting line number in linuxcnc via the gui. When you start it, according to logs, the interpreter is looking for T<n> commands in whole ngc file. Then it tries to measure all tools one by one.
While measuring the first tool, it jumps some g-code commands. The flow is like this, when software sees M654 T<n> command, it jumps to tool-probe.ngc subroutine identified by the path variables in configuration files. I am using this tool-probe.ngc file given in the link: forum.linuxcnc.org/10-advanced-configura...off?limit=6&start=38
While measuring the first tool, the machine makes some weird moves. Everything is ok until it reaches to the second command of G38.2.
> G38.2 Z[#<_ProbeRetract>*-1.25] F[#<_ProbeFeed2>] ( trip switch very slowly )
When it comes to execute this command, the program(this is my thought) is crashing or doing whatever, even it says retract Z from some point, it does not execute that commands after second G38.2 command, so it crashes the tool. Bu it works ok when it comes to second tool.
I didn't find a solution, but i am trying to find it. I am wondering, is there anyone faced with this issue like me? You guys are asking and trying to explain that 'how to start from middle of the file?' . I thought my problem may be a roadmap to your issues. I think this problem is Gcode related, i think tool-probe.ngc file is not working well but it may be wrong of course. I debugged the linuxcnc messages by giving DEBUG flag 0x7FFFFF in the .ini file. The result is nothing. According to logs, it is executing that commands also, but i am the one who is seeing the machine, i say it is not!
Thank you for your answers aldready, take care.
I opened a topic related to this issue, if you want tho check follow the link specified below.
forum.linuxcnc.org/38-general-linuxcnc-q...-measurement-problem
First of all, i figured out that the machine is trying to measure all of available tools if m6 tool probe is enabled when you started from the middle of file. You are setting line number in linuxcnc via the gui. When you start it, according to logs, the interpreter is looking for T<n> commands in whole ngc file. Then it tries to measure all tools one by one.
While measuring the first tool, it jumps some g-code commands. The flow is like this, when software sees M654 T<n> command, it jumps to tool-probe.ngc subroutine identified by the path variables in configuration files. I am using this tool-probe.ngc file given in the link: forum.linuxcnc.org/10-advanced-configura...off?limit=6&start=38
While measuring the first tool, the machine makes some weird moves. Everything is ok until it reaches to the second command of G38.2.
> G38.2 Z[#<_ProbeRetract>*-1.25] F[#<_ProbeFeed2>] ( trip switch very slowly )
When it comes to execute this command, the program(this is my thought) is crashing or doing whatever, even it says retract Z from some point, it does not execute that commands after second G38.2 command, so it crashes the tool. Bu it works ok when it comes to second tool.
I didn't find a solution, but i am trying to find it. I am wondering, is there anyone faced with this issue like me? You guys are asking and trying to explain that 'how to start from middle of the file?' . I thought my problem may be a roadmap to your issues. I think this problem is Gcode related, i think tool-probe.ngc file is not working well but it may be wrong of course. I debugged the linuxcnc messages by giving DEBUG flag 0x7FFFFF in the .ini file. The result is nothing. According to logs, it is executing that commands also, but i am the one who is seeing the machine, i say it is not!
Thank you for your answers aldready, take care.
I opened a topic related to this issue, if you want tho check follow the link specified below.
forum.linuxcnc.org/38-general-linuxcnc-q...-measurement-problem
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
23 Sep 2023 09:56 #281453
by andypugh
Replied by andypugh on topic how to start an .ngc file somewhere in the middle?
I assume that the tool measurement is running in a remap.
Does the routine alter its behaviour depending on the execution mode? It is possible for a routine to check a flag and alter the behaviour. Possibly this needs to be done here, or possibly the fact that this is configured to happen is the problem?
#<_task> - 1.0 if the executing interpreter instance is part of milltask, 0.0 otherwise. Sometimes it is necessary to treat this case specially to retain proper preview, for instance when testing the success of a probe (G38.n) by inspecting #5070, which will always fail in the preview interpreter (e.g. Axis).
linuxcnc.org/docs/stable/html/gcode/over...tml#gcode:parameters
Does the routine alter its behaviour depending on the execution mode? It is possible for a routine to check a flag and alter the behaviour. Possibly this needs to be done here, or possibly the fact that this is configured to happen is the problem?
#<_task> - 1.0 if the executing interpreter instance is part of milltask, 0.0 otherwise. Sometimes it is necessary to treat this case specially to retain proper preview, for instance when testing the success of a probe (G38.n) by inspecting #5070, which will always fail in the preview interpreter (e.g. Axis).
linuxcnc.org/docs/stable/html/gcode/over...tml#gcode:parameters
Please Log in or Create an account to join the conversation.
Time to create page: 0.078 seconds