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: 

NI 9229 multiple analogue signals and tdms logging on cRIO FPGA

Solved!
Go to solution

Good day,

 

I am planning to measure two analogue signals with a NI 9401 module on board of cRIO - 9068. I am using the standard NI 9401 acquisition example which works perfectly fine. The logging part is taken from http://www.ni.com/tutorial/11198/en/ . I've been using this example previously but only for one channel logging.But here I am experiencing a problem with multiple channels.

 

For instance I have 4 signals, each one of those is about 0V. I am sending to the channel AI0 8 V signal. So in the tdms file the AI0 column should give a sine wave, while three other columns will show sine waves around 0 V (0.06V). But what is happening in real life (tdms file attached), is that AI0-AI4 give sine waves with 8Vpk. 

AI_plots.JPG

 

Can anybody help me to figure out why I can't log the signals properly? Thank you in advance.

 

 

Download All
0 Kudos
Message 1 of 6
(3,169 Views)

Hi ESturov

Can you check with an oscilloscope/multimeter at the terminals to verify what you're logging is incorrect?

 

If it is incorrect can you use the probe tools to check whereabouts your data being corrupted?

 

Attach your code if possible

 

Cheers

 

 

Ingram | CLA
0 Kudos
Message 2 of 6
(3,124 Views)

Hi ingram.weeks

 

Maybe I should've specified it even better in the first message. There is nothing connected to the terminals AI1-A3. Only to the channel AI0. What I see on the graph:

 

NI9229_question.JPG

 

But what I am getting after logging, you can see in the first message. 

Probes are (just in case since you can see that the plot is fine):

NI9229_probe.JPG

 

 

All project files and VIs were attached in the first message as well. Thank you.

0 Kudos
Message 3 of 6
(3,118 Views)
Solution
Accepted by topic author ESturov

Hi ESturov

 

Sorry, I was on my phone and clearly missed the attachments.

Looking at your file I can see that you have similar "high values" repeating every 4th row. This suggests that you have formatted the data incorrectly after reading from the FPGA.

 

If you are confident that the data you are seeing in your waveform graph is correct I would use that as a starting point as it means the data being plotted is correctly formatted. You can then save these 1D arrays (after decimation) as you wish.

 

Cheers

 

 

 

 

 

 

Ingram | CLA
0 Kudos
Message 4 of 6
(3,109 Views)

Hi ingram.weeks,

 

No worries. Well, I reckon the repetition is not surprising, because the module has 4 channels. And since we have the applied signal only to the channel one, other three channels will show low values. And after we receive one sample from each of the channels, the same pattern will be repeated. At least from this perspective, that is why I am pretty confident with these probe values.

 

Yep, the waveform graph is correct, since I am applying only one sine signal to the Channel 0 (8V). I will try to follow your advice and will get back when I crack it. Thank you for the tips. 

0 Kudos
Message 5 of 6
(3,097 Views)

ESturov

 

In the example program you have modified, the number of elements you are reading from the FPGA is fixed. Meaning that a 1D array of 2000 is reshaped into a 2D array of 4x500.

 

You are presumably reading a different number of elements, however your reshape array inputs are still fixed. Meaning that the 2D array will be formatted incorrectly.

 

Cheers

Ingram | CLA
0 Kudos
Message 6 of 6
(3,095 Views)