LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep the output of a case instruction

Hi

I have used a case instruction in my VI and I would like to compare the output from this case instruction with user input but the problem is when the condition of the case instruction is F my output becomes the default value "0" while I would like to keep the value  in T situation .better to say I want to save the value of I and V (when case condition is true) in 2 variables out of the case instruction.Would you please help me how can I save these values?

0 Kudos
Message 1 of 5
(2,359 Views)

Hi,


It is not very clear what you are actually trying to do. But what I undestood is you want to retain the value of a particular function when the case was true. For this you can pass that value into a shift register in the true case. Check the attached VI to know how to do it.

Regards,

Nitzz

(Give Kudos to good Answers and Mark it as a Solution if your Problem is Solved;)) 

Message 2 of 5
(2,350 Views)

If you uncheck "Use Default Value if Unwired" on the output tunnel, the box will be an open (white center) square rather than the partially filled box in your image and theVI will be broken, forcing you to wire something (such as the shift register suggested by NitzZ. Allowing Use Default if Unwired can result in unexpected behavior if you have not checked every case.  Unless you are certain that that is the behavior you want, you will probably be better off without Use Default...

 

 

Lynn

0 Kudos
Message 3 of 5
(2,331 Views)

Hi NitzZ

What you have done is exactly what I need to do just how can I use shift register out of my big case block.As you said I want to retain the value of I and V when the condition is true and keep the value unless I stop the vi manually.

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

Exactly what NitzZ has done.  Put your block diagram within a while loop and add shift registers to the while loop.  You cannot create shift registers from a case structure.  Considering your VI is not repeatable (looping), it is a sub-VI?  In this case, wire a constant true to your conditional stop.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 5
(2,304 Views)