
110
3-8-2
Reading the Scan Time
The following operation can be used to read the present scan time and the
maximum scan time. The Monitor Key can be pressed consecutively to re-
peat the operation. The PC must be in RUN mode.
This operation is supported only by the SP16 and SP20.
Key Sequence
Press CLR to end
the operation
The following displays show the scan time displays.
0Ć000
0 SCAN TIME
0 PRES VAL 0.8ms
MAX VAL 1.0ms
3-9
Program Execution
The timing of various operations must be considered both when writing and
debugging a program. The time required to execute the program and perform
other CPU operations is important, as is the timing of each signal coming into
and leaving the PC in order to achieve the desired control action at the right
time. This section explains the scan and shows how to calculate the scan
time and I/O response times.
3-9-1
Scan
The major factors in determining program timing are the scan time and the
I/O response time. When program execution is started, the CPU scans the
program from top to bottom, checking all conditions and executing all instruc-
tions accordingly as it moves down the bus bar. It is important that instruc-
tions be placed in the proper order so that, for example, the desired data is
moved to a word before that word is used as the operand for an instruction.
Remember that an instruction line is completed to the terminal instruction at
the right before executing an instruction lines branching from the first instruc-
tion line to other terminal instructions at the right.
One cycle of CPU operation is called a scan; the time required for one cycle
is called the scan time. The time required to produce a control output signal
following reception of an input signal is called the I/O response time.
The overall flow of CPU operation is as shown in the following flowchart:
Example
Program Execution
Section 3-9