The text of a manual · part 48 of 68
Programmable Controllers C200HX-CPU-ZE, C200HG-CPU-ZE, C200HE-CPU-ZE Operation Manual: SECTION 6 Program Execution Timing, pages 434 to 440
Pages 434 to 440 of 613, from Programmable Controllers C200HX-CPU-ZE, C200HG-CPU-ZE, C200HE-CPU-ZE Operation Manual
The original document is the PDF (3.8 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.
Filed in the catalog under the Omron C200H-SP001 and Omron C200HW-PA204
Page 434
Section
I/O Response Time
6-4
In looking at the following timing charts, it is important to remember the sequence processing occurs during the PC scan, particular that inputs will not produce programmed-actions until the program has been execution.
Unit 0
PC Link Unit
PC Link Unit
PC
PC
Input on PC of Unit 0
Input
LR bit
Output on PC of Unit 7
Unit 7
X Output
X
Input
LR XXXX
LR XXXX
Output X
Note Noise may increase I/O delays. PC Link Conditions
The PC Link System used in this example consists of the following: • No. of PCs linked: 8 • No. of LR points linked: 128 per PC • Maximum PC: 8 • LR points used: 1,024
Minimum Response Time
The following illustrates the data flow that will produce the minimum response time, i.e., the time that results when all signals and data transmissions are processed as soon as they occur.
Cycle time
Program executed.
I/O refresh
PC with Unit 0 Buffer in Unit 0
Minimum transmission time
PC Link Unit transmissions Buffer in Unit 7
Program executed.
I/O refresh
PC with Unit 7 Cycle time Input Output
The equation for minimum I/O response time is thus as follows: Response time = Input ON delay + Cycle time of PC of Unit 0 + Minimum transmission time + (Cycle time of PC of Unit 7 × 2) + Output ON delay Inserting the following values into this equation produces a minimum I/O response time of 149.3 ms. Input ON delay: 1.5 ms
423
Page 435
Section
I/O Response Time Output ON delay: Cycle time for PC of Unit 0: Cycle time for PC of Unit 7: Minimum transmission time: Maximum Response Time
6-4
15 ms 20 ms 50 ms 2.8 ms+10 ms=12.8 ms
The following diagram illustrates the data flow that will produce the maximum response time. Delays occur because signals or data is received just after they would be processed or because data is sent during processing. In either case, processing must wait until the next scan/polling cycle. First output to the buffer in the polling unit is delayed by the setting of the number of LR bits to be refreshed each scan. A similar delay is present when the LR data reaches Unit 7. The polling delay is the result of the LR data in its PC being updated immediately after the previous was sent to the buffer in the PC Link Unit, cause a delay until the next polling cycle. One more polling cycle is then required before the data reaches the buffer in PC Link Unit 7. I/O refresh
Cycle time PC with Unit 0 Buffer in Unit 0 Polling delay PC Link Unit transmissions Buffer in Unit 7
PC Link polling time Induction sequence processing time Maximum transmission time
PC with Unit 7 Cycle time Input Output
The equation for maximum I/O response time is thus as follows: Response time = Input ON delay + [Cycle time of PC of Unit 0 × (Number of LR transfer bits ÷ I/O refresh bits)] + α + (PC Link polling time + Induction sequence processing time) + {Cycle time of PC of Unit 7 × [(Number of LR transfer bits ÷ I/O refresh bits) × 2 + 1]} + β + Output ON delay If cycle time of PC of Unit 0 > PC Link polling time, α = cycle time of PC of Unit 0. If cycle time of PC of Unit 0 < PC Link polling time, α = PC Link polling time. If cycle time of PC of Unit 7 > PC Link polling time, β = cycle time of PC of Unit 7. If cycle time of PC of Unit 7 < PC Link polling time, β = PC Link polling time. Inserting the following values into this equation produces a maximum I/O response time of 661.3 ms. Input ON delay: 1.5 ms Output ON delay: 15 ms Cycle time for PC of Unit 0: 20 ms Cycle time for PC of Unit 7: 50 ms PC Link polling time: 2.8 ms × 8 PCs + 10 ms = 32.4 ms Induction sequence processing: 15 ms × (8 PCs – 8 PCs) = 0 ms
424
Page 436
Section
I/O Response Time
Reducing Response Time
I/O refresh bits for Unit 0
256
I/O refresh bits for Unit 7
256
6-4
IORF(097) can be used in programming to shorten the I/O response time greater than is possible by setting a high number of refresh bits. (Remember, increasing the number of refresh bits set on the back-panel LED shortens response time, but increases the cycle time of the PC.) In programming the PCs for PC Link Units #0 and #7, IORF(097) is executed during every PC scan for the PC Link Units. The basic equation for the maximum I/O response time is as follows: Response time = Input ON delay + [Cycle time of PC of Unit 0 × (Number of LR transfer bits ÷ Number of I/O refresh bits ÷ 2)] + α + PC Link polling time + Induction sequence processing time + {Cycle time of PC of Unit 7 × [(Number of LR transfer bits ÷ Number of I/O refresh bits ÷ 2) × 2 + 1]} + β + Output ON delay If cycle time of PC of Unit 0 > PC Link polling time, α = cycle time of PC of Unit 0. If cycle time of PC of Unit 0 < PC Link polling time, α = PC Link polling time. If cycle time of PC of Unit 7 > PC Link polling time, β = cycle time of PC of Unit 7. If cycle time of PC of Unit 7 < PC Link polling time, β = PC Link polling time. The required data from the example System configuration is as follows: Input ON delay
1.5 ms
Output ON delay
15 ms
Cycle time of PC of Unit 0
20 ms + 5.7 ms = 25.7 (5.7 ms required for IORF execution)
Cycle time of PC of Unit 7
50 ms + 5.7 ms = 55.7 (5.7 ms required for IORF execution)
Number of PC Link Units
8
Number of LR bits
1,024
Number of refresh bits for Unit 0
256
Number of refresh bits for Unit 7
256
PC Link polling time
2.8 ms × 8 PCs + 10 ms = 32.4 ms
Induction sequence processing time
15 ms × (8 PCs – 8 PCs) = 0 ms
Placing these values into the equation produces a maximum I/O response time of 466.9 ms, approximately 200 ms shorter than when IORF is not used.
6-4-5 One-to-one Link I/O Response Time When two C200HX/HG/HEs are linked one-to-one, the I/O response time is the time required for an input executed at one of the C200HX/HG/HEs to be output to the other C200HX/HG/HE by means of one-to-one link communications. One-to-one link communications are carried out reciprocally between the master and the slave. The respective transmission times are as shown below, depending on the number of LR words used. Number of words used
Transmission time
64 words (LR 00 to LR 63)
39 ms
32 words (LR 00 to LR 31)
20 ms
16 words (LR 00 to LR 15)
10 ms
425
Page 437
Section
I/O Response Time
6-4
The minimum and maximum I/O response times are shown here, using as an example the following instructions executed at the master and the slave. In this example, communications proceed from the master to the slave. Output (LR)
Input (LR)
Input
Output
The following conditions are taken as examples for calculating the I/O response times. Input ON delay: 8 ms Master cycle time: 10 ms Slave cycle time: 14 ms Output ON delay: 10 ms Number of LR words: 64 words Minimum I/O Response Time The C200HX/HG/HE responds most quickly under the following circumstances: 1, 2, 3...
1. The C200HX/HG/HE receives an input signal just prior to the input refresh phase of the cycle. 2. The master to slave transmission begins immediately. 3. The slave executes communications servicing immediately after completion of communications.
Input point
I/O refresh Overseeing, communications, etc.
Input ON delay
Master Input bit Cycle time CPU Unit processing
Instruction execution
Instruction execution
One-to-one link communications
Master to Slave
CPU Unit processing
Instruction execution
Slave
Instruction execution Output ON delay
Output point
The minimum I/O response time is as follows:
+
Input ON delay: Master cycle time: Transmission time: Slave cycle time: Output ON delay: Minimum I/O response time:
8 ms 10 ms 39 ms 15 ms 10 ms 82 ms
Maximum I/O Response Time The C200HX/HG/HE takes the longest to respond under the following circumstances: 1, 2, 3...
1. The C200HX/HG/HE receives an input signal just after the input refresh phase of the cycle. 2. The master to slave transmission does not begin immediately.
426
Page 438
Section
I/O Response Time
6-4
3. Communications are completed just after the slave executes communications servicing. Input point
I/O refresh Input ON delay
Overseeing, communications, etc.
Master Input bit
Cycle time CPU Unit processing
Instruction execution
One-to-one link communications
Instruction execution
Master to Slave
Instruction execution
Slave to Master
CPU Unit processing
Master to Slave
Instruction execution
Instruction execution
Slave
Instruction execution Output ON delay
Output point
The maximum I/O response time is as follows: Input ON delay: 8 ms Master cycle time: 10 ms × 2 Transmission time: 39 ms × 3 Slave cycle time: 15 ms × 2 + Output ON delay: 10 ms Maximum I/O response time: 185 ms
6-4-6 Interrupt Response Times The response time from the time an interrupt input is received until the interrupt subroutine execution has been completed is described next. Input Interrupts External interrupt input signal Internal interrupt signal t1 t2
Interrupt subroutine execution t1 = ON delay of Interrupt Input Unit t2 = Software interrupt response time Total interrupt response time = t1 + t2 The ON delay of Interrupt Input Unit is 0.2 ms or less. The software interrupt response time depends on the interrupt response parameter setting in DM 6620 of the PC Setup. If the DM 6620 is set for the C200Hcompatible mode (0000), the software interrupt response time is less than 10 ms. If the DM 6620 is set for the C200HX/HG/HE mode (1xxx), the software interrupt response time is less than 1 ms. The total interrupt response time is thus as shown in the following table. Interrupt response setting
Total interrupt response time
C200H-compatible mode (Normal response)
0.2 ms + (Total of following: Special I/O processing time, Remote I/O processing time, Host Link servicing time, instruction execution)
C200HS mode (High-speed response)
1.2 ms or less
427
Page 439
Section
I/O Response Time
6-4
Scheduled Interrupts Scheduled interrupt interval
Hardware time clock
Scheduled interrupt subroutine execution t3 t3 t3 t3 t3 = Software interrupt response time Total interrupt response time = t3 (software interrupt response time) The software interrupt response time depends on the interrupt response parameter setting in DM 6620 of the PC Setup. If the DM 6620 is set for the C200Hcompatible mode (0000), the software interrupt response time is less than 10 ms. If the DM 6620 is set for the C200HS mode (1xxx), the software interrupt response time is less than 1 ms. The total interrupt response time is thus as shown in the following table. Interrupt response setting
Note
Total interrupt response time
C200H-compatible mode (Normal response)
Total of following: Special I/O processing time, Remote I/O processing time, Host Link servicing time, instruction execution
C200HS mode (High-speed response)
1.0 ms or less
1. If there is any instruction in the program that requires longer than 10 ms to execute when using the C200H-compatible mode, the total interrupt response time will be equal to the execution time of the instruction requiring longer than 10 ms. 2. The above calculations assume that only one interrupt requires executed at any one time. If multiple interrupts are generated at the same time, execution of all but the first interrupt will go on standby, increasing the response times given above. 3. If an interrupt occurs while a or is being serviced, the interrupt will not be processed until SYSMAC NET/SYSMAC LINK Unit servicing has been completed. The response times in this case will be as shown in the following table and will not be affected by the interrupt response setting. Interrupt
Total interrupt response time
Input interrupt
10.2 ms max.
Scheduled interrupt
10 ms max.
This restriction does not apply when a is being used with a C200HX/HG/HE PC. Interrupt Processing Time
428
The processing time from receiving an interrupt input, through program execution, and until a return is made to the original program location is described next. The limit of the count frequency resulting from using the scheduled interrupt period or input interrupts as the count input is determined by the interrupt processing time. Interrupt processing time = Total interrupt response time + Interrupt program execution time + Interrupt return time The interrupt program execution time is determined by the content of the interrupt subroutine. This time is negligible if only SBN(092) and RET(093) are executed.
Page 440
Section
I/O Response Time
6-4
The interrupt return time is 0.04 ms. Note
Interrupt Input Pulse Width
1. If there are several elements that can cause interrupts or if the interrupt period is shorted than the average interrupt processing time, the interrupt subroutine will be executed and the main program will not be executed. This will cause the cycle monitoring time to be exceeded and an FALS 9F error will be generated, stopping PC operation. 2. The maximum interrupt program execution time is contained in SR 262 and SR 263. The pulse width input to Interrupt Input Units must be set to within the conditions shown in the following diagram.
0.5 ms min. 0.2 ms min.
ON time: OFF time:
0.2 ms min. 0.5 ms min.
429