DL06 Micro PLC User Manual, 3rd Edition, Rev. E
3-22
Chapter 3: CPU Specifications and Operation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Application Program Execution
The CPU processes the program from address 0 to the END instruction. The CPU executes
the program left to right and top to bottom. As each rung is evaluated the appropriate image
register or memory location is updated. The time required to solve the application program
depends on the type and number of instructions used, and the amount of execution overhead.
Just add the execution times for all the instructions in your program to determine to total
execution time. Appendix C provides a complete list of the instruction execution times for the
DL06 Micro PLC. For example, the execution time for running the program shown below is
calculated as follows:
TOTAL TIME = (Program execution time + Overhead) x 1.18
The program above takes only 51.11 µs to execute during each scan. The DL06 spends 0.18ms
on internal timed interrupt management, for every 1ms of instruction time. The total scan
time is calculated by adding the program execution time to the overhead (shown above) and
multiplying the result (ms) by 1.18. Overhead includes all other housekeeping and diagnostic
tasks. The scan time will vary slightly from one scan to the next, because of fluctuation in
overhead tasks.
Program Control Instructions — the DL06 CPUs offer additional instructions that can change
the way the program executes. These instructions include FOR/NEXT loops, Subroutines,
and Interrupt Routines. These instructions can interrupt the normal program flow and affect
the program execution time. Chapter 5 provides detailed information on how these different
types of instructions operate.
X0 X1 Y0
OUT
C0
C100
LD
K10
C101
OUT
V2002
C102
LD
K50
C103
OUT
V2006
X5 X10 Y3
OUT
END
Instruction Time
STR X0 .67 µs
OR C0 .51 µs
ANDN X1 .51 µs
OUT Y0 1.82 µs
STRN C100 .67 µs
LD K10 9.00 µs
STRN C101 .67 µs
OUT V2002 9.3 µs
STRN C102 .67 µs
LD K50 9.00 µs
STRN C103 .67 µs
OUT V2006 1.82 µs
STR X5 .67 µs
ANDN X10 .51 µs
OUT Y3 1.82 µs
END 12.80
µs
SUBTOTAL 51.11 µs
Overhead
DL06
Minimum 746.2 µs