Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

automatically stop a vi execution when condition is met

I am looking for a very simple method to stop a VI execution when the preset condition is met (ex:  I use a "for" loop in a "Formula Node" to read the number from an arrary, I compare the data with a constant each time the data is read, then I want to VI execution to stop when the condition is true.

 

Thanks.

0 Kudos
Message 1 of 7
(8,934 Views)

Hi Iywillc!

 

Please take a look to the code I've attached. It includes a for loop with a stop condition. This can be created by right clicking on the loop and activating the conditional terminal.

 

I hope this helps!

 

Kind Regards

 

Carlos O

Applications Engineer

National Instruments

0 Kudos
Message 2 of 7
(8,928 Views)

This is not exactly what I was lookng for.  I use a"Formula Node" in my appication.  A small C program (for loop to read a 1-D array) is written to compare the data in the array.  If the condition is met then the execution will stop.

 

Thanks.

Download All
0 Kudos
Message 3 of 7
(8,926 Views)

Update of my VI model.

0 Kudos
Message 4 of 7
(8,924 Views)

I think I got it work.

0 Kudos
Message 5 of 7
(8,922 Views)

Hi,

     Iam using LV2009.So I can't view this example.Can anybody please convert it for me?

 

     Thanks.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 6 of 7
(8,860 Views)

Hi!

 

There you go! The attached file is saved for LabVIEW 2009.

 

Mikhail
RF Toolkits, Product Support Engineer
National Instruments
Message 7 of 7
(8,850 Views)