2 periodical scan – Hitachi NJI-350B User Manual

Page 238

Advertising
background image

Chapter 9 PLC Operation

9-5

9.1.2

Periodical Scan

(1)

Definition and operation

This scan executes interrupt programs (periodical scan programs) while the CPU is operating with a fixed cycle time (10
ms, 20 ms, or 40 ms) specified by the users.
Enter the periodical scan program to be executed between instructions INT0 and RT1 if it should be started up with a 10
ms cycle time, and between INT1 and RT1 if it should be started up with a 20 ms cycle time.
The periodical system processing is executed every 10 ms regardless of whether or not there is a periodical scan program.

Figure 9.9 Operation of periodical scan (in case of INT1)

(2)

Causes of congestion errors at periodical scan

If there are periodical scans at every 10 ms as well as scans at every 20 ms or 40 ms, a congestion error occurs and the
scan is stopped if the periodical scan at 10 ms is started up again before all the periodical scans are completed (i.e., the
periodical system processing at INT0 to INT2 does not end within 10 ms).

Figure 9.10 Congestion error at periodical scan (10 ms)

Similarly, when executing with a periodical scan at every 20 ms or with a combination of periodical scans at every 20 ms
and 40 ms, a congestion error occurs if the periodical scan at 20 ms is started up again before all the periodical scans are
completed (i.e., the periodical system processing at INT1 to INT2 does not end within 20 ms). Finally, when using a
periodical scan at every 40 ms, a congestion error occurs if the periodical scan at 40 ms is started up again before all the
periodical scans are completed (i.e., the periodical system processing at INT2 does not end within 40 ms).

RTI

INT1

10 ms

20 ms

RTI

INT1

INT1

Normal scan

Scan every 40 ms
Periodical program

Scan every 20 ms
Periodical program

Scan every 10 ms
Periodical program

Periodical system
processing

Periodical scan
Program execution

Periodical scan

Normal scan

Periodical system processing

(including interrupt analysis

processing)

Interrupt

Interrupt

Interrupt

INT0

10 ms

10 ms

INT1

INT0

RTI

10 ms

INT2

INT1

INT0

RTI

RTI

END scan processing
Normal scan program

Stop

Periodical scan

Normal
scan

(Example 3)
Before the periodical scan program
at every 40 ms ends, the periodical
interrupt at 10 ms is started up again.

(Example 2)
Before the periodical scan program at
every 20 ms ends, the periodical
interrupt at 10 ms is started up again.

(Example 1)
Before the periodical scan program at
every 10 ms ends, the periodical
interrupt at 10 ms is started up again.

Scan every 10 ms
Periodical program
Scan every 20 ms
Periodical program
Scan every 40 ms
Periodical program

Periodical system processing

Stop

Stop

Advertising