[Yes. YES.] Is there a way to display the current UCS [G5n setting] in AXIS?

More
6 years 6 months ago #163984 by cmorley

clunc wrote: 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

Please Log in to join the conversation.

More
6 years 6 months ago #163985 by cmorley
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

Please Log in to join the conversation.

More
6 years 6 months ago #164000 by phillc54
Entering the following in ~/.axisrc or a USER_COMMAND_FILE will give you a label on the F3 tab with the current UCS.
Code:
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])

Please Log in to join the conversation.

More
6 years 6 months ago #164004 by cmorley
yaay - Phill swoops in with AXIS code again! :)

Please Log in to join the conversation.

More
6 years 6 months ago #164018 by clunc
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.)

Please Log in to join the conversation.

More
6 years 6 months ago #164019 by phillc54
Actually you could change:
Code:
W('label','.pane.top.tabs.fmanual.jogf.zerohome.ucs','-text','G5x')
to:
Code:
W('label','.pane.top.tabs.fmanual.jogf.zerohome.ucs')
The text was just for testing...

Please Log in to join the conversation.

More
6 years 6 months ago #164020 by clunc
Not me. I'm using it as it was presented to me by my bff. :^D

Please Log in to join the conversation.

More
6 years 6 months ago #164059 by MaHa
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

Code:
W('.pane.top.tabs.fmanual.jogf.zerohome.ucs','configure','-text','UCS: ' + all_systems[o.last_g5x_index].split()[1])
to
Code:
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.

Please Log in to join the conversation.

More
6 years 6 months ago #164092 by phillc54
Interesting, I didn't try it with running gcode, just MDI commands.

Please Log in to join the conversation.

More
5 years 10 months ago #193289 by nau
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?

Please Log in to join the conversation.

Time to create page: 0.513 seconds
Powered by Kunena Forum