EasyManua.ls Logo

Mitsubishi Electric R32MTCPU - Chapter 4 Operation Control Programs; Operation Control Programs

Mitsubishi Electric R32MTCPU
354 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4 OPERATION CONTROL PROGRAMS
4.1 Operation Control Programs
117
4
4 OPERATION CONTROL PROGRAMS
4.1 Operation Control Programs
Operation control programs
Substitution operation expressions, motion-dedicated functions and bit device control commands can be set in operation
control program.
Multiple blocks in one operation control program can be set.
There are no restrictions on the number of blocks that may be set in one operation control program. However, one program
is within 128k bytes.
The maximum number of characters in one block is 1020.
Transition conditions cannot be set. Transition conditions can be set only in transition programs.
The bit conditional expression that logical data value (true or false) is returned in an operation control program, a
comparison conditional expression can be set up only as a source (S) of device set (SET=) or device reset (RST=).
An operation control program example is shown below.
Priorities of operators and functions
Operators and functions have the following priorities. Using parentheses allows an operation sequence to be specified freely.
Priority Item (Operator, Function)
High
Low
1 Calculation within parentheses ((...))
2 Standard function (SIN, COS, etc.), Type conversion (USHORT, LONG, etc.)
3 Bit inversion (~), logical negation (!), sign inversion (-)
4 Multiplication (*), division (/), remainder (%)
5 Addition (+), subtraction (-)
6 Bit left shift (<<), bit right shift (>>)
7 Comparison operators: Less than (<), less than or equal to (<=), more than (>), more than or equal to (>=)
8 Comparison operators: Equal to (==), not equal to (!=)
9 Bit logical AND (&)
10 Bit exclusive OR (^)
11 Bit logical OR (|)
12 Logical AND (*)
13 Logical OR (+)
14 Substitution (=)
Comment
#0=D0+(D1+D2)*#5//Substitution expression (four arithmetic operations)
W0:F=SIN(#10F)//Substitution expression (standard function)
CHGV(K2,K10)//Motion-dedicated function
SET M100=M0+X0//Bit device control (SET=)
RST M10=!X0//Bit device control (RST=)
DIN D0,X0//Bit device control (DIN)
1 block
1 program

Table of Contents

Other manuals for Mitsubishi Electric R32MTCPU

Related product manuals