A
Appendix
A-4 CP1L Programming Examples
128 SYSMAC CP1L/CP1E Introduction Manual
A-4-3 Using Interrupt Inputs to Accelerate Processes
■Functions Used
●Interrupt Inputs
CP1L and CP1E CPU Units normally repeat processes in the following order:
overseeing processes, program execution, I/O refreshing, peripheral servicing. During
the program execution stage, cyclic tasks are executed. The interrupt function, on the
other hand, allows a specified condition to interrupt a cycle and execute the specified
program.
Interrupt inputs (direct mode) execute interrupt tasks when the built-in input of a
CPU unit switches from OFF to ON, or from ON to OFF. Interrupt tasks 140 to 145
(CP1E: 2 to 7) are allocated to the input contacts. The allocation is fixed. Use
interrupt inputs to achieve faster processing that is unaffected by the scan time.
■Operation Overview
Moving product (i.e. IC chips) will be inspected for curvatures and bends.
Use interrupt inputs if the normal cycle time cannot provide fast enough
processing.
Interrupt tasks will be executed when the sensor input (interrupt) changes from
OFF to ON.
Sensor input (interrupt)
(E3X-series used with
E32-series fiber unit)
Sensor input 1
Sensor input 2
Sensor input 3
Product
Sensor input (interrupt input 0)
Contact 0.04
Sensor input 1
Contact 0.00
Sensor input 2
Contact 0.01
Process
interrupt task
PASS output
Contact 100.00
NG output
Contact 100.01
Sensor input 3
Contact 0.02
RESET input
Contact 0.05
NG output sensor input 1
Contact 100.02
NG output sensor input 2
Contact 100.03
NG output sensor input 3
Contact 100.04
Process
interrupt task
Process
interrupt task