LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hold indicator value after threshold is exceeded

Solved!
Go to solution

I have a portion of my VI that uses an auto indexed for loop to view an array of 10 boolean values indicating whether a test threshold has been exceeded.  If a false value is recieved on any of these 10 channels, I need to have an indicator display the current temperature for that channel.  The problem I am having is that subsequent false values continue to update the temperature value rather than keeping the temperature reading when the threshold was exceeded.

 

Looking over the discussion forums, it seems like maybe a shift register is how this is done.  Is adding 10 shift registers allowing me to look at the last value for each channel the best way to handle this?

 

0 Kudos
Message 1 of 7
(3,446 Views)
Solution
Accepted by Nelzone

Sounds like a job for a Feedback Node.


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 7
(3,435 Views)

The way you have the feedback node and shift registers makes sense, but I can't seem to get any temp values in my output array when I switch any of the boolean inputs....Am I missing something obvious here?  I run the VI with all the inputs set as True.  When I switch an input to false, I should see a temp value show up in the corresponding output array location shouldn't I?  They all stay at zero regardless of what I do with the input switches.

0 Kudos
Message 3 of 7
(3,402 Views)

Post your VI.

0 Kudos
Message 4 of 7
(3,364 Views)

Hi,

 

you (all of you) forgot to initialize the shift register of the loop!

 

Default for SR is empty array. Empty array means "no iterations in FOR loop" again causing empty array in shift register…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(3,333 Views)

@GerdW wrote:

Hi,

 

you (all of you) forgot to initialize the shift register of the loop!

 

Default for SR is empty array. Empty array means "no iterations in FOR loop" again causing empty array in shift register…


And that's what I get for not testing due to trying to get other work done.  Nice catch.


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 6 of 7
(3,317 Views)

Thanks for the help!  GerdW, that was exactly the problem.  I didn't initialize the shift register either.

0 Kudos
Message 7 of 7
(3,294 Views)