The text of a manual · part 47 of 60
SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual: SECTION 7 PC Operations and Processing Time, pages 425 to 433
Pages 425 to 433 of 520, from SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual
The original document is the PDF (2.1 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 Omron CQM1-CPU21
Page 425
Section
CPM1/CPM1A Cycle Time and I/O Response Time Code
Mnemonic
34
ANDW
35
ORW
36
XORW
37
XNRW
38
INC
39
DEC
40 41 46
STC CLC MSG
50
ADB
51
SBB
52
MLB
53
DVB
54
ADDL
55
SUBL
56
MULL
57
DIVL
60
408
CMPL
ON execution time (µs) 27.1
Constant Ɠ word → word
28.7
Word Ɠ word → word
70.7
DM Ɠ DM → DM Constant V word → word Word V word → word
5.6
DM V DM → DM Constant V word → word Word V word → word
5.6
DM V DM → DM Constant V word → word Word V word → word
5.6
27.1 28.7 70.7 27.1 28.7 70.5 27.0 28.6 70.5 17.9 31.9 18.3 32.3 6.3 6.3 21.5 35.7 30.5 32.1 73.9 30.9 32.7 74.5 34.7 36.3 80.7 35.1 36.7 81.1 48.9 94.7 48.9 94.7 138.7 184.3 136.7 181.3 30.4 60.8
Conditions (Top: min.; bottom: max.)
OFF execution time (µs) 5.6
DM V DM → DM When incrementing a word
5.5
When incrementing DM When decrementing a word
5.5
When decrementing DM Any With message in words
5.5 5.5 5.5
With message in DM Constant + word → word Word + word → word
5.6
DM + DM → DM Constant – word → word Word – word → word
5.6
DM – DM → DM Constant word → word Word word → word DM DM → DM Word ÷ constant → word Word ÷ word → word
5.6
5.6
DM ÷ DM → DM Word + word → word
5.6
DM + DM → DM Word – word → word
5.6
DM – DM → DM Word word → word DM DM → DM Word ÷ word → word DM ÷ DM → DM Comparing words Comparing DM
7-2
5.6 5.6 5.6
Page 426
Section
CPM1/CPM1A Cycle Time and I/O Response Time Code
Mnemonic
61
INI
ON execution time (µs) 112.0 126.0 48.0 48.0 120.0 128.0 46.0 60.0
Conditions (Top: min.; bottom: max.) Starting comparison via word
OFF execution time (µs) 5.6
Starting comparison via DM Stopping comparison via word Stopping comparison via DM Changing PV via word Changing PV via DM Stopping pulse output via word Stopping pulse output via DM
62
PRV
62.2 78.0
Designating output via word
63
CTBL
106.3 120.3
Target table with 1 target in words and start
775.5 799.5
Target table with 16 targets in words and start
711.5 722.5
Range table in words and start
91.9 106.3
Target table with 1 target in words
693.5 709.5
Target table with 16 targets in words
607.5 621.5
Range table in words
73.6 75.0 88.8
Specifying a constant Specifying a word
5.6
Specifying DM
5.6
62.0 78.0
Specifying a word
5.6
52.6 4.08 ms
Counting a word
79.6 80.8 123.2
Comparing constant, results to word Comparing word, results to word
47.5 58.7 47.9 59.1 33.5 63.5 25.7 54.1
Word-set one-shot interrupt start
64
SPED
65
PULS
67
BCNT
68
BCMP
69
STIM
5.6
Target table with 1 target in DM and start Target table with 16 targets in DM and start Range table in DM and start Target table with 1 target in DM Target table with 16 targets in DM Range table in DM
Specifying DM 5.6
Counting 6,656 words via DM 5.6
Comparing DM, results to DM 5.6
DM-set one-shot interrupt start Word-set scheduled interrupt start DM-set scheduled interrupt start Word-set timer read DM-set timer read Word-set timer stop DM-set timer stop
XFER
45.5 47.1 1.78 ms
When transferring a constant to a word When transferring a word to a word
71
BSET
28.1 38.3 1.12 ms
When setting a constant to 1 word When setting word constant to 10 words
30.5 59.1
Word → word
XCHG
5.6
Designating output via DM
70
73
7-2
5.6
When transferring 1,024 words using DM 5.6
When setting DM to 1,024 words 5.6
DM → DM
409
Page 427
Section
CPM1/CPM1A Cycle Time and I/O Response Time Code
Mnemonic
74
SLD
75
SRD
76
MLPX
77
DMPX
78 80
81
SDEC DIST
COLL
82
MOVB
83
MOVD
84
SFTR
85
TCMP
86
ASC
410
ON execution time (µs) 25.9 51.7 3.02 ms 25.9 51.7 3.02 ms 47.7 92.7 59.5 95.5 51.1 96.3 39.1 40.9 84.7 63.4 65.0 109.6 42.6 43.6 83.4 78.0 79.2 1.76 ms
Conditions (Top: min.; bottom: max.) Shifting 1 word Shifting 10 word Shifting 1024 words using DM Shifting 1 word Shifting 10 word
OFF execution time (µs) 5.6
5.6
Shifting 1,024 words using DM When decoding word to word
5.6
When decoding DM to DM When encoding word to word
5.6
When encoding DM to DM When decoding word to word
5.6
When decoding DM to DM When setting a constant to a word + a word When setting a word to a word + a word
5.6
When setting DM to DM +DM When setting a constant to a stack When setting a word to a stack When setting DM to a stack via DM When setting a constant + a word to a word When setting a word + a word to a word
5.6
When setting DM + DM to DM When setting a word + constant to FIFO stack When setting a word + word to FIFO stack When setting a DM + DM to FIFO stack via DM
66.8 68.0 112.0
When setting a word + constant to LIFO stack When setting a word + word to LIFO stack
32.5 37.5 79.1 28.3 33.3 75.5 39.3 52.9 1.42 ms 57.7 58.9 101.9 56.7 103.9
When moving constant to word When moving word to word
When setting a DM + DM to LIFO stack via DM 5.6
When moving DM to DM When moving constant to word When moving word to word
5.6
When moving DM to DM Shifting 1 word Shifting 10 word
5.6
Shifting 1,024 words using DM Comparing constant to word-set table Comparing word to word-set table
5.6
Comparing DM to DM-set table Word → word DM → DM
7-2
5.6
Page 428
Section
CPM1/CPM1A Cycle Time and I/O Response Time Code
Mnemonic
89
INT
91 92 93 97
SBS SBN RET IORF
99
MCRO
ON execution time (µs) 32.3 46.3 29.1 43.1 27.3 41.5 29.7 43.7 15.3 15.3 15.9 15.9 36.6 1.7 15.0 40.0 142.6 135.4 74.0 116.4
Conditions (Top: min.; bottom: max.) Set masks via word
7-2
OFF execution time (µs) 5.6
Set masks via DM Clear interrupts via word Clear interrupts via DM Read mask status via word Read mask status via DM Change counter SV via word Change counter SV via DM Mask all interrupts via word Mask all interrupts via DM Clear all interrupts via word Clear all interrupts via DM Any
Refreshing IR 000 Refreshing one input word Refreshing one output word With word-set I/O operands
5.5 1.7 2.5 6.0
5.6
With DM-set I/O operands
411
Page 429
Section
SRM1 Cycle Time and I/O Response Time
7-3
7-3
SRM1 Cycle Time and I/O Response Time
7-3-1 The SRM1 Cycle The overall flow of SRM1 operation is as shown in the following flowchart.
Initialization
Overseeing processes
CompoBus/S end wait Input refreshing
Program execution
Cycle time Cycle time processing
Output refreshing
RS-232C servicing Service peripheral port.
Note
1. The cycle time can be read using Peripheral Devices. 2. Cycle time maximum and current cycle time are stored in AR 14 and AR 15. 3. Change to processing will cause cycle times to change therefore the calculated values and actual values (for cycle time) will no always match.
412
Page 430
Section
SRM1 Cycle Time and I/O Response Time
7-3
7-3-2 SRM1 Cycle Time The processes involved in a single SRM1 cycle are shown in the following table, and their respective processing times are explained. Process
Content
Overseeing
Time requirements
CompoBus/S end wait
Setting cycle watchdog timer, UM check, refreshing bits allocated to new functions, etc. Waiting for CompoBus/S processing to finish
Input refreshing
Input information is read to input bits.
Program execution
User program is executed.
Cycle time calculation
Output refreshing
Total time for executing instructions. (Varies according to content of user’s program.)
Standby until set time, when minimum cycle time is set in DM 6619 of PC Setup.
Almost instantaneous, except for standby processing.
Calculation of cycle time. Output information (results of executing program) is written to output bits.
0.05 ms
CompoBus/S communications are started. Devices connected to RS-232C port serviced.
Peripheral port servicing
Devices connected to peripheral port serviced.
Minimum Cycle Time
Cycle time
100 ms or longer 120 ms or longer 200 ms or longer
5% or less of cycle time, but always between 0.55 and 131 ms (Set in DM 6616) 5% or less of cycle time, but always between 0.55 and 131 ms (Set in DM 6617)
In SRM1 PCs, CompoBus/S communications are started after the output refresh is completed. As a result, when the overseeing time plus the RS-232C port servicing time plus the peripheral port servicing time is shorter than the CompoBus/S communications response time, processing is placed on stand-by until CompoBus/S communications are completed. The minimum cycle time therefore is the the CompoBus/S communications response time plus the program execution time plus the input refresh time plus the output refresh time. The CompoBus/S communications response time depends on the maximum number of nodes set, as follows:
Cycle Time and Operations
20 ms or longer
CompoBus/S communications response time – Overseeing time – RS-232C port servicing time – peripheral port servicing time 0.02 ms
Refer to 7-3-6 SRM1 Instruction Execution Times.
RS-232C port servicing
10 ms or longer
0.18 ms
Max. no. of nodes set
CompoBus/S response time
32
0.8 ms
16
0.5 ms
The effects of the cycle time on SRM1 operations are as shown below. When a long cycle time is affecting operation, either reduce the cycle time or improve responsiveness with interrupt programs. Operation conditions
TIMH(15) may be inaccurate when TC 004 through TC 127 are used (operation will be normal for TC 000 through TC 003). Programming using the 0.02-second Clock Bit (SR 25401) may be inaccurate. TIM may be inaccurate. Programming using the 0.1-second Clock Bit (SR 25500) may be inaccurate. A CYCLE TIME OVER error is generated (SR 25309 will turn ON). See note 1. The FALS 9F monitoring time SV is exceeded. A system error (FALS 9F) is generated, and operation stops. See note 2. Programming using the 0.2-second Clock Bit (SR 25501) may be inaccurate.
Note
1. The PC Setup (DM 6655) can be used to disable detection of CYCLE TIME OVER error. 2. The cycle monitoring time can be changed in the PC Setup (DM 6618).
413
Page 431
Section
SRM1 Cycle Time and I/O Response Time Cycle Time Example
The following is an example of a cycle time calculation. The operating conditions are assumed to be as follows: User’s program:500 instructions (consists of only LD and OUT) Cycle time: Variable (no minimum set) RS-232C port: Not used. Max. nodes: 32 (CompoBus/S communication response time = 0.8 ms) Peripheral: 0.7 ms The average processing time for a single instruction in the user’s program is assumed to be 1.16 µs. The cycle times are as shown in the following table.
Process
Calculation method
Peripheral port used
Peripheral port not used
1. Overseeing
Fixed
0.18 ms
0.18 ms
2. CompoBus/S end wait
See previous page.
0.00 ms
0.62 ms
3. Input refresh
Fixed
0.02 ms
0.02 ms
4. Program execution
1.16 × 500 (µs)
0.8 ms
0.8 ms
5. Cycle time calculation
Negligible
0.00 ms
0.00 ms
6. Output refresh
0.01 × 1 + 0.005 × 1 (µs)
0.05 ms
0.05 ms
7. RS-232C port servicing
Not required
0.00 ms
0.00 ms
8. Peripheral port servicing
5% of cycle time
0.7 ms
0.00 ms
Cycle time
(1) + (2) + (3) + ...+ (8)
1.75 ms
1.67 ms
Note
414
7-3
1. The cycle time can be read from the PC via a Peripheral Device. 2. The maximum and current cycle time are stored in AR 14 and AR 15. 3. The cycle time can vary with actual operating conditions and will not necessarily agree precisely with the calculated value. 4. When the peripheral port is used, there is no CompoBus/S end wait time as it is always 0 or less. 5. CompoBus/S end wait time = 0.8 – 0.18 – 0 – 0 = 0.62 (CompoBus/S communication response time – Overseeing – RS-232C port servicing time – peripheral port servicing time.
Page 432
Section
SRM1 Cycle Time and I/O Response Time
7-3
7-3-3 I/O Response Time The I/O response time is the time it takes after an input signal has been received (i.e., after an input bit has turned ON) for the PC to check and process the information and to output a control signal (i.e., to output the result of the processing to an output bit). CompoBus/S communications are started when the SRM1 input refresh finishes. The ON/OFF status is read from the Input Terminals during the input refresh and the ON/OFF status is output to the Output Terminal during the output refresh. Accordingly, the SRM1 I/O response time varies according to the cycle time and CompoBus/S communications cycle status or I/O timing. Example calculations of the I/O response time are provided next. Minimum I/O Response Time Minimum I/O response time = Input ON delay + Output ON delay + CompoBus/S communications cycle time + SRM1 cycle time Cycle time SRM1 cycle
CompoBus/S cycle time
Communications response time
Input delay
Input on Slave
Output delay
Output on Slave
Maximum I/O Response Time Maximum I/O response time = Input ON delay + Output ON delay + CompoBus/S communications cycle time + SRM1 cycle time x 2 Cycle time SRM1 cycle
CompoBus/S cycle time
Communications response time
Input on Slave
Input delay Output delay
Output on Slave
7-3-4 One-to-one Link I/O Response Time When two SRM1s are linked one-to-one, the I/O response time is the time required for an input executed at one of the SRM1s to be output to the other SRM1 by means of one-to-one link communications. Minimum I/O Response Time The SRM1 responds most quickly under the following circumstances:
415
Page 433
Section
SRM1 Cycle Time and I/O Response Time 1, 2, 3...
Input point
7-3
1. The SRM1 receives an input signal just prior to the I/O refresh phase of the cycle. 2. The Master’s communications servicing occurs just as the master-to-slave transmission begins. 3. The Slave’s communications servicing occurs just after the transmission is completed. I/O refresh Overseeing, communications, etc.
Input ON delay (8 ms)
Input bit
Program execution Master’s cycle time (10 ms)
Master to Slave
Transmission time (39 ms) Program execution Output ON Slave’s cycle time (15 ms) delay (10 ms) Output point Min. I/O response time = 8+10+39+15+10 = 82 ms
Maximum I/O Response Time The SRM1 takes the longest to respond under the following circumstances: 1, 2, 3...
Input point
1. The SRM1 receives an input signal just after the I/O refresh phase of the cycle. 2. The Master’s communications servicing just misses the master-to-slave transmission. 3. The transmission is completed just after the Slave’s communications servicing ends. I/O refresh
Input ON delay (8 ms)
Overseeing, communications, etc.
Input bit Program execution
Program execution
Master’s cycle time (10 ms) Master to Slave
Slave to Master
Master to Slave
Transmission time (39 ms × 3)
Program execution
Program execution
Slave’s cycle time (15 ms) Output point Max. I/O response time = 8 + 10 × 2 + 39 × 3 + 15× 2 + 10 = 185 ms
416
Output ON delay (10 ms)