In response to the recent troll invasion: I've just started work at a CNC router manufacturer, doing control system programming. The machine I'm using to test & prototype control algorithms is Linux with the RTAI real-time patches and I/O card drivers from the Comedi project. The way to get a hard-real-time process? Build and install a ——ing kernel module! As regards communicating with arbitrary I/O cards Comedi isn't completely useless, merely so painful it should be called Tragedi.
The prototyping machine is completely in my control, so I could use Plan 9 — if I could justify writing the drivers. Trouble is, the driver for the D/A converter comes with Comedi and someone here has already written a driver for the quadrature encoder. So I'm stuck on that end. I got a lot of programming done in school using acme under Plan 9; for the first time I realize why the lunix world likes Eclipse. ☹ On the production side, I'm about to inherit the code base for the controller. Takes instructions from a PC host via USB and fans them out to separate motion controller units. And passes information back. And tinkers with the data stream when that's called for. No operating system. I miss libthread — I may yet port it for a later version, if I'm going to be contributing much to the controller rather than just maintaining it. One change I probably will make (since the data structures are all scheduled for radical change) is in the transport. The current code base has corresponding structures on different machines declared with the various "packed" pragmas and transported with byte-order-swapping — when I get my hands on it it'll be done with proper marshalling. So there we have it: sane real-time, decent hardware interfaces, libthread, and data transport methods. Plan 9 still has plenty to teach the rest of the computing world. --Joel