CNC-Lathe build go/no-go advice? (NI 6025E, steppers, 3-phase motor)

More
07 Feb 2022 12:08 - 07 Feb 2022 12:12 #234240 by jannekro
Hi!

I've been fascinated about people building nice metal lathes out of essentially scrap, so it got me thinking.. 
I have an old wood lathe (read: Motor is about the most interesting part, and possibly as using it as a bootstrapping device in the build), and stepper motors left over from an X-Carve upgrade, as well as a National Instruments 6025E-board (2 A/O, 16 A/I, 8 DIO, 2 counters..something like that), so spontaneously I'm thinking that I have pretty much all I need to make some kind of a CNC-lathe (I have ordered drivers and a PSU). 

So, without investing too much time (and possibly money) and then stepping on some mines later on, what are your spontaneous thoughts and advice?
My questions/thoughts are:
  • Is using Comedi [still] a thing, is there somekind of functioning support in LinuxCNC to configure devices supported by Comedi / how much do I need to hack away myself?
  • In the simplest case (no threading), I could let the motor/spindle do its own thing
  • With encoders / VFD added (with threading), I assume the default behaviour is that it is still up to the other axis to adapt to whatever is going on with the spindle (due to momentum), regardless of if the speed of the spindle can be adjusted?
  • Part of the point here is to "use what one has", and not necesarily what is "the easiest"  so that applies to the 6025E, motors and steppers..  so, essentially.. everything.  :)   What I'm asking for is obvious showstoppers / warnings and general know-how from those who actually know things.



    The card is from over a decade ago when I dabbled a bit with RTAI..   The download-page raised a few more questions relating to the current status of the realtimeness of everything.  Which release is ..kosher? 
/ Janne
 
Last edit: 07 Feb 2022 12:12 by jannekro.

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

More
07 Feb 2022 19:05 #234274 by BigJohnT
All the wood lathes I've seen don't have any ways or leadscrews so it would be a steep curve to get to that point. I'm not saying it can't be done because Andy does some amazing things with nothing sometimes.

A photo of the subject lathe would be a good help to get feedback.

JT

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

More
07 Feb 2022 19:59 #234281 by jannekro
As I said (or at least I think I did), the motor is pretty much all I'll be using from it, and/or combined with some milling table or the like as a bootstrapping device to fabricate parts for the actual lathe. The LinuxCNC-related questions surround more around the electromechanical hardware.. Not that I mind to discuss the other either, it's just that there isn't much more than the motor as of now.. :)

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

More
07 Feb 2022 21:11 #234290 by andypugh
I looked at Comedi once, and thought that it looked do-able. But it's a lot of trouble just to use a card that isn't super-well suited to the job.

8 x DIO is pretty tight for a lathe with steppers (and I suspect that step generation would be your problem unless you can use the timers)

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

More
07 Feb 2022 22:17 #234298 by jannekro

I looked at Comedi once, and thought that it looked do-able. But it's a lot of trouble just to use a card that isn't super-well suited to the job.

I'm not too familiar [yet] with what the dedicated boards "do" [with respect to LinuxCNC]. I was about to install it on my old machine just now to get to know it better, when I noticed that I didn't have any RAM installed anymore. :) 

I mean, I need DIOs for pulse and direction, and that's what the card does. Are specific cards "hard-coded" in LinuxCNC in some way without a more generic "Comedi"-layer that one can configure? And if not, as long as LinuxCNC has some sort of interface/intent that arbitrary hardware can be plugged in regardless of if I need to write RT-tasks to do the actual pulsing whenever LinuxCNC expects me to or not - then so be it.  But I simply do not know.  :) 

8 x DIO is pretty tight for a lathe with steppers (and I suspect that step generation would be your problem unless you can use the timers)

I'm counting on needing to control 2 steppers with essentially 2 DIOs each (step & direction), and being able to use the counters for encoders if I were to install those.  Please correct me if I haven't grasped the issues fully.

I'm off to read some documentation on the site, but I have no idea what is or isn't up to date.  Feel free to attack the idea further!

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

More
07 Feb 2022 23:15 #234306 by andypugh
The problem you are likely to find is that the card is typically updated at 1000Hz. And that means pulses can be generated at 500Hz by turning a DIO on one cycle and off the next.

The LinuxCNC parallel port driver works around this by running a faster realtime thread that runs a function that _only_ turns the pins on and off at a fixed frequency (and then every 1ms that frequency is recalculated in the main thread)

Dedicated motion control cards run a step-generator on the board itself. Every 1ms the steps generated so far are read, compared with steps to target position, a new required frequency is calculated and a command to pulse at the required frequency is sent. And then the card does that, itself, up to several MHz.

It is possible that the onboard timers on your card can be configured to run as step-generators.

The question is what project you want. Do you want to make a lathe, or want to make a Comedi driver interface for LinuxCNC. I know which I would consider the most valuable (it's the Comedi driver :-)

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

More
08 Feb 2022 11:51 #234337 by jannekro
This is the kind of stuff I was after, thank you! :)
Yes, I think you are right regarding the DIO, and the first order of business would then be to see that the support for the timer/counter has been implemented properly so that I could use them as step-generators.


>The question is what project you want. Do you want to make a lathe, or want to make a Comedi driver interface for LinuxCNC. I know which I would consider the most valuable (it's the Comedi driver :-)

Well.. The actual build probably cannot commence until summer (My garage needs work before I'll fill it with even more projects), but playing with DAQs / steppers and LinuxCNC is something that can be done in the near future. And regardless whether or not the Lathe will be built, I have other interests (such as looking into Machine Learning) which makes the use of the DAQ/Comedi/steppers relevant in any case.

So I think I know what the first few tasks are, then.
- Look at the state of the DAQ / Comedi
- Evaluate if it's good enough
- Learn how it fits/doesn't fit to LinuxCNC

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

Time to create page: 0.065 seconds
Powered by Kunena Forum