Understanding Basic Ladder Instructions
Understanding Basic Ladder Instructions
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
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
ADD
0
N7:0
N7:1
N7:1
ADD
Source A
N7:0
Source B
N7:1
Dest
N7:1
1+5=6
5
02/24/97
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
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
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
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
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
>
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
<
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
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
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
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
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
Dest
MOV
MOVE
Source
N7:0
Dest
N7:1
N7:0 50
N7:1 50
17
02/24/97
17
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
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
T4:0
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
Accumulated
T4:0.ACC
Done
T4:0/DN
Timer Timing
T4:0/TT
Enable
T4:0/EN
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