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: 

1d array search

Solved!
Go to solution

Hi,

I have a problem with the attached code. Search 1d array doesnot findout the index number of an existing element. But, the reverse is working well.That is,it can findout the element corresponding to an index number.I am attaching the vi and the txt file from where I need to read and search.

Please reply...............

Thank you in advance.........................

                       -Sudipta Sengupta.

Download All
0 Kudos
Message 1 of 4
(2,595 Views)
Solution
Accepted by topic author ssengupta

R-click the Element and Subarray and change to '\' code and you'll see the problem. Your text file has 4 spaces at the end. If you add those to the Element it'll find the elements, so it works as expected.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(2,589 Views)
Solution
Accepted by topic author ssengupta

What you can do it add loop after the Index Array and Loop through the extracted column and Trim Whitespace and those extra spaces will be removed. 

That's probably how you want it to work.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,587 Views)

Thank you very much...............

0 Kudos
Message 4 of 4
(2,568 Views)