LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search data in a 2d array and generate a signal when found

Solved!
Go to solution

Hi, i am looking for an interactive way to search data from an array containing a 2d array found in a cluster. The data is in the 2d array. I have attached the vi containing the array. I want an interactive method to look up for the codes in the 2d array(found in the 1st row) and when found generate a signal to tell it has been found. The signal varies depending in which category was data code found (whether engineering, law or others). Btw the data i am looking for are in fact input using a barcode reader. Should i use a search 1d array function? or is there another method?

0 Kudos
Message 1 of 15
(2,879 Views)
Solution
Accepted by topic author hawkeye182

Just to make sure we are totally clear here.  We are trying to find the cluster which contains a certain data point in its first row of the 2D array?


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 15
(2,873 Views)

well yeah, we are looking for data found in a 2d array in a cluster and the cluster is an array. The codes are grouped in "buckets" namely engineering, law and others. so as soon as the data is found in a particular bucket, a signal is sent telling which bucket was the data found. can you please send me the vi for this

0 Kudos
Message 3 of 15
(2,859 Views)

I already posted a snippet.  Save that png from my previous post to your desktop.  You can then drag the png file from windows explorer onto your block diagram.  The code will automagically be there.


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 15
(2,854 Views)

thank you so much, i will give it a try and let you know

0 Kudos
Message 5 of 15
(2,847 Views)

Hi, i want to look up for some data in a 2d array in a cluster in an array. i have a vi and the search 1d array function im using each time return an index of element of -1 meaning the data was not found. Can someone check the vi please. In fact i want to input data and search this data in the array, the data (codes of books) is grouped in categories namely engineering, law and others. i want to search for the code corresponding to the appropriate categories and depending in which the data was found, send a signal depending in which category was the code found. Each category must have a different and distinct signal. How to do this?

0 Kudos
Message 6 of 15
(2,824 Views)

Hi, i have use your vi, modified it slightly but still it doesnt work. what should be done next? the index of element is still -1

0 Kudos
Message 7 of 15
(2,822 Views)

How did you modify it?  I saw no changes from what I already gave you.  It works fine for me.  What exactly do you want out?


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 8 of 15
(2,817 Views)

i think i saw my mistake but i do have a question. Does the search 1d array function search data horizontally or vertically? i know my question seems quite stupid but as you may have guessed i am very new to labview

0 Kudos
Message 9 of 15
(2,807 Views)

When the array contains a cluster it searches the element in the cluster which is first in "tab order."  It has nothing to do with the position of the controls on the screen.

 

Lynn

0 Kudos
Message 10 of 15
(2,801 Views)