Hello Guest it is April 19, 2024, 02:29:05 PM

Author Topic: A-Axis from 359 to 360 /(0)  (Read 1116 times)

0 Members and 1 Guest are viewing this topic.

A-Axis from 359 to 360 /(0)
« on: December 19, 2020, 06:40:37 PM »
Hi,
i have a small Problem:
I have an A-Axis combines with an ESS and Mach4.
I have the Problem now, that my CAM Software (Deskproto) uses "A360" (I know its the same as A0) and my Axis is going backward to A0 (When it was 359 it goes over 180 to zero and damaging my part). Can I tell Mach4 it shall use the shortest direction for it?

Thanks for your help in advance

Sincerely
 Tobias
Re: A-Axis from 359 to 360 /(0)
« Reply #1 on: December 20, 2020, 11:40:38 AM »
I think I added that code :) check under config ... one of the tabs has something about a axis rollover. I can test it tomorrow. I don’t even have a PC with me now :)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: A-Axis from 359 to 360 /(0)
« Reply #2 on: December 20, 2020, 12:09:28 PM »
Hi, thank you for your answer!
I tested both options already (checked and unchecked). With the option selected the DRO of the Axe goes from 0-359 and starts over, without it goes counts up to eternity. But i wonder if there is the option to go from 350->10 degree over 360 degree.  My toolturrent on my Lathe is doing it when selecting a tool.

Sincerely
Tobias
Re: A-Axis from 359 to 360 /(0)
« Reply #3 on: December 20, 2020, 01:56:59 PM »
Let me dig into that tomorrow when I am at my desk... I thought I added that years ago. Maybe I can remote in... I try not to bring source code home with me, I hate programming on a laptop.

Today or tomorrow I will have an answer.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: A-Axis from 359 to 360 /(0)
« Reply #4 on: December 20, 2020, 02:07:02 PM »
Take all the time you need :D, i have to work this week anyway...
But thank you very much for your help!
Re: A-Axis from 359 to 360 /(0)
« Reply #5 on: December 20, 2020, 02:14:33 PM »
You need to see the following set to 1 in the INI
MGetProfileInt(wxT("Preferences"), wxT("AxisRolloverA"), 0) == 1 ? true : false);
You should find AxisRolloverA set to 1 ... That will run the rollover code. Now the dialog should be setting that for you. The issue is that setting this will also effect your feed moves. What are you seeing if you have this enabled?
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: A-Axis from 359 to 360 /(0)
« Reply #6 on: December 20, 2020, 04:57:58 PM »
I dont know where to enter your Code, so I just looked at the Maschine.ini file. "AxisRolloverA" is already set to 1.
I will do more test on holidays and see if i can find my mistake/problem. I mean, it seems to work for other people (with Desproto too), so the mistake has to be in my setup...
Re: A-Axis from 359 to 360 /(0)
« Reply #7 on: December 20, 2020, 08:52:37 PM »
Enable rollover in the Mach4 config for the axis you want as rotational.

If you want to command to 270 from zero but you want the move to go clockwise not counter clockwise you command it 170 then 270.

Here's an example of moving counter clockwise 30 degrees and then clockwise 30 degrees from 0 without rotating all the way back over:

Code: [Select]
rc = mc.mcCntlGcodeExecuteWait(inst, "G00 A0 B0")
if rc ~= mc.MERROR_NOERROR then mc.mcCntlCycleStop(inst) return end
rc = mc.mcCntlGcodeExecuteWait(inst, "G00 A330 B330")
if rc ~= mc.MERROR_NOERROR then mc.mcCntlCycleStop(inst) return end
rc = mc.mcCntlGcodeExecuteWait(inst, "G00 A360 B360")
if rc ~= mc.MERROR_NOERROR then mc.mcCntlCycleStop(inst) return end
rc = mc.mcCntlGcodeExecuteWait(inst, "G00 A0 B0")
if rc ~= mc.MERROR_NOERROR then mc.mcCntlCycleStop(inst) return end
rc = mc.mcCntlGcodeExecuteWait(inst, "G00 A30 B30")
if rc ~= mc.MERROR_NOERROR then mc.mcCntlCycleStop(inst) return end
« Last Edit: December 20, 2020, 08:58:47 PM by compewter_numerical »
Re: A-Axis from 359 to 360 /(0)
« Reply #8 on: December 22, 2020, 03:53:02 PM »
Hi,
I played a lot with the configuration today, and suddenly it seems to work... In the end, the setting are the same as before... I dont know why its working now but now iam happy with it :D
So, thank you very much for your help!
Re: A-Axis from 359 to 360 /(0)
« Reply #9 on: December 22, 2020, 03:56:10 PM »
It needed to know I was looking ;)
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com