C- AXIS infinte rotation with 0-360degree range

Moderators: TomKerekes, dynomotion

Post Reply
AmitKumar171
Posts: 104
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

C- AXIS infinte rotation with 0-360degree range

Post by AmitKumar171 » Thu Jan 07, 2021 7:23 am

Hi tom ,

I am using KFLOP+KONNECT+KANAOG for 5 axis machine, i am facing one problem in c axis.

As C axis don't have range as its infinite rotation with 0-infinte, but i want to make it similar to 0-360 range which has -360 to +360 angle, is is possible ?

If yes then how?

i tried modulo360.c, but it only zeroes certain time, in whole g-code of 1000 lines+ how do i use it?

waiting for kind reply.
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 1238
Joined: Mon Dec 04, 2017 1:49 am

Re: C- AXIS infinte rotation with 0-360degree range

Post by TomKerekes » Thu Jan 07, 2021 4:46 pm

I think you will need to change your GCode to only move only within the range +/-360 degrees. If the GCode commands the angle to a number beyond 360 degrees what do you want to happen?
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 104
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

Re: C- AXIS infinte rotation with 0-360degree range

Post by AmitKumar171 » Mon Jan 11, 2021 8:26 am

Hi tom,

thanks for your reply,
If the GCode commands the angle to a number beyond 360 degrees what do you want to happen?
it should rotate c axis in terms of 360 degrees only, as in DRO lable of C axis should show 360 and 0,

whatever the C axis is , dro label for c axis should show in terms of -360 to +360 degrees.

waiting for your kind reply.
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 1238
Joined: Mon Dec 04, 2017 1:49 am

Re: C- AXIS infinte rotation with 0-360degree range

Post by TomKerekes » Mon Jan 11, 2021 7:09 pm

Hi Amit,
it should rotate c axis in terms of 360 degrees only
I don't understand what that means. If the GCode commands the C axis from 0 to 1000 degrees what would you want to happen?

If you want to change how the DROs display you might change the KMotionCNC source code and re-build it. This code in KMotionCNCDlg.cpp formats what is displayed in the ABC DROs

Code: Select all

	s.Format(" A"+Format,a);
	KillMinusZero(s);
	Disp3->SetText(s);

	s.Format(" B"+Format,b);
	KillMinusZero(s);
	Disp4->SetText(s);

	s.Format(" C"+Format,c);
	KillMinusZero(s);
	Disp5->SetText(s);
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 104
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

Re: C- AXIS infinte rotation with 0-360degree range

Post by AmitKumar171 » Tue Jan 12, 2021 6:49 am

Hi tom,

Thanks for your reply,
If the GCode commands the C axis from 0 to 1000 degrees what would you want to happen?
When we give this command c axis should rotate from 0 to 1000degrees (1000/360 = 2.77full rotation), but dro should only show 0-359 then again after 359 again 0-359 like this it should show, so the at the end of the g code dro of c axis should show 280 degrees (360+360+280) instead of 1000 degrees .

Waiting for your kind reply.
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 1238
Joined: Mon Dec 04, 2017 1:49 am

Re: C- AXIS infinte rotation with 0-360degree range

Post by TomKerekes » Tue Jan 12, 2021 5:20 pm

Hi Amit,

That doesn't seem like a good idea as you would not be able to tell where the axis is really commanded.

But you may change the code to work like that if you wish. Such as:

Code: Select all

s.Format(" C"+Format, fmod(c, 360.0));
Regards,

Tom Kerekes
Dynomotion, Inc.

Moray
Posts: 221
Joined: Thu Apr 26, 2018 10:16 pm

Re: C- AXIS infinte rotation with 0-360degree range

Post by Moray » Tue Jan 12, 2021 8:00 pm

Tom, I think this is how the DRO works for when the lathe I bought is in C-axis mode.
I'll have to go and try some MDIs to see what happens with regards to absolute moves.

Moray
Posts: 221
Joined: Thu Apr 26, 2018 10:16 pm

Re: C- AXIS infinte rotation with 0-360degree range

Post by Moray » Tue Jan 12, 2021 9:46 pm

OK, was out in the workshop and checked this.
The industrial controller is set-up to work using the Modulo method.

The most the lathe C-axis ever does is move to two different positions drilling a hole at each location, so I've never actually tried spindle positioning beyond 0 and 180deg :/

Post Reply