On Fri, 20 Aug 2010 10:57 -0600, "Sebastian Kuzminsky" <[email protected]> wrote: > My mill is currently controlled by the Axis UI and emc2 2.4.3. My > current config is here: > <http://git.highlab.com/?p=emc2-config-bp-r2e3.git;a=tree> > > I've got a jogwheel on the control panel, but not much else. The jog > wheel is hooked up by the "axis-jogwheel.hal" file in the git repo above. > > I'd like to add a pair of rotary switches to the control panel for > jogging, to select which axis to jog and the jog increment. I'm not > sure how to make these switches interact gracefully with Axis' jogging > features. > > I currently have axisui.jog.* hooked to axis.*.jog-enable, > axisui.jog.increment hooked to axis.*.jog-scale, and the jogwheel's > encoder counts hooked to axis.*.jog-counts (the details are all in > axis-jogwheel.hal). So Axis controls what axis will be jogged and by > how much, and the jogwheel makes the jog happen. This works great! > > I think i can see how to disconnect Axis and connect a couple of rotary > switches instead. The axis selection switch would make the selected > axis.*.jog-enable True and make the others False. The jog increment > switch would address a mux to output the desired jog increment to all > the axis.*.jog-scale pins. The jogwheel stays connected just like now. > > But i'm not sure how Axis will behave if I hook things up like this... > > Can i still jog with Axis, using the keyboard?
Yes. > Will Axis jog the axis it selects with the jog increment it selects, and > the jogwheel jog with the axis and jog increment selected by the rotary > switches on the control panel? Yes. > Does Axis not use the axis.* pins to jog? What's going on here? I'm > confused... Axis doesn't use the axis.* pins. Inside the motion controller there are two kinds of jogs. One consists of commands coming from user space - that is what Axis uses. The commands are visible in the big switch that is part of command.c - there is one for incremental jogging, and one for continuous jogging. Search for JOG_CONT and JOG_INCR to see the code. Axis sends one or the other of those commands when you hit the relevant keys. In the case of a continuous jog, Axis also sends an ABORT when you release the key. Jogwheel jogs come from a completely different place - HAL pins on the motion controller. Code in control.c reads the jog-scale, jog- enable, and jog-counts pins, and moves the axis accordingly. Search for handle_joghweel to see the code. There is also code in control.c to manage the case where you start turning a wheel while a keyboard jog is already in progress. The two jog sources are interlocked so that if the axis is moving from one source, the other is ignored. The interlocking is done on a per-axis basis, you could be jogging X from the keyboard while jogging Y with a wheel. The original design of the jogwheel code was based on exactly your setup - physical switches that tell the motion controller what to do with the jogwheel counts. Jeff or Chris later added the HAL pins to Axis that let Axis export the currently selected axis and increment. That works very well for people who don't have or need the physical switches, and has pretty much become the default setup. John Kasunich -- John Kasunich [email protected] ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
