Lathe spindle question turning and milling.

More
26 Jan 2025 19:13 #319908 by Jdolecki
I want to replace my spindle motor with a servo.

How  does the servo driver know I want to switch from turning to position for milling?

Thanks
 

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

More
27 Jan 2025 10:05 - 27 Jan 2025 10:10 #319940 by Aciera
Replied by Aciera on topic Lathe spindle question turning and milling.
If you are referring to switching between lathe-spindle and rotary-axis operation with a servo controller then

1. there is 'caxis.comp' which seems to be used for this (but I'm not familiar with it)
forum.linuxcnc.org/10-advanced-configura...omp-problems?start=0

2. if your servo controller allows switching between velocity (analog input) and position (step/dir input) by using a digital input signal.
This worked for me:
forum.linuxcnc.org/10-advanced-configura...code?start=30#272218
Last edit: 27 Jan 2025 10:10 by Aciera.

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

More
27 Jan 2025 13:56 #319949 by spumco
Replied by spumco on topic Lathe spindle question turning and milling.

How  does the servo driver know I want to switch from turning to position for milling?
 

As @Aciera pointed out, there are (at least) two methods for combining a velocity-mode spindle with a position-mode C-axis.

In Aciera's first example (caxis.comp) the servo driver doesn't 'know' anything about turning vs positioning.  The drive is put in position mode, and LCNC (via caxis.comp and PID tuning) handles positioning vs velocity commands.

In the second example, the drive itself is switched between velocity and position modes using an input on the drive.  LCNC handles the mode switch command, as well as appropriate outputs to the drive depending on which mode is desired.

Neither one of the methods is 'official' Linuxcnc.  That means you won't find official simulations & examples, nor will you find caxis.comp in the official repository.

If you only need to index the C-axis, it will be significantly easier to use orient.comp to position the spindle.  Simplified, orient.comp works by creating two PID loops (one for velocity, one for position), and switching between the two using an M-code.  With orient.comp, there is no 'C' axis available to command - just the spindle through M3/M4/M5 and M19 to position it.

When stopped, the spindle can be positioned at any location using an M19 command - just fine for drilling or X/Y axis milling.  And with a servo-driven spindle the position should be pretty stable.  Heavy milling or drilling which imposes a significant rotational force on the spindle would likely require a brake of some sort.

However, if you need continuous spindle movement coordinated with one or more other axes (X/Y/Z) during milling you will have to use one of the above 'unofficial' methods (or create a new scheme).

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

Moderators: piasdom
Time to create page: 0.056 seconds
Powered by Kunena Forum