relay ladder logic

Upload: santiago-roque

Post on 09-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 relay ladder logic

    1/8

    relay ladder logic

    The Basics of Ladder Logic

    Ladder logic is the basis of most control functions

    Ladder logic uses switch or relay contacts to implement Booleanexpressions. In years past, ladder logic was made possible withdiscrete relays and was sometimes termed relay logic. Todaymost implementations are done using a specializedmicroprocessor-based device called a programmable logiccontroller (PLC). Although the means of implementation havechanged over the years, the basic concepts remain the same.

    Logical functions.When studying logic,one must begin with thebasic functions. Inputvalues can be combined using the logical AND, OR, and exclusiveOR (XOR) functions (Fig. 1 at right). Logic gates use digitalelectronics to implement these functions. Each gate is actually acircuit, typically consisting of transistors and biasing resistors. Asan example, the transistor-transistor logic (TTL) 7408 chipcontains four, two-input AND gates in one integrated circuit (IC)package. These gates and other types on separate ICs can bewired together to implement a wide array of digital logic.

    In the case of ladder logic, logic functions are implemented bydeveloping a ladder diagram. Named for its resemblance to aladder, the diagram consists of two vertical rails connected byseveral horizontal rungs. Each rail is energized at a differentvoltage, and each rung contains at least one element, such as a

    relay coil or an indicator lamp, across which voltage can drop. In aladder circuit, normally open (type-A) and normally closed (type-B) contacts are interconnected so as to implement the logicalfunctions. Connecting two contacts in series implements an ANDfunction, since the first and second contacts must both be closedto complete the circuit. Connecting the same two contacts inparallel implements a logical OR, since at least one contact mustbe closed to complete the circuit. An XOR implementation for twoinputs, which is actually [(A AND B') OR (A' AND B)] where the

  • 8/7/2019 relay ladder logic

    2/8

    prime mark indicates a logical NOT or inversion, requires a type-Aand a type-B contact for both inputs.

    A relay coil, whether it's a discrete device or a virtual device

    mimicked by PLC software, controls one or more sets of contacts.When a relay coil is energized or picked up, its type-A contactsclose and its type-B contacts open. Conversely, when the coil isde-energized or dropped out, its contacts return to their normalstate.

    Seal-infunction. Manytimes,

    momentarypushbuttonsare used toprovide userinput to acontrol circuit. If such a switch is used as a start pushbutton for amotor, the switch must be sealed-in so the motor doesn't stopwhen the pushbutton is released. This requires a path to developaround the switch so current can continue to flow after the switch

    contacts open. The seal-in function can be provided with a relaycoil and a single set of type-A contacts as shown in the dashedbox in Fig. 2. When the start button is pushed, the SI relay picksup and its type-A contacts close, providing a current path after thestart pushbutton is released.

    Other functions.

    A variety of specialized input devices, such as temperaturesensors, pressure switches, position indicators, and flow switches,can provide input to the ladder logic circuit. Devices like timersand counters can also be added to make more complex logicpossible. Fig. 2 shows a simple motor control circuit that will onlyallow the motor to start and remain running when its lube oilpump is running, at least one valve is open, and no alarms exist.Pressing the stop button drops out the SI coil, stopping the motor.Indicator lamps red for running, green for stopped can alsobe used. This basic control circuit forms the basis for much morecomplex control circuits.

  • 8/7/2019 relay ladder logic

    3/8

    Ladder LogicBasicsTips for learning the symbolic language of motor control

    A specialized segment of the electrical construction andmaintenance industry, AC motor control is an area that requires

    specific knowledge in order to troubleshoot motors effectively andensure smooth operations. This means gaining a clearunderstanding of ladder diagrams and ladder logic, which enablethe automation that drives motors. The combination of inputdevices that either manually or automatically sense a condition and the corresponding change in condition performed by theoutput device make up the core of motor control. Let's take acloser look at what's involved in learning the symbolic language ofmotor control.

    First, it's important to discuss the term logic for a moment. In thestudy of digital electronics, devices are used that operate in eitheran ON or OFF state. A specialized branch of mathematics calledBoolean algebra analyzes this relationship with two numbers: azero (representing the OFF state) or a one (representing the ONstate). These two numbers comprise the binary number system.

    The most common logic functions are the AND, OR, and NOT

    functions. Think of a single-pole light switch in your home thatcontrols a 100W light bulb. The switch can either be off or on,thereby representing a zero in the off state and a one in the onstate. Now imagine placing two single-pole switches in series tocontrol the same 100W light bulb. In this condition, switch No. 1and switch No. 2 have to both be on to light the 100W bulb. Thisis an example of an AND operation. Figure 1 represents the ANDcircuit just mentioned. Logic relates to ladder diagrams becauseinput functions in series constitute an AND operation, while input

    functions in parallel constitute an OR operation.

  • 8/7/2019 relay ladder logic

    4/8

    Fig. 1. Switch S1 and S2 must both be closed for the light tocome on.You will encounter two types of ladder diagrams: the 2-wire

    control circuit and the 3-wire control circuit. The 2-wire controlcircuit is shown in Fig. 2. This circuit is used to start a motor forsome industrial process. The components in a 2-wire controlcircuit are a maintained contact switching device (S1), a relay coil(M1), and the thermal overload relay contact (OL). The sequenceof operations is fairly simple. When S1 is closed, the coil ofmagnetic motor starter M1 is energized and the motor starts,provided the running overload current is within the values of theoverload relay OL. To stop the motor, S1 is simply opened.

    Fig. 2. Typical 2-wire control circuit for starting a motor.A 3-wire control circuit is shown in Fig. 3. Again, this circuit isused to start a motor for some industrial process. Thecomponents in a 3-wire control circuit are a momentarypushbutton (STOP), a momentary pushbutton (START), anormally open relay contact (M1), a relay coil (M1), and the thermaloverload relay contact (OL). The sequence of operations here is alittle more complex. When the start button is pressed, the coil ofmagnetic motor starter M1 is energized and the motor starts,

    provided the running overload current is within the values of theoverload relay OL. However, there is one very important

  • 8/7/2019 relay ladder logic

    5/8

    difference: A normally open contact of magnetic motor starter M1seals around the start button to latch the circuit. To stop themotor, the STOP button is pressed, which, in turn, breaks thelatch and de-energizes the coil of magnetic motor starter M1,

    stopping the motor.

    Fig. 3. Typical 3-wire control circuit for starting a motor (M1).What components make up a full-blown ladder diagram? Thereare several types of input and output devices. For the purpose ofthis article, we will focus on conventional electromechanicaldevices. See Fig. 4 for a list of common symbols used in ladderdiagrams and motor control circuits.

    Fig. 4. Common symbols used in ladder diagrams and motorcontrol circuits.Input devices can first be classified as momentary contact andmaintained contact devices. Momentary contact devices arespring-loaded and are classified as normally open and normally

    closed devices. The designation normally refers to the state ofthe device in its resting position when no external stimulus is

  • 8/7/2019 relay ladder logic

    6/8

    acting upon it. The contact arrangement of switching devices canalso be classified as SPST, SPDT, DPST, DPDT, 3PDT, etc. Thefirst two letters refer to the number of poles, and the last twoletters refer to the number of throws. For example, SPST refers

    to a single-pole, single-throw contact while 3PDT refers to a 3-pole, double-throw contact. A fractional manual motor starteruseful for single-phase motors (1 hp and lower) can either be anSPST for 120V applications or DPST for 240V applications. Agreen start button is an example of a normally open momentarypushbutton, while a red stop button is an example of a normallyclosed momentary pushbutton.

    Maintained contact devices are not spring-loaded. Instead, they

    remain in either an ON or OFF state. They can also be classifiedas normally open and normally closed. An emergency stop is anexample of a maintained contact device.

    Temperature-sensing devices commonly used in motor controlapplications are thermostats and thermocouples. A thermostatrelies on the thermal expansion/contraction of a bimetal, while athermocouple relies on a principle known as the Seebeck effect.Two dissimilar metal wires are joined together in a loop with one

    end being the hot junction; the other being the cold junction. Adifference of potential is generated in the loop in response totemperature change. Each of these devices sense temperaturechange and then presents a contact closure for use in a controlcircuit.

    Motion-sensing devices commonly used are photoelectric controlsand proximity controls. Early versions of photoelectric controlshad an incandescent lamp transmitter and a cadmium sulfide

    photocell receiver. Modern versions of the photoelectric controlhave pulsed infrared transmitters and solid-state photo-detectorreceivers. They work on the principle of beam interruption tosense motion and then present a contact closure to the controlcircuit.

    Proximity controls sense motion when an object passes by thesensing target on the device. They can detect metallic as well asnon-metallic objects. They operate on the principles of magnetismand capacitance, and then present a contact closure to the controlcircuit.

  • 8/7/2019 relay ladder logic

    7/8

  • 8/7/2019 relay ladder logic

    8/8

    delay, and repeat cycle delay. Time delay relays are used fortiming in a control circuit.

    Pilot indicating lights are used to provide visual indication of a

    function or to verify that a certain operation is either on or off.Audible sounding devices are used to indicate trouble with aprocess or alert the user to a particular situation.

    Now that you've been introduced to the more common input andoutput devices that make up a ladder diagram, next time we'llexplore in more depth how 2- and 3- wire control circuits tie thecontrol circuit with ladder diagrams into motor operation. Look forthe next installment of Motor Facts in the June 2007 issue.