plc tutorial

8
SouthernIllinois University Carbondale College of 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 users the foundation to leam the many advanced features of RSLogix. Starting RSLogix From the desktopclick START>>Programs>>Rockwell Software>>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 selected the window in Figure I will open. This window is usedto configure the program to a particular model of Allen Bradley PLC. The PLC used is this tutorial is a Micrologix 1500series A. The model numbers are listedon the side ofthe PLC. Use the scroll to find the model of the PLC. Selectit using the mouse and click OK 45 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- gnH w"r*.. I li6-rs-t Figure l: Processor Type Window

Upload: brian-qi

Post on 09-Aug-2015

58 views

Category:

Engineering


4 download

TRANSCRIPT

Southern Illinois University CarbondaleCollege of Engineering

Department of Technology

PLC Programming Tutorial

Purpose:

The purpose ofthis tutorial is to give a briefintroduction to using the PLCtrainers and the RSLogix software available at SIUC. RSLogix is Windows basedsoftware that is used to program Allen-Bradley PLCs. This tutorial will give basicinstructions on how to write and download programs. This will give new users thefoundation to leam the many advanced features of RSLogix.

Starting RSLogix

From the desktop click START>>Programs>>Rockwell Software>>RSlogix 500English>>. Click on RSLogix 500 English. When RSIogix starts click the FILEheading and select NEW or use the shortcut key that is identical to the new file key inMicrosoft Word.

When a new file is selected the window in Figure I will open. This window isused to configure the program to a particular model of Allen Bradley PLC. The PLCused is this tutorial is a Micrologix 1500 series A. The model numbers are listed on theside ofthe PLC. Use the scroll to find the model of the PLC. Select it using the mouseand click OK

45

