04-13-2016 01:11 AM
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
Solved! Go to Solution.
04-13-2016 05:42 AM - edited 04-13-2016 05:43 AM
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.
04-13-2016 08:32 AM
Thank you a lot. I've tried your solution and it's working corectly.