LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while closing a file

Hello.  I am running LabVIEW code, where before while loop I create a csv file and in a loop write some data to. After its done, I am trying to close the csv file with Close file where I pass ref number. But I have an error saying 

LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
Command requires GPIB Controller to be Controller-In-Charge.

Can someone help me with this issue? Thank you 

0 Kudos
Message 1 of 4
(830 Views)

Instead of the error, show us your vi.

 

Does the csv file exist after the the run? Are you sure the error in not created upstream?

0 Kudos
Message 2 of 4
(810 Views)

Sometimes an error upstream results in the concatenation of an invalid path.  For instance, maybe part of your file name is the test name and something happened where the test name became an empty string.

 

There are any number of things that could result in an undetected error, exponentially related to the experience of the programmer.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(795 Views)

If the Close File function causes this error it received an invalid refnum. Possible reason are that the file was already closed elsewhere in your program, but my guess after looking at the not posted VI is, that you have a case structure or similar inside the loop and the output tunnels for the refnum is not wired in one of the cases.

Rolf Kalbermatter
My Blog
Message 4 of 4
(769 Views)