By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Allendale Jan 24th

CNC Lathe Scratch Build

All Topics | Latest Posts

Search for:  in Thread Title in  
John Haine27/09/2021 17:50:11
4170 forum posts
242 photos

I'm still not quite getting this. CNC systems usually have circular/conical interpolation so you can ask it to move in a circle or helix and the controller directly generates the XYZ moves to do this without going through a g-code step so the huge overhead of g-code interpretation is not required. Is what you are asking for in effect a generic interpolation mode, where for example it could move to follow a suitably defined curve without going through g-code?

Michael Gilligan27/09/2021 18:03:17
avatar
18924 forum posts
942 photos

Did the brief paper that I linked miss the point completely ?

… Just trying to learn a little from your adventure.

MichaelG.

Joseph Noci 127/09/2021 20:41:02
1006 forum posts
1247 photos

Michael, that paper is exactly the issue and the guts of that paper is precisely the core of what I would need to implement, Unfortunately, as with most papers, they provide the gravy and very little, if any, meat! However, its not really to complex, especially if I limit the function to basics. We will see...

Interesting paper though - positioning accuracies of 6um, etc...!

Joe

Edited By Joseph Noci 1 on 27/09/2021 20:41:55

Joseph Noci 127/09/2021 21:31:26
1006 forum posts
1247 photos
Posted by John Haine on 27/09/2021 17:50:11:

I'm still not quite getting this. CNC systems usually have circular/conical interpolation so you can ask it to move in a circle or helix and the controller directly generates the XYZ moves to do this without going through a g-code step

In fact this IS the Gcode step - It is the Gcode that tells the controller to do the interpolation, and the controller does all the math to create the cartesian moves and steps for the steppers/servos.

so the huge overhead of g-code interpretation is not required.

Not sure what you mean here - there is 'huge' overhead right here, but it is in the crunching capability of the controller - it has to do all the math after interpreting the Gcode or command.

Is what you are asking for in effect a generic interpolation mode, where for example it could move to follow a suitably defined curve without going through g-code? ----NO

Difficult for me to explain - I lack the correct terms and the appropriate math insight!

The Gcode G02 X Y I J allows the mill to generate in interpolated ARC in the XY plane.This will cat an arc in the material at the appropriate position.

If that Gcode is preceded by G17, the ARC is in the XY plane, by G18, the arc will lie in the XZ plane, etc.

Similarly G02 X Z I K generates an interpolated arc on a lathe in XZ plane, but that arc is an XZ move, such as an arc on the end of a shaft in the chuck.

If you use a rotary axis in the mill, and constrain the Y axis (as in a lathe) , the lost Y axis has to be wrapped around the A axis and you would have to use a Gcode along these lines

G02 X A(angle) I J - this is then POLAR interpolated from Y to A to generated that curve. If you machine does not have that interpolater mode it will not work. J is for XY plane

Polar interpolation on the lathe is similar, but 'not quite' - 

For example here is the basic code to mill a 40mmx40mm square on the end of a shaft:

G12.1
G42 G0 X60. Z-5. C0. F.(feedrate)  # this line is the initial; position of X and Z ( and C = Y )
G01 X40.
C20.
X-40.
C-20.
X40.
C0.
G40 X60.
G13.1
G0 Z10. M05

The C axis is not given in angles or arcs - you treat it like a Y axis, cartesian position.

So read that file with Y instead of C, for a milling machine and it is basic XY move from corner to corner.

But the G12.1 Polar mode causes the controller to convert the 'Y' position to a set of cordianted C axis and X moves...

Joe

Edited By Joseph Noci 1 on 27/09/2021 21:42:25

Edited By Joseph Noci 1 on 27/09/2021 21:42:50

John Haine28/09/2021 10:02:27
4170 forum posts
242 photos

**LINK**

https://www.kadirilkimen.com/thepolarbear/

Could this open-source project be useful?

blowlamp28/09/2021 10:31:35
avatar
1516 forum posts
98 photos
Posted by John Haine on 28/09/2021 10:02:27:

**LINK**

https://www.kadirilkimen.com/thepolarbear/

Could this open-source project be useful?

That looks interesting, John.

There's also a 'Polarizing Converter' that may be of some use to Joe here. There is no 'C' axis label available, but if the basic conversion is OK, then it might be a simple Search & Replace in Notepad.

Martin.

Joseph Noci 128/09/2021 12:13:31
1006 forum posts
1247 photos

The method chosen by the PolarBear designer is to post-convert a standard, non-polar Gcode file into cartesian and angular segments. That is as we discussed in our posts. To expand on the downside - A polar interpolation kinematic would interpret the polat Gcode commands and generate output 'commands' ( step pulses, ie, the smallest resolution increment possible on a given machine) driving the axes along the cut path. To obtain that same resolution ( which you DO need if you look carefully at the hyperbolic path motion for our square in the C axis) in a post-processed Gcode file would mean thousands, maybe 10's of, Gcode lines converting Polar to small coordinated X and Caxis moves. In addition, the surface finish suffers because the feed rate cannot be properly interpolated down to individual Gcode moves, and so impossible to maintain any constant feed rate or material removal rate.

