Hello Guest it is April 23, 2024, 11:53:02 AM

Author Topic: Mach4 rotary axis w/rollover shortest path  (Read 1672 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach4 rotary axis w/rollover shortest path
« Reply #10 on: August 04, 2022, 07:50:49 PM »
Ah, now thats useful, thanks Chad!!
Re: Mach4 rotary axis w/rollover shortest path
« Reply #11 on: August 04, 2022, 08:01:20 PM »
I’m just saying. I’m not sure what issues you guys are having specifically.
We’re using this on two grinders in our shop that has a tilt in the grinding wheel.  It works fine either way we program it.
We’re using the A axis as the tilt. Either the A axis rotary roll over, it works fine.
Chad Byrd
Re: Mach4 rotary axis w/rollover shortest path
« Reply #12 on: April 06, 2023, 11:14:58 AM »
Using build 4612.
It is behaving as you would expect.
Command A 10 it moves to 10... then command A 355 it moves to a 355 in the negative direction moving 15 units, not positve 345.
Command A 10 it moves to 10... then command A -5 it moves to a 355 in the negative direction moving 15 units.

Sorry it's been a long time, now just revisiting this.

We have this problem in build 4612. Our Mach4 control mode is set for "Mill", rollover on all rotary axes. We are using a Galil controller with the Galil plugin. This occurs with any G0 command.
Re: Mach4 rotary axis w/rollover shortest path
« Reply #13 on: April 11, 2023, 11:32:49 AM »
I did some more testing to narrow down exactly when this occurs. It seems like it only occurs when you are trying to roll over 0 from > 180 degrees when rolling over away from zero.

Start with your rotary axis at machine position 0, enable the machine. Then issue the following commands:

G0 C0
G0 C180
G0 C270
G0 C0

What will happen is the axis will first goto zero, then increment through 180 to 270, but then when told to go to zero, the axis reverses direction and goes back to zero rather than continuing to travel past 270. This happens in the "negative" direction as well (if you are in negative machine coordinates, away from zero).

I did find a way around this, and that's by setting an offset immediately before commanding the axis to move back to zero. The offset needs to be whatever multiple of 360 is larger than the current machine coordinates (or smaller than if you are in negative machine coordinates, moving away from zero). So if machine coordinates for this axis are moving between 0-360, work offset must be set to 360 then you can command back to zero. If machine coordinates are between 360 and 720, work offset must be 720.

It's an annoying workaround, but it does work. It just demands you know at all times where you are in absolute rotary positioning in your G code, which kind of negates the point of rollover.
« Last Edit: April 11, 2023, 11:34:59 AM by mb-ABTech »