02-27-2013 11:29 AM
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?
Solved! Go to Solution.
02-27-2013 11:54 AM - edited 02-27-2013 11:58 AM
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?
02-27-2013 12:23 PM
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
02-27-2013 12:34 PM
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.
02-27-2013 12:45 PM
thank you so much, i will give it a try and let you know
02-28-2013 11:49 AM
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?
02-28-2013 11:51 AM
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
02-28-2013 12:07 PM - edited 02-28-2013 12:07 PM
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?
02-28-2013 12:24 PM
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
02-28-2013 12:33 PM
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