470 likes | 640 Vues
Chapter 2 Basic Principle of PLC. 2.1 PLC Configuration &Function. 2.1.1 Basic Configuration CPU Memory Programming Interface Communication Interfaces I/O Power Supply. 2.1 PLC Configuration &Function. Major PLC Manufacturers : Allen Bradley (Rockwell) Modicon (Schneider)
E N D
2.1 PLC Configuration &Function • 2.1.1 Basic Configuration • CPU • Memory • Programming Interface • Communication Interfaces • I/O • Power Supply.
2.1 PLC Configuration &Function Major PLC Manufacturers: • Allen Bradley (Rockwell) • Modicon (Schneider) • General Electric – Fanuc • Siemens • Omron • Mitsubishi
2.1 PLC Configuration &Function • 2.1.2 Function-----Input Elements: • Control button: • --start • --Stop • --Debug • --Emergency Stopping
2.1 PLC Configuration &Function • 2.1.2 Function-----Input Elements: Input Signal has two types: • ---Digital Input: from the relay or buttons • ---Analog Input: from the detection elements/sensors. Including the temperature, pressure, liquid and flow detection elements.
2.1 PLC Configuration &Function • 2.1.2 Output Elements: Control the site devices to work: • ---motor: Start, Run • ---Valve: CW, CCW
2.1 PLC Configuration &Function • 2.1.2 CPU: • The rated output for the CPM2C-PA201 AC Power Supply Unit is 15 W. • Any surplus power not required for the PC directly can be used as service power supply for sensors and other devices.
2.2 PLC Structure • 2.2.1 Integration type • CPU is integrated with the I/O devices. • C Series of PLCs have 60-Points, 40-points, 28-points, 20-points.
2.2 PLC Structure • 2.2.2 Unit type • CPU is separated from the I/O devices. • The special units include A/D, D/A, Temperature units, Position units, High-speed count units and so on.
2.3 PLC Work Process • 2.3.3 CPM1/CPM1A Cycle Time and I/O Response Time • The overall flow of CPM1/CPM1A operation is as shown in the following flowchart.
2.3.1 CPM1/CPM1A Cycle Time • CPM1/CPM1A Cycle Time • The processes involved in a single CPM1/CPM1A cycle are shown in the following.
2.3.1.1 CPM1/CPM1A Cycle Time • Cycle Time and Operations The effects of the cycle time on CPM1/CPM1A operations are as shown below. .
2.3.1.2 Cycle Time Example In this example, the cycle time is calculated for a CPM1/CPM1A CPU Unit with 20 I/O points (12 input points and 8 output points). The I/O is configured as follows: Inputs: 1 word (00000 to 00011) Outputs: 1 word (01000 to 01007)
2.3.1.2 Cycle Time Example • The rest of 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) • The average processing time for a single instruction in the user’s program is assumed • to be 2.86 ms. The cycle times are as shown in the following table.
2.3.2 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). • The I/O response time varies according to the timing and processing conditions.
2.3.2 I/O Response Time • The minimum and maximum I/O response times are shown here, using the following • program as an example.
2.3.2 I/O Response Time • The following conditions are taken as examples for calculating the I/O response times.. • Input ON delay: 8 ms (input time constant: default setting) • Overseeing time: 1 ms (includes I/O refresh for CPM1A) • Instruction execution time: 14 ms • Output ON delay: 10 ms • Peripheral port: Not used.
2.3.2 I/O Response Time • Minimum I/O Response Time The CPM1/CPM1A responds most quickly when it receives an input signal just • prior to I/O refreshing, as shown in the illustration below.
2.3.2 I/O Response Time • The following conditions are taken as examples for calculating the I/O response times. • In CPM1/CPM1A PCs, LR area words LR 00 to LR 15 are used in 1:1 data links and the transmission time is fixed at 12 ms. • Input ON delay: 8 ms (input time constant: default setting)
2.3.2 I/O Response Time • Master cycle time: 10 ms • Slave cycle time: 15 ms • Output ON delay: 10 ms • Peripheral port: Not used.
2.3.3Minimum I/O Response Time • 1. The CPM1/CPM1A receives an input signal just prior to the input 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.
2.3.3Minimum I/O Response Time • Calculation formula = Input ON response time + Master’s cycle time + Slave’s • cycle time + Output ON response time
2.3.4Maximum I/O Response Time The CPM1/CPM1A takes the longest to respond under the following circumstances: 1. The CPM1/CPM1A receives an input signal just after the input refresh phase of the cycle.
2.3.4Maximum I/O Response Time • 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.
2.4 Interrupt Processing Time • This section explains the processing times involved from the time an interrupt is executed until the interrupt processing routine is called, and from the time an interrupt processing routine is completed until returning to the initial location. • This explanation applies to input interrupts, interval timer interrupts, and high-speed counter interrupts.
2.4.1 Example Calculation • This example shows the interrupt response time (i.e., the time from when the interrupt input turns ON until the start of the interrupt processing routine) when input interrupts are used under the conditions shown below.
2.4.1 Example Calculation • Minimum Response Time • Interrupt ON delay: 100 ms • Interrupt mask standby time: 0 ms • + Change-to-interrupt processing: 30 ms • Minimum response time: 130 ms • Maximum Response Time • (Except for the Online Editing of DM 6144 to DM6655) • Interrupt ON delay: 100 ms • Interrupt mask standby time: 170 ms • + Change-to-interrupt processing: 30 ms • Maximum response time: 300 ms
2.5 CPM2A/CPM2C Cycle Time and I/O Response Time 2.5.1 CPM2A/CPM2C Cycle Time The processes involved in a single CPM2A/CPM2C cycle are shown in the following table, and their respective processing times are explained.
2.5.1 CPM2A/CPM2C Cycle Time • Cycle Time and Operations The effects of the cycle time on CPM2A/CPM2C operations are as shown below. • When a long cycle time is affecting operation, either reduce the cycle time or improve responsiveness with interrupt programs.
2.5.1 CPM2A/CPM2C Cycle Time • CPM2A/CPM2C Cycle Time and I/O Response Time
2.5.2 CPM2A/CPM2C Cycle Time and I/O Response Time • CPM2A/CPM2C Cycle Time 2.5.3 Cycle Time Example In this example, the cycle time is calculated for a CPM2A/CPM2C CPU Unit with 30 I/O points (18 input points and 12 output points). The I/O is configured as follows:
2.5.3 Cycle Time Example • 18 inputs: 2 words (00000 to 00011, 00100 to 00105) • 12 outputs: 2 words (01000 to 01007, 01100 to 01103) • The rest of 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) • The average processing time for a single instruction in the user’s program is assumed to be 1.26 ms. The cycle times are as shown in the following table.
2.6 Minimum I/O Response Time • The CPM2A/CPM2C responds most quickly when it receives an input signal just prior to I/O refreshing, as shown in the illustration below.
2.6 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). • The I/O response time varies according to the timing and processing conditions. • The minimum and maximum I/O response times are shown here, using the following program as an example.
2.6 I/O Response Time The following conditions are taken as examples for calculating the I/O response times. Input ON delay: 10 ms (input time constant: default setting) Overseeing time: 1 ms (includes I/O refreshing) Instruction execution time: 14 ms Output ON delay: 15 ms Communications ports: Not used.
2.7 Minimum I/O Response Time • The CPM2A/CPM2C responds most quickly when it receives an input signal just prior to I/O refreshing, as shown in the illustration below.
2.8 Maximum I/O Response Time • The CPM2A/CPM2C takes longest to respond when it receives the input signal just after the input refresh phase of the cycle, as shown in the illustration below. • In that case, a delay of approximately one cycle will occur.