Display message in dialog box on gpio

More
20 Jan 2022 14:37 #232526 by ikkuh
Hi,

I would like to display a message when the sensor on my water cooling pump is not working.
The sensor functions and is tied to a io pin, that part already works and makes it impossible to put the machine in an 'on' state when the pump is malfunctioning. And if the pin goes low when the machine state is on then the machine state is switched to 'off'.

What I would like is a message popping up when the waterpump is stopped and the operator tries to switch the machine to an 'on' state.
How do I do that?

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

More
20 Jan 2022 14:43 #232528 by tommylight
The following user(s) said Thank You: ikkuh

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

More
20 Jan 2022 14:45 #232530 by ikkuh

This should do:
linuxcnc.org/docs/2.8/html/man/man9/message.9.html
 

oops my fault, should have searched better.
Thanks!

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

More
20 Jan 2022 21:48 #232555 by cmorley
Qtvcp version:
linuxcnc.org/docs/devel/html/gui/qtvcp_libraries.html#_messages

If you need a version that can't be cleared by the user - we could add that.
The following user(s) said Thank You: ikkuh

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

More
21 Jan 2022 08:35 #232607 by ikkuh


If you need a version that can't be cleared by the user - we could add that.
 

Wow, that would be great. A blocking dialog box so that the operator is forced to take action, would love to have that in qtDragon!
Great idea.

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

More
23 Jan 2022 00:32 #232846 by cmorley
ok pushed work for this to master.
This will produce a button-less dialog then appears and disappears by a HAL bit pin.

MESSAGE_BOLDTEXT = Critical and Persistent
MESSAGE_TEXT = This is a persistent dialog test
MESSAGE_DETAILS = There seems to be something wrong You must fix it to clear message
MESSAGE_TYPE = nonedialog
MESSAGE_PINNAME = nonedialogtest
MESSAGE_ICON = CRITICAL

and qt styles work on them.

It was a very large change so hopefully didn't break anything.
I haven't updated the docs yet
The following user(s) said Thank You: ikkuh

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

More
23 Jan 2022 11:30 #232871 by ikkuh

ok pushed work for this to master.
This will produce a button-less dialog then appears and disappears by a HAL bit pin.

 

Wow, thank you! Will try this this afternoon. Will  let you know my experiences.
Thanks!

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

More
23 Jan 2022 16:15 #232887 by ikkuh

It was a very large change so hopefully didn't break anything.
I haven't updated the docs yet
 

Sorry, can not get it to work. The regular message system does work.
Please supply an example how you tested the new functionality, I probably made a silly mistake.
cnc@cncmachine:~/linuxcnc/configs/qt$ linuxcnc qt.ini
LINUXCNC - 2.9.0-pre0-5607-gfc9ea3e5c
Machine configuration directory is '/home/cnc/linuxcnc/configs/qt'
Machine configuration file is 'qt.ini'
Starting LinuxCNC...
Found file(REL): ./qt.hal
Note: Using POSIX realtime

identityKinematicsSetup: coordinates:XYYZ

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

More
23 Jan 2022 16:37 #232889 by cmorley
Under the heading {DISPLAY} add:

MESSAGE_BOLDTEXT = Critical and Persistent
MESSAGE_TEXT = This is a persistent dialog test
MESSAGE_DETAILS = There seems to be something wrong You must fix it to clear message
MESSAGE_TYPE = nonedialog
MESSAGE_PINNAME = nonedialogtest
MESSAGE_ICON = CRITICAL

run the config and a HAL pin qtdragon.nonedialogtest will be available.
set that pin true to show, false to hide.

The sim 'qtdragon.ini' (only that one) has three dialogs included - that's how I tested.

Chris
The following user(s) said Thank You: ikkuh

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

More
23 Jan 2022 18:09 #232897 by ikkuh

run the config and a HAL pin qtdragon.nonedialogtest will be available.
set that pin true to show, false to hide.

 

As I expected I made a silly mistake.
Works now! Thank you very much.
Will post relevant code soon here.
The following user(s) said Thank You: cmorley

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

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