S

Set (a Boolean operand)

  • Depending on the content of the accumulator, the operand defined in the operand field is set or kept. TRUE in the accumulator sets the operand, i.e. the operand is set to 1 (TRUE).

  • Valid operands for this operator must be of one of the following data types:BOOL.

  • Operator only available in IL programming language.

Example

POU header

All input and output variables used for programming this function have been declared in the POU header.

POU body

var_1 and var_2 can be of any valid data type, var_3 and var_4 have to be of type BOOL.

var_3 is only reset (set to 0 or FALSE) if the accumulator is TRUE, i.e. if var_1=var_2

IL body

LD

var_1

(* Load var_1 in accu *)

EQ

var_2

(* Compare accu with var_2 *)

S

var_3

(* Set var_3, if accu contains TRUE *)

ST

var_4

(* Store accu in var_4 *)

Modified on: 2019-01-24Feedback on this pagePanasonic hotline