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.
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.
04-13-2017 04:48 PM
Just wondering, from a single array am I able to search for different elements?
04-13-2017 07:01 PM
There are some "hidden" VIs in your <vi.lib> folder. Try this one:
vi.lib\AdvancedString\Match 1D String Array.vi
Basically it combines "Search 1D array" from the array palette with the "Match Pattern" VI from the string palette.
So you can search for [5A][5A] or whatever pattern fulfills your searching needs.
04-14-2017 10:28 AM
Hi Kyle,
I can't seem to find where Advanced String folder is located. When I do a search, I can't find Match 1d String Array as well. Where is this located?
Thanks,
Andrea
04-14-2017 10:36 AM
If you look in VIPM (VI Package Manager), you will find a package called "Hidden Gems". Install that package and you will see a new item in your palette exposing these functions that were mentioned.
For more information: Hidden Gems in vi.lib
04-14-2017 11:00 AM
I'm fairly certain that you don't actually need to install the "hidden gems" addon. I checked 2 PCs with LV 2015 and LV 2011 installed on them, and both had the file mentioned in vi.lib already. Neither had the addon installed via the package manager.
To clarify:
This VI is a National Instruments VI and is included with your LabVIEW install (unless you have a really old version...).
This VI is not in your palettes by default, which is probably why you can't find it.
Depending on your OS and installed version the actual location may be different, but for example you might find it here:
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\AdvancedString\Match 1D String Array.vi
04-14-2017 11:22 AM - edited 04-14-2017 11:35 AM
@AndreaD wrote:
Just wondering, from a single array am I able to search for different elements?
Define what you mean by "different elements". It is not clear to me from the picture.
Even without the mentioned subVI, it seem trivial to just autoindex over an array of search elements and do a "search array" on each. It can probably even be parallelized.
04-14-2017 01:03 PM
Definition of "different element" ... Just because 5A and A5 are in different orders, they're associated with different packets of data (not my choice of naming data packets, since it's so close, but it's from another engineer)
Somehow when reading the data, it reads 5A but not A5 ... Is it supposed to? Perhaps there just isn't the A5 data coming out?
Thanks,
Andrea
04-14-2017 01:29 PM
@AndreaD wrote:
Somehow when reading the data, it reads 5A but not A5 ... Is it supposed to?
Could be a byte order thing. What does the string represent?
04-14-2017 01:31 PM
Those are values to two different packets of data (again, not my choice of packet definition, they're both way too close!!)
02-22-2021 03:17 AM
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\AdvancedString
Here you can find the VI
02-22-2021 03:50 AM - edited 02-22-2021 03:53 AM
If you're searching with a regular expression (or even a match pattern), "[A5]" will match any string with an A or a 5, including A5, 5A and 12345 and ABC...
Maybe it's time to post what you have?
Never mind. This thread is 4 years old...