36
1 Week © Vocational Training Council, Hong Kong. │ Lecture 2 │ Programmable Logic Controller (PLC) Hardware EEC3420 Industrial Control Department of Electrical Engineering

Eee3420 lecture02 rev2011

Embed Size (px)

Citation preview

Page 1: Eee3420 lecture02 rev2011

1Week © Vocational Training Council, Hong Kong.

│ Lecture 2 │

Programmable Logic Controller (PLC) Hardware

EEC3420 Industrial ControlDepartment of Electrical Engineering

Page 2: Eee3420 lecture02 rev2011

2Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Learning Objectives

Understand the basic hardware components. Understand the operating principles of PLC.

Page 3: Eee3420 lecture02 rev2011

3Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Background of PLC low cost, compact, versatile units based on the

standard microprocessor architecture used in the control of machines or processes

designed for ease of programming and maintenance replace the old relay logic control systems in

automated manufacturing provide an easy and efficient replacements for the

bulky relay logic controllers

Page 4: Eee3420 lecture02 rev2011

4Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Definition of PLC also known as programmable controller (PC) defined by

the National Electrical Manufacturers Association (NEMA) in 1978 as:

"a digitally operating electronic apparatus which uses a programmable memory for the internal storage of instructions for implementing specific functions, such as logic, sequencing, timing, counting and arithmetic, to control through digital or analog input/output, various types of machines or process".

Page 5: Eee3420 lecture02 rev2011

5Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Advantages of PLC Cost effective Flexible Computational abilities allow more sophisticated

control Trouble shooting aids make programming easier Reliable

Page 6: Eee3420 lecture02 rev2011

6Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Typical applications of PLC Embedded control in standard or custom-designed machines Control of conveyor systems Networked to manage large complex distributed control systems Security alarm monitoring system Elevator control Air-conditioning control panel Water treatment plant Warning system on-board of ocean vessels. Smoke candle control on-board aircraft for air-show. Underground coal-mining machines. Central building vacuum system.

Page 7: Eee3420 lecture02 rev2011

7Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Electromagnetic relays a voltage applied to the input coil,

the resulting current creates a magnetic field

magnetic field pulls a metal switch towards it and the contacts touch, closing the switch

contact that closes when the coil is energized is called Normally Open (NO) contact

contact that is closed when the input coil is not energized is called Normally Closed (NC ) contact

Page 8: Eee3420 lecture02 rev2011

8Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Relay circuit and ladder diagram The first relay on the left is used

as NC, and will allow current to flow until a voltage is applied to the input A.

The second relay is NO and will not allow current to flow until a voltage is applied to the input B.

If current is flowing through the second relay coil then current will flow through the coil in the third relay, and close the switch for output C.

This circuit would normally be drawn in the ladder diagram as shown.

Page 9: Eee3420 lecture02 rev2011

9Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Simulated model of a PLC there are two inputs from

push buttons imagine the inputs as

activating 24V DC relay coils in the PLC

in turn drives an output relay that switches 220 VAC, that will turn on a light

Page 10: Eee3420 lecture02 rev2011

10Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

A self-hold circuit

input B will only be on when the output B is on

if B is off, and A is energized, then B will turn on

if B turns on then the input B will turn on, and keep output B on even if input A goes off

after B is turned on the output B will not turn off

Note: When A is pushed, the output B will turn on, and the input B will also turn on and keep B on permanently - until power is removed.

A

B

B

Note: The line on the right is being left off intentionally and is implied in these diagrams.

Page 11: Eee3420 lecture02 rev2011

11Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC standards - IEC 61131Developed with the input of vendors, end-users and

academics, IEC 61131 consists of five parts: • General information • Equipment and test requirements • PLC programming languages • User guidelines

• Communications

Page 12: Eee3420 lecture02 rev2011

12Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC Programming Languages StandardIEC 61131-3 is the international standard for

programmable controller programming languages.

As such, it specifies the syntax, semantics and display for the following suite of PLC programming languages:

• Ladder diagram (LD) • Sequential Function Charts (SFC) • Function Block Diagram (FBD) • Structured Text (ST) • Instruction List (IL)

Page 13: Eee3420 lecture02 rev2011

13Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Ladder diagram and instruction list

Page 14: Eee3420 lecture02 rev2011

14Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Sequential Function Charts (SFCs)

SFCs have been developed to accommodate the programming of more advanced systems

Page 15: Eee3420 lecture02 rev2011

15Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC simulation using Personal Computer

With TRiLOGI’s simulator anyone could write ladder programs and immediately test them using just the keyboard and see the result of the action on screen.

Page 16: Eee3420 lecture02 rev2011

16Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC scan cycle

• the control loop is a continuous cycle of the PLC reading inputs, solving the ladder logic, and then changing the outputs

• like any computer this does not happen instantly

Read inputs

PLC program changes outputsby examining inputs Set new outputs

Process changes and PLC pauseswhile it checks its own operation

THECONTROLLOOP

Power turned on

Page 17: Eee3420 lecture02 rev2011

17Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

The PLC internal working cycle• PLC accepts the inputs from the

Input Port and stores the data to the Input Image Register

• PLC then executes the ladder logic program with the input image content in a sequential manner, that is, from the left to the right and from the top to the bottom

• upon the execution of a rung in the ladder, the contents in the Component Image Register are updated and at the end of a cycle, the outputs are updated

Page 18: Eee3420 lecture02 rev2011

18Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC HardwarePower Supply - This can be built into the PLC or be an

external unit. Common voltage levels required by the PLC (with and without the power supply) are 24Vdc, 120Vac, 220Vac.

