LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hold the value from the case struture

Hellow,

 

I am building a programme, in which I applied a case structure. About every 2-3 seconds its status will turns into "true", and there will be a value output. My problem is: how to keep this output value unchanged (hold that value) when the status turns back to"false"? and then change again when next true status come?

 

Its kind of ergent, hope someone could help. Thanks a lot!

 

P.S. The progrmme is build using Control and Simulation tooltik (ie in the control and simulation loop)

 

Best Regards,

 

Floyd

 

0 Kudos
Message 1 of 7
(2,964 Views)

Post a VI or a portion of the VI image so we can better help. Thanks! 🙂

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 2 of 7
(2,958 Views)

What are you doing with the "value"?

 

If it is just an indicator, place the indicator inside the case structure so it only updates in one of the cases.

If you need the updated wire value elsewhere, keep it in a shift register between iterations and wire it across in the FALSE case.

0 Kudos
Message 3 of 7
(2,953 Views)

My first thought was shift register.  As Altenbach stated, the False case just passes the value straight through.


GCentral
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
0 Kudos
Message 4 of 7
(2,949 Views)

another example, the "false" case statement has an indicator...shift reg.png

0 Kudos
Message 5 of 7
(2,931 Views)

Wouldn't it be easier to use a Feedback node instead of a shif register? It's basically the same thing as far as I understand.

 

Cheers, L

0 Kudos
Message 6 of 7
(2,847 Views)

@LukaAmbrozic wrote:

Wouldn't it be easier to use a Feedback node instead of a shif register? It's basically the same thing as far as I understand.

 

Cheers, L


Easier?  Not really.  It kind of depends on the situation.  In general, the shift register is easier to understand.

 


GCentral
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
Message 7 of 7
(2,841 Views)