Developments on my Home built 5C CNC Lathe - Polar interp. and Live tooling

18 Dec 2023 13:14 - 18 Dec 2023 13:28 #288481 by spumco

Sorry re the confusion - As I had started this topic and COHAL's post did not address anyone specific ( that I can see) , I thought it was meant for me..

I wonder how that PP works in milling - it must do all the polar interp itself and output thousands of small moves to all the axis to follow a polar path in cartesian fashion. How is the PP written? Do you have source code?



I was mistaken.  The post does, in fact, use the polar interpolation function in the control.  Mea culpa.


No worries, COHAL wasn't specific.

The PP is a text file, and the post dialect is specific to F360 and other Autodesk products.  If you're interested in the post you can open it up in any text editor and poke around.

If you're really, really interested, you can use some tools to see exactly what parts of the post are responsible for sections of the g-code output file.  To this end, there are a couple of plug-ins available for Visual Studio Code which work with F360 posts.

Those plugins let you export a raw 'dump' file from F360, run it through the PP inside VS Code, and present you with a split-screen.  One side is the PP file, the other is the g-code output.  The magic is that when you click/select a section of g-code, the part of the PP file responsible for generating that g-code is automatically highlighted.  Makes post editing (and reverse-engineering) much easier.

NYCCNC's covered this process in one of their YT videos, as have a number of other YT channels.

Of course, you'll need F360 installed to do this, but the free version works fine.  And XZC movements are only 3-axis - no need for paid 4/5 axis manufacturing extensions.  I understand & sympathize with your reluctance to get involved with F360 (and other subscription-based software), but if you're interested in the post it won't cost you anything to have a go at it.

If you (or anyone else) has a look in the post you'll actually find some sections which deal with polar interpolation.  I believe this post was recycled by the author and modified to suit my lathe control... not written from scratch.  My inexpert review of the post has discovered some sections which are pretty clearly not specific to my control (i.e. subspindle) so I think the polar interp is a leftover.  There is no circular interp in the post matching my control (G7.1), yet radial milling still works... reinforcing my suspicion that F360 and the post are handling axial/radial milling operations without triggering the control's polar/radial interpolation modes.
Last edit: 18 Dec 2023 13:28 by spumco.

Please Log in or Create an account to join the conversation.

18 Dec 2023 13:36 #288485 by spumco
Egg on my face to anyone reading this.  It's been a while since I've used live tooling on my lathe and I simply forgot how the post works.

Yes, the post DOES invoke polar interpolation in the control... meaning if anyone wants an LCNC post (based on my post) with C-axis milling they will have to use some sort of polar interpolation switchkins.

Here's a section of axial milling I just dug up:
Warning: Spoiler!

  • G12.1 Polar Coordinate Interpolation ON
  • M52 C-axis ON
    • This disables the main spindle motor
    • Fires an air cylinder which forces the C-axis stepper in contact with the spindle bull gear
    • Homes the (now) C-axis using the spindle-mounted encoder.
  • M13 live tool ON, clockwise
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

18 Dec 2023 19:55 #288511 by COFHAL
In that sense you are wrong, the carousel component does not do what you say, it rotates until it finds the selected tool through the sensors installed in the ATC, as you can see in the attached video. I used hall sensors configured as gray code, not binary, which are activated by contact with magnets installed on a disk that rotates with the tool changer. I also used a stepper motor but configured in speed mode. And I was careful to install another hall sensor that detects when the turret is unlocked and also another sensor to detect low air pressure and through an AND activate the stepgen that controls the ATC engine motor. I did all the implementation with the help of Andy, who developed this component and as he himself indicated to me, for a lathe the implementation was simpler than for a milling machine.

A live tool was also installed, but since the turret was already built, it was decided to use one of the tool pockets to install it using a coupler that disengages from the live tool motor when the turret is activated by the pneumatic piston, this is Taken from a YouTube video of someone who implemented it like this and who also uses LCN
The following user(s) said Thank You: besriworld

Please Log in or Create an account to join the conversation.

18 Dec 2023 20:00 #288513 by COFHAL
Dear spumco
Thank you for your contributions and for sharing the post-processing.r
The following user(s) said Thank You: tommylight, spumco

Please Log in or Create an account to join the conversation.

19 Dec 2023 04:39 #288543 by spumco

I've installed caxis.comp and gn_userkins.comp and edited my HAL and INI files.  After a couple of typo corrections LCNC starts up with no errors.

NOTE - I renamed gn_userkins.comp to polar_userkins.comp, and edited all the files/pins that refer to gn_userkins.  No offense intended, but 'polar' helps me remember what stuff is doing.

I can see all the caxis pins in halshow, and I can watch caxis.0.state change from 0 to 2 and back when I start/stop the spindle (M3/M5).  So the spindle still works - yay!

First hurdle...  homing.

When I try to home C-axis, the spindle just rotates at about 60rpm until the f-error piles up.  Nothing seems to be setting the index-enable pin, so it doesn't stop.  Once it errors the machine turns off (in software), and if I turn it back on it resumes the homing attempt.

I've got HOME_USE_INDEX = 1 in INI, and if I unlink & set index-enable = true I can watch the index pulse trigger.  So nothing really dumb like a faulty index signal from the encoder.

Any ideas where to start troubleshooting?  spindle HAL and INI attached.

The following user(s) said Thank You: besriworld

Please Log in or Create an account to join the conversation.

Time to create page: 0.290 seconds
Powered by Kunena Forum