- Posts: 19899
- Thank you received: 4655
Open message window from G-code
- andypugh
- Offline
- Moderator
-
Less
More
8 years 8 months ago #106286
by andypugh
Replied by andypugh on topic Open message window from G-code
Look at hal_manualtoolchange for one way to do this.
But it might be easier to use a User M-code (M100 - M199) that calls a Python script (I _think_ you can pass parameters to a user M-code)
(I have a feeling that I have done this once, but can't find it)
But it might be easier to use a User M-code (M100 - M199) that calls a Python script (I _think_ you can pass parameters to a user M-code)
(I have a feeling that I have done this once, but can't find it)
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7368
- Thank you received: 2181
8 years 8 months ago #106305
by cmorley
Replied by cmorley on topic Open message window from G-code
The big problem when dealing with messages coming from linuxcnc it's self is, only ONE mechanism can be used at a time reliably.
messages are destroyed when read so if you have two components reading them it's a race condition.
A better system would be a component that reads messages and publishes them to any component registered.
For instance GObject messages.
It would be nice to somehow tie that in to HAL component messages too but that would be even harder.
Chris M
messages are destroyed when read so if you have two components reading them it's a race condition.
A better system would be a component that reads messages and publishes them to any component registered.
For instance GObject messages.
It would be nice to somehow tie that in to HAL component messages too but that would be even harder.
Chris M
Please Log in or Create an account to join the conversation.
- aleksamc
- Offline
- Platinum Member
-
Less
More
- Posts: 569
- Thank you received: 67
8 years 8 months ago #106321
by aleksamc
Replied by aleksamc on topic Open message window from G-code
I know, that linuxcnc is opensource, and I can do with it what ever I want, but unfortunataly I'm very bad programmer and hardly will program sotmething.
Please Log in or Create an account to join the conversation.
- nkp
- Offline
- Premium Member
-
Less
More
- Posts: 143
- Thank you received: 39
8 years 8 months ago #106322
by nkp
Replied by nkp on topic Open message window from G-code
The following user(s) said Thank You: aleksamc
Please Log in or Create an account to join the conversation.
- aleksamc
- Offline
- Platinum Member
-
Less
More
- Posts: 569
- Thank you received: 67
8 years 8 months ago #106324
by aleksamc
Replied by aleksamc on topic Open message window from G-code
Thank you very much for this nice code))
I need to write it only to M100 as bash.
I need to write it only to M100 as bash.
Code:
#!/bin/bash
case ${1%.*} in
0)
yad --title "Title1" --on-top\
--text "Text1"
;;
1)
yad --title "title2" --on-top\
--text "text2"
;;
2)
yad --title "title3" --on-top\
--text "text3"
;;
*)
yad --title "Title4" --on-top\
--text "text parameter $1"
;;
esac
Please Log in or Create an account to join the conversation.
- nkp
- Offline
- Premium Member
-
Less
More
- Posts: 143
- Thank you received: 39
8 years 8 months ago #106325
by nkp
Replied by nkp on topic Open message window from G-code
You will need to install yad
Please Log in or Create an account to join the conversation.
Time to create page: 0.529 seconds