LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why computer crashes when reading file

Maybe not crash, but the program locks up hard. What I'm doing is pretty simple. I write some non-ASCII string(a record) to file (using write to file function) and appending new strings to file on the fly. This works fine. The problem is when I use the read from file function. The program locks, I get a "not enough memory to complete operation" message, and I usually have to hit the pwer button and re-start the computer. This is a very simple operation and should not be giving me this much grief. I just upgraded to Labview version 7.0 from 6.1. Does anyone know what's going on with this or had it happen to them. The codes pretty small and I can make it avcailable for anyone who wants to take a look.
Thanks

Andy Curda

American Superconductor
0 Kudos
Message 1 of 6
(2,869 Views)
Don't rule out a hardware failure, e.g. a hard disk that is getting bad. Do a full surface check of your HD.
0 Kudos
Message 2 of 6
(2,869 Views)
I think you should post your code and an example of the file. The "not enough memory" could have several causes - opening file references repeatedly without closing, build array, concantenate strings, local variables, .etc.
Message 3 of 6
(2,869 Views)
Hi Dennis,
Attached is the code. It's 3 VI's in a library. The problem is not a crash, when Read from File executes, it returns error# 4, eof found. Please let me know if you have any dificulty with the code or questions, or if it works for you.

Thanks
Andy
0 Kudos
Message 4 of 6
(2,869 Views)
You've specified the byte stream type to be strings but you are writing non-ascii to the file so the file read doesn't see anything until EOF. If you change the byte stream type to U8, then it will read a value of 5 back and this matches what your example file write does.
0 Kudos
Message 5 of 6
(2,869 Views)
Thanks Dennis,
I had a feeling it was something simple like this.
Andy
0 Kudos
Message 6 of 6
(2,869 Views)