[Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
14 Apr 2020 21:37 - 14 Apr 2020 21:43 #163984
by cmorley
Display Toolkits is a good description. Qtvcp uses python/Qt,, pyvcp uses python and tkinter and gladevcp uses python/gtk2 with the GLADE editor.
vcp is virtual control panel.
Chrsi
Replied by cmorley on topic Is there a way to display the current UCS [G5n setting] in AXIS?
Qtvcp? different than PyVCP? than GladeVCP?
I sense a pattern, but can't put my finger on it, because I don't recognize Qt and Glade as programming languages. Are they?
Display Toolkits is a good description. Qtvcp uses python/Qt,, pyvcp uses python and tkinter and gladevcp uses python/gtk2 with the GLADE editor.
vcp is virtual control panel.
Chrsi
Last edit: 14 Apr 2020 21:43 by cmorley.
Please Log in or Create an account to join the conversation.
14 Apr 2020 21:43 #163985
by cmorley
Replied by cmorley on topic Is there a way to display the current UCS [G5n setting] in AXIS?
The python module has the info you need.
linuxcnc.org/docs/2.7/html/config/python...ding_linuxcnc_status
specifically the attribute: g5x_index
You then use gladevcp's handler file option to poll the linuxcnc python module to get the UCS and display it with a gladevcp widget.
Gstat does the same thing in possibly a neater fashion but is not available (for that attribute) in 2.7
linuxcnc.org/docs/2.7/html/config/python...ding_linuxcnc_status
specifically the attribute: g5x_index
You then use gladevcp's handler file option to poll the linuxcnc python module to get the UCS and display it with a gladevcp widget.
Gstat does the same thing in possibly a neater fashion but is not available (for that attribute) in 2.7
Please Log in or Create an account to join the conversation.
15 Apr 2020 01:43 #164000
by phillc54
Replied by phillc54 on topic Is there a way to display the current UCS [G5n setting] in AXIS?
Entering the following in ~/.axisrc or a USER_COMMAND_FILE will give you a label on the F3 tab with the current UCS.
W = root_window.tk.call
W('label','.pane.top.tabs.fmanual.jogf.zerohome.ucs','-text','G5x')
W('grid','.pane.top.tabs.fmanual.jogf.zerohome.ucs','-column','0','-row','2','-sticky','w')
def user_live_update():
W('.pane.top.tabs.fmanual.jogf.zerohome.ucs','configure','-text','UCS: ' + all_systems[o.last_g5x_index].split()[1])
The following user(s) said Thank You: MaHa
Please Log in or Create an account to join the conversation.
15 Apr 2020 02:52 #164004
by cmorley
Replied by cmorley on topic Is there a way to display the current UCS [G5n setting] in AXIS?
yaay - Phill swoops in with AXIS code again!
Please Log in or Create an account to join the conversation.
15 Apr 2020 04:36 - 15 Apr 2020 04:39 #164018
by clunc
Replied by clunc on topic [Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
In. Deed! I been swooped sure enough. I just appended it to what I found already in .axisrc (a single line, which was already a root_window.tk.call) and it worked! (This would be the TCL/TK approach, right?)
I couldn't see it at first, because I was looking for it in the "graphic" model-Preview window, but lo, there it is! nestled under the "Home All" button. Byoo tee full. [See attachment. Shameless plug of one of my cool topo maps.]
Thank you Phil.
(Persons-in-charge, Chris?, LinuxCNC really ought to come with this improvement as the default.)
Happy Easter all! (I know I'm happy.)
(My gut told me it just had to be trivial, and after my gut scoured Phil's codette, it freely admits it was stark-raving wrong. Trivial never looked sooo comblicated.)
I couldn't see it at first, because I was looking for it in the "graphic" model-Preview window, but lo, there it is! nestled under the "Home All" button. Byoo tee full. [See attachment. Shameless plug of one of my cool topo maps.]
Thank you Phil.
(Persons-in-charge, Chris?, LinuxCNC really ought to come with this improvement as the default.)
Happy Easter all! (I know I'm happy.)
(My gut told me it just had to be trivial, and after my gut scoured Phil's codette, it freely admits it was stark-raving wrong. Trivial never looked sooo comblicated.)
Last edit: 15 Apr 2020 04:39 by clunc. Reason: change title
Please Log in or Create an account to join the conversation.
15 Apr 2020 04:43 #164019
by phillc54
Replied by phillc54 on topic [Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
Actually you could change:to:The text was just for testing...
W('label','.pane.top.tabs.fmanual.jogf.zerohome.ucs','-text','G5x')
W('label','.pane.top.tabs.fmanual.jogf.zerohome.ucs')
Please Log in or Create an account to join the conversation.
15 Apr 2020 05:05 #164020
by clunc
Replied by clunc on topic [Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
Not me. I'm using it as it was presented to me by my bff. :^D
Please Log in or Create an account to join the conversation.
15 Apr 2020 13:14 - 15 Apr 2020 22:16 #164059
by MaHa
Replied by MaHa on topic [Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
Thanks a lot for this code. I tried it in my sim, 2.7.15. The dispayed Gn was always 1 ahead, eg. G57 in effect, G58 displayed. So i changed this line
to
and it is displaying the active UCS now.
W('.pane.top.tabs.fmanual.jogf.zerohome.ucs','configure','-text','UCS: ' + all_systems[o.last_g5x_index].split()[1])
W('.pane.top.tabs.fmanual.jogf.zerohome.ucs','configure','-text','UCS: ' + all_systems[o.last_g5x_index-1].split()[1])
and it is displaying the active UCS now.
Last edit: 15 Apr 2020 22:16 by MaHa.
Please Log in or Create an account to join the conversation.
15 Apr 2020 22:34 #164092
by phillc54
Replied by phillc54 on topic [Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
Interesting, I didn't try it with running gcode, just MDI commands.
Please Log in or Create an account to join the conversation.
27 Dec 2020 11:41 #193289
by nau
Replied by nau on topic [Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?
Dear Phil
Thank you. Wonder where all_systems[o.last_g5x_index].split()[1]) comes from? I mean can't find that in docs.
Or maybe would you be so kind help me to print spindle speed in same style?
Thank you. Wonder where all_systems[o.last_g5x_index].split()[1]) comes from? I mean can't find that in docs.
Or maybe would you be so kind help me to print spindle speed in same style?
Please Log in or Create an account to join the conversation.
Time to create page: 0.098 seconds