Hello Guest it is April 26, 2024, 08:29:49 AM

Author Topic: Can I have a different jog speed/accel than rapids?  (Read 545 times)

0 Members and 1 Guest are viewing this topic.

Can I have a different jog speed/accel than rapids?
« on: April 09, 2023, 07:05:10 PM »
Much work has been happening on the mill!

I have the Z axis together and the ClearPath servo auto-tuned, and I get 400 in/im and 1G accel out of the thing:

https://youtube.com/shorts/lfv4NNx5zTs

Except....

When jogging with the handwheel (MPG), I have a selector switch and code that controls how far the axis moves per handwheel pulse - 0.001", 0.01", or 0.1". On the 0.001"-per-pulse setting, it's fine. On the faster settings, jogging generates a "move one increment then stop" movement, and at 1G acceleration / 400 in/min that's not a smooth movement; it's BANG-BANG-BANG.

It's way, way too harsh to be usable; something is going to break.

I could turn down the axis acceleration, but where's the fun in that?

Is there some way within the Lua API to slow down the movement rate and/or acceleration when jogging?

Thanks!
Re: Can I have a different jog speed/accel than rapids?
« Reply #1 on: April 10, 2023, 04:32:31 AM »
You can use the following API

Code: [Select]
rc = mc.mcJogSetAccel(
number mInst,
number axisId,
double percent)
Re: Can I have a different jog speed/accel than rapids?
« Reply #2 on: April 10, 2023, 08:19:23 AM »
OK, cool, that's a start.

Looks like that's an override... is there a way to grab an axis' current motor parameters (specifically, acceleration) so I can do the math and set the jog accel via the API you just listed?

I gotta find that API reference again...
Re: Can I have a different jog speed/accel than rapids?
« Reply #3 on: April 11, 2023, 05:52:10 PM »
Hi,
you can set the max velocity and accelerations with:

Code: [Select]
LUA Syntax:
rc = mc.mcMotorSetMaxAccel(
number mInst,
number motorId,
number maxAccel)

Description:
Set the maximum acceleration value for the given motor.


And:

Code: [Select]
LUA Syntax:
rc = mc.mcMotorSetMaxVel(
number mInst,
number motorId,
number maxVel)

Description:
Set the maximum velocity for the given motor.

I am very dubious about changing these back and forth, I rather suspect that you motion control plugin will baulk at varying parameters throught a session.
There is also the question of when those parameters are recorded to the .ini file.

I think an override such as Swifty has pointed out is better.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline kf2qd

*
  •  148 148
    • View Profile
Re: Can I have a different jog speed/accel than rapids?
« Reply #4 on: June 03, 2023, 11:00:05 PM »
Why do you have your accel set so high? Having the accel set as high as possible is not always the best setting. You might try turning it down, and seeing if that affects things in the real world where the tool is meeting the material.
Re: Can I have a different jog speed/accel than rapids?
« Reply #5 on: June 06, 2023, 08:06:18 AM »
Hi RecceDG,

The “bang” is likely due to the servo accurately following an instantaneous acceleration command. If you want to maintain 1 G of peak acceleration but have motion easier on your mechanics and likely improve part quality, you can utilize the ClearPath’s RAS (Regressive Auto Spline) to provide jerk limiting. If you’re interested in learning how to apply this user-adjustable smoothing feature, here is a video link:

https://www.youtube.com/embed/WOyP51-PiTs?rel=0&iv_load_policy=3

With a CNC, just be sure to select the same RAS value on all the axes.

Best regards,
Erik M…Teknic servo systems engineer