AND Connection
The content of the accumulator is connected with the expression in the following brackets by a logical AND operation. The result is transferred to the accumulator.
Valid operands for this operator must be of one of the following data types: (BOOL, WORD, DWORD)
All input and output variables used for programming this function have been declared in the POU header.The same POU header is used for all programming languages.
LD |
var_1 |
(* Load var_1 in accu *) |
(* Since bracket expression follows, save content of accu; process expression in brackets first *) |
||
AND( |
var_2 |
(* Load var_2 in accu *) |
OR |
var_3 |
(* Perform OR of var_3 with accu; store result in accu *) |
) |
(* Perform AND of saved accu content with actual content of accu; store result in accu *) |
|
ST |
var_4 |
(* Store accu in var_4 *) |