LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing two components in LabVIEW

Greetings to all,
 
I am having difficulty parsing in LabVIEW.  Before you tell me to look at examples, hear me out 🙂
 
I am receiving data from a serial port that comes from two components: an RFID Reader, and temperature sensor.  Both these components will have headers and footers with the data.
 
If I am receiving an RFID tag, it will be preceded by a header (in Hexadecimal): 2B ("+" in ASCII).  Once the serial drive recognizes 2B, it'll begin reading the RFID tags.  I plan on seperating each RFID tag with a carriage return: 0D.  I am using Match Pattern for this, of course.  For each tag i read in, i put it in an array, using auto-indexing. 
 
I will stop reading RFID tags once I receive a footer, 2D ("-" in ASCII).  Once 2D is recognized at the serial port, I will ask LabVIEW to begin reading data from the temperature sensor.   For now, I only care to display the temperature sensor reading.
 
I know I need to use a case structure, but am unsure as to how I'm supposed to use it.  I hope this makes sense.  I am attaching my VI with comments.
 
Thanks 🙂
Amal Patel
0 Kudos
Message 1 of 3
(2,755 Views)
I made a mistake in my attachment.  Please see this VI.
 
Thanks!! 
Amal Patel
0 Kudos
Message 2 of 3
(2,752 Views)

A case structure is very much like a switch statement in traditional programming languages.  Really the best way to learn this is by checking out the LabVIEW Help on Case and Sequence Structures.  However, it sounds like all you need is a while loop checking the input from the RFID reader checking to see if it's 2B.  If it is 2B, then quit the while loop and begin processing whatever you need to, until you reach 0D.  This second part is where you might be able to use a case structure.

Let us know how you tackle it,

 
TheDillo
0 Kudos
Message 3 of 3
(2,702 Views)