QtVCP Cannot Connect Message Dialog Box Hal Pin
- tightmopedman9
- Offline
- Senior Member
-
Less
More
- Posts: 71
- Thank you received: 7
22 Sep 2025 02:06 #335260
by tightmopedman9
QtVCP Cannot Connect Message Dialog Box Hal Pin was created by tightmopedman9
Using QTDragon HD, I am trying to set up a message box for a probe error check routine. In my .ini I have:
MESSAGE_BOLDTEXT = Probe Error
MESSAGE_TEXT = No Response From Wireless Probe Try Jiggling
MESSAGE_DETAILS = None
MESSAGE_TYPE = okdialog status
MESSAGE_PINNAME = probe-error
MESSAGE_ICON = CRITICAL
In the postgui.hal file I have:
net probe-error-msg probe_error_mgr.show-message qtdragon.probe-error
LinuxCNC won't start due to the error:
HAL: ERROR: signal 'probe-error-msg' already has output pin
qtdragon_hd_postgui.hal:39: link failed
The signal 'probe-error-msg' is on only one line of the postgui HAL file. I've tried different types of dialog boxes, different pin names, netting to an OR2 and I've even tried making a HAL connection to the dialog box in a QTDragon sim config, pulled straight from master.
I feel like there's something obvious I'm missing, but I can't figure it out.
I attached my main hal, postgui hal and ini file. Warning - they're long and messy.
MESSAGE_BOLDTEXT = Probe Error
MESSAGE_TEXT = No Response From Wireless Probe Try Jiggling
MESSAGE_DETAILS = None
MESSAGE_TYPE = okdialog status
MESSAGE_PINNAME = probe-error
MESSAGE_ICON = CRITICAL
In the postgui.hal file I have:
net probe-error-msg probe_error_mgr.show-message qtdragon.probe-error
LinuxCNC won't start due to the error:
HAL: ERROR: signal 'probe-error-msg' already has output pin
qtdragon_hd_postgui.hal:39: link failed
The signal 'probe-error-msg' is on only one line of the postgui HAL file. I've tried different types of dialog boxes, different pin names, netting to an OR2 and I've even tried making a HAL connection to the dialog box in a QTDragon sim config, pulled straight from master.
I feel like there's something obvious I'm missing, but I can't figure it out.
I attached my main hal, postgui hal and ini file. Warning - they're long and messy.
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
-
Less
More
- Posts: 7969
- Thank you received: 2167
22 Sep 2025 11:09 - 22 Sep 2025 11:12 #335275
by cmorley
Replied by cmorley on topic QtVCP Cannot Connect Message Dialog Box Hal Pin
What can you tell me about this program?
# --- Load the userspace for probe error manager ---
loadusr -Wn probe_error_mgr python3 probe_error_mgr.py
# --- Load the userspace for probe error manager ---
loadusr -Wn probe_error_mgr python3 probe_error_mgr.py
Last edit: 22 Sep 2025 11:12 by cmorley.
Please Log in or Create an account to join the conversation.
- tightmopedman9
- Offline
- Senior Member
-
Less
More
- Posts: 71
- Thank you received: 7
22 Sep 2025 22:29 - 22 Sep 2025 22:30 #335308
by tightmopedman9
Replied by tightmopedman9 on topic QtVCP Cannot Connect Message Dialog Box Hal Pin
It's a program that's intended to pause machine motion (halui.program.pause) anytime the wireless probe controller detects an error (hm2_5i25.0.7i84.0.2.input-24 == 1).
It creates a few HAL pins, one of them being: c.newpin("show-message",hal.HAL_BIT, hal.HAL_OUT) # -> qtdragon.probe-error
I added code to the probe_routines.py file which will set motion.digital-out-02 anytime the probe is in motion (through the MDI command 'M65 P02').
I've been working on the best way to implement error handling while a wireless probe is in motion. I initially tried setting HAL pins directly by patching the probe_routines.py file, but I couldn't get that to work. I then tried tying the same QTDragon dialog to motion.digital-out-00 and then sending a 'G64 P00' in the probe_routines.py before any probe movement. This didn't work as well - I got the same 'HAL: ERROR: signal 'probe-error-msg' already has output pin'. Also, since 'ACTION.CALL_MDI' pauses the UI, I don't think that this method would have worked anyways.
Currently, I have rudimentary error handling implemented by checking a digital input tied to the probe error output before the start of any probe motion (all within probe_routines.py). The subroutine will wait up to 5 seconds for the error to be handled, and will abort if there is no resolution. I tried adding a user interaction dialog box into this routine but I wasn't ever able to display a message to the user while the routine was active. Another issue with this approach is that the subroutine won't halt motion if the probe errors out after a MDI command has been sent, but before the probe has finished its motion.
The idea behind the newest implementation is that anytime the probe is in motion and an error is detected, machine motion will be paused, the user will be prompted for intervention and upon clearing the fault, the routine will resume.
Until fairly recently, I was using probe basic with .ngc files for all the subroutines. I updated and switch to QTDragon, at which point I tried (unsuccessfully) moving over my probe error handling to the python based probe routines.
If there is a different implementation you could think of, I'd love to hear it. I haven't been able to find a solution that's already been implemented.
It creates a few HAL pins, one of them being: c.newpin("show-message",hal.HAL_BIT, hal.HAL_OUT) # -> qtdragon.probe-error
I added code to the probe_routines.py file which will set motion.digital-out-02 anytime the probe is in motion (through the MDI command 'M65 P02').
I've been working on the best way to implement error handling while a wireless probe is in motion. I initially tried setting HAL pins directly by patching the probe_routines.py file, but I couldn't get that to work. I then tried tying the same QTDragon dialog to motion.digital-out-00 and then sending a 'G64 P00' in the probe_routines.py before any probe movement. This didn't work as well - I got the same 'HAL: ERROR: signal 'probe-error-msg' already has output pin'. Also, since 'ACTION.CALL_MDI' pauses the UI, I don't think that this method would have worked anyways.
Currently, I have rudimentary error handling implemented by checking a digital input tied to the probe error output before the start of any probe motion (all within probe_routines.py). The subroutine will wait up to 5 seconds for the error to be handled, and will abort if there is no resolution. I tried adding a user interaction dialog box into this routine but I wasn't ever able to display a message to the user while the routine was active. Another issue with this approach is that the subroutine won't halt motion if the probe errors out after a MDI command has been sent, but before the probe has finished its motion.
The idea behind the newest implementation is that anytime the probe is in motion and an error is detected, machine motion will be paused, the user will be prompted for intervention and upon clearing the fault, the routine will resume.
Until fairly recently, I was using probe basic with .ngc files for all the subroutines. I updated and switch to QTDragon, at which point I tried (unsuccessfully) moving over my probe error handling to the python based probe routines.
If there is a different implementation you could think of, I'd love to hear it. I haven't been able to find a solution that's already been implemented.
Last edit: 22 Sep 2025 22:30 by tightmopedman9.
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
-
Less
More
- Posts: 7969
- Thank you received: 2167
23 Sep 2025 11:18 #335318
by cmorley
Replied by cmorley on topic QtVCP Cannot Connect Message Dialog Box Hal Pin
qtdragon.probe-error pin is an I/O pin not an input pin.
I'll have to think more on the best way to add external error checking/handling.
It's a problem spot for linuxcnc.
I'll have to think more on the best way to add external error checking/handling.
It's a problem spot for linuxcnc.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.168 seconds