Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
1 Outline
1.1 Outline of Structured Programs and Programming languages
19
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)
1.1.2 Programming languages
The following programming languages can be used in each program block.
Graphic languages
1. Structured ladder language
This graphic language is created based on the relay circuit design technology.
A circuit always starts from the bus line located on the left side.
The structured ladder language consists of contacts, coils, functions and function blocks. These components
are connected with vertical lines and horizontal lines.
2. FBD [Function Block Diagram language]
FBD is a graphic language easy to understand visually.
You can easily create programs by connecting parts (functions and function blocks) for special processing,
variables and constants along the flow of data and signals to improve the programming efficiency.
Text language
1. ST ("Structured text language")
The ST language can describe control achieved by syntax using selective branches with conditional
statements and repetition by repetitive statements in the same way as high-level languages such as C
language. By using the ST language, you can create simple programs easy to understand.
1
2
X000 X001 Y000
Y000
MOV
EN ENO
sd
D0
D2
When X001 is ON, the contents
of D0 are transferred to D2.
Output Y000
X001
1
EQ
D0
D2
AND INT_TO_WORD_E
EN ENO
_INT
XOR
D30
D20
X000
X001
X002
K4X010
When the contents
of D0 are equivalent
to the contents of
D2, EQ turns ON.
Y000:=(X000 OR Y000) AND NOT X001;
IF X001 THEN
D2:=D0; (* When X001 is ON, the contents of D0 are transferred to D2.*)
END_IF;
IF X002 THEN
D4:=D4+1; (* When X002 is ON, the contents of D4 are added by "1". *)
ELSE
D6:=D6+1; (* When X002 is OFF, the contents of D6 are added by "1". *)
END_IF;