LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File manipulation

Your disk access and port read are fine, but there are some optimization problems.
  1. You are creating the entire file in memory twice as you read it using your two shift registers. It appears these both have the same information. Concatenating large strings (600Mbytes) is a very slow operation. You will lose bytes due to not getting back to the read fast enough. Change your algorithms so you only save the last xxx bytes. It appears you only need a few bytes to ensure your header or footer is complete for your compares. Solving this one will probably solve your problem.

  2. Once you have found your header, you don't have to keep looking for it. Put the code in a case statement and only look for it when it has not been found.

  3. You don't need to query the file for its size. Keep track yourself by summing the length of the strings you are feeding into it. Multiple, simultaneous file access will slow you down. Anytime you go to disk, it slows you down. You don't need to here.
Good luck!
Message 11 of 12
(450 Views)
Thanks for the tips! Hopefully just one more question and I can leave you alone! I was able to fix points 2 and 3 that you sent, and they sped things up quite a bit, but point one, I am just at a loss on. I am really new to Labview, and just honestly have no idea how to write only a small amount at a time to the file. I have attached my newest version of software. Could you possibly take a look at it, and give me some guidance as to how to fix my issue?

thank you in advance,

JDM
0 Kudos
Message 12 of 12
(443 Views)