LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 8 Open/Create/Replace File in Write Spreadsheet String.vi->Write Delimited Spreadsheet (string).vi->Edit Calibration.vi

Solved!
Go to solution

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: 

Teekayy_0-1695394245735.png

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: 

Teekayy_1-1695394387885.png

 

Would anyone know what is happening?

 

Thank you,

 

TK

 

 

0 Kudos
Message 1 of 13
(1,500 Views)

Hi Teekayy,

 

Try: Closing LabVIEW completely and run it as administrator. Then try to write to file.

0 Kudos
Message 2 of 13
(1,492 Views)
Solution
Accepted by topic author Teekayy

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)

Message 3 of 13
(1,486 Views)

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

0 Kudos
Message 4 of 13
(1,483 Views)

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

0 Kudos
Message 5 of 13
(1,480 Views)

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.

Message 6 of 13
(1,455 Views)

@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.

Message 7 of 13
(1,454 Views)

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)

Ah I see... you need to either use a fully binary file or format your timestamp using readable characters. Okk thanks Ill keep that in mind

 

Kind regards,

 

TK

0 Kudos
Message 8 of 13
(1,449 Views)

Here's one quick draft. I am sure it needs a few tweaks...

 

altenbach_0-1695398977315.png

 

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). 

 

0 Kudos
Message 9 of 13
(1,400 Views)

Oh thank youu.

 

Would you suggest I change my Retrieve and Check Calibration then?

Teekayy_0-1695401385344.png

 

 

 

to

 

 

 

Teekayy_0-1695401971858.png

 

 

0 Kudos
Message 10 of 13
(1,377 Views)