LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 occurred at Close

In "Write into file.vi"
the file is opened and is writen normally by choseing ile options.Opened file refnume is cycled by shift registr.
But when file option is "close" error is coming.
I cant understand why???
I even reinstal my labview

0 Kudos
Message 1 of 4
(3,324 Views)

Just by looking at your code: the first time you call Write into file.vi with Close option, it works ok. But then while loop cycles and the second time you pass null reference into Close file - which produces error.

0 Kudos
Message 2 of 4
(3,313 Views)

I use this vi as subvi, at first time I call it with "open" option, then many times with "write" option, and no error, but the when i coll it with "close" option the error is coming.

0 Kudos
Message 3 of 4
(3,307 Views)

Your example program isn't really good.  You can be constantly opening the file without closing it.  Use an event structure and add a button to execute the chosen action.

 

Using highlight execution, it is obvious that the close case is actually being called multiple times due to the polling architecture you have.  The second time the close case is called is when you get the error.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,305 Views)