Getting started with threading.....

Moderators: TomKerekes, dynomotion

Post Reply
SamMarrocco
Posts: 51
Joined: Fri Apr 27, 2018 12:44 pm

Getting started with threading.....

Post by SamMarrocco » Wed Oct 21, 2020 1:16 am

I have my KFlop synchronizing with my spindle using an encoder. I've never done threading before but have rudimentary knowledge of the process. Wondering if someone can fill in what i may be missing here......

On my Lathe I am attmpeting the most simple of setups using G32 as follows....
image0.jpeg
image0.jpeg (12.29 KiB) Viewed 364 times

My cutting tool is queued up at +1.0 on the Z axis.
My goal is to cut evenly spaced threads from 0 to -1.0, then decelerate afterwards.
WIth the spindle turning, I run my GCode:
G32 Z-1 F.125

I was expecting the Z-axis to accelerate up to speed within a portion of an inch, hit full speed by 0, then continue at full speed until a portion of an inch from -1.0. Instead, the Z ramped up to speed very gradually, hit full speed at 0, then immediately began ramping down to stop at -1.0. Therefore, my thread pitch was only correct at precisely 0.0 for 1 rotation of the spindle. Essentially my Z-speed was a ramp up to full then back down with no linear speed in between.

I've tried changing the spindle speed from very slow to very fast while experimenting with no change in this behavior. Spindle speed seems to be registering correctly and was checked with a tach....but this seems more about the ramp up /linear/ramp down behavior. I haven't attempted any threading codes other than G32 at this point.

Am I missing something that is preventing my thread from being cut at a linear Z speed? Any suggestions are appreciated.

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

Re: Getting started with threading.....

Post by TomKerekes » Wed Oct 21, 2020 1:40 am

Hi Sam,

How are you changing the Spindle Speed? An S word must be placed in the GCode so the GCode Interpreter knows the expected Spindle Speed when the G32 code is encountered. If the S word is set to a huge value the Interpreter will think the Z axis must move really fast and will then plan a large distance to ramp up. Are you specifying an S Word in the GCode before the G32?
Regards,

Tom Kerekes
Dynomotion, Inc.

SamMarrocco
Posts: 51
Joined: Fri Apr 27, 2018 12:44 pm

Re: Getting started with threading.....

Post by SamMarrocco » Wed Oct 21, 2020 3:57 am

Tom,

I am currently not changing the spindle speed in GCode as my spindle is not controllable (by software). I set the speed of the spindle with a hardware 'knob'.

I will explore the 'S' word....thanks for the clue.

SamMarrocco
Posts: 51
Joined: Fri Apr 27, 2018 12:44 pm

Re: Getting started with threading.....

Post by SamMarrocco » Thu Oct 22, 2020 1:20 am

Tom,
Using the S word with my spindle speed is curing my "lack of linear speed" issues. Thank you for that.
It had not occurred to me that, while the hardware knows the speed of the spindle, the interpreter does not and must be 'informed'. So, knowing that my spindle speed adjusts its torque as needed, varying the speed slightly during use, does the fact that I am telling the interpreter a constant speed (i.e. S300) throw off anything if the actual speed of the spindle varies (say, from 290 to 320)?

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

Re: Getting started with threading.....

Post by TomKerekes » Thu Oct 22, 2020 3:56 am

Hi Sam,

No it shouldn't. Except with regards to acceleration. If you specify S300 the trajectory planner will make an acceleration profile based on 300RPM doing maximum acceleration. If the speed is actually slightly higher then slightly higher acceleration will be needed to follow the trajectory at the higher speed (Its actually a square relationship so 10% higher RPM will require 21% higher acceleration). So provide some margin for this in your trajectory planner settings for acceleration.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

SamMarrocco
Posts: 51
Joined: Fri Apr 27, 2018 12:44 pm

Re: Getting started with threading.....

Post by SamMarrocco » Thu Oct 22, 2020 12:17 pm

Thanks, I'll allow for it in the calculations.

Post Reply