LCNC 2.10 - Ask for AUTOMATIC_G43

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
12 Jan 2025 15:16 - 14 Jan 2025 12:18 #318781 by zz912
Hello Chriss,

History:

Gmoccapy had an integrated functionality. If a tool was changed, the tool correction was automatically turned on.
github.com/LinuxCNC/linuxcnc/blob/e586c3...ccapy.py#L3537-L3541
I named this functionality AUTOMATIC_G43.

The idea of ​​this functionality is great. Unfortunately, this functionality was implemented in the Gmoccapy GUI. This caused race conditions in certain LCNC configurations and on certain hardware. Norbert had a problem simulating these bugs at all.

After long discussions, Norbert agreed to remove AUTOMATIC_G43 from his Gmoccapy GUI. However, he had a condition that this functionality be preserved at least using REMAP.
github.com/LinuxCNC/linuxcnc/pull/3113/f...d37cd778756e98de8fff
And in the configuration files for Gmoccapy, this Remap should be added.

My wish:

I added this remap to the configurations, but a lot of configurations are done using PNCconf. I wish the configurations from PNCconf included for Gmoccapy:

added in INI file:
# Task controller section -----------------------------------------------------
[RS274NGC]
...............
SUBROUTINE_PATH = ./macros
REMAP=M6  modalgroup=6 prolog=change_prolog ngc=change_g43 epilog=change_epilog
REMAP=M61  modalgroup=6 prolog=settool_prolog ngc=settool_g43 epilog=settool_epilog

# the Python plugins serves interpreter and task
[PYTHON]
PATH_PREPEND = ./python
TOPLEVEL = ./python/toplevel.py
LOG_LEVEL = 0
+ Python and Macro file:
 

File Attachment:

File Name: macros_2025-01-12.zip
File Size:1 KB

 

File Attachment:

File Name: python_202...1-12.zip
File Size:10 KB


I think it will be very dangerous when Gmoccapy users switch from version 2.9 to 2.10. If they change the tool and the tool correction does not change as they were used to, it can cause physical crashes of the machines. That is why I would like PNCconf to retain this functionality in version 2.10 using REMAP.

As an advantage of this PNCconf modification, I see that users will have a template for creating Remaps. It is difficult for a beginner to understand what toplevel.py, stdglue.py, remap.py are for. This way they would only modify change_g43.ngc and/or settool_g43.ngc.

I don't know how to approach this:
1) make the above changes only for Gmoccapy
or
2) make the AUTOMATIC_G43 functionality in PNCconf for all GUIs. Gmoccapy should have this functionality enabled by default.

Fortunately, we have enough time, because this will be needed only for LCNC 2.10

Zdeněk
Attachments:
Last edit: 14 Jan 2025 12:18 by zz912.

Please Log in or Create an account to join the conversation.

More
13 Jan 2025 10:17 - 13 Jan 2025 10:18 #318860 by Aciera
Replied by Aciera on topic LCNC 2.10 - Ask for AUTOMATIC_G43
I think a pop up window with a warning message on startup in gmoccapy 2.10 might be more helpful as there are going to be a number of users updating from previous versions to 2.10.
Last edit: 13 Jan 2025 10:18 by Aciera.

Please Log in or Create an account to join the conversation.

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
13 Jan 2025 10:26 #318861 by zz912
Replied by zz912 on topic LCNC 2.10 - Ask for AUTOMATIC_G43

I think a pop up window with a warning message on startup in gmoccapy 2.10 might be more helpful as there are going to be a number of users updating from previous versions to 2.10.
 

I adsolutely agree, but I dont know how make it.

Please Log in or Create an account to join the conversation.

More
13 Jan 2025 14:24 #318865 by Aciera
Replied by Aciera on topic LCNC 2.10 - Ask for AUTOMATIC_G43
Maybe something like this:

1. Insert this  at the end of the '__init__(self, argv)' method in 'gmoccapy' (ie after line 516):
        startup_message = self.get_ini_info.get_startup_message()
        if startup_message == None:
            message = "Important change for version 2.10:\n\n Gmoccapy does no longer automatically retain G43 after a toolchange!"
            self.dialogs.warning_dialog(self, _(message),
                  "\n\n\n To remove this warning add the following line to the [DISPLAY] section of your ini file:\n\n STARTUP_MESSAGE = None ")
        elif startup_message.lower() != 'none':
            print('startup_message = ',startup_message)
            self.dialogs.warning_dialog(self, _(startup_message),' ')

2. Insert this a the end of 'lib/python/gmoccapy/getiniinfo.py':
    def get_startup_message(self):
        message = self.inifile.find("DISPLAY", "STARTUP_MESSAGE")
        if message:
            return message
        else:
            return None

Looks like this:
 
Attachments:

Please Log in or Create an account to join the conversation.

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
13 Jan 2025 14:56 - 13 Jan 2025 14:57 #318866 by zz912
Replied by zz912 on topic LCNC 2.10 - Ask for AUTOMATIC_G43
@HansU - what do you think?

I think, it would be better to turn off the message in the SETUP tab in Gmoccapy, rather than in the INI file.
Or just in the Gmoccapy configuration file.
Hans was just tidying up the parameters in the INI file and therefore he wouldn't like it.

I would also add to the text that reactivating "AUTOMATIC G43" is possible using REMAP. An example can be found in any SIM Gmoccapy configuration.

Version for LCNC 2.10 will be Gmoccapy 3.5.0
Last edit: 13 Jan 2025 14:57 by zz912.

Please Log in or Create an account to join the conversation.

More
13 Jan 2025 15:19 - 13 Jan 2025 15:22 #318868 by Aciera
Replied by Aciera on topic LCNC 2.10 - Ask for AUTOMATIC_G43
The idea was that the user can also define a custom startup message like this:
[DISPLAY]
STARTUP_MESSAGE = My message is ... !

So instead of creating all this code just to alert users to a version change it could actually be used for other things.

Changing the wording of the message is trivial.

Should I move this thread over to the Gmoccapy section?
Last edit: 13 Jan 2025 15:22 by Aciera.

Please Log in or Create an account to join the conversation.

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
13 Jan 2025 16:57 #318875 by zz912
Replied by zz912 on topic LCNC 2.10 - Ask for AUTOMATIC_G43
"Should I move this thread over to the Gmoccapy section?"

Yes

Please Log in or Create an account to join the conversation.

More
14 Jan 2025 10:32 #318936 by JT
Replied by JT on topic LCNC 2.10 - Ask for AUTOMATIC_G43
I added a popup message warning users about the issue with a link to this thread so they can choose to add it or not

JT
The following user(s) said Thank You: zz912

Please Log in or Create an account to join the conversation.

More
14 Jan 2025 14:58 #318948 by newbynobi
Replied by newbynobi on topic LCNC 2.10 - Ask for AUTOMATIC_G43
This kind of message after an update has never been used before. IMHO it should go into the update script not in the GUI code!
And do we want user to edit a text file like in old DOS times? The popup needs a checkbox with "do not show again" and after clicking the message ist gone for ever.

Norbert

Please Log in or Create an account to join the conversation.

  • zz912
  • zz912's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
14 Jan 2025 15:42 #318953 by zz912
Replied by zz912 on topic LCNC 2.10 - Ask for AUTOMATIC_G43
Does this update script exist? What does it do and how does it work?

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.109 seconds
Powered by Kunena Forum