I'm moving the first steps into LVOO. and I try to do a "wrap" of FILE I/O VI in LVOO.
To do that :
- I've done a LVOO class
- Into the class I've created 2 methods : open and write. The first one include open\create the second only the write VI
- in the private class data cluster I put the file reference of the opened file.
- to obtain the right ref , I've drag&drop the indicator from the output of "open VI" fuction to the cluster
- the ref nume is the reference for the write methods
- when I perform the test...error :
" Possible reason(s): 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 @."
In attachment the projetc (LV2018) with the LV class and test.vi to perform the test, in any case I'am able to write into the file.
Solved! Go to Solution.
the path is correct and I'm able to write something into the file but I've also something strange into the file reference, this something is cause of error but I don't understand the cause.
I don't have errors with correct filepath.
I think you have mistake in path or your file locked by another program.
Try your test without classes
You don't have any filepath connected to the Open VI, or is it supposed to be a constant? If so, it should be a constant on the diagram.
In VI Open method (class version) I've forced the path inside the method and used the option (make as default value and initialize with) so to "embedded" the same file. The open works, the error is during the write operation,
When I open the Zip file, the Open routine has a file of yours specified (which, of course, I don't have). I tried changing the file to one of mine, but every time I ran it, it somehow "remembered" your file and gave me an Error 7, File not Found.
I noticed you had Open coded as a Shared Reentrant Clone. I changed it to non-reeentrant, and it ran without error, leaving me a file with xxxxxx written to it. You probably should include code to close the file ...
It is not clear why your Open and Write routines are clones ...
thanks for the support.
The reason to use shared clone if permit the use of the functionality in different point.
Let me explain,better.
I want use the logfile utility in different part of my project on different file for different Subsystem, so the Subsystem 1 produce logfile1, etc. etc.