0% found this document useful (0 votes)
657 views

Micrologix Lab 2

MicroLogix 1100 RSLogix 500 LAB#2 Timing, Counting & Comparing Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 1 What we are going to do: I:0/0 O:0/0 ][ ( ) I:0/1 I:0/2 C5:0/DN O:0/1 ]/[ ][ O:0/1 ]/[ ( ) • We are going to take your program from Lab #1, modify two rungs, and create some new program logic. • We are also going to program a Timer, and Counter. We will then use these in our program to see how they can be used to provide unique control capabilities. •
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
657 views

Micrologix Lab 2

MicroLogix 1100 RSLogix 500 LAB#2 Timing, Counting & Comparing Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 1 What we are going to do: I:0/0 O:0/0 ][ ( ) I:0/1 I:0/2 C5:0/DN O:0/1 ]/[ ][ O:0/1 ]/[ ( ) • We are going to take your program from Lab #1, modify two rungs, and create some new program logic. • We are also going to program a Timer, and Counter. We will then use these in our program to see how they can be used to provide unique control capabilities. •
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

MicroLogix

1100
RSLogix 500 LAB#2

Timing, Counting & Comparing

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 1


What we are going to do:

I:0/0 O:0/0 • We are going to take your program from Lab #1,
][ ( )
modify two rungs, and create some new program
I:0/1
]/[
I:0/2
][
C5:0/DN
]/[
O:0/1
( ) logic.
O:0/1

• We are also going to program a Timer, and Counter.


][

T4:0/DN O:0/1 O:0/2


][ ][ ( )
We will then use these in our program to see how
O:0/1 TON

][ TIMER ON DELAY
Timer
Time Base
T4:0
1.0
(EN) they can be used to provide unique control
Preset 10 (DN)
Accum 0
capabilities.
O:0/0 CTU
COUNT UP (CU)
• The last thing we will do is program a Limit
][ Counter C5:0
Preset 10
Accum 0 (DN)

I:0/3 C5:0
command. The limit command is one of several
][ ( RES )

O:0/3
powerful comparison instructions available in the
LIM
LIMIT TEST ( )
Low Limit
Test
High Lim
3
T4:0.ACC
7
MicroLogix controller.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 2


Steps for Today’s Assignments

1. Save a Copy of your first lab under a different name

2. Modify your existing program

3.Add a timer, counter and limit instruction to your program

4.Transfer your program to the MicroLogix 1100

5.Monitor and test your program

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 3


Go Offline with the Controller

If you are ONLINE with the


MicroLogix you must go
OFFLINE to complete this
process
– Click the down arrow by the green box that
says REMOTE RUN
– Select “Go Offline”

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 4


Copy and Rename Your 1st Program

1. Click “File” Menu 1


– Select “Save As” to create a copy

2. Type the new name


– Type MICROECONOMIX LAB 2 in the “File
name” box
– Type M_LAB2 in the “Processor Name” box
– Click “Save”

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 5


Modify Existing Logic
Modify the 2 rungs: 3

I:0/0 O:0/0
][ ( )

I:0/1 I:0/2 C5:0/DN O:0/1


]/[ ][ ]/[ ( )

O:0/1
][
3. Add XIO O:0/1
T4:0/DN Instruction toO:0/2
][
rung 0001] [ ( )

– Make sure the Program Window is active (the right


window title bar is colored or highlighted)
– Click on the “User” tab
– Click, hold the left mouse button and Drag the XIO
button in between the branch and the OTE. When
you see a green box, release the mouse button.
– With the instruction highlighted Type C5:0/DN
[Enter]. This is the address of the XIO(examine if
open) instruction

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 6


Modify Existing Logic
4. Modify the 1st XIC in rung 0002
– Double click on the first XIC instruction, this will open
the text edit box for the instruction.
– Type T4:0/DN [Enter]. This will overwrite the existing
address.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 7


Add a Timer to Your Program
Program this rung:

5
O:0/1 TON

][ TIMER ON DELAY
Timer T4:0
(EN)
Time Base 1.0
5. Create a New Rung Preset 10 (DN)
Accum 0

– Still in the “User” tab Click, hold and Drag the


“New Rung” button over “0003”. When you see a
green box, release the mouse button.

6. Add an Input Instruction


– Click, hold and Drag the XIC button onto the left
side of the rung you just created. When you see a
green box, release the mouse button.
– With the instruction highlighted Type O:0/1
[Enter].
– Notice this instruction has the same address as
the Output on rung 0001.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 8


Add a Timer to Your Program
Program this rung:

O:0/1 TON
7b 7a
][ TIMER ON DELAY
Timer T4:0
(EN)
Time Base 1.0
7. Add the Timer Instruction
( )
Preset
Accum
10
0
DN

– a) Click on the “Timer/Counter” tab. This


changes the instruction buttons to timers and
counters
– b) Click, hold and Drag the TON (timer on delay)
button onto the right side of the rung you just
created. When you see a green box, release the
mouse button.
– c) Enter these parameters:
– Timer: T4:0 [Enter]
– Time Base: 1.0 [Enter]
– Preset: 10 [Enter]
– Accum: 0 [Enter]

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 9


Add a Counter to Your Program
Program this rung:

O:0/0 CTU

][ COUNT UP
Counter C5:0
(CU)
Preset 10
8. Create a New Rung Accum 0 (DN)
– Click on the “User” tab.
– Click, hold and Drag the “New Rung” button over
“0004”. When you see a green box, release the mouse
8
button.

9. Add an Input Instruction


– Click, hold and Drag the XIC button onto the left side
of the rung you just created. When you see a green
box, release the mouse button.
– With the instruction highlighted Type O:0/0 [Enter].
9

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 10


Add a Counter to Your Program
Program this rung:

O:0/0 CTU 10a


][ COUNT UP
Counter C5:0
(CU)
10.Add Counter Instruction
Preset
( )
Accum
10
0 DN
10b
– a) Click on the “Timer/Counter” tab. This changes the
instruction buttons to timers and counters.
– b) Click, hold and Drag the CTU (count up) button
onto the right side of the rung you just created. When
you see a green box, release the mouse button.
– c) Enter these parameters:
– Counter: C5:0 [Enter]
– Preset: 10 [Enter]
– Accum: 0 [Enter]

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 11


Add a Counter Reset Rung
13b
13a
Program this rung:
11

I:0/3 C5:0
11. ][
Create a New Rung
( RES )
– Click on the “User” tab.
– Click, hold and Drag the “New Rung” button
over “0005”. When you see a green box, release
the mouse button.

12. Add an Input Instruction


– Click, hold and Drag the XIC button onto the left
side of the rung you just created. When you see
a green box, release the mouse button.
– Type I:0/3 [Enter].

13. Add Reset Instruction 12


– a) Click on the “Timer/Counter” tab. This
changes the instruction buttons to timers and
counters
– b) Click and Drag the RES button onto the right
side of the rung you just created. When you see
a green box, release the mouse button. 13c
– c) Type C5:0 [Enter]

NOTE: The function of the RESet instruction is to


zero out the accumulator of the counter.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 12


Add a Limit Instruction
15b
15a
Program this rung:
LIM O:0/3
LIMIT TEST
Low Limit 3
( )
Test T4:0.ACC
High Lim 7

14.Create a New Rung


– Click on the “User” tab.
– Click and Drag the “New Rung” button
over “0006”. When you see a green box,
release the mouse button.

15.Add the Limit Instruction


– a) Click on the “Compare” tab.
– b) Click and Drag the LIM button onto the left
side of the rung you just created.
– c) Enter these parameters:
– Low Lim: 3
– Test: T4:0.ACC
– High Lim: 7
– NOTE: The LIMit instruction is true when the
15c
timer is between 3 and 7 seconds. The
question marks will disappear when you save
the program

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 13


Add a Limit Instruction

Program this rung:


LIM O:0/3
LIMIT TEST
Low Limit 3
( )
Test T4:0.ACC
High Lim 7

16.Add Output Instruction


– a) Click on the “Bit” tab to change the buttons.
16a
– b) Click and Drag the OTE button onto the
right side of the rung you just created.

– Type O:0/3 [Enter].

16b

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 14


Verify your work

17.To verify your work


– There are two types of verify. The first one
verifies the file you are in and only that file.
The second verifies all the files created or the
total project created. Because this program
only resides in one file we will use the first
one.
– Click on the “Verify file” button
– When the verify is completed and no errors
are found all program edit markers will
disappear and no errors found is displayed at
the bottom. 17
– Go to next step if errors are found

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 15


