You are on page 1of 44

Kinds of PLC

1) Compact (Fixed) PLC

2) Modular PLC
(Siemens 300,ABB 500 & AB SLC 500)

3) PC Based Controllers
(Siemens WinAC)

J.arumugam PC 104 2
Compact (Fixed IO) PLC

J.arumugam PC 104 3
Modular IO PLC (AB SLC 500 series)

J.arumugam PC 104 4
PC Based Controllers

J.arumugam PC - 104 5
PC Based Controllers

J.arumugam PC - 100 6
Companies Makes PLC

• Siemens •Modicon
• AB •Mitsubishi
• ABB
•Omron
• Honeywell
• Keyence •Messung
• Ge-Fanuc - etc.,

J.arumugam PC 104 7
PLC Hardware

1) Power Supply
2) CPU
3) Memory
4) I /O Modules

J.arumugam PC - 100 8
Architecture of a PLC

J.arumugam PC 104 9
Cyclic Execution (Scan Cycle)

J.arumugam PC 104 10
Cyclic Execution (Scan Cycle)

1. Reading the inputs


(Input image table)

2. Executing the program

3. Processing any
communication requests

4. Executing the CPU self-


test diagnostics

5. Writing to the outputs


(Output image table)

J.arumugam PC - 100 11
J.arumugam PC 104 12
Block Diagram of PLC

J.arumugam PC - 100 13
AB Instruction Sets
1) Bit Instructions
2) Timer and Counter Instructions
3) MOVE and Logical Instructions
4) Comparison Instructions
5) Math Instructions
6) Control Instructions
7) PID Instruction

J.arumugam PC - 100 14
AB Instruction Sets cont..
8) Communication Instructions
9) ASCII Instructions
10) I/O Instructions

11) File Instructions

12) Sequencer Instructions

13) Bit Shift FIFO and LIFO Instructions

J.arumugam PC - 100 15
Bit - Instructions
1) Examine if Closed (XIC)
(Normally Open)

J.arumugam PC - 100 16
Bit – Instructions cont..
2) Examine if Open (XIO)
(Normally Closed)

J.arumugam PC - 100 17
Bit – Instructions cont..
3) Output Energize ( OTE )

Use the OTE instruction in your ladder program to turn on a bit when rung
conditions are evaluated as true.

J.arumugam PC - 100 18
Bit – Instructions cont..
4) Output Latch ( OTL )

5) Output Unlatch ( OTU )

 OTL and OTU are retentive output instructions.


 OTL can only turn on a bit, while OTU can only turn off a bit.
 These instructions are usually used in pairs, with both instructions
addressing the same bit.

J.arumugam PC - 100 19
Bit – Instructions cont..
6) One – Shot Rising ( OSR )

The OSR instruction is a retentive input instruction that


triggers an event to occur one time.

After one scan is complete, the OSR instruction becomes


false, even if the rung conditions preceding it remain true.

J.arumugam PC - 100 20
Lab Exercise

1) Write the truth table for the following GATEs and check the output using LADDER
program

a) NAND b) NOR c) XOR

2) Write the output table for the following circuit and verify the output using LADDER
program.

A
OR
B
AND E
C
OR
D

J.arumugam PC - 100 21
SLC 500 - Memory Organization

• Output Image (O)


• Input Image (I)
• Status (S)
Data or Storage • BIT (B)
memory
• Timer (T)
• Counter (C)
• etc…
User or Program
memory
• System program
• Reserved
• Main Ladder
• Subroutine

J.arumugam PC - 100 22
SLC 500 Data files

Data File File No. Identifier


Output 0 O
Input 1 I
Status 2 S
Bit 3 B
Timer 4 T
Counter 5 C
Control 6 R
Integer 7 N
Float 8 F
User defined file 9 - 255

J.arumugam PC - 100 23
SLC 500 Program files
Program File File No. Function

System 0 Used to Information about


Program file Processor & I/O Configuration.

Reserved file 1 Reserved for Internal use of the


processor and is not user
accessible
Main Ladder 2 Stores the Instruction entered by
the user that controller operation

Subroutine 3 - 255 Store any subroutines


Ladder
Program

J.arumugam PC - 100 24
Timer instruction
1) On Delay Timer ( TON ) 2) Off Delay Timer ( TOF )
TON TOF
Timer On Delay ( EN ) Timer Off Delay ( EN )
Timer T4:0 Timer T4:0
Time Base 1.0 ( DN ) Time Base 1.0 ( DN )
Preset 20 Preset 20
Accum 0 Accum 0

3) Retentive Timer ( RTO ) Reset ( RES )


RTO ( RES )
Retentive Timer On ( EN )
Timer T4:0
Time Base 1.0
( DN )
Preset 20
Accum 0
J.arumugam PC - 100 25
Timer Instruction
Timer Addressing (T4:0 to 255) TON
Example: Timer On Delay ( EN )
Timer T4:0
T4 : 2 Time Base 1.0 ( DN )
Preset 20
File Type Timer Number Accum 0

File Number
Timers are 3-word elements
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Word 0 EN TT DN INTERNAL USE

Word 1 PRESET VALUE (16 BITS)

Word 2 ACCUMULATED VALUE (16 BITS)

