09-07-2012 05:19 PM
I was running a program over and over again (dozens of times) with no problems and all of a sudden I got an error 43 from file dialog. When I get this error a box pops up saying the following:
"Error 1 occurred at Open/Create/Replace File in Write Spreadsheet String.vi->Write To Spreadsheet File (string).vi->20120816 multi Cycle IV trace with auto delay.vi
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 @.
P:\R&D\Studies\Test Logs\log IV-S178-protoA5-2-H5-
GB-ARD-1-dark--201209071512.txt"
As far as I can tell I haven't changed the file path or put in characters that are not allowed. And every time I run the program now I get this error.
What should I do about this? I'm totally stumped.
Thanks for your help,
Solved! Go to Solution.
09-07-2012 05:40 PM
Hi all,
My program is working again for no apparent reason.
I cleared all the fields and ran the program and it worked. Then I typed the exact same filepath that gave me the errors before and it worked.
That's labview for you, errors that pop in and out of existance for no apparent reason.
Thanks anyway though.
This forum is the only way to learn labview...
09-09-2012 11:49 AM
edCubed wrote:That's labview for you, errors that pop in and out of existance for no apparent reason..
LabVIEW is very deterministic in these scenarios. These observations are typically typically caused by PEBCAK errors.
Can you give us a little more information and maybe show us some code?
09-10-2012 11:05 AM
Thanks for replying,
I'm actually having the same problem again and getting the same error, so it seems the problem may be more serious than I thought.
To answer some of your questions:
*The only input I have going into my file dialog VI is the "default name" input. This input is a string made of appended strings from front panel
controls.
* I don't have "limit to single line" or "update while typing" set. I didn't know these were options I can set. How do I set up these options?
* I'm running windows 7, and I don't think I'm using characters that are not allowed in file names.
* I'm not using any local variables in my program.
* There may be race conditions going on. But i'm not sure they would cause problems even if they exist.
I've attached a copy of my code to this post. The problem happens before anything in the for/while loops is executed. So you can ignore all that code.
09-10-2012 11:20 AM
I just tried using "limit to single line", "update value while typing", and I tried disabling "enable wrapping". None of these worked.
09-10-2012 11:27 AM
Error code 43 indicates that an action was canceled by the user. Did you hit Cancel in the Open File Dialog?
09-10-2012 11:49 AM
An error message appears as soon as I run the program. The following message is generated:
"Error 1 occurred at Open/Create/Replace File in Write Spreadsheet String.vi->Write To Spreadsheet File (string).vi->20120816 multi Cycle IV trace with auto delay.vi
Possible reason(s):
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 @.
P:\R&D\Studies\Test Logs\log IV-S178-protoA5-2-H5-GI
-ARH-1-dark--201209100946.txt"
At this point I have the option to "stop" or "continue" running the program.
If I choose to continue I get another error message:
"Error 1430 occurred at Open/Create/Replace File in Write Spreadsheet String.vi->Write To Spreadsheet File (string).vi->20120816 multi Cycle IV trace with auto delay.vi
Possible reason(s):
LabVIEW: The path is empty or relative. You must use an absolute path.
<Not A Path>.txt"
I then have the choice to "continue" or "stop" again. regardless of the choice I make here the program stops running.
I'm going to see if I can rearrange the code to remove any race conditions but I'd appreciate any help you can give me.
09-10-2012 12:04 PM
To clarify: An error occurs when the file dialog vi is executed. I am not given the option to choose a file path, it just generates an error which is passed
to the write to spreadsheet vi giving me the error message I posted above. I don't know why the file dialog vi isn't working. maybe there is a setting
there which is incorrect or I wired insufficient information to it.
09-10-2012 12:14 PM
That's labview for you, errors that pop in and out of existance for no apparent reason.
This is simply a refusal to admit that computers do exactly what you tell them to do. 😉
What goes in between the two dashes: "dark--201209100946.txt" - seems like something is missing? Maybe something is wrong with the way you generate the pieces of the path.
I'd start by sticking probes on the wires on the controls that are used to concatenate the path. Next, I'd probe the wires coming from the VI(s) that generate the path components. Is P:/ a network drive with an OS that could possibly generate illegal characters in the file name?
09-10-2012 12:18 PM
Hi ed,
maybe you could create a simple VI with just the file dialog VI to test it's behaviour?
- In the mean time you could also check, why you create a "standard name" for the FileDialog including a ".txt" suffix and then, after the FileDialog, you again append a ".txt" suffix to the filepath. You append that suffix without any error checking - is this intended?
- You should use "Build Path" instead of ConcatString whenever you're dealing with file path to minimize risk of errors...