0% found this document useful (0 votes)
40 views23 pages

Understanding Basic Ladder Instructions

The document provides instructions on programming logic for an SLC 500 programmable logic controller using ladder logic. It covers basic math, comparison, and data movement instructions as well as examples of how to use timers to control outputs like motors. Advanced instructions like add, subtract, multiply, divide, and comparison operators are presented along with their syntax and function. Addressing of timers, preset values, and status bits like enable, timing and done are also explained using example ladder logic.

Uploaded by

JorgeLuisPérez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views23 pages

Understanding Basic Ladder Instructions

The document provides instructions on programming logic for an SLC 500 programmable logic controller using ladder logic. It covers basic math, comparison, and data movement instructions as well as examples of how to use timers to control outputs like motors. Advanced instructions like add, subtract, multiply, divide, and comparison operators are presented along with their syntax and function. Addressing of timers, preset values, and status bits like enable, timing and done are also explained using example ladder logic.

Uploaded by

JorgeLuisPérez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Rockwell

Automation
Hands-On
Seminar Series

02/24/97

SLC 500
BASIC LADDER
INSTRUCTIONS

2
02/24/97

Advanced Instructions
Math
Add
Subract
Multiply
Divide

Comparison
Greater Than
Less Than
Equal
Not Equal
Greater Than or Equal
Less Than or Equal

Data Movement
Move
Copy
Clear

3
02/24/97

Math Instructions - ADD


Source A + Source B = Dest
I:1

ADD
0

N7:0 10
N7:1

N7:2 15

ADD
Source A

N7:0

Source B

N7:1

Dest

N7:2

10 + 5 = 15

4
02/24/97

Math Instructions - ADD


Source A + Source B = Dest
I:1

ADD
0

N7:0

N7:1

N7:1

ADD
Source A

N7:0

Source B

N7:1

Dest

N7:1

1+5=6

Application: Running Total

5
02/24/97

Math Instructions - ADD


Source A + Source B = Dest
I:1

B3
0

N7:0

N7:1

N7:1

OSR

ADD
0

ADD
Source A

N7:0

Source B

N7:1

Dest

N7:1

1+5=6

Application: Running Total


NOTE: This instruction executes every scan that the
rung is true, therefore use a One-Shot OSR.
02/24/97

Math Instructions - SUBTRACT


Source A - Source B = Dest
I:1

SUB
0

N7:0 10
N7:1

N7:2

SUBTRACT
Source A

N7:0

Source B

N7:1

Dest

N7:2

10 - 5 = 5

7
02/24/97

Math Instructions - MULTIPLY


Source A x Source B = Dest
I:1

MUL
0

N7:0 10
N7:1

N7:2 50

MULTIPLY
Source A

N7:0

Source B

N7:1

Dest

N7:2

10 x 5 = 50

8
02/24/97

Math Instructions - DIVIDE


Source A Source B = Dest
I:1

DIV
0

N7:0 10
N7:1

N7:2

Math
Register

DIVIDE
Source A

N7:0

Source B

N7:1

Dest

N7:2

10 5 = 2
S:13

remainder

S:14

unrounded quotient
9

02/24/97

Math Instructions - DIVIDE


Source A Source B = Dest
I:1

DIV
0

N7:0 29
N7:1 10
N7:2
Math
Register

DIVIDE
Source A

N7:0

Source B

N7:1

Dest

N7:2

29 10 = 2.9

S:13

remainder

S:14

unrounded quotient
10

02/24/97

10

Comparison Instructions

>

IF Source A > Source B THEN TRUE ELSE FALSE


0:3

GTR
GREATER THAN
Source A
N7:0
Source B

N7:0 29

N7:1

( )0
29 > 10 TRUE
therefore Output is
Energized

N7:1 10

11
02/24/97

11

Comparison Instructions

<

IF Source A < Source B THEN TRUE ELSE FALSE


0:3

LES
LESS THAN
Source A

N7:0

Source B

N7:1

N7:0 29

( )0
29 < 10 FALSE
therefore Output is
de-Energized

N7:1 10

12
02/24/97

12

Comparison Instructions

IF Source A = Source B THEN TRUE ELSE FALSE


0:3

EQU
EQUAL
Source A

N7:0

Source B

N7:1

N7:0 29

( )0
29 = 10 FALSE
therefore Output is
de-Energized

N7:1 10

13
02/24/97

13

Comparison Instructions

IF Source A Source B THEN TRUE ELSE FALSE


0:3

NEQ
NOT EQUAL
Source A

N7:0

Source B

N7:1

N7:0 29

( )0
29 10 TRUE
therefore Output is
Energized

N7:1 10

14
02/24/97

14

Comparison Instructions

IF Source A Source B THEN TRUE ELSE FALSE


0:3

GEQ
GRTR THAN OR EQUAL
Source A
N7:0
Source B

N7:0 29

N7:1

( )0
29 10 TRUE
therefore Output is
Energized

N7:1 10

15
02/24/97

15

Comparison Instructions

IF Source A Source B THEN TRUE ELSE FALSE


0:3

LEQ
LESS THAN OR EQUAL
Source A
N7:0
Source B

N7:0 29

N7:1

( )0
29 10 FALSE
therefore Output is
de-Energized

N7:1 10

16
02/24/97

16

Data Movement - Move


Source
I:1

Dest
MOV

MOVE
Source

N7:0

Dest

N7:1

N7:0 50
N7:1 50

17
02/24/97

17

Data Movement - Copy


Source
I:1

COP
0

N7:0
N7:1
N7:2
N7:3
N7:4
N7:5
N7:6
N7:7
N7:8
02/24/97

Dest

10
20
30
40

10
20
30
40

COPY FILE
Source

#N7:0

Dest

#N7:5

Length

18

18

Data Movement - Clear


Zero
I:1

Dest
CLR
CLEAR
Dest

N7:1

N7:0 50
N7:1

19
02/24/97

19

Advanced Instructions

ANY QUESTIONS???
Math
Add
Subract
Multiply
Divide

Comparison
Greater Than
Less Than
Equal
Not Equal
Greater Than or Equal
Less Than or Equal

Data Movement
Move
Copy
Clear

20
02/24/97

20

Timer Addressing and Parameters


File Type

T4:0

Timers

File contains 256


timers

Timer Number
(0-255)

15 14 13

File Number

Word 0 EN TT DN
Word 1

Preset Value

Word 2

Accumulated Value

Preset

T4:0.PRE

How long the timer should time for.

Accumulated

T4:0.ACC

How long the timer has timed for already.

Done

T4:0/DN

Set to 1 when accumulated value > preset value.

Timer Timing

T4:0/TT

Set to 1 when accumulated value < preset value.

Enable

T4:0/EN

Set to 1 when the rung containing the timer is true.

21
02/24/97

21

Timers
The Timers done bit turns the motor off after a 10 second time delay.
Stop

Start

Timer Done

Motor

I:1/1

I:1/0

T4:0/DN

O:3/0

]/[

]/[

][

( )

M1

O:3/0

][

M1

O:3/0

][

02/24/97

TON
TIMER ON DELAY
Timer
T4:0
Time Base
1.0
Preset
10
Accum
0

(EN)
(DN)
22

22

Timers
The Timers timing bit turns the motor on for only 10 seconds.
ON-OFF
Selector Switch

I:2/2

][

TON
TIMER ON DELAY
Timer
T4:0
Time Base
1.0
Preset
10
Accum
0

(EN)
(DN)

Timer Timing

Motor

T4:0/TT

O:3/0

][

( )

23
02/24/97

23

You might also like