LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to textfile problem

tupian.JPG

look at the picture(accessory),when I compile the program like this way,the error was coming.The path way of the file is not right.but I do not know why.if I do not use the "while"circulate,the probelm will not come.I do not know how to solve the problem.If you are a master of the Labview,please help me.thanks

0 Kudos
Message 1 of 11
(3,954 Views)

Hi ljkosjd,

 

which "error is coming"?

Which "path way"?

Which problem is introduced by the while loop?

Where's the relation between post title ("textfile problem") and the picture?

 

Your picture just shows a button connected to a case structure and a while loop stop condition. You should attach your VI and you should describe the error you're facing...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,949 Views)

The WHILE loop has a "Circulate" terminal, which is examined once per iteration, and determines whether the loop iterates again, or not.

 

This "Circulate" terminal is NOT NECESSARILY tested at the END of each iteration, it's tested whenever the data wired to it is available.

 

In your case, that will be soon after reading the button/switch that you have wired to it.

 

In other words, in your snippet, you read the button which commits you to iterating/not iterating, and THEN you do whatever is in the case statement.

 

Make sure that's what you really want to do.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 11
(3,928 Views)

here is the vi,the error  is "The input parameters is invalid,the input path may include operating system which does not allow for the character of the path"

0 Kudos
Message 4 of 11
(3,908 Views)

here is the vi,the error is "the input the path is invalid,the input path may include operating system does not allow for the character of the path",please help me thanks.

0 Kudos
Message 5 of 11
(3,906 Views)

What is the filename you have in the path control?  In the VI you attached, the path control is empty.

 

I see from your screenshot that you have a chinese character set.  Is it possible you have a chinese character in your path control that is not allowed by your operating system?

0 Kudos
Message 6 of 11
(3,903 Views)

I use a chinese name to define the filename.I am puzzled because if I do not control the while loop terminal,the program operates very well.If I control it,it would make error.here is a picture,I download from the Internet.You can

operate it.It is OK.But I do not know the red circle.It comes from where?its function and the following AND gate and the Not gate use for what?

 

see 图片1.JPG

0 Kudos
Message 7 of 11
(3,893 Views)

here is the vi(download from the internet,not mine)

Download All
0 Kudos
Message 8 of 11
(3,892 Views)

That function is unbundle by name to get the error status out of the error cluster.  Basically if the error cluster is NOT an error, AND the Power button is ON, then continue to the loop.

 

If you are not familiar with that function, then you need to take some LabVIEW tutorials.

LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

"if I do not control the while loop terminal,the program operates very well.If I control it,it would make error"

I have no idea what you mean by that sentence.  What to you mean by "control the while loop"?

 

I can't download your VI because, once again, you are using chinese characters.  That VI won't open on my OS.

 

Since your file problems seem to be related to using chinese characters, then I suggest you change your VI so that your filepath only consists of normal, English characters.  Obviously your operating system can't handle chinese characters.

 

0 Kudos
Message 9 of 11
(3,887 Views)

control the while loop terminal means this 图片2.JPG,when I run the program,I want to concrol when to write to the textfile.but now,if I stop the while loop, the textfile error will come.

0 Kudos
Message 10 of 11
(3,880 Views)