Load
The accumulator is loaded with the operand defined in the operand field.
Valid operands for this operator must be of one of the following data types: (ANY)
This code example simply exchanges the values of var_1 and var_2 with the help of an additional variable var_3.
In the POU header, all input and output variables are declared that are used for programming this function.
var_3:= var_1&var_2;
LD |
var_1 |
(* Load var_1 in accu *) |
ST |
var_3 |
(* Store accu in var_3 *) |
LD |
var_2 |
(* Load var_2 in accu *) |
ST |
var_1 |
(* Store accu in var_1 *) |
LD |
var_3 |
(* Load var_3 in accu *) |
ST |
var_2 |
(* Store accu in var_2 *) |