07-12-2018 06:36 AM
Overall what I am trying to accomplish is reading a file that will change on product changes. Which means the location of the information I need to find and parse out will be in different locations in each file, occasionally. Right now I am just working on one file. I have tried multiple ways of searching the file and can come up with pieces of the line I need, but I am having trouble with how to get the full line for the "known" I am searching for.
Examples of the differences:
:1010200055555555FFFFFFFFFFFFFFFF31313131B0
:10103000313131313131313131313131FFFFFFFF68
:1063C8000000000031313131313131313131313179
:1063D80031313131FFFFFFFFFFFF010203040506E2
:10103000313131313131313131313131FFFFFFFF68
I need to parse the "31" from the files, and am using that to search the files. I am just not sure how to get the full line(s). What I have for searching so far is what I have found while looking through the discussion boards. Here's one I found:
https://forums.ni.com/t5/LabVIEW/Find-and-edit-specific-line-in-text-file/td-p/2922742
This one was kind of helpful, but I need some more help.
I have attached the vi of what I have been working on. It's messy and has little to no comments as it is mostly testing different ideas and examples I have found. It is with LabVIEW 2012. I also attached the file I have been working with.
If there are other posts already about this that I have missed please direct me to them.
Solved! Go to Solution.
07-12-2018 07:04 AM
07-12-2018 07:20 AM
Thank you. That is working on numerous files. Where can I find more in-depth information on the conditional tunnels?
07-12-2018 07:23 AM
07-12-2018 07:30 AM
I will do that. Thanks again.
07-12-2018 08:39 AM
If there's any concern that the substring you're searching for might get split between two lines and therefore not be found, then you could try converting the files from Intel HEX format into straight binary files (or straight hexadecimal strings representing the binary contents, basically removing everything from each line but the data) before you perform the search.