LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the sample rate of NI 9224 to high speed mode

Solved!
Go to solution

Hello,everyone!Ihave a NI 9224,its maximum sample rate is 1KHz,and NI cRIO 9031.Then how to make NI 9224 run in the sample rate of 1KHz.The following picture is what I have did,but its sample the is about 2Hz,the actual looptime is 412317microsecond.What can I do  to get the maximum sample rate of NI 9224.I am really in great need of your help!Thank you!


 

d9bca709c2c6bffc20f116a9a716d4b.png

23cb85757e4d212268db79cd1347ef5.png 

 

0 Kudos
Message 1 of 5
(2,629 Views)

Hi beston, to set the data rate speed of the NI 9224 (e.g. High Speed mode to get 1kS/s in your case), you first need to configure the module to the desired speed mode using the property node. Here's an example of what I usually do:

 

9224_SetSampleRate.png

 

In which case the control can be created from the property node, and it would already be an enum with the data rate options available for the NI 9224. Then, this is how I would measure the loop rate:

 

9224_MeasureLoopRate.png

 

Note that the FIFO operation runs in parallel with the data acquisition here instead of it being in sequential operation like the one in your screenshot since sequential operation will incur additional delay to the loop affecting the loop rate. Also, it would be better to put the Loop Timer out of the sequence frame within the while loop to remove the undesired additional delays. Here's what I see when I run my VI:

 

(Loop Timer = 0)

WithoutLoopTimerControl.PNG

 

(Loop Timer = 40000 ticks for my timebase of 40MHz)WithLoopTimerControl.PNG

 

Hope this helps! Smiley Happy

Message 2 of 5
(2,580 Views)

       OK,Thank you very much,I have solved this question,but another question appeares.

       When I use FIFO.read in the RT application,using an wavechart or a numerical display control can correctly show the data acquired, about 1.578.But when I use write to binary file ,the data I get in the binary file isn't the same as what I see in the wavechart or numerical display.what's wrong with this?

I am really puzzled!

     Best wishes!

     Expecting your reply,Thank you first!bd2279ce17a9411cc1835494ded84da.png

 cc3b2bed34cc066c6e923c12fd8203d.png

 

0 Kudos
Message 3 of 5
(2,571 Views)
Solution
Accepted by topic author beston

It would be helpful to share with me (an example of) the data you are seeing on your binary file versus the actual expected data, and in that, how you are reading the binary file. With the information you gave, the only thing I can suggest for now is that you try doing this (false to "prepend array or string size?"):

 

WriteBinaryFile.PNG

 

 

Do let me know if this solves it. Good luck!

 

Message 4 of 5
(2,564 Views)

Thank you for your answer,it is indeed effctive!

0 Kudos
Message 5 of 5
(2,560 Views)