Writing pii ladder logic, Pii application examples – Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 264

Advertising
background image

Publication 1785-UM012D-EN-P - July 2005

18-2 Using Processor Input Interrupts

Writing PII Ladder Logic

Follow these rules when you write ladder logic for a PII.

Store the PII program in a ladder file.

Make sure the input condition (to cause the interrupt) doesn’t occur
faster than the execution time of the PII program. If a second identical
input condition occurs before the interrupt program has finished
executing for the first input condition, a PII overlap occurs and the
controller sets a minor fault bit at S:10/12.

The timing for a PII is as follows:

1 ms to switch to the PII task

PII ladder logic execution time

1 ms to return to executing the control program

Since you need to allow at least 1 ms to run your PII logic, define a PII
time of at least 3 ms to help prevent PII overlaps.

The controller’s watchdog timer continues to run while running a PII
program.

A PII can detect an event within 100

µ

s; however, you must allow at

least 3 ms between successive PII events.

PII Application Examples

Two ways that you can use a PII program:

Mode

Description

Counter

Using counter mode, you make use of the controller’s internal counter. You
configure the PII with a preset value so that the hardware counts an input
condition and then runs the PII when the preset equals the accumulated
value. The PII ladder logic only needs to contain the output that you want to
occur.

Bit transition Using bit-transition mode, you configure the PII to occur every time the input

condition is true. For example, you want to count tablets as they leave the
production line at a rate of 100 tablets per second. The machinery packs 100
tablets per package. Assume an optical switch detects each tablet.

Advertising