Axis switch from mdi to manual mode and back

More
12 years 9 months ago #42859 by dgarrett
if you are using git master, the pin has been removed.
see:

git.linuxcnc.org/gitweb?p=linuxcnc.git;a...6b15552825018b55726d

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

More
12 years 9 months ago #42860 by kostas
I'm using the latest packaged version. The pin is there when I look from "halcmd show". But this is helpful info and actually I was looking for a way to interact with axis via axisui so that I could maybe find a way to also manipulate the axis jog speed with an encoder. I don't see any pins for that but I was thinking of looking at the python source and maybe add a pin or something. Do you happen to know if there are any changes for axis that could be used for this purpose?

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

More
12 years 9 months ago #42861 by dgarrett
if the pin axisui.set-manual-mode exists, then you can access it from a postgui hal file
specifed in the ini ([HAL]POSTGUI_HALFILE=filename.hal)

changing the axis gui slider value for jog speed would require modifying the axis gui but you may be able to use halui jog functions instead:

linuxcnc.org/docs/html/man/man1/halui.1.html

for example, halui plus/minus jogging uses pins:
halui.jog.n.minus,halui.jog.n.plus, halui.jog-speed (n = axis number)

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

More
12 years 9 months ago #42864 by kostas
I didn't think of the postgui file, thanks!

I already used the halui speed pins but the friend who needs this configuration would like to synchronize the axis jog speed slider on screen with the halui jog speed and also buttons that duplicate the keyboard arrows behaviour. I'm not sure this can be done without hard work though, so I may stick with just the halui pins for now.

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

More
12 years 9 months ago - 12 years 9 months ago #42878 by dgarrett
# Here is an example method to modify the axis ui behavior without
# modifying its python source:

# modify the ini file to include:
# [DISPLAY]USER_COMAND_FILE=mymods.py
# this new file mymods.py should be in the ini directory
# $ cat mymods.py
Code:
print "*** Initial vars.max_speed:",vars.max_speed.get() if hal_present: mycomp = hal.component("mycomp") mycomp.newpin("max_speed",hal.HAL_FLOAT,hal.HAL_IN) print "*** Created pin mycomp.max_speed" # this function is called at [DISPLAY]CYCLE_TIME interval def user_live_update(): root_window.tk.call("update_jog_slider_vel",mycomp["max_speed"])

# in a postgui hal file, conect the new pin mycomp.max_speed
# as required
Last edit: 12 years 9 months ago by dgarrett. Reason: display indents properly using code
The following user(s) said Thank You: kostas

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

More
12 years 9 months ago #42907 by kostas
Nice! I made a quick test with halcmd and it updates the value. That's a good starting point, thanks!

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

Time to create page: 0.083 seconds
Powered by Kunena Forum