Escolar Documentos
Profissional Documentos
Cultura Documentos
*
& ! '()))* +"
"
!
# "$ %
,"
! "
*
! "
& ! '()))* +"
&!
!
-
*
"
&!
"
'()))* +"
&!
0 $
'()))* +"
#
&!
"
"$
'()))
* " " .*
&!
"
'()))* +"
/ "
'()))* +"
"
* " " .*
"
&! '
()))* +"
0
&!
"
'()))* +"
Course Purpose
Skill-building course for maintainers
Basic understanding of ladder logic instructions and terminology
Provides resources and hands-on practice
To modify basic instructions
Use RSLogix 5000 software to perform basic software tasks
Introduced to ladder logic techniques, standards, and rules
Prerequisites
To complete this course:
Completion of course CCP146
Or, the ability to:
Go online
Configure I/O modules
Download
Assign tags
Verify a project
Change operating modes on a controller
Enter/edit instructions in RSLogix 5000 software
Also, to complete this course:
Perform basic Windows tasks:
Use a mouse
Browse for files
Open, close, size, and move windows
Outline
Course lessons:
Applying Ladder Logic Strategies and Techniques
Documenting and Searching Ladder Logic
Programming Timer and Counter Instructions
Integrated Practice: Modifying Basic Instructions
Programming Program Control Instructions
Programming Compare Instructions
Programming Compute and Math Instructions
Integrated Practice: Programming Ladder Logic Instructions
Programming Move Instructions
Ladder Logic
Strategies and Techniques to an RSLogix 5000
Lesson Objectives
Arrange instructions for optimum performance
Draft ladder logic on paper
Execute best practices for use with ladder logic
Key Terms
Non-Retentive Output Instruction: Continually controls state of output
Example: Non-Retentive Output Instruction
Output Energize (OTE): When rung true, output enabled.
When rung false, output disabled.
Retentive Output Instruction: Sets and retains state of output, even if
power lost
Example: Retentive Output Instruction
Output Latch (OTL): When rung changes to false, output is not
changed
Ladder Logic
Strategies and Techniques to an RSLogix 5000
Efficient Ladder Logic Arrangement
Basic methods help reduce program scan time:
Efficient instruction arrangement on rungs and branches
Efficient arrangement of multiple branches
Efficient Instruction Arrangement
on Rungs and Branches
Instructions most likely to be false on the rung first
Ensures ladder logic instruction placement on rung fully optimized
They will quickly be skipped
Program that skips false rungs reduces scan time:
Instruction MOST
Likely to Be False
Instruction LEAST
Likely to Be False
Ladder Logic
Strategies and Techniques to an RSLogix 5000
Efficient Instruction Arrangement
on Rungs
Ladder Logic
Strategies and Techniques to an RSLogix 5000
Soon as controller finds true path:
Stops scanning and will not read any remaining branches
Important:
Ladder Logic
Strategies and Techniques to an RSLogix 5000
Drafting Ladder Logic
Modifying, entering, or programming:
Considered interchangeable terms that refer to
introduction of new or different ladder logic elements into
a project.
Examples of ladder logic elements:
Rungs, instructions, and branches
Valid and essential first step to formulate a project:
Draft ladder logic on paper
Ladder logic rarely inputted directly into program
Without having to rework it
Prior to drafting, project engineer establish items for the project:
Standards
Conformity
Consistency
Establishing standards, conformity, and consistency:
Imperative when more than one programmer assigned to project
Programming
Timer and Counter Instructions in an RSLogix 5000
Timer and Counter Instruction Usage
Programming
Timer and Counter Instructions in an RSLogix 5000
Timer structure within the Monitor Tags window:
Preset Tag
Accumulated Tag
Enable Tag
Timer Timing Tag
Done Tag
Programming
Timer and Counter Instructions in an RSLogix 5000
Timer Instruction Status Bit
Description
.EN (enable)
.DN (done)
Programming
Timer and Counter Instructions in an RSLogix 5000
Timer Instructions
For Instance
Accumulate time
Reset a timer
Programming
Timer and Counter Instructions in an RSLogix 5000
TON (Timer On Delay) Instruction
Programming
Timer and Counter Instructions in an RSLogix 5000
TON (Timer On Delay) Instruction
.TT
.DN
=0
Reset (False)
< PRE
Timing (True)
= PRE
Programming
Timer and Counter Instructions in an RSLogix 5000
.TT
.DN
=0
Reset (True)
< PRE
Timing (False)
= PRE
Programming
Timer and Counter Instructions in an RSLogix 5000
RTO (Retentive Timer On Delay) Instruction
RTO instruction accumulates time when true, does not reset when false
Can start/stop without losing accumulated value:
Programming
Timer and Counter Instructions in an RSLogix 5000
Reset (RES) needed to reset RTO instruction's accumulated
value and bits
RTO instruction works:
If the accumulated value is . . .
.TT
.DN
=0
Reset (False)
< PRE
Timing (True)
= PRE
= PRE
Programming
Timer and Counter Instructions in an RSLogix 5000
COUNTER Data Type
Data stored in members of COUNTER structure
Members have own tag, hold preset, accumulated, status bits
COUNTER structure within Monitor Tags window:
Preset Tag
Accumulated Tag
Count Up Tag
Count Down Tag
Done Tag
Overflow Tag
Underflow Tag
Counter Status Bits, (.CU, .CD, .DN, .OV, and .UN): Tell controller status
instruction
Programming
Timer and Counter Instructions in an RSLogix 5000
Counter Status
Bit
Description
.CU
.CD
.DN
.OV
.UN
Counter instructions:
Accumulated value continues incrementing/decrementing even after .DN bit is set
(i.e., the accumulated value can be greater than the preset value).
Clear accumulated value, use RES (reset) instruction that references
counter tag
Programming
Timer and Counter Instructions in an RSLogix 5000
Counter Instructions
For Instance
Count up
Count down
Count up and
count down
Reset a timer
Programming
Timer and Counter Instructions in an RSLogix 5000
CTU (Count Up) Instruction
Programming
Timer and Counter Instructions in an RSLogix 5000
CTD (Count Down) Instruction
CTD instruction used to count down by one every time rung is true:
Rungs of ladder logic represent conveyor bringing parts into buffer zone.
Each time part enters, limit_switch_1 enabled and part_count increments by 1.
Each time part leaves, limit_switch_2 enabled and part_count decrements by 1.
If there are 100 parts in buffer zone (part_count.DN is set), conveyor_A enabled
and stops the conveyor from bringing in any more parts until buffer has room.
Programming
Timer and Counter Instructions in an RSLogix 5000
RES (Reset) Instruction
Important:
Mnemonic
Jump to Subroutine
JSR
Subroutine
SBR
RET
Jump to Label
JMP
Label
LBL
MCR
UID
UIE
Temporary End
TND
Disable rung
AFI
No Operation
NOP
JSR Instructions:
Jumps to separate routine, when enabled
Initiates execution of specified routine; a.k.a. subroutine:
Executes subroutine one time
Execution returns to original routine, after subroutine executes
Output Instruction
Input Instruction
Output Instruction
Main Routine
Level 1
Level 2
Level 3
Subroutine action_1
Subroutine action_2
Subroutine action_3
SBR
SBR
SBR
JSR
JSR
JSR
RET
RET
RET
LBL Instructions:
Target of JMP instruction that uses reference
Label name unique within routine
LBL an input instruction:
Input Instruction
Output Instruction
When disabled, controller scans within zone, but scan time reduced
Rung-condition-in false for all instructions inside disabled zone
Output Instruction
Output Instruction
Mnemonic
Equal to
EQU
GEQ
Greater Than
GRT
Less Than
LEQ
LES
Not equal to
NEQ
Compare
CMP
Limit
LIM
Mask equal to
MEQ
Strings compared, hexadecimal values of characters determine if one string less than or
equal to another string
Non zero
True
Zero
False
Between or
equal to either of
the limits
Outside or equal
to either of the
limits
Example
High limit
Low limit
85
60
60
85
High Limit
-1
+1
Low Limit
High Limit
-(n+1)
+n
n = maximum value
Test values in clockwise range from high limit to low limit set rung-conditionout to false
Low Limit
High Limit
-1
+1
High Limit
Low Limit
-(n+1)
+n
n = maximum value
Important:
value_1
value_2
mask_1
mask_1
Masked
value_1
Masked
value_2
Important:
Mnemonic
Add
ADD
Subtract
SUB
Multiply
MUL
Divide
DIV
Modulo
MOD
Negate
NEG
Absolute Value
ABS
Square Root
SQR
Evaluate an expression
Compute
CPT
Compute and math instructions execute faster and require less memory if
all the operands of the instruction use the same optimal data type,
typically DINT or REAL.
Important:
Mnemonic
Move
MOV
Masked Move
MVM
BTD
Clear a value
Clear
CLR