LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parse / find distinct elements within string

I have developed an application for RFID using antenna multiplexing, and require some assistance with the string parsing / analysis portion of my work.

 

My VI has 4 relevant outputs for this problem, each of which is a string indicator on the front panel.  The format for these outputs is as follows:

tag_ID=(x###...#)

tag_ID=(x###...#)

etc...

 

I am only interested in the tag ID number (the ##...# portion of the above data).

 

First, I would like to determine which ID numbers are distinct (same ID may appear on multiple output channels), so after parsing the ID number from the above outputs I will need to create a numeric array (probably with hex representation) containing the distinct ID numbers.

 

The second task would then be to compare the distinct IDs against a user specified (probably via input text file) list of valid IDs.  The VI would highlight which IDs were missing and which were superfluous.

 

This is a prime example of a task which I could replicate fairly easily in a text based programming language, but encounter some difficulty with a graphical interface.  Any and all help is much appreciated.

 

I am posting this before much experimenting because I know I will encounter difficulties that the community can help me solve.  Thanks again,

 

Daniel

0 Kudos
Message 1 of 2
(2,641 Views)

Looks like you need:

 

  1. An array of expected strings (or numbers)
  2. An empty array of strings (or numbers), called LIST2.
  3. A SEARCH 1-D ARRAY function.
  4. a FOR loop.

 

Get the expected strings(or numbers) from a file, a constant, an array control with default values, wherever they need to come from.

 

For each number you read,

 

  • Search the array of expected numbers for the number you have.  If it's in the list, it's expected, if it's not in the list, it's unexpected (superfluous?).
  • Search  LIST2 for the given number.  If you found it, you have a duplicate. If you didn't find it, append it to LIST 2.

 

 

Handle as appropriate 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 2 of 2
(2,625 Views)