cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

use the same command

¡Resuelto!
Ir a solución

Hello,

 

My VI look like it :

 MYVI

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,

0 kudos
Mensaje 1 de 16
4.327 Vistas

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Mensaje 2 de 16
4.310 Vistas

The problem using a Sub VI is that I have only one IHM so only one "text command" .

0 kudos
Mensaje 3 de 16
4.299 Vistas
What is IHM supposed to mean? Your code makes no sense.
0 kudos
Mensaje 4 de 16
4.287 Vistas

I just want to reuse the same text command several time. Use a sub vi does not help me because I have another window.

0 kudos
Mensaje 5 de 16
4.271 Vistas

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. Guiño

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 kudos
Mensaje 6 de 16
4.263 Vistas

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.

0 kudos
Mensaje 7 de 16
4.227 Vistas
Solución
Aceptado por el autor del tema Sergreyn

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

0 kudos
Mensaje 8 de 16
4.199 Vistas

Ok thank you very much It work; 

MYVI2.PNG

0 kudos
Mensaje 9 de 16
4.189 Vistas

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.

Mensaje 10 de 16
4.176 Vistas