Assignment
Operator - variable assignment.
Inputs
Input |
Data type |
Description |
IN |
ANY |
Any variable or complex expression. |
Outputs
Output |
Data type |
Description |
Q |
ANY |
Forced variable. |
Remarks
The output variable and the input expression must have the same type. The forced variable cannot have the read only attribute. In LD and FBD languages, the 1 block is available to perform a "1 gain" data copy. In LD language, the input rung (EN) enables the assignment, and the output rung keeps the state of the input rung. Both LD and ST instructions can be modified by N in case of a boolean operand for performing a boolean negation.
ST Language
Q := IN; (* copy IN into variable Q *)
Q := (IN1 + (IN2 / IN 3)) * IN4; (* assign the result of a complex expression *)
result := SIN (angle); (* assign a variable with the result of a function *)
time := MyTon.ET; (* assign a variable with an output parameter of a function block *)
FBD Language
LD Language
The copy is executed only if EN is TRUE.
ENO has the same value as EN.
|
Assignment |
IEC 61131-3 Automation platform > Programming - Reference guide > Basic Operations > Assignment |
Created with the Personal Edition of HelpNDoc: Streamline your documentation process with HelpNDoc's WinHelp HLP to CHM conversion feature