15 Bit – Enable, Word 1 – Preset Value (Integer)


14 Bit – Timer timing
13 Bit - Done Word 2 – Accumulated Value (Integer)
J.arumugam PC - 100 26
Timer Instruction cont'

Note:

 For Fixed and SLC 5/01 processors, the TIME BASE is set 0.01
seconds

 For SLC 5/02, 5/03, 5/04 and SLC 5/05 processors, the TIME BASE
is SELECTABLE as 0.01 second or 1.0 seconds

 Preset and accumulated values for TIMER range 0 to 32767

 If enter Negative values, a RUNTIME error occur

J.arumugam PC - 100 27
Counter instruction

1) Count Up ( CTU ) 2) Count Down ( CTD )

CTU CTD
COUNT UP ( CU ) COUNT DOWN ( CD )
Counter C5:0 Counter C5:0
Preset 20 ( DN ) Preset 20 ( DN )
Accum 0 Accum 0

Reset ( RES )

( RES )

J.arumugam PC - 100 28
Counter instruction cont'
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Word 0 CU CD DN OV UN INTERNAL USE

Word 1 PRESET VALUE (16 BITS)

Word 2 ACCUMULATED VALUE (16 BITS)

-32,768 0 +32,767

(CTU)
Count Up
Counter Accumulated Value
(CTD)
Count Dowzn
Under Flow Over Flow
J.arumugam PC - 100 29
Move Instruction

MOV

MOVE
Source N7:1
Destination N7:10

• Source can be ADDRESS or CONSTANT

• Destination must be a WORD ADDRESS

J.arumugam PC - 100 30
Comparison Instruction
1) Equal ( EQU ) EQU
EQUAL
Source A

Source B

NEQ
Not Equal
2) Not Equal ( NEQ ) Source A

Source B

Entering Parameters :

• You MUST enter a word address for Source A

• You can enter a Program Constant or Address for Source B

J.arumugam PC - 100 31
Comparison Instruction cont'
LES
LESS THAN
3) Less Than ( LES ) Source A

Source B

LEQ
Less Than or Equal
4) Less Than or Equal ( LEQ ) Source A

Source B

GRT
Greater Than
5) Greater Than ( GRT ) Source A

Source B

GEQ
Less Than or Equal
6) Greater Than or Equal Source A
( GEQ )
Source B

J.arumugam PC - 100 32
Comparison Instruction cont'
7) LIMIT TEST ( LIM )

LIMIT TEST
Low Limit

Test

High Limit

Entering Parameters

• If the TEST parameter is a program CONSTANT both the LOW LIMIT and
HIGH LIMIT parameters must be word ADDRESS

• If the TEST parameter is a word ADDRESS, the LOW LIMIT and HIGH LIMIT
Parameters can be either a program CONSTANT or a word ADDRESS

J.arumugam PC - 100 33
Scale Data (SCL)

Entering Parameters
 The value for the following parameters is between -32,768 to 32,767.
 Source can be either a constant or a word address.
 Rate (or slope) is the positive or negative value you enter divided by
10,000. It can be either a constant or a word address.
 Offset can be either a constant or a word address.

j arumugam PC - 100 34
Converting 4 to 20 mA Analog Input

Scaled value (Y) = (Input Value X Rate) + Offset

Rate (m) = (Scaled MAX - Scaled MIN) / (Input MAX - Input MIN)

Offset (C) = Scaled MIN - (Input MIN X Rate)


j arumugam PC - 100 35
Scale with Parameters (SCP)

j arumugam PC - 100 36
ADD, SUB, MUL & DIV

j arumugam PC - 100 37
Compute (CPT)

Entering Parameters
 Destination can be a word address or the address of a floating-point
data element.
 Expression is zero or more lines, with up to 28 characters per line, up
to 255 characters.

Instructions that can be used in the Expression include:


+, -, *, l (DIV), SQR, - (NEG), NOT, XOR, OR, AND, TOD, FRD, LN, TAN, ABS,
DEG, RAD, SIN, COS, ATN, ASN, ACS, LOG, and ** (XPY).
j arumugam PC - 100 38
Masked Move (MVM)

Entering Parameters
 Source is the address of the data you want to move.
 Mask is the address of the mask through which the instruction
moves data; the mask can also be a hexadecimal value (constant).
 Destination is the address where the instruction moves the data.

j arumugam PC - 100 39
Masked Comparison for Equal (MEQ)

Entering Parameters
 Source is the address of the value you want
to compare.
 Mask is the address of the mask through
which the instruction moves data. The mask
can also be a hexadecimal value(constant).
 Compare is an integer value or the address
of the reference.

j arumugam PC - 100 40
Copy file (COP)

The COP instruction copies data from the source


file to the destination file

#N7:0
#N7:10

j arumugam PC - 100 41
Fill File (FLL)
The FLL instruction loads a source value into
each position in the destination file.

#N7:10
100
5

j arumugam PC - 100 42
Sequencer Output (SQO)

File is the address of the sequencer file. You must use the file indicator (#) for this address.

The address assigned for a sequencer file is step zero. Sequencer instructions use
length + 1 word of data table files for each file referenced in the instruction.

J.arumugam PC - 100 43
How the SQO instruction works?

J.arumugam PC - 100 44

You might also like