Sunteți pe pagina 1din 7

LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01111

Relay Logic
SLogix elay Logic !"#tructio"#
This exercise is designed to familiarize you with the operation of LogixPro and to step you
through the process of creating, editing and testing simple PLC programs utilizing the Relay
Logic Instructions supported by RSLogix
!rom the Simulations "enu at the top of the screen, Select the I#$ Simulation and ensure that
the %ser Instruction &ar shown abo'e is 'isible Refer to page ( of this Lab
The program)editing window should contain a single rung This is the *nd of Program rung and
is always the last rung in any program If this is the only rung 'isible then your program is
currently empty
If your program is not empty, then clic+ on the !ile menu entry at the top of the screen and select
,-ew, from the drop)down list . dialog box will appear as+ing for you to select a Processor
Type /ust clic+ on ,$0, to accept the default TLP LogixPro selection
$o% maximi&e t'e ProSim (!! Simulatio" )i"do%
LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01***
The I/O Simulator
The simulator screen shown abo'e should now be in 'iew !or this exercise we will be using the
I#$ simulator section, which consists of 12 switches and lights Two groups of 34 toggle switches
are shown connected to 2 Input cards of our simulated PLC Li+ewise two groups of 34 Lights
are connected to two output cards of our PLC The two input cards are addressed as ,I53, and
,I51, while the output cards are addressed ,$52, and ,$5(,
%se your mouse to clic+ on the 'arious switches and note the change in the status color of the
terminal that the switch is connected to "o'e your mouse slowly o'er a switch, and the mouse
cursor should change to a hand symbol, indicating that the state of switch can be altered by
clic+ing at this location 6hen you pass the mouse o'er a switch, a ,tool)tip, text box also
appears and informs you to ,Right Clic+ to Toggle Switch Type, Clic+ your right mouse button
on a switch, and note how the switch type may be readily changed
RSLogix Program Creation
Collapse the I#$ simulation screen bac+ to its normal size by clic+ing on the same 7center8
button you used to maximize the simulation9s window :ou should now be able to see both the
simulation and program windows again If you wish, you can ad;ust the relati'e size of these
windows by dragging the bar that di'ides them with your mouse
I want you to now enter the following single run program, which consists of a single Input
instruction 7<IC ) *xamine If Closed8 and a single $utput instruction 7$T* ) $utput *nergize8
There9s more than one)way to accomplish this tas+, but for now I will outline what I consider to
be the most commonly used approach
LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01+++
!irst clic+ on the ,-ew Rung, button in the %ser Instruction &ar It9s the first button on the
'ery left end of the &ar If you hold the mouse pointer o'er any of these buttons for a second or
two, you should see a short ,ToolTip, which describes the function or name of the instruction that
the button represents
:ou should now see a new Rung added to your program as shown abo'e, and the Rung number
at the left side of the new rung should be highlighted -ote that the new Rung was inserted
abo'e the existing 7*-=8 *nd $f Program Rung .lternati'ely you could ha'e dragged 7left
mouse button held down8 the Rung button into the program window and dropped it onto one of
the locating boxes that would ha'e appeared -ote5 If Rung -umber not highlighted clic+ left
mouse button on the Rung number 6hen dragging and dropping watch for the red cursor to
change to a > as you approach a location In RSLogic ?@@ software the red sAuare will turn
-ow clic+ on the <IC instruction with your left mouse button 7Left Clic+8 and it will be added
to the right of your highlighted selection -ote that the new <IC instruction is now selected
7highlighted8 $nce again, you could ha'e alternati'ely dragged and dropped the instruction into
the program window -ote5
If you accidentally add an instruction, which you wish to remoe, !ust Left Clic" on the
instruction to select it, and then #ress the $%el$ "ey on your "eyboard& 'lternatiely, you
may right clic" on the instruction and then select $Cut$ from the dro#(down menu that
Left Clic+ on the $T* output instruction and it will be .dded to the right of your current
=ouble Clic+ 72 Auic+ left mouse button clic+s8 on the <IC instructionBs Cuestion "ar+ and a
textbox should appear which will allow you to enter the address 7I53#@8 of the switch we wish to
monitor &egin typing address the Auestion mar+ will be writing o'er or use the &ac+space +ey to
get rid of the ,D, currently in the textbox $nce you type in the address, clic+ anywhere else on
the instruction 7other than the textbox8 and the box should close
LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01,,,
*nter the address the $T* instruction, before continuing howe'er, =ouble chec+ that the
addresses of your instructions are correct
Right Clic+ on the <IC instruction and select ,*dit Symbol, from the drop)down menu that
appears .nother textbox will appear where you can type in a name 7Switch)@8 to associate with
this address .s before, a clic+ anywhere else will close the box .dd symbol Lamp)@ to the $T*
address $52#@ -ote5 %sing RSLogic ?@@ S6 you must enter address before editing symbol
Testing your Program
It9s now time to ,=ownload, your program to the PLC !irst clic+ on the ,Toggle, button at the top
right corner of the *dit Panel, which will bring the PLC Panel into 'iew -ote5 This "ethod of
Toggle the instruction bar is only for LogicPro this is not the method using RSLogic ?@@
software =ownload method is different using RSLogic ?@@
Clic+ on the ,=ownLoad, button to initiate the downloading of your program to the PLC $nce
complete, clic+ inside the ,R%-, option selection circle to start the PLC scanning
*nlarge the Simulation window so that you can see both the Switches and Lamps, by dragging
the bar that separates the Simulation and Program windows to the right with your mouse -ow
clic+ on Switch I53#@@ in the simulator and if all is well, Lamp $52#@@ should illuminate
Toggle the Switch $n and $ff a number of times and note the change in 'alue indicated in the
PLC Panel9s status boxes, which are being updated constantly as the PLC Scans Try placing
the PLC bac+ into the ,PE", mode and then toggle the simulator9s Switch a few times and note
the result Place the PLC bac+ into the ,Run, mode and the Scan should resume
6e are usually told to thin+ of the <IC instruction as an electrical contact that allows electrical
flow to pass when an external switch is closed 6e are then told that the $T* will energize if the
flow is allowed to get through to it In actual fact the <IC is a conditional instruction that tests any
bit that we address for Truth or a 3
)diting your Program
Clic+ on the ,Toggle, button of the PLC Panel, which will put the PLC into the PE" mode and
bring the *dit Panel bac+ into 'iew
-ow add a second rung to your program as shown below This time instead of entering the
LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01---
addresses as you did before, try dragging the appropriate address which is displayed in the I#$
simulation and dropping it onto the instruction
*ote that the <IC instruction, which Tests for Fero or !alse has, it9s address highlighted in
yellow This indicates that the instruction is True, which in the case of an <IC, means that the bit
addressed is currently a Fero or !alse
This is probably a good time to practice your drag drop s+ills Try mo'ing instructions from rung
to rung by holding the left mouse button down while o'er an instruction, and then while +eeping
the mouse button down, mo'e the mouse 7and instruction8 to a new location Try doing the same
with complete rungs by dragging the box at the left end of the rung and dropping it in a new
$nce you feel comfortable with drag drop, ensure that your program once again loo+s li+e the
one pictured abo'e, -ow download your program to the PLC and place the PLC into the Run
"ode Toggle both Switch)@ and Switch)3 on and off a number of times and obser'e the effects
this has on the lamps *nsure that you are satisfied with the operation of your program before
proceeding further
Sto#/Start utili+ing OTL and OT,
!or this exercise we need two -ormally $pen momentary switches %sing your right mouse
button, clic+ on switch ,I53#2, and ,I53#1,, changing them to -$ pushbuttons -ow add the
following two rungs to your program $nce you ha'e the rungs entered correctly, download and
run your modified program
.cti'ate the Start and Stop switches and ensure that the $TL and $TL output instructions are
responding as outlined in your text $nce you ha'e the lamp $-, could you turn it off if power
was lost in the Stop Switch circuitD
LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01...
-ow modify your program so that it operates correctly when you substitute the -$ Stop switch
7I53#@18 with a -ormally Closed Switch If we now lost power on the -C Stop switch circuit, what
would happen to the state of Lamp 7$52#@28D

)mulating Standard Sto#/Start Control
*rase your program by selecting ,-ew, from the ,!ile, menu selection at the top of the screen
6hen the dialog box appears ;ust clic+ on ,$0, to select the default PLC type -ow enter the
following program To enter a branch, ;ust drag the branch 7button8 onto the rung and then insert
or drag instructions into the branch
-ote5 Eo to I#$ Simulator and Toggle Switches to desired switch type for this exercise
&efore you download and run this program, ta+e a careful loo+ at our use of a <I$ instruction to
test the state of the -C Stop Switch 6hen someone presses the Stop Switch, will bit I53#@( go
True or !alseD 6ill the <IC instruction go True or !alse when the Switch is pressedD Is this the
logic we are see+ing in this caseD Run the program and see if you9re rightG If we loose
power in the Stop Switch circuit, what state will the lamp go toD 6hy do you thin+ that most
prefer this method rather than the $TL#$T% method of implementing Stop#Start ControlD
Out#ut -ranching with RSLogix
"odify your program so that it matches the following
=ownload and Run the program $perate the Stop and Start switches se'eral times with Switch)
@ open, and again with Switch)@ closed Remo'e the <IC instruction from the $utput branch and
note what happens to Lamp)1 when you Start and Stop the circuit Try mo'ing the Lamp)1 $T*
instruction so that it is in series with the Lamp)2 $T* instruction =ownload, Run and obser'e
LogixPro Lab edited by Jim Gulledge Georgia Quick Start GDTAE 11/9/01///
how both lamps still light e'en with the empty branch 7shortD8 in place It may loo+ li+e an
electrical circuit but in fact we +now that it isn9t and therefore obeys a somewhat different set of
rules Remo'e the empty branch, =ownload, Run and see if this has any effect on the logic or
operation of the rung -ote5 $utputs canBt be series using RSLogic ?@@

Controlling One Light from two Locations
Create, enter and test a program, which will perform the common electrical function of controlling
a light from two different locations Clear your program and utilize toggle switch 7I53#@@8 and
switch 7I53#@38 to control Lamp 7$52#@@8 7Hint5 If both switches are $n or if both switches are
$ff, then the Lamp should be $nG This of course is ;ust one approach to sol'ing this problem8