CHAPTER 4 BASIC FUNCTION OF PLC AND ITS

CHAPTER 4 BASIC FUNCTION OF PLC AND ITS APPLICATION

Program Scan During each operating cycle, the processor reads all inputs, takes these values, and energizes or de-energizes the outputs according to the user program. This process is known as a scan. I/O scan – records status data of input devices. Energizes output devices that have their associated status bits set to ON (1) Program scan – instructions are executed sequentially Because the inputs can change at any time, the PLC must carry on this process continuously.

Scan Process Read inputs The scan is a a continuous and sequential process Adjusts outputs Run program

Data Flow Overview Input modules Input data Input image table file Output image table file Examine data Output modules Return results Program Check/compare/examine specific conditions Take some action

Scan Process Output Module Input device Input file I: 3/6 Output file O: 4/7 I: 3/6 When the input is closed, the input module senses a voltage and an ON condition (1) is entered into the input table bit I: 3/6 Output device Program I: 3/6 O: 4/7 During the program scan the processor sets instructions I: 3/6 and O: 4/7 to ON (1) The processor turns light output O: 4/7 ON during the next I/O scan

PLC PROGRAMMING LANGUAGES

PLC Programming Languages The term PLC programming language refers to the method by which the user communicates information to the PLC. The three most common language structures are: Ladder diagram langage • ladder diagram language • Boolean language • functional chart Functional chart Boolean language

Comparing Programming Language PB 1 CR 2 SOL CR 1 CR 2 SOL Relay Schematic LS 1 PB 1 Equivalent ladder diagram language LS 1 Equivalent Boolean language

Sequential Function Chart (SFC) Programming A functional chart program is a pictorial representation or a special type of flowchart of a sequential control process. It allows the description of the process to become the actual program. Functional chart programming uses function blocks made up of steps and transition units.

Sequential Function Chart (SFC) Programming Check for stop Wait for start One cycle Check for part Lock the clamp Continuous Check mode Press the part Unlock clamp Move conveyor

FUNCTION OF OUTPUT CONTROLLER AND APPLICATION

Timers

Introduction l l Timers are devices that count increments of time. It is an instruction that waits a set amount of time before doing something.

TIMER Time delay relays and solid-state timers are used to provide a time delay. They may have displays, pots or other means of operator interface for time settings and electromechanical or solid state outputs. Time Delay Relay Solid-State Timer

Programmed Timer Instructions PLC timers are output instructions that provide the same functions as timing relays and solid state timers. Some advantages of PLC timers: Ø their settings can be altered easily Ø the number of PLC timers used can be increased or decreased by programming changes without wiring changes Ø timer accuracy and repeatability are extremely high

Quantities Associated with the Timer Instruction Preset Time – Represents the time duration of the timing circuit. For example, if a time delay of 10 s is required, the timer will have a preset of 10 s. Accumulated Time – Represents the amount of time that has elapsed from the moment the timing coil became energized. Time Base – Timers can typically be programmed with several different time bases: 1 s, 0. 1 s, and 0. 01 s are typical time bases. For example, if you enter 0. 1 for the time base and 50 for the preset time the timer would have a 5 s delay (50 x 0. 1 s = 5 s).

Operation of Timers l l Timers are represented by boxes in ladder logic. When a timer receives an enable, the timer starts to time. The timer compares its current time with the preset time. The output of the timer is a logic 0 as long as the current time is less than the preset time. When the current time is greater than the preset time the timer output is a logic 1. TIM XXXX # XXXX

Timers Types l l l ON delay OFF delay ON-OFF cycle timer One-short timer

On-Delay Timer l l Timers used with PLCs can be compared to timing circuits used in hard-wired control line diagrams. In the following example, a normally open (NO) switch (S 1) is used with a timer (TR 1). For this example the timer has been set for 5 seconds. When S 1 is closed, TR 1 begins timing. When 5 seconds have elapsed, TR 1 will close its associated normally open TR 1 contacts, illuminating pilot light PL 1. When S 1 is open, deenergizing TR 1, the TR 1 contacts open, immediately extinguishing PL 1. This type of timer is referred to as ON delay indicates that once a timer receives an enable signal, a predetermined amount of time (set by the timer) must pass before the timer’s contacts change state

On-Delay Timer Example 1 The output will turn-ON 2. 5 seconds after the switch has been activated.

Off-Delay Timer l This type of timer is the opposite of the ondelay timer. This timer simply “delays turning off”.

Off-Delay Timer Address Instruction Data 00000 LD 000001 AND NOT 00002 OUT 01000 00003 LD 01000 00004 TIM 000 #0025 00005 END The output will turn-OFF 2. 5 seconds after the switch has been activated.

Explain the operation of this ladder diagram.

Cascading Timers The programming of two or more timers together is called cascading. Timers may be interconnected, or cascaded to satisfy any required control logic.

Cascading Timers Address Instruction 00000 LD 00001 TIM Data 00001 000 #0200 00002 LD 00004 TIM 000 001 #0700 00005 LD 00005 OUT TIM 001 01000

Designing a Mixer using PLC Pump 1 (1001) Pump 2 (1002) 0001 0004 Mixer Motor (1005) Pump 3 (1003) Drain valve (1004)

l l l l Designing a Mixer using PLC When the Start Button is pressed at input 00000, the program starts pump 1 controlled by output 01001. Pump 1 runs for 5 seconds, filling the tank with the first chemical, then shuts off. The program then starts pump 2, controlled by output 01002. Pump 2 runs for 3 seconds filling the tank with the second chemical. After 3 seconds pump 2 shuts off. The program starts the mixer motor, connected to output 1005 and mixes the two chemicals for 30 minutes. The program then opens the drain valve controlled by output 01004, and starts pump 3 controlled by output 01003. Pump 3 shuts off after 8 seconds and the process stops. A manual Stop switch is also provided at input 00004.
- Slides: 27