6 ms·
In PC based CNC systems, there is almost always dedicated hardware separate from the PC that is feeding the motor drivers, because Windows and Linux are not tru
by tmuir 13y ago
In PC based CNC systems, there is almost always dedicated hardware separate from the PC that is feeding the motor drivers, because Windows and Linux are not true real time operating systems. A cnc system must have a timing resolution much finer than is available in traditional general purpose operating systems.
In general terms, a cnc system must convert high level instructions, like G-code, in to voltage pulses that are fed to either stepper or servo motors.
Some of these calculations are performed on the PC, others are performed on the dedicated hardware. Do steps 1, 2, and 3, send step 3's result over usb to the controller, then perform steps 4 through 10.
Not everyone agrees where to place that barrier.
In the case of GRBL, which is the firmware that runs most of these hobbyist level 3D printers, the entire process happens on an 8 bit microcontroller, from G-code to steps.
Other cnc systems perform almost all of the calculations on the PC, and sends a representation of the timing information to the controller.
Still other systems decode the G-code into vectors and other intermediate representations, and let the controller do most of the heavy lifting.
Some systems transmit their data over USB, a standard ill equipped for industrial environments or cable lengths more than about 10ft. Others use ethernet. I'm sure there are others that use RS-485, or even proprietary protocols.
Is Microsoft accounting for any of these variations, or are they going to standardize everyone to whats popular today, which is usb and 8 bit microcontrollers that can't even create 50,000 steps per second?
- jacquesm 13y agoIt's easy to do realtime control on a linux box, simply run your program as root and disable interrupts. Every time you're 'safe' (stopped, or very low speeds) you can safely enable/disable interrupts to make sure all your hardware gets serviced and to poll for UI input. I've controlled a 3D mill/plasma cutter like this at very high speeds.
- tmuir 13y agoThat's not going to sell a lot of units, though. Its hard enough to get a machinist to set up a cnc system with a full gui. You want him to disable interrupts on Linux? Just shoot me now.
- jacquesm 13y agoNo, you can use a GUI, you just need to do your polling when you know it is 'safe'.
- tmuir 13y agoI honestly don't have any experience with linux cnc. A lot of what forms my opinion is the controller's marketability. Many controllers do not ship with a PC, which is a great selling point on one hand, but a limiting factor on the other hand. If a controller came with, or just was itself, a dedicated host, and is the only supported host, then linux is definitely a viable option that doesn't create any barriers to entry. But if a company is simply building a controller, and requiring the customer to provide a PC, I see it as a no brainer business decision that the PC runs windows, and not linux.
- npsimons 13y agoOr, you know, use one of the half dozen RT variants of Linux.
- anonymfus 13y agoWhat if 2 applications will do it?
- obtino 13y ago> It's easy to do realtime control on a linux box, simply run your program as root and disable interrupts If this were the case, how would the clock/time on the OS work?