FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

cfp-ai-118 scan rate problems

I just recieved my cfp-1804 backplane and my cfp-ai-118 module. I purchased this equipment because I was informed that the ai-118 was capable of reading up to 10.42 khz. I configured the Ai card through MAX. I set the percent deadband to "0". I set the noise reduction to "none".
I also set the voltage range from -10.5 to +10.5.
I have no signals connected to the card, I was looking to read noise. I have attached the vi I am using to determin the max scan rate. I am always reading about 2500 points. I have also noticed the reading change every 50 scans approx.
My testing was preformed over a network and with a crossoved cable from my laptop to the fieldpoint, there was no change in any of my values.
How do I get a sample rate of 10khz from this card.
0 Kudos
Message 1 of 11
(6,423 Views)

Hi John,

The cFP-AI-118 does single point softwared-timed acquisition. Currently you are using an ethernet interface for you module. The software timing is done by the CPU of your PC. If you don't have any Wait functions in your loop, the loop is going to try to run as fast as possible (as much as the CPU is allowing). The loop does not run deterministically. If you use a Wait function inside of your loop, the min value that you can set is 1ms, which will give you 1000 reads per second.

However, if you deploy your VI on an RT target such as the cFP-20xx RT controllers family, the min Wait function value that you can set is 1 microsecond, which will give you 1,000,000 reads per second. Of course if your hardware cannot update the values that fast, many of the reads will be repeated.

The bottom-line message is that if you want to achieve the max speed of that AI module, you will most probably need an RT controller.

Hope that answers your question. 

Kalin T.
0 Kudos
Message 2 of 11
(6,397 Views)
I also have the AI-118.  I also have the cFP-2120 RT Controller.  I have tried compiling a program which will read one channel on the AI-118 as fast as possible.  I have inserted a 100 usec 'wait until next interval' RT timer function in the loop.  I have set VI properties execution to 'time critical' or highest priority.  I compile the code into the startup.exe application on the RT controller(so I'm not involving the Ethernet - all Ethernet connections shutdown during runtime).  The app is designed to make 10,000 reads of the one AI-118 channel 0, and then report milliseconds elapsed.  So far, I get around 16,000 millisec elapsed which means I can only read the AI-118 every 1.5 millisec?  And, it appears I can do nothing else or it slows down quickly.  Like, write the data into an array.
 
Tom Held
 
 
0 Kudos
Message 3 of 11
(6,043 Views)
@ Tom Held
 
1 - It looks like you read the start time and then insert a 5 second delay two frames later. 
 
2 - Get rid of all the variables, they will only slow your vi down. 
 
3 - Starting with LV 7.x you do not need to create a tag for the Field Point Read.  Use the FP IO Point instead.
 
4 - Here is a link to another thread that deals with another potential source of delay in a deployed cFP vi.  http://forums.ni.com/ni/board/message?board.id=110&message.id=4281&requireLogin=False
 
 
Message 4 of 11
(6,009 Views)
Thanks for your input.
 
I moved the timer appropriately and took out several local variables.  I also checked the thread you listed and followed through on that suggestion.  The code still takes approx. 1.5 ms per cycle/sample.  That's still far, far below what is promised from the AI-118.  The catalog literature mentions something about controllers being able to read directly from module memory, but I don't see functions or drivers for that.
 
The AI-118 code example on the NI site only shows a 10Hz measurement.  I will contact a NI sale/engineer tomorrow as I am ready to give up on cFP for high speed sampling.
 
Thanks again.
 
Tom Held
 
0 Kudos
Message 5 of 11
(5,896 Views)

@ Tom

I know from personal experience that this module will run much faster than your test results.  To get the best speed you need the cFP-2120 installed in the same backplane as the AI-118.  You need to build your test vi into an executable and deploy to the cFP controller.  This is different from running your vi in development mode and targeting the cFP controller.  Any network communication during the sampling period will slow you down.

0 Kudos
Message 6 of 11
(5,870 Views)

 

I am sorry.  I do not mean to be difficult, but I am running the 2120 on the same backplane as the AI-118, I am running the program compiled and embedded on the 2120 (no host attached) and all network connections are dead at time of execution.  Also, I have the VI set or highest (time critcal) priority.  I will double check and try again, but I have my doubts.  I am going to try running a simple code with no tasks to see the avergage time for itertion of the loop.

Tom Held

0 Kudos
Message 7 of 11
(5,830 Views)
Hello again.
 
I tried running a VI with a loop and a 10 usec RT timer for 10,000 iterations.  Those iterations took a little over 12,000 ms to execute.  I think this shows the limitation of the cFP-2120 and high speed data acquisition on this platform.
 
Thanks for your help and input.
 
Tom Held
 
0 Kudos
Message 8 of 11
(5,828 Views)
What filter settings did you select for the AI-118 input channels in MAX?  If you have filtering enabled it will slow things down quite a bit.
0 Kudos
Message 9 of 11
(5,803 Views)

I have it set for no filtering.

-Tom

0 Kudos
Message 10 of 11
(5,590 Views)