Display message in dialog box on gpio
20 Jan 2022 14:37 #232526
by ikkuh
Display message in dialog box on gpio was created 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?
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.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18563
- Thank you received: 6218
20 Jan 2022 14:43 #232528
by tommylight
Replied by tommylight on topic Display message in dialog box on gpio
This should do:
linuxcnc.org/docs/2.8/html/man/man9/message.9.html
linuxcnc.org/docs/2.8/html/man/man9/message.9.html
The following user(s) said Thank You: ikkuh
Please Log in or Create an account to join the conversation.
20 Jan 2022 14:45 #232530
by ikkuh
Thanks!
Replied by ikkuh on topic Display message in dialog box on gpio
oops my fault, should have searched better.This should do:
linuxcnc.org/docs/2.8/html/man/man9/message.9.html
Thanks!
Please Log in or Create an account to join the conversation.
20 Jan 2022 21:48 #232555
by cmorley
Replied by cmorley on topic Display message in dialog box on gpio
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.
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.
21 Jan 2022 08:35 #232607
by ikkuh
Great idea.
Replied by ikkuh on topic Display message in dialog box on gpio
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!
If you need a version that can't be cleared by the user - we could add that.
Great idea.
Please Log in or Create an account to join the conversation.
23 Jan 2022 00:32 #232846
by cmorley
Replied by cmorley on topic Display message in dialog box on gpio
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
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.
23 Jan 2022 11:30 #232871
by ikkuh
Thanks!
Replied by ikkuh on topic Display message in dialog box on gpio
Wow, thank you! Will try this this afternoon. Will let you know my experiences.ok pushed work for this to master.
This will produce a button-less dialog then appears and disappears by a HAL bit pin.
Thanks!
Please Log in or Create an account to join the conversation.
23 Jan 2022 16:15 #232887
by ikkuh
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
Replied by ikkuh on topic Display message in dialog box on gpio
Sorry, can not get it to work. The regular message system does work.It was a very large change so hopefully didn't break anything.
I haven't updated the docs yet
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.
23 Jan 2022 16:37 #232889
by cmorley
Replied by cmorley on topic Display message in dialog box on gpio
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
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.
23 Jan 2022 18:09 #232897
by ikkuh
Works now! Thank you very much.
Will post relevant code soon here.
Replied by ikkuh on topic Display message in dialog box on gpio
As I expected I made a silly mistake.run the config and a HAL pin qtdragon.nonedialogtest will be available.
set that pin true to show, false to hide.
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.097 seconds