Page 1 of 1
C- AXIS infinte rotation with 0-360degree range
Posted: Thu Jan 07, 2021 7:23 am
by AmitKumar171
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.
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Thu Jan 07, 2021 4:46 pm
by TomKerekes
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?
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Mon Jan 11, 2021 8:26 am
by AmitKumar171
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.
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Mon Jan 11, 2021 7:09 pm
by TomKerekes
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);
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Tue Jan 12, 2021 6:49 am
by AmitKumar171
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.
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Tue Jan 12, 2021 5:20 pm
by TomKerekes
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));
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Tue Jan 12, 2021 8:00 pm
by Moray
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.
Re: C- AXIS infinte rotation with 0-360degree range
Posted: Tue Jan 12, 2021 9:46 pm
by Moray
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 :/