CNC daydreaming

Say, i did a search for Mesa cards just for grins. I see their I/O card does 8 out 16 in and is out of stack. You'd need more than one to do a tool changer.

I have used adlink's PCIe 7296 cards on several machines. It does a total of 96 I/O configurable in blocks of 24 to either input or output. This card has a linux driver, maybe work for you???


Capture.JPG
 
Say, i did a search for Mesa cards just for grins. I see their I/O card does 8 out 16 in and is out of stack. You'd need more than one to do a tool changer.

I have used adlink's PCIe 7296 cards on several machines. It does a total of 96 I/O configurable in blocks of 24 to either input or output. This card has a linux driver, maybe work for you???


View attachment 423747
Hey Karl,

The Mesa configuration that I'm looking at is the 6i25 PCIe card with the 7176 breakout card. That configuration costs about $240 when available. Of course when not available price is meaningless. But that combo has seventeen 5 volt I/O pins on the 6i25, plus: The 7I76 is a step/dir oriented breakout with 5 axis of buffered step/dir outputs, one spindle encoder input, one isolated 0-10V analog spindle speed plus isolated direction and enable outputs, one RS-422 expansion port, 32 isolated 5-32V inputs and 16 isolated 5-32V 300 mA outputs. Looks like the Yaskawa servos lean heavily on 10 volt differential signaling for digital, and 10volt analog for the spindle, so this looks like a good match if the servos are configured for step/dir operation.

LinuxCNC's general philosophy is to run a lot of things in software and uses a real-time kernel loop to handle most things. In the original parallel port implementation this was heavily dependent on system latency and corresponding jitter, so a lot of tuning/tweaking the PC config to get low latency was critical. The MESA cards use an FPGA on the card to handle some of the timing, at least at the pulse timing level, which seems to be a significant improvement. A bit of browsing on the LinuxCNC forum doesn't show any special support for the ADLINK card so I think it would end up as a fancy parallel port implementation, with the end result being that the VMC would possibly run slower and/or have more trouble doing smooth operations such as circlular operations. If all that's correct I'm willing to wait a few months to see if the Mesa cards are available.

I believe the Galil controllers are a full motion controller, so they take the front end out of the timing loop to a much larger extent.

At least that's my naive understanding of all of this, perhaps I'm missing something?
 
Last edited:
Sounds like you have good plan, looks pretty cost effective assuming it all works well.

The galil, adlink, Camsoft route would be quite a bit more expensive. Yes, the Galil card does all the real time motion control. Especially the current 18X6 cards are incredibly fast - way beyond the needs of most mere mortals. I have always used the older 18X0 cards - cheap on ebay and still much beyond my needs.

if you have the time keep us posted on your progress here. I'd like to learn more about Linux CNC control.
 
Sounds like you have good plan, looks pretty cost effective assuming it all works well.

The galil, adlink, Camsoft route would be quite a bit more expensive. Yes, the Galil card does all the real time motion control. Especially the current 18X6 cards are incredibly fast - way beyond the needs of most mere mortals. I have always used the older 18X0 cards - cheap on ebay and still much beyond my needs.

if you have the time keep us posted on your progress here. I'd like to learn more about Linux CNC control.
Gladly keep this thread updated. So far I’ve pulled an old quad core PC off my misc boat anchors stack, stripped out the fancy graphics card, and got linuxcnc installed on a 500Gb SSD. Initially got 25usec in the jitter tests. Some BIOS tweaks: hyperthreading,virtualization off, sound card and fan control off, jitter down to 21usec. Adding another pair of memory sticks should help so I ordered two. Shouldn’t be critical if I can get a Mesa card. The Mesa card is essentially a big FPGA sitting between the linux PC and the I/O lines, so it can send and decode quadrature signals, turn output pairs into differential or independent outputs, etc.

I also ordered a bigger toe jack to help move the VMC. Everything else is playing until I get it moved.
 
Last edited:
Out of curiosity, what does the jitter test do? Is this the time jitter writing to some port? 21us sounds like a lot, is this with a RT kernel?

It's no replacement for an FPGA, but a 600 MHz Teensy 4.x (standard clock rate) has no issue doing software quadrature encoder (interrupt driven) reading at 400 KHz, (2.5us) the HW quadrature encoder is much faster. This 2.5us rate is with the rest of my ELS code running. Very simple development, IMHO. Might not be suitable for your application, though.
 
Out of curiosity, what does the jitter test do? Is this the time jitter writing to some port? 21us sounds like a lot, is this with a RT kernel?

