100
+ Peripheral device servicing time
+ Instruction execution time
The overseeing time is fixed at 1.26 ms.
The input/output refresh time would be as follows: 0.29 ms + (0.07 ms x N ).
As the C40K is provided with only one input and one output word and the
C40P Expansion unit contains input and output words the value of the con-
stant N is 5. (i.e., N = 5 – 1 = 4) and so the time required is 0.29 ms + (0.07
ms x 4 ) = 0.57 ms.
The total execution time can be calculated by obtaining the average instruc-
tion execution time and multiplying this by the number of addresses used in
the program. As given above the average instruction execution time is 30 µs.
Total execution time = 1150 addresses x 30 µs = 34.50 ms
The peripheral device servicing time is calculated by adding the other three
time values and multiplying the result by a factor of 0.05. This value is only
required in configurations where a peripheral device is connected to the PC.
The result is calculated as an example. As there are no peripheral devices
used in this example the following results will be ignored in the final calcula-
tion.
Peripheral device servicing = (1.26 ms + 0.57 ms + 34.50 ms) x 0.05 = 1.81
ms which is rounded down to 1.50 ms.
The scan time is the total of all these calculations.
1.26 ms + 0.57 ms + 34.50 ms = 36.33 ms
If a peripheral device had been present it would have been:
1.26 ms + 0.57 ms + 34.50 ms + 1.50 ms = 37.83 ms
Overseeing
Input/output refreshing
Peripheral device servicing
Instruction execution
Total
Fixed
0.29 + 0.07 * (1–1)
((1) + (3) + (4)) * 0.05 = 1.8 > 1
30 * 1150
(1) + (2) + (3) + (4)
1.26
0.57
1.50
34.50
37.83
1.26
0.57
0.00
34.50
36.33
Process Formula Peripheral device
Servicing (ms)
Without
With
6–4 Instruction Execution Times
This following table lists the execution times for all instructions that are avail-
able for the P-types. The maximum and minimum execution times and the
conditions which cause them are given where relevant.
Execution times for most instructions depend on whether they are executed
with an ON execution condition or an OFF execution condition. The OFF
execution time for an instruction can also vary depending on the circum-
stances. Where this is the case, the circumstances that will produce different
execution times are given.
Execution times are expressed in microseconds except where noted.
Instruction Execution Times Section 6–4