08-17-2009 09:06 AM
The error dialog comes up because you have automatic error handling turned on. I personally despise that feature and is one of the first things I turn off with new LabVIEW installs.
If you're going to get a subset of the string as you are currently doing you don't need Scan From String. You can simply use the standard string to numeric function Fract/Exp String to Number function. That function will ignore spaces that occur before numeric characters.
08-17-2009 09:53 AM
09-14-2009 06:05 AM
09-14-2009 09:15 AM
It's asking for a file path because you have a Write Characters to File VI where you have nothing wired to the file path input. If there is no file path, then it pops up a dialog.
You say "though it is already there". Where? Your original file dialog is only wired to the Read File VI.
09-14-2009 10:13 AM
Sorry I upload the wrong vi. This is the correct one. Even I input the file path, it still asks me to input the file path again when I run the program. Sorry the raw data cannot be uploaded because it is not permitted by the forum.
Thanks.
09-14-2009 10:22 AM
You are using the File Dialog function. As the context help, and the online help (documentation) for that function, say :
"Displays a dialog box ... "
So, obviously, you're going to get a dialog box. The path you provide is a starting path. If you cancel out of this dialog, then the output is an empty path, so the read VI will get an empty path, and you'll get another dialog. The function you want is Open File, or you can just wire the path directly to the Read VI.
09-15-2009 03:08 AM
Thanks for the message. But I don't understand what you mean. Would you mind to do the little change in the vi and upload in the web?
I tried to start with a string and change to a file dialogue box, see attached, but the same problem happened.
Thanks again.
09-15-2009 09:26 AM
What you are doing and asking for is just plain silly. If you do not want a popup asking the user for a file name, don't call the File dialog function. No matter what you pass to it, you will get a popup. Read the help for the function if you don't believe what others have told you. If you want a front panel control or a diagram constant for a path, then wire that directly to the file read function. Using a string constant and converting that to a path is also unnecessary. Just use a path constant.
You should really take some of the tutorials before trying to write any code and before posting any more questions.