0% found this document useful (0 votes)
28 views30 pages

M 5

Uploaded by

marcelodias99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
28 views30 pages

M 5

Uploaded by

marcelodias99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 30
» Course Module PLC Applications | using RSLogix 5000 Logix 5000 Basic Instructions Module 5 MacPhail School of Energy =e Se TC Sa ad Logix 5000 Basic Instructions Rationale Why is it important for you to learn this material? The ControiLogix PLC may be programmed with various programming languages. Ladder loge is commonly used language in industry. Ladder logic uses a variety of instuetion sets to crete a executable routine structions perform functions that emulate relay logic and standalone analog controller. Learning Outcome When you complet this module you wll beable to. Use base instructions and programming techniques to create a ladder logic Learning Objectives Here ie what you wll be able 10 do when you complete each objective Identify the function and application ofthe basic instruction sets used in LD and. FBD when using RSLogix 3000 sofware. PLC Applications | Module OBJECTIVE ONE When you complete this objective you will beable to. Identify the Function and application of the basic instruction set used inthe RSLogix $000 software. Learning Activity Complete each of the Learning Activites listed below. 1. Complete the enclosed labs. Learning Material TERMINOLOGY Throughout this course and others there willbe terminology that will appear in the Modules and spoken verbally that can be used interchangeably. Please take note of them asin industry, many things that are the same and perform the same functions, ean and do have many different names. “This ie expecially rue for individuals who have worked with many different ‘ands, series, manufacturers, and even worked in different industries and in iferent geographical reas INSTRUCTIONS |nRS5000 sofware there are many types of instructions, but there some that are by far more common than others ‘These instructions are usually located under the Favorites tab As previously mentioned inthis course, you have the ability to sd or delete items from your Favorites tool bet. PLC Applications I Module S ADDING INSTRUCTIONS (LD ~ Ladder Diagram) ‘There are several different methods you ean use to add instructions. You can enter an instruction by: + Manually typing it in Dragging the instruction ftom the toolbars or ftom other instructions Using copy and paste, tis generally a personal preference on how the instructions are entered. People ae diferent and like to use computers differently. To accommodate that, there are diferent ways o ener instructions. ‘The insuetions are entered into the Routine. When a Routine is first opened the window wil look as follows: Figs Using the Instruction Set toolbars, select or drag instruction onto the routine window. dll) wolf ulo imme PLC Applications! Module fie) Figure 3 ASCII editing is a function of RSLogix 5000 that allows you to modify instructions using ASCII instruction mnemonics instead of having to modify instructions using the ladder editor. “To access the ASCII editor, simply double-click ona rung number inthe left margin. If you double-click a rung that sleady contains logi, you wll see the mnemonics forthe existing instructions and wil be able to modify or add to them. Ifyou doublesck on an empty rung, you get an empty editing box into which ‘you can type the mnemonics that represent the logie you want placed on the rung. ‘You may use one or more types ofeting atthe same time. For instance many people use @ combination of choosing from the tool bar and using the ASCIT editor atthe same time. PLC Applications I Module $ Branching i & : | Add a Branch Click this icon onthe instruction toolbar to place a branch in ‘your Iedder logic. I'your eursor ison an instruction, the branch is placed immediately tothe right ofthe instruction. If your uso onthe rung number, the branch is placed first on the rong. Move a Branch Level Click onthe upper left comer of a branch to move the branch level to another location in your ladder lopie program, Expand a Branch Level Click the right leg ofthe branch, and then drag the leg tothe right or left Valid release points will be visible on the ladder aisplay. Nest a Branch Level Place the cursor at the upper left comer ofa branch leg and click fn the Add iach button o place another branch stucture ‘Within the original branch structure Parall Branch Level Place the cursor atthe bottom left corner ofa branch leg and click on the Add Branch Level button. Copy a Branch Level CCick on the let edge of the branch level you want to copy. In the picture atthe lef, this is the center level. Then click Copy Branch Level inthe right mouse menu. Finally, elick on a rung ‘or insiucton in your loge and elck Paste from the right mouse menu to insert the contents ofthe branch level Copy entire Branch Structure Select the righ leg ofthe branch structure, and then click Copy inthe right mouse menu, Finally, elick on a rung or instruction in your logic and click Paste from the right mouse menu to insert the branch structure. PLC Applications I Module 5 a Delete a Branch Place the cursor on the right branch rail click the rigt mouse button, and then click Delete. Ifyou cut or delete a branch, all nstuetions on the branch are also deleted Delete a Branch Level Place the cursor onthe left branch ral, click the right mouse button, an then Delete. Ifyou cut or delete a branch, all instructions on the branch are also deleted. Bit Instructions Figure (Courtesy of the Allen Bradley Catalogue) ‘Examine if Closed (XIC) 2 ae Figwe 6 This is also referred to as Normally Open (NO). In industry, you will here both terms used interchangeably. ‘The Data Type for ths instruction is BOOL, and can be ether an actual input from deviee or ean bo bit thats intemal to the processor. BOOL is another word for bit, ‘This instruction ean be used asa normally open contac in our ladder program. PLC Applications | Module 5 For example, if we havea program that is to turn on a light, 2s shown in the diagram below, and if the switch is open inthe field then the light will not be on ‘as the instruction used in our loge is (XIC) oF (NO). If the switch were to close, ‘then aur logic would notice the change in state, and become sre, therefore turing the light on, Examine if Open (XO) ve ewes This is also referred to as Normally Closed (NC). In industry, you wil here both terms used interchangeably ‘The Data Type for this instruction is BOOL, an ean be either an actual input fiom a deviee or ean be abit that ie intemal to the processor BOL is another word for bit, “This instruction can be sed as a normally closed contact in our ladder program. For example, f we have program that i to turn on a light, as shown inthe diagram below, and ifthe switch is open inthe fel, then the light willbe on as the instruction used in our loge is (X10) or (NC). If the switch were to open, then ‘ur logie would notice the change in state, turing the light of. gna | PLC Applications! Module 5 —— Output Energize (OTE) e Pig 10 ‘Tis is also refered in industry as n NO, Open Transition Coil and can be used interchangeably. “The Data Type for this instruction is BOL, and ean be either an actual output to ‘a deviee or canbe an internal contro bitin the processor. ROOL, sanather word for bit Asin the previous two examples, ifthe rung is tue then the light will ome on, and if the rung is false, then the light will be off It is always located on the right tend ofthe rung and there can be multiples of them. As shown below, they ean be ‘onnected in series o parallel or combinations. Co 2 Figwe 11 Output Lateh (OTL) be Powe 12 “hiss also known a Set “The Data Type for this nstrvetion is 8 BOL, ‘The way that this instruction works is that when itis wsed in Ladder Logic and if the rung becomes true, this output gets set high. Even when the rung goes low again, this output or bit will rematn high until there has been enother instruction to Unlatch or Reset PLC Applications I Module 5 ‘The following isan example of en OTL. ‘Output Unlatch (UTL) ‘Tis is also known as Reset ‘The Data Type for this insrution is a BOOL, “The way that ths instruction works is that when itis used in Ladder Logie and it the eung becomes true, this output gets set low. Even when the rung goes low agai, this output orbit will remain low or off until there has been another instruction to Latch or Set it “The following is an example ofan UTL. Ss aE Figure 15 PLC Applications I Module 5 ed ADDING INSTRUCTIONS (FBD ~ Funetion Block Diagram) “There are several methods of entering instructions in Function Block Diagram (FBD), ‘© Drag and drop from the main men ba. ‘© Using the dad Bement mena bar diretly from the FBD sheet. ‘© Copy and paste ‘The method chosen is a personal ane, snd no one way is necessarily better than snather. “The routine chat PD is entered in is different routine than LD and the tool bar looks drastically different. ‘As mentioned earlier, each task can accommodate 100 different programs. Each program however can use all of the IEC programming languages, and each can be ‘used more than once. When a routine is ereted in FID it will appear asthe following; Figure 16 FFBD does not use rungs for inserting logic, instead the logic is entered ona series of sheets. The only limit to the amount of sheets that are available isthe memory capacity ofthe processor, ‘The instruction toolbar in FED also looks considerably different than that use with LD. PLC Appticstions I Module 5 Using the Instruction Set tolbar, selector drag the instruction ont the shect. Figure 17 ‘The other method isto place your mouse onto the sheet and right lick on itand select Add Element bee ‘Rid ovark ARSIne Figure 18 Figure 19 From the box in Figure 19, the programmer can either type the instruction name directly or ean be Searched by scrolling through the folders. There is no ACIL ‘editor associated with FED. PLC Applications | Module S “The basi instruction sets as follows; Input Output Input Wire Reference Reference Connector BN 10, When Start_1 i released, what happens othe seeen and Lite_1? 11. Tae reason that the logic behaves the way that it does is because Start_1 is ‘wired in anormally open configuration. On the back ofthe pushbutton isa set of contacts and they have a normally open configuration, They can normally be identified by the green print or dot an the contact themselves. Pushburttons are configurable and can have different sets of contacts installed ‘on them in the field. 12, Go offline and add the following tung to your logi. Do not delete the existing rung Figure 27 13. Verify your logie and download it to your processor. 14, Both rungs have the same logic, an XIC (NO) contact and an OTE (Output Cail), Notice the difference in the animation and the satus ofthe outputs 15, Press Stop_1. What happens to the state of Lite 2? 16. What causes his rung to behave inthis manner? 17-Release Stop_J,itshould now be in ts normal state, 18. The contact arrangement on STOP button is always normally closed. The reason that iis closed isso that ifthe button fils to operate propery it will fallin a safe position. This is normally referred to as “Fall Safe”. Ifthe buton breaks or the wire comes of, the device that itis controlling will stop by defaul 19, Go ofine an change the XIC contac of Stop_1 with an XIO (NC) conse. 20. Verify your program and download itt your processor 21, Whats the state of Lte_2? 22, Why i ein thin tate? 23, Press and hold Sop_1. What happens to Lite_?? PLC Applications | Module 24, XIO is “examine if open”, Basically this means thet i he physical input is ‘pen, oF low, then te loge wil be tue (on). This is the reason tet in LD the sop button usualy uses an XIC (NO) contact arrangement. Please remember this as itis very important 25, Save thieas Lab_$_2. PLC Applications! Module S aa Lab s3 (Creation of Function Block Diagram Routine 1, Open your previous projet Lab_s_2. 2. Inthe Conroller Organizer, rightclick your mouse on MainProgram and seleet New Routine. 13. After New Routine has been selected, the following window should appear. Enver the information ws per below and select OK. PLC Applications | Module 5 ) a 4. After OK has been selected, right click on MainProgram again and this time select Properties and the fellowing window will appear. (Brave Peper varopam oC Se tore] = fi Figure 30 5. Select the Configuration tab and from the pull down menu select FBD and press OK, (Propane wana STS Figure 31 6, The order ofthe routines inthe Controller Organizer has now changed. The BD routine is now frst and it has #flag on it which means thai is assigned “Thies the only routine tat is being scanned and used by the processor. Senanrosan ED Peon tone [nao Figure 32 PLC Applications 1 Module S gE =n —_——$ Even though the MainRoutine isnot being seanned or used in tis projet, i must sil be free of errors when downloading to the processor. The processor Will not accept any program/project that has any erors. This is standard with all PLC's/PAC's. 7. Open the FBD routine and select Add Shee. Figure 33 tis good programming practice to always start on Sheet # 2. The reason for this is because you cannot insert sheet in front of another, but you can alway inser sheet behind anther. If Sheet # 1 is used and during programming its discovered that some ether logic should be infront of tthe only way that this is possible i o cut and paste, ‘Another good programming habit is to only place “one thought” per sheet. Do not cluter the sheet sit isto hard to follow and it can cause problems with scanning, ‘The only limit tothe amount of sheets that can be created is dependent onthe memory ofthe processor. 8, From Shoet #2 in the FED routine ereate the following log. Pigs 34 9. Verify your program and dawalead ito your processor. 10. Notice that both Stat_1 and Lite_J have a value of © associated with the tags. This is because they are both off or low. 1, Press tart_1 and feve it pressed, Notice thatthe value of Star_1 has changed from 0 10 T, and so has the value of Lite_1. This is because the Sate of the Bit Start_I has been changed, and in doing so, the state of Lite_! has also ‘changed. This operates inthe exact same way as the firs pare ofthe last lab did When it was LD. PLC Applications | Module S 1. (Create the following logic. Please note that in FIBD an output can only be used once. What this means is that any tag ean only be written to one time. Ik can however be used an input, or read from multiple times. Sart at —-—- Figure 35 ‘Verify your program and download itt your processor, J. Notice that Stop_1 has a value of 1 associated with it and so does Lite 2. This is because Stop_7 is wired in closed configuration, Press and hold Stop_1. Did the values of Stop_1 and Lite_2 change? Ifso why? Save this as Lab_5.3. PLC Applications | Module Eas Lab s4 (Create a Ladder Diagram Stop ~ Start routine using XIC, XIO, OTE, Instructions. 1. Open your previous application Lab_ 5.3, 2. Right click on MainProgram and assign the MainRoutine. This should place the MainRoutne first replacing FBD. 3. In the MainRoutine (LD), delete the existing logic and enter the followings 4. Verify your program and download it to your processor. 5. Notice tha Stop_/ is animated (green) and stops thet, this is because the stop ‘button is wired in closed configuration. 6, Press Start! and release it 11. When Start_ was pressed the logic became tru from Stop_I, through Stat_1 ‘and onto Life_1. Because the output instruction andthe input instruction ‘below Start_Thave the same tag name, the states ofboth must also be the ‘same, therefore when Sirt_1is released the path remains tre. The input XIC instriction Lte_] ats as a holding contact. 8, Press Stop_I and release it. 9. Why did Le_1 go out? 10. Look a the logic that was just ereated. [elements ae in series with each ‘other they ean be viewed as an “AND” of “BAND” Boolean And, and ifthe <’lements are in parallel with each other, they can be viewed as an “OR” or “BOR” Boolean Or. 11 Save this as Lab $4 PLC Applications I Module $ Labs 5 [Create a Function Block Diagram Stop ~ Start routine using Input Reference, Ouiput Reference, BOR and BAND instructions. |. Open Lab_$_4, assign the FBD routine, go to Sheet 2, delete the existing logic and enter the following. Your instructor will show you how to limit she amount ‘of pins ae shown on the BOR and BAND instructions. sont won a a poor ouewe |, ta oe cup? — Poca re 4 Figure 37 2. Verify your program and download ito your processor. 3. The instructions used are BOR and BAND, and these two instructions are probably the most commonly used instructions BOR: In order for the output ofthe BOR instruction to be true, either Int or JIn2 must he true. It's one or the other or both. If neither inputs tue, then the ‘ouput will not be tre, [BAND: In order forthe output on the BAND instruction to be on, all ofthe inputs must ala be on. By default all ofthe inpots on @ BAND instruction already have a value of 1. This value can change when a tag is associated with ‘the inputs. IFany ofthe inputs are not tue, then the output ofthe instruction ‘will not come on. 4, Press Start_1 and release it. What heppened to Lite_1? Lite_I came on and stayed on because when Start_I was pressed, the BOR instruction became tru. When that happened, both ofthe inputs tothe BAND instruction became true which allowed Lite_! to come on and be tue. ‘When this occurred, the other input on the BOR instuetion became true as it hha the same tag name as the BAND output, This also operates as a holding contact. PLC Applications I Module —— 5. Press Stop_1, What happened tothe state of Lite 1? Funetion Block Diagram isnot animated in the same way that LD isso to ‘compensate for this we must lok for changes inthe values ofthe tags. 6, Save this as Lab_S_5, PLC Applications I Module $ Lab 5.6 (Create a Ladder Diagram Stop ~ Start routine using XIC, XIO, OTL, and OTU Instructions. 1. Open Lab 5, re-assign the LD routine and delete all oF the logic: 2, Insert the lagi as shovin below. Please take not ofthe output instruction used, ind download itt your processor. Figure 38 3. Press and release Start_. Did the state of Lite_1 change? Lite_1 did not change because ofthe state of Stop_J. As previously mentioned the contact configuration of Sigp_T is normally closed. Therefore Lite_T is constantly being unlatched or eset. Pressing Start_1 has no effect because the last rung being scanned is instructing Lite tobe of. 4. Go offine and change the instruction of Stop_I fom XIC (NO) to X70 (NC), and download itto your processor, 5. Press and release Start_J. Notice that this time Lite_J came on. Tis is because of the changed configuration of Siop_1. When creating a program, the programmer must always be aware ofthe normal state of the input devices, [Normal stat i usually defined as the state ofthe device when iteomes out of | the box. 6, Save this as Lab 5.6. PLC Applications 1 Module

You might also like