From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW cRIO Problem

Hi !

 

I am using cRIO 9075 and analog input module 9201. I have used a example given in NI to acquire analog input from 9210 i got the pure sine wave. I used a function generator to give input to 9201. but next time when i run that vi i get ripples. can anyone clarify me what had happened in this labview. I have attached the vi. and also the screen shots.

Download All
0 Kudos
Message 1 of 5
(2,769 Views)

You have 3 channels going into the DMA FIFO, but you are reading a number of samples not divisible by 3.  So you are causing your channels to get out of sync.  And then your Resize makes absolutely no sense.

 

So let's make the loop take 100ms.  Since you are sampling at 2kHz, in 100ms you will have 200 samples per channel.  You should therefore have 600 samples from your 3 channels.  So have the DMA Read get 600 samples.  You can then reshape the array and transpose to get the output array you need.  And do set your wait to 100ms.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,692 Views)

Hi,

Thanks for the reply. May i Know whats mean my resize as you have mentioned resize makes no sense.

But I used this values for the 1st time i got the output.

Now its showing error as FIFO read error -50400.

 

Thanks

Surya S

0 Kudos
Message 3 of 5
(2,668 Views)

What value did you use for your count timer on the FPGA?  Sounds like you set it to something slower than 500us.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(2,664 Views)

I kept 500 us only.

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