7 Applied Instructions
7.1 Program Flow
141
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
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Program examples
1. Program example with three FOR-NEXT loops
The loop 3) is repeated 4 times.
When the data value (current value) of D0Z
(D4 when Z is "4") is "6", the loop 2) is
repeated 6 times.
When X010 is OFF
When K1X000 is "7", the loop 1) is repeated 7 times.
When X010 is ON
The program execution jumps to the pointer P22, and
the loop 1) is skipped.
Number of times of repeating the loops 1), 2) and 3).
X010=ONX010=OFF
4 times
1)
2)
3)
0 time
24 times
4 times
X010
P 22
1) 2) 3)
6 times
4 times
FOR
EN
n
ENO
NEXT
EN ENO
CJ
EN ENO
p
K4
FOR
EN
n
ENO
D0Z
P22
FOR
EN
n
ENO
K1X000
NEXT
EN ENO
NEXT
EN ENO
7 6 4 = 168 times
6 4 = 24 times
7 times