Chapter 9 PLC Operation

(3)Continuation of operation after a congestion error

If a congestion error occurs when the special internal output bit R7C1, which specifies whether the operation should continue after a congestion error, is turned on, the execution of the periodical scan is stopped and the periodical scan is executed from the beginning again. If the operation continuation specification for the normal scan is Off when this happens, the scan stops as a congestion error at a normal scan. If the operation continuation specification for the normal scan is On, only the periodical scan continues to be executed in the event of a periodical congestion error. Care must be taken because the normal scan is not executed under this condition.

 

Periodical system processing

 

 

 

 

 

 

10 ms

 

 

 

 

 

 

 

 

R7C0 On/R7C1 On: Continue

 

 

Scan every 10 ms

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Periodical program

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R7C0 Off/R7C1 On: Stop

Periodical

Scan every 20 ms

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Periodical program

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

scan

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Scan every 40 ms

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Periodical program

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Normal

 

END scan processing

 

 

 

 

 

INT0

 

 

INT0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

scan

 

Normal scan program

 

 

 

 

 

 

 

 

 

 

 

Periodical interrupt (10 ms

 

 

Periodical interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

periodical interrupt restarts)

 

 

 

 

 

 

 

 

 

 

 

Congestion check time

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 9.11 Operation when operation continuation at congestion error is set

9.1.3 Interrupt Scan

(1)Definition and operation

If there is an input to an input terminal assigned to an interrupt input, or there is an input to an input terminal assigned to a counter input and the current counter value exceeds the preset value while the CPU is operating, interrupt programs (interrupt scan) corresponding to them are started up. An interrupt scan caused by an interrupt input executes interrupt programs from INT16 to19 to RTI instructions. An interrupt scan due to a corresponding interrupt caused by the counter current value executes the interrupt programs from INT20 to INT27 to RTI instruction.

If an interrupt caused by another factor is input during the execution of an interrupt scan, the next interrupt scan is started up at the point when the interrupt scan being executed is completed. Also, if two or more interrupts are input during the execution of an interrupt scan, the interrupt scans are started up in order from the smallest INT number at the point when the interrupt scan being executed is completed.

Normal scan

Interrupt scan

Periodical system

 

 

 

processing

 

 

 

 

 

 

 

 

 

Interrupt analysis processing

 

 

 

 

 

 

INT16

 

 

 

 

 

 

INT17

 

 

 

 

Interrupt analysis

 

 

 

 

 

processing

 

INT20

 

 

 

 

 

 

Normal scan

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Execution of

 

 

 

 

 

 

 

 

 

 

 

 

 

interrupt program

 

 

 

 

 

 

 

 

10 ms

 

RTI

 

RTI

INT20

INT16

 

INT17

RTI

RTI

INT16

INT20

INT17

RTI RTI

Figure 9.12 Operation of interrupt scan

(2)Causes of congestion errors at interrupt scan

An interrupt scan congestion error occurs during the interrupt scan processing when an interrupt of the same number is entered again.

In addition, a normal scan congestion error occurs if interrupt inputs are frequently entered because a normal scan cannot be executed.

Periodical system processing

Interrupt

Interrupt analysis

processing

scan

Interrupt scan

 

Normal

END scan processing

scan

Program execution

 

10 ms

 

 

 

 

The interrupt contact of INT16 is turned

 

 

 

 

 

 

 

on during the execution of the INT16

 

 

 

 

 

 

 

program.

 

 

 

 

 

 

 

 

 

 

 

Stop

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt contact on (INT16)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Interrupt contact on (INT16)

Figure 9.13 Operation of interrupt scan

9-6

Page 239
Image 239
Hitachi NJI-350B manual Interrupt Scan, Continuation of operation after a congestion error, Stop