Comparison of C Language and ST Language in Xinjie PLC

Comparison of C Language and ST Language in Xinjie PLC
C Language ST Language
Addition + +
Subtraction
Multiplication * *
Division / /
Assignment = :=
Logical AND && AND
Logical OR || OR
Logical NOT NOT
Comparison – Greater Than > >
Comparison – Less Than < <
Comparison – Equal To == =
Comparison – Not Equal To != <>
Comparison – Less Than or Equal To <= <=
Comparison – Greater Than or Equal To >= >=
Exit Entire Loop break EXIT
Exit Current Loop continue continue
Modulus a%b a MOD b
Convert Float to Integer (int)x REAL_TO_INT(x)
Convert Integer to Float (float)x INT_TO_REAL(x)

The differences are highlighted in the yellow part of the image below:Comparison of C Language and ST Language in Xinjie PLC

Leave a Comment