Hi, Quick search on FT2232H data for latency speaks about milliseconds. So definitely out of question for realtime control.
There aren't so much possibilities available (to communicate between PC and external electronics with short latency), I'll try to list few of them here: 1. USB. at least FTDI chips seem to be way too slow for closed loop systems. 2. USB with inner loop/loops outside of PC-Linux. In this scenario, closed loops (servo-current-loop, servo-torque-loop, servo-speed-loop, servo-position-loop, multiaxis-synch-loop, and possibly toolpath-follower loop) are integrated to FPGA and/or microcontroller. 3. Ethernet. I guess these aren't fast enough in stock drivers. At least there is no guarantee of latencies. 4. Ethernet with special drivers. Some ethernet card could be paired with a special kernel mode driver to ensure latency issues. In the other end of ethernet there could be FPGA and/or microcontroller. 5. Legacy LPT-port. Not feasible in today's computers. Guaranteed to have consistent latency though. 6. PCI / PCIe card. This is known to have extremely low latency, if properly used. 7. PCI / PCIe card which communicates to an external FPGA and/or microcontroller. 8. Porting the whole EMC2 kernel mode sw to ucLinux or other microcontroller based Linux port. 9. I cannot find any other interfaces to PC, having low latencies. Unless SATA interface, ... , forget it. Analysis: 1. Not feasible. 2. Feasible, and might be quite good solution especially if external parts include microcontroller. Most FPGAs can be programmed to function as a microcontroller, and at least Altera has quite good tools to do that (and DIY-friendly licensing policy). 3. I don't have enough knowledge of Linux internals to say anything valuable on this. 4. This could be pretty good solution too. Ethernet allows several targets (through switch) and allows longer cables (than USB), which is definitely a plus. This requires a FPGA/uC board with ethernet connectivity. An option could be: http://www.freescale.com/webapp/sps/site/overview.jsp?code=TWRMODULEMAP Freescale has launched new ARM Cortex M4 series controller family (Kinetis). Their tower system DevKit inlcudes USB, Ethernet, GPIO, Serial ports, ... And the uC is fast enough to do realtime stuff needed. 5. ... 6. PCIe is the standard to follow. I guess legacy PCI will drop out of motherboards in few years. The card could be fixed-function (e.g. commercial IO-card), or an FPGA based. Lattice, once again, (no, I am not working to Lattice) has another quite sweet DevKit (Versa): http://www.latticesemi.com/products/developmenthardware/developmentkits/ecp3versadevelopmentkit/index.cfm Which is $99 only, for a short period of time. Later on $299. The development needs GPL-licensed PCIe FPGA-core. Developing one is not feasible (in the context of EMC2). The con is that all GPIO connectivity is from the PCIe card. Some flexibility could be gained by utilizing external PCIe, which allows the PCIe card to be placed few (I guess not more than 3) meters from the computer. 7. The Lattice Versa kit has fast IOs, including dual gigabit ethernet. If the card could be used as a tailor-made ethernet card, then the actual IO-expander could stay far away from the PC. Other thoughts as per 4. 8. New microcontrollers are quite powerful. Their performance should be enough to do all needed calculations. E.g. Freescale Kinetis will have floating point support in later releases. This would be quite tedious task. And kill the DIYability from most of today's users. Against these options, my personal long term solution would be #4, with a(n open source HW) board equipped with powerful uController AND FPGA, with ethernet connectivity. It could be a assembled PCB orderable from e.g. Olimex http://www.olimex.com/ or a ready made package with water proof casing. Before having such board, the development could be done with existing DevKits. - Topi On Wed, 2011-06-15 at 21:54 +0200, Lars Segerlund wrote: > I''m planning on using a ft2232H for a stepper setup, since it does > buffering and clocking to spi ... > Everyone is so negative to usb but you can have 'synchronous transfer' > with limited bandwith but guaranteed transfer, so actual data looks > quite positive. > > Check these links, linux realtime and real time device drivers. > > https://www.osadl.org/Migration-Portability.migration-portability.0.html#c1006 > https://www.osadl.org/RTDM-native.howto-rtdm-native.0.html > > Using a microcontroller for fx. servo loop, and just data through USB > changes the game, latency for the feedback to computer but acceptable. > > / regards, Lars Segerlund. > > > 2011/6/15 Topi Rinkinen <[email protected]>: > > Hi, > > > > I've been studying different DIY-CNC options for about a year now, and I > > feel that LinuxCNC is in pretty good shape to play with (have not played > > with it, though). > > > > I am a professional FPGA designer, and I would like to contribute to EMC > > if FPGA-design is needed. > > > > I feel that adding support for the following "IO-card", better > > performance and scalability could be achieved: > > http://www.latticesemi.com/products/developmenthardware/developmentkits/machxo2picokit.cfm > > is evaluation card for Lattice's brand new CPLD/FPGA. And the best part > > for real-time system is FT2232H > > http://www.ftdichip.com/Products/ICs/FT2232H.htm > > chip, which can be utilized to transfer upto 40 Mbytes/second to the HW. > > > > The price of DevKit is only $29, which is a third compared to > > MORPH-IC-II > > http://www.ftdichip.com/Products/Modules/DevelopmentModules.htm > > (Which also could be used for EMC) > > > > How do you feel, could the USB+FPGA based IO expansion be utilized in > > EMC? Which kind of functionality should be embedded there? > > > > What constraints should I recognize? > > > > Other thoughts? > > > > BR, -Topi > > > > > > ------------------------------------------------------------------------------ > > EditLive Enterprise is the world's most technically advanced content > > authoring tool. Experience the power of Track Changes, Inline Image > > Editing and ensure content is compliant with Accessibility Checking. > > http://p.sf.net/sfu/ephox-dev2dev > > _______________________________________________ > > Emc-developers mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-developers > > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers > ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
