Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual ยท part 7 of 29

1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 61 to 70

Pages 61 to 70 of 289

The original document is the PDF (1.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1772-LSP

Page 61

Chapter 6 Relay-type Instructions

Creating nested branches is not possible because the branch end instruction completes a branch group. But the above rung shows a single branch group with two branch end instruction. Above, the examine on instruction with the address 11012 is actually a branch group within a branch group. The following rung achieves the same result and avoids nested branching: 110

110

110

010

00 110

10 110

11

00

12

11

110 13

Chapter Summary

We showed you how enter and edit bit examining, bit controlling, and branching instructions. The next chapter shows you how to use program control instructions to update I/O ahead of their usual scan time.

6-9

Page 62

Chapter

7

Program Control Instructions

Chapter Objectives

This chapter describes these program control instructions: output override immediate I/O update

Introduction

Some applications need programming techniques designed to override a group of non-retentive outputs or update I/O ahead of the usual I/O scan time. The program control instructions satisfy this need. The output override, or zone type instructions, operate similarly to a hardwired master control relay in that they affect a group of outputs in the user program. But these instructions are not a substitute for a hardwired master control relay, which provides emergency I/O power shutdown. The following table illustrates specific instructions for these categories:

Output Override Instructions

Output Override

Immediate Update I/O

Master Control Reset

Immediate Input Update

Zone Control Last State

Immediate Output Update

Master Control Reset and Zone Control Last State Purpose: A Master Control Reset (MCR) establishes a zone in the user program in which all non-retentive outputs are turned off simultaneously. Important: Retentive instructions (-(U)-, -(L)-, -(RTO)-) should not be placed within an MCR zone, because the MCR zone maintains retentive instructions in the last active state when the start fence goes false. A Zone Control Last State (ZCL) instruction allows control of one or a group of outputs in more than one manner in the same program. It establishes a zone in the user program which controls the same outputs, through separate rungs, at different times.

7-1

Page 63

Chapter 7 Program Control Instructions

To override a group of output devices, you must use two MCR (Figure 7.1) or ZCL (Figure 7.2) instructions: one each to begin the zone and one each to end the zone. The start fence is always programmed with a set of input conditions. The end fence must be programmed unconditionally. Figure 7.1 Master Control Reset 010

011

012

00 010

00

00

MCR 010

00 015 017

00 011

00 016

00

00

00 020 021

012

00 00 022 023

00 013

00 00 024 025

00

00 00 026

014

00

00 MCR

Figure 7.2 Zone Control Reset 010

011

012

00 010

00

00

010

00 015 017

00 011

00 016

00

00

00 020 021

012

00 00 022 023

00 013

00 00 024 025

00

00 00 026 00

7-2

ZCL

014 00 ZCL

Page 64

Chapter 7 Program Control Instructions

If the start fence becomes: True - Each rung condition controls their output instruction. False - All output instructions within the zone are left in their last state. The same outputs may now be controlled by another zone program. Only one zone may control a set outputs at one time. Keystrokes: You enter an MCR or ZCL instruction by performing the following steps. 1.

Press either -(MCR)- or -(ZCL)-.

Editing in a Completed Rung You edit these instructions by performing the following steps:

Immediate I/O Update Instructions

1.

Position the cursor over the MCR or ZCL instruction you want to change.

2.

Press either -(MCR)- or -(ZCL)- or any other appropriate instruction type key.

3.

Enter any parameters that may be required by a new instruction.

Immediate I/O update instructions interrupt the program scan to update I/O data before the normal I/O update sequence. Use these instructions where I/O modules interface with I/O devices that operate in a shorter time period than the processor scan.

Immediate Input/Immediate Output Update Purpose: An Immediate Input Update instruction interrupts the program scan to update input image table with data from the corresponding module group. The image table is updated before the normal I/O scan and executed each program scan (Figure 7.3). This instruction is always considered logic true and execution takes place whether or not other rung conditions allow logic continuity.

7-3

Page 65

Chapter 7 Program Control Instructions

Figure 7.3 Immediate Input Instruction I/O Scan

Program Scan

Immediate Input Instruction Interrupts Program Scan

2 Examine Bits in Word 112 Here in Program

Returns to Program Scan

Word 112 16 Bits from One Module Group Written into Input Image Table Word

Module Group (Input) 10151-I

An Immediate Output Update instruction interrupts the program scan to update the module group with data from corresponding output image table word address (Figure 7.4). The image table is updated before the normal I/O scan and executed each program scan when the rung is true. It can be programmed unconditionally. This instruction immediately transfers output data from the selected 16-bit word in the output image table without waiting for the normal I/O scan.

7-4

Page 66

Chapter 7 Program Control Instructions

Figure 7.4 Immediate Output Instruction I/O Scan

Program Scan

Control Bits of Word 014 Here in Program

Immediate Output Instruction Interrupts Program Scan

Returns to Program Scan Word 0 4

Writes All 16 Bits from One Output Image Table Word to One Module Group

Module Group (Output) 10152-I

Important: These instructions significantly impact program scan time. Use them only when absolutely necessary. Keystrokes: You enter an Immediate Input or Immediate Output Update instruction by performing the following steps. 1.

Press either -[I]- or -[IOT]-.

2.

Enter <address>.

7-5

Page 67

Chapter 7 Program Control Instructions

Removing an Immediate Output Update Instruction The only way to remove an Immediate Output Update instruction is to remove the entire rung. See chapter 11. Removing an Immediate Input Update Instruction You remove an Immediate Input Update instruction by performing the following steps. 1.

Position the cursor over the Immediate Input Update instruction you want to remove.

2.

Press [REMOVE]-[I]-.

Editing a Partially Completed Rung or a Completed Rung You edit an Immediate Input or Immediate Output Update instruction by performing the following steps. If you are editing a completed rung, proceed to step 1. If you are editing a partially completed rung, enter the next instruction and proceed to step 1.

Chapter Summary

7-6

1.

Position the cursor over the Immediate Input or Immediate Output Update instruction you want to change.

2.

Press -(I)-, -[IOT]-, or any other appropriate instruction type key.

3.

Enter <address>.

We have shown you how to override a group of non-retentive outputs to update I/O ahead of their usual scan time. The next chapter shows you how to keep track of timed intervals or counted events according to the logic of your ladder diagram.

Page 68

Chapter

8

Timers and Counters

Chapter Objectives

This chapter describes two instructions that keep track of timed intervals or counted events: timers counters

Introduction

Timer and counter instructions are output instructions internal to the processor. They provide many of the capabilities available with timing relays and solid state timing/counting devices. Usually conditioned by examine instructions, timers and counters keep track of timed intervals or counted events according to the logic continuity of the rung. You can program up to 488 internal timers. The last valid timer address is 1677. Each timer or counter instruction has two 3-digit values. Each value requires one word of data table memory. These 3-digit values are:

Accumulated Value (AC) Storage: Begins at word address 030. Function:

Timers - number of elapsed timed intervals Counters - number of counted events Both - upper 4 bits of accumulated word (14-17) are the status bits.

Preset Value (PR) Storage: Always at address 100 words greater than its corresponding AC value. Function: Denotes the number of timed intervals or events to be counted. When the accumulated value equals the preset value, AC = PR, a status bit is set and can be examined to turn an output device on or off.

Timer Instructions

A timer counts the elapsed time-base intervals and stores this count in the accumulated value word. All timers must be placed within the first eight data table blocks. Timer instructions have three time bases: 1.0 second, 0.1 second, or 0.01 second. 8-1

Page 69

Chapter 8 Timers and Counters

Two bits in the accumulated value word are status bits: Bit 15 is the timed bit. It is either set or reset when the timer has timed out. The setting or resetting depends on the type of timer instruction used. Bit 17 is the enable bit. It is set when rung conditions are true and is reset when rung conditions are false. There are four types of timer instructions available with the controller: timer on-delay timer off-delay retentive timer on-delay retentive timer reset We will look at these timers in detail.

Timer On/Timer Off Delay Purpose: The Timer On and Timer Off Delay instructions can be used to turn a device on or off once an interval is timed out. Timer On Delay The Timer On Delay instruction is programmed as an output instruction. 010 00

When the timer on delay rung condition becomes: True Timer cycle begins. Timer increments its AC value. Bit 15 is set when AC=PR and the timer stops timing. Bit 17 is set. False Accumulated value resets to 000. Bits 15 and 17 are reset.

8-2

030 TON 1.0 PR 150 AC 000

Page 70

Chapter 8 Timers and Counters

Timer Off Delay The Timer Off Delay instruction is programmed as an output instruction. 010 00

030 TOF 1.0 PR 150 AC 000

When the timer off delay rung condition becomes: True Bit 15 is set. Bit 17 is set. Accumulated value resets to 000. False Timer cycle begins. Timer increments its AC value. Bit 15 resets when the AC=PR and the timer stops timing. Bit 17 is reset. Keystrokes: You enter a Timer On or a Timer Off Delay instruction by performing the following steps. 1.

Press either -(TON)- or -(TOF)-.

2.

Enter <address>.

3.

Enter <time base>.

4.

Enter <preset value>.

Editing in a Completed Rung You edit the Timer On or Timer Off Delay instruction by performing the following steps. 1.

Position the cursor over the Timer On or Timer Off Delay instruction you want to change.

2.

Press -(TON)-, -(TOF)-, or any other appropriate instruction type.

3.

Enter <address>.

4.

Enter <time base>.

5.

Enter <preset value>.

8-3