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

The text of a manual · part 13 of 19

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

Pages 121 to 130 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 121

Chapter 9 Calculating Program Timing

I/O placed in the same chassis as the processor is called “processorresident” local I/O. These inputs and outputs are not updated during the remote I/O scan - they are updated during the housekeeping portion of the program scan. During housekeeping, the processor reads and writes the I/O across the chassis backplane. Thus, the update of processor-resident local I/O is synchronous to the program scan. Figure 9.1 shows timing loops for discrete data transfer in a PLC-5 processor.

Immediate I/O x y

Remote I/O Buffer

Data Exchange

I/O Image Table

Read Inputs Write Outputs

Rack 1

Adapter

Data Exchange x y

Remote I/O Scan Timing Loop

Processor- Resident Rack

IOT (x) IIN (y)

Housekeeping

Rack 2

Adapter

Rack 3

Adapter

Figure 9.1 Remote I/O Scan and Program Scan Timing Loops

Logic Scan

Program Scan Timing Loop

During the housekeeping portion of the program scan, both the remote I/O buffer and the processor-resident rack are updated. Remember that the I/O scanner is constantly updating the remote I/O buffer asynchronously to the program scan.

9-4

Page 122

Chapter 9 Calculating Program Timing

I/O Scanning Discrete and Block Transfer

A Classic PLC-5 processor can transfer discrete data and block data to/from processor-resident local I/O, extended-local I/O chassis, and remote I/O chassis.

Transferring Discrete Data The remote I/O system is scanned in a separate and asynchronous scan to the program scan. The remote I/O scan takes output data from the remote I/O buffer to output modules and puts input data into the remote I/O buffer from input modules. The remote I/O scan time can take 3, 6, or 10 ms per one rack in a chassis on the remote I/O link, depending on baud rate. The PLC-5 processor then exchanges the input and output image table data with the remote I/O buffer during the I/O-update portion of housekeeping.

Immediate I/O The processor responds to immediate input (IIN) and immediate output (IOT) requests during the logic scan. The logic scan is suspended at the request for immediate input/output data. The logic scan resumes after obtaining the data and fulfilling the request. IIN and IOT data transfers directly to and from I/O modules in processorresident I/O and extended-local I/O chassis. With remote I/O, only the remote I/O buffer is updated.

Transferring Block Data The exchange of block-transfer data and the logic scan run independently and concurrently. The following paragraphs explain block transfer for extended-local I/O and then for processor-resident I/O and remote I/O.

9-5

Page 123

Chapter 9 Calculating Program Timing

Remote I/O and Processor-Resident I/O The processor performs block transfers asynchronously to the program scan. The processor also interrupts the program scan asynchronously to momentarily access BTW and BTR data files. The processor performs one remote block transfer per addressed rack and per remote I/O scan. Figure 9.2 shows timing loops for block transfer from a Classic PLC-5 processor. Figure 9.2 Transferring Block Data to Local and Remote I/O

Remote I/O Scan ·

One transfer per I/O scan

Rack 7

A

Adapter

Remote I/O

Q = Queue A = Active Buffer BT Requests Q BTR or BTW Data ¶

BT Requests Q

One transfer per I/O scan

BTR or BTW Data

A

Rack 6

Adapter

BT Requests Q

One transfer per I/O scan

BTR or BTW Data ¶

A

BTRequests

Adapter

Rack 5

One transfer per I/O scan

Q

BTR or BTW Data

A

Logic Scan

Processor Resident Rack 0 ¶

Interrupt from Fault Routine. The adapter used in the remote I/O scan is the · 1771-ASB adapter.

9-6

Q Multiple Block Transfers per I/O Scan

A

I/O Scan

BT Requests BTR or BTW Data ¶

Program Scan

Page 124

Chapter 9 Calculating Program Timing

Instruction Timing and Memory Requirements

The time it takes for a processor to scan an instruction depends on the type of instruction, the type of addressing, the type of data, whether the instruction has to convert data, and whether the instruction is true or false. This section provides timing and memory requirements estimates with these assumptions: direct addressing integer data, except where noted no data-type conversions addresses within the first 4096 words of the data table of a PLC-5/10, -5/12, -5/15, or -5/25 processor execution times shown in µs Memory requirements refer to the number of words the instruction uses. In some cases, an instruction may have a range of memory requirements. The range of words exists because the instruction can use different types of data. Important: The tables are divided into instruction times and memory requirements that are specific to PLC-5/10, -5/12, -5/15, and -5/25 processors.

9-7

Page 125

Chapter 9 Calculating Program Timing

Bit and Word Instructions for PLC-5/10, -5/12, -5/15, and -5/25 Processors Table 9.N shows timing and memory requirements for bit and word instructions for PLC-5/10, -5/12, -5/15, and -5/25 processors. Table 9.N Timing and Memory Requirements for Bit and Word Instructions for PLC-5/10, -5/12, -5/15, and -5/25 Processors Category

Relay

Code

Title

Execution Time (µs) Integer

Execution Time (µs) Floating Point

True

False

True

1.3

0.8

Words of Memory2

False 11

XIC examine if closed

XIO examine if open

OTL output latch

OTU output unlatch

OTE output energize

1.6

1.6 branch end

0.8

0.8

1

(0.01 base)

39

27

2-3

(1.0 base)

44

28

(0.01 base)

30

43

(1.0 base)

30

51

RTO retentive timer on (0.01 base) (1.0 base)

39 44

24 24

CTU count up

32

34

CTD count down

34

RES reset

30

Branch

1.6 next branch branch start Timer and Counter

TON TOF timer on timer off

14

1 For every bit address above the first 256 words of memory in the data table, add 0.8 µs to the execution time and 1 wordd of memory to the requirements. 2 Use the smaller number if all addresses are below word 4096; use the larger number if all addresses are above 4096.

9-8

Page 126

Chapter 9 Calculating Program Timing

Category

Arithmetic

Logic

Move

Comparison

Code

Title

Execution Time (µs) Integer

Execution Time (µs) Floating Point

True

False

True

False

36

14

92

14

4-7

14

3-5

14

2-3

Words of Memory2

ADD add

SUB subtract

MUL multiply

41

14

98

DIV divide

49

14

172

SQR square root

82

14

212

NEG negate

28

14

36

CLE clear

18

14

23

TOD convert to BCD

52

14

3-5

FRD convert from BCD

44

AND and

36

14

4-7

OR or

XOR exclusive or

NOT not

27

14

3-5

MOV move

26

14

MVM masked move

55

14

EQU equal

32

14

42

14

3-5

NEQ not equal

LES less than

LEQ less than or equal

GRT greater than

GEQ greater than or equal

LIM limit test

42

14

60

14

4-7

MEQ mask compare if equal

41

14

35

14 6-9

2 Use the smaller number if all addresses are below word 4096; use the larger number if all addresses are above 4096.

9-9

Page 127

Chapter 9 Calculating Program Timing

Category

Compute

Code

CPT

Execution Time (µs) Integer

Execution Time (µs) Floating Point

True

False

True

False

67

34

124

34

6-9 multiply

73

34

130 divide

80

34

204 square root

113

33

244

34

5-7 negate

59

33

68 clear

49

30

55

34

4-5 move

58

33

5-7 convert to BCD

84 convert from BCD

75

AND

68

34

6-9

NOT

59

34

5-7 equal

63

34

Title add

Words of Memory2 subtract

OR XOR

Compare

CMP

73 not equal less than less than or equal greater than greater than or equal 2 Use the smaller number if all addresses are below word 4096; use the larger number if all addresses are above 4096.

9-10

34

Page 128

Chapter 9 Calculating Program Timing

