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.
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.
06-22-2015 08:46 AM
Hello,
My VI look like it :
I would like to re-use the same command in my "while".
I have several case and I don't want to creat several text command.
If someone kown a trip please tell me how to do.
See you,
Solved! Go to Solution.
06-22-2015 09:15 AM
That code as written will not work. You are not making any updates to the string in the loop, therefore you either have a loop that runs once or an endless loop.
But if you want to reuse code, then make a subVI and call that VI multiple times.
06-22-2015 09:36 AM
The problem using a Sub VI is that I have only one IHM so only one "text command" .
06-22-2015 09:49 AM
06-22-2015 10:29 AM
I just want to reuse the same text command several time. Use a sub vi does not help me because I have another window.
06-22-2015 10:46 AM
Not really understanding what you're asking for here. What "text command" are you talking about? What other "window"?
Maybe you should post your question in French and let us translate? Post what you want your code to do and we can probably show you a better way than what you are trying.
06-23-2015 02:21 AM
Thank for your answer. I think the code I posted shows what I want to do but it's not all the code. My text box ("chaine") is already with others buttons and I don't want to create a sub VI to reuse it.
06-23-2015 06:35 AM
Hi,
I maybe not correctly undestand your issue, but you can use a local variable for what you are trying to do...
Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France
06-23-2015 07:16 AM
Ok thank you very much It work;
06-23-2015 07:31 AM
I don't think you want to do that.
You have introduced a race condition with your local variables.
What you want to do is read your "chaine" terminal in your while loop.
Get rid of your two inner while loops.
Wire "chaine" directly into the case structure.
Make a case for "HI" which lights x>y.
make a case for "Hello" which lights x>y2.