QTdragon HD with MDI issue

More
3 years 5 days ago #283826 by whatawhiz
Hello everyone, 

A few days ago, while repeatedly using the same gcode program, I forgot to turn off the auto probe, resulting in a hole in my vise. Then I decided to switch probe to basic probe. And I update linuxcnc from version 2.9 to 2.10. To avoid compatibility issues, I reinstalled debian12, retaining only some core configuration files. I just dropped all other files, including the tool table and var files. 


After the update, I encountered a problem. In the qtdragon-hd interface, I can only use the mdi command smoothly the first time I open the qtdragon-hd interface after starting the computer. This includes buttons that might call the mdi command, such as the "go to sensor" and "tool sensor" buttons. After closing and reopening the qtdragon-hd interface, a prompt saying "Hard Limits Are Reset To Active!" appears, and then all my mdi commands become ineffective. I tried opening qtdragon-hd with the sim configuration afterward, but the situation was the same. I also tried using the Axis interface, but it didn't have this issue.


 I wonder if anyone else has encountered the same problem. I'd like to know if there are better solutions. My current solution is to restart the computer every time I close linuxcnc. My log and status files are below.


Status output
Warning: Spoiler!



log output
Warning: Spoiler!

Please Log in to join the conversation.

More
3 years 5 days ago #283844 by cmorley
Replied by cmorley on topic QTdragon HD with MDI issue
Some things were changed in master that seems to make qtdragon susceptible to race conditions on startup. Some discussion:
github.com/LinuxCNC/linuxcnc/issues/2700
and here:
forum.linuxcnc.org/qtvcp/44747-error-in-...setview-py?start=220

Can you run linuxcnc from a terminal and post the output (when it has failed) ?

Please Log in to join the conversation.

More
3 years 4 days ago #283855 by whatawhiz
Thank you for your reply, cmorley.

 I used the following command to output some logs. Since I used vfdmod, the output information can be a bit messy. So I took the output information of the sim configuration with the same problem as a reference. And there's a log from the first run when there was no problem.

Code:
linuxcnc 2> error.txt | tee output.txt

I always follow the steps below:

1. Start LinuxCNC.

2. Wait for the DRO to finish loading.

3. Turn on the machine and then home all.

4. Click the "go to sensor" button and wait for the results.

5. Turn off the machine and then close the interface.

I almost forgot that there was such an error in the output file, but it doesn't seem to have much impact.

Code:
USRMOT: ERROR: command 30 timeout emcMotionInit: emcTrajInit failed

Attachment not found

Attachment not found

Attachment not found

Attachment not found

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
3 years 4 days ago #283873 by MarkoPolo
Could you try editing the handler  file?
In the qtdragon_hd_handler.py file, usually located in /usr/share/qtvcp/screens/qtdragon_hd/. Add "time.sleep(2)" entry,
just like in the screenshot.
 

Attachment not found



Another error I see is in the /usr/lib/python3/dist-packages/qtvcp/lib/notify.py file. I don't know if other gui's also use the notify.py file. In qtragon_hd the status bar is now the same as in qtdragon, it is of the "QLineEdit" type, therefore showMessage causes an error. After modifying the line as in the screenshot, it works properly.
 

Attachment not found


Chris, can you verify this?
 

Please Log in to join the conversation.

More
3 years 4 days ago #283887 by whatawhiz
Oh, it seems adding this delay code really works.
I have tried several times and there were no more errors reported.

Please Log in to join the conversation.

More
3 years 3 days ago #283916 by snowgoer540

Could you try editing the handler  file?
In the qtdragon_hd_handler.py file, usually located in /usr/share/qtvcp/screens/qtdragon_hd/. Add "time.sleep(2)" entry,
just like in the screenshot.
 

Attachment not found



Another error I see is in the /usr/lib/python3/dist-packages/qtvcp/lib/notify.py file. I don't know if other gui's also use the notify.py file. In qtragon_hd the status bar is now the same as in qtdragon, it is of the "QLineEdit" type, therefore showMessage causes an error. After modifying the line as in the screenshot, it works properly.
 

Attachment not found


Chris, can you verify this?

 

FWIW, QtPlasmaC uses the statusbar. I can check later to see if your changes affect us, and what we would need to change if it does.

Please Log in to join the conversation.

More
3 years 3 days ago #283918 by cmorley
Replied by cmorley on topic QTdragon HD with MDI issue
I thought of this:

Code:
    def show_status(self, message, timeout=4):         if self.statusbar is not None:             try:                 messageid = self.statusbar.showMessage(message, timeout * 1000)             except:                 try:                     messageid = self.statusbar.setText(message)                 except Exception as e:                     log.verbose('Error adding msg to  statusbar:', exc_info=e)  

Please Log in to join the conversation.

More
3 years 3 days ago #283919 by snowgoer540
Code:
USRMOT: ERROR: command 30 timeout emcMotionInit: emcTrajInit failed

I'm told this is benign. It’s all part of the aforementioned code changes and will likely get sorted out in the not so distant future (hopefully).

Just ignore it for now.

Please Log in to join the conversation.

More
3 years 7 hours ago #284154 by snowgoer540
I just pushed a commit that should take care of this race condition. Feel free to remove the sleeps you've added to the handler, etc. and give it a try. Let me know if you see any issues.

Please Log in to join the conversation.

More
2 years 5 months ago #300295 by vre
Replied by vre on topic QTdragon HD with MDI issue
I have master with this error
Code:
Found file(REL): ./custom.hal Found file(REL): ./hy_vfd.hal USRMOT: ERROR: command 30 timeout emcMotionInit: emcTrajInit failed starttimer [QTvcp.QTDRAGON_HD_HANDLER][WARNING] qtdragon.eoffset-is-active not connected (qtdragon_hd_handler.py:570) [QTvcp.QTDRAGON_HD_HANDLER][WARNING] qtdragon.eoffset-clear not connected (qtdragon_hd_handler.py:570) [QTvcp.QTDRAGON_HD_HANDLER][WARNING] qtdragon.eoffset-spindle-count not connected (qtdragon_hd_handler.py:570) [QTvcp.QTDRAGON_HD_HANDLER][WARNING] qtdragon.eoffset-value not connected (qtdragon_hd_handler.py:570) No lower reesume eoffset state False /bin/sh: 1: gnome-session-quit: not found Shutting down and cleaning up LinuxCNC... Running HAL shutdown script

Please Log in to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum