Sign indicator of x. SIGN (x) returns a Boolean True (1) value if the sign of x (operand one) is positive. It returns a Boolean False (0) value if x is negative.
Syntax:
'external reference' := SIGN(Real value);
Example:
VAR T63; T64; T17; T18; (* Temporary values *) END_VAR; T63 := .5; T64 := -15.803; T17 := SIGN(T63); T18 := SIGN(T64);
The above example shows T63 set to the value of .5 and T64 set to the value of -15.803. T17 is set to the result of SIGN(T63), which is 1 and T18 is set to the result of SIGN(T64), which is 0.