Here is my dilemma. I have a program that outputs certain true/false data depending on a series of cases. The cases are dependent on an input variable, that can range from 0 to 100. It is constantly changing between these values in a while loop. Right now, I have the cases set up as follows:
Input 0 to 25: Outputs: F,F
Input 25-50: Outputs: F,T
Input 50-100: Outputs: T,F
The cases are determined by the "in range" vi which sees if the variable is in the 0-25 range...etc. The cases are all set up properly for these ranges. I'll try to attach my file as an 'answer' to this question. I'd like the ability to create a threshold of 5.
For example, if the input variable gets up to the 25-50 range, and then drops back down to
23, I still want the output to be: F,T. If the input variable drops all the way back to 20, I want the output to be again in the 0-25 range: F,F.
I need to do the same thing for the change from 50-max. If the input variable drops to 46, I still want the outputs to be in the 50-100 range: T,F.
In essense, if the variable moves from a lower to a higher range, keep it in that higher range until the variable drops to 5 below the minimum value for that higher range (ie, dropping from 25 to 20). Once that has happened, move back down into the lower range. If the variable then goes up again to 25, change the output to be in the 25-50 range.
I know I'm not explaining this very well, but feel free to email me at jdalton@nal.com if you have a solution to my problem or if you have any questions regarding the explanation above. Any sample code added to my own (hopefully below) would be greatly appreciated.