-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gmoccapy - new HAL pin disable_automatic_G43 #2571
Conversation
Make a new HAL pin to disable automatic run command "G43" after toolchange.
Is gmoccapy doing something that can also be done in the INI file? |
I dont know if Gmoccapy duplicate funkcionality of RETAIN_G43. |
I did not know the retain G43 INI entry, seems to be quiet new Gmoccapy reloads the tool. On start up with g43 Disabling the reload tool on start is not a good idea, getting rid of the G43 might be worse to try. Need to think about that, hope to come together with others in September Norbert |
By the way Gmoccapy only applies an G43 if it has been active before the change Norbert |
It was controlled by the FEATURES bitmap in 2.7 and became an INI entry in 2.8 |
@zz912 In the manual I think I did advice, that using halui and is not reccommended(otherwise I should add that) Please allow me an other question: Why you need to use M61 Q2 command through Halui Commands? Just to simulate or a real application? I have integrated about 10 ATC through remap and Hal and did not need to use such commands. If G43 part is not applied by gmoccapy, the message does not appear, right? I do ask myself, if we disable that part in gmoccapy, wouldn't it be dangerous for any user after an update? I just do not look at G43 as I do know my very beautiful and reliable GUI does care for that. Would it be a solution also to disable the part by an entry in the settings page? I would like to understand, what commands and why you need to use on your real machine, as IMHO a VM do react different as a normal machine. The friendly Norbert |
The checkbox doesn't help me at all:
In the past I have asked what the "automatic command G43" is actually needed for. If we knew the exact functionality of "automatic command G43", maybe "automatic command G43" could be removed from on_hal_status_tool_in_spindle_changed . That would solve everything. If "automatic command G43" were only needed for these buttons:
I am lucky man. I have everything special. :-) I have a carousel tool change machine. I need to have two physical buttons on it:
It is true. Unfortunately, the situation is complicated. While researching this bug I found another bug:
I didn't find it there. I don't think it should be banned to use HALUI. We only know of one bug so far. On the previous machine I use HALUI to switch modes and it works without problems.
OK
|
I tested HAL pin disable_automatic_G43 with issue #2489. |
@andypugh Norbert |
@zz912 This is only to understand the behavior of your ATC as understanding helps to solve ;-) Norbert |
@gmoccapy The first method is manual. This method is also important for servicing and changing the tool in the carousel magazine.
The second method is automatic |
stuttgart meeting agrees the behavior of gcode should not depend on a HAL pin. |
I agree that this solution is not ideal. But at the time I solved it, this solution was the best I could come up with. Currently, I prefer to fix the RETAIN_G43 option in the INI file and delete this G-code, which I turned off with HAL Pin, from gmoccapy.py completely. What was the conclusion of the Studgart meeting? |
Hello,
It is said that a bad programmer, when he cannot solve a problem, creates a parameter that the user must set. The bad programmer also declares it as an advantage that the user can set many things himself.
I didn't want to use this solution because it is not automatic.
One of the causes of this bug:
#2453
That will run this command:
linuxcnc/src/emc/usr_intf/gmoccapy/gmoccapy.py
Lines 3540 to 3544 in 56883b9
after tool change.
The bug #2453 could be solved by having command.wait_complete() wait for mdi-commands by HALUI to complete. It would be fantastic because it would be automatic. The user would not have to worry about anything. Unfortunately, I was unable to create such a fix.
However, yesterday I realized that there may be more situations where it is necessary to prevent race conditions. For example, if I write my own python module. Therefore, I am deliberately not calling this Pull Request FIX 2453.
This Pull Request can be used for FIX 2453, but I would like bug 2453 to be solved more elegantly in the future and the automatic command G43 to be turned off automatically.
If this Pull Request is approved, it would be necessary to modify the manual:
http://linuxcnc.org/docs/2.9/html/gui/gmoccapy.html#_tool_related_pins
disable_automatic_G43(bit IN) - disable automatic run command "G43" after toolchange
Automatic run command "G43" can cause run condition. So writing a program makes you responsible to disable automatic run command "G43" so that a race condition does not occur.
http://linuxcnc.org/docs/2.9/html/gui/gmoccapy.html#_known_problems

12.3 Warning "Must be in MDI mode....." after tool change
Gmoccapy will run the after tool change MDI command G43. This function is very useful, unfortunately it can cause a problem in certain cases when a race condition occurs and this message is raised:
Be careful, this bug is random. Just because it didn't show up right away doesn't mean it won't show up later. This can be caused by using:
For example in INI file is:
(If you are in MDI mode the bug will not appear.)
2. Your own program
For example:
Sometimes the automatic run command "G43" will win and then self.command.mode(MODE_MANUAL) will run. In this case, nothing happens.
Sometimes self.command.mode(MODE_MANUAL) wins and then an error occurs when trying to run G43.
I would like ask for requested a review from gmoccapy