09-22-2023 09:55 AM
Hi All,
I get an error code 8 when I try to run and save my program. I tried to highlight execution and add probes but it doesn't fail until the last write delimited spreadsheet.
Basically, the program updates a .cal file containing a control number and calibration date like this:
I can't add a .cal file to the forum because it isn't supported. It also need a Test Setup Files folder and a IR AC DC.cal with this example:
Would anyone know what is happening?
Thank you,
TK
Solved! Go to Solution.
09-22-2023 10:06 AM
Hi Teekayy,
Try: Closing LabVIEW completely and run it as administrator. Then try to write to file.
09-22-2023 10:11 AM - edited 09-22-2023 10:23 AM
You can attach any file you want if you zip it.
Works fine for me. Could be a permission issue in the write location. Are you running in the development environment or as built executable?
(did you know that index array is resizable? I don't think your program is bulletproof because your flattened timestamp could easily contain a tab character as part of the binary string, which would then corrupt the reading of the timestamp)
09-22-2023 10:13 AM
Hey XM43,
I can't run it as administrator because I don't have access from my company and it requires elevation.
Would there be any other way around this or any other solutions?
Thank you,
TK
09-22-2023 10:17 AM
Hi altenbach,
Ahh I didn't think about that haha. I am running it in development environment. It could be a permission issue..
Thanks,
TK
09-22-2023 10:26 AM
You can move the file or create a copy to "C:\Users\Public\Documents" and then try to see if you can read it from there. If you are still not able to read it, then the file itself has permission restrictions.
09-22-2023 10:26 AM - edited 09-22-2023 10:27 AM
@altenbach wrote:
I don't think your program is bulletproof because your flattened timestamp could easily contain a tab character as part of the binary string, which would then corrupt the reading of the timestamp)
As I said, your current technique is dangerous. You need to either use a fully binary file or format your timestamp using readable characters.
09-22-2023 10:27 AM - edited 09-22-2023 10:33 AM
Thanks altenbach,
Whoops haha I didn't realize in the properties of the .cal that the read-only box was checked.
(did you know that index array is resizable? I don't think your program is bulletproof because your flattened timestamp could easily contain a tab character as part of the binary string, which would then corrupt the reading of the timestamp)
Kind regards,
TK
09-22-2023 11:09 AM - edited 09-22-2023 11:30 AM
Here's one quick draft. I am sure it needs a few tweaks...
You probably want to write some special sentinel values to the data control if the calibration file does not exist, or handle as error (not shown).
09-22-2023 11:49 AM - edited 09-22-2023 11:59 AM
Oh thank youu.
Would you suggest I change my Retrieve and Check Calibration then?
to