11-23-2018 03:36 AM
Hi all,
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 @."
Any suggestion?
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.
11-23-2018 04:15 AM
Save the example in LV 2016 or attach snippets.
Not all of us have LV18.
11-23-2018 04:33 AM
Apolologize!
I don't have LV2016 in attachment the pics
LVOO open , LVOO write, The cluster and the test
Thanks again
11-23-2018 04:59 AM
Did you see file dialog during test? Is filepath coorect?
11-23-2018 05:24 AM
Hi,
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.
11-23-2018 05:47 AM
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
11-23-2018 06:21 AM
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.
/Y
11-23-2018 07:17 AM
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,
11-23-2018 05:04 PM
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 ...
Bob Schor
11-28-2018 05:30 AM
Hi,
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.