05-01-2017 01:01 PM
@altenbach wrote:
@Valentin87 wrote:
Below I attach picture with example what need to realize
Flatten both to string and search string.
Nice first thought but will we not run into complications since there is not eight bits in the match pattern AND the match could happen across characters?
Ben
05-01-2017 01:07 PM - edited 05-01-2017 01:16 PM
@Ben wrote:
Nice first thought but will we not run into complications since there is not eight bits in the match pattern AND the match could happen across characters?
No, unless you use 4.x mode, boolean arrays are stored one byte/element.
(see also the image I have now attached to the earlier post)
(Of course it also assumes that the boolean arrays are "normalized" for lack of a better word, else all bets are off. :D)
05-01-2017 01:13 PM
The solution in #9 will work if you have an exact match.
If there is a chance the match is not exact, this will work:
05-01-2017 01:40 PM - edited 05-01-2017 01:47 PM
@Ben wrote:
A basic suggestion is to search for the first element of your "target array" and only when you find a match on the first, proceed to check the residual data for a match.
Ben
Here's how this could look like. 😄
This now also works for all other array datatypes, but will only find exact matches, of course, so be careful with floating point comparisons. It can be easily modified to find all matches if there are more than one.
05-01-2017 01:53 PM - edited 05-01-2017 01:54 PM
@altenbach wrote:
It can be easily modified to find all matches if there are more than one.
Here's how that could look like. The size of the output array is the number of matches. If it is empty, no matches were found.
05-02-2017 01:01 AM
@altenbach wrote:
@altenbach wrote:
It can be easily modified to find all matches if there are more than one.Here's how that could look like. The size of the output array is the number of matches. If it is empty, no matches were found.
Could you attach this as VI saved in LV2011?
05-02-2017 01:40 AM
LAbVIEW 2011 does not have conditional tunnels, so you would need to do some simple workarounds. You should be able to implement the earlier version that only returns the first match.
The code is quite trivial. What parts prevent you from creating the code from scratch? Have you done some tutorials?