user button for taper feed on lathe / cnc compound rest

Moderators: TomKerekes, dynomotion

Post Reply
Posts: 165
Joined: Fri Mar 15, 2019 4:07 pm
Location: southern oregon

user button for taper feed on lathe / cnc compound rest

Post by turbothis » Sun Apr 12, 2020 7:56 pm

hey, i would like to have a user button that runs a prescribed taper that has X and Z feed variables. not position
i am not sure if this exist already or what to even call it for a search
an electronic compound rest if you will.
i can do this now by setting the jog speeds and hitting both X and Z jogs at the same time but it is not to easy to achieve the angle and kinda wonky smacking 2 buttons at once
can an executive program run this from a user button jogging?
like have a text file on the desktop with a code for a X and Z feed command?

first thing is to have input variables to set the angle. example like 12" run and 2.5" rise. (carpentry lingo)
have a master Z jog feed and then a calculator thingy/part would need to output the correct feed speeds on the X to achieve this.
this is while holding the button like jogging.

example lol

Code: Select all

#include "KMotionDef.h"

#1=[12.000]                // Z run
#2=[0.100]                 // X rise
#3=[5.0]                    // main cut feed

Taper = [#2/#1]               // how much rise to do while running, "Taper" is variable?

 main ()
            jog( -X F #3, +Z F(Taper) );         // use variable to set X feed speed?
Tool Movement in Taper Turning line diagram.jpg

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

Re: user button for taper feed on lathe / cnc compound rest

Post by TomKerekes » Sun Apr 12, 2020 11:01 pm

Hi turbothis,

You could Jog along an angle from a KFLOP C Program by simply commanding the X axis to Jog at one speed and the Z axis to Jog at another speed at the same time. ie:

Jog(XAXIS, xspeed);
Jog(ZAXIS, zspeed);

then to stop

Jog(XAXIS, 0.0);
Jog(ZAXIS, 0.0);

Note the motion would not be perfectly linear while accelerating or decelerating but that would be the same as your current method.

You would also need to factor in the X and Z axis resolutions as KFLOP Jog commands work in steps and steps/second.

Another issue might be that the standard User Buttons are not momentary like Jog buttons. You could have a User Button start the taper motion and then a 2nd press could stop it. If you absolutely need momentary behavior you might add a momentary button with the KMotionCNC Screen Editor to control a Virtual Bit, then have a running KFLOP C Program monitor the bit and start/stop the jogging. Of course you could also add edit controls that could be read by KFLOP to control the angle and speed.

Tom Kerekes
Dynomotion, Inc.

Post Reply