Novice: Why realtime is so important?

More
02 Jul 2011 16:37 #11073 by jpka
Hi!
I always dream about home CNC, and now it can become reality, i can soon get bare machine (with 3 step motors but nothing more). I never seen or touch machines before. So i outlook how the people connect it to PC and control it. For software, i found this site. I always prefer (and make myself) open-source soft- and hardware, so using Linux is not a big problem. But when i start search for controllers, i'm stuck. It looks that DIY people almost not use anything than stone-age LPT port! And more, special low latency kernel needed. Why? I can find that's due to realtime nature of CNC. I read local wiki and it says anything not real-time (or buffered designs) will not work. But i can't understand why. There isn't any feedback sensors on most cheap DIY machines. Al least, most videos on youtube shown cheap/novice machines, don't use any sensor or feedback - only one-direction control. I agree that control must be very precise itself, but what happens if i add one second delay on control line? Or one day delay? Why it can't work?
My goal is to develop not-stone-age-looks, Ethernet cheap but powerful control board. I will do it in any case, and it be precise and guaranteed to be free from real timing problems, but i want that most other users can make it and use it also, and preferably it must be compatible with linuxCNC. What also i need to know? Maybe it already being developed? I didn't find.
Thanks!
PS. I read on wiki about low-latency ethernet shield Beckhoff EtherCAT, but it control devices on the fly of ethernet packets, so it is not bit error tolerant. Such system only can be used for toys, but machine isn't a toy. I will use TCP/IP for control.

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

More
02 Jul 2011 17:01 - 02 Jul 2011 17:15 #11074 by PCW
I think the main advantage of EMCs real time design is that the machine has a single locus of control. Buffered systems are much more complicated if feedback is needed. (even a simple stepper machine may want feedback for threading, rigid tapping, probing, real time feedrate adjustment, etc) This central real time control allows great flexibility and puts per machine real time customization in a realm thats open to all EMC hardware from parallel ports up to high performance dedicated hardware.

What ends up happening if you move the motion control to an external device is that now you basically have to implement EMC on that external device if you want the same flexibility and power. If you are going to do this the best platform for floating point performance/ Ethernet/storage/cost is still a PC!

BTW Ethercat _is_ error tolerant, the data is passed a bit at at time to the next device to avoid store/forward delays, but data transfer to the final target in the slave would normally be qualified by the CRC32...
Last edit: 02 Jul 2011 17:15 by PCW.

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

More
02 Jul 2011 17:59 #11076 by andypugh
jpka wrote:

But when i start search for controllers, i'm stuck. It looks that DIY people almost not use anything than stone-age LPT port!

Not so, there are a number of PCI and PCI-e cards available and supported by EMC2, also some genuinely stone-age ISA cards.
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?EMC2_Supported_Hardware

I agree that control must be very precise itself, but what happens if i add one second delay on control line? Or one day delay?

With a stepper system, when the pulse train stops, the motor can't, because it is running at speed, and has momentum, as has the machine being moved. If there is a break in the pulse train then that inertia will over-ride the motor and move it past the required position, to an unknown state. Then when a second (or a day later) the pulse train starts again at the original speed, the motor can't accelerate instantly, so will stall.
You need a smooth, uninterrupted, pulse train to keep to the acceleration and velocity limits imposed by the physics of the hardware.

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

More
04 Jul 2011 15:55 #11144 by jpka
Hi!
I maybe forget to mention that i currently talk, mainly, about home DIY cheap machines/kits. I know many people which want to buy it, but price is essential, so we want to lower the price as possible.
LPT controllers is extremely simple and cheap. Good! But LPT hosts (hardware) is far not easy to find, buy and setup. On modern PCs it almost impossible: the pci-e solution is probably useable, but far not cheap. (and dedicated hi-perf cards are even much more expensive). On notebooks it absolutely impossible. People search (and develop?) for USB or Ethernet solutions. Usb is too weak solution. Ethernet is cheap, extremely fast (but not pre-determined delay), duplex, and motor noise- and AC coupling-tolerant. Available at any PC, notebook, Mac, or industrial computer, and work in any OS. It is modern and can't become obsolete.
I know, if some software is wokrs over LPT, then it is state of the art written and extremely far not easy to transfer it to other interface. But too many people need it! ;-) (correct me please if no:)

With a stepper system, (......)
You need a smooth, uninterrupted, pulse train to keep to the acceleration and velocity limits imposed by the physics of the hardware.

