I am having trouble putting together IF statements when the conditionals being evaluated are not exclusively ORed together or ANDed together. The specific syntax is:
IF (override = .FALSE.) .AND.
(((LEVEL < THRESHOLD)) .OR.
((LEVEL > THRESHOLD) .AND. (SWITCH==.FALSE.)))
In order to evaluate as true the override has to be disabled and one of the two following conditions must be true. Either the level is less than the threshold or the level is greater than the threshold and the switch is OFF.
Any help would be appreciated.
Conditionals which combine AND/OR logic currently require nesting the IF conditions:
IF (override == FALSE)
IF LEVEL < THRESHOLD
IF (LEVEL > THRESHOLD) AND (SWITCH == FALSE)
@James feel free to correct me if there’s a better alternative approach.
Thanks Josh for the quick response. I’m a bit confused. When I’m in the Rule Engine and bring up an “IF” statement I’m limited to clicking on the predefined choices (device, mode, variable, etc.). Your response appears to be typed within an editor and not built by clicking on the pre-defined options.
I’m guessing I’m missing some major piece!
@Marc_Orlick, you can add nested IF_Conditions in the THEN and/or ELSE paths, not within the IF_Condition’s comparison section. See the screenshot below.
Fantastic!! I’ll give it a try