If you need to create a quick and efficient Look up table (LUT) or item/tag list, then you can utilise the efficient underlying code written for variant attribute lookup. An example of loading a string LUT into a variant (named “Variant LUT”) is shown below. The setting of the attributes is not particularly quick, however, and as soon as you have a few items in the list, this method is much much quicker than a “Search 1D Array”. Even with small list, this lookup is at least as efficient as a “Search 1D Array”.
NOTE the tag must be a string, but the lookup item can be of any type.
Want to receive our LabVIEW Tips via email each month? Drop an email to info@austinconsultants.co.uk with ‘Subscribe’ in the subject heading and we’ll add you to our monthly mailing list. We will not pass your details on to any third party organisations.