In the standard Caxis/Xaxis G12.1 interpolation, feed rate is normaly inverse time as well, which gives constant cutting edge feed, while the Caxis motion rate can vary hyperbolically

See what Polarbear says..

I had to develop a postprocessor for g-codes:

**LINK**

This postprocessor imitates the polar movements that would be run by a cartesian controller. This works great too. But it is not efficient. It generates twice or more g-codes and it cannot run the machine at efficient feed rates. Even if we calculate the best feed rates, the firmware will treat the movements as cartesian and recalculate the decelerations and accelerations, which would be wrong for polar motions.

Therefore, without special firmware for polar and cross slide motion, the machine often runs at inefficient feed rates.

My brain is so wrapped around this C axis at the moment...head spinning.

blowlamp28/09/2021 12:46:39
avatar
1516 forum posts
98 photos

Surely this would do it? smiley

Edited By blowlamp on 28/09/2021 12:46:59

Joseph Noci 128/09/2021 13:19:33
1006 forum posts
1247 photos
Posted by blowlamp on 28/09/2021 12:46:39:

Surely this would do it? smiley

Edited By blowlamp on 28/09/2021 12:46:59

Sent a request for the supported Gcode list - lets see!

Joe

blowlamp28/09/2021 14:01:17
avatar
1516 forum posts
98 photos

Get the GSK980TDc manual here.

Joseph Noci 128/09/2021 15:39:54
1006 forum posts
1247 photos

Get the GSK980TDc manual here.

Nope, No G12.1, G13.1 nor G112 / G113, so can't do!

And thats the story of my life..

Joe

blowlamp28/09/2021 15:53:03
avatar
1516 forum posts
98 photos

Are you sure?

This is from the manual I downloaded.

gsk280tdc.jpg

Joseph Noci 128/09/2021 21:59:17
1006 forum posts
1247 photos

Well....

I clicked on the link you gave and abt half way down is a table of supported G codes, and G12.1 et-al is missing so looked no further. After what you posted I downloaded the whole manual and it is as you say!

I need to dig some more - $3K is a lot of money, but if its not good money after bad, may just be my way out!

Thanks for this info!

Joe

blowlamp29/09/2021 11:32:48
avatar
1516 forum posts
98 photos

There's a whole range of these CNC lathe controls here.

I notice UK ebay has a GSK980TDc available for a little over £1000 at the moment, but some of the buttons have Chinese characters - still worth a look, I think.

Martin.

Joseph Noci 105/10/2021 07:21:44
1006 forum posts
1247 photos

Been some progress on the Polar Interpolation. The Polar Interpolation software is working well and tested with a simulator to verify the math. In fact, the math, and the software turns out about 20 lines of code, so very simple.

The big issue is in the integration with Linuxcnc itself - and this is in line with the usual Linuxcnc pains...

Switching from 'trivial-kinematics' (essentially cartesian kinematics, with arc's) to 'Polar-kinematics' (with G12.1 g-code - which we had to create and make Linuxnc believe it exists..) is not simple. Since the last axis position before G12.1 was a 'cartesian' one - with a relationship to the machine coordinate zero, and to the work coordinates zero, with tool offsets, when we enter the polar mode, we have to convert that position to a polar one, with the tool remaining in irs current position - so, forward and reverse kinematics, and right now it does not work because linuxcnc is rather convoluted in the way one has access to parameters related to all the machine and work coordinates.

This project was all about the challenge of the mechanics, never about the software - Boy, was I wrong!

I decided against the Chinese 'GSKxxx' type controls - scares me a little since when I ( and I will..) find some issue that the controller does not do, improper polar modes, or any thing even very small, there is nothing I can do about it...At least with Linuxcnc I can fool myself into the belief that I can make it work, even if it's now good time after bad!

Joe

Edited By Joseph Noci 1 on 05/10/2021 07:23:20

Joseph Noci 114/10/2021 18:11:09
1006 forum posts
1247 photos

Sloowww progress, but at least it is progress.

The Polar interpolation is working well - I have not machined anything so yet, but with a sheet of aluminium centered on a shaft in the chuck and a sheet of paper glued to it, pen in the tool holder, I am drawing very respectable squares,hexes, etc on the paper.

issues to contend with now are re-homing the C axis when exiting the polar modes, etc, but those are minor and fairly simple.

However, I am frustrated now by what I thought was resolved and simple!

I am having a lot of trouble with tool offsets sometimes violating machine limits. This issue is specific to Linuxcnc, so general tool offset management and definition processes for Fanuc, etc, won't help...

Is there anyone who has a lathe running Linuxcnc who can chip in and help me understand the tool offsets procedure please...!?

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
Eccentric July 5 2018
cowells
JD Metals
walker midge
BOLDON
emcomachinetools
Warco
rapid Direct
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest