Sei sulla pagina 1di 46

ENGG3490-PLC L3

PLCs Ref. [3]; 1. Developing Fundamental PLC Wiring Diagrams and Ladder Logic Programs
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 1

Electromagnetic Control Relay


The PLC's original purpose was the replacement of electromagnetic relays with a solid-state switching system that could be programmed. The Th programmable controller was designed bl t ll d i d to replace physically small control relays that make logic decisions but are not designed to handle heavy current or high voltage. Electromagnetic relays, such as the lighting contactor shown, are still used as auxiliary devices to switch I/O field devices.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 2

Electromagnetic Relay Operation


An electromagnetic relay is a magnetic switch. It uses electromagnetism to switch contacts.

A relay will usually have only one coil but may have any number of different contacts.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Electromagnetic Relay Operation


With no current flow through the coil ( (coil de-energized), g ), the armature is held away from the core by spring tension. When the coil is energized, the electromagnetic field moves the armature causing the contact points of the relay to open or close.
4

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Relay Symbol
Coil CR1 CR1 1 CR1-1 CR1-2 CR1 2

Normally open (NO) contact Contacts are open when no current flows through the coil but close as soon as the coil is energized.

Normally closed (NC) contact Contacts are closed when no current flows through the coil but open as soon as the coil is energized.
5

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Relay Circuit Operation


L1 S CR1 CR1-1 OFF R With switch S open: coil CR1 is de-energized contacts CR1-1 are open light R is off contacts CR1-2 are closed light G is on L2

G CR1-2 ON

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Relay Circuit Operation


L1 S CR1 CR1-1 ON R With switch S closed: coil CR1 is energized contacts CR1-1 are closed light R is on contacts CR1-2 are open p light G is off L2

G CR1-2 OFF

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Magnetic Contactor
A contactor is a special type of relay designed to handle heavy power loads that are beyond the capability of control relays. relays Contactors are designed to operate such loads as lights, heaters, transformers, capacitors, and electric motors f which overload for hi h l d protection is provided separately or not required.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 8

Magnetic Contactor

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

PLC Used in Conjunction with a Contactor


Contactor power contacts Pump

L2

High-current wiring
L1

Low-current wiring

Programmable controllers Coil have I/O capable of operating terminals the contactor but they do not t i l have the capacity to operate heavy loads directly.
L1

L2

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

PLC output module

10

Magnetic Motor Starter


A magnetic motor starter is a contactor with an overload relay attached physically and electrically. They are electromagnetically operated switches that provide a safe method for starting large motor loads. The overload relay will open the supply voltage to the starter if it detects an overload on a motor. Motor overload relay contacts are normally hardwired in series with the magnetic starter coil.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 11

Magnetic Motor Starter


Overload heaters are connected in series with the contactor. If the motor becomes overloaded they cause a mechanical latch to trip. Tripping this latch opens a set of contacts that are h wired in series with the voltage supply and motor.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 12

Across the Line AC Starter Operation

Low-current control circuit

When the start button is pressed, coil M energizes to close all M contacts. The OL contact opens automatically when an overload condition is sensed, to de sensed deenergize the M coil and stop the motor.
13

High-current power circuit


ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Across the Line AC Starter Operation


The M contacts, in series with the motor, close to complete the high-current path to the motor. Control contact M also closes to seal-in the coil circuit when the START button is released.
High-current power circuit
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 14

Low-current control circuit

PLC Control of A Large Motor Load


When a PLC needs to control a large motor, it must work in conjunction with a starter.

Motor starters are available in various standard National Electric Manufacturers (NEMA) sizes and ratings.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 15

Manually Operated Switches


Manually operated switches are controlled by hand. Pushbutton switches are the most common form of manual control found in industry.

Normally Open (NO) pushbutton makes a circuit when it is pressed and returns to its open position when the button is released.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

16

Manually Operated Switches

Normally Closed (NC) pushbutton opens N ll Cl d hb tt the circuit when it is pressed and returns to the closed position when the button is released. The abbreviations NO and NC represent the state of the switch when it is not actuated.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