File Instructions The instruction timing for file instructions depends on the data type, number of files acted on per scan, number of elements acted on per scan, and whether the instruction converts data between integer and floating point formats. Table 9.O shows PLC-5/10, -5/12, -5/15, and -5/25 processors. When you use these tables, keep these guidelines in mind: for integer to floating point conversion, add: 8 µs for each element address 10 µs for each file address (# prefix) for floating point to integer conversion add: 33 µs for each element address 44 µs for each file address (# prefix) Table 9.O Timing and Memory Requirements for File Instructions Category

File Arithmetic and Logic

Code

FAL

Time (µs) Integer

Time (µs) Floating point

Time (µs) Integer or Floating Point

True

True

False

98 + W[36.7 + N]

98 + W[95.1 + N]

54

7-12 multiply

98 + W[42.5 + N]

98 + W[101.2 + N] divide

98 + W[51.1 + N]

98 + W[180.3 + N] square root

98 + W[84.7 + N]

98 + W[220.5 + N]

54

6-10 negate

98 + W[29.2 + N]

98 + W[37.2 + N] clear

98 + W[18.4 + N]

98 + W[24.0 + N]

54

5-8 move

98 + W[27.3 + N]

98 + W[36.2 + N]

54

6-10 convert to BCD

98 + W[54.3 + N] convert from BCD

98 + W[45.4 + N]

AND

98 + W[37.2 + N]

54

7-12

OR

98 + W[37.2 + N]

XOR

98 + W[37.2 + N]

NOT

98 + W[28.2 + N]

54

6-10 all comparisons

93 + W[32.7 +N]

Title add

Words of Memory1 subtract

File Search and Compare

FSC

93 + W[43.3 +N]

W= number of elements acted on per scan

N=

2 x (number of integer file addresses) + 8 x (number of floating-point file addresses) + 6 x (number of timer, counter, or control file addresses) + ( number of conversions between integer and floating point formats)

1 Use the smaller number if all addresses are below word 4096; use the larger number if all addresses are above 4096.

9-11

Page 129

Chapter 9 Calculating Program Timing

Category

File

Shift Register

Diagnostic

Code

Title

Time (µs) Integer or Floating Point

True

True

False copy counter, timer, and control

88 + 2.7W 98 + 5.8W

104 + 3.8W

20

FLL fill

81 + 2/.1 W

100 + 3.1W

15 counter, timer, and control

97 + 4.4W

BSL bit shift left

74 + 3.4W

BSR bit shift right

78 + 3.0W

FFL

FIFO load

54

44

FFU

FIFO unload

68 + 3.2W

46

FBC file bit compare 75 + 6W

1 mismatch

130 + 6W

2 mismatches

151 + 6W

0 mismatch

71 + 6W

1 mismatch

150 + 6W

2 mismatches

161 + 6W 12 master control

Immediate I/O

IIN immediate input

57

31

31

18

1 2-3 local

196 remote

204

16 immediate output 16 local

202 remote

166

SQI sequencer input

57

14

5-9

SQL sequencer load

55

42

4-7

SQO sequencer output

77

42

5-9

JMP jump

45

15

2-3

JSR jump to subroutine

SBR

0 parameters

56

15

2-3

1 parameter

91 add per parameter

21

RET

LBL

3-5 return from sub. 0 parameters

48

1 parameter

70 add per parameter

21 label

12

W = number of elements acted on per scan 1 Use the smaller number if all addresses are below word 4096; use the larger number if all addresses are above 4096.

9-12

4-7 diagnostic detect

MCR

IOT

Words of Memory1

6-11

0 mismatch

Zone Control

Jump and Subroutine

Time (µs) Floating point

COP

DDT

Sequencer

Time (µs) Integer

13

1 2-3

12

3

Page 130

Chapter 9 Calculating Program Timing

Category

Miscellaneous

Code

Title

Time (µs) Integer

Time (µs) Floating point

Time (µs) Integer or Floating Point

True

True

False

Words of Memory1

1

END end negligible negligible

TND temporary end negligible

15

AFI always false

15

13

ONS one shot

28

30

2-3

DTR data transitional

41

41

4-7

BTD bit distributor

77

14

6-11

PID

PID loop control

608

34

5-9

BTR block transfer read

BTW block transfer write

MSG message

See Block Transfer BTR, BTW chapter See Message MSG chapter

W= number of elements acted on per scan

N=

2 x (number of integer file addresses) + 8 x (number of floating-point file addresses) + 6 x (number of timer, counter, or control file addresses) + ( number of conversions between integer and floating point formats)

1 Use the smaller number if all addresses are below word 4096; use the larger number if all addresses are above 4096.

Program Constants

Use program constants in compare, compute, and file instructions to improve instruction execution times. Integer constants and floating-point constants execute in less than 1 µs. Note that if you program using constants you must edit the program to change the constants. If you program using data table addresses, you can change the values by simply changing the value in the data table.

Direct and Indirect Elements

Directly Addressed Elements Additional execution time for directly addressed elements depends on: data types location in memory, referenced to the beginning of all data files (output file, word 0) whether data is stored at the source or destination address whether the instruction converts data Table 9.P lists times to add to instruction execution times.

9-13