Você está na página 1de 20

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH

Name : K . Sambaiah
Designation : H.A.E.I.E.S
Branch : A.E.I.E
Institute : GMRP, KARIMNAGAR.
Semester : VI
Subject : Industrial Electronics, PLC and SCADA
Subject code : AEI-602
Topic : PLC Programming
Duration : 100 minutes
Sub topic : Ladder Programs Using Bit Instructions
Teaching aids : ppts, Diagrams

AEI602.55 TO 56 1
Objectives

On Completion of this topic you will be


able to know…

• Logical Instructions

• Program Control Instructions

AEI602.55 TO 56 2
Logical Instructions

• Logical instructions are output instructions.

• They read the values in certain source words


and based on the condition specified; specify a
value in a distance word

• Logical instructions can be used when need to


make certain decisions based on one or more
factors.

AEI602.55 TO 56 3
Logical Instructions…

• Similarly many other digital devices use PLC


logical gates for making decisions.

• These logical gates are specified by using


certain instructions in the ladder logic program.

AEI602.55 TO 56 4
Logical Instructions…

Allen Bradley PLCs supports the following four


logical instructions:

• AND
• OR
• NOT
• XOR

AEI602.55 TO 56 5
AND Instruction

AND
1:014/11 AND
Source A D5: 6
Source B D1O: 8
Destination D11: 7

FIG: AND Instruction Example

AEI602.55 TO 56 6
OR Instruction

• The OR instruction performs an OR operation.


Figure displays the block formatted instruction of
the OR instruction.

Inclus OR
Source A
Source B
Destination

FIG: OR Instruction
AEI602.55 TO 56 7
OR instruction…

EXAMPLE:
• Consider the instruction displayed in figure

OR
1:010/08 Source A D2 :4
Source D5:7
Destination D8;7

FIG: OR Instruction
AEI602.55 TO 56 8
OR instruction…

• In this example ,The rung condition is True of bit


08 of the i/p word 10 is 1.

• If the rung condition is true ,then the processor


performs an OR operation on D2 :4 and D5;7

• These two addresses are OR ed and the result


is stored in the destination address, D8;7 .

AEI602.55 TO 56 9
XOR Instruction

• The XOR instruction performs an exclusive OR


operation. The below figure displays the block format of
the XOR instruction
XOR
Exclus OR
Source A
Source B
Dest

Fig: XOR Instruction

AEI602.55 TO 56 10
XOR Instruction…

This instruction reads the values in the bits of 2


source words.
Example:
Consider the instruction displayed in below figure
XOR
1:08/13 XOR
Source A D8: 6
Source B D9: 7
Destination D11: 4

Fig: XOR instruction

AEI602.55 TO 56 11
XOR Instruction…

• In this example, the rung condition is True if bit 13 of the


input word 8 is 1.

• If the rung condition is True, then the processor performs


an XOR operation on D8: 6 & D9: 7.

• These 2 addresses are XORed & the result is stored in


the destination address, D11: 4.

AEI602.55 TO 56 12
NOT Instruction…

The not instruction performs an NOT operation. The


block format of the NOT instruction is displayed in figure

NOT

NOT
Source
Destination

Fig: NOT instruction.


AEI602.55 TO 56 13
NOT Instruction…

EXAMPLE
Consider the instruction displayed in figure
NOT
NOT

1:010/08 Source D6: 5


Destination D9: 3

Fig: NOT instruction example.

AEI602.55 TO 56 14
NOT Instruction…

• In this example the rung condition is true if bit 08


of the I/P word 10 is 1.

• If the rung condition is true then the processor


performs an NOT operation D6: 5 and D9: 3.

• These two addresses are oared and the result is


stored in the destination Address D8: 7.

AEI602.55 TO 56 15
Program Control Instructions

• Program control instructions control & change


the flow of a ladder program.

• These instructions can be categorized into the


following classes:
• Master control instructions
• Jumping instructions
• Sub routine instructions

AEI602.55 TO 56 16
Summary

We have discussed

• Logical Instructions

• Program Control Instructions

AEI602.55 TO 56 17
Quiz

2) What are the logical instructions.

a) AND
b) OR
c) NOT
d) XOR

Ans) all

AEI602.55 TO 56 18
Quiz

2) Logical instructions are


a) output instructions

b) Input instructions

c) Timer instructions

d) Counter instructions

Ans: a

AEI602.55 TO 56 19
Frequently Asked Questions

1. List the logical instructions and explain with


examples?

AEI602.55 TO 56 20

Você também pode gostar