Anda di halaman 1dari 8

SouthernIllinois University Carbondale

Collegeof Engineering
Department of Technology

PLC Programming Tutorial

Purpose:

The purposeofthis tutorial is to give a briefintroduction to using the PLC


trainers and the RSLogix software availableat SIUC. RSLogix is Windows based
softwarethat is usedto program Allen-Bradley PLCs. This tutorial will give basic
instructionson how to write and download programs. This will give new usersthe
foundation to leam the many advancedfeaturesof RSLogix.

Starting RSLogix

From the desktopclick START>>Programs>>RockwellSoftware>>RSlogix 500


English>>. Click on RSLogix 500 English. When RSIogix startsclick the FILE
headingand selectNEW or usethe shortcutkey that is identical to the new file key in
Microsoft Word.
When a new file is selectedthe window in Figure I will open. This window is
usedto configure the program to a particular model of Allen Bradley PLC. The PLC
usedis this tutorial is a Micrologix 1500seriesA. The model numbersare listed on the
side ofthe PLC. Use the scroll to find the model of the PLC. Selectit using the mouse
and click OK

MXfrIU[TlltED

| 5/01 CPU , tX h
I 5/01Cm-1(h
Xi@Iqix 1500 U bi6 C
XifrIqix 1500 nP Sci.B B

.1162 l|iEoLqir 1200 ht* B


,1762 Xieolalr l20o sli l
.1761 Xirolqix 1000 balq
.1?61 lieo(qr:1000Ol-agvffilcw
.1761 Xidddis 1000
CffiiedW*
i Dd0 R@n[nd nrtfiEc
:l^q*-= F- w"r*.. I li6-rs-t
gnH

Figure l: ProcessorType Window

45
RSLogix Interface

The RSLogix interface is shown below. To begin constructinga program click on


the number 0000 next to the first and only blue rung. The number should now be inside
of a red box. The red box means that the rung has been selectedand can be edited. Start
by clicking the XIC button on the USER tool bar. Then click on the OUTPUT
ENERGIZE button on the USER toolbar. Rung 0000 should now appearas it doesin the
program below. Once there are instructionsin rung 0000 rung 0001 will appearbelow it.
Click on the 0001 to selectthe rung. Click on the XIO and OUTPUT ENERGIZE
buttons on the USER toolbar. Rung 0001 should now appearrls it does in Figure 2.

* db96f f ir df f iH+

D dg at r brr n . f------ n ir \r, Dt qqtr

I cor* crqa::
S P,d*sd edus
$ rt,orts
t J b corqM
$cmc-rqe-

El sYs o
Bl sYsr '
t w2-

E c,os3R.Em6
OUTPT]T ENERGIZE BUTTON
fl o-urur
D il-WI
D s2 - stAtus
E a3-BWY
O r., MR
D cs. c@rER
D s-cNRa
E Nz-N'6EF
8l F " c$FwD

O @-ortur
O tr.@r
- Jcdde.Mde
USf,R MEI{U TAB
O cwo,erhd (Selectedby default)
Cdm6r dcd hddr
-l
.J R.cp. Md6

?:@l M

il*-l 31e i ;n*!m.m...ll$"**rruru .{ V*fJ$ r'cm

Figure 1: RSLogix Interface

46
Defining Inputs and Outputs (I/O)

Using the left mouse button, double click on the logic symbolsto define the VO
address. When the symbols are selected a box will appear (refer to Figure 3). Define
input addressesfor XIO and XIC symbols using "I:0/0" format. Define output energize
addressesusing the "O:0/0" format. The capital I and O standfor input and ouqut,
respectively. The first number before the forward slashis the slot number and the
number after the slashis the point number. Make sureto not to use Os for 0s and vice
versa.
When all the VO addresseshavebeen defined use the VERIFY PROJECTbutton
(shown in Figure 3) to check the program for errors.

* E& h *rdr @ rool Yhdqi nf

D l ';E O I lbF n ' h..: 5r r Bt QQtrl ;;*1, >


E!n {Errft<}oo
II: D Uit
II:r**.-

I ca'o *6."
Sh@s'stu
S r(erb'
lll b c@iFdil
!f cr'ggcorsam

B sYso,
F sYsr.
0 t*t-

$ c.osrnoraco
O @.wrrut
El il -wr
D s2. slau
O $.EWY
D r.. rMR
O c5-cNF
El m-cdnd
O N7-N@F
B .E.tr$iwD

B @-Nru
E n-@r
- JCqnmHr@s
O do-wH
lCdmq#dMdt

'2:@l P :

|l*+1, gt $ I teoe{tkd.M.,.llERa"!..sm .l 9*fl* r:rrru


Figure l: Instruction Addressing

47
Should there be a prograrn error, a window will appear at the bofiom of the
screen. USethe "*" and "-" symbolsto expandthe errors. The expandedmessagewill
state what rung and which instruction oontains the error (seeFigure 4). Double clicking
on the expanded part of the messagewill select the operation that has the error.

B&2
i RnohrrRRc:hrJdm&d*

Figure l: Eror Message

If the progfam has no errors the message"Verif has completed, no errors found'will
appear above the Windows START button in the lower left hand corner of the screen (see
Figure 5).

tr'igure 2: Verilied Frogram

48
Downloading Programs

The next step is to download the program. To download the program the status
menu is used. Atthis stagp in the program the status menu will show OFFLINE. To
select the status menu click the arrow next to the menu that shows OFFLINE. Then
selectdownload (seeFigure 6).

* -
rgie Ir gr b l|t io; ;:ElTTi,-n*&:l-p::]{5slbl
0AEi.'i rr i
*oit*<)o+rd

(ffiRwb
I

$r.,*ro
.lllp6rb,s
H<morm
Gl svso'
E sYsr-
i w 2-
E qetuiaro STATUSMENUARROW
8 @-mr
3 n .wr
E 9. srau
E B .MY

:',4 6 I .j tlhrererd-Ece..ll*rrqrru-|ru

Figure l: Downloading a Program

49
Saving a Program

In order to download a program it must be saved. If the program is not savedthe


window in Figure 7 will open automatically.Name the progrcm and saveit to a 3.5"
floppy disk (Drive A). A program can also be savedbefore trying to download by using
the FILE drop down menu or the SAVE shortcut,which are identical to the onesin
Microsoft Word.

tt
lll
tt
g
P& A\
ssirl5t;i;E;-------l

I pnOCnr_rt ::E;___ :,* |


m I
I nnfvfn | '*'uo lisii&iciiiisT---*-l H5 l

lEFibt't6
ftFrrthc..cc.,I

f S.Edrbr6-ddtu
ftrcttufr
aucrm: liiiiiiE6- sbr: rd l
q@cTF drB rhqi{TSEPS*C
. .
H.YiinN& v*15'-j

Figure l: Savlng a Program

Downloading (Continued)

After the programis savedthe following window will pop up. The window
displaysthe programname,its origin and destination.Selectthe YES buttonto proceed
with the download (seeFigure 8).

I lrrd
j5.l
Downloadlng
Program
(UNTITLED)
for BJ.176{ Mkrolajx 1500LSPSeriesC
To
(UNTITLED)
Bul.l76{ Micrologix
1500L5PScricsC
Driver;AB-DFl-l
at l,loda:
I
Areyousr.reyouwantboproceedwtt Download?

lY*lNol

Figure 2: DownloadingProcedure
50
The next window that opensdisplaysthat the PLC is in remote run mode. This
meansthat the PLC is in run mode. When a PLC is in run mode it is executingthe
currently loadedprogram. In order to download a new program to a PLC it must be in
program mode. SelectYES to switch the PLC to program mode (seeFigure 9).

e SLCi5 in rEmobeRLt{ tnOOE.


Procassr rnrs! ba swtdpd to ruroba PR0Gilrodr, contiila?
_l
f- Y* r,r" I

Figurel: Switching
fromRunModeto ProgramMode

The next window that will open is the download statuswindow. This window
displaysthe statusof the download (not pictured). When the download is completethe
window will automatically close and the next window will open. This window asksif the
PLC should changeback to run mode. SelectYES so the PLC can switch to run mode to
executethe program (seeFigure 10).

-Effiilffi}li.'.' j
ChmrBo*,boRrnlrlodc?
A

1i..*.I8"..-il rlp I

Figure 2: Switching back to Run Mode Dialogue

The final window that pops up asksif the PC should go online. When a PC is
online with a PLC it meansthat the PC is communicatingwith the PLC in real time. In
this mode the operatorat the PC can seethe program that is being executedand monitor
the statusofthe input and output points. This is a very useful feature in manufacturing
operationsbecauseit allows remote supervisionand control of the PLC. Seleci YES to
go online with the PLC.

!\ DoyflrHrnttogpftillru?

Figure3: OnlineMode Dialogue


Using the Program

At this point the program should be operating. Using the addressedinput buttons
on the hainer observe the output lights on the trainer. Since the computer is also online
the changing inputs and outputs can be observed from the PC monitor.

Editing the Program

Use the program statusmenu to go offline. Click the arrow next to the menu and
selectGO OFFLINE. Once the PC is offline with the PLC it is possibleto editthe
program.

Summary

This tutorial has been designedto give a basic introduction ofPLC programming
to the new user. There are many additional instructiong shortcuts and features in the
RSLogix software that are similar to features found in other Windows basedprognms.
Many of the additional features can be discovered through additional use of RSLogix. To
read more about RSLogix visit: http://www. software.rockwell.com/rslogix/

52

Anda mungkin juga menyukai