17

Manually Operated Switches


The break-make pushbutton is used for interlocking controls. In this switch the top section is NC, while the bottom section is NO. NO When the button is pressed the pressed, bottom contacts are closed as the top contacts open.
NOT PRESSED ON R L1 G OFF
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

PRESSED OFF R L2 L1 G ON
18

L2

Selector Switch
Selector switch positions are made by turning the operator knob not p pushing it. g
Contacts Off
Hand Auto

Position Hand A B Off Auto

A X

Selector switch positions may have two or more selector positions with either maintained contact position or spring return to give momentary contact operation.
19

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Selector Switch Motor Reversing

Selector switch used in conjunction with a reversing motor starter to select forward or reverse operation of the motor.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 20

10

Dual In-Line Package (DIP) Switches


Are small switch assemblies designed for mounting on printed circuit board modules.

ON OFF

Switch settings are seldom changed, changed and the changes occur mainly during installation or configuration of the system.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 21

Mechanically Operated Switches


A mechanically operated switch is controlled automatically by factors such as pressure, position, and temperature.

The limit switch is a type of mechanically operated switch designed to operate only when a p predetermined limit is reached, , and is usually actuated by contact with an object such as a cam.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 22

11

Limit Switch Operation


Symbols y

Limit switches take the place of a human operator.

NO Contact NC Contact

They are often used in the control of machine processes to govern the starting, stopping, or reversal of motors.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 23

Typical Limit Switch Circuit


L1 Stop Forward FWD Limit F F Reverse R F R REV Limit R Limit switches OLs L2

Control circuit for starting and stopping a motor in forward and reverse with limit switches providing over travel protection.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 24

12

Temperature Switch
The temperature switch or thermostat is used to sense temperature changes and is actuated by some specific environmental temperature change. Responds to changes in temperature by opening or closing an electric circuit.
Symbols

NO Contact

NC Contact
25

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Temperature Switch Control of a Motor


Closing ON

Rising g temperature Motor


ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 26

13

Pressure Switch
Pressure switches are used to control the pressure of liquids and gases and are activated when a specific pressure is reached. Opens or closes an electric circuit in response to a change in pressure.
Symbols
Bellows Switch

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

NO Contact

NC Contact

27

Starter Operated By a Pressure Switch

Closing ON Rising pressure

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

28

14

Level Switch
Level or float switches are used to sense the height of a liquid. p Opens or closes an electric circuit in response to a change in liquid level.
Symbols Float NO Contact NC Contact Switch

Two-wire level switch control of starter.


ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 29

Transducer
A transducer is any device that converts energy from one form to another.

Amplifier

Output transducer Input transducer (speaker) converts (microphone) converts electric energy to sound sound energy to electric energy ENGG3490: 30 energy Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

15

Sensors
Sensors are input transducers used for detecting and often measuring the magnitude of something. They convert mechanical, magnetic, thermal, optical, and chemical variations into electric voltages and currents. h i l i ti i t l t i lt d t

Photoelectric sensor

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

31

Sensors
Sensors provide the equivalent of eyes, ears, nose, and tongue to the microprocessor brain.
Microprocessor Optical sensor Gas sensor Microphone

Probe
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 32

16

Proximity Sensors
Proximity sensors or switches detect the presence of an object without making physical contact with it.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

33

Proximity Sensors Applications


The object being detected is too small, lightweight, or soft to operate a mechanical switch. Rapid response and high switching rates are required required. An object has to be sensed through nonmetallic barriers such as glass, plastic, and paper cartons. Hostile environments conditions exist. Long life and reliable service are required. A fast electronic control system requires a bounce-free input signal.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 34

17

Inductive Proximity Sensor Operation


Barrel type Block diagram

As the target moves into the sensing area, the sensor switches the output ON
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 35

Proximity Sensor Connections


The method of connecting and exciting a proximity sensor varies with the type of sensor and its application. pp
L1 Target L2

Load

Two-wire sensor connection


ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 36

18

Proximity Sensor Connections


Current-sourcing output (PNP)
Sensor

Control output

Load

Load is connected between the sensor and ground


37

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Proximity Sensor Connections


Sensor

Current-sinking output (NPN)

Load

Load is connected between the positive supply and sensor

Control output

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

38

19

Proximity Sensor Connection to Input Module


A proximity sensor should
L1 be powered continuously L2 Input module

Proximity sensor

The use of a bleeder resistor allows enough current for the sensor to operate but not enough to turn on the input of the PLC
39

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Bleeder resistor

Capacitive Proximity Sensor


A capacitive proximity sensor can be actuated by both conductive and nonconductive material such as wood, plastics, liquids, sugar flour and wheat.

Operation is similar to that of inductive proximity sensor. Instead of a coil, the coil active face of the sensor is formed by two metallic electrodes rather like an "opened capacitor".
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 40

20

Magnetic Switch (Reed Switch)


A magnetic switch (also called a reed switch) is composed of flat contact tabs that are hermetically sealed (air-tight).
Magnet
N S

NO Common NC

The switch is actuated by a magnet.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

41

Reed Switch Activation


Reed switch

Magnet

Proximity motion movement of the switch or magnet will activate the switch Rotary motion switch is actuated twice for every complete revolution Shielding S i i the shield i short circuits the magnetic field; switch is activated by removal of the shield
42

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

21

Photovoltaic Or Solar Cell


The photovoltaic cell, or solar cell, is a common light-sensor device that converts light energy directly into electric energy.

Solar cell

The solar cell converts light impulses directly into electrical charges which can easily be amplified to provide an input signal to a PLC.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 43

Photoconductive or Photoresistive Cell


The photoconductive cell, or photoresistive cell, is is another popular type of light transducer. Light energy falling on this device will cause a change in the resistance of the cell.

Ohms 20 Ohms Light resistance 5,000 Ohms Dark resistance


ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 44

22

Photoelectric Sensor Operation


Most industrial photoelectric sensors use a lightemitting diode (LED) for the light source and a phototransistor to sense the presence or absence of light.
Light from the LED falls on the input of the phototransistor and the amount of conduction through the transistor changes. changes Analog outputs provide an output proportional to the quantity of light Light source seen by the photodetector. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 45
Light detector

Object to be sensed

ENGG3490: Mechatronics W07.

Reflective Photoelectric Sensor


Emits a light beam (visible, infrared, or laser) from its light emitting element and detects the light being reflected.
Diffused-reflective type Retro-reflective type
Emitter/receiver Operating Operating range range g

Target Reflector
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 46

23

Through-Beam Type Photoelectric Sensor A through-beam photoelectric sensor is used to measure the change in light quantity caused by the target's crossing the optical axis.

Emitter

Operating range g

Receiver

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Target

47

Bar Code Systems


Bar code systems can be used to enter data much more quickly than manual methods, and are highly accurate.

Diverter Decoder Scanner

The decoder receives the signal from the scanner and converts these data into the character data representation of the symbol's code.
48

PLC
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

24

Ultrasonic Sensor
An ultrasonic sensor operates by sending sound waves towards the target and measuring the time it g g takes for the pulses to bounce back.

The returning echo signal is electronically converted to a 4 mA to 20 mA output, which supplies flow rate to external control devices.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 49

Strain/Weight Sensor
A strain gauge transducer converts a mechanical strain into an electric signal. signal
Hopper Controller The force applied to the gauge causes the gauge to bend. This bending action also ON/OFF Chute distorts the physical size of the g g p y Control gauge, which in turn changes its resistance.

Wire type

Force

The load cell provides p sensor input to the controller, which displays the weight and controls the hopper chute.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

50 Load cell

25

Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor, and IC sensor. d
The thermocouple consists of a pair of dissimilar conductors fused together at one end to form the "hot" or measuring junction, with the free ends available for connection to the "cold" reference junction. A temperature difference between the measuring and reference junction generates a small DC signal voltage.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 51

Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor, and IC sensor. d
The resistance temperature detector (RTD) varies in resistance value with changes in temperature.

RTD
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 52

26

Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor, and IC sensor. d

The thermistor varies in resistance value with changes i t h in temperature t

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

53

Temperature Sensors
Temperature sensors convert heat into an electric signal. There are four basic types used: thermocouple, resistance temperature detector (RTD), thermistor, and IC sensor. d

The Integrated Circuit (IC) temperature p g g sensor produces changes in voltage or current with changes in temperature.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

54

27

Flow Measurement
The usual approach used in measuring fluid flow is to convert the kinetic energy that the fluid has into some other measurable form.
Turbine Flow Meter Coil Flow Magnet Turbine The turbine blades turn at e u b e b des u a rate proportional to the fluid velocity and are magnetized to induce voltage pulses coil.
55

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Flow Measurement
The usual approach used in measuring fluid flow is to convert the kinetic energy that the fluid has into some other measurable form.
Electronic Magnetic Flow Meter Can be used with electrically conducting fluids and offers no restriction to flow. A coil in the unit sets up a magnetic field. If field a conductive liquid flows through this magnetic field, a voltage is induced and sensed by two electrodes.
56

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

28

Velocity/RPM Sensors
A tachometer is a small permanent magnet DC generator which when rotated produces a voltage that is directly proportional to the speed at which it is driven.
Controller

Tachometers coupled to motors are commonly used in M motor speed control applications to provide Motor a feedback voltage to the controller that is Tach proportional to motor speed. ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 57

Velocity/RPM Sensors
The rotating speed of a shaft is often measured using a magnetic (inductive) i k (i d ti ) pickup sensor.

Pickup coil

Pole piece

Sensor output 0V

N S Magnet

A magnet is attached to the shaft. A small coil of wire held near the magnet receives a pulse each time t i l h ti the magnet passes. By measuring the frequency of the pulses, the shaft speed can be determined.
58

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

29

Output Control Devices


A variety of output control devices can be operated by the controller output module to control traditional processes. These include:

Pilot light

Control relay

Solenoid

Alarm

Solenoid valve

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Heater

Motor starter

Small motor59

Actuator
An actuator is any device that converts an electrical signal into mechanical movement. The principle types of actuators are relays, solenoids, and motors. Solenoid
Plunger Symbol

The solenoid converts electric current into linear motion.

AIR Coil
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 60

30

Solenoid Valve
A solenoid valve is a combination of: a solenoid with its core or plunger a valve body containing an orifice in which a disc or plug is positioned to restrict or allow flow
Forward motion of piston When SOL A is energized, the valve spool is shifted to redirect the fluid and move the cylinder forward CR SOL A FWD SOL A CR
61

Directional solenoid valve

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Stepper Motor
A stepper motor converts electrical pulses applied to it into discrete rotor movements called steps. They are used to provide precise position control of movement.
Stepper motor control system Stepper-motor translator
Enables control of the stepper motor

Module M d l
Communicates with the PLC and responds with pulse trains

Step motor

ENGG3490: Mechatronics W07.

The motor will move one step for each pulse Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 62 received

31

Seal-In Circuits
A seal-in circuit is a method of maintaining current flow after a momentary switch has been pressed and released. p
Hardwired Seal-In Circuit
Start Stop Motor starter coil M M

The seal-in auxiliary contact of the starter is connected in parallel with Seal-in contact the Start button to keep the starter coil energized when the Start button is ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 63 released.

Programmed Seal-In Circuits


Ladder logic program Inputs L1 Stop p Start PB Start M Stop PB Motor starter coil (M) Output L2 M Motor starter coil (M)

Both the Start and Stop buttons are examined for a closed condition because both buttons must be closed to cause the motor starter to operate.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 64

32

Latching Relay
Latching relays are used where it is necessary for contacts to stay open and/or closed, even though the coil is energized momentarily. momentarily
L1 ON L OFF U When the ON button is momentarily actuated, the latch il i l t h coil is energized to set i dt t the relay to its latched position. The relay does not have to be continuously energized to hold the contact closed.
65

L2 Electromagnetic latching

relay circuit

PL

Contact shown with relay ENGG3490: Mechatronics position in the unlatched W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

