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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

je cherche un moyen pour sortir d'une boucle While a l'aide d'un bouton en face avant sous labwindows/CVI 6.0?

bonjour, j'ai crée une boucle while infini dans ma face arriére .c et je voudrais pouvoire en sortir ou l'arréter avec un bouton placer sur ma face avant .uir . comment puis je faire?
0 Kudos
Message 1 of 2
(2,628 Views)
I hope I have correctly translated from french: you are looking for a way of exiting an infinite while loop by means of a button in the user interface.

You can obtain this using a common variable set to 0 before starting the while loop, raised to 1 in the button callback and used as an exit condition inside the loop. For this mechanism to work, you will need to add a ProcessSystemEvents () inside the loop, otherwise user interface events are not processed by the program while executing the loop.

I'm sorry but I'm not able to translate it in french: I hope this explanation is clear enough.

You can look at the attached project for an example.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(2,628 Views)