LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

match pattern with binary file

Hi all,

I've seen some postings similar to my problem but I'm still not able to solve it.  I'm reading in a binary file and parsing for timestamps in the form of 0xFF 0000 FF incrementing by 1 each time.  I am using match pattern to do this.  Everything was working fine until I counted up to 0xFF 003F FF to which match pattern fails to find a match.  I've included a truncated version of my program with the binary file reduced to a small string with the pertinent data included.  If you enter a 62 and hit run, it works fine.  Enter a 63 and no match is found.  Why?

Thanks,
Mark
0 Kudos
Message 1 of 6
(3,038 Views)
Your concatenated string generates a question mark when entering 63. The "?" question mark has special meaning, it should be escaped to be matched.

This solution doesn't seem to be the one your searching for.

A solution could be top use to string to array of U8 and to search for an FF then see if the next value is the high byte of the requested value then the low byte, etc.


Message Edited by andre.buurman@carya on 06-10-2008 10:10 PM
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 6
(3,031 Views)


I haven't saved it you you will have to redo it yourself, but this solution works for 62, 63 and 64. I tested it against your code.


Message Edited by andre.buurman@carya on 06-10-2008 10:22 PM
Regards,
André (CLA, CLED)
0 Kudos
Message 3 of 6
(3,021 Views)
Thanks Andre' but I don't seem to have these two VIs.  I'm using LV 7.1.
0 Kudos
Message 4 of 6
(3,010 Views)
The first is index array.  That has to be in 7.1.  The second is join numbers.
 
I don't have 7.1 handy at the moment to find which palettes they are on.  The first should definitely be on the array pallete.  The 2nd may be in numeric / data manipulation?


Message Edited by Ravens Fan on 06-10-2008 05:27 PM
0 Kudos
Message 5 of 6
(3,004 Views)
The join numbers vi can be found in the Advanced->Data manipulation pallette in LV 7.1.
Regards,
André (CLA, CLED)
0 Kudos
Message 6 of 6
(2,976 Views)