LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determine a single character's indexes on a string

Hello
 
I am develloping a program in which I need to determine the index (position) of every 7D character on a hexadecimal string. The result should be stored in an array with the position of every 7D character.
 
I used and tried the code in attachment but it did not work. Can you help me with this? Thanks in advance
0 Kudos
Message 1 of 7
(4,877 Views)
here's a VI that should get you started.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 2 of 7
(4,864 Views)
I couldn't open the file. I forgot to mention that I am using Labview 7.0 Express, my bad. Could you post it again?
 
Thanks for the help, I do appreciate it.
0 Kudos
Message 3 of 7
(4,863 Views)
Try this...
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
Message 4 of 7
(4,858 Views)
As to the original code: Your problem was that you should have a shift register for your array. Otherwise, you're just spitting out the last iteration's value.

A far easier solution is to convert the string to a byte array and to do the following (I think it should be obvious what's in the False case):


Message Edited by smercurio_fc on 02-26-2007 09:53 AM

Message 5 of 7
(4,851 Views)
Thanks, it worked. Looks like it was simpler than what I thought. I guess I was not thinking in the right way.
0 Kudos
Message 6 of 7
(4,846 Views)

For fun, here are two more possibilities using "search string" and "search array", resp.

(Note that real LabVIEW programmers start counting at zero, so the first position is position zero, etc. :))

 

Message Edited by altenbach on 02-27-2007 09:11 AM

0 Kudos
Message 7 of 7
(4,811 Views)