On 23/01/2020 18:17, Chris Albertson wrote:
The trouble with the Mesa FPGA design is that it depends on a computer with
good real-time performance.

It's rare to find a PC that can't maintain the 1kHz timing loop. Most can even do this using Ethernet to communicate with the Mesa board. I have 4 machines using this exact arrangement. Two are running off cheap thin clients picked up off eBay. I think the other two mini PCs came from Ali Express. My lathe used to run off a Dell until that failed and was replaced by a HP machine I happened to have laying around. It now runs a Wyse thin client.

It can generate steps but I don't thing you
can run a position or velocity PID control loop on the FPGA.

The Mesa FPGA is easily powerful enough to run a PID loop but there is no need to do so. Let's face it PID loops are pretty simple and can be implemented with basic fixed point math.

There is some merit in moving the whole real-time section to a dedicated hardware platform and this is what most commercial CNC machines do. However that leaves you tied in to whatever hardware platform you have selected. My Hurco mill is a good example. It's motion controller board failed and Hurco could not supply a replacement or repair the board. The owner ended up selling it to me for pretty much scrap price. It is in pretty much perfect mechanical condition.

Will your $2 board be available in 10 years? I wouldn't be surprised if it becomes difficult to obtain within 2 years. Short of the planet being hit by an asteroid or similar disaster, you can be sure hardware running Linux will be available in 10+ years.

If Mesa were to go out of business tomorrow it would not be a huge task to develop a replacement for the FPGA board because it does not have to do all that much.


You asked about "my controler".  No this is not my idea, this is how most
current designs work today.  You "push" the real-time control down stram as
close to the physical motor as possible.

By 'your controller' I wasn't really referring to your specific hardware. I guess I should have said 'the controller'.

Most of the CNC machines I have worked on use a PC based GUI and a PLC or similar motion controller. That then talks to the drives, which are usually relatively dumb (velocity or torque control). The exact implementation varies but the basic topology remains pretty much the same. Having intelligent drives with built in trajectory planning causes more problems than it solves.

So how complex is the controller?  Very complex.  It is an entire 32-bit
computer with FLASH memory and USB running an RTOS.

I'm not talking about the complexity of modern microcontrollers. The complexity is in the software.

When it comes to debugging there is no comparison between Linux/Windows and embedded hardware. Arduino has virtually no real debugging support. You can't even use breakpoints. Want to see the value of a variable at a certain point? You can't set a watch or a breakpoint so your only alternative is to write some code to print that value to a terminal, recompile, download etc. Even when using JTAG or other dedicated debugging interfaces, debugging tends to be flaky and limited on most microcontrollers. I've worked with embedded processors for many years, everything from 8051 in assembly to various ARMs in C++. I've developed all sorts of stuff from DSP harmonic synthesis to networked I/O controllers with many hundreds of I/Os so I have a pretty good knowledge of what is involved in embedded development.

Open source projects have to have a very low barrier for entry to succeed. The harder it is to start developing the fewer developers you will have that are willing to work on it and therefore the less likely that project is to succeed. There are far more developers who are familiar with Windows/Linux than there are that are familiar with STM32 development. Is LinuxCNC the perfect solution? Maybe not but it works and it works well. I've used Mach, UCCNC, Eding CNC and even developed my own hardware and software. If I want something that is reliable, versatile and keeps working LinuxCNC is the best I've found without spending huge amounts of money.

As a reference, I have a few quadcopter racing drones.  These use four
three-phas brushless motors that must be controled VERY accuratly using an
8000 Hz PID loop.


The drives may be using pretty powerful processors but if you take a step back they aren't much different from the 30+ year old 'dumb' Siemens analog drives in my router. You send them velocity or torque commands and the return velocity or position data. How they actually do that is merely an implementation detail.


The main
computer runs an RTOS and talks to the two digital radio, IMU and GPS.
  Fits in a 32mm space and costs maybe $30.  Again VERY complex but they are
easy to use.

Easy for the end user but not the developers. I have been involved in tri and quad copters since the early days when we were using repurposed helicopter tail rotor gyros and hacked together hardware hanging off Arduinos. I was involved in OpenPilot for a while as well as developing my own RTOS and hardware. Again, hardware availability is an issue. Flight controllers are commodity items. They have a useful life of maybe a couple of years at best. CNC machines have useful lives much longer than that.

Les



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to