5 Basic Instruction
5.7 MPS, MRD, MPP
75
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied Instructions
(Program Flow)
8
Applied Instructions
(Move and
Compare)
9
Applied Instructions
(Arithmetic and
Logical Operation)
10
Applied Instructions
(Rotation and
Shift Operation)
Program example
1. Program example 1 (One stack)
Only one stack is used in this example.
2. Program example 2 (One stack with AND (...) and OR (...) instructions)
X000 X001 X002
X003 X004
X005
X006 X007
X010
X011
X012
Y000:= MPS(X000 AND X001) AND X002;
Y001:= MPP(TRUE);
Y002:= MPS(X003) AND X004;
Y003:= MPP(TRUE) AND X005;
Y004:= MPS(X006) AND X007;
Y005:= MRD(TRUE) AND X010;
Y006:= MRD(TRUE) AND X011;
Y007:= MPP(TRUE) AND X012;
[Structured ladder/FBD] [ ST ]
Y000
Y001
Y002
Y003
Y004
Y005
Y006
Y007
MPS
EN ENO
MRD
EN ENO
MPP
EN ENO
MPS
EN ENO
MPP
EN ENO
MPS
EN ENO
MRD
EN ENO
MPP
EN ENO
Y000:= MPS(X000) AND (X001 OR X002);
Y001:= MRD(TRUE) AND ((X003 AND X004) OR (X005 AND X006));
Y002:= MPP(TRUE) AND X007;
Y003:= Y002 AND (X010 OR X011);
[Structured ladder/FBD] [ ST ]
X000 X001
X002
X003 X004
X005 X006
X007
MRD
EN ENO
MPP
EN ENO
Y000
Y001
Y002
MPS
EN ENO
Y003
X010
X011