07-01-2016 01:32 PM
Next problem to solve is the file, some reason when I type the file name I want, it tells me that file does not exist but I have the open or create selected. The labview file handling examples are not very useful since they seem to show writing to static files. Unless there is one I've missed
So how would I go about making it so the user can actually type in the file he/she would want?
07-01-2016 01:37 PM - edited 07-01-2016 01:44 PM
From the help window:
If file path is the path to a directory that does not exist, this function returns an error. Use the Create Folder function to create a directory.
The OpenG toolkit also includes some handy VIs for folder creation.
What is the exact error that you are receiving? What path are you trying to use? If the path you give it is a valid path, then the file should be created.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2016 01:42 PM
Thanks, I'll look that up
Yes the folder does exist and if I place a file in the directory and choose that file it works but I can only use a file name that exists
07-01-2016 01:44 PM
Is the directory write-protected?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2016 02:05 PM
the path is in MyDocuments and I create a file with a text editor and place it in the directory then choose that file it will write to it but I can't seem to create a new file.
I've tried to add another case and file detector but that still doesn't seem to solve it
07-01-2016 02:06 PM
What is the exact error that you are receiving?
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-01-2016 02:28 PM
What is your OS? If LabView is not running as admin, try running it as admin first, then try to create again.
07-01-2016 02:39 PM
Has anyone told you about the "light bulb" yet?
That button that looks like a light bulb will put your code in execution highlighting mode.
I suspect that if you put your code in light-bulb mode and then run you V and then click the Measure button....
You will see the event case will fie and the value of the measure button BEFORE the event fired will be passed tot he loop. That same value will be used for every iteration of the internal loop.
For you to be able to stop that loop, you will have to read the button INSIDE the loop to get it's current value.
Also note that the stop contion can be set to "Stop if true" or "Run if true" by right clicking the stop terminal.
And while you are in light-bulb mode, you may also notice an error if any.
Ben
07-01-2016 02:42 PM
Attached is a screen shot, File not found but it shouldn't need to find it because I'm telling it to create the file?
07-01-2016 02:45 PM
In the background of the error message it looks like you have a "open" enum wired to the Open/create file VI. Use the hand tool to select "Open or create" and try it again.
Ben