QTdragon HD with MDI issue

More
25 Oct 2023 19:56 - 25 Oct 2023 20:03 #283826 by whatawhiz
QTdragon HD with MDI issue was created 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!
Attachments:
Last edit: 25 Oct 2023 20:03 by whatawhiz. Reason: reformat

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

More
26 Oct 2023 06:08 #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) ?
The following user(s) said Thank You: whatawhiz

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

More
26 Oct 2023 10:32 - 26 Oct 2023 11:51 #283855 by whatawhiz
Replied by whatawhiz on topic QTdragon HD with MDI issue
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.

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.

USRMOT: ERROR: command 30 timeout
emcMotionInit: emcTrajInit failed

File Attachment:

File Name: error.txt
File Size:13 KB

File Attachment:

File Name: errorsim.txt
File Size:14 KB

File Attachment:

File Name: errorfirst.txt
File Size:11 KB

File Attachment:

File Name: outputsim.txt
File Size:1 KB

File Attachment:

File Name: outputfirst.txt
File Size:148 KB

File Attachment:

File Name: output.txt
File Size:210 KB
Attachments:
Last edit: 26 Oct 2023 11:51 by whatawhiz.

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

More
26 Oct 2023 16:31 - 26 Oct 2023 16:36 #283873 by MarkoPolo
Replied by MarkoPolo on topic QTdragon HD with MDI issue
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.
 

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.
 
Chris, can you verify this?
 
Attachments:
Last edit: 26 Oct 2023 16:36 by MarkoPolo.
The following user(s) said Thank You: whatawhiz

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

More
27 Oct 2023 04:12 #283887 by whatawhiz
Replied by whatawhiz on topic QTdragon HD with MDI issue
Oh, it seems adding this delay code really works.
I have tried several times and there were no more errors reported.
The following user(s) said Thank You: MarkoPolo

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

More
27 Oct 2023 20:58 #283916 by snowgoer540
Replied by snowgoer540 on topic QTdragon HD with MDI issue

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.
 

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.
 
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 or Create an account to join the conversation.

More
27 Oct 2023 21:00 - 27 Oct 2023 21:01 #283918 by cmorley
Replied by cmorley on topic QTdragon HD with MDI issue
I thought of this:

    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)




 
Last edit: 27 Oct 2023 21:01 by cmorley.

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

More
27 Oct 2023 21:01 #283919 by snowgoer540
Replied by snowgoer540 on topic QTdragon HD with MDI issue
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.
The following user(s) said Thank You: whatawhiz

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

More
31 Oct 2023 01:47 #284154 by snowgoer540
Replied by snowgoer540 on topic QTdragon HD with MDI issue
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.
The following user(s) said Thank You: whatawhiz

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

More
10 May 2024 06:07 #300295 by vre
Replied by vre on topic QTdragon HD with MDI issue
I have master with this error
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 or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.127 seconds
Powered by Kunena Forum