This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Error 1 or 6: Input Parameter is Invalid in LabVIEW

Updated Apr 24, 2019

Reported In

Software

  • LabVIEW

Issue Details

I see an error message that states:

Error 1 (or Error 6) occurred at Write to Text File in File Path - An input parameter is invalid
 

Solution

  • The Windows file naming convention prohibits the use of certain characters in the file path that is eventually input to the File I/O sub VI's. This error is most commonly associated with backslash, colon, and other control characters that are unintentionally included when a string is converted to a file path - especially if a date is included in that string (i.e. 9/22/04). (The following characters should not be present in any file name: \ / : * ? " < > |).
    • Removing or replacing all of the control characters from the input string should remedy this error.
  • It also possible that the input string is invalid if the enter key has been pressed and all string info is not on the first line. Just remove the enter to resolve the issue.

Additional Information

Even if control characters are not visible in the input string they may still be present, but are easy to find. Connect either a control or indicator to the input string and enable backslash code display (select Properties » Display style by right-clicking the indicator). If you determine that control characters have been included, they can be replaced with a non-control character (such as underscore) by using the Search and Replace Pattern.vi located on the string sub-palette. 

This error could also occur if you specify a file name without a drive path inside a file path entry. You need to make sure that your drive path is included along with your file name (i.e. C:\filename or E:\filename).

In the attachments there is a VI that demonstrates a solution that utilizes the Search and Replace Pattern.vi.

WAS THIS ARTICLE HELPFUL?

Not Helpful