06-07-2011 10:49 AM
Hello I have a question using cRIO hardware. I am using the cRIO-9012 processor attached to the 9101 chassis. This is all connected to a TPC-2512 touch screen computer. My question is about using the scan engine and or FPGA. I was required for my project to collect 16 Analog inputs and 6 Digital rate inputs using a sample rate of 100 samples a second. The requirement has been rased to 500 samples a second. When I aquiring the data (I have not reached 500 sam/sec yet) at 250 samples a second I am seeing the data value repeat many times before it changes. I am using a scan engine trick to do this. I am unsure if it is a limitation using this was or if I should use all FPGA but the values do not seem to be publishing to the network fast enough for me to aquire them. Any help will be usefull.
Adam
06-08-2011 01:08 PM
Hey Adam,
I would recommend acquiring your data via the FPGA. In scan mode a rough estimate of the fastest you can sample is about KHz. With 16 AI channels at a sample rate of 500 samples/sec you are exceeding that limit. The 1 kHz is just a guarantee and most likely (like you have shown), you can do better than KHz. However, the high rate you are trying to achieve will just not be possible in scan mode. Utilizing the FPGA you would not have a problem with that rate. However, in order to use the FPGA on the cRIO you have to have the LabVIEW FPGA Module. Do you have this software? I hope this helps!
-Cody C
06-08-2011 01:57 PM
06-09-2011 02:38 PM
Good Afternoon,
You actually need to pass the data through to the Real-Time controller, and then from there you can pass it to the host. The memory on the FPGA is extremely small and you would fill that up very fast if you tried to save it to the memory on the FPGA. I would therefore suggest passing the data from the FPGA to the Real-Time controller on the cRIO using DMA FIFOs. Take a look at this document which will explain how to go about doing this. Hope this helps!
-Cody C
06-09-2011 03:43 PM
This is actually what I tried but I get an array of 0's instead of my data. Also I don't think I can use Real-Time with the touch screen computer I am using as my host unless I am missing something. I have the data from my analog input card one going directly to the DMA FIFO then when I try to read the DMA FIFO on the host all I see are 0's
06-10-2011 10:59 AM
I'm trying to pass Fixed Point data straight through the DMA and I have it configured to pass fixed point data but it still only returns an array of 0's.
06-10-2011 11:56 AM
Hey Adam,
I believe that you are going to have to pass data to the Real-Time controller. The VI you develop on the Real-Time controller will not run on the touch screen computer, but deploys directly to the controller. The data can then be passed back to the touch screen computer via shared variables (or other methods) over Ethernet connection. How were you passing your data from the Real-Time controller to Host Computer when you initially tried it?
-Cody C
06-10-2011 04:28 PM
06-15-2011 07:02 AM
I am having another problem that is most likely easily solved but I am over thinking it. I am reading in the data from 1 module and putting all 8 AI channels into an array and sending them over the fifo. On my personal computer it is fast enough to read in 8 elements at a time and separate each one. However on the touch screen the processor and memory isn't quick enough to keep up so I must increase number of elements I read in at a time to avoid and overflow. For some reason I can't think of a way to separate the data into multiple arrays of 8 and look at every single value and compare it to a given threshold.
06-16-2011 06:01 PM
If you take a look at the DMA FIFO tutorial that Cody linked to you above, scroll down to the bottom and you'll see that they are using a 1D Decimate Array VI to separate the data from the FIFO in the Host VI into 4 separate arrays. It sounds like to me that this is what you're trying to do in reading from the FIFO and separating each of the 8 channels.