plcmotionmotioncontrolleromron

Using the "NOT" operator in a conditional expression


Is there a shortcut in Omron/Sysmac to use the ! operator inside a conditional without typing FALSE?

(* Boolean Variable *)
variable : BOOL := FALSE;
(* Ok *)
IF (variable = FALSE) THEN
     ;
END_IF;
(* Don't Work *)
IF !variable THEN
     ;
END_IF;

Solution

  • Assuming this is standard structured text:

    IF NOT variable THEN
        ;
    END_IF;