setting the dro value to zero when the home limit sensor reached

Moderators: TomKerekes, dynomotion

ajith
Posts: 51
Joined: Sat May 21, 2022 3:57 am

setting the dro value to zero when the home limit sensor reached

Post by ajith » Tue Jun 14, 2022 12:31 pm

Respected Sir,
i have been facing this issue that when i jog the axes to particular distance and press zero all button, the DRO values changed to zero but the jogged value is moved to global offset.my question is how to fix my axis origin(zero) or homing position.
what is the command to make my dro value change to zero when i call a homing program via user button? i have tried "Zero(#axis)" command.




regards,
Ajith Arawinth.

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

Re: setting the dro value to zero when the home limit sensor reached

Post by TomKerekes » Tue Jun 14, 2022 7:27 pm

There are GCode Programmed Coordinates and Raw Machine Coordinates. See here.

Normally Homing zeros the KFLOP Machine coordinates using Zero(axis). The DROs will then also show zero if there are no GCode Offsets in play. If you want to also set the Offsets to zero so the DROs read zero you can do that with:

DoPCFloat(PC_COMM_SET_X,0.0);

See the KFLOPtoPCCmdExamples.c
Regards,

Tom Kerekes
Dynomotion, Inc.

ajith
Posts: 51
Joined: Sat May 21, 2022 3:57 am

Re: setting the dro value to zero when the home limit sensor reached

Post by ajith » Wed Jun 15, 2022 6:50 am

Respected Sir,
My requirement is that i want to make global offset , fixture offset along with DRO value to be zero.
i tried using zero(axis) command,DoPCFloat(PC_COMM_SET_X,0.0);
Is there a way to change my machine coordination value to zero?
i have attached my homing program image below
WhatsApp Image 2022-06-15 at 12.30.10 PM (1).jpeg
This is the image which contrains my DRO value and edit fixture offset screen after run that above program,
WhatsApp Image 2022-06-15 at 12.30.10 PM.jpeg







Regards,
Ajith Arawinth.

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

Re: setting the dro value to zero when the home limit sensor reached

Post by TomKerekes » Wed Jun 15, 2022 8:06 am

I think one problem might be that after the Limit is detected the axis is Zeroed while still moving so by the time it stops it is no longer at Zero. Jog(axis, 0); commands the axis to stop, but it takes time to come to a stop. To wait till an axis is stopped you can use
while (!CheckDone(axis)) ;

The sequence should be

Jog to Limit
wait for limit
command to stop
wait til stopped
disable axis
Zero

If you still have problems post your Trajectory Planner settings and the KMotion Axis Screen Destinations after Homing.
Regards,

Tom Kerekes
Dynomotion, Inc.

ajith
Posts: 51
Joined: Sat May 21, 2022 3:57 am

Re: setting the dro value to zero when the home limit sensor reached

Post by ajith » Tue Jun 28, 2022 4:38 am

Respected Sir,
I used a C program for homing our three axis and in that program i have turned on bit 45.Then I have assigned that program as a button in my KMOTION CNC screen. now when i execute the program by pressing that button all our axis returned to its homing position and bit 45 also turned ON but when the program execution got completed the bit 45 turns OFF automatically but i never used a command to reset that bit in my program.
pic1.PNG
pic2.PNG
pic3.PNG

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

Re: setting the dro value to zero when the home limit sensor reached

Post by TomKerekes » Wed Jun 29, 2022 1:13 am

Does your Initialization C Program turn off Bit 45?
Regards,

Tom Kerekes
Dynomotion, Inc.

ajith
Posts: 51
Joined: Sat May 21, 2022 3:57 am

Re: setting the dro value to zero when the home limit sensor reached

Post by ajith » Wed Jun 29, 2022 5:14 am

Dear Sir,
Yes,My initialization program "InitKStep.3Axis" turns off bit 45.But after initialization i again turned ON bit 45 in my homing program.

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

Re: setting the dro value to zero when the home limit sensor reached

Post by TomKerekes » Thu Jun 30, 2022 2:13 am

Hi Ajith,

InitKStep3Axis.c normally has a forever loop that monitors movement and whenever there is no movement for a few seconds it turns off Bit 45. Does yours have this?
Regards,

Tom Kerekes
Dynomotion, Inc.

ajith
Posts: 51
Joined: Sat May 21, 2022 3:57 am

Re: setting the dro value to zero when the home limit sensor reached

Post by ajith » Sat Jul 02, 2022 8:51 am

Respected sir,
InitKStep3Axis.c normally has a forever loop that monitors movement and whenever there is no movement for a few seconds it turns off Bit 45. Does yours have this?
Yes sir, there is a forever loop for disabling the service amplifier if there is no activity.

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

Re: setting the dro value to zero when the home limit sensor reached

Post by TomKerekes » Sat Jul 02, 2022 3:12 pm

So does that answer your question?
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply