Bradley Smoker PLC-5 Writing PII Ladder Logic, PII Application Examples, Mode Description, Occur

Models: PLC-5

1 388
Download 388 pages 13.97 Kb
Page 264
Image 264

18-2Using 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.

 

 

Publication 1785-UM012D-EN-P - July 2005

Page 264
Image 264
Bradley Smoker PLC-5 Writing PII Ladder Logic, PII Application Examples, Two ways that you can use a PII program, Occur