FPGAs and CNC machines - Page 1
Forum section: electronics / general

author: lordgarth6
author_rank: Newbie
timestamp: February 26, 2016, 11:09:54 pm
content: Im just asking around to see if fpga have a role in any type of cnc machines? If they do currently, what role do they play?also sorry if posted in wrong section.

author: uncle_bob
author_rank: Unknown
timestamp: February 26, 2016, 11:32:12 pm
content: HiFPGA's are sort of a "general purpose" way to toss things together. For most CNC's you can get away with standard drivers. If you really want to get fancy about how you drive things, you do something custom. That custom stuff at one level would be done with an FGPA in some systems. You also need stuff like power drivers to do something fancy so "custom" is only a relative term.Bob

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 26, 2016, 11:50:01 pm
content: Quote from: lordgarth6 on February 26, 2016, 11:09:54 pmnot really - big hunks of metal don't move fast enough to need and FPGA. Maybe if you're doing really fancy stuff with servo drives, but steppers can be done in software easily enough.

author: Koen
author_rank: Frequent Contributor
timestamp: February 27, 2016, 01:02:09 am
content: MESA controllers use Xilinx Spartan :http://www.mesanet.com/fpgacardinfo.htmlI can't help you more but mention they control six servos, extra linear encoders and a few pumps on our stuff.

author: uncle_bob
author_rank: Unknown
timestamp: February 27, 2016, 01:05:11 am
content: Quote from: lordgarth6 on February 26, 2016, 11:09:54 pmHiWhy do you ask? Or maybe better put, what sort of description are you looking for?Bob

author: H.O
author_rank: Frequent Contributor
timestamp: February 27, 2016, 06:45:07 am
content: Many of the motion control boards for DIY-type stuff, like the boards from MESA (as mentioned), the Smoothstepper and the KFlop and are using FPGAs.The Smoothstepper can output six axis of step and direction signals at up to 4MHz, read incremental encoders (though it doesn't use them to Close the loop) and so on.The large range of MESA boards can be programmed to do "anything" (they're even called "FPGA Based Anything I/O card") and with the correct firmware and adapter board(s) they ca do step and direction, analog servos, read encoder, close the loop and alot of other stuff.The KFlop is also a "universal" device and can, with the correct firmware and hardware, be used to output step and direction or analog control signals, read encoders and close the loop, I think it can even do dual loop.So yes, FPGAs are being used in the low(ish) end range of CNC. I don't know about the high end like FANUC and Siemens etc but I would guess it's the same.

author: awallin
author_rank: Frequent Contributor
timestamp: February 27, 2016, 07:18:22 am
content: Quote from: Koen on February 27, 2016, 01:02:09 amThere has been support for the MESA cards for years and years in linuxcnc (formerly EMC2). That means there is open-source drivers for the PC side as well as open-source firmware for the FPGA side for CNC applications (your opportunity to stand on the shoulders of giants..). In the past the FPGA usually was on a PCI or PCI-E bus, but there are newer models that use Ethernet between the PC and FPGA card.The linuxcnc approach is still one where a lot of real-time stuff happens on the PC side, and the FPGA is kept fairly simple.G-code interpretation and trajectory generation are always on the PC side AFAIK.There might be experiments with having servo PID loops (either position, velocity(~motor voltage), or torque(~motor current) ) on the FPGA. The traditional way was to have this also on the real-time PC - as mentioned above if you are moving around heavy loads then a 1 ms thread is fast enough.Things that obviously go on the FPGA are hardware PWM generators (some filter the PWM to analog), hardware encoder counters (can count up to MHz pulses), hardware step-generation (again MHz pulses, for steppers or servodrives that take step/dir).The latest firmwares are modular so if you need say 6 encoder counters and 8 pwm generators it generates an FPGA-firmware and PC-side driver for that based on a configuration file. Advanced users have shown 3-phase servordives based on the FPGA, Hall-sensor and Encoder inputs, 3-phase PWM out.Here's some documentation:http://linuxcnc.org/docs/2.7/html/drivers/hostmot2.htmlHTH,Anders

author: lordgarth6
author_rank: Newbie
timestamp: February 27, 2016, 02:17:21 pm
content: Quote from: uncle_bob on February 27, 2016, 01:05:11 amHi, i think awallin gave the explanation i was looking for.I was bascially looking at how far i could take my BEng degree project based on a fgpa, within some form of limits. At the moment I basically have just 'pimped' out a cheap robot arm kit and trying to convert it into some form of cnc arm with the precision of being a through hole pick and place machine as a way to demo it. I was really just wondering if id ever really push the fpga far enough for the it to warrant the fpga being the controller rather than some microcontroller or something else.i was also trying to find out these limits in a way i could go away and find some resources/refrences to talk around in the write up of it.

author: uncle_bob
author_rank: Unknown
timestamp: February 27, 2016, 03:56:24 pm
content: Quote from: lordgarth6 on February 27, 2016, 02:17:21 pmHiSimple answer sure you can combine the stepper stuff and the FPGA. In fact combining a design with something (like a robot arm) that is both practical *and* you have an interest in, is a pretty good idea.More complex answer, these things can easily spiral out of control complexity wise. Something that starts out simple and do-able feature creeps to the point that 40 people couldn't get it done in 2 years.Even more complex answer, the "credit giving empire" has their rules on what is and isn't appropriate. My experience has been that the three way tug of war (interest / complexity / credit) is a very different thing at each institution.Don't get in over your head !!!Bob

