From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read file

Solved!
Go to solution
Hi all :  Attach see file please , this vi read from specific file c:\demo\output.txt … if the file exist .. if not it will check existing file every 100 msec  What I want to do if the file does not exist after 5 sec program vi will  VI stop  Thanks  
0 Kudos
Message 1 of 4
(2,402 Views)

Hi wisam,

 

I cannot open your file due to your LV version, but I am guessing that you are using a while-structure.

If yes, then you can get the number of iterations from the blue "i" in the bottom left corner of your while-structure.

you can then use that number to build a break condition for your structure.

hope I could help.

 

Regards,

Pattos

LabVIEW Gretchin
0 Kudos
Message 2 of 4
(2,392 Views)
Here you go.
Tim
GHSP
0 Kudos
Message 3 of 4
(2,385 Views)
Solution
Accepted by wisam elyan

Hi wisam,

 

so you have a loop that should stop when a file is found OR after 50 iterations. Why not program it just like that?

 

Notes:

- Don't get in the habit of using strings for path constants. That's what path constant are good for.

- Avoid Rube-Goldberg code like outputting a boolean constant in the case structure, that is equal to the selector input...

Message Edited by GerdW on 10-12-2009 02:48 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,382 Views)