Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Operation Manual page 157

Function blocks
Table of Contents

Advertisement

Structured Text (ST Language) Specifications
Statement
EXIT
RETURN
Operators
Operation
Parentheses and
(expression),
brackets
array[index]
Function evaluation
identifier
Exponential
**
Complement
NOT
Multiplication
*
Division
/
Addition
+
Subtraction
Comparisons
<, >, <=, >=
Equality
=
Non-equality
<>
Boolean AND
&
Boolean AND
AND
Boolean exclusive
XOR
OR
Boolean OR
OR
Note Operations are performed according to the data type.
Therefore, the addition result for INT data, for example, must be a variable using the INT data type. Par-
ticularly care is required when a carry or borrow occurs in an operation for integer type variables. For
example, using integer type variables A=3 and B= 2, if the operation (A/B)*2 is performed, the result of
A/B is 1 (1.5 with the value below the decimal discarded), so (A/B)*2 = 2.
Functions
Function
Numerical Functions
Arithmetic Functions
Data type conversion Functions
142
Stops repeated processing.
Returns to the point in the program
from which a function block was called.
Symbol
Data types supported by operator
Depends on the function (refer to 2-6 Instruction
Support and Operand Restrictions)
REAL, LREAL
BOOL, WORD, DWORD, LWORD
INT, DINT, UINT, UDINT, ULINT, REAL, LREAL
INT, DINT, LINT, UINT, UDINT, ULINT, REAL, LREAL 5
INT, DINT, LINT, UINT, UDINT, ULINT, REAL, LREAL 6
INT, DINT, LINT, UINT, UDINT, ULINT, REAL, LREAL 6
BOOL, INT, DINT, LINT, UINT, UDINT, ULINT,
WORD, DWORD, LWORD, REAL, LREAL
BOOL, INT, DINT, LINT, UINT, UDINT, ULINT,
WORD, DWORD, LWORD, REAL, LREAL
BOOL, INT, DINT, LINT, UINT, UDINT, ULINT,
WORD, DWORD, LWORD, REAL, LREAL
BOOL, WORD, DWORD, LWORD
BOOL, WORD, DWORD, LWORD
BOOL, WORD, DWORD, LWORD
BOOL, WORD, DWORD, LWORD
Absolute values, trigonometric functions, etc.
Exponential (EXPT)
Source data type_TO_New data type (Variable name)
Function
EXIT;
RETURN;
Syntax
Appendix B
Example
Priority
1: Lowest
11: Highest
1
2
3
4
5
7
8
8
9
9
10
11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-programmer 5.0Sysmac ws02-cxpc1-e-v50Cs1-hCj1-hCj1m

Table of Contents