Hello
On the main KmotionCNC screen there is a button "FEED HOLD".
When you press it, the G code stops running and 2 additional Forward / Reverse buttons appear.
I need to manage these commands from the C program.
To stop / start, I use the command:
if (ReadBit (33)) // Watch an external input switch
{
StopCoordinatedMotion (); // feedhold
}
else ResumeCoordinatedMotion (); // resume feedhold
Question: how to manage forward / reverse commands
There is a command to control the steps in the G code:
DoPC (PC_COMM_SINGLE_STEP);
But it works only forward, how to implement the reverse?
Thanks for answers. (Sorry for my English)
Forward / Reverse buttons
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2677
- Joined: Mon Dec 04, 2017 1:49 am
Re: Forward / Reverse buttons
Hello marker,
Sorry I somehow missed this.
You can command forward and reverse motion within KFLOP along a path by calling the function:
void SetFROTemp(float FRO); // Temporarily change from current to the specified FRO using a nominal rate, override FeedHold, don't save as LastFRO
With something like SetFROTemp(0.2); or SetFROTemp(-0.2);
Regarding DoPC (PC_COMM_SINGLE_STEP); - there isn't any command for single stepping GCode in reverse. However when reverse feeding the GCode Line number that created the motion should update automatically.
Sorry I somehow missed this.
You can command forward and reverse motion within KFLOP along a path by calling the function:
void SetFROTemp(float FRO); // Temporarily change from current to the specified FRO using a nominal rate, override FeedHold, don't save as LastFRO
With something like SetFROTemp(0.2); or SetFROTemp(-0.2);
Regarding DoPC (PC_COMM_SINGLE_STEP); - there isn't any command for single stepping GCode in reverse. However when reverse feeding the GCode Line number that created the motion should update automatically.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Forward / Reverse buttons
Thanks for the answer
Works great
Works great