I maybe incorrectly describe before.
Let's imagine an black box which precisely delays all pulses and pulse trains by exactly one day, so output is absolutely same as input, why it can't work with EMC? Even more, let we imagine clock-recovery but one-dey-delays black box, which (slightly) arranges all pulses even more precisely than LPT can, with nanosecond jitter, and send this uninterruptable, precisely perfect pulse train to step motors but after one day from pressing start button. Why it can't work using EMC? I understand that if motor gives error movement once, then entire program now broken (we lost the coordinate). But i don't know, if (and how) realtime operation (and sensors, if any) can help here.

What ends up happening if you move the motion control to an external device is that now you basically have to implement EMC on that external device if you want the same flexibility and power. If you are going to do this the best platform for floating point performance/ Ethernet/storage/cost is still a PC!

Good idea (assuming PC is can be small cheap old board), but... Is EMC's real-time reaction to sensors is really need floating point? If no, the excellent idea will be to divide software by two parts, cute user GUI part and relatively simple developing part connected to motors. 1st part can be run on any system and kernel. 2nd part must at least work without video subsystem, and ideally be cheap microcontroller-based (they are realtime itself, really). And Ethernet connection between two parts. I can/will try to build 2nd part.

Ethercat _is_ error tolerant, the data is passed a bit at at time to the next device to avoid store/forward delays, but data transfer to the final target in the slave would normally be qualified by the CRC32

I may misread on website about microsecond delays, but in any case, this system, IMO, never can be realtime. Even if CRC used, result is useless because no time to retransmit. Even more, if bit error broke the preamble, the packet not arrives at all. So this system can be predetermined and realtime and low-latency and industrial-quality only if 1) we use forward error correction instead of CRC, 2) hardware modified to not to use preamble - continuous transfer, no packet mode (all current Ethernet hardware can't) and 3) we don't have Ethernet commutators or star wirings.

Thanks!

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

More
04 Jul 2011 17:53 #11150 by PCW
Floating point is not absolutely needed but it sure makes the motion control part cleaner and simpler...

I don't see any trouble finding PCI or PCIE LPT cards. PCIE cards being a little more expensive, perhaps $20.00 or so.

My basic point is sure you can cobble together a non real time system drip feeding a microcontroller based motion controller but this sacrifices most of the power and flexibility of EMC, and as I said before if you decide you need probing, threading, feedrate control, rigid tapping, etc, you will need to port these (and any new) real time functions to the motion controller. But this seems quite silly as EMC already supports these features with a $6.00 LPT card...

As far as Ethercat not being suitable for real time, I guess this will come as a big surprise to the many companies successfully using Ethercat for hard real time control. Not terribly surprising since Ethercat was designed for real time.

Ethercats short loop times (fastest slave error detection at master of _any_ Ethernet based real time network system because of the loop back) allows the most flexibility in dealing with errors

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

More
09 Sep 2011 18:16 #13070 by jpka
Hi!
So i finally aggregate and connect most needed stuff for my first home CNC :-) While i currently can't find interface other than LPT, suitable for home and which work out-of-box, i use LPT. I put 24V supply and stepper controller inside PC used to run EMC2. I call it Controller. It not has display and input devices. So i 1) *almost* :-) don't have lpt cable (it's completely inside Controller), 2) have lovely Ethernet connection from main PC to Controller, and 3) can mill using notebook or even from Windows, using remote desktop. (while i not use Windows for a while, this setup can look useful for others).
(But i still keep in mind about move from LPT, so if anyone has similar ideas, i will be happy to co-operate).
This setup is cute enough to place it near bed, rather than in garage. (my mill is small pretty-look popular Taiwan's 3-axis barebone, known as Sable-2015 or Panther-210 on Ebay). I also add 4th axis, tangential (step motor in place of spindle) to use it as SMD pick-and-place machine in future, but currently not find how to use it during milling or, say, for tool rotate during vinyl cutting.
This setup is also uses most widely available, cheap, standard and compatible components, so i hope it can made home CNC increasingly popular :-)
Most huge advantage is it all works using EMC2 liveCD out-of-box!
One problem is small delay in remote desktop screen refresh, but it not affect milling.
But even greater can be idea about split software to GUI part, and real-time part which ideally must operate in text mode. (maybe it already done?)
I also have some problems with setup motor controller board in Step Wizard; i write about it in new topic.
Thanks for such a great software!

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

Moderators: PCWjmelson
Time to create page: 0.142 seconds
Powered by Kunena Forum