LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Error

Solved!
Go to solution

See attached code.

 

First, run 2.png to the reference into the FG and write a header to the file.  After that I write to the file with 1.png. I get the follwing error

 

 

LabVIEW:  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 @.

 

Why is that?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
Download All
0 Kudos
Message 1 of 3
(2,718 Views)
Solution
Accepted by topic author jyang72211

When the VI stops, the reference becomes invalid. It gets closed automatically as part of the cleanup operation when the VI stops running.

 

You need to keep the VI running to keep the reference valid. As proof, place a "refnum to path" in the write case and place an indicator on the output. You'll see <not a path>.

 

Redesign your program.

Message 2 of 3
(2,701 Views)

Thanks.  This is what I need.  I thought of that possibility, but I guess I didn't test it detail enough.  That ref to file is pretty useful.  I didn't know about that.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 3
(2,676 Views)