Forward / Reverse buttons

Moderators: TomKerekes, dynomotion

Post Reply
Posts: 3
Joined: Fri Jan 18, 2019 8:00 am

Forward / Reverse buttons

Post by marker » Fri Jan 18, 2019 9:09 am


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:

But it works only forward, how to implement the reverse?

Thanks for answers. (Sorry for my English)

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

Re: Forward / Reverse buttons

Post by TomKerekes » Tue Jan 22, 2019 5:17 pm

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.

Tom Kerekes
Dynomotion, Inc.

Posts: 3
Joined: Fri Jan 18, 2019 8:00 am

Re: Forward / Reverse buttons

Post by marker » Wed Jan 23, 2019 5:49 am

Thanks for the answer

Works great

Post Reply