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

The text of a manual · part 14 of 19

Classic 1785 PLC-5 Programmable Controllers User Manual (1785-LT, -LT2, -LT3, -LT4), pages 131 to 140

Pages 131 to 140 of 186

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 1785-LT2, Allen-Bradley 1785-LT3, Allen-Bradley 1785-LT4 and Allen-Bradley 1785-LT B

Page 131

Chapter 9 Calculating Program Timing

Table 9.P Additional Execution Time Based on Source and Destination Addresses Data Type

Source (integer to floating point)

Destination (floating point to integer)

0-2K

2-4K

4K+

0-2K

2-4K

4K+

Integer

0

1

2

0

1

2

Floating point

0

3

4

0

3

4

Data conversion

8

9

10

33

34

35

When file addresses (# prefix) in the expression or destination address contain indirect addresses for file numbers, add: 45 µs 48 µs 48 µs when the indirect address is integer type when the indirect address is floating point type when the indirect address is timer, counter, or control type

When file addresses in the expression or destination contain indirect addresses for element numbers, add: 45 µs 46 µs 46 µs when the indirect address is integer type when the indirect address is floating point type when the indirect address is timer, counter, or control type

If the file address contains two indirect addresses, add only one value (the largest). For example, for #F[N7:20][N7:30], add 48 µs (indirect floating point file address). Multiply the additional time by the number of elements in the file for any type of file or file address. For one FAL example: Expression:

#N[N7:100]/10 * F8:20 add 10 for converting to floating point add 45 for indirect address

Destination:

#N7:30 add 35 for converting to integer

FAL multiply:

98 + W[42.5 + N + indirect addressing] N = 2(2) +8 (1) + 6(0) + 10 + 35 = 57 W = 16

Execution time in ALL mode:

9-14

98 + 16[42.5 + 57 +45] 2410 µs

Page 132

Chapter 9 Calculating Program Timing

Indirect Bit or Elements Addresses Additional execution times for indirectly addressed bits and elements depends on the number of variable (indirect) addresses in the overall address. Table 9.Q lists the additional times. Table 9.Q Additional Execution Times for Indirectly Addressed Bits and Elements Data Type

Time (µs) for Variable File or Element

Time (µs) for Variable File and Element

Bit in binary file

57

60

Bit in integer file

60

63

Bit in timer, counter, or control file

64

66

Integer (N)

42

42

Timer, counter, or control file

43

44

Floating point (F)

61

64

Converting integer to floating point

71

77

Converting timer, counter, or control to floating point

85

81

9-15

Page 133

Chapter

10

Maximizing System Performance

Chapter Objectives

This chapter explains how to calculate throughput and provides methods for optimizing remote I/O scan time in PLC-5/11, -5/20, -5/30, -5/40, -5/40L, -5/60, -5/60L, and -5/80 processors. If you want to read about:

Go to page:

Components of throughput

10-1

Input and output modules delay

10-1

I/O backplane transfer

10-2

Remote I/O scan time

10-2

Processor time

10-6

Calculating throughput

10-6

For information on the time that it takes the processor to execute a specific instruction, see chapter 9.

System Design Determined

Choosing Hardware

Selecting Interrupt Routines

Placing System Hardware

Transferring Discrete and Block Data

Assigning Addressing Mode, Racks, and Groups

Calculating Program Timing

Choosing Communication

Maximizing System Performance

Planning Your System Programs

Components of Throughput

Throughput is the time that it takes for an output to be energized after its associated input has been energized. You need to consider the following components when evaluating throughput: input and output module delay I/O backplane transfer remote I/O scan time processor time

Input and Output Modules Delay

All input and output modules have a “delay time” - the time that it takes the module to transfer information to/from the I/O backplane through the I/O module to/from the field device. Depending on the type of modules you are using, these delay times vary; but the times must be taken into account when calculating system throughput. Choose modules that perform the function that you need with the lowest possible delay times.

10-1

Page 134

Chapter 10 Maximizing System Performance

I/O Backplane Transfer

The I/O backplane transfer time is the time it takes for the 1771-ASB adapter module to exchange data with the I/O modules in the same chassis, generally 1-2 ms for a full I/O rack. This time is fairly insignificant compared to total system throughput but can be optimized in situations where there are empty slots or modules that only use backplane power in the chassis. For example, if the last four slots of a rack contain a 1785-KA module and power supply (with 2 empty slots), the 1771-ASB can be configured to ignore those last four slots. For more information on configuring your ASB module, refer to the 1771 Remote I/O Adapter Module User Manual, publication 1771-6.5.83.

Remote I/O Scan Time

Rack 1

Remote I/O Buffer

Data Exchange

I/O Image Table

Read Inputs Write Outputs

Data Exchange x y

IOT (x) IIN (y)

Housekeeping

Adapter Adapter

Rack 2

Immediate I/O x y

Adapter

Rack 3

The remote I/O scan time is the time it takes for the scanner to communicate with each device in the remote I/O system.

Processor- Resident Rack

Remote I/O Scan

Logic Scan

Program Scan

Three factors that affect the remote I/O scan time are: communication rate number of chassis block transfers

Communication Rate The baud rate determines the time it takes for the scanner to communicate with each individual entry in its scan list. Table 10.A lists the amount of time required to communicate to a device at each communication rate.

10-2

Page 135

Chapter 10 Maximizing System Performance

Table 10.A Communication Times at Different Communication Rates Communication Rate (kbps)

Time (ms)

57.6

10

115.2

7

230.4

3

Note that these are full rack times. Smaller racks will decrease this time.

If there are four full-rack entries in the scan list, the I/O scan for that channel at 57.6 kbps is 4 x 10 = 40 ms. If you change the baud rate to 230.4 kbps, the I/O scan decreases to 4 x 3 = 12 ms. Important: All devices on the network must support the baud rate you chose and must be within the required cable lengths.

Number of Rack Entries You determine the total remote I/O scan time in the remote I/O system by taking the number of rack entries in the scan list and multiplying by the time per rack at the baud rate that you are using (see Table 10.A). If one channel has twice as many racks as another, for example, the scan time for the first channel is twice as long. To optimize this scan time, divide your I/O racks between multiple channels. Place your most time-critical I/O on one channel, and nontime-critical I/O on the other channel. Since all I/O channels are independent, a long remote I/O scan on one channel will not affect the remote I/O scan on another channel.

Block Transfers A block transfer is an interruption of the normal remote I/O scan in order to transfer a block of data to a specific I/O module. Most of the time that the processor spends in performing the block transfer is for the handshaking that occurs between the processor and the block-transfer module; this handshaking is embedded in the discrete I/O transfer and has no effect on the remote I/O scan. The remote I/O scan is affected when the actual transferring of data is occurring. The amount of time that the block transfer interrupts the remote I/O scan depends on the number of words being transferred and the baud rate: Communication Rate (kbps)

ms/Word

Overhead (ms)

57.6

.28

3

115.2

.14

2.5

230.4

.07

2

10-3

Page 136

Chapter 10 Maximizing System Performance

If the communication rate is 115.2 kbps and you want to block transfer 10 words, for example, the interruption of the remote I/O scan is: (10 x .14) + 2.5 = 1.4 + 2.5 = 3.9 ms For the particular remote I/O scan in which the block transfer takes place, 3.9 ms will be added to the remote I/O scan time.

Calculating Worst-Case Remote I/O Scan Time Since it is impossible to predict which remote I/O scan a block transfer will occur within, you can only calculate the worst-case remote I/O scan time. To calculate the worst case, determine the normal I/O (without block transfers) then add the time of the longest block transfer to each entry in the scan list. (The processor can only perform 1 block transfer per entry in the scan list per I/O scan.) For example, if your system is: Rack 1 PLC

BT BT 10 20 words words

115.2 kbps

Rack 2 No BTs Rack 3

Worst-case I/O scan: (3 x 6)

3 racks at 115.2 kbps normal I/O scan

+ (20 x .14) + 2.5 longest BT in rack 1

+ 0 no BTs in rack 2

+ (30 x .14) + 2.5 longest BT in rack 2

18 + 5.3 + 0 + 6.7 = 30 ms

BT 30 words

Optimizing Remote I/O Scan Time The best way to optimize your scan time is to place your most time-critical I/O on a separate channel from non-critical I/O. If you only have one channel available for I/O, however, you can still optimize the scanning by using the processor’s configurable scan list. In a normal 4-rack system, the scan list would be:

rack 1 rack 2 rack 3 rack 4

If you are using 57.6 kbps, the normal I/O scan is 4 racks x 10ms - 40ms. Each entry is of equal priority, so each rack is scanned every 40 ms.

10-4

Page 137

Chapter 10 Maximizing System Performance

However, if rack 2 has the most time-critical I/O, use the configurable scan rack 1 list to specify: rack 2 rack 3 rack 2 rack 4 rack 2

Using this scan list, rack 2 is scanned every other rack. There are 6 entries, so the normal I/O scan time is 6 x 10 ms = 60 ms. Since rack 2 is scanned every other rack, however, the rack 2 effective scan time is 2 x 10 ms = 20 ms. The remaining racks are scanned every 60ms. Thus, the tradeoff for the more frequent scanning of rack 2 (every 20 ms) means that the other racks are scanned only every 60 ms. You can also optimize block transfers within the channel. You block transfer to only one block transfer module per entry in the scan list per I/O scan. If you have three block-transfer modules in one I/O rack, it takes a minimum of three I/O scans to complete the block transfers to all of the modules: System Optimized for Discrete-Data Transfer

BT BT BT

Maximum scan time

= 3 discrete scans + 1 block transfer = 3D + 1BT

Adapter

PLC

Adapter

With this arrangement, there is only one block transfer to each BT module for every 3 discrete I/O scans.

Minimum time to complete a block transfer to all modules

Adapter

= 3 * (3D + 1BT) = 9D + 3BT

If you place the three block-transfer modules in different racks, however, you can block transfer to all three modules in one I/O scan. To optimize your system layout for block-data transfers, use an arrangement similar to the following: System Optimized for Block-Data Transfer

Adapter Adapter

PLC

Adapter

With this arrangement, there is a block transfer to each BT module every discrete I/O scan. BT

Maximum scan time

= 3 discrete scans + 3 block transfers = 3D + 3BT

BT

Minimum time to complete a block transfer to all modules BT

= 1 * (3D + 3BT) = 3D + 3BT

10-5

Page 138

Chapter 10 Maximizing System Performance

Processor Time

The processor time is the time needed to process the inputs and set the corresponding outputs. This processor time varies for different processors and is based on input buffering, program scan, etc. In a PLC-5 system, both inputs and outputs are buffered between the I/O image table and the I/O scanner. The movement of inputs from the scanner to the input buffer is asynchronous to the movement of data from the input buffer to the input image table. The worst-case processor time is: Periodic input buffer update

= 10 ms

One program scan to guarantee inputs received

= xx ms

One program scan to guarantee outputs received

= xx ms

.18 ms times the number of racks

= xx ms

For a 3-rack system with a 20 ms program scan, the worst-case processor time is: 10 + 20 + 20 + .54 = 50.54 ms.

Calculating Throughput Input Card Delay

+

To calculate throughput, use the following equation:

I/O Backplane

+

Worst-Case Remote I/O Scan Time

+

Worst-Case + Processor Time

Worst-Case Remote I/O Scan Time

+

An example of a worst-case update time calculation: Input card delay

= 20 ms (typical)

I/O backplane

= 1 ms

Worst-case remote I/O scan time

= 30 ms

Worst-case processor time

= 50.54 ms

Worst-case remote I/O scan time

= 30 ms

I/O backplane

= 1 ms

Output card delay

= 8.8 ms (typical) Total

10-6

141.34 ms

I/O Backplane

Output + Card Delay

Page 139

Appendix

A

Selecting Switch Settings

Chassis Backplane with Classic PLC-5 Processor

Make the following switch selections for Classic PLC-5 processors. Switch

Last State

1

Always Off

ON

Outputs of this I/O chassis remain in their last state when a hardware failure occurs. 1

OFF

Outputs of this I/O chassis are turned off when a hardware failure occurs. 1

Switches

Addressing

4

5

OFF

OFF

2 -slot

OFF

ON

1 -slot

ON

OFF

1/2 - slot

ON

ON

Not allowed

Switches 6 OFF

7 OFF

ON

ON

ON

OFF

EEPROM Transfer EEPROM memory transfer to processor memory at powerup. 2 EEPROM memory transfers to processor memory if processor memory not valid. EEPROM memory does not transfer to processor memory. 3

Switch 8

RAM Memory Protection

OFF

RAM memory protection disabled.

ON

RAM memory protection enabled. 4

Pressed in at top ON (closed) Pressed in at bottom OFF (open)

1. Regardless of this switch setting, outputs are reset when either of the following occurs: • processor detects a runtime error • an I/O chassis backplane fault occurs • you select program or test mode • you set a status file bit to reset a local rack 2. If an EEPROM module is not installed and processor memory is valid, the processor's PROC LED indicator blinks, and the processor sets S:11/9, bit 9 in the major fault status word. 3. A processor fault occurs if processor memory (solid red PROC LED) is not valid.

19309

4. You cannot clear processor memory when this switch is on

A-1

Page 140

Appendix A Selecting Switch Settings

Chassis Backplane with Adapter Module

Make the following switch selections for a 1771-AS, -ASB, or -ALX adapter module. Switch

Last State

1

Always Off

Always Off

ON

Outputs of this I/O chassis remain in their last state when a communication fault is detected by this I/O adapter. 1

OFF

Outputs of this I/O chassis are turned off when a comunication fault is detected by this I/O adapter.

Switch

Processor Restart Lockout

2 ON

Processor can restart the I/O chassis after a communication fault. 2

OFF

You must manually restart the I/O chassis with a switch wired to the 1771-AS or -ASB.

Switches

Addressing

5

6

OFF

OFF

2-slot

ON

OFF

1-slot 3

OFF

ON

1/2-slot 3

ON

ON

Not allowed

Pressed in at top Closed (ON) Pressed in at bottom Open (OFF)

1. ATTENTION: If you set this switch to the ON position, when a communication fault is detected, outputs connected to this chassis remain in their last state to allow machine motion to continue. We recommed that you set switch 1 to the OFF position to de-energize outputs wired to this chassis when a fault is detected. Also, if outputs are controlled by inputs in a different rack and a remote I/O rack fault occurs (in the inputs rack), the inputs are left in their last non-faulted state. The outputs may not be properly controlled and potential personnel and machine damage may result. If you want your inputs to be anything other than their last non-faulted state, then you need to program a fault routine. 2. Set this switch to ON if you plan to use I/O rack auto-configuration. 3. The 1771-ASB series A adapter does not support 1/2-slot addressing.

A-2

19308