LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search 2D array

Solved!
Go to solution

Hi, I'm fairly new to Labview and I have this problem:

I'm measuring sensitivity of microwave radio link with the aif od voltage controlled attenuator. First, I need to do calibration of attenuator itself, so I get .csv file with two columns (power | voltage). In next step I'm doing measurement. As result I will know voltage and I need to open calibration file, find measured voltage and find matching value of power.

I've found here ( https://decibel.ni.com/content/docs/DOC-29642 ) VI, that can do this task and I modify it to display found element (same row, column -1, that's where power values is) and when I run it, it's working corectly, but when I call this VI from my main, it's sometimes returning correct value and sometimes NaN. When I've ran main ten times, values for which prright in ogram returns correct value or NaN are always the same but when I check for this values manually in the subVI, it's working corectlly.

I'm really desperate with this behavior and I will glad for every help

Download All
0 Kudos
Message 1 of 3
(3,340 Views)
Solution
Accepted by topic author SefaraP

1. No need at all for the sequence structure.

2. No need to convert the 2D array into a matrix.  The Index Array can handle multiple dimensions.

3. What I think your problem here is that floating points are not accurate.  This is an issue with all programming languages.

 

What you really should be using is Threshold 1D Array to get the voltage index and then Interpolate 1D Array to get your power.  No loops needed.


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
Message 2 of 3
(3,302 Views)

0 Kudos
Message 3 of 3
(3,275 Views)