LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting Shift Register depending on Value

Solved!
Go to solution

Hey y'all, I've been thrown into Labview at work, so I've been doing some mini programs and such on my own. The latest one I've written is an email notification system, as this is something I forsee using a lot. The idea is, I have a random number generator that picks a number every 100ms using a timed loop. When a number is over a certain threshold, say 0.5, an email is then sent and a flag is raised. From that point on, I don't want to send any other emails until the number is UNDER a certain threshold, say, 0.3. With what I've written, I can get emails to send no problem and I can stop them from sending (Using a shift register and boolean flag combination), but I cannot figure out how to reset the flag to allow emails once I 'roll' a number under my lower threshold.

 

Is there any way I can achieve this? I would be deeply obliged for any help. I've attached the VI I've made below, apologies if it's messy and whatnot.

I live for kudos!
0 Kudos
Message 1 of 5
(3,454 Views)
Solution
Accepted by topic author TheDude87

Use a Select statement after the case structure.  If the reset condition is True, then wire a True constant through to the shift register.  If the reset condition is False, then just wire the existing wire through to the shift register.

Message 2 of 5
(3,436 Views)

This seems right to me! From the modifications I've made, did I follow what you meant? From the testing I've done, this seems to do the job, I just want to make sure I understand the concept you were putting forth there.

I live for kudos!
0 Kudos
Message 3 of 5
(3,431 Views)

Exactly!

Message 4 of 5
(3,426 Views)

Perfect, thanks very much for the help!

I live for kudos!
0 Kudos
Message 5 of 5
(3,420 Views)