LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 6

Hi

 

I am getting error 6 in apllication(everyday), as a 1st step i checked the disc space there is loads of space.

 

Pls give some guidance

 

Thanks

0 Kudos
Message 1 of 17
(4,162 Views)

Error 6 is "Generic file I/O error." I guess it has nothing to do with the disk space but has something to do with the file that you might be trying to read or modify...(which also might not be existing since some one has deleted it)

 

So check which is that file/folder thats causing this problem..

 

If not solved, post along ith the exact error description

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 2 of 17
(4,156 Views)
Quite difficult to answer without more details ! Could you post your code or at least explain on which file operation this error appears ?
0 Kudos
Message 3 of 17
(4,147 Views)

Thanks All

Error message i get is, Error6 occured at write to text file in write spreadsheet string.vi. I have attached the file where the error occured.

Thanks 

 

0 Kudos
Message 4 of 17
(4,111 Views)

Are you sure your excel file is closed while writing? Please make sure Microsoft Excel is not running in the background.

Also, be sure to close the file after you open it.

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 5 of 17
(4,105 Views)

Yes, the file was closed.

 

Thanks

0 Kudos
Message 6 of 17
(4,094 Views)

Yes, the file was closed.

 

Thanks

0 Kudos
Message 7 of 17
(4,094 Views)

You day you are getting this error everyday.

1) Are you writing to a new file each day, or a new folder each day?

if yes, you need to check the folder exists and create it before you try to wtite to the file.

2) What options do you have on the file IO command? does the file have to exist?

3) Is it possible LabVIEW has a copy of the file open from yesterday if you are appending to the same file?

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 8 of 17
(4,082 Views)

post that part of the code which is doing the data logging to the excel (and not the excel sheet). Some one will help you for sure!

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 9 of 17
(4,073 Views)

James W wrote:

You day you are getting this error everyday.

1) Are you writing to a new file each day, or a new folder each day?

if yes, you need to check the folder exists and create it before you try to wtite to the file.

2) What options do you have on the file IO command? does the file have to exist?

3) Is it possible LabVIEW has a copy of the file open from yesterday if you are appending to the same file?

 

James


 

OK,

So now I've actually looked at your file I can see you are appending each result below the previous result and not writing a new file each day. (Ignore Q1&2)

I have check my error catch statements to see if I can quickly diagnose your problem and I can't.

 

If the file doesn't exist you will get error: 1, 7, 1059 or 1430 (there may be more for me to come accross)

If the file is being loked for edit by another application, you will get error: 5

If the file exists and is read only you will get error: 8

 

So by logic:

the file exists, is not read only, has a valid path name and is not being held open by any other application.

 

I think we need to see your code...

 

James

 

Point to note:

There are a limited number of lines in a Excel file, don't keep appending to the same file if you are logging data every day for years, or you are logging loads  of data, you will file the file and not be able to open it. Log to a different format like CSV (which you can open in Excel or notepad). 

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 10 of 17
(4,061 Views)