Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions regarding CRIO memory/througput

Hi all,
I am benchmarking my CRIO and I have pretty much come up with expected results as per some previous postings regarding this issue.
I just wanted to post my numbers and have the experts confirm these. Also I have a few questions regarding the memory used.
 
Here's what I have so far:
Scanning one channel (CRIO9004, 9215 card in first slot): 
Results:  50KSamples per second, continous no problem.
This is continous from FPGA to RT using the demo and increasing the FIFO size to 65535 16 bit values)
Watching the "backlog" (nice feature by the way) value, I can see when I reach my limit... at around 50KSamples/second I see it stabilize, but higher rates fill it and I begin getting garbage (expected of course)
 
 
Scanning 8 channels (CRIO9004, two 9215 cards):   
Results: To scan long term from FPGA to RT binary file using example program (modified by adding 4 more channels)
I can scan continously to a file at approximately 6250 S/s.    This EACH OF THE 8 channels at this rate!  Very impressive I think!
 
 
..and more interesting....
Scanning 8 channels (CRIO9004, two 9215 cards) but limiting my total number of scans to less than what would fill the buffer.. (so I divided 65535 by 8 channels and limited my total scans to 8000. )
When I do this I can get 100KS/s on EACH OF THE 8 channels!!!! Of course this is only for 30 milliseconds.. but at 20KS/s, for 8000 scans, this is 400 ms..
 
It all appears to hinge on the FIFO size.. just wondering if this is increasable....
 
 
Questions:
1) Where is the FIFO memory located physically? Labview won't let me make the FIFO any bigger than 65535, so I was guessing 65535 X 2 bytes = about 128KB.. is this my limit? Is this the memory on the FPGA or the RT controller?
 
2)Is it possible to simply increase my memory, and then increase the FIFO, or decrease the word size to 8 bits in order to squeak a little more throughput out?
 
3) When I do 8 channels, are these simultaneous (I'm using the logger demo with 9215)?
 
 
 
Any advice or ideas is appreciated. Thanks again for the good support. I've been learning alot!
 
Jeff
0 Kudos
Message 1 of 8
(5,195 Views)

Hi Jeff,

 

Below are some answers to your questions.

1) You can create FIFOs on Flip-Flops, Lookup Table or Block Memory on your FPGA hardware. These options appear when you place the FIFO Read/Write VI and double click on it to create an instance of a FIFO.

 

65535 is the limit to the FIFO depth regardless of the datatype you choose.

 

2)One way to increase through put is to pass data in 32bit chunks. So if you have two I16 numbers you can use the ‘Join number’ vi to make it a 32 bit number and pass the data through the FIFO. Then, use the ‘Split number’ vi after you read from FIFO to get back your original I16 numbers. Go to Functions -> Advanced -> Data Manipulation palette to find the Split number and Join number VIs.

 

3) Since the 9215 has only one Analog to Digital converter, there will be some delay between samples from different channels. They are not sampled simultaneously.

 

Hope this helps!

Prashanth

0 Kudos
Message 2 of 8
(5,173 Views)
I think you are mistaken, the 9215 is simultaenously sampled, so the samples are time aligned.  there is no need to align them or otherwise in software.
 
 
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 3 of 8
(5,170 Views)

Hi Preston,

Thanks for catching that. I mistook the cRIO-9215 for a different AI module. The product webpage for the cRIO-9215 clearly states that it is a simultaneous sampling module. https://www.ni.com/en-us/shop/model/ni-9215.html

Regards,
Prashanth

 
0 Kudos
Message 4 of 8
(5,157 Views)
Can you post your code please ?  I'm starting a project with LV8.2 cRIO-9012, hoping to implement a write to file to USB stick, among other features.
0 Kudos
Message 5 of 8
(4,730 Views)

bmann:

This forum has been inactive for 1 1/2 year. Post if you have any other questions.

Thanks,

Rudi N.

0 Kudos
Message 6 of 8
(4,710 Views)
Hi,
I am the original poster. I believe I had LV7 at that time so things have changed regarding the FPGA. It's a little easier now to set up a FIFO and you can use DMA.
 
If you're still interested, I can dig up the old code, but there are some good examples on the ni website for doing large transfers of data.
 
Jeff
 
0 Kudos
Message 7 of 8
(4,700 Views)

thanks, I posted the message to the wrong thread by mistake.  I was reading up on DMA, then I got the DMA transfer working in LV8.2 this week.

I was actually looking for example code for USB access using the cRIO-9012, but should hopefully get it via another post.

0 Kudos
Message 8 of 8
(4,699 Views)