01-26-2024 11:25 PM
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
01-27-2024 12:12 AM - edited 01-27-2024 12:49 AM
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?
01-27-2024 12:51 AM
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.
01-27-2024 02:56 AM
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.