Just do it with two tests like you did in the second half that line...
Actually, wait, this is silly. The test is if psi is less than setpoint +/-1... what's the cutoff? If psi is less than setpoint-1, you know it's less than setpoint+1 and everything in between... So you can just pick a cutoff and get the same results
Sorry, I can see what you mean... Basically I have a sensor reading a value and then this statement decides whether to activate a pump or not. But its too sensitive as the sensor constantly fluctuates around 0.05 and in that 0.1 +/- range I don't want the pump to do anything...
I want it to be - IF PSI is SMALLER THAN (Setpoint +/- 0.1) AND PSI it NOT between 0.18 and 0.29
I want it to be - IF PSI is SMALLER THAN (Setpoint +/- 0.1) AND PSI it NOT between 0.18 and 0.29
Let's work on that requirement statement. Do you mean "if psi < setpoint + 0.1" or do you mean "if psi < setpoint - 0.1" or do you mean something completely different?
Ahhh what I want basically won't work... I can see it now basically the setpoint, once its set it doesn't move. the PSI is the reading being lively read from the board, I only want to it to activate the pump IF the PSI fluctuates more than 0.1 in either + or - from the setpoint.... Does that make more sense? I just don't know how to go about that...
Within the body of that block, you can test that psi is not too low or too high, but how that is possible, if the reading is close to the setpoint is a mystery to me.
The setpoint doesn't change. The setpoint is a set pressure, the sensor is constantly reading the pressure but the pressure constantly fluctuates between 0.05 either way (plus and minus).. I ONLY want the pump to activate if the ACTUAL pressure read from the sensor deviates too much from the setpoint (0.1)... Im not sure how I can explain it in any other way thanks for your help though!