Programmed Latching Relay Instruction


Command Name Symbol Description
OTL sets the bit to 1 when the rung becomes true, and , retains its state when the rung loses continuity or a power cycle occurs OUT resets the bit to 0 when the rung becomes true and retains it

OTL

Output Latch

OTU

Output Unlatch

XXX XXX

Latch and unlatch coils have the same address


66

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

33

Latching Relay Program


ON ON

Latch rung
OFF OFF

Unlatch rung

Output rung

1 When the ON button is momentarily actuated, the latch rung becomes true and the latch status bit (10) is set to 1, and so the output is switched on. This status bit will remain on (1) when ENGG3490: Mechatronics W07. Addapted latch rung Controllers By 67 logic continuity of theFrom Programmable Logicis lost. F. D. Petruzella, McGraw-Hill

Latching Relay Program


ON ON

Latch rung
OFF OFF

Unlatch rung

Output rung

0 When the unlatch rung becomes true (OFF button actuated), the status bit (10) is reset back to 0 and so the output is switched off.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 68

34

PLC Water Level Program


Pump running Low level High level The program for this process is designed to control the level of water in a storage tank by turning a discharge pump on and off. Modes of Operation High sensor switch Off Position: the pump will stop if it is running and will not start if it is pp stopped. Manual Mode: the pump will start if the water in the tank is at any level except low.
69

Low sensor switch Pump motor

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

PLC Water Level Program


Pump running Low level High level The program for this process is designed to control the level of water in a storage tank by turning a discharge pump on and off.

Modes of Operation Automatic Mode: High sensor - if the level of water in the switch tank reaches a high point, the water pump will start so that water can be removed from Low sensor the tank, thus lowering the level switch - when the water level reaches a low point, the PumpAddapted From Programmable Logicpump will stop motor ENGG3490: Mechatronics W07. Controllers By F. D. Petruzella, McGraw-Hill 70

35

PLC Water Level Program


Pump running Low level High level The program for this process is designed to control the level of water in a storage tank by turning a discharge pump on and off. Modes of Operation High sensor switch Status Indicating Lights: - water pump running light (green) - low water level status light (red) - high water level status light (yellow)
71

Low sensor switch Pump motor

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

PLC Water Level Program

OFF /Man Positions ( water at a low level)

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

72

36

PLC Water Level Program

Manual Mode ( water between high and low levels)


ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 73

PLC Water Level Program

Automatic Mode ( water at high level)

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

74

37

Sequential Control Process


Sequential controls are required for processes that demand certain operations to be performed in specific order.
Filling operation Capping operation

Bottle movement In this filling and capping operation, the tasks are: (1) fill bottle (2) press on cap These W07. Addapted From Programmable Logic Controllers By proper order. ENGG3490: Mechatronicstasks must be performed in the F. D. Petruzella, McGraw-Hill

75

Combination Control Process


Combination control processes require that operations be performed without regard to the order in which they are performed.
Labeling process Label solenoid 1 Label solenoid 2

In this labeling operation, the tasks are: (1) place label 1 on bottle (2) place label 2 on bottle The order in which the tasks are preformed does not really matter.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 76

38

Automatic Control
Automatic control involves maintaining a desired set-point.
Automatic furnace temperature p control

Furnace

PLC

Touch screen interface

In this operation the set-point is selected by means of the touch screen interface. If there is a deviation from that set point, an error is determined by comparing the output against the t i t d i this th set point and using thi error t make a to k correction. This requires some form of feedback from the output back to the control for the input.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

77

Hardwired Sequential Process


The sequential task is as follows: 1. Start button is pressed. 2. Table motor is started. 3. Package moves to the limit switch and stops. p Auxiliary Features: An emergency stop button that will stop the table, for any reason, before the package reaches the limit switch position A red pilot light to indicate the table has stopped A green pilot light to indicate the table is running Motor

STOP Package

RUN

Limit switch (LS1) Emergency STOP Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

START

ENGG3490: Mechatronics W07.

78

39

Hardwired Sequential Process

2 3 4

