bkb2005 Posted August 17, 2010 Report Share Posted August 17, 2010 Hello, I have the following configuration: (1) cRIO 9025 controller on a NI 9118 8-slot Virtex-5 FPGA chassis, loaded with AI/TC modules (2) NI 9144 8-slot EtherCAT expansion chassis connected to the 9118 via EtherCAT, loaded with AI/TC modules I have been tasked with recording data on ALL of these channels at 1000Hz. I have been toying with various types of software architectures and cannot come up with an optimal system. I would like to log data directly to the cRIO 9025's on-board storage (and later retrieve via FTP). What is the best way to approach this? What type of architecture should I be using? Any help is very appreciated. Thanks! Quote Link to comment
bkb2005 Posted August 17, 2010 Author Report Share Posted August 17, 2010 Since I can't use one FPGA to access both chassis, I'm trying to create two FPGA VIs that use FIFOs back to the Host RT VI, which reads them in an alternating fasion and dumps to disk. Has anyone tried this? Quote Link to comment
Tim Erickson Posted August 17, 2010 Report Share Posted August 17, 2010 You have to use User Defined IO variables. There is a limit on how many you can use. See: http://zone.ni.com/devzone/cda/tut/p/id/10618 Quote Link to comment
Mellroth Posted August 17, 2010 Report Share Posted August 17, 2010 You have to use User Defined IO variables. There is a limit on how many you can use. See: http://zone.ni.com/d.../tut/p/id/10618 I'm not sure you can reach the 1kHz requirement using IO variables, I would rather use the Scan Engine Advanced I/O access API. Especially if the I/O count increases. Using this API you can read/write more than one channel at the time. It also means that you can make the application much more dynamic, since added modules can be automatically handled without recompiling the application. http://zone.ni.com/d...a/tut/p/id/8071 /J Quote Link to comment
bkb2005 Posted August 17, 2010 Author Report Share Posted August 17, 2010 I just compiled and tested 128 AI channels being sent through a FIFO @ 1000Hz to a real-time host. It works, very fast, no jitter/lag. Is there a limit on the number of FIFOs I can create? Just to clarify: 128 AI channels sent from FPGA to RT Host via DMA FIFO. I will need to create multiple FIFOs to get thermocouples and other such things across as well. I have also found something very interesting, the difference between a Thermocouple module and an AI module is the fixed-point data type. The size of data in bytes differs meaning you cannot combine an AI and TC reading into one array. they must be separated otherwise when the RT host reads the FIFO the data comes out all mangled into some strange typecasted format. Quote Link to comment
Tim Erickson Posted August 19, 2010 Report Share Posted August 19, 2010 Does the Scan Engine Advanced IO access API work with a remote Ethercat Chassis? Quote Link to comment
Mellroth Posted August 19, 2010 Report Share Posted August 19, 2010 Does the Scan Engine Advanced IO access API work with a remote Ethercat Chassis? Yes it does. You can even add custom FPGA code to the scan engine and have access to this through the advanced API as well /J Quote Link to comment
bkb2005 Posted August 20, 2010 Author Report Share Posted August 20, 2010 (edited) Here is a screenshot of my architecture. Please note this is only for the main chassis, and I haven't even gotten to the Expansion NI 9144. This is a DMA FIFO from Target to Host @ 1000Hz with 164 channels. This won't go anywhere close to 1000Hz, more like 100 Hz. Is this the standard way for logging data at the RT Target aside from streaming FPGA -> SD Card? Edited August 20, 2010 by bkb2005 Quote Link to comment
bkb2005 Posted August 20, 2010 Author Report Share Posted August 20, 2010 Now it seems like the bottleneck is the TC readings. The module is slated for 1200 S/s aggregate so I think the FPGA is waiting for the next scan value instead of sending duplicate results like the scan engine does. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.