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: 

Sortir d'une boucle while par un bouton extérieur à cette boucle

Bonsoir,

 

question bête...lorsque l'on se trouve dans une boucle while existe-t-il un moyen pour sortir de cette boucle en actionnant un bouton qui ne se trouverait pas intégré à la boucle ?

 

Merci d'avance pour vos réponses.

 

Cordialement.

0 Kudos
Message 1 of 5
(3,246 Views)

Hi SyP,

 

Thanks for posting on the National Instruments Forum. 

 

This part of the Forum is in English, please post here in English and over there in French. 

 

It is possible to create a local variable to implement what you want to do. Please find below an example where you have 2 While loops in parallel and one Boolean control which interact in both loops using right click on the stop control>>Create>>Local Vairbale.

2 While Loop in Parallel.png

Message Edité par BenjaminR le 08-13-2009 03:58 AM

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 2 of 5
(3,227 Views)
Duplicate

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 3 of 5
(3,222 Views)

this solution not work. when I tried to apply it, it gave me the following error message : Boolean "stop" : boolean latch action is incompatible with local variables

0 Kudos
Message 4 of 5
(2,871 Views)

As your error mentioned boolean latch action is incopatible with local variable. So modify it (cf. this link) Smiley Tongue

 

    Benjamin R.


Senior LabVIEW Developer @Neosoft


0 Kudos
Message 5 of 5
(2,860 Views)