author: lordgarth6
author_rank: Newbie
timestamp: February 27, 2016, 07:36:20 pm
content: Quote from: uncle_bob on February 27, 2016, 03:56:24 pmYeah that 3 way tug is terrible, hopefully my supervisor would tell me if im going beyond what is required, and is meeting the criteria. At the moment im benching a lot of idea to keep the project managable so im hopefully avoiding,letting the project get out of hand. thanks for that help

author: poorchava
author_rank: Super Contributor
timestamp: February 27, 2016, 07:48:09 pm
content: I could see FPGA being useful for motion control, like generating step/dir signals from GCODE. I think DSP would be more cost effective though.Sent from my HTC One M8s using Tapatalk.

author: tggzzz
author_rank: Super Contributor
timestamp: February 27, 2016, 07:51:06 pm
content: Quote from: lordgarth6 on February 27, 2016, 07:36:20 pmDon't presume he (or any other customer) will ask. You should be active in asking questions.In the write-up you should mention your other ideas, and note they weren't followed because <fill in this bit yourself>.Thatdemonstratesyou are thinking and evaluating and deciding, all of which puts you ahead of many other people

author: uncle_bob
author_rank: Unknown
timestamp: February 27, 2016, 10:54:55 pm
content: Quote from: lordgarth6 on February 27, 2016, 07:36:20 pmHiLet's just say that 40 years of watching this process suggests that in 70% of the cases, they will quite happily allow you to sign up for way more than you can possibly do. In those cases, at the end, there always is a back and forth working out the shortfall. Much easier if things are not grossly over the top right at the start.Bob

author: lordgarth6
author_rank: Newbie
timestamp: February 29, 2016, 07:57:35 pm
content: Quote from: uncle_bob on February 27, 2016, 10:54:55 pmwow that doesnt sound good, best make sure i manage my complexity then.

author: tggzzz
author_rank: Super Contributor
timestamp: February 29, 2016, 09:27:29 pm
content: Quote from: lordgarth6 on February 29, 2016, 07:57:35 pmIt isn't that easy - you are assuming you understand the actual complexity before you start, and that requirements don't change during the project. Neither is practical in the real world, which is a serious problem for "waterfall" development methodologies.Many ways to avoid the problems with waterfall development have been proposed; they all work to some extent and all have their own disadvantages.Some ways of thinking...Divide requirements into "must have", "want to have" and "wouldn't it be nice if". (Sometimes known as base/core goals and stretch goals).Ensure that at all times the work done to date is complete/deliverable. Then work until the time runs out tackling the most important goals first. Finally, declare success.

author: uncle_bob
author_rank: Unknown
timestamp: February 29, 2016, 11:27:04 pm
content: Quote from: lordgarth6 on February 29, 2016, 07:57:35 pmHiSimply accept that it *is* a negotiation. As mentioned in another post, split the task up and only commit to the minimum number of essential goals. Get started early and flag (yell about) anything that comes up as a "bad surprise".Bob

author: kunzem
author_rank: Contributor
timestamp: March 01, 2016, 02:02:20 pm
content: shameless promotion herehttps://www.eevblog.com/forum/oshw/open-source-rpi-fpga-cnc-controller/so i had the idea to whack an fpga on an rpi2 to make it possible to run a cnc even with high step frequencies (>1MHz) that is needed if you use 256µSteps with reasonable speeds.So if you are interested in this stuff im trying to get this project open and kicked off

author: collingtech
author_rank: Contributor
timestamp: March 02, 2016, 02:19:11 am
content: hey i like the idea, can help somewhat , im triyn to get rid of computer on my cnc equation , a standalone could be nice

author: lordgarth6
author_rank: Newbie
timestamp: March 02, 2016, 02:02:31 pm
content: Quote from: collingtech on March 02, 2016, 02:19:11 amQuote from: kunzem on March 01, 2016, 02:02:20 pmSounds great, if ya shoot me a message as a reminder (if you remember yourselves haha) as i'll try jump in and help out with both, but just need the time to do it which as a student is summer (juneish).Quote from: uncle_bob on February 29, 2016, 11:27:04 pmThanks for the advice

author: Rasz
author_rank: Super Contributor
timestamp: March 02, 2016, 05:23:18 pm
content: Quote from: Koen on February 27, 2016, 01:02:09 ambut sadly its used as a glorified and expensive LPT port :/Warsaw Hackerspace (Poland) just got this one to control bridgeporthttp://store.mesanet.com/index.php?route=product/product&filter_name=6i25&product_id=58https://gallery.hackerspace.pl/BridgeportQuote from: kunzem on March 01, 2016, 02:02:20 pmwhy fpga? pee can bitbang gpio at >20MHz with ordinary C routine

author: smgvbest
author_rank: Unknown
timestamp: March 04, 2016, 01:23:09 am
content: FWIW,I've been trying to learn FPGA (My target for this is actually a CLPD (CoolrunnerII) in this case) and such and have my first design passing things in the iSim so I'm onto building a prototype of it.I use Mach3 with the MachSTDMill screen set and one thing it does is allow for a Mobile Touch Plate, Probing and Tool height touch plate using 2 input signals (Probe and Timing) they had a simple drawing of how to set it up and I though let me over engineer this (and learn) and did so mine actually had probe enables, lockout so you can't do something stupid like enable both Probe only and Probe+Timing, detects which are plugged in then lets you choose for either combining them into just Probe or the 2 wire that MachSTDMill supports it also tri-states the output when an error condition is encountered. Final version will be optically isolated but again this is hobby use not professional. I have a few more projects like that.