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

27 Dec 2020 19:52 #193308 by cakeslob
dont understand completely whats happening but when i broke it down to use it for other things , it was like this as to my understanding

'all_systems' is in axis.py to define(?) the usersystem coordinates
'o.' is for the opengl widget for the preview frame

'g5x_index' is located in the python interface docs, but can also be found in axis.py as defined 'o.last_g5x_index = self.stat.g5x_index'

'split' the split stuff is something python to only take the first returned value i think

yes, i thought the same thing, display spindle speed, so i also used this thread to get me there. here is a fast and dirty one for you, because I am using my spindle speed in a different area. it is not as clean as phils, because i dont know how to leverage the python interface very well yet. it might be something like this linuxcnc.stat.spindle.speed . because im not so good, im making a halcomp and linking it to spindle speed in hal, so make sure your spindle is linked to spindle-vel-cmd-rpm in hal
# shortcut saves typing
W = root_window.tk.call

#  create the label, the text will be over written later 

# the position of the label,  I changed it from the homing section, it makes more sense in spindle 

# this updates the spindle label when every it changes, and also re-configures the text
def user_live_update():
  W('.pane.top.tabs.fmanual.spindlef.spindle-speed','configure','-text','SPEED %3.0f' % (comp['spindle-speed']))

### this creates new axisui halpins and connects them to existing signals , spindle speed is now viewable under axisui pins in hal config
def user_hal_pins():
    # create new hal pins
    #mycomp = hal.component('feed')
    comp.newpin('spindle-speed', hal.HAL_FLOAT, hal.HAL_IN)

add this the same way you would with g5x UCS.
USER_COMMAND_FILE = usercommand_justspeed.py
if you want to use both (g5x and spindle speed) you need to merge the user_live_update sections of the 2
pyvcp will not work properly with the way I have done spindlespeed with a new comp pin
here is the thread where I am playing with axis stuff, my main examples for spindle speed are located here

File Attachment:

File Name: usercomman...speed.py
File Size:1 KB
The following user(s) said Thank You: phillc54

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

28 Dec 2020 04:00 #193340 by nau
Dear cakeslob,

Thank you very much for such a clear explanation. Now I do understand how it's works and my Axis looks exactly as I wanted.

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

Time to create page: 0.218 seconds
Powered by Kunena Forum