Hi tom.
I am using Kmotioncnc for machining parts.
When there is a power cut, The program stops there and when all drives and motors are off, Is there any way to save the running g code line or position so i can start the kmotioncnc again which line it stopped due to power cut.
Is there any way to detect power cut using IO and stop the program, save the running g code line ?????
Waiting for kind reply.
How to restart the nc program in case of power cut in kmotioncnc
Moderators: TomKerekes, dynomotion
-
- Posts: 134
- Joined: Tue Feb 20, 2018 7:35 am
- Location: India
How to restart the nc program in case of power cut in kmotioncnc
Thank You
AMIT KUMAR
AMIT KUMAR
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: How to restart the nc program in case of power cut in kmotioncnc
Hi Amit,
If power is really lost then it is not possible to do anything. Do you have an uninterruptible power source to give some warning?
Currently the the last GCode line executed is not accessible or written to any file. I suppose KMotionCNC could be modified to add the last Halted Line to the RunLog. It currently only has the Filename, Time, and Job Time. This wouldn't help if the GCode has Subroutines.
If power is really lost then it is not possible to do anything. Do you have an uninterruptible power source to give some warning?
Currently the the last GCode line executed is not accessible or written to any file. I suppose KMotionCNC could be modified to add the last Halted Line to the RunLog. It currently only has the Filename, Time, and Job Time. This wouldn't help if the GCode has Subroutines.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 134
- Joined: Tue Feb 20, 2018 7:35 am
- Location: India
Re: How to restart the nc program in case of power cut in kmotioncnc
Hi tom,
Thanks for your reply.
As you said i have uninterruptible power source that will give I/O as out put either high or low when the power cut happens.
Can we do something like that program will pause and then stop when the power source gives warnings to Kflop i/o. ?
Waiting for your kind reply.
Thanks for your reply.
As you said i have uninterruptible power source that will give I/O as out put either high or low when the power cut happens.
Can we do something like that program will pause and then stop when the power source gives warnings to Kflop i/o. ?
Waiting for your kind reply.
Thank You
AMIT KUMAR
AMIT KUMAR
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: How to restart the nc program in case of power cut in kmotioncnc
Hi Amit,
I would think that would be exactly like having an external Halt button. See this part of the ExternalButtons.c exmple:
I would think that would be exactly like having an external Halt button. See this part of the ExternalButtons.c exmple:
Code: Select all
// Handle HALT
result = Debounce(ReadBit(HALTBIT),&hcount,&hlast,&hlastsolid);
if (result == 1)
{
DoPC(PC_COMM_HALT);
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 134
- Joined: Tue Feb 20, 2018 7:35 am
- Location: India
Re: How to restart the nc program in case of power cut in kmotioncnc
Hi tom,
Thanks for your reply.
Thanks for your reply.
Thank You
AMIT KUMAR
AMIT KUMAR