CPU (Central Processing Unit) - This is a computer where ladder logic is stored and processed.

I/O (Input/Output) - A number of input/output terminals must be provided so that the PLC can monitor the process and initiate actions.

Page 19: Eee3420 lecture02 rev2011

19Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC Hardware

Indicator lights - These indicate the status of the PLC including power on, program running, and a fault. These are essential when diagnosing problems.

Software - A software based PLC requires a computer with an interface card

Page 20: Eee3420 lecture02 rev2011

20Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

INPUTS and OUTPUTS of PLC• Inputs to, and outputs from, a PLC are necessary

to monitor and control a process. Both inputs and outputs can be categorized into two basic types: digital or continuous.

• Outputs to actuators allow a PLC to cause something to happen in a process. A short list of popular actuators is given below in order of relative popularity

Page 21: Eee3420 lecture02 rev2011

21Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

INPUTS and OUTPUTS of PLC• Inputs come from sensors that translate physical

phenomena into electrical signals. Typical examples of sensors are listed below in relative order of popularity.

• Proximity Switches - use inductance, capacitance or light to detect an object logically.

• Switches - mechanical mechanisms will open or close electrical contacts for a logical signal.

Page 22: Eee3420 lecture02 rev2011

22Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

INPUTS and OUTPUTS of PLC• Potentiometer - measures angular positions

continuously, using resistance.• LVDT (linear variable differential transformer) -

measures linear displacement continuously using magnetic coupling.

• Inputs for a PLC come in a few basic varieties, the simplest are AC and DC inputs.

Page 23: Eee3420 lecture02 rev2011

23Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

INPUTS and OUTPUTS of PLC• Outputs to actuators allow a PLC to cause

something to happen in a process. A short list of popular actuators is given below in order of relative popularity.

• Solenoid Valves - logical outputs that can switch a hydraulic or pneumatic flow.

• Lights - logical outputs that can often be powered directly from PLC output boards.

Page 24: Eee3420 lecture02 rev2011

24Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

INPUTS and OUTPUTS of PLC• Motor Starters - motors often draw a large amount

of current when started, so they require motor starters, which are basically large relays.

• Servo Motors - a continuous output from the PLC can command a variable speed or position.

• Outputs from PLCs are often relays, but they can also be solid state electronics such as transistors for DC outputs or Triacs for AC outputs.

• Continuous outputs require special output cards with digital to analog converters.

Page 25: Eee3420 lecture02 rev2011

25Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Input connection• some PLCs

require external DC supply

• some PLCs have built-in 24 VDC supply

Page 26: Eee3420 lecture02 rev2011

26Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

INPUTS of PLC• PLC inputs must

converts a variety of logic levels to the TTL +5V dc logic levels used on the data bus

• can be done with circuits similar to those shown.

Page 27: Eee3420 lecture02 rev2011

27Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC Input Trade-offs• DC voltages are usually lower, and therefore safer (i.e., 12-24V)• DC inputs are very fast, AC inputs require a longer on-time. For

example, a 60Hz wave may require up to 1/60s for reasonable recognition

• DC voltages can be connected to larger variety of electrical systems

• AC signals are more immune to noise than DC, so they are suited to long distances, and noisy (magnetic) environments

• AC power is easier and less expensive to supply to equipment• AC signals are very common in many existing automation devices

Page 28: Eee3420 lecture02 rev2011

28Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

OUTPUTS of PLC• PLC must convert the

+5V dc dc logic levels on the PLC data bus to external voltage levels

• can be done with circuits similar to those shown, where it may be transistor output, or solid state relay (triac) output, or simply relay output

Page 29: Eee3420 lecture02 rev2011

29Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC output with sinking current• the output card

shown in Figure on the right is an example of a 24Vdc output card that has a shared common

• this type of output card would typically use transistors for the outputs

Page 30: Eee3420 lecture02 rev2011

30Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC output with sourcing current• the circuit shown in

Figure on the right has the sequence of power supply, then device, then PLC outputs, then power supply

• this requires that the outputs have a common

Page 31: Eee3420 lecture02 rev2011

31Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC with relay output • in Figure shown on

the right the 24VDC supply is connected directly to both relays

• when an output is activated the output switches on and power is delivered to the output devices

Page 32: Eee3420 lecture02 rev2011

32Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC Wiring

• Wiring Diagram for a Car-washing Machine

Page 33: Eee3420 lecture02 rev2011

33Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Double coil designation• double or dual coiling is not a

recommended practice. • using multiple output coils of

the same device can cause the program operation to become unreliable

• the coil operation designated last is the effective coil

Page 34: Eee3420 lecture02 rev2011

34Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Input durations

• the ON or OFF duration of the PLC inputs must be longer than the operation cycle time of the PLC

• taking a 10 ms (standard input filter) response delay into account, the ON/OFF duration must be longer than 20 ms if the operation cycle (scan time) is 10 ms

• in the example above, input pulses of more than 25 Hz (1/(20ms ON+20ms OFF) = 1/40ms) cannot be sensed

Page 35: Eee3420 lecture02 rev2011

35Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Summary of PLC Hardware

• PLC input modules convert the AC or DC inputs to the suitable format to be detected by the logic of the PLC.

• Outputs of PLC are transistors (DC), triacs (AC) or relays (AC and DC).

• Input and output addresses are a function of the card location and input bit number.

• The input module usually shares a common ground and so does the output module of a PLC

Page 36: Eee3420 lecture02 rev2011

36Week © Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

PLC Hardware

End of Lecture 2

RevisionMitsubishi PLC FX series hardware handbook.Allen Bradley PLC handbook