Patch for Combination M61 + G4 #2489

More
2 years 9 months ago #289830 by zz912
Hello,

again I will try to make a patch for github.com/LinuxCNC/linuxcnc/issues/2489

I don't want to make another mess on github so I opened a thread here.

I would like to ask if someone would show me how the STOP button control works. The button is circled in red in the following image.
 

Attachment not found



I realized that all I need to solve the "M61 + G4" bug is to run AUTOMATIC G43 LINES when this STOP button is deactivated.
 

Please Log in to join the conversation.

More
2 years 9 months ago #289902 by zz912

Please Log in to join the conversation.

More
2 years 9 months ago #289929 by cmorley
pressing stop is calling abort. You can set up an on_abort_command script to call gcode.
Would this help you?
linuxcnc.org/docs/stable/html/config/ini...sub:ini:sec:rs274ngc
(right at the end)

Please Log in to join the conversation.

More
2 years 9 months ago #289933 by zz912
I made patch. It is working version. I worked on it to 3:00. I will rewrite it and show it. I will tested it.

I have already written many times that I solved it and in the end it didn't work. So maybe it will work out now. Thanks Chriss for the discussion with me.

Please Log in to join the conversation.

More
2 years 9 months ago #290059 by zz912
Hello,

I'm currently trying to understand what this piece of code is for:
Code:
    def _update_toolinfo(self, tool): ............................         if self.load_tool:             self.load_tool = False             self.on_hal_status_interp_idle(None)             return ............................
github.com/LinuxCNC/linuxcnc/blob/a49f53...ccapy.py#L3531-L3534

I don't like that the on_hal_status_interp_idle function is called when the LCNC is definitely not in IDLE. It may not cause any error now, but it is dangerous if someone then adds something to the on_hal_status_interp_idle function that must be implemented in IDLE. I would like to make a suggestion to fix this, but I need to know why the on_hal_status_interp_idle function is called.

Do you think this could be considered a mistake?

Please Log in to join the conversation.

More
2 years 9 months ago #290064 by cmorley
is _update_toolinfo() only called when linuxcnc is idle?
Hard to see whats going on here without digging in the code - comments in the code would help.

Please Log in to join the conversation.

More
2 years 9 months ago #290070 by zz912

is _update_toolinfo() only called when linuxcnc is idle?
 

No.

_update_toolinfo() is called here:
github.com/LinuxCNC/linuxcnc/blob/a49f53...py/gmoccapy.py#L2635

on_hal_status_tool_in_spindle_changed() can be called at any time. This function is called especially when the LCNC is not IDLE.
 

Please Log in to join the conversation.

More
2 years 9 months ago #290238 by zz912
Hello,

I made:
github.com/LinuxCNC/linuxcnc/pull/2841
I would like to ask you to test this patch to see if it created any more bugs.

Zdeněk

Please Log in to join the conversation.

Time to create page: 0.093 seconds
Powered by Kunena Forum