Verify your work
18.Program has errors
– To find the errors in the program click on the error
message in the “Verify results window the error is
then highlighted in the ladder window
– Fix the error and run “Verify file” again
– When all the errors are fixed you can then save
and download the program

18

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 16


Documenting your Program
19.Documenting your work
– Click on the Input C5:0/DN to highlight
– Right mouse on C5:0/DN and select “Edit
Description- C5:0/DN”
– Select “Address”
– Type “Counter done bit” in the Edit window
– Select “OK”

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 17


Documenting your Program
20.Documenting your work
– Click on the Output T4:0/DN to highlight
– Right mouse on T4:0/DN and select “Edit
Description- T4:0/DN”
– Select “Address”
– Type “Timer done bit” in the Edit window
– Select “OK”

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 18


Documenting your Program
21.Documenting your work
– Click on the Input I:0/3 to highlight
– Right mouse on I:0/3 and select “Edit Description- I:0/3”
– Select “Address”
– Type “Input 3” in the Edit window
– Select “OK”
– Complete the rest of the instruction descriptions
Counter C5 = C5:0
Output 3 =O:0/3

Notice that some of the instructions have the same


descriptions. This because the descriptions are link to
the address of each instruction

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 19


Documenting your Program

22.Documenting your work


– Click on rung 0006 to highlight
– Right mouse on rung 0006 and select “Edit
Comment”
– Select “File/Rung”
– Type “While the timer accumulator is between
3 and 7 seconds, the LIMit instruction will turn
output #3 ON”.
– Select “OK”

Notice that some of the instructions have the same


descriptions. This because the descriptions
are link to the address of each instruction

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 20


Save your work
23.Save your work
– Click on the “Save” button
– Click “Ok” for Revision note box. The
revision note box is used to keep track of
changes made to the existing program. You
can create many revisions of the same
program. This feature can be disabled if
desired.

23

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 21


Transfer the Program to the Micro

24.Download the Program


– Select the menu item
“Comms>System Comms”
– Three primary selections
– “Online” Establish the “path”
– “Upload” Receive from the controller
– “Download” Send to the controller

– Highlight the device at Node 01.


– Select “Download”

24

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 22


Transfer the Program to the Micro

25.Download the Program


– Select “OK” in the Revision note
window. The revision note box is used
to keep track of changes made to the
existing program. You can create
many revisions of the same program.
This feature can be disabled if desired.
– Select “Yes” to download your
program over the existing program
that resides in the processor. This
window will appear when ever a
program is being downloaded to the
processor.

25

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 23


Transfer the Program to the Micro

26.Download the Program


– Select “Yes” to put he processor in
Program. The processor must be in
program mode to download the
program
– The download window will appear
when the download occurs.
– Select “Yes” to change back to run
mode
– Select “Yes” to go online. This will
allow you to monitor the program that
now resides in the processor.

27.Test your program using


the switches and lights.
Does it work the way you
expect it to?

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 24


Monitor the Controller
With the controller in “Remote
Run”, you can monitor or
edit data within the
controller. This allows:
– Program debugging
– Change data variables while in run
When “Green” bars are shown on
either side of logic elements,
this indicates “Logical
Continuity”, this helps to
determine how the
application is operating.
This design is to help in
debugging an applications
logic.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 25


Monitor the Program

PROGRAM OPERATION
Rung 0- Push button #0, output #0 will
turn ON and the counter will count up
by 1. Push button #0 10 times, watch
the counters accumulator. When the
preset and the accumulator are equal
the counter will enable the done bit
and will disable output #1 as well as
the timer. Reset the counter with input
#3.
Rung 1- Push button #2 (start button),
output #1 will latch ON and the timer
will start timing. Push button #1 (stop
button) will turn OFF output #1 and
will stop & reset the timer.
RUNG 2- The two inputs on rung 2 are
conditions of rungs 1 and 4. The
output (output #2) is a condition of
these two inputs. So each outputs of
rungs 1 and 4 must be true to turn on
output #2. When the timer reaches 10
seconds, output #2 will turn ON. Rung 5- Push button #3 will reset the
Rung 3- The TON input is a condition of counter back to 0 and re-enable
rung 1. output #1 and the timer.
Rung 4- The CTU input is a condition of Rung 6- While the timer accumulator
rung 0. is between 3 and 7 seconds, the LIMit
instruction will turn output #3 ON.

Copyright © 2007 Rockwell Automation, Inc. All rights reserved. 26

You might also like