 Gisele
		
			Gisele
		
		
		
		
		
		
		
		
	
			12-03-2012 09:43 AM
Good evening,
Below you can see my Joint SubVI. In output for My Principal Programm I received a number of Bytes (VISA refnum in) that I try to filter to interpret. I get usually 16 Bytes that I'm trying to split into 4 packages of 4 bytes each for better interpretation. in my Stacked Sequence structure I'm trying to interpret each packet (1-4) one after another and display the results in the Table control bytes on one side and the interpretation in the column that follows.But I cannot set this part of Programm.
That's how I'd interpret each Package: Example first Package A010060A (String).
if (String.1erByte == A0)
    report: "Command"
else if (A1 == String.1erByte)
    report: "Message"
else
   report: "unknown"
After that it checks the 2nd Byte.
if (String.2erByte == 10)
    report: "RX Setting"
else if (String.2erByte == 20)
    report: "Setting Keyc_ID"
else if (String.2erByte == 11)
   report: "Stat_LED"
else if (String.2erByte == 21)
    report: "Stat_Coil"
else
   report: "unknown"
After that they control the 3rd Byte and 4th Byte  with the same procedure and displays the results in Table Control. then passes to the 2nd pack of 4 byte to do the same thing. I hope I was clear on my Problem and that somebody may have a solution. Joined SubVI it with the values that I get by default.
I am sorry for the mistakes because I am beginner in English.
Thank you in advance for your solutions
cordially
Gisele
 crossrulz
		
			crossrulz
		
		
		 
		
		
		
		
		
	
			12-03-2012 09:58 AM - edited 12-03-2012 09:58 AM
You might want to use the String to Byte Array to work on the individual bytes. Your case structure can have many cases if you wire the byte to the selector tunnel.
Attached is a snippet. Save it to your hard drive and then drag it onto a blank VI and you will magically have code.