It's no replacement for an FPGA, but a 600 MHz Teensy 4.x (standard clock rate) has no issue doing software quadrature encoder (interrupt driven) reading at 400 KHz, (2.5us) the HW quadrature encoder is much faster. This 2.5us rate is with the rest of my ELS code running. Very simple development, IMHO. Might not be suitable for your application, though.
Yes, I've thought of that. GRBL is an arduino project that implements G-code, it would be the easiest approach to using an embedded microcontroller. Putting that on a Nano would be an easy, open source software approach. Still need some sort of computer in front of the microcontroller to run a GUI and feed it G-code, but no more worries about real-time. It is really just controlling 3 leadscrews verses the 1 your ELS is doing.

Since the existing servos are all 10v differential signaling, any solution is going to require some I/O hardware.

Linuxcnc requires a real-time kernel, and for simplicity the standard Linuxcnc download is a full debian install with the RT kernel. The jitter test sets up a periodic interrupt and then measures the *worst case* variation from the nominal period. That worst case is a function of other interrupts that may be occuring on the system. The real time kernel can only really control linux timing, some timing associated with multiprocessors, fans/cooling, etc are handled by the BIOS and outside of the rt kernels control. 21us is considered OK, not great (10-15us) but not bad (>30us). Getting good worst-case jitter has been the challenge in using Raspberry PI based controllers. Most full-computer CPUs are optimized for performance around human timeframes, where 1ms response is more than sufficient. There are some hacks to completely remove cpu cores from the standard multiprocess scheduling (isolcpus) that may help more.

LinuxCNC appears to me much fuller featured. It implements a broader range of G-codes, and has significant graphics visualization tools. The FPGA based hardware card is already set up with voltage drivers for high voltage controls and differential signaling, in addition to the timing. Availability of hardware is a real challenge given the current chip-shortage issues, whatever approach you take.

There are versions of the FPGA card that connect via ethernet. An intriguing and popular linuxcnc configuration is to use an RPI4 with one of those cards. The FPGA card is directly connected w/o a switch for best performance.
 
Last edited:
GRBL, I believe, has been ported to the Teensy, which to me, makes it a much more viable system. The Teensy 4.x is a pretty darn good microcontroller. 32 bit ARM M7, which normally runs at 600 MHz vs whatever a Nano is. The Teensy can flip bits in a couple nanoseconds. Beats the pants off an Uno/Nano!

Although PJRC went through a tight stretch for a bit, Teensy 4.1 is available for it's normal price. It also has built in ethernet (10/100 Mbit) should you desire to remotely control it that way. $31.50 with ethernet, although you need to buy a magjack kit for $3.90. My experience this platform has been quite favorable. Could use an RPI4 (if you have one!) for the GUI front end and let the Teensy 4.1 do the real time control.

https://www.pjrc.com/store/teensy41.html for more info. I have no financial ties or interest in PJRC whatsoever, just a happy user of Teensy4.1. For a comparison of the performance of microcontrollers, check out the CoreMark scores on that page. Won't directly translate into performance, but it give you an idea of the orders of magnitude difference between the controllers.
 
Yeah, the AVR processors used in the basic Ardiuno kits are slow and pretty limited. There really are a ton of solutions out there. Trying to figure out which one is "best" is not a trivial exercise. Arduino is optimized for *cheap*, after all "Arduino" is really a development environment not a microcontroller. Lots of options, PICO, AVR, esp32, teensy, beaglebone (Although I have had real problems with TI stuff), etc. Of course really high performance would come with using one of the FPGAs that include an ARM core on-chip.

I do actually have an unused RPI4, which I bought as a future home automation server for the workshop, but haven't gotten around to. I have more projects than hours in a day, no different than most people here!
 
Last edited:
Here's a summary of this weekend in pictures. About 9 hours of pretty intense work with skates, cribbing, toe jacks, pry bars, etc. Note the weekend ends with the VMC still sitting on the rollback ramp in front of the door of my shop. About 5pm today I started getting tired to the point where I was thinking "I just want to be done with this". That is not a safe mindset for moving multi-ton machinery. The rollback belongs to the seller. We chained it to the tractor to keep it from rolling downhill on the rather steep shop entrance. He was fine leaving it parked there overnight, or for a couple weeks, whatever works out. Nice to work with people who are easy to work with.

The frame underneath the mill is about 3' wide left/right/ and about 6' front to back. I made the call to put it on the rollback facing rearward to give it the widest stance while being winched up. It was only about 3 miles to move it, all on back roads. Trip was made at about 15 MPH. I was originally planning on renting a tilt deck equipment trailer to haul it but the fellow selling this offered to put it on the rollback given the short trip. I gave him an extra $100 today for his time and effort, a pittance in today's economy, but that was the cash I had on hand.
IMG_4871.JPGIMG_4872.JPG

IMG_4874.JPGIMG_4875.JPG
 

Attachments

  • IMG_4873.JPG
    IMG_4873.JPG
    613 KB · Views: 15
Last edited:
Back
Top