Lecture 10-Controllers (PLC) B.
Lecture 10-Controllers (PLC) B.
MEASUREMENTS &Instrumentation
LECTURE 10
1
Lecture Roadmap
• PLC-recap
• PLC Programming
• Examples
– Switches
– DOL
– Traffic Lights
2
PLC Programming
• In Europe, the use of function block diagrams based on function charts with
graphic symbols for logic gates is widely used
3
Programming languages
Ladder logic Diagram
• The left vertical line of a ladder logic diagram (LAD) represents the power
or energized conductor.
• The right vertical line represents the neutral or return path of the circuit.
• Ladder diagrams are read from left-to-right, top-to bottom.
• Rungs are sometimes referred to as networks.
• A network may have several control elements, but only one output coil.
4
Programming languages
Statement List
• A statement list (STL) provides another view of a set of instructions.
• The operation to be executed is shown on the left.
• The operand, the item to be operated on by the operation, is shown on the right.
5
Programming languages
Page 6
Ladder programming
• Thus a rung could specify that the state of switches A and B be examined and if
both A and B are closed then a solenoid, the output is energized.
7
Ladder programming
• The sequence followed by a PLC when carrying out a program:
• 1- Scan the inputs associated with one rung of the ladder program
• 2- solve the logic operation involving those inputs
• • Set/ reset the outputs for that rung
• 3- move on to the next rung and repeat operations 1, 2, 3
• ....and so on until the end of program with each rung of the ladder scanned in turn.
• • The PLC then goes back to the beginning of the program and starts again
• The ladder diagram consists of two vertical lines representing the power rails.
• Circuits (rung) are connected as horizontal lines,
8
Ladder programming
• Fig. below shows a basic standard symbols that are used and rung,
• Inputs must always preceede outputs and there must be at least one output
• on each line
• Each rung must start with an input or series of inputs and end with an output
9
Example of a ladder diagram
• The output from the PLC is to energise a solenoid when a normally open start
switch connected to the input is activated by being closed
• This might be a solenoid valve which opens to allow water to enter a vessel.
10
Ladder programming
11
Inputs and Outputs
Sensors
• A sensor is a device that converts a physical condition into an
electrical signal for use by the PLC.
Actuator
• Actuators convert an electrical signal from the PLC into a
physical condition.
• Depending on the PLC output signal, the motor will either start
or stop.
P13
Inputs and outputs
Digital Input
• A digital input, also referred to as a discrete input, is an input
that is either in an ON or OFF condition.
Examples
• Pushbuttons,
• toggle switches,
• limit switches,
• proximity switches and
• contact closures 14
Inputs and outputs
Digital Input
• A digital input, also referred to as a discrete input, is an input
that is either in an ON or OFF condition.
Examples
• Pushbuttons,
• Toggle switches,
• Limit switches,
• Proximity switches and
15
• Contact closures
Inputs and outputs
Digital Output
• A digital output is an output that is either in an ON or OFF
condition.
• Solenoids, contactor coils, and lamps are examples of actuator
devices connected to discrete outputs.
Example
• A lamp can be turned on or off by the PLC output it is
connected to it.
16
Inputs and outputs
Analog Input
• An analog input is a continuous, variable signal.
Analog inputs may vary from 0 - 20 mA, 4 to 20 mA,
or 0 to 10 V.
Example
• A level transmitter monitors
the level of liquid in a tank.
• The signal from the level
transmitter to the PLC can either
increase or decrease as the level
increases or decreases.
17
Inputs and outputs
Analog Output
• An analog output is a continuous, variable signal. The output may be
as simple as a 0-10 VDC level that drives an analog meter.
Example
• Speed
• Weight
• Temperature.
• Current-to-pneumatic
transducer that controls an air-
operated flow-control valve.
18
Ladder Logic Programming
• It is used when an application must start or stop after a number of same task is
performed, or simply when a task is needed to be counted.
• It is represented by the symbol below, with the number indicating that the following
step will be performed after counter counts that number of times.
19
Ladder Logic Diagrams
20
Lighting a bulb
21
PLC Control Circuit
22
Electric Motor Starting (DOL)
23
Ladder Diagram for DOL
24
PLC Control Circuit
25
Traffic Lights program variables
26
PLC ladder diagram program
27
Ladder diagram using Gmwin (LG-GLOFA PLC)
28