Docsity

Ladder Language-Digital Logic Design And Programming-Lecture Slides, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Ladder Language-Digital Logic Design And Programming-Lecture Slides and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Programmable LogicControllersProgramming

Ladder Language^ ^ The programmable controller was developedfor ease of programming using existing relayladder symbols and expressions to representthe^ program^ logic

needed^ to^ control^

the machine or process.  The resulting programming language, whichused^ these^ original

basic^ relay^ ladder symbols, was given the name

ladder docsity.com

Ladder Language^ ^ The^ evolution^ of^ the^

original^ ladder^ language

has turned^ ladder^ programming

into^ a^ more^ powerful instruction set.  New functions have been added to the basic relay,timing, and counting operations.  The termfunction is used to describe instructionsthat,^ as^ the^ name^ implies,

perform^ a^ function^ on data—that is, handle and transfer data within theprogrammable controller.  These^ instructions^ are^

still^ based^ on^ the^ simple principles of basic relay logic, although they allowcomplex^ operations^ to

be^ implemented^ and performed.

Ladder Language^ ^ New additions to the basic ladder logic alsoinclude function blocks, which use a set ofinstructions to operate on a block of data.^ ^ The^ use^ of^ function

blocks^ increases^ the power of the basic ladder language, formingwhat^ is^ known^ as

enhanced^ ladder language.  A block or a functional instruction betweentwo contact symbols represents an enhancedfunctional block.

Ladder Diagram Format^ ^ The main functions of a ladder diagram program areto control outputs and perform functional operationsbased on input conditions.^ ^ Ladder^ diagrams^ use

rungs^ to^ accomplish^

this control.  In^ general,^ a^ rung^ consists

of^ a^ set^ of^ input conditions (represented by contact instructions) andan^ output^ instruction^

at^ the^ end^ of^ the^ rung (represented by a coil symbol).  The contact instructions for a rung may be referredto as input conditions, rung conditions, or the controllogic.

The Basic Structure OfA Ladder Rung.

Ladder Language^ ^ A ladder rung is TRUE (i.e., energizing an output or functionalinstruction (block) when it has logic continuity.^ ^ Logic continuity exists when power flows through the rung fromleft to right.^ ^ The execution of logic events that enable the output providethis continuity.^ ^ In a ladder rung, the left-most side (left power line) simulatesthe L1 line of a relay ladder diagram, while the right-most side(right power line) simulates the L2 line of the electromechanicalrepresentation.^ ^ Continuity occurs when a path between these two lines containscontact elements in a closed condition, allowing power to flowfrom left to right.^ ^ These contact elements either close or remain closed accordingto the status of their reference inputs.

Several Continuous Paths That Provide Continuity AndEnergize The Output Of The Rung.

Enhanced Functions Driven By Basic RelayLadder Instructions

Logic States^ ^ ON:TRUE, contact closure, energize, etc.OFF:FALSE, contact open ,

de-energize, etc.  Do not confuse the internal relay andprogram with the external switch and relay.  Internal symbols are used for programming.  External devices provide actual interface.

  • AND and OR LOGIC PB
    • R1PB2 R1 = PB1.AND.PB2 AND PB4PB3 R2R2 = PB2.AND.~PB4R1PB1 R1 = PB1 .OR. PB2 OR PB
  • COMBINED AND & OR R1 = PB1 .OR. (PB2 .AND. PB3) PB
    • R1 PB3PB

Enhanced Ladder Diagram^ ^ When a ladder diagram contains a functionalblock,^ contact^ instructions

are^ used^ to represent the input conditions that drive (orenable) the block’s logic.  A^ functional^ block^ can

have^ one^ or^ more enable inputs that control its operation.  In addition, it can have one or more outputcoils, which signify the status of the functionbeing performed.

Enhanced Ladder Diagram  To make a blockactive at all timeswithout any drivinglogic, the user canomit all contactlogic and place acontinuity line inthe block duringprogramming

Ladder Diagram Format  The ladder rung matrix determinesthe maximum^ number^ of^ laddercontact elements that can be usedto program a rung.  The size^ of^ this^ matrix^ differsamong^ both^ PLC^ manufacturersand the programming devices used(CRT screens^ versus^ miniprogrammers).  For functional block operations, aladder^ matrix^ may^ have^ lessavailable^ ladder^ contact^ elementsbecause^ the^ functional^ blockinstruction display takes up roomin the matrix.