By: Sanjeev Gupta, Dr. Sanjiv Kumar
ISBN: 978–93–95179–41–6
DESCRIPTION
Table of Content
1. INTRODUCTION TO PLC .................................................................................1–10
1.1 Introduction to PLC
1.2 Limitation of Relays
1.3 Concept of PLC
1.4 Building Blocks of PLC and Their Functions
1.5 Advantages of PLC
1.6 PLC Programming Languages
1.7 Applications of PLC
1.8 PLC Manufactures
Exercise
2. WORKING OF PLC ......................................................................................... 11–30
2.1 PLC Architecture
2.1.1 Central Processing Unit (CPU)
2.1.2 PLC Memory
2.1.3 Input/Output Modules
2.1.4 Programmer/Monitor
2.1.5 Power Supply
2.1.6 Racks and Chassis
2.2 Module Addressing
2.3 PLC Registers
2.4 PLC Operation
2.4.1 Input Scan
2.4.2 Program Scan
2.4.3 Output Scan
2.5 I/O Modules Selection Criteria
2.6 Interfacing I/O Devices with PLC I/O Modules
Exercise
3. INSTRUCTION SET ......................................................................................... 31–79
3.1 Ladder Diagram
3.2 Ladder Program Execution
3.3 Basic Instructions
3.3.1 Bit Instructions
3.4 Examine if Closed (XIC)
3.5 Examine if Open (XIO)
3.6 Output Energize (OTE)
3.7 Ladder Diagram for Boolean Logic of Inputs
3.7.1 AND Combinations
3.7.2 OR Combinations
3.7.3 NAND Combination
3.7.4 NOR Combination
3.7.5 XOR Combination
3.7.6 XNOR Combination
3.8 Tips for Writing Ladder Diagram
3.9 Output Latch (OTL) and Output Unlatch (OTU)
3.10 Self Holding Relays
3.11 One Shot
3.12 One-Shot Rising (OSR)
3.13 Timers
3.13.1 ON-Delay Timers
3.13.2 Off-delay timers
3.13.3 Non-Retentive Timers
3.13.4 Retentive Timers
3.13.5 Timer Instructions Parameter
3.14 Timer Instructions
3.14.1 Timer ON-Delay (TON) Instruction
3.14.2 Timer OFF-Delay Instruction (TOF)
3.14.3 Retentive Timer (RTO) Instruction
3.14.4 Cascading of Timers
3.15 Counters
3.15.1 UP-Counters
3.15.2 Down-Counters
3.15.3 Up-Down Counters
3.15.4 Counter Instruction Parameters
3.16 Counter Instructions
3.16.1 Count-UP (CTU) Instruction
3.16.2 Count-Down (CTD) Instruction
3.16.3 High Speed Counter (HSC) Instruction
3.17 Reset (RES) Instruction
3.18 Master Control Relay (MCR) Instruction
3.19 Zone Control Last-State Instruction (ZCL)
3.20 Comparison Instructions
3.20.1 Equal (EQU) Instruction
3.20.2 Not Equal (NEQ) Instruction
3.20.3 Less Than (LES) Instruction
3.20.4 Less Than or Equal (LEQ) Instruction
3.20.5 Greater Than (GRT) Instruction
3.20.6 Greater Than or Equal (GEQ) Instruction
3.20.7 Limit Test (LIM) Instruction
3.20.8 Masked Comparison for Equal (MEQ) Instruction
3.21 Math instructions
3.21.1 Add Instruction
3.21.2 Subtract (SUB) Instruction
3.21.3 Multiply (MUL) Instruction
3.21.4 Divide (DIV) Instruction
3.21.5 Clear (CLR) Instruction
3.21.6 Square Root (SQR) Instruction
3.22 PLC Repetitive Clock (Oscillator)
3.23 Boolean Instructions
3.23.1 OR Instruction
3.23.2 AND Instruction
3.23.3 Exclusive OR (XOR) Instruction
3.23.4 Not (NOT) Instruction
3.24 Sequencers
3.24.1 Time-Driven Sequencer
3.24.2 Event-Driven Sequencer
3.24.3 Sequencer Instruction Parameters
3.25 Sequencer Instructions
3.25.1 Sequencer Output (SQO) Instruction
3.25.2 Sequencer Compare (SQC) Instruction
3.25.3 Sequencer Load (SQL) Instruction
3.26 Shift Registers Instructions
3.26.1 Bit Shift Instructions Parameters
3.26.2 Bit Shift Left (BSL) Instruction
3.26.3 Bit Shift Right (BSR) Instruction
3.27 Data Handling Instructions
3.27.1 Convert to BCD (TOD) Instruction
3.27.2 Convert From BCD (FRD) Instruction
3.27.3 Convert From Radians to Degrees (DEG) Instruction
3.27.4 Convert From Degrees to Radians (RAD) Instruction
3.27.5 Decode 4 to 1 OF 16 (DCD) Instruction
3.27.6 Encode 1 of 16 TO 4 (ENC) Instruction
3.27.7 Copy File (COP) Instruction
3.27.8 Move (MOV) Instruction
3.27.9 Masked Move (MVM) Instruction
3.28 Real Time Clock (RTC) Function
Exercise
4. LADDER DIAGRAM PROGRAMMING .......................................................... 80–97
Exercise
5. APPLICATIONS OF PLCs .............................................................................. 98–132
5.1 Doorbell Operation
5.2 Lighting Control
5.3 Dishwasher
5.4 Traffic Lights System
5.5 Two-Axis Pick-and-Place Robot
5.6 Packing Process Control
5.7 Sorting of Objects
5.8 Car Parking
5.9 Motor Forward and Reverse Direction Control
5.10 DOL Starter
5.11 Star-Delta Starter
5.12 Motor Sequence Control
5.13 Stepper Motor Control
5.14 Elevator Control
5.15 Filling of Bottles
5.16 Microwave Oven
5.17 Washing Machine
5.18 Room Automation
Exercise
6. MICRO CONTROLLER SERIES (MCS)-8051 OVERVIEW ............................. 133–154
6.1 Microprocessors and Microcontrollers
6.1.1 Microprocessor
6.1.2 Microcontrollers
6.2 Overview of 8051 Family
6.2.1 CISC and RISC Technology
6.3 Architecture of 8051 Microcontroller
6.3.1 Program Counter and Data Pointer
6.3.2 Program Status Word (PSW)
6.3.3 Stack Pointer (SP)
6.3.4 Registers A and B
6.3.5 Internal ROM
6.3.6 Internal RAM
6.3.7 Counter/Timers
6.3.8 Input-Output Ports P0-P3
6.3.9 Special Function Registers (SFR)
6.4 8051 Pin Details
6.5 I/O Port Structure
6.6 8051 Memory Organisation
6.6.1 Data Memory
6.6.2 Program Memory
Exercise
7. 8051 INSTRUCTION SET ............................................................................ 155–187
7.1 Data Transfer Instructions
7.1.1 MOV Instruction
7.1.2 Addressing Modes
7.1.3 Register Addressing Mode
7.1.4 Immediate Addressing Mode
7.1.5 Direct Addressing Mode
7.1.6 Register Indirect Addressing Mode
7.1.7 Indexed Addressing Mode
7.1.8 MOVX Instruction
7.1.9 MOVC Instruction
7.1.10 PUSH and POP Instructions
7.1.11 XCH and XCHD Instructions
7.2 Arithmetic Instructions
7.2.1 Signed and Unsigned Numbers
7.2.2 ADD Instruction
7.2.3 ADDC Instruction
7.2.4 SUBB A, Source Byte Instruction
7.2.5 INC byte Instruction
7.2.6 DEC Byte Instruction
7.2.7 MUL AB Instruction
7.2.8 DIV AB Instruction
7.2.9 DAA Instruction
7.3 Logical Instructions
7.3.1 ANL destination, Source Instruction
7.3.2 ORL destination, Source Instruction
7.3.3 XRL Destination, Source Instruction
7.3.4 RR A Instruction
7.3.5 RRC A Instruction
7.3.6 RL A Instruction
7.3.7 RLC A Instruction
7.3.8 SWAP A Instruction
7.3.9 CLR A Instruction
7.3.10 CPL A Instruction
7.4 Boolean Instructions
7.4.1 CLR C Instruction
7.4.2 CLR Bit Instruction
7.4.3 CPL C Instruction
7.4.4 CPL Bit Instruction
7.4.5 SETB C Instruction
7.4.6 SETB Bit instruction
7.4.7 ANL C, Bit Instruction
7.4.8 ANL C,/Bit Instruction
7.4.9 ORL C, Bit Instruction
7.4.10 ORL C, /Bit Instruction
7.4.11 MOV destination bit, source bit Instruction
7.5 Program Branching Instructions
7.5.1 JC radd Instruction
7.5.2 JNC radd Instruction
7.5.3 JB bit, radd Instruction
7.5.4 JNB bit, radd Instruction
7.5.5 JBC bit, radd Instruction
7.5.6 JZ radd Instruction
7.5.7 JNZ radd Instruction
7.5.8 CJNE destination, source, radd Instruction
7.5.9 DJNZ destination, radd Instruction
7.5.10 JMP @ A + DPTR Instruction
7.5.11 AJMP sadd Instruction
7.5.12 LJMP Ladd Instruction
7.5.13 SJMP radd Instruction
7.5.14 ACALL sadd (11 Bit) Instruction
7.5.15 LCALL ladd (16 Bit) Instruction
7.5.16 RET Instruction
7.5.17 NOP Instruction
7.5.18 RETI Instruction
Exercise
8. TIMER, SERIAL PORT AND INTERRUPTS .................................................. 188–214
8.1 Timer/Counter
8.2 Timer Mode Control (TMOD) SFR
8.3 Timer Control (TCON) SFR
8.4 Timer Modes of Operation
8.4.1 Timer Mode 0 (13-Bit Timer Mode)
8.4.2 Timer mode 1 (16-Bit Timer Mode)
8.4.3 Timer Mode 2
8.4.4 Timer Mode 3
8.5 Steps to Program a Timer in a Mode
8.6 Serial Data Communication
8.7 8051 Serial Data Communication
8.8 SCON (Serial Control) SFR
8.9 Power Mode Control (PCON) SFR
8.10 Serial Data Transmission Modes
8.10.1 Serial Data Mode 0 - Shift Register Mode
8.10.2 Serial Data Mode1 : 8-Bit UART
8.10.3 Serial Data Mode 2 – 9-bit UART
8.10.4 Serial Data Mode 3 - 9-Bit UART with Variable Baud Rate
8.11 Steps to Program 8051 for Serial Data Transmission
8.12 Steps to Program 8051 for Receiving Data Serially
8.13 Multiprocessor Communication
8.14 Interrupts Vs Polling
8.15 Steps to Execute an Interrupt
8.16 Types of Interrupts
8.17 Interrupt Enable (IE) SFR
8.18 Interrupt Priority (IP) SFR
8.19 8051 Interrupts
8.19.1 Timer Flag Interrupts – TF0 and TF1
8.19.2 Serial Port Interrupt
8.19.3 External Interrupts INT0 and INT1
8.19.4 Reset
8.20 Interrupt Inside an Interrupt
8.21 Software Generated Interrupts
Exercise
9. 8051 ASSEMBLY LANGUAGE PROGRAMMING ...................................... 215– 234
9.1 Structure of Assembly Language Instruction
9.1.1 Label Field
9.1.2 Mnemonic and Operands Fields
9.1.3 Comment Field
9.2 Assembler Operations
9.2.1 HEX File Format
9.3 Assembler Directives
9.3.1 ORG (Origin) Directive
9.3.2 EQU (Equate) Directive
9.3.3 DB (Define Byte) Directive
9.3.4 DW (Define Word) Directive
9.3.5 End Directive
9.4 Numbers
9.5 Symbols
Exercise
10. DESIGN AND INTERFACE USING 8051..................................................... 235–263
10.1 Keyboard Interfacing
10.2 Interfacing 7-Segment Displays
10.3 Interfacing of Liquid Crystal Display (LCD)
10.3.1 LCD Pin Details
10.3.2 LCD Ram
10.3.3 LCD Instructions
10.3.4 LCD Connections
10.4 Analog to Digital Converter (ADC) Interface
10.5 Digital to Analog (DAC) Interface
10.6 Stepper Motor Interfacing
10.7 RTC Interface
10.8 A Simple Design Example
Exercise
© 2024 All Rights Reserved By ISHAN PUBLICATIONS | Developed & Maintained By Sai Tech Hub, Ambala