Change jog speed while jogging?

More
6 years 4 months ago #170910 by cmorley
Linuxcnc has no internal reference of jog rate - each gui has it's own.
Unfortunately, AXIS doesn't expose the jograte as a HAL pin by default.

using .axisrc option to add custom code to AXIS I'm sure you could make this work.
But you'll have to wait for the AXIS gurus to help you out :)

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

More
6 years 4 months ago #170922 by andypugh

Doug Crews wrote: I was hoping to do the same thing for Jog-Speed but I found as you did there are no similar halui pins to use for a Jog Override.


It's best not to use halui for jogging in places where you have a choice, as halui is a user-space program.

You should use the joint / axis jog pins if you can as they are associated with the motion module running in realtime.

linuxcnc.org/docs/2.7/html/man/man9/motion.9.html

Just change the jog-scale pin and the jog speed will change.

"halui" should be thought of as a GUI without a G :-)

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

More
6 years 4 months ago #171020 by Doug Crews
Thanks for the offer David,
But I’m too new to migrate away from Axis for the time being. Good to know there are options.

I’ve been testing Andy’s suggestion and have only been able to get the encoder to behave like an MPG. I tried a few different scenarios but in order to get the jog to move I had to include axis.N.enable which only moves when the encoder count changes. I linked the jog button to the axis.n.enable but it only made me haft to push and hold the jog button while turning the encoder for the jog to move. It moves like a typical MpG incrementing..its been a good exercise.

So it seems there’s two paths to jogging, one is through halui and the other is through the motion module. I have them both set-up but haven’t had the guts get a jog going using halui while turning the nob on the encoder that is sending discrete incremental pulses via motion module…don’t know what will happen.! Don’t want to break my new “Precious”

Changing the jog speed while jogging would be great, but a next best thing would be to have the jog speed value update to a newly selected value when the button is off so at the next press its jogging at the new speed.

This behavior seems like something that could be done in haui. This code works, But it’s a fixed at a rate. 60 in/min.
Code:
setp halui.jog-speed 60 net jog-x-pos <= halui.jog.0.plus <= hm2_5i25.0.7i77.0.0.input-20
Is there a way to have signal / variable in place of the 60? Something tied to a selector switch with a couple of choices that I could set would be good.

As usual thank you all.

-Doug

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

More
6 years 4 months ago #171023 by andypugh

Doug Crews wrote: I’ve been testing Andy’s suggestion and have only been able to get the encoder to behave like an MPG.


Clearly I have been misunderstanding what you are trying to achieve. I had assumes that you were wanting the encoder as an MPG.

Can you describe what controls you have, and what you want them to do?

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

More
6 years 4 months ago #171070 by Doug Crews
Hey Andy,

From my end I was looking to install physical jog buttons instead of using the mouse or keyboard to jog. More than once I was bringing a tool down to touch a part in Z using the mouse and it “hung” meaning my finger was off the mouse button and the z was still moving!. I nearly punched the estop button through the panel the first time it happened. I figure a direct button to i/o card would be a more robust solution than the mouse and keyboard, so I’ve been working that way.

I would like to push a physical jog button for z-minus have it jog at maximum speed and when I start to get close to the part or toolsetter I dial down the jog speed eventually down to 0.3 inches per minute to hit zero on my setter indicator or kiss the part. It’s what I currently do with the mouse in Axis. I’m planning to use physical buttons for xyzbc. Hopefully no need to use the mouse at all for jogging.

-Doug

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

More
6 years 4 months ago #171186 by andypugh
[quote="Doug Crews" post=171070I would like to push a physical jog button for z-minus have it jog at maximum speed and when I start to get close to the part or toolsetter I dial down the jog speed eventually down to 0.3 inches per minute to hit zero on my setter indicator or kiss the part. It’s what I currently do with the mouse in Axis. I’m planning to use physical buttons for xyzbc. Hopefully no need to use the mouse at all for jogging.[/quote]

Take a look at the SImple Remote Pendant for how to do that. The details will be different, but the idea is the same:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
The relevant part is section 5, which shows how to select a jog speed.
If you want the jog speed to be continuously variable, then the trick would be to set the encoder scale accordingly, then pass the "position" to the jog speed pins.
You might want a "lincurve" component to reverse, limit and de-linearise the encoder position. (so that 0 counts is full speed, and -100 counts is zero speed. And -110 is still zero, and +100 is still only full speed)

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

Time to create page: 0.222 seconds
Powered by Kunena Forum