LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading files on a cRIO truncates them

I have problems reading files from the internal flash memory in an RT application (cRIO 9073).

Two files are read in a subvi just at the beginning of the program; if I run only the subvi, all seems to work well, but when I run the whole app, frequently I get errors.

Error codes may vary if I change the code someway (I tried storing files in different folder, using / instead of \, cycling read operation until no error, reading from the main vi and so on): in the past I got sometimes "File not found" (!), sometimes "End of file" (but the files where readable when downloaded to the development PC).

The current situation is that i get "End of file" AND the files are truncated to 0 bytes after the operation, although the ReadOnly access parameter (!).

Any hint?

 

Thanks

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 1 of 3
(2,348 Views)

Please post your code as an attachment. Seeing your code will make it a lot easier for us to understand your problem.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 3
(2,340 Views)

Uhm... I made a last attempt by flattening the datatypes to string and storing/reading them as text files. The program started to work.

Remark that the file content is the very same.

It keeps working even if I come back to the original code and delete the files.

Definitely I don't understand why this "solution" works.

 

Thank you anyway Thoric for your answer.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 3
(2,337 Views)