MXfrIU[TlltED

| 5/01 CPU , tX hI 5/01Cm-1(h

Xi@Iqix 1500 U bi6 CXifrIqix 1500 nP Sci.B B

.1162 l|iEoLqir 1200 ht* B,1762 Xieolalr l20o sli€ l.1761 Xirolqix 1000 balq.1?61 l ieo(qr:1000Ol-agvff i lcw.1761 Xidddis 1000

CffiiedW*i Dd0 R@n[nd nrtfiEc

:l^q*-= F- gnH w"r*.. I li6-rs-t

Figure l: Processor Type Window

RSLogix Interface

The RSLogix interface is shown below. To begin constructing a program click onthe number 0000 next to the first and only blue rung. The number should now be insideof a red box. The red box means that the rung has been selected and can be edited. Startby clicking the XIC button on the USER tool bar. Then click on the OUTPUTENERGIZE button on the USER toolbar. Rung 0000 should now appear as it does in theprogram below. Once there are instructions in rung 0000 rung 0001 will appear below it.Click on the 0001 to select the rung. Click on the XIO and OUTPUT ENERGIZEbuttons on the USER toolbar. Rung 0001 should now appear rls it does in Figure 2.

*db96ff i rdf f iH+

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

i l*-l 31e €i ;n*!m.m...ll$"**rruru

Figure 1: RSLogix Interface

?:@l M

.{ V*fJ$ r'cm

46

I cor* crqa::

S P,d*sd edus$ rt,orts

t J b corqM

$cmc-rqe-

El sYs oBl sYsr 't w2-

E c,os3 R.Em6fl o-ururD i l -WID s2 - stAtusE a3-BWYO r. , MRD cs. c@rERD s-cNRaE Nz-N'6EF8l F " c$FwD

O @-orturO tr .@r

- Jcdde.Mde

O cwo,erhd

- l Cdm6rdcdhddr

.J R.cp. Md6

OUTPT]T ENERGIZE BUTTON

USf,R MEI{U TAB(Selected by default)

Defining Inputs and Outputs (I/O)

Using the left mouse button, double click on the logic symbols to define the VOaddress. When the symbols are selected a box will appear (refer to Figure 3). Defineinput addresses for XIO and XIC symbols using "I:0/0" format. Define output energizeaddresses using the "O:0/0" format. The capital I and O stand for input and ouqut,respectively. The first number before the forward slash is the slot number and thenumber after the slash is the point number. Make sure to not to use Os for 0s and viceversa.

When all the VO addresses have been defined use the VERIFY PROJECT button(shown in Figure 3) to check the program for errors.

* E& h *rdr @ rool Yhdqi nf

D l ' ;E O I lbF n 'h. . : 5rr Bt QQtr l ; ;*1, >E!n {Err f t<}ooI I : D

II:r**.-Uit

| l*+1, gt € $ I teoe{tkd.M.,.l lERa"!..sm

Figure l: Instruction Addressing

'2:@l P :

.l 9*fl* r:rrru

47

I ca'o *6."Sh@s'stuS r(erb'

lll b c@iFdil!f cr'ggcorsam

B sYso,F sYsr.0 t* t -

$ c.osr noracoO @.wrrutEl il -wrD s2. slauO $.EWYD r. . rMRO c5-cNFEl m-cdndO N7-N@FB .E.tr$iwD

B @-NruE n-@r

- JCqnmHr@sO do-wH

lCdmq#dMdt

Should there be a prograrn error, a window will appear at the bofiom of the

screen. USe the "*" and "-" symbols to expand the errors. The expanded message will

state what rung and which instruction oontains the error (see Figure 4). Double clicking

on the expanded part of the message will select the operation that has the error.

B&2i 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 statusmenu is used. Atthis stagp in the program the status menu will show OFFLINE. Toselect the status menu click the arrow next to the menu that shows OFFLINE. Thenselect download (see Figure 6).

0AEi. ' i I rb l | io rrrgie r g t ; ;:ElTTi,-n*&:l-p::]{5slbl i * -

*oi t*<)o+rd

I (ffiRwb

$r.,*ro.lllp6rb,sH<morm

Gl svso'E sYsr -i w2-

E qetuiaro8@-mr3 n.wrE 9. srauE B.MY

STATUSMENUARROW

:',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 saved thewindow in Figure 7 will open automatically. Name the progrcm and save it to a 3.5"floppy disk (Drive A). A program can also be saved before trying to download by usingthe FILE drop down menu or the SAVE shortcut, which are identical to the ones inMicrosoft Word.

P& A\

ssirl5t;i;E;-------l

ttlllttg

j5.l

50

I pnOCnr_rt ::E;___ :,* |

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

lEFibt ' t6f tFrr thc. .cc. , I

f S.Edrbr6-ddtuftrcttufr

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 program is saved the following window will pop up. The windowdisplays the program name, its origin and destination. Select the YES button to proceedwith the download (see Figure 8).

I l r rd

Downloadlng Program(UNTITLED) for BJ.176{ Mkrolajx 1500 LSP Series C

To(UNTITLED) Bul.l76{ Micrologix 1500 L5P Scrics C

Driver;AB-DFl-l at l,loda: I

Are you sr.re you want bo proceed wtt Download?

lY* lNol

Figure 2: Downloading Procedure

The next window that opens displays that the PLC is in remote run mode. Thismeans that the PLC is in run mode. When a PLC is in run mode it is executing thecurrently loaded program. In order to download a new program to a PLC it must be inprogram mode. Select YES to switch the PLC to program mode (see Figure 9).

SLC i5 in rEmobe RLt{ tnOOE.Procassr rnrs! ba swtdpd to ruroba PR0G ilrodr, contiila?

f- Y* _l

r,r" I

Figure l: Switching from Run Mode to Program Mode

The next window that will open is the download status window. This windowdisplays the status of the download (not pictured). When the download is complete thewindow will automatically close and the next window will open. This window asks if thePLC should change back to run mode. Select YES so the PLC can switch to run mode toexecute the program (see Figure 10).

e

-Effiilffi}li.'.' j

A ChmrBo*,boRrnlrlodc?

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

Figure 2: Switching back to Run Mode Dialogue

The final window that pops up asks if the PC should go online. When a PC isonline with a PLC it means that the PC is communicating with the PLC in real time. Inthis mode the operator at the PC can see the program that is being executed and monitorthe status ofthe input and output points. This is a very useful feature in manufacturingoperations because it allows remote supervision and control of the PLC. Seleci YES togo online with the PLC.

Figure 3: Online Mode Dialogue

!\ DoyflrHrnttogpftillru?

Using the Program

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

Editing the Program

Use the program status menu to go offline. Click the arrow next to the menu andselect GO OFFLINE. Once the PC is offline with the PLC it is possible to edittheprogram.

Summary

This tutorial has been designed to give a basic introduction ofPLC programmingto the new user. There are many additional instructiong shortcuts and features in theRSLogix software that are similar to features found in other Windows based prognms.Many of the additional features can be discovered through additional use of RSLogix. Toread more about RSLo gix visit: http : //www. software.rockwell. com/rslogix/

52