10-20-2014 12:54 PM
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?
Solved! Go to Solution.
10-20-2014 01:15 PM - edited 10-20-2014 01:15 PM
Sounds like a job for a Feedback Node.
10-20-2014 04:15 PM
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.
10-20-2014 07:12 PM
Post your VI.
10-21-2014 01:44 AM - edited 10-21-2014 01:44 AM
10-21-2014 06:43 AM
@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.
10-21-2014 09:56 AM
Thanks for the help! GerdW, that was exactly the problem. I didn't initialize the shift register either.