LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep/latch a value

Hello,

 

I am trying to design a simple vi to update a indicator's value in the 1st condition, and keep the indicator's value the same (latched) in the 2nd condition. I tried to use a simple formula node and it doesn't work. The indicator always reset its value to zero in the 2nd condition. Can anyone help me to achieve this function ? 

 

Thanks,

Charlie

 

Charlie_68_70_0-1635169405514.png

 

0 Kudos
Message 1 of 4
(1,276 Views)

I would just not use the Formula Node.  You can use the Greater? primitive to do the comparison and a Select primitive to choose the value to set to C.  I would also store the C value in a Shift Register so I could use the value in the FALSE case of the Select.


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 2 of 4
(1,262 Views)

Hi crossrulz,

 

Thanks a lot for the suggestions. The Shift Register is the magic and it works !

 

Cheers,

Charlie

0 Kudos
Message 3 of 4
(1,231 Views)

Also, you should use native structures instead of the formula node. One option was the Select node mentioned earlier the other would be to use the Case structure.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 4
(1,222 Views)