|
Re: LabView question
Well you want something a little different. You want to delay the reaction to a Boolean changing state.
You want to “hold back” the Boolean state by some amount.
This is what I came up with.
My first cut was fairly simple, but failed in what was to happen if the BooleanIn changed back to it’s original state before the delay timed out?
So I had to rethink it.
Each time the Boolean In changes state I calculate the delay time and take the state and “queue” them in an array.
Then I check the 1st item in the array to see if the time has passed, if so the Boolean state is passed to Boolean out and that item is removed from the array.
If the array is empty the current state of Boolean IN is just passed to Boolean Out.
The Boolean Out state will track the Boolean IN state but delayed by a set about of time.
This VI is Reentrant so you can use it in multiple places
Enjoy
__________________
Omar
|