annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

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 Compliments
Message 1 sur 11
4 562 Visites

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 Compliments
Message 2 sur 11
4 557 Visites

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 Compliments
Message 3 sur 11
4 536 Visites

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 Compliments
Message 4 sur 11
4 516 Visites

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 Compliments
Message 5 sur 11
4 514 Visites

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 Compliments
Message 6 sur 11
4 511 Visites

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 Compliments
Message 7 sur 11
4 501 Visites

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

Tout télécharger
0 Compliments
Message 8 sur 11
4 500 Visites

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 Compliments
Message 9 sur 11
4 495 Visites

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 Compliments
Message 10 sur 11
4 488 Visites