Académique Documents
Professionnel Documents
Culture Documents
Level 2:
Basic Ladder Logic
Programming
Student Manual
properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell
Automation or third--party provided instructions, warnings, recommendations and documentation;
ensuring that only properly trained personnel use, operate and maintain the Products at all times;
staying informed of all Product updates and alerts and implementing all updates and fixes; and
all other factors affecting the Products that are outside of the direct control of Rockwell Automation.
Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell
Automation is prohibited.
Throughout this manual we use the following notes to make you aware of safety considerations:
Identifies information about practices or circumstances
that can cause an explosion in a hazardous environment,
which may lead to personal injury or death, property
damage, or economic loss.
Comment Form
Email: ratps@ra.rockwell.com
or Fax:
440.646.4425
Page 1 of
Date:
Contact Information:
Name:
Company and Location:
Phone:
Email:
Page 2
Table of Contents
Introduction
Course Overview
Course Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Who Should Attend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Meeting Course Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Student Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hands-On Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Certificate Candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuration and Programming Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ControlLogix/RSLogix 5000 Curriculum Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Application Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Drafting Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I
I
II
II
II
III
III
III
III
IV
IV
V
1--1
1--1
1--1
1--1
1--2
1--3
1--4
1--6
1--6
1--7
1--8
1--8
1--9
1--11
1--11
1--13
1--13
1--15
1--16
1--16
1--16
1--16
ii
Table of Contents
2--1
2--1
2--1
2--1
2--1
2--3
2--3
2--4
2--5
2--5
2--7
2--8
2--9
2--9
2--9
2--11
2--12
2--12
2--12
2--14
3--1
3--1
3--1
3--1
3--2
3--2
3--3
3--4
3--5
3--6
3--6
3--7
3--8
3--9
3--10
3--12
3--12
3--13
Table of Contents
iii
4--1
4--1
4--1
4--1
4--2
4--3
4--3
4--6
4--6
4--7
4--9
4--10
4--10
5--1
5--1
5--1
5--1
5--2
5--3
5--4
5--4
5--5
5--7
5--8
5--8
6--1
6--1
6--1
6--1
6--2
6--2
6--3
6--3
6--5
6--6
iv
Table of Contents
6--6
6--7
6--7
6--7
6--8
6--9
6--11
6--12
6--12
7--1
7--1
7--1
7--1
7--1
7--3
7--4
7--4
7--6
7--6
7--7
7--8
7--9
7--10
7--12
7--12
7--13
8--1
8--1
8--1
8--1
8--1
8--3
8--4
8--4
8--4
Table of Contents
8--5
8--7
8--8
8--8
9--1
9--1
9--1
9--1
9--3
9--3
9--3
9--4
9--4
9--5
9--5
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
Exercise A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
How Did You Do? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercise A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9--7
9--9
9--10
9--10
10--1
10--1
10--1
10--1
10--2
10--3
10--3
10--3
10--4
10--4
10--4
10--5
10--7
10--9
10--10
10--10
vi
Table of Contents
11--1
11--1
11--1
11--1
11--2
11--2
11--3
11--4
11--4
11--5
11--6
11--7
11--8
11--8
11--9
11--10
11--11
11--12
11--13
11--14
11--15
11--18
11--20
11--20
11--20
11--21
11--22
12--1
12--1
12--1
12--1
12--1
12--2
12--3
12--5
12--5
Table of Contents
vii
12--7
12--9
12--10
12--10
Appendices
I/O Wiring Diagrams
Slot 0 -- 1756-OB16D Digital Output Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Slot 2 -- 1756-IB16D Digital Input Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Slot 4 -- 1756-OB16D Output Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Slot 7 -- 1756-OF6VI Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Slot 8 -- 1756-IF6VI Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A--1
A--2
A--3
A--4
A--5
B--2
viii
Table of Contents
Course Overview
Course Overview
Course Purpose
II
Course Overview
Prerequisites
Agenda
Day 2
Programming a Procedure
Separating the Procedure from Equipment Control
Copying and Filling an Array
Course Overview
Student Materials
III
Hands-On Exercises
Throughout this course, you will have the opportunity to practice the
skills you have learned through a variety of hands-on exercises:
Exercises focus on the skills introduced in each lesson.
Certificate Candidates
Tip "
The Certificate Exam questions are scenario-- based and may require
you to understand information from all of these areas.
To study for the exam, you must keep all class materials and your
written notes.
Configuration and
Programming Examples
IV
Course Overview
ControlLogix/RSLogix
5000 Curriculum Map
Application Overview
Skip Car
Coke Loaded on
the Conveyor
Raw Material
Loaded in the
Blast Furnace
Blast Furnace
Coke and Other
Raw Material
Loaded in the
Scale Car
Conveyor Taking
Coke to Stockhouse
Iron
Trough
Scale Readout
Molten Iron
Hot Metal Car
Course Overview
Drafting Practices
There are many correct ways to program ladder logic:
Your answer may be different from the provided example.
VI
Course Overview
Lesson
Project Organization
These containers are available to organize an RSLogix 5000 project:
Task: Provides scheduling and priority information for a set of
one or more programs.
1--2
Subroutines
Guideline
1--3
Filler Routine
Taper Routine
Action to take
1--4
An operator tells you that you need to fill a tank if the Low Level
switch is on. Once the tank starts filling, the low level switch will
turn off but the tank needs to continue to fill until a High Level
switch closes.
prescan mode. The prescan initializes the instruction and data and
prepares it for normal execution.
1--5
1--6
1--7
Creating a Subroutine
Explain that the easiest way to call a
subroutine is to call it all the time without
any conditions.
Conditional JSR
Unconditional JSR
1--8
Heres How
IMPORTANT: To meet IACET CEU
requirements and fully prepare
certificate students for the final exam,
you must demonstrate all lesson
objectives using the proper job aids.
Demonstration Checklist
Use the steps below and the information
on the Demonstration Checklist to help
guide you during the demonstration:
1. Use STL_1756R_DEM1.acd for the
demonstration.
2. Create the subroutine and enter a
JSR instruction to call the routine.
1--9
1--10
Context:
You are responsible for programming the materials delivery
equipment of the iron process:
Coke Conveyor
Stockhouse
Scale
Scale Car
Skip Car
Part
Description
Coke Conveyor
Stockhouse
Scale
Scale Car
When the scale car reaches the target weight, it moves the
materials to a skip car and dumps them in. Then it returns
to the stockhouse for more materials.
Skip Car
The skip car lifts the materials to the furnace and dumps
them in.
Directions:
1. How many subroutines would you likely use?
1
2
3
4
5
6
Rev. June 2012
STLe56R
1--11
2. Write a name for each subroutine in the following table, and then
write a brief description of what the subroutine does. You do not
need to complete all the rows:
Routine Name
Description
Exercise B
OK
Not OK
1--12
OK
Not OK
OK
Not OK
1--13
Exercise C
Pellet_Gate_Out
Coke_Conveyor_Out
Start
System_Command
Coke_Gate_Out
Stop
Coke_Low
Car_Position
Weight_Target
1--14
Alias For
Workstation Device
Start
Local:2:I.Data.0
DI0
Coke_High
Local:2:I.Data.1
DI1
Stop
Local:2:I.Data.8
DI8
Coke_Low
Local:2:I.Data.9
DI9
Car_Position
Local:2:I.Data.12
DI12
Weight_Target
Local:2:I.Data.13
DI13
System_Command
Local:0:O.Data.0
DO0
Coke_Gate_Out
Local:0:O.Data.1
DO1
Coke_Conveyor_Out
Local:0:O.Data.3
DO3
Pellet_Gate_Out
Local:0:O.Data.4
DO4
MainRoutine
4. Program the MainRoutine to meet these requirements:
1--15
Stockhouse Routine
6. Program the Stockhouse routine to meet these requirements:
1--16
Answers
Exercise A
1. Three:
Description
Coke_Conveyor
Stockhouse
Skip_Car
Exercise B
1. Not OK. It needs the states of the limit switch and motor.
2. OK.
3. OK.
4. IF Car position photoeye = On and Scale weight < 2.5 K THEN
Coke gate = On AND Pellet gate = On
5. IF (Low level photoeye = On OR Filler_Conveyor = On) AND
High level photoeye = Off THEN Filler_Conveyor = On
Exercise C
2. The following graphic shows the routines in the Controller
Organizer:
1--17
Rung 0
Rung 1
Rung 2
Rung 3
1--18
Rung 0
Rung 0
When all three conditions are true, both gates turn on (open) and
start filling coke and pellets.
Lesson
2--2
When the instruction is placed in the rung first, the controller will
solve this rung faster.
To use an AFI instruction to disable a path on a rung, place the
instruction in the path you want to disable.
2--3
This rung can show which fault bits have been set. From here, you
can perform a cross-reference search to quickly go to the fault.
2--4
Heres How
IMPORTANT: To meet IACET CEU
requirements and fully prepare
certificate students for the final exam,
you must demonstrate all lesson
objectives using the proper job aids.
2--5
Demonstration Checklist
You should have already demonstrated
the AFI, NOP, and MCR instructions.
2--6
2--7
Pellet_Gate_Out
Coke_Conveyor_Out
Start
System_Command
Coke_Gate_Out
Stop
Coke_Low
Car_Position
Weight_Target
2--8
2. Verify that the following tags are in the Main Program Scoped
Tags list:
Tag Name
Alias For
Workstation Device
Start
Local:2:I.Data.0
DI0
Coke_High
Local:2:I.Data.1
DI1
Stop
Local:2:I.Data.8
DI8
Coke_Low
Local:2:I.Data.9
DI9
Car_Position
Local:2:I.Data.12
DI12
Weight_Target
Local:2:I.Data.13
DI13
System_Command
Local:0:O.Data.0
DO0
Coke_Gate_Out
Local:0:O.Data.1
DO1
Coke_Conveyor_Out
Local:0:O.Data.3
DO3
Pellet_Gate_Out
Local:0:O.Data.4
DO4
3. Suppose you do not want the coke conveyor to run when you
turn on the system (System_Command = On). Place an AFI
instruction so that it disables all the coke conveyor logic.
4. Suppose you want to test the scale car without filling it with
material. Place an AFI instruction so that it prevents the coke or
pellet gates of the stockhouse from turning on. Make sure the AFI
instruction does not disable the execution of the stockhouse
routine.
5. Download the project to slot 1 of your workstation.
6. Put the controller in Run mode.
7. Press the Start pushbutton and make sure that the
System_Command light turns on.
8. Open the Coke_Conveyor routine.
9. Use the workstation devices and try to turn on
Coke_Conveyor_Out. Can you turn it on?
Exercise B
2--9
7. Use the workstation and try to turn off the Coke_Gate_Out and
Pellet_Gate_Out outputs. Can you turn the outputs off?
Exercise C
2--10
12. Observe the same three outputs on the workstation. What are the
states of the outputs when System_Command is off, and why are
they reacting this way?
13. Go offline.
14. Remove all NOP and MCR instructions from the project.
E 2012 Rockwell Automation, Inc. All rights reserved.
2--11
2--12
Answers
Exercise A
3. Place the AFI instruction in front of the JSR instruction that
calls the routine. This prevents the controller from calling the
routine.
4. Place the AFI instruction in front of the rung that turns on the
gates. This keeps the rung always false and the gates always off
(closed).
2--13
Exercise B
2. Place a branch around System_Command on the rung that
controls Coke_Gate_Out and Pellet_Gate_Out. Then place an
NOP instruction on that branch.
This will command Coke_Gate_Out and Pellet_Gate_Out to
open (turn ON) when a car is in place until the target weight is
reached. After the weight is reached, Coke_Gate_Out and
Pellet_Gate_Out will both close (turn OFF).
2--14
Exercise C
3. After the MCR instructions have been added, your MainRoutine
should look similar to the grahic below:
2--15
9. After the two NOP branches have been added, the MainRoutine
should look similar to the following graphic:
2--16
Lesson
Timer Instructions
Timer instructions control operations based on time and are used
when any of the following actions need to occur:
After a timed delay, trigger an outcome to take place
Cause an event to occur for a specified length of time
Answers:
TON
RTO
3--2
Timer Structure
A timer instruction has three operands:
Timer: The structure where information from the timer is stored.
Preset Value (.PRE): The number of units or time base to be
timed (valid range 0 through +2,147,483,647).
Accumulated Value (.ACC): The total time the timer has been
enabled in millisecond units.
Tag Name
Total Milliseconds the
Timer has Counted
Preset Value
Accumulated Value
Enable Bit
Timer Timing Bit
Done Bit
The rung conditions control the instruction. If the rung conditions are
true, the following occurs:
The .EN bit turns ON and the timer starts timing.
The .TT bit turns ON when the timer is timing. The timer is
3--3
.TT
Then . . .
.DN
FALSE
.TT
Then . . .
.DN
TRUE
3--4
Tip "
E 2012 Rockwell Automation, Inc. All rights reserved.
.TT
Then . . .
.DN
FALSE
3--5
3--6
Heres How
Demonstration Checklist
You should have already demonstrated
the timer instructions.
3--7
Coke_High
Coke_Conveyor_Out
Start
System_Command
Coke_Gate_Out
Stop
Coke_Low
Car_Position
Tag Name
Alias For
Workstation
Device
Start
Local:2:I.Data.0
DI0
Coke_High
Local:2:I.Data.1
DI1
Stop
Local:2:I.Data.8
DI8
Coke_Low
Local:2:I.Data.9
DI9
Car_Position
Local:2:I.Data.12
DI12
System_Command
Local:0:O.Data.0
DO0
Coke_Gate_Out
Local:0:O.Data.1
DO1
Coke_Conveyor_Out
Local:0:O.Data.3
DO3
Pellet_Gate_Out
Local:0:O.Data.4
DO4
3--8
Exercise B
3--9
The fault bit for the gate turns on if either of these conditions
are true for longer than 10 seconds:
Once the fault bit turns on, it stays on. You must manually
turn it off by pressing the Stop button for 2 seconds.
If either of the gates fault, then both gates turn off. Use
existing tags Coke_Gate_Fault and Pellet_Gate_Fault.
3--10
6. Test your code and make sure it meets requirements. Here are
some suggestions:
Use AFI instructions to test small sections of your code. For
example, first test the weigh scale simulation, and then test the
feedback simulation, and so on.
To simulate a faulted gate, set the preset for the
Coke_Gate_Open_Delay timer to something greater than 10
seconds.
Command the Coke Gate to open and wait 10 seconds. The
fault bit Coke_Gate FB1 should turn on, and both Coke gate
out and Pallet gate out should turn off.
Check off each requirement as you meet it.
7. Go offline.
8. Save the project.
3--11
3--12
Answers
Exercise A
2. The boxes in the following graphic highlight the new code for
the weigh scale simulation:
Rung 0
The XIO instruction checks the done bit of the timer. If off, then
the simulated weight is less than the target weight. If on, then the
simulated weight is at the target weight.
Rung 1
The rung uses seal-in logic to start and reset a timer. The timer
simulates the filling of the scale car.
IF Coke_Gate_Out = on AND Pellet_Gate_Out = on AND
Car_Position = on, THEN the timer runs for 90 seconds.
Once the timer is done, the done bit seals in the gate
conditions. This lets the timer hold its time when the gates
close.
Car_Position turns off when the scale car leaves the
stockhouse. This resets the timer.
3--13
Exercise B
2. The boxes in the following graphic highlight the new code for
the fault detection:
Rung 0
The gates turn on only if both of them are not faulted. They both
turn off if either of them fault while commanded on.
Rung 8
Rung 9
Same as rung 8.
3--14
Lesson
Programming Compare
Instructions in an RSLogix 5000
Project
What You Will Learn
"
4--2
EQU Instruction
The EQU instruction, an input instruction, tests whether Source A is
equal to Source B.
For example, if the box counters accumulated value is equal to the
level count, then the rung-condition-out is set to true, as shown in the
following graphic:
Tag
Tag Value
4--3
LIM Instruction
The LIM instruction, an input instruction, determines if the test value
is within the low limit to high limit range.
For example, if the oven temperature is between 358 and 364
degrees, then turn on the Temperature_OK bit.
4--4
Between or equal to
either of the limits
Outside or equal to
either of the limits
Higher than
the high limit
Example
High
limit
Low
limit
85
60
Tested Value
Tested
Value
60
85
The following list and graphic further explain the LIM instruction:
The LIM instruction starts at the low limit and increments
clockwise until it reaches the high limit.
The test values in the clockwise range from the high limit to the
low limit set the rung-condition-out to false.
0
+1
(n+1)
(n+1)
+n
Low Limit
High Limit
+n
n = maximum value
4--5
Another way to configure the LIM instruction is to set the low limit
to a larger number than the high limit, as shown in the following
conditions and graphic:
The instruction starts at the low limit and increments clockwise
until it reaches the high limit.
The test values in the clockwise range from the high limit to the
low limit set the rung-condition-out to false.
0 +1
High Limit
Low Limit
(n+1)
+n
n = maximum value
4--6
Heres How
Demonstration Checklist
Your instructor should have already
shown you how each compare
instruction functions.
Pay attention to these critical aspects of the demonstration:
4--7
Pellet_Gate_Out
Start
System_Command
Coke_Gate_Out
Stop
Car_Position
Tag Name
Alias For
Workstation
Device
Start
Local:2:I.Data.0
DI0
Stop
Local:2:I.Data.8
DI8
Car_Position
Local:2:I.Data.12
DI12
System_Command
Local:0:O.Data.0
DO0
Coke_Gate_Out
Local:0:O.Data.1
DO1
Pellet_Gate_Out
Local:0:O.Data.4
DO4
Weight
Local:8:I.Ch0Data
AI0
4--8
Directions:
1. Open the PCI_1756R_A1.acd project file.
Weigh Scale
Alias For
Local:8:I.Ch0Data
Workstation
Device
AI0
4--9
4--10
Answers
Exercise A
3. In the following graphic, the box highlights the new instruction
for the weigh scale:
Rung 0
The LES instruction lets the gates turn on (open) if the weight is
less than 5000 kg. When the weight reaches 5000 kg, the LES
instruction causes the gates to turn off (close).
4. The following graphic shows the instruction for the weigh scale
in range detection:
Rung 10
Lesson
Move instructions execute faster and require less memory if all the
operands of the instruction use the same optimal data type, typically
DINT or REAL.
Data types within move instructions can be mixed, but loss of
accuracy and rounding errors might occur, and the instruction will
take more time to execute.
5--2
5--3
5--4
Heres How
Demonstration Checklist
You should have already demonstrated
the move instructions.
5--5
Start
System_Command
Coke_Gate_Out
Stop
Car_Position
Tag Name
Alias For
Workstation Device
Start
Local:2:I.Data.0
DI0
Stop
Local:2:I.Data.8
DI8
Car_Position
Local:2:I.Data.12
DI12
System_Command
Local:0:O.Data.0
DO0
Coke_Gate_Out
Local:0:O.Data.1
DO1
Pellet_Gate_Out
Local:0:O.Data.4
DO4
5--6
Directions:
1. Open the PMV_1756R_A1.acd project file.
Weigh Scale Simulation
Make these changes and additions to simulate the operation of the
weigh scale as cars move on and off it.
2. Create a tag to store the simulated weight:
- Name: Sim_Weight
- Data type: DINT
- Scope: MainProgram
3. Program the read-out of the weigh scale for these situations:
- No car on scale:
IF first_scan = on OR Car_Position = off THEN
Sim_Weight = 0
- Empty car arriving on scale:
IF Car_Position goes from off to on THEN
Sim_Weight = 1000 (empty weight of car)
- Full car on scale:
IF Sim_Fill_Time.Dn = on THEN
Sim_Weight = 5000 (full weight of car)
4. Change the LES instruction to use Sim_Weight instead of Weight:
5--7
5--8
Answers
Exercise A
2. The following graphic shows the Sim_Weight tag:
5--9
Rung 0
If this is the first scan or the car is not on the weigh scale, then
clear Sim_Weight.
Rung 1
Rung 4
5--10
Rung 2
Lesson
Destination (Dest): The tag address where the data is stored after
a mathematical operation is performed.
"
A math instruction executes faster and requires less memory if all the
operands of the instruction use the same optimal data type, typically
DINT or REAL.
Math instructions execute once each time the instruction is scanned
as long as the rung-condition-in is true. To evaluate the expression
only once, use a one-shot instruction to trigger the instruction.
There are eight math output instructions:
ADD (Add)
SUB (Subtract)
MUL (Multiply)
DIV (Divide)
MOD (Modulo)
NEG (Negate)
ABS (Absolute Value)
SQR (Square Root)
E 2012 Rockwell Automation, Inc. All rights reserved.
PCMsb56r
6--2
2. In the ADD_SUB_MUL_DIV
subroutine, demonstrate how rung 1
works.
The two Dest (destination) tags from the ADD instructions are
used in the SUB instruction Source A and Source B.
6--3
In the ADD_SUB_MUL_DIV
subroutine, demonstrate how
rung 2 works.
6--4
If Source A . . .
And Source B are not
REALs
Truncates
Or Source B is a REAL
Rounds
Example
Source A
Source B
Destination
Source A
Source B
Destination
DINT
DINT
DINT
REAL
DINT
DINT
5
3
1
5.0
3
2
If Source B is
zero and . . .
And the
result is . . .
Then the
destination
is set to . . .
Source A
Positive
Negative
Positive
-1
0
1.$ (positive infinity)
Negative
REAL (source)
DINT (result)
--2.5
--2
--1.6
--2
--1.5
--2
--1.4
--1
1.4
1.5
1.6
2.5
In the ADD_SUB_MUL_DIV
subroutine, demonstrate how
rung 3 works.
6--5
And the
destination
is a . . .
And the
result is . . .
In the MOD_SQR_NEG_ABS
subroutine, demonstrate how
rung 0 works.
Then the
destination
is set to . . .
Source A
Positive
Negative
Positive
-1
0
1.$ (positive infinity)
Negative
6--6
In the MOD_SQR_NEG_ABS
subroutine, demonstrate how
rung 2 works.
In the MOD_SQR_NEG_ABS
subroutine, demonstrate how
rung 3 works.
6--7
Not a REAL
Truncates
A REAL
Rounds
Example
Source
DINT
Destination
Source
DINT
REAL
1
3.0
Destination
DINT
6--8
Heres How
Examine
this status flag . . .
Using this
keyword . . .
Overflow
S:V
Zero
S:Z
Sign (result is
negative)
S:N
Carry
S:C
Demonstration Checklist
You should have already demonstrated
the math instructions.
6--9
Start
System_Command
Coke_Gate_Out
Stop
Car_Position
Tag Name
Alias For
Workstation
Device
Start
Local:2:I.Data.0
DI0
Stop
Local:2:I.Data.8
DI8
Car_Position
Local:2:I.Data.12
DI12
System_Command
Local:0:O.Data.0
DO0
Coke_Gate_Out
Local:0:O.Data.1
DO1
Pellet_Gate_Out
Local:0:O.Data.4
DO4
6--10
Directions:
1. Open the PCM_1756R_A1.acd project file.
Simulate a Fill Rate of 50 kg/second
Make these changes and additions to simulate the read-out of the
weigh scale at 50 kg/second:
2. Sometimes it is useful to set up a timer so that it automatically
resets when it is done and starts timing again. This is called a
free-running timer. To create a free-running timer, use the timers
.DN bit as an input condition for the timer.
Edit rung 3 so that it times for 1 second, resets, and times again
whenever the gates are open, like this:
6--11
6--12
Answers
Exercise A
3. The following shows an example of simulating a fill rate of
50 kg/second:
Rung 3
The XIC of the .DN bit causes the timer to time, reset, and time
again whenever the gates are on (open).
Rung 4
6--13
Rung 14
6--14
Lesson
Tip "
After 100 cars leave a car wash, turn on a Service Soon light.
As parts are taken out of inventory, decrement a value that
represents how many parts are still available.
Counter Structure
A counter instruction has three operands:
Counter: The structure where information from the counter is
stored.
7--2
Tip "
Preset Value
Accumulated Value
Count Up Bit
Count Down Bit
Done Bit
Overflow Bit
Underflow Bit
Indicates
.CU (enable)
.CD (enable)
.DN (done)
.OV (overflow)
.UN (underflow)
7--3
And . . .
Then . . .
7--4
Once the .DN bit is set, how long will it stay set?
The CTU and CTD instructions increment or decrement from the same total count.
7--5
When an RES instruction is true, the accumulated value and the bits
of either a timer or counter instruction for the referenced tag data
type are cleared to 0 (reset):
7--6
Heres How
Demonstration Checklist
You should have already demonstrated
the counter instructions.
7--7
Carton_Full
Parts
Carton_In_Position_Photoeye
Carton
Parts travel along a conveyor and are loaded into cartons. When the
carton is full, it leaves the loading area and an empty carton replaces
it.
Use these workstation devices to represent the equipment of the part
loader:
Tag Name
Alias For
Workstation
Device
Part_Loaded_Photoeye
Local:2:I.Data.8
DI8
Carton_In_Position_Photoeye
Local:2:I.Data.12
DI12
Carton_Full
Local:0:O.Data.2
DO2
7--8
Exercise B
7--9
Buffer
Conveyor B
Buffer_Out_Photoeye
Buffer_In_Photoeye
If Conveyor A runs too fast for too long, Conveyor B gets too
many parts.
If Conveyor A runs too slow for too long, Conveyor B runs out of
parts.
The buffer gives Conveyor A time to adjust its speed while
keeping Conveyor B full.
Alias For
Workstation Device
Buffer_In_Photoeye
Local:2:I.Data.4
DI4
Buffer_Out_Photoeye
Local:2:I.Data.5
DI5
Buffer_Overflow
Local:0:O.Data.1
DO1
7--10
7--11
7--12
Answers
Exercise A
3. The following graphic shows one way to count the parts and
cartons:
Rung 0
Rung 1
Rung 2
7--13
Exercise B
3. The following graphic shows one way to count the parts in the
buffer:
Rung 0
Rung 1
Rung 2
7--14
Lesson
Handling Expressions in an
RSLogix 5000 Project
What You Will Learn
Tip "
Tip "
"
8--2
Tip "
If the expression is . . .
Non zero
True
Zero
False
When placing the cursor over the tag name, RSLogix 5000
software will show tag information and the value.
8--3
Tip "
8--4
Heres How
Order
Operation
( )
ABS, ACS, ASN, ATN, COS, DEG, FRD, LN, LOG, RAD, SIN,
SQR, TAN, TOD, TRN
**
-- (negate), NOT
*, / , MOD
-- (subtract), +
AND
XOR
OR
Demonstration Checklist
You should have already demonstrated
the CMP and CPT instructions.
8--5
Photoeye
Parts/Minute
8--6
Sim_Photoeye
2000 ms
30.0
1000 ms
60.0
500 ms
120.0
8--7
8--8
Answers
Exercise A
2. Use the MainRoutine to call the subroutine:
Rung 0
The timer continuously times for 2000 ms, resets, and times
again.
Rung 1
Rung 2
8--9
Rung 3
Rung 4
Every 10 seconds:
Subtract the current part count from the last part count, and
8--10
Lesson
Text Box:
-- Can be free form or anchored to an instruction block
-- Is stored offline in the .acd project file
Other: Descriptions for various components such as tasks,
programs, routines, tags, etc.
Tip "
9--2
Tip "
Descriptive
Text
9--3
Search Options
Note that the ability to search
documentation is a unique and powerful
search option not found in many other
software packages.
If anybody asks, there is a Browse logic
search option, but this is more for a
maintainer. For this option to be useful, a
programmer must add descriptions to
programs and critical routines.
Will . . .
Go To
Find
Replace
Cross-Reference
Cleared
Error
Error
Errors
Error1
Error_Flag
MathError
Chalk Talk: List other search terms on the board and discuss how
they can be affected by the Match Whole Word Only option.
9--4
Searching by Cross-Reference
Mention that to select the
Cross-Reference option from a
right-click menu, you must right-click the
tag and not the instruction.
Tag Hierarchy Tab: Allows you to view alias and base tags.
Depending on the type of component selected, the following display
tabs are available:
If the
Component
Type Is . . .
By Logic
By Tag
Tag Hierarchy
Tag
Data type
Routine
Program
Equipment
Phase
Add-On
Instruction
Task
Module
Label
Bookmark Toolbar
Remind students how to view toolbars
by adding this bar to your software.
Heres How
IMPORTANT: To meet IACET CEU
requirements and fully prepare
certificate students for the final exam,
you must demonstrate all lesson
objectives using the proper job aids.
9--5
Demonstration Checklist
Use the steps below to help guide you
during the demonstration:
Open the DL2_1756R_DEM1.acd file.
When demonstrating the listed
procedures, point out the following:
S
9--6
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
9--7
9--8
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
12. In the Find in Routines dialog box, expand the Find Within
section and select the correct check boxes to search for Ladder
Diagram Instructions only.
13. Find All occurrences again.
14. Write the results from the window indicating how many
occurrences and the location of the item(s):
15. Search for the base tag Local:0:O.Data.1 and add the following
tag description:
-- The output on this rung will indicate that the north conveyor
timer is enabled.
17. Using documentation from the South Conveyor subroutine, go to
the North Conveyor subroutine and enter the main operand (tag)
descriptions that are similar.
Tip "
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
9--9
9--10
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
Answers
Exercise A
5. The main operand (tag) South_Timer on rung 5 has a preset
value of 15000 ms (15 seconds).
7. The North and South conveyor timers do not have the same
preset value.
9. The timer in the North_Conveyor_System subroutine is located
on rung 5 and has a preset value of 5000 ms (5 seconds). The
timer in the South_Conveyor_System subroutine is located on
rung 5 and has a preset value of 15000 ms (15 seconds).
11. You should find four occurrences.
14. The results of your search for the count up counter instruction
in the subroutine South_Conveyor_System should be as
follows:
-- 1 occurrence found
-- CTU found on rung 6
15. The base tag Local:0:O.Data.1 should have the following tag
description in RSLogix 5000 software:
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
9--11
17. The following graphics show what your answer should look
like after making the appropriate changes as specified:
These instructions
are from rung 1.
This instruction is
from rung 5.
This instruction is
from rung 6.
9--12
Exercise: Documenting and Searching Ladder Logic Using RSLogix 5000 Software
Lesson
10
Programming a Procedure in an
RSLogix 5000 Project
What You Will Learn
problem
Easy modification of code because you can insert or rearrange
steps as needed
Overview of a Sequencer
A sequencer is a programming method that steps your equipment
through a sequence of actions (procedure). It uses these components:
Step: An action or several related actions that you want the
sequencer to perform. A step can perform a single action or it can
perform several actions at the same time.
Transition: The condition or conditions that tell the sequencer to
go to the next step.
10--2
Example: Sequencer
This sequencer steps a traffic light through the green, yellow, and red
lights. We left it simple to focus on the parts of a sequencer. The
sequencer for a real traffic signal would probably include lights for
all directions of traffic:
Step
Transition
Step
Transition
10--3
Organizing Steps
For your procedure, organize your steps logically. A step can:
Start equipment and another step can stop the equipment
10--4
then resumed later on. When it resumes, make sure the sequencer
stays at the current step as long as needed or resets to a
predetermined step/condition.
10--5
Heres How
To set up a sequencer.
2.
Actions
Notes
Add other input conditions as needed.
1.
Example: You can add a branch with an input that lets you manually trigger the rung.
Depending on your application, you may need to perform additional reset actions, such as
turning off any latched bits.
2.
10--6
3.
4.
5.
Last Step
6.
Actions
Notes
Add other input conditions as needed.
3.
4.
Take action.
Example: Suppose your equipment has a status bit that shows if it is faulted. In that case,
check that status bit.
Use caution if you latch a bit. The bit stays on even after a power loss or
mode change. Turn off (unlatch) the bit as needed to keep your equipment in
a safe state..
5.
Use enough transition conditions to make sure that the step completes its actions before
going to the next step.
Consider situations when the sequencer could be interrupted and then resumed later on.
When it resumes, make sure the sequencer stays at the current step as long as needed.
Use a MOV instruction to go to a specific step number.
6.
10--7
Exercise: Programming a
Procedure in an RSLogix 5000
Project
Exercise A
Tank Equipment
Valve_02
Valve_01
Motor_01
Feed_01
Feed_02
Sensor_Level_2
Sensor_Level_1
Sensor_Tank_Empty
Valve_03
Drain
Tank Procedure
When the operator presses the start button, the tank runs this
procedure one time:
Action
1.
2.
3.
4.
Details
A. Turn on Valve_01 and add the first ingredient to the tank from Feed_01.
B. When Sensor_Level_1 turns on, turn off Valve_01 and stop adding the ingredient.
A. Turn on Valve_02 and add the second ingredient to the tank from Feed_02.
B. When Sensor_Level_2 turns on, turn off Valve_02 and stop adding the ingredient.
A. Run Motor_01 for 30 seconds.
B. After 30 seconds, stop Motor_01.
A. Turn on Valve_03 and drain the tank.
B. When Sensor_Tank_Empty turns on, turn off Valve_03.
10--8
Workstation Devices
Use these workstation devices to represent the equipment of the tank:
Motor_01_Out
Valve_03_Out
Start
Valve_01_Out
Valve_02_Out
Sensor_Level_1
Sensor_Level_2
Tag Name
Sensor_Tank_Empty
Alias For
Workstation Device
Start
Local:2:I.Data.0
DI0
Sensor_Level_1
Local:2:I.Data.12
DI12
Sensor_Level_2
Local:2:I.Data.13
DI13
Sensor_Tank_Empty
Local:2:I.Data.14
DI14
Valve_01_Out
Local:0:O.Data.1
DO1
Valve_02_Out
Local:0:O.Data.2
DO2
Motor_01_Out
Local:0:O.Data.3
DO3
Valve_03_Out
Local:0:O.Data.4
DO4
10--9
7. Test your code and make sure it correctly runs the procedure.
The following are suggestions:
Once you verify that a specific valve is open, turn on the
respective switch to simulate the sensor turning on.
Before you rerun the procedure, turn off all the switches.
8. When you are satisfied that the code meets requirements,
go offline.
9. Save the project.
10--10
Answers
Exercise A
2. The following is one way to set up the sequencer:
Rung 0
Rung 1
Rung 2
Rung 3
10--11
Rung 4
10--12
Rung 5
Lesson
11
Procedural
Control
Equipment
Control
Add Water
11--2
Equipment
Control
Add Water
The procedure sets the command tags and monitors the status tags.
The equipment control monitors the command tags and sets the
status tags.
Benefits
By separating the procedure from the equipment control, your
application becomes much easier to program, maintain, and edit:
You can develop and test the equipment control separate from the
procedure.
11--3
Action
Details
1.
The procedure decides when that section of equipment should start. It does not need to
handle the details of how the equipment starts or which devices are part of that section.
The procedure does need to know if the equipment responded to the command, so it waits
for status from the equipment. When it sees that the equipment responded, the procedure
moves on to the next command.
2.
The equipment control handles the details of how to perform the command. This includes
which devices to use, the specific actions to use them, and any interlocks or other
requirements. The equipment control also determines the status of the devices.
11--4
Example
Guideline
Conveyor_01 Section
Example
Guideline
Start
Stop
Direction
Speed
Reset Faults
Conveyor_01 Section
Start
Stop
Direction
Speed
Reset Faults
11--5
Conveyor_01 Section
Conveyor_02_Start
Conveyor_01_Start
Conveyor_01_Stop
Conveyor_02_Stop
Example
Guideline
State (on/off)
Actual Direction
Faulted
Conveyor_01 Section
State (on/off)
Actual Direction
Faulted
11--6
Conveyor_01 Section
Conveyor_02_Start
Conveyor_02_Stop
Conveyor_02_State
Conveyor_01_Start
Conveyor_01_Stop
Conveyor_01_State
Example
The following graphic shows the equipment control for one of the
conveyor sections. Notice that it is in its own routine:
Start Command
State
When the routine gets the Start command, it turns on the motor for
the conveyor. When the auxiliary contact shows that the motor is
running, the routine changes the state to on.
While this example uses only a motor, you can apply the concept to
more complex situations that use multiple pieces of equipment.
E 2012 Rockwell Automation, Inc. All rights reserved.
11--7
Example
The following graphic shows the sequencer for the whole system:
Start Command
State
11--8
Heres How
IMPORTANT: To meet IACET CEU
requirements and fully prepare
certificate students for the final
exam, you must demonstrate all
lesson objectives using the proper job
aids.
Demonstration Checklist
Use the steps below and the information
on the Demonstration Checklist to help
guide you during the demonstration:
1. Open the SPE_1756R_DEM1 file.
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
11--9
Valve_01
Motor_01
Feed_01
Feed_02
Sensor_Level_2
Sensor_Level_1
Sensor_Tank_Empty
Valve_03
Drain
Tank Procedure
When the operator presses the start button, the tank runs this
procedure one time:
Action
1.
2.
3.
4.
Details
A. Turn on Valve_01 and add the first ingredient to the tank from Feed_01.
B. When Sensor_Level_1 turns on, turn off Valve_01 and stop the ingredient.
A. Turn on Valve_02 and add the second ingredient to the tank from Feed_02.
B. When Sensor_Level_2 turns on, turn off Valve_02 and stop the ingredient.
Start and stop Motor_01.
A. Turn on Valve_03 and drain the tank.
B. When Sensor_Tank_Empty turns on, turn off Valve_03.
E 2012 Rockwell Automation, Inc. All rights reserved.
SPEe56r
11--10
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Directions:
1. On the diagram below, divide the tank into sections and draw a
line around the equipment of each section. We did the first section
for you.
Valve_02
Valve_01
Feed_01
Motor_01
Feed_02
Sensor_Level_2
Sensor_Level_1
Sensor_Tank_Empty
Valve_03
Drain
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Exercise B
11--11
Mixing Procedure
1.
If the procedure calls for Feed_01 AND the stop signal is off AND Sensor_Level_1 is off,
turn on Valve_01.
When Sensor_Level_1 turns on OR the stop signal turns on, turn off Valve_01.
Notes:
Valve_01 stays on even if the procedure turns off the call for Feed_01.
Sensor_Level_1 turns on when the tank has enough of ingredient 1.
The stop signal gives someone the option to manually stop the feed.
2.
If Valve_01 is on AND Valve_01_FB1 is on, signal that the feed is on. Otherwise, signal that
the feed is off.
Note: Valve_01_FB1 is a limit switch that turns on if the valve is fully open.
3.
If the procedure calls for Feed_02 AND the stop signal is off AND Sensor_Level_2 is off,
turn on Valve_02.
When Sensor_Level_2 turns on OR the stop signal turns on, turn off Valve_02.
Notes:
Valve_02 stays on even if the procedure turns off the call for Feed_02.
Sensor_Level_2 turns on when the tank has enough of ingredient 2.
The stop signal gives someone the option to manually stop the feed.
Command?
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
2. Choose tag names and data types for the commands for Feed_01.
Write your choices in the table below. The table has more rows
than youll probably need:
Equipment Section
Feed_01
Command Tag
Data Type
11--12
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Decide which of the values below are commands for the Mixer
section:
Value
Command?
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
4. Choose tag names and data types for the commands for the Mixer
section. Write your choices in the table below. The table has more
rows than youll probably need:
Equipment Section
Mixer
Command Tag
Data Type
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Exercise C
11--13
Mixing Procedure
1.
If the procedure calls for Feed_01 AND the stop signal is off AND Sensor_Level_1 is off,
turn on Valve_01.
When Sensor_Level_1 turns on OR the stop signal turns on, turn off Valve_01.
Notes:
Valve_01 stays on even if the procedure turns off the call for Feed_01.
Sensor_Level_1 turns on when the tank has enough of ingredient 1.
The stop signal gives someone the option to manually stop the feed.
2.
If Valve_01 is on AND Valve_01_FB1 is on, signal that the feed is on. Otherwise, signal that
the feed is off.
Note: Valve_01_FB1 is a limit switch that turns on if the valve is fully open.
3.
If the procedure calls for Feed_02 AND the stop signal is off AND Sensor_Level_2 is off,
turn on Valve_02.
When Sensor_Level_2 turns on OR the stop signal turns on, turn off Valve_02.
Notes:
Valve_02 stays on even if the procedure turns off the call for Feed_02.
Sensor_Level_2 turns on when the tank has enough of ingredient 2.
The stop signal gives someone the option to manually stop the feed.
Status?
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
2. Choose tag names and data types for the status for Feed_01.
Write your choices in the table below. The table has more rows
than youll probably need:
Equipment Section
Feed_01
Status Tag
Data Type
11--14
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Decide which of the values below are status information for the
Mixer section:
Value
Status?
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
4. Choose tag names and data types for the status for the Mixer
section. Write your choices in the table below. The table has more
rows than youll probably need:
Equipment Section
Mixer
Status Tag
Data Type
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Exercise D
11--15
Mixing Procedure
1.
If the procedure calls for Feed_01 AND the stop signal is off AND Sensor_Level_1 is off,
turn on Valve_01.
When Sensor_Level_1 turns on OR the stop signal turns on, turn off Valve_01.
Notes:
Valve_01 stays on even if the procedure turns off the call for Feed_01.
Sensor_Level_1 turns on when the tank has enough of ingredient 1.
The stop signal gives someone the option to manually stop the feed.
2.
If Valve_01 is on AND Valve_01_FB1 is on, signal that the feed is on. Otherwise, signal that
the feed is off.
Note: Valve_01_FB1 is a limit switch that turns on if the valve is fully open.
3.
If the procedure calls for Feed_02 AND the stop signal is off AND Sensor_Level_2 is off,
turn on Valve_02.
When Sensor_Level_2 turns on OR the stop signal turns on, turn off Valve_02.
Notes:
Valve_02 stays on even if the procedure turns off the call for Feed_02.
Sensor_Level_2 turns on when the tank has enough of ingredient 2.
The stop signal gives someone the option to manually stop the feed.
4.
If Valve_02 is on AND Valve_02_FB1 is on, signal that the feed is on. Otherwise, signal that
the feed is off.
Note: Valve_02_FB1 is a limit switch that turns on if the valve is fully open.
5.
If the procedure calls for Mixer AND the stop signal is off, turn on Motor_01.
When the stop signal turns on, turn off Motor_01.
If Motor_01 is on and its auxiliary contact is on, signal that the mixer is on. Otherwise, signal
that the mixer is off.
Notes:
Motor_01 stays on even if the procedure turns off the call for Mixer.
The auxiliary contact turns on if the motor is on.
6.
If the procedure calls for Drain AND the stop signal is off AND Sensor_Tank_Empty is off,
turn on Valve_03.
When Sensor_Tank_Empty turns on OR the stop signal turns on, turn off Valve_03.
Notes:
Valve_03 stays on even if the procedure turns off the call for Drain.
Sensor_Tank_Empty turns on when the tank is empty.
The stop signal gives someone the option to manually stop draining.
7.
If Valve_03 is on AND Valve_03_FB1 is on, signal that the drain is on. Otherwise, signal that
the drain is off.
Note: Valve_03_FB1 is a limit switch that turns on if the valve is fully open.
11--16
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Workstation Devices
Use these workstation devices to represent the equipment of the tank:
Motor_01_Out
Valve_03_Out
Start
Valve_01_Out
Valve_02_Out
Tag Name
Alias For
Workstation Device
Start
Local:2:I.Data.0
DI0
Valve_01_Out
Local:0:O.Data.1
DO1
Valve_02_Out
Local:0:O.Data.2
DO2
Motor_01_Out
Local:0:O.Data.3
DO3
Valve_03_Out
Local:0:O.Data.4
DO4
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
11--17
2. Open the program tags for MainProgram and review the tags that
are already there.
The project already has tags for the sensors, feedback devices,
valves, and motor. Make sure you use these tags:
Turns the sensors on and off as you fill and empty the tank.
Turns the feedback for the valves on and off as you open and
11--18
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
11--19
11--20
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Answers
Exercise A
1. and 2. Heres the sections we chose for the tank.
Feed_01
Mixer
Valve_01
Feed_02
Valve_02
Motor_01
Feed_01
Feed_02
Sensor_Level_2
Sensor_Level_1
Drain
Sensor_Tank_Empty
Valve_03
Drain
Exercise B
1. These are probably commands for Feed_01:
Value
Command?
Reason
Yes ;
No
Yes
No ;
Yes
No ;
Although the procedure could use this value, the procedure doesnt give
the value. So it isnt a command.
Yes
No ;
The procedure doesnt need to know the state of the sensor. The
equipment section uses it to start and stop.
Yes
No ;
The equipment section doesnt use it. The section waits for its start
command from the procedure.
Yes ;
No
Yes
No ;
Command Tag
Data Type
Feed_01_Start
Feed_01_Stop
BOOL
BOOL
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
11--21
Command?
Reason
Yes ;
No
Yes ;
No
Yes
No ;
Yes
No ;
Yes
No ;
Although the procedure could use this value, the procedure doesnt give
the value. So it isnt a command.
Yes
No ;
Yes
No ;
Yes
No ;
The equipment section doesnt use it. The section waits for its start
command from the procedure.
Command Tag
Data Type
Mixer_Start
Mixer_Stop
BOOL
BOOL
Exercise C
1. These are probably statuses for Feed_01:
Value
Command?
Reason
Yes
No ;
Yes
No ;
Yes ;
No
The equipment section controls this value. The procedure monitors it.
Yes
No ;
The procedure doesnt need to know the state of the sensor. The
equipment section uses it to stop.
Yes
No ;
The equipment section doesnt use it. The section waits for its start
command from the procedure.
Yes
No ;
Yes
No ;
Equipment Section
Status Tag
Data Type
Feed_01
Feed_01_State
BOOL
11--22
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Status?
Reason
Yes
No ;
Yes
No ;
Yes
No ;
Yes
No ;
Yes ;
No
The equipment section controls this value. The procedure monitors it.
Yes
No ;
Yes
No ;
Yes
No ;
The equipment section doesnt use it. The section waits for its start
command from the procedure.
Status Tag
Data Type
Mixer
Mixer_State
BOOL
Exercise D
4. Heres one way to program the equipment control for each
section:
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
11--23
11--24
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
11--25
11--26
Exercise: Separating the Procedure from Equipment Control in an RSLogix 5000 Project
Lesson
12
Part_Data[1]
Part_Data[0]
Part_Data[3]
Part_Data[5]
Part_Data[2]
Part_Data[4]
12--2
The elements in the array occupy memory in order. The array always
starts at 0 and extends to the number of elements minus 1.
Tip "
Format
ArrayName[Element Number]
Example/Application
PartData[4]
Application: Selecting a timer
from a group of fault timers
Variable element
ArrayName[Tag]
Part[SerialNumber]
ArrayName[Expression]
Numeric bit
ArrayName[Element].Bit
Process_Time[5].DN
Chalk Talk: Have students write out other examples of each array
addressing type.
12--3
Description
Add
--
Subtract/Negate
Multiply
Divide
And
And
Not
Complement
Or
Or
Tip "
"
12--4
Tip "
The length is too large if it is more than the total number of elements
in the Destination array.
Activity: As your instructor demonstrates the COP and FLL
instructions, notice the key points:
Heres How
IMPORTANT: To meet IACET CEU
requirements and fully prepare
certificate students for the final exam,
you must demonstrate all lesson
objectives using the proper job aids.
12--5
Demonstration Checklist
Use the steps below to help guide you
during the demonstration:
1. Open the PCF_1756R_DEM1.acd
file. The Instructor_Demo program is
currently scheduled to run.
2. In the
Copy_and_FLL_Two_1x15_Arrays
routine, create two arrays: 1 x 15.
These will become the Source and
Destination of the COP instruction.
12--6
12--7
Process_Data_Loaded
All_Data_Entered
Set_Tons_Molten_Iron
(2 - 5 = 20 - 50 Tons)
Sim_Molten_Iron
Display_Tons_Molten_Iron (1-10)
Sim_Oxy_In
All_Data_In
Tag Name
Tip "
Alias For
Workstation
Device
Set_Tons_Molten_Iron
Local:8:I.Ch0Data
AI0
Load_Process_Data
Local:2:I.Data.2
DI2
All_Data_Entered
Local:2:I.Data.6
DI6
Process_Data_Loaded
Local:4:O.Data.6
DO6
All_Data_In
Local:4:O.Data.7
DO7
Sim_Molten_Iron
Local:4:O.Data.9
DO9
Sim_Oxy_In
Local:4:O.Data.10
DO10
Sim_Cr_In
Local:4:O.Data.11
DO11
Display_Tons_Molten_Iron
Local:7:O.Ch0Data
AO0
Display_Tons_Molten_Iron_Processing
Local:7:O.Ch1Data
AO1
Start_New_Run
Local:2:I.Data.10
DI10
New_Run
Local:4:O.Data.8
DO8
12--8
Tip "
Tip "
Each of the bullet car loads (depends on how many you loaded in the
above step) takes 60 seconds in this simulation to fully complete.
They will all complete automatically, one at a time, after you start
the steelmaking process.
Rev. June 2012
PCFe56r
12--9
12--10
Answers
Exercise A
2. The single dimension arrays should look similar to the
following graphics:
12--11
12--12
Appendix
BLACK
RED
DO0
OUT- 0
OUT- 1
OUT- 2
10
OUT- 3
DO3
12
OUT- 4
DO4
11
OUT- 5
6
8
14
DO1
DO2
DO5
GND- 0
+DC- 1
+DC- 1
+DC- 1
+DC- 1
+DC- 1
+DC- 1
16
28
DO2 = Local:0:O.Data.2
+DC- 1
30
DO3 = Local:0:O.Data.3
GND- 1
GND- 1
Not Used
32
DO4 = Local:0:O.Data.4
34
DO5 = Local:0:O.Data.5
18
20
22
24
26
36
DO0 = Local:0:O.Data.0
DO1 = Local:0:O.Data.1
BLACK
RED
+DC- 0
+DC- 0
+DC- 0
+DC- 0
+DC- 0
+DC- 0
+DC- 0
LABEL
24VDC
A--2
BLACK
BLACK
BLACK
BLACK
10
12
11
IN- 4
IN- 5
14
13
IN- 6
GND- 1
GND- 2
GND- 2
GND- 2
GND- 2
GND- 3
GND- 3
GND- 3
16
15
18
17
20
19
22
21
IN- 7
IN- 8
IN- 9
IN- 10
24
23
26
25
28
27
30
29
GND- 3
GND- 3
NOT USED
32
31
34
33
IN- 11
IN- 12
IN- 13
IN- 14
IN- 15
NOT USED
36
35
NOT USED
+24VDC
DI0
DI1
DI2
IN- 0
IN- 1
IN- 2
IN- 3
GND- 0
GND- 0
GND- 0
GND- 0
GND- 1
GND- 1
GND- 1
LABEL
DI3
DI4
DI5
DI6
DI7
DI8
DI9
DI10
DI11
DI12
DI13
DI14
DI15
DI0 = Local:2:I.Data.0
DI8 = Local:2:I.Data.8
DI1 = Local:2:I.Data.1
DI9 = Local:2:I.Data.9
DI2 = Local:2:I.Data.2
DI10 = Local:2:I.Data.10
DI3 = Local:2:I.Data.3
DI11 = Local:2:I.Data.11
DI4 = Local:2:I.Data.4
DI12 = Local:2:I.Data.12
DI5 = Local:2:I.Data.5
DI13 = Local:2:I.Data.13
DI6 = Local:2:I.Data.6
DI14 = Local:2:I.Data.14
DI7 = Local:2:I.Data.7
DI15 = Local:2:I.Data.15
- NORMALLY OPEN PUSHBUTTON
- SELECTOR SWITCH
A--3
+DC- 0
+DC- 0
+DC- 0
+DC- 0
+DC- 0
+DC- 0
+DC- 0
2
4
6
WORKSTATION
DEVICE
10
12
OUT- 6
OUT- 7
DO6
13
GND- 0
+DC- 1
+DC- 1
+DC- 1
+DC- 1
+DC- 1
+DC- 1
+DC- 1
16
15
18
17
30
DO6 = Local:4:O.Data.6
GND- 1
GND- 1
NOT USED
32
DO7 = Local:4:O.Data.7
BLACK
14
21
24
23
OUT- 11
20
19
DO9
DO10
G
A
R
DO11
26
28
34
DO8 = Local:4:O.Data.8
36
DO9 = Local:4:O.Data.9
DO10 = Local:4:O.Data.10
DO11 = Local:4:O.Data.11
+24VDC
DO7
DO8
BLACK
RED
22
OUT- 8
OUT- 9
OUT- 10
LABEL
A--4
AO1 (Channel 1)
AO0
Return
WORKSTATION
DEVICE
OUT- 1
OUT- 0
NOT USED
NOT USED
RTN- 1
RTN- 0
OUT- 3
OUT- 2
NOT USED
10
NOT USED
RTN- 3
12
11
RTN- 2
NOT USED
14
13
NOT USED
OUT- 5
16
15
OUT- 4
NOT USED
18
17
NOT USED
RTN- 5
20
19
RTN- 4
AO0 (Channel 0)
AO1
Return
AO0 = Local:7:O.Ch0Data
AO1 = Local:7:O.Ch1Data
A--5
+10VDC
WORKSTATION
DEVICE
AI1
(Channel 1)
AI1
Return
WORKSTATION
DEVICE
IN- 1/V
IN- 0/V
IN- 1/I
IN- 0/I
RET- 1
RET- 0
IN- 3/V
IN- 2/V
IN- 3/I
10
IN- 2/I
RET- 3
12
11
RET- 2
NOT USED
14
13
NOT USED
IN- 5/V
16
15
IN- 4/V
IN- 5/I
18
17
IN- 4/I
RET- 5
20
19
RET- 4
AI0
(Channel 0)
AI0
Return
AI0 = Local:8:I.Ch0Data
AI1 = Local:8:I.Ch1Data
A--6
DI6
DI5
DI11
DO11
DI15
DI10
DO8
DI14
DO5
DI13
DI12
DO10
DI7
DI3
DO9
DI9
DO4
DO6
DO3
DO7
DI2
DI1
DI8
DO2
DI4
DO1
DI0
DO0
Ch01 Analog
Meter Output
Ch00 Analog
Meter Output
Ch01 Analog
Meter Input
Ch00 Analog
Meter Input
Appendix
B--2
The devices used in the workstation have the following I/O base
tags:
Module
Digital Input
wired to Slot 2
Digital Output
wired to Slot 0
Digital Output
wired to Slot 4
Workstation Device
DI0
DI1
DI2
DI3
DI4
DI5
DI6
DI7
DI8
DI9
DI10
DI11
DI12
DI13
DI14
DI15
D00
D01
D02
D03
D04
D05
D06
D07
D08
D09
D010
Local:2:I.Data.0
Local:2:I.Data.1
Local:2:I.Data.2
Local:2:I.Data.3
Local:2:I.Data.4
Local:2:I.Data.5
Local:2:I.Data.6
Local:2:I.Data.7
Local:2:I.Data.8
Local:2:I.Data.9
Local:2:I.Data.10
Local:2:I.Data.11
Local:2:I.Data.12
Local:2:I.Data.13
Local:2:I.Data.14
Local:2:I.Data.15
Local:0.O.Data.0
Local:0.O.Data.1
Local:0.O.Data.2
Local:0.O.Data.3
Local:0.O.Data.4
Local:0.O.Data.5
Local:4:O.Data.6
Local:4:O.Data.7
Local:4:O.Data.8
Local:4:O.Data.9
Local:4:O.Data.10
D011
Local:4:O.Data.11
1336 IMPACT
CompactLogix
ControlLogix
DH+
FactoryTalk
FlexLogix
Logix5550
PanelView
PHOTOSWITCH
RediSTATION
RSLogix
RSNetWorx
SLC
Ultra
PowerPoint
Windows NT