Summary of the control task: Start button is actuated. CR1-1 closes to seal in CR1 CR1-2 opens, switching the Emergency red stop pilot light off Start Stop CR1-3 closes, switching the PB1 PB2 CR1 g green run pilot light on p g CR1-4 closes to energize the motor starter and motor LS1 The package moves to the limit switch to actuate it and CR1-1 STOP de-energize coil CR1 R CR1-1 opens to open the seal-in contact CR1-2 RUN CR1 2 closes, switching the CR1-2 l it hi th G red pilot light on CR1-3 CR1-3 opens, switching the green pilot light off M CR1-4 opens to de-energize OL CR1-4 the starter coil, stop the ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. motor, and end the sequence D. Petruzella, McGraw-Hill 79

Programmed Sequential Process

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

80

40

Arranging Instructions for Optimum Performance


There is more than one way to correctly implement the ladder logic. In some cases one arrangement may be more efficient in terms of the amount of memory used and th ti d d the time required t scan th program. i d to the
Sequence series instructions from the most likely to be FALSE (far left) to least likely to be FALSE (far right) Instruction MOST likely to be FALSE Instruction LEAST likely to be FALSE

Once a processor sees a FALSE input instruction in series, it executes the remaining instructions FALSE, even if they are TRUE
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

81

Arranging Instructions for Optimum Performance


If your rung contains parallel branches, place the path that is most often TRUE on the top. The processor will not look at the others unless the top p p path is FALSE.

Path most likely to be TRUE

LESS likely

LEAST likely

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

82

41

Writing a Program from a Narrative Description


Description : A simple drilling operation requires the drill press to turn on only if there is a part present and the operator has one hand on each of the start switches. This precaution will ensure that the operator's hands are not in the way of the drill. PB1 Drill motor Switches PB2

Part sensor
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 83

Writing a Program from a Narrative Description


Description : A simple drilling operation requires the drill press to turn on only if there is a part present and the operator has one hand on each of the start switches. This precaution will ensure that the operator's hands are not in the way of the drill.

PB1 and PB2 and the part sensor must be activated to make the drill motor operate.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

84

42

Example: Motorized Overhead Garage Door

A motorized overhead garage door is to be operated automatically to preset open and closed pos t o s positions. Devices used: see next slides Solution: sequence of operations

when the up button is pushed, the up motor contactor energizes and the door travels upwards until the up limit switch is actuated; When the down button is pushed, the down motor contactor energizes and th d t t i d the door t travels d l down until the til th down limit switch is actuated; when the stop button is pushed, the motor stops. The motor must be stopped before it can change direction
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 85

Motorized Door Program


Description : A motorized overhead garage door is to be operated automatically to preset open and closed positions.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

86

43

Motorized Door Program

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

87

Example: Continuous Filling Operation

A continuous filling operation requires boxes moving on a conveyor to be automatically pos t o ed and ed Solution: positioned a d filled. So ut o

start the conveyor when the START button is momentarily pressed; stop the conveyor when the STOP button is momentarily pressed; energize the RUN status light when the process is operating; energize the STANDBY status light when the process is stopped; stop the conveyor and energize the STANDBY light when the right edge of the box is first sensed by the photosensor; with the box in position and the conveyor stopped open stopped, the solenoid valve and allow the box to be fill; filling should stop when the LEVEL sensor goes true; energize FULL light when the box is full; the FULL should remain energized until the box is moved clear of the photosensor.
ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill 88

44

Continuous Filling Operation Program


Description : A continuous filling operation requires boxes moving on a conveyor to be automatically positioned and filled. Hooper PL PL Solenoid Level switch PL Run Standby Full

Motor

Photo switch START STOP

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

89

Continuous Filling Operation Program

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

90

45

Assignments

Chapter 6 (PLC) book: Problems See PLC-Problem-Set1 pdf file on the course PLC Problem Set1 web page.

ENGG3490: Mechatronics W07. Addapted From Programmable Logic Controllers By F. D. Petruzella, McGraw-Hill

91

46

Potrebbero piacerti anche