The text of a manual · part 54 of 55
Hand-Held Terminal (Catalog Number 1747-PT1) User Manual: D - Estimating Scan Time
Pages 467 to 474 of 486, from Hand-Held Terminal (Catalog Number 1747-PT1) User Manual
The original document is the PDF (1.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 1747-PT1
Page 467
Appendix
A–B
D
Estimating Scan Time This appendix: • contains worksheets that allow you to estimate the scan time for your particular controller configuration and program • includes scan time calculation for an example controller and program Use the instruction execution times listed in appendix C.
Events in the Operating Cycle
The diagram and table below breaks down the processor operating cycle into events. Directions for calculating the scan time of these events appear in the worksheets.
Input Scan Program Scan Output Scan Communication Processor Overhead
Events in the processor operating cycle Event Input Scan
Program Scan
Output Scan Communications Processor Overhead
Description The status of input modules is read and the input image in the processor is updated with this information. The ladder program is executed. The input image table is evaluated, ladder rungs are solved, and the output image is updated. The information is not yet transferred to the output modules. The output image information is transferred to the output modules. Communication with programmers and other network devices takes place. Processor internal housekeeping takes place. Actions include performing program pre–scan and updating the internal timebase and the Status file.
D–1
Page 468
Appendix D Estimating Scan Time
Scan Time Worksheets
Worksheets A, B, and C on the following pages are for use with SLC 500 systems as follows: • Worksheet A – Fixed controllers • Worksheet B – 1747-L511 or 1747-L514 processor • Worksheet C – 1747-L524 processor These worksheets are intended to assist you in estimating scan time for your application. Refer to appendix C for instruction execution times. Refer to the SLC 500 System Overview, publication 1747–2.30, for I/O module part numbers and sizes. An example scan time calculation appears on page D–6.
Defining Worksheet Terminology When you work through the worksheets, you will come across the following terms: Background Communications – Occurs when your processor is attached to an active DH–485 network. During this event the processor accepts characters from the network and places them into a packet buffer. Foreground Communications – Occurs only when another node is attached, or when another processor sends an MSG instruction to your processor. During this event the processor performs the communication commands contained in completed packets built during background communications. Forced Input Overhead – This value is included in your scan time whenever input forces are Enabled in your program. Forced Output Overhead – This value is included in your scan time whenever output forces are Enabled in your program. Single Step – When using this function with a 5/02 processor, you can execute your program one rung or section at a time. This function is used for debugging purposes. Multi–Word Module – Example of multi–word modules are DCM, analog, and DSN.
D–2
Page 469
Appendix D Estimating Scan Time
Worksheet A, Estimating the Scan Time of Your Fixed Controller Procedure 1.
B.
C.
D. E. F. 2.
C.
D. E. F.
b.)________ c.)________ d.)________
Calculate the processor input scan of your specialty I/O modules. Number of 1/4 DCM or analog combo ________ x 652 = Number of 1/2 DCM, analog input, or 1746–HS ________ x 1126 = Number of 3/4 DCM ________ x 1600 = Number of full DCM, BASIC, or 1747–DSN ________ x 2076 = Number of 1747–KE ________ x 443 = e.)________ f.) ________ g.)________ h.)________ i.) ________
_________ _________
Add lines a through i. Place this value on line (j). Add 101 to the value on line (j). This sum is your minimum input scan time. j.)________ + 101 = Calculate your maximum input scan time: Maximum input scan time = Minimum scan time + (Number of specialty I/O modules x 50) Calculate the Forced Input Overhead: Forced Input Overhead = (Number of input modules x 180) + 140 per additional word for multi–word modules (e.g. DCM, analog, DSN)
_________ a.)________
Calculate the processor output scan of your discrete output modules. Number of 8 point modules ________ x 173 = Number of 16 point modules ________ x 272 = Number of 32 point modules ________ x 470 = b.)________ c.)________ d.)________
Calculate the processor output scan of your specialty I/O modules. Number of 1/4 DCM or analog combo ________ x 620 = Number of 1/2 DCM, analog output, or 1746–HS ________ x 1028 = Number of 3/4 DCM ________ x 1436 = Number of full DCM, BASIC, or 1747–DSN ________ x 1844 = e.)________ f.) ________ g.)________ h.)________
Add lines a through h. Place this value on line (i). Add 129 to the value on line (i). This sum is your minimum output scan time. i.)________ + 129 = Calculate your maximum output scan time: Maximum output scan time = Minimum scan time + (Number of specialty I/O modules x 50) Calculate the Forced Output Overhead: Forced Output Overhead = (Number of output modules x 172) + 140 per additional word for multi–word modules (e.g. DCM, analog, DSN)
Estimate your program scan time. This estimate assumes operation of all instructions once per operating scan. A. Count the number of rungs in your APS program. Place value on line (a). B. Multiply value on line (a) by 1. a.)________ x 1 = C. Calculate your program execution time when all instructions are true. (See appendix A to do this.)
_________ _________ _________
4.
Add the values in the minimum and maximum scan time columns.
__________ __________ ___________ subtotal
5.
Add processor overhead time (178 for min. scan time; 278 for max. scan time) to the subtotals estimated in step 4. Use these new subtotals to calculate communication overhead in step 6.
__________ subtotal
6.
Max ScanTime a.)________
Calculate the processor input scan of your discrete input modules. Number of 8 point modules ________ x 197 = Number of 16 point modules ________ x 313 = Number of 32 point modules ________ x 545 =
Estimate your output scan time (µs). A. Determine the type of controller that you have. If you have a 20 I/O processor, write 173 on line (a). If you have a 30 or 40 I/O processor, write 272 on line (a). B.
3.
Min Scan Time
Estimate your input scan time (µs). A. Determine the type of controller that you have. If you have a 20 I/O processor, write 313 on line (a). If you have a 30 or 40 I/O processor, write 429 on line (a).
Estimate your communication overhead: A. Calculate the background communication overhead: multiply the subtotal for minimum scan time (estimated in step 5) by 1; multiply the subtotal for maximum scan time by 1.140 (max. value accounts for active DH–485 link). B. Calculate the foreground communication overhead: for minimum scan time add 0; for maximum scan time add 2310. (Maximum scan time accounts for programmer being attached to processor.) C. Convert µsecs. to msecs., divide by 1000. Estimated minimum and maximum scan times for your fixed controller application:
+ 178
_________ _________ _________ subtotal + 278 x 1.000
__________ µsecs. + 0
_________ subtotal x 1.140
_________ µsecs. + 2310
__________ µsecs.
_________ µsecs.
/ 1000
/ 1000 msecs.
msecs.
D–3
Page 470
Appendix D Estimating Scan Time
Worksheet B, Estimating the Scan Time of Your 1747–L511 or 1747–L514 Processor Procedure
Min Scan Time
1. Estimate your input scan time (µs). A. Calculate the processor input scan of your discrete input modules. Number of 8 point modules ________ x 197 = Number of 16 point modules ________ x 313 = Number of 32 point modules ________ x 545 = B. Calculate the processor input scan of your specialty I/O modules. Number of 1/4 DCM or analog combo Number of 1/2 DCM, analog input, 1746–HS Number of 3/4 DCM Number of full DCM, BASIC, or 1747–DSN Number of 1747–KE
________ x 652 = ________ x 1126 = ________ x 1600 = ________ x 2076 = ________ x 443 =
C. Add lines a through h. Place this value on line (i) Add 101 to the value on line (i). This sum is your minimum input scan time.
Max ScanTime a.)________ b.)________ c.)________ d.)________ e.)________ f.)________ g.)________ h.)________ i.)________ + 101 =
_________
D. Calculate your maximum input scan time: Maximum input scan time = Minimum scan time + (Number of specialty I/O modules x 50)
_________
E. Calculate the Forced Input Overhead: Forced Input Overhead = (Number of input modules x 180) + 140 per additional word for multi–word modules (e.g. DCM, analog, DSN) 2. Estimate your output scan time (µs). A. Calculate the processor output scan of your discrete output modules. Number of 8 point modules ________ x 173 = Number of 16 point modules ________ x 272 = Number of 32 point modules ________ x 470 = a.)________ b.)________ c.)________
B. Calculate the processor output scan of your specialty I/O modules. Number of 1/4 DCM or analog combo ________ x 620 = Number of 1/2 DCM, analog output, or 1746–HS ________ x 1028 = Number of 3/4 DCM ________ x 1436 = Number of full DCM, BASIC, or 1747–DSN ________ x 1844 = d.)________ e.)________ f.) ________ g.)________
C. Add lines a through g. Place this value on line (h). Add 129 to the value on line (h). This sum is your minimum output scan time. h.)________ + 129 =
_________
________
D. Calculate your maximum output scan time: Maximum output scan time = Minimum scan time + (Number of specialty I/O modules x 50)
_________
E. Calculate the Forced Output Overhead: Forced Output Overhead = (Number of output modules x 172) + 140 per additional word for multi–word modules (e.g. DCM, analog, DSN) 3. Estimate your program scan time. This estimate assumes operation of all instructions once per operating scan. A. Count the number of rungs in your APS program. Place value on line (a). B. Multiply value on line (a) by 1. a.)________ x 1 = C. Calculate your program execution time when all instructions are true. (See appendix A to do this.)
_________
4. Add the values in the minimum and maximum scan time columns.
__________ _________ _________ __________ ___________ subtotal _________ subtotal
5. Add processor overhead time (178 for min scan time; 278 for max. scan time) to the subtotals estimated in step 4. Use these new subtotals to calculate communications overhead in step 6.
__________subtotal
6. Estimate your communication overhead: A. Calculate the background communication overhead: multiply the subtotal for minimum scan time (estimated in step 5) by 1; multiply the subtotal for maximum scan time by 1.140 (max. value accounts for active DH–485 link). B. Calculate the foreground communication overhead: for minimum scan time add 0; for maximum scan time add 2310. (Maximum scan time accounts for programmer being attached to processor.) C. Convert µsecs. to msecs., divide by 1000. Estimated minimum and maximum scan times for your 1747–L511 or 1747–L514 application:
D–4
+ 178
+ 278 x 1.000
__________ µsecs. + 0
_________ subtotal x 1.140
_________ µsecs. + 2310
__________ µsecs.
_________ µsecs.
/ 1000
/ 1000 msecs.
msecs.
Page 471
Appendix D Estimating Scan Time
Worksheet C, Estimating the Scan Time of Your 1747–L524 Processor Procedure
Min Scan Time
Max ScanTime
1. Estimate your input scan time (µs). A. Calculate the processor input scan of your discrete input modules. Number of 8 point modules ________ x 126 = a.)________ Number of 16 point modules ________ x 195 = b.)________ Number of 32 point modules ________ x 335 = c.)________ B. Calculate the processor input scan of your specialty I/O modules. Number of 1/4 DCM or analog combo ________ x 375 = Number of 1/2 DCM, analog input, 1746–HS ________ x 659 = Number of 3/4 DCM ________ x 944 = No. of full DCM, BASIC small config., or 7–block DSN ________ x 1228 = Number of 1747–KE ________ x 250 = d.)________ e.)________ f.)________ g.)________ h.)________
C. Calculate the processor input scan of your specialty I/O modules. Number of BASIC Lg. config., 1746–HSCE ________ x 1557 = i.)________ Number of RI/O Scanner or 30–block DSN ________ x 4970 = j.)________ D. Add lines a through j. Place this value on line (k). Add 121 to the value on line (k). This sum is your minimum input scan time.
k.)________ + 121 =
_________
E. Calculate the maximum input scan time: Minimum scan time + (Number of specialty I/O modules in part B x 30) + (Number of specialty I/O modules in part C x 120)
_________
F. Calculate Forced Input Overhead = (No. of input modules x 108) + 140 per additional word for multi–word modules
_________
2. Estimate your output scan time (µs). A. Calculate the processor output scan of your discrete output modules. Number of 8 point modules ________ x 104 = a.)________ Number of 16 point modules ________ x 164 = b.)________ Number of 32 point modules ________ x 282 = c.)________ B. Calculate the processor output scan of your specialty I/O modules. Number of 1/4 DCM or analog combo ________ x 372 = Number of 1/2 DCM, analog output, 1746–HS ________ x 617 = Number of 3/4 DCM ________ x 862 = No. of full DCM, BASIC small config., or 7–block DSN ________ x 1047 = d.)________ e.) ________ f.)________ g.)________
C. Calculate the processor output scan of your specialty I/O modules. Number of BASIC Lg. config., 1746–HSCE ________ x 1399 = h.)________ Number of RI/O Scanner or 30–block DSN ________ x 4367 = i.)________ D. Add lines a through i. Place this value on line (j). Add 138 to the value on line (j). This sum is your minimum output scan time.
j.)________ + 138 =
_________
E. Calculate your maximum output scan time = Minimum scan time + (Number of specialty I/O modules in part B x 30) + (Number of specialty I/O modules in part C x 120)
_________
F. Calculate the Forced Output Overhead = (No. of output modules x 104) + 140 per additional word for multi–word modules
_________
3. Estimate your program scan time. This estimate assumes operation of all instructions once per operating scan. A. Count the number of rungs in your APS program. Place value on line (a). B. Multiply value on line (a) by 6. (If you saved your program with Single–Step Enabled, then multiply the value on line (a) by 66.) a.)________ x 6 = C. Calculate your program execution time when all instructions are true. (See appendix A to do this.) 4. Add the values in the minimum and maximum scan time columns. 5. Add processor overhead time (180 for min. scan time; 280 for max. scan time) to the subtotals estimated in step 4. Use these new subtotals to calculate communication overhead in step 6. 6. Estimate your communication overhead: A. Calculate the background communication overhead: multiply the subtotal for minimum scan time (estimated in step 5) by 1.040; multiply the subtotal for maximum scan time by 1.140 (max. value accounts for active DH–485 link). B. Calculate the foreground communications overhead: for minimum scan time add 0; for maximum scan time add 2286. (Maximum scan time accounts for programmer being attached to processor.) C. Convert µsecs. to msecs., divide by 1000.
__________ _________ _________ __________ __________ subtotal _________ subtotal + 180
+ 280
________subtotal
_________ subtotal x 1.040
_________ µsecs. + 2286
+ 0
__________ µsecs.
_________ µsecs.
/ 1000
/ 1000 msecs.
Estimated minimum and maximum scan times for your 1747–L524 series C application: 7. Estimate the scan time for your 1747–L524 series B application; multiply the values for series C application by 0.60. Estimated minimum and maximum scan times for your 1747–L524 series B application:
x 1.140
_________ µsecs.
x 0.60 msecs.
msecs. x 0.60 msecs.
D–5
Page 472
Appendix D Estimating Scan Time
Example Scan Time Calculation
Suppose you have a system consisting of the following components: System Configuration Description Catalog Number
Quantity
1747–L514 1746–IA8 1746–IB16 1746–OA16 1746–OB8 1746–NIO4V
1 2 1 3 1 1
4K Processor 8 point 120VAC Input Module 16 point 24VDC Sinking Input Module 16 point 120VAC Relay Output Module 16 point 24VDC Sourcing Output Module 4 Channel Analog Combination Module
Since you are using the 1747-L514 processor, worksheet B must be filled out. This is shown on page D–7. The ladder program below is used in this application. The execution times for the instructions (true state) are from appendix C. The total execution time, 465 microseconds, is entered in the worksheet on page D–7. The worksheet indicates that the total estimated scan time is 3.85 milliseconds minimum and 8.9 milliseconds maximum. B3 ] [ 0
B3 ]/[ 1
B3 ] [ 45
O:1.0 ( ) 0
T4:0 ]/[ DN
Execution Times: 38 microseconds
B3 ] [ 9 TON
T4:0 ]/[ DN
T4:0 ] [ DN
TIMER ON DELAY Timer T4:0 Time Base 0.01 Preset 6000 Accum
B3 ]/[ 1
GRT
TOD
GREATER THAN Source A T4:0.ACC
TO BCD Source
Source B
Dest
5999
(EN) (DN)
T4:0.ACC S:13
MOV
END
D–6
139 microseconds
MOVE Source
S:13
Dest
O:1.0
288 microseconds Total: 465 microseconds
Page 473
Appendix D Estimating Scan Time
Example: Worksheet B – Estimating the Scan Time of a 1747–L514 Processor Application Procedure:
Min Scan Time:
1. Estimate your input scan time (µs). A. Calculate the processor input scan of your discrete input modules. Number of 8 point modules 2 Number of 16 point modules 1 Number of 32 point modules 0 x 197 = x 313 = x 545 = a.) b.) c.)
394 313 0
B. Calculate the processor input scan of your specialty I/O modules. Number of 1/4 DCM or analog combo 1 Number of 1/2 DCM, analog input, or 1746–HS 0 Number of 3/4 DCM 0 Number of full DCM, BASIC, or 1747–DSN 0 Number of 1747–KE 0 x 652 = x 1126 = x 1600= x 2076= x 443 = d.) e.) f.) g.) h.)
652 0 0 0 0
C. Add lines a through h. Place this value on line (i). Add 101 to the value on line (i). This sum is your minimum input scan time.
i.) 1359 + 101 =
Max ScanTime:
1460
D. Calculate your maximum input scan time: Maximum input scan time = Minimum scan time + (Number of specialty I/O modules x 50)
1510
E. Calculate the Forced Input Overhead: Forced Input Overhead = (Number of input modules x 180) + 140 per additional word for multi–word modules (e.g. DCM, analog, DSN)
860
2. Estimate your output scan time (µs). A. Calculate the processor output scan of your discrete output modules. Number of 8 point modules 1 x 173 = Number of 16 point modules 0 x 272 = Number of 32 point modules 0 x 470 = B. Calculate the processor output scan of your specialty I/O modules. Number of 1/4 DCM or analog combo 1 Number of 1/2 DCM, analog output, or 1746–HS 0 Number of 3/4 DCM 0 Number of full DCM, BASIC, or 1747–DSN 0 x 620 = x 1028 = x 1436 = x 1844 = a.) b.) c.)
173 816 0 d.) e.) f.) g.)
620 0 0 0
C. Add lines a through g. Place this value on line (h). Add 138 to the value on line (h). This sum is your minimum output scan time. h.) 1609 + 138 =
1747
D. Calculate your maximum output scan time: Maximum output scan time = Minimum scan time + (Number of specialty I/O modules x 50)
1788
E. Calculate the Forced Output Overhead: Forced Output Overhead = (Number of output modules x 172) + 140 per additional word for multi–word modules (e.g. DCM, analog, DSN)
1000
3. Estimate your program scan time. This estimate assumes operation of all instructions once per operating scan. A. Count the number of rungs in your APS program. Place value on line (a). B. Multiply value on line (a) by 1. a.) 3 x 1 = C. Calculate your program execution time when all instructions are true. (See appendix A to do this.) 4. Add the values in the minimum and maximum scan time columns.
3 465 3675 subtotal
3 465 5626 subtotal
5. Add processor overhead time (178 for min scan time; 278 for max. scan time) to the subtotals estimated in step 4. Use these new subtotals to calculate communication overhead in step 6.
+ 178
+ 278
3853 subtotal
5804 subtotal
6. Estimate your communication overhead: A. Calculate the background communication overhead: multiply the subtotal for minimum scan time (estimated in step 5) by 1; multiply the subtotal for maximum scan time by 1.140 (max. value accounts for active DH–485 link). B. Calculate the foreground communication overhead: for minimum scan time add 0; for maximum scan time add 2310. (Maximum scan time accounts for programmer being attached to processor.) C. Convert µsecs. to msecs., divide by 1000.
x 1.000 x 1.140
Estimated minimum and maximum scan times for your 1747–L511 or 1747–L514 application:
3853
µsecs.
3853
6617 + 2310
+ 0
µsecs.
/ 1000
3.85 msecs.
8927
µsecs. µsecs.
/ 1000
8.9 msecs.
D–7