Arithmetic Operations using Structured Text- IEC-61131-3
Structured text supports direct Arithmetic Operations like Addition, Subtraction, Division and Muliplication:
//structured Text Variable Declaration
x:REAL:=150;
y:REAL:=10;
a:REAL;
b:REAL;
c:REAL;
d:REAL;
//Sructured Text Arithmetic Example
a := x + y ;
b := x - y ;
c := x * y ;
d := x / y ;
Result:
© Copyright 2022 Advanced PLC. All rights reserved.