LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error code 1, identifying the invalid parameter, output to a text file

Solved!
Go to solution
Highlighted

I am using labview to record information from a load cell.  I have building a file path set up, data coming in and outputting in the wave chart and as a string, when trying to write it out as a text file nothing is being written.

 

Error out is giving me code 1.  The source is “Open/Create/Replace File in…”

There is an invalid input but as far as I can tell it is everything looks fine. 

How do I identify the invalid input parameter?

What is causing this error?

0 Kudos
Message 1 of 7
(1,348 Views)

 Nice tag Ben.

 

As he will no doubt point out soon the "Create" constant should be "Open or Create"

 

Also, check that constant into Number to Fractional string-  You probably want more than 1 digit of precision.

Always maintain an accurate count of deployed mousetraps.
Message 2 of 7
(1,317 Views)

@JÞB wrote:

As he will no doubt point out soon the "Create" constant should be "Open or Create"


Could also be "Create or Replace".  Regardless, if you try to overwrite a file that already exists, you get error code 10.  Trying to create a file to a folder you do not have access to gives you error code 8.  Trying to create a file in a folder that does not exists gives you error code 7.  Typically error code 1 is due to an expired reference.  I am running out of ideas.

 

Could you post your actual VI so that we can attempt to debug it?


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 3 of 7
(1,304 Views)

Thank you for the input. 

I've tried the "Open or Create" and "Open or Replace".  But it still yields the same result.

 

Open/create/replace file in

sub vi's program name.vi -> main vi's name.vi <APPEND>

C:\filename.txt

 

It does not seem to see the filename input from the main vi as a vaild input and I can't figur out why.

0 Kudos
Message 4 of 7
(1,283 Views)

Thank you.

If you would like to see the VIs they are attached.

 

Open/create/replace file in

sub vi's program name.vi -> main vi's name.vi <APPEND>

C:\filename.txt

 

It does not seem to see the filename input from the main vi as a vaild input and I can't figur out why.

0 Kudos
Message 5 of 7
(1,280 Views)

Browse Options on your user controls.  These need to be set to browse for folders rather than files.  Set them with the property editor.

Capture.PNG

Always maintain an accurate count of deployed mousetraps.
0 Kudos
Message 6 of 7
(1,255 Views)
Solution
Accepted by topic author JonThorn

It was something else.  At the end of the filepath in the file path building vi I had a carriage return line feed at the end of the path.  Ben Noticed it.  I got rid of that and am now writing .txt files with no problem.

Message 7 of 7
(1,249 Views)