5 or 6 months ago we changed the software to make the comparison in the hysteresis test use the same comparison operator as the simple limit test. So if you haven't downloaded the current version of the software you should. It now looks like:
public bool SimpleLimitTest(double value, double limitvalue, int limittype)
{
bool result = false;
if (!ChartSupport.BGoodValue(value)) return result;
switch (limittype)
{
case SPC_LOWERTHAN_LIMIT:
if (!alarmState)
{
if (comparisonOperator && (value <= limitvalue))
result = true;
else if (!comparisonOperator && (value < limitvalue))
result = true;
else
result = false;
}
else
{
if (!comparisonOperator && (value >= (limitvalue + hysteresisValue)))
result = false;
else
if (comparisonOperator && (value > (limitvalue + hysteresisValue)))
result = false;
else
result = true;
}
break;
case SPC_GREATERTHAN_LIMIT:
if (!alarmState)
{
if (comparisonOperator && (value >= limitvalue))
result = true;
else if (!comparisonOperator && (value > limitvalue))
result = true;
else
result = false;
}
else
{
if (!comparisonOperator && (value <= (limitvalue - hysteresisValue)))
result = false;
else
if (comparisonOperator && (value < (limitvalue - hysteresisValue)))
result = false;
else
result = true;
}
break;
}
return result;
}