- Posts: 596
- Thank you received: 0
How to remove automatic g54 after M2/M30 ?
5 months 3 hours ago #346795
by zz912
How to remove automatic g54 after M2/M30 ? was created by zz912
M2 and M30 commands have the following effects:
In LCNC 2.7 it fortunately did not work.
In LCNC 2.9 it UNfortunately works.
My friends used LCNC 2.7. They used G54 for vise number 1 G55 for vise number 2 and so on. They dont use G5X in ngc files. They have many many ngc files. They were happy.
They started use Mesa cards 7i96s so they had to upgrade to LCNC 2.9. But in LCNC 2.9 automatic Ǵ54 UNfortunately works again. It is very dangerous for them. They works on vise number 2 with active G55, but after program end G54 is activated.
I need help. Where is "automatic Ǵ54 after M2/M30" in source code? I want delete it for us using.
- Origin offsets are set to the default (like G54).
In LCNC 2.7 it fortunately did not work.
In LCNC 2.9 it UNfortunately works.
My friends used LCNC 2.7. They used G54 for vise number 1 G55 for vise number 2 and so on. They dont use G5X in ngc files. They have many many ngc files. They were happy.
They started use Mesa cards 7i96s so they had to upgrade to LCNC 2.9. But in LCNC 2.9 automatic Ǵ54 UNfortunately works again. It is very dangerous for them. They works on vise number 2 with active G55, but after program end G54 is activated.
I need help. Where is "automatic Ǵ54 after M2/M30" in source code? I want delete it for us using.
Please Log in to join the conversation.
5 months 1 hour ago #346797
by rodw
Replied by rodw on topic How to remove automatic g54 after M2/M30 ?
Seems this G54 reset occurs in Interp::convert_stop()
in interp_convert.cc
github.com/LinuxCNC/linuxcnc/blob/master...erp_convert.cc#L5052
edit at your own risk
Note this is where Gcode is converted to blocks that are stored in a circular buffer and subsequently executed by motion.
in interp_convert.cc
github.com/LinuxCNC/linuxcnc/blob/master...erp_convert.cc#L5052
edit at your own risk
Note this is where Gcode is converted to blocks that are stored in a circular buffer and subsequently executed by motion.
Please Log in to join the conversation.
5 months 1 hour ago #346798
by rodw
Replied by rodw on topic How to remove automatic g54 after M2/M30 ?
Pretty sure you would just comment out these two lines
github.com/LinuxCNC/linuxcnc/blob/master...erp_convert.cc#L5177
// settings->origin_index = 1;
// settings->parameters[5220] = 1.0;
1 = G54 so this is where the reset is happening
parameters like 5220 are described here linuxcnc.org/docs/html/gcode/overview.ht...:numbered-parameters
github.com/LinuxCNC/linuxcnc/blob/master...erp_convert.cc#L5177
// settings->origin_index = 1;
// settings->parameters[5220] = 1.0;
1 = G54 so this is where the reset is happening
parameters like 5220 are described here linuxcnc.org/docs/html/gcode/overview.ht...:numbered-parameters
Please Log in to join the conversation.
5 months 21 minutes ago #346799
by rodw
Replied by rodw on topic How to remove automatic g54 after M2/M30 ?
Actually, A neat way of dealing with this could be adding a new parameter (5391?) and modify the code so that if it was set to true, the original 2.7 buggy behaivour was restored eg
if settings->parameters[5391] == 0.0{
settings->origin_index = 1;
settings->parameters[5220] = 1.0;
}
Be worth playing with that.
if settings->parameters[5391] == 0.0{
settings->origin_index = 1;
settings->parameters[5220] = 1.0;
}
Be worth playing with that.
Please Log in to join the conversation.
4 months 4 weeks ago #346801
by zz912
Replied by zz912 on topic How to remove automatic g54 after M2/M30 ?
Thank you for help.
I preffer:
Default value AUTOMATIC_G54 = TRUE
I preffer:
Code:
if (INI configuration "AUTOMATIC_G54") == TRUE
{ settings->origin_index = 1;
settings->parameters[5220] = 1.0; }
Default value AUTOMATIC_G54 = TRUE
Please Log in to join the conversation.
4 months 4 weeks ago #346807
by Aciera
Replied by Aciera on topic How to remove automatic g54 after M2/M30 ?
+1
I have wished for a possibility to op-out of this automatic resetting to G54 on M2/M30 several times in the past.
I have wished for a possibility to op-out of this automatic resetting to G54 on M2/M30 several times in the past.
Please Log in to join the conversation.
4 months 4 weeks ago #346809
by Aciera
Replied by Aciera on topic How to remove automatic g54 after M2/M30 ?
Have a look at this PR:
github.com/LinuxCNC/linuxcnc/pull/4093
github.com/LinuxCNC/linuxcnc/pull/4093
Please Log in to join the conversation.
4 months 4 weeks ago #346813
by zz912
Replied by zz912 on topic How to remove automatic g54 after M2/M30 ?
I would like ask you for add this information in manual for M2 and M30 definition.
linuxcnc.org/docs/devel/html/gcode/m-code.html#mcode:m2-m30
How M99 works? What M99 do? I didnt find definition.
linuxcnc.org/docs/devel/html/gcode/m-code.html#mcode:m2-m30
How M99 works? What M99 do? I didnt find definition.
Please Log in to join the conversation.
4 months 4 weeks ago #346816
by Aciera
Replied by Aciera on topic How to remove automatic g54 after M2/M30 ?
see updated link above, also note changed usage as I wanted to follow the 'disable_g92_persistence' setting.
for M99 see (I have never used it myself):
linuxcnc.org/docs/scratch/html/gcode/o-c...fanuc-style-programs
for M99 see (I have never used it myself):
linuxcnc.org/docs/scratch/html/gcode/o-c...fanuc-style-programs
Please Log in to join the conversation.
4 months 4 weeks ago #346817
by zz912
Replied by zz912 on topic How to remove automatic g54 after M2/M30 ?
M99 is not working in Gmoccapy.
I tested it in master branch and in feature_g54_on_program_stop branch.
It doesnt work in both branch.
It works in Axis GUI.
M99 link is not working too:
Attachment not found
I tested it in master branch and in feature_g54_on_program_stop branch.
It doesnt work in both branch.
It works in Axis GUI.
M99 link is not working too:
Attachment not found
Please Log in to join the conversation.
Time to create page: 0.079 seconds
