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

The text of a manual · part 28 of 59

Mini-PLC-2/02, -2/16, -2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: 16 - EAF Process Control Instructions, pages 222 to 231

Pages 222 to 231 of 490, from Mini-PLC-2/02, -2/16, -2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual

The original document is the PDF (2.5 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-LX / LXP

Page 222

Chapter 16 EAF Process Control Instructions

Table 16.E Words 10 through 24 Independent Gain Equation Range

Range Units Range Unites

Range Units

Range Units

Range

Range

Range Units

Dependent Gain Equation Word 10

0000-9999

Zero Crossing Dead Band

Word 11 0000-100% Percent 0000-100%

Set Output Value Word 12 Maximum Control Output

Percent Word 13 0000-100%

Minimum Control Output

Percent Word 14 0000-99.99

Loop Update Time sec Word 15 0000-9999

Process Variable - PV Word 16

0000-9999

Error 2 Word 17

0000-100%

Control Output 2

Percent

Range Units

Range Units Range Units

Range Units

Range Units

Range

Range

Range Units

0000-9999 0000-9999

0000-100% Percent 0000-100% Percent

0000-100% Percent

00.00-99.99 sec

0000-9999

0000-9999

0000-100% Percent

Words 18 through 24 Reserved 3 1 2 3

Do not change while processor is operating. Do not change. These values are set by the PID function. Do not change Reserved bits.

16-11

Page 223

Chapter 16 EAF Process Control Instructions

Entry and Display of a PID Control Instruction The following example programs show how to use the PID EAF. Figure 16.3 and the associated rung description give a detailed explanation of the basic sections of a PID program. We recommend that you study this example thoroughly before proceeding to the other example programs. The three programs that follow were programmed specifically for 1771-IF and 1771-OF modules. Figure 16.3 shows how you can enter a ladder diagram in the main program and execute a PID function. Figure 16.3 PID Ladder Diagram for Loops with a Minimum Update Time of 200ms RUNG 1

045

0045 TON .01 PR 009 AC 001

15 045

RUNG 2 BLOCK XFER READ

15

111 07

DATA ADDR: MODULE ADDR: BLOCK LENGTH: FILE:

0375 0376 G G 480 750

0030 110 02 0375-0376

111 DN 07

RUNG 3 EXECUTE AUX FUNCTION FUNCTION NUMBER: DATA ADDR: RESULT ADDR:

27 0300 0350

RUNG 4 FILE TO FILE MOVE COUNTER ADDR: POSITION: FILE LENGTH: FILE A: FILE R: RATE PER SCAN

0045 001 009 0300-0310 0311-0321 009

RUNG 5 BLOCK XFER READ DATA ADDR: MODULE ADDR: BLOCK LENGTH: FILE:

16-12

011 EN 07

0031 120 01 0350-0350

0045 EN 17

0045 DN 15 012 EN 06 112 DN 06

Page 224

Chapter 16 EAF Process Control Instructions

Rung 1

This is a timing rung that toggles the block transfer. The timing value (preset x time base) must equal the loop update time of the PID instruction.

Rung 2

The Block Transfer Read instruction rung inputs the process variable (PV), tieback (TB) and feedforward/bias, if used.

Rung 3

The PID rung uses the block transfer done bit for conditioning and two GETs representing the tieback input and the process variable. The block transfer done bit gives the needed false-to-true transition to cause the PID instruction to calculate a new control output. Block transfer and PID calculation are then synchronized and each calculation is at the specified loop update time based on new data. Once you select an address for the Data Addr, the EAF automatically reserves the next 23 higher addresses for a total of 24 addresses (30 octal).

Important: The two Gets shown in the PID rung (Rung 3) are mandatory and must not be separated from the EAF by any other instruction. The first Get contains data to be used as the tieback (TB) input. The second Get contains the process variable (PV) input to the PID calculation. The addresses of the two Gets do not have to be consecutive. You must enter both Gets, even if TB is never used. The EAF block contains the function number, a Data address, and a Result address. The function number for the PID instruction is 27. The Data address points to the PID control block. The control block contains a list of parameters needed to solve the PID equation and select the PID control options. The Result address points to the location of the control output (CO) or output of the PID EAF. Rung 4

This rung is a FIle-to-File Move used to display or input equation parameters and set sign and status bits. The rung is conditioned with a Branch End to ensure that the rung is never executed.

Rung 5

The Block Transfer Write is used to relay the control output to the final actuator. The File Address must be the same as the Result Address in the EAF Block of the PID rung.

16-13

Page 225

Chapter 16 EAF Process Control Instructions

Entry and Display of a Selectable Timed Interrupt (STI) Controlled PID Function

Figure 16.4 shows you how to enter and display an STI to execute a controlled PID function. The program that follows is programmed specifically for 1771-IE, -IF, -OF, -IX and -IY modules. For the 1771-IFE, -IL and -IR modules, add the module initialization rungs in the main program (see Figure 16.5). The processor executes 16 PID loops with an update time of 100 ms. Eight loops are executed each alternate scan (50 ms STI): the first 8 on scan 1, the second 8 on scan 2, the first 8 on scan 3, the second 8 on scan 4. Since the PID instruction needs a leading edge transition to execute (false-to-true), you must use the alternate scan method even if you use less than 8 loops. The Immediate Output Update (IOT) instructions are required. Place them after each block transfer instruction. The IOT instructions cause the block transfer to be requested and completed immediately, instead of at the next program scan. The address of the IOT is the same as the address of the block transfer enable bit. Observe there is no data buffering on the Block Transfer Read (BTR) instruction. The BTR done bit cannot be made to report predictably in the STI. Therefore, it can’t be used to buffer data. If you want to program less than 16 loops, eliminate a PID EAF rung. However, once you have eliminated four EAF rungs, you must eliminate the associated Block Transfer Write (BTW) and IOT instructions. Place an unconditionally false File-to-File instruction in the main program to display the configuration of the PID loops.

16-14

Page 226

Chapter 16 EAF Process Control Instructions

Figure 16.4 Selectable Timed Interrupt Example (the first 4 PID instructions) 0051 077 G 050 00

RUNG 1

077

052

RUNG 2

00

00

077

077 00 BLOCK XFER READ 0030 DATA ADDR: 100 MODULE ADDR: 20 BLOCK LENGTH: 0200-0223 FILE:

RUNG 3

RUNG 4

077 0050 0205 G G 000 000 00

RUNG 5

077 0050 0206 G G 000 000 00

RUNG 6

077 0050 0207 G G 000 000 00

RUNG 7

077

RUNG 8

00

077 00

RUNG 9

110 DN 07 010 IOT

00 077 0050 0204 G G 000 000 00

010 EN 07

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 0400 DATA ADDR: 0230 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 0500 DATA ADDR: 0231 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 0600 DATA ADDR: 0232 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 0700 DATA ADDR: 0233 RESULT ADDR:

BLOCK XFER WRITE 0030 DATA ADDR: 101 MODULE ADDR: 05 BLOCK LENGTH: 0230-0234 FILE:

010 EN 16 110 DN 16

010 IOT

16-15

Page 227

Chapter 16 EAF Process Control Instructions

Figure 16.4 (continued) Selectable Timed Interrupt Example (the second 4 PID instructions) 077 0050 0210 G G 000 000 00

RUNG 10

077 0050 0211 G G 000 000 00

RUNG 11

077 0050 0212 G G 000 000 00

RUNG 12

077 0050 0213 G G 000 000 00

RUNG 13

077

RUNG 14

00

RUNG 15

16-16

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1000 DATA ADDR: 0240 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1100 DATA ADDR: 0241 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1200 DATA ADDR: 0242 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1300 DATA ADDR: 0243 RESULT ADDR:

BLOCK XFER WRITE 0032 DATA ADDR: 111 MODULE ADDR: 05 BLOCK LENGTH: 0240-0244 FILE:

011 EN 16 111 DN 16 010 IOT

Page 228

Chapter 16 EAF Process Control Instructions

Figure 16.4 (continued) Selectable Timed Interrupt Example (the third 4 PID instructions)

077 0050 0214 G G 00 000 000

RUNG 16

077 0050 0215 G G 00 000 000

RUNG 17

077 0050 0216 G G 00 000 000

RUNG 18

077 0050 0217 G G 00 000 000

RUNG 19

077

RUNG 20

00

RUNG 21

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1400 DATA ADDR: 0250 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1500 DATA ADDR: 0251 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1600 DATA ADDR: 0252 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 1700 DATA ADDR: 0253 RESULT ADDR:

BLOCK XFER WRITE 0034 DATA ADDR: 121 MODULE ADDR: 05 BLOCK LENGTH: 0250-0254 FILE:

012 EN 16 112 DN 16 012 IOT

16-17

Page 229

Chapter 16 EAF Process Control Instructions

Figure 16.4 (continued) Selectable Timed Interrupt Example (the fourth 4 PID instructions) 077 0050 0220 G G 00 000 000

RUNG 22

077 0050 0221 G G 00 000 000

RUNG 23

077 0050 0222 G G 00 000 000

RUNG 24

077 0050 0223 G G 00 000 000

RUNG 25

077

RUNG 26

00

077 00

16-18

RUNG 27

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 2000 DATA ADDR: 0260 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 2100 DATA ADDR: 0261 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 2200 DATA ADDR: 0262 RESULT ADDR:

EXECUTE AUX FUNCTION FUNCTION NUMBER: 27 2300 DATA ADDR: 0263 RESULT ADDR:

BLOCK XFER WRITE 0035 DATA ADDR: 130 MODULE ADDR: 05 BLOCK LENGTH: 0260-0264 FILE:

013 EN 06 113 DN 06 013 IOT

Page 230

Chapter 16 EAF Process Control Instructions

If you are using an 1771-IFE, -IL, -IR or -IXE module, place all module configuration rungs except rung 2 in the main program. Place rung 2 in the subroutine. Figure 16.5 shows what the modified STI block transfer looks like. Please consult the module’s user manual for specific Block Transfer programming requirements. Figure 16.5 Initialization Rung

Power Up

Storage Bit B

Rung 1

Storage Bit A

Alternate Scan Bit 077

Block Transfer Read BLOCK XFER READ DATA ADDR: 0030 MODULE ADDR: 100 BLOCK LENGTH: 20 0223 FILE:

EN

Program a Get instruction as the first instruction of the first rung to indicate that this is a selectable timed interrupt. The time base is specified by the value in the Get instruction, in this case, 50 ms. Bit 077/00 enables the “alternate Scan” PID routines every other scan. It goes on for one scan and off for the next scan

Rung 2

The BTR instruction executes every other scan.

Rung 3

The Immediate Output Update forces completion of the BTR instruction.

Rungs 4–7

The first four PID instructions grouped with the first output module.

Rung 8

The BTW for the first 4 PID instructions. The PIDs and the BTW execute on the same scan.

Rung 9

IOT to force completion of the block transfer.

Rungs 10 – 15

The second four PID instructions grouped with the second output module block transfer write and the IOT instructions. The PIDs and the BTW execute on the same scan.

16-19

Page 231

Chapter 16 EAF Process Control Instructions

Software Manual Control Station

Rungs 16 – 21

An additional group of PID instructions would cause the STI to exceed its allowed limit (33 ms for a 50 ms interrupt). This is the first four of a second group of eight PID instructions. They execute on the opposite scan from the first group of eight PID instructions so that the timing limit is not exceeded.

Rungs 22 – 27

The second four PID instructions of the second group of PID instructions. They execute on the opposite scan from the first group of eight PID instructions.

Figure 16.6 shows how you can simulate a manual control station. Locate these rungs in the main program. This program will be used when the functionality of a hardware manual control station is desired but manual control separate from the controlling processor is not needed. It uses set output mode to write the manual override output value to the control device. Figure 16.6 This Is a Simulated Manual Station 110 00 110 01 320

110 0115 G 04 02 000 320 0340 G 04 075 045 15 045 15

111 0251 0200 G G 07 000 550

BLOCK XFER READ DATA ADDR: 0030 MODULE ADDR: 110 BLOCK LENGTH: 01 0200-0200 FILE: EXECUTE AUX FUNCTION FUNCTION NUMBER:27 DATA ADDR: 0200 RESULT ADDR: 0231 BLOCK XFER WRITE DATA ADDR: 0031 MODULE ADDR: 121 BLOCK LENGTH: 01 0231-0231 FILE:

16-20

320 L OFF 04 320 U OFF 04 0332 PUT 000 0332 PUT 000 0045 TON .01 PR 110 AC 000 011 EN 07 111 DN 07

012 EN 16 112 DN 16