Todas as Práticas Do Logixpro Português

April 29, 2018 | Author: FelipeRenan | Category: Timer, Switch, Traffic Light, Relay, Simulation


Comments



Description

LogixPro Relay Logic Lab Page 1 of 7LogixPro Relay Logic Introductory Lab RSLogix Relay Logic Instructions 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. From the Simulations Menu at the top of the screen, Select the I/O Simulation and ensure that the User Instruction Bar shown above is visible. The program editing window should contain a single rung. This is the End of Program rung and is always the last rung in any program. If this is the only rung visible then your program is currently empty. If your program is not empty, then click on the File menu entry at the top of the screen and select "New" from the drop-down list. A dialog box will appear asking for you to select a Processor Type. Just click on "OK" to accept the default TLP LogixPro selection. Now maximize the ProSim-II Simulation Window file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl.html 1/20/2003 LogixPro Relay Logic Lab Page 2 of 7 The I/O Simulator The simulator screen shown above, should now be in view. For this exercise we will be using the I/O simulator section, which consists of 32 switches and lights. Two groups of 16 toggle switches are shown connected to 2 Input cards of our simulated PLC. Likewise two groups of 16 Lights are connected to two output cards of our PLC. The two input cards are addressed as "I:1" and "I:3" while the output cards are addressed "O:2" and "O:4". Use your mouse to click on the various switches and note the change in the status color of the terminal that the switch is connected to. Move your mouse slowly over a switch, and the mouse cursor should change to a hand symbol, indicating that the state of switch can be altered by clicking at this location. When you pass the mouse over a switch, a "tool-tip" text box also appears and informs you to "Right Click to Toggle Switch Type". Click your right mouse button on a switch, and note how the switch type may be readily changed. RSLogix Program Creation Collapse the I/O simulation screen back to it's normal size by clicking on the same (center) button you used to maximize the simulation's window. You should now be able to see both the simulation and program windows again. If you wish, you can adjust the relative size of these windows by dragging the bar that divides them with your mouse. I want you to now enter the following single run program which consists of a single Input instruction (XIC - Examine If Closed) and a single Output instruction (OTE - Output Energize). There's more than one way to accomplish this task, but for now I will outline what I consider to be the most commonly used approach. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl.html 1/20/2003 LogixPro Relay Logic Lab Page 3 of 7 First click on the "New Rung" button in the User Instruction Bar. It's the first button on the very left end of the Bar. If you hold the mousepointer over 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. You should now see a new Rung added to your program as shown above, and the Rung number at the left side of the new rung should be highlighted. Note that the new Rung was inserted above the existing (END) End Of Program Rung. Alternatively you could have dragged (left mouse button held down) the Rung button into the program window and dropped it onto one of the locating boxes that would have appeared. Now click on the XIC instruction with your left mouse button (Left Click) and it will be added to the right of your highlighted selection. Note that the new XIC instruction is now selected (highlighted). Once again, you could have alternatively dragged and dropped the instruction into the program window. If you accidentally add an instruction which you wish to remove, just Left Click on the instruction to select it, and then press the "Del" key on your keyboard. Alternatively, you may right click on the instruction and then select "Cut" from the drop-down menu that appears. Left Click on the OTE output instruction and it will be. added to the right of your current selection. Double Click (2 quick left mousebutton clicks) on the XIC instruction and a textbox should appear which will allow you to enter the address (I:1/0) of the switch we wish to monitor. Use the Backspace key to get rid of the "?" currently in the textbox. Once you type in the address, click anywhere else on the instruction (other than the textbox) and the box should close. Right Click on the XIC instruction and select "Edit Symbol" from the drop-down menu that appears. Another textbox will appear where you can type in a name (Switch-0) to associate with this address. As before, a click anywhere else will close the box. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl.html 1/20/2003 Once complete. click inside the "RUN" option selection circle to start the PLC scanning. which in the case of an XIO. In actual fact the XIC is a conditional instruction which tests any bit that we address for Truth or a 1. Editing your Program Click on the "Toggle" button of the PLC Panel which will put the PLC into the PGM mode and bring the Edit Panel back into view. Click on the "DownLoad" button to initiate the downloading of your program to the PLC. First click on the "Toggle" button at the top right corner of the Edit Panel which will bring the PLC Panel into view. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl. Lamp O:2/00 should illuminate. Toggle the Switch On and Off a number of times and note the change in value indicated in the PLC Panel's status boxes which are being updated constantly as the PLC Scans. by dragging the bar that separates the Simulation and Program windows to the right with your mouse. We are then told that the OTE will energize if the flow is allowed to get through to it. Try placing the PLC back into the "PGM" mode and then toggle the simulator's Switch a few times and note the result. Double check that the addresses of your instructions are correct. Now add a second rung to your program as shown below. Enlarge the Simulation window so that you can see both the Switches and Lamps. Before continuing however. We are usually told to think of the XIC instruction as an electrical contact that allows electrical flow to pass when an external switch is closed. try dragging the appropriate address which is displayed in the I/O simulation and dropping it onto the instruction.html 1/20/2003 . Now click on Switch I:1/00 in the simulator and if all is well. means that the bit addressed is currently a Zero or False. Note that the XIO instruction which Tests for Zero or False has it's address highlighted in yellow. Place the PLC back into the "Run" mode and the Scan should resume. Testing your Program It's now time to "Download" your program to the PLC. This time instead of entering the addresses as you did before. This indicates that the instruction is True.LogixPro Relay Logic Lab Page 4 of 7 Enter the address and symbol for the OTE instruction and your first RSLogix program will now be complete. LogixPro Relay Logic Lab Page 5 of 7 This is probably a good time to practice your dragNdrop skills. changing them to N. download and run your modified program. Toggle both Switch-0 and Switch-1 on and off a number of times and observe the effects this has on the lamps. Stop/Start utilizing OTL and OTU For this exercise we need two Normally Open momentary switches. click on switch "I:1/2" and "I:1/3". Once you have the rungs entered correctly. Now add the following two rungs to your program. Activate the Start and Stop switches and ensure that the OTL and OTU output instructions are responding as outlined in your text. Ensure that you are satisfied with the operation of your program before proceeding further.C.O. Once you feel comfortable with dragNdrop. and then while keeping the mouse button down. pushbuttons. move the mouse (and instruction) to a new location. Now download your program to the PLC and place the PLC into the Run Mode.O. could you turn it off if power was lost in the Stop Switch circuit? Now modify your program so that it operates correctly when you substitute the N. ensure that your program once again looks like the one pictured above. Try moving instructions from rung to rung by holding the left mouse button down while over an instruction. Stop switch circuit. If we now lost power on the N. Stop switch (I:1/03) with a Normally Closed Switch. Once you have the lamp ON. what would happen to the state of Lamp (O:2/02)? Emulating Standard Stop/Start Control file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl.html 1/20/2003 . Try doing the same with complete rungs by dragging the box at the left end of the rung and dropping it in a new location. Using your right mouse button. Clear your program and utilize toggle switch (I:1/00) and file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl. Now enter the following program. Download. just drag the branch (button) onto the rung and then insert or drag instructions into the branch. Run and see if this has any effect on the logic or operation of the rung. Before you download and run this program. Remove the empty branch.. take a careful look at our use of a XIC instruction to test the state of the N.LogixPro Relay Logic Lab Page 6 of 7 Erase your program by selecting "New" from the "File" menu selection at the top of the screen. will bit I:1/04 go True or False? Will the XIC instruction go True or False when the Switch is pressed? Is this the logic we are seeking in this case? . It may look like an electrical circuit but in fact we know that it isn't and therefore obeys a somewhat different set of rules.. enter and test a program which will perform the common electrical function of controlling a light from two different locations.. what state will the lamp go to? ... When someone presses the Stop Switch.. Download.. Stop Switch. Run and observe how both lamps still light even with the empty branch (short?) in place. Run the program and see if you're right! . If we loose power in the Stop Switch circuit. Why do you think that most prefer this method rather than the OTL/OTU method of implementing Stop/Start Control? Output Branching with RSLogix Modify your program so that it matches the following. Try moving the Lamp-3 OTE instruction so that it is in series with the Lamp-2 OTE instruction. Remove the XIC instruction from the Output branch and note what happens to Lamp-3 when you Start and Stop the circuit. When the dialog box appears just click on "OK" to select the default PLC type.html 1/20/2003 .C. Operate the Stop and Start switches several times with Switch- 0 open. Controlling One Light from two Locations Create.. Download and Run the program. and again with Switch-0 closed.. To enter a branch. LogixPro Relay Logic Lab Page 7 of 7 switch (I:1/01) to control Lamp (O:2/00). file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nrl\intro-rl.....html 1/20/2003 .... then the Lamp should be On! This of course is just one approach to solving this problem) . (Hint: If both switches are On or if both switches are Off. and take particular note of the current state of the limit switches. which denotes that the selected switch is wired using a set of Normally Open contacts.html 1/22/2003 . With the door fully closed. You should now be able to see the current state of each bit associated with input card I:1. both limit switches are in their activated state (Not Normal). file://C:\Program%20Files\TheLearningPit\LogixPro\doc\dl\dl-rl. Select the Door Simulation. select the "Input Table" from the drop down Table list box. place the PLC into the RUN mode which will initiate scanning. and you should see a tool-tip text box appear. When the door is in the closed position. When you have the Data Table showing. and note the results. Use your mouse to press the Stop switch on the Control Panel a few times. Now open the Data Table display by clicking on the Data Table icon located on the toolbar (3rd from right) at the top of the screen. You should also note that bit I:1/02 is also in a High or True state. Run your mouse over each switch. Take the time to familiarize yourself with the components used in the Door system. what signal level would you expect to see at the limit switch inputs I:1/03 and I:1/04? To confirm your assessment of the current limit switch states. Don't continue on with the exercise until you are confident that you understand the rational of the observed results.LogixPro Door Simulation Lab Page 1 of 5 LogixPro Door Simulation Lab Utilizing Relay Logic The ProSim-II Door Simulation From the Simulations Menu at the top of the screen. and therefore the Stop switch is neither required nor used in this exercise. a pair of Limit Switches and a Control Panel. and make a concerted effort to minimize the number of rungs employed. The closing operation will continue as long as the switch is held down.LogixPro Door Simulation Lab Page 2 of 5 Student Programming Exercise #1: In this exercise we want you to apply your knowledge of Relay Logic Instructions to design a program which will control the ProSim-II Door. Avoid the use of OTL or OTU latching instructions. document. Pressing the Close Switch will Not energize the motor. and test your Program. It is your responsibility to fully design.html 1/22/2003 .  If the Door is already fully closed. All I/O components referenced within your program should be clearly labeled. or if limit switch LS1 opens. However. and rung comments should be employed to add additional clarity as required.  Pressing the Close Switch will cause the door to move down (close) if not already fully closed. Student Programming Exercise #2: file://C:\Program%20Files\TheLearningPit\LogixPro\doc\dl\dl-rl. Ensure that you have made effective use of both instruction and rung comments to clearly document your program.  The Open Lamp will be illuminated if the door is in the Fully Open position. all connected to your PLC. The program you create will monitor and control this equipment while adhering to the following criteria:  In this exercise the Open and Close pushbuttons will be used to control the movement of the door. Pressing the Open Switch will Not energize the motor.  Pressing the Open Switch will cause the door to move upwards (open) if not already fully open. The Door System includes a Reversible Motor. all other available Inputs and Outputs are employed in this exercise. the door movement will halt immediately.  If the Door is already fully opened. The opening operation will continue as long as the switch is held down. debug. If the switch is released.  Under no circumstance will both motor windings be energized at the same time.  The Shut Lamp will be illuminated if the door is in the Fully Closed position. If the switch is released. Movement will not be maintained when either switch is released. or if limit switch LS2 closes. the door movement will halt immediately. In this exercise we want you to utilize this word as follows: file://C:\Program%20Files\TheLearningPit\LogixPro\doc\dl\dl-rl. The closing operation will continue to completion even if the Switch is released. It is your responsibility to fully design. This integer word contains a count which is incremented continuously by the PLC when it is in the Run mode.LogixPro Door Simulation Lab Page 3 of 5 In this exercise we want you to apply your knowledge of Relay Logic Instructions to design a program which will maintain the appropriate door movement once initiated by the operator. Avoid the use of OTL or OTU latching instructions. and will remain halted if the switch is released. The opening operation will continue to completion even if the switch is released.  The Shut Lamp will be illuminated if the door is in the Fully Closed position. document.  Under no circumstance will both motor windings be energized at the same time. Pressing the Open Switch will Not energize the motor.  The Open Lamp will be illuminated if the door is in the Fully Open position. debug. The program will adhere to the following criteria: Door movement will halt immediately when the Stop Switch is initially pressed. and it can come in quite handy at times for variety of purposes. The Opening or Closing operation of the door will continue to completion even if the operator releases the pushbutton which initiated the movement. Pressing the Close Switch will Not energize the motor.  If the Door is already fully opened. Student Programming Exercise #3: In this exercise we want to introduce you to a simple programming technique for adding a bit of "Flash" to your program.  Pressing the Close Switch will cause the door to Close if not already fully shut. and test your Program. ensure that you have made effective use of both instruction and rung comments to clearly document your program. and make a concerted effort to minimize the number of rungs employed. As before. We want you to make use of the PLC's Free Running Timer which can be viewed in the Data Table Display at location S2:4.html 1/22/2003 .  Pressing the Open Switch will cause the door to Open if not already fully open.  The Ajar Lamp will be illuminated if the door is NOT in either the fully closed or fully opened position.  If the Door is already fully closed. html 1/22/2003 . You should see a binary count in progress where the rate of change of each bit is file://C:\Program%20Files\TheLearningPit\LogixPro\doc\dl\dl-rl. Display word S2:4 utilizing the Data Table display. Ensure that the Radix is set to Binary so that you can view the individual bits within the word.LogixPro Door Simulation Lab Page 4 of 5 With the PLC in the Run mode. pressing the Open Switch will immediately halt movement. As before. but depending upon the speed of your computer you may elect to substitute another Bit. The Lamp should flash at a reasonable rate whenever your program energizes the selected Lamp. while Bit 1 will be 1/2 as fast as Bit 0. the Open lamp will flash while the door is in motion. pressing the Close Switch will immediately halt movement. and is not in the fully open or fully closed position. In this exercise we want you to modify your program so that it adheres to this additional criteria:  If the door is currently opening. the rate is consistent. the Shut lamp will flash while the door is in motion.html 1/22/2003 . Door movement will remain halted when the switch is released. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\dl\dl-rl. the Open lamp will be energized but not flashing as was the case before. The Ajar Lamp will flash at a slower rate (1/4) then the other lamps. Now download and Run this modified program to see the flashing effect achieved. Bit 0 will have the highest rate.  If the Door is fully closed. Place an XIC instruction addressed to S:4/4 on the rung which controls either the Open or Shut Lamp in your previous program. Supplemental Programming Exercise #4: We do not recommend proceeding with this exercise if you do not have an instructor or experienced PLC programmer to call upon for assistance.LogixPro Door Simulation Lab Page 5 of 5 directly related to it's position within the word.  If the Door is closing. With an actual AB PLC. and Bit 2 half as fast as 1 etc. but with LogixPro it varies from computer to computer. Door movement will remain halted when the switch is released.  If the door is currently closing. ensure that you have made effective use of both instruction and rung comments to clearly document your program. I'm going to suggest using Bit 4 for this purpose.  The Ajar Lamp will be illuminated in a steady state if the door is in motion. Now modify your program so that the following criteria is met:  If the Door is fully open. We want you to add a Lamp Flasher to your program by monitoring the state of one of these bits with an XIC instruction.  If the Door is opening. etc.  The Ajar Lamp will flash if the door is stationary. the Shut lamp will be energized but not flashing as was the case before. .LogixPro Door Simulation Lab Page 6 of 5  Once movement is halted by the either of the foregoing actions.. the operating criteria associated with the previous exercise will again take effect.. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\dl\dl-rl.. Also.  The utilization of Binary or Integer Table bits to Flag specific conditions within your program would be appropriate. the retentive OTL and OTU instructions may be utilized freely at your discretion.html 1/22/2003 . .. html 1/22/2003 .Continuous Operation Completely design and de-bug a ladder control circuit which will automatically position and fill the boxes which are continuously sequenced along the conveyor. Conveyor Motor and Solenoid will de-energize whenever the system is halted via the STOP switch.  The FILL light will be energized while the box is filling. Select the Silo Simulation Exercise #1 -.  The RUN light.LogixPro . file://C:\Program%20Files\TheLearningPit\LogixPro\doc\sl\sl-rl. Ensure that the following details are also met:  The sequence can be stopped and re-started at any time using the panel mounted Stop and Start switches.  The RUN light will remain energized as long as the system is operating automatically.Silo Simulation Lab Page 1 of 3 LogixPro The Silo Lab Utilizing Relay Logic The ProSim-II Silo Simulation From the Simulations Menu at the top of the screen. . In this mode.  When the selector switch is in position "C". This is the mode of operation which was used in Exercise #1.  With the box in position and the conveyor stopped. This is the mode of operation which was used in Exercise #2. the system shall operate in the "Manual Restart" mode of operation.  When the selector switch is in position "B". Filling should stop when the Level sensor goes true. As in the other modes.. Forcing the operator to hold the Start button down until the box clears the prox-sensor is not acceptable. open the solenoid valve and allow the box to fill.  The FILL light will be energized while the box is filling. the system shall operate in the "Continuous" mode of operation.Selectable Mode of Operation Alter or re-write your program so that the panel mounted Selector switch can be utilized to select one of 3 different modes of operation..Silo Simulation Lab Page 2 of 3  The FULL light will energize when the box is full and will remain that way until the box has moved clear of the prox-sensor. the system shall operate in the "Fill Bypass" mode of operation. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\sl\sl-rl.html 1/22/2003 .Container Filling with Manual Restart Alter or re-write your program so that it incorporates the following changes:  Stop the conveyor when the right edge of the box is first sensed by the prox- sensor. .. the Start and Stop pushbuttons will control the conveyor motion and the Run Lamp will operate as expected. Exercise #3 -.  The FULL light will energize when the box is full and will remain that way until the box has moved clear of the prox-sensor.. Exercise #2 -. the boxes will simply move down the conveyor continuously and bypass the fill operation. momentarily pressing the Start Switch will move the box off the conveyor and bring a new box into position.  Once the box is full.LogixPro . The 3 modes shall operate as follows:  When the selector switch is in position "A". LogixPro .Silo Simulation Lab Page 3 of 3 file://C:\Program%20Files\TheLearningPit\LogixPro\doc\sl\sl-rl.html 1/22/2003 .  Ensure that Switch I:1/0 is Open.html 1/22/2003 . and select "GoTo DataTable" from the drop- file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr.  Right click on the Timer instruction. and then place the PLC into the Run mode. and then select the "Clear Data Table" entry in the Simulations menu.LogixPro .. select the I/O Simulation.. This value represents a 10 second timing interval (10x0.  Clear out any existing program by selecting the "New" entry in the File menu.  Now enter the following program being careful to enter the addresses exactly as shown.1 seconds:  Once you have your program entered.Introductory Timer Lab Page 1 of 7 LogixPro Introduction To RSLogix Timers The TON Timer .1) as the timebase is fixed at 0. (Timer ON Delay)  From the LogixPro Simulations Menu.  Confirm that you have entered the number 100 as the timer's preset value.. and have ensured that it is correct. download it to the PLC. preset.ACC = _____ T4:1. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr.LogixPro . and the state of each of it's control bits. It waits the specified amount of time (as set in the PREset).html 1/22/2003 .PRE = ______ T4:1/EN = ____ T4:1/TT = ____ T4:1/DN = ____  Toggle the state of switch I:1/0 a number of times.Introductory Timer Lab Page 2 of 7 down menu.PRE = ______ T4:1/EN = ____ T4:1/TT = ____ T4:1/DN = ____  Close switch I:1/0. Cascaded TON Timers  Insert a new rung containing a second timer just below the first rung as shown below. note the final value of timer T4:1's accumulator. Conclusions: Use the TON instruction to turn an output on or off after the timer has been on for a preset time interval. This second timer T4:2 will be enabled when the first timer's Done bit T4:1/DN goes true or high (1). regardless of whether the timer has timed out. This type of timer is a non-retentive instruction. in that the truth of the rung can cause the accumulator and control bits to be reset (=0). and observe the operation of the Timer in both the DataTable display and in the Ladder Rung program display. The accumulated value is reset when rung conditions go false. the timer adjusts its accumulated value (ACC) each evaluation until it reaches the preset value (PRE).ACC = _____ T4:1.  Note the initial value of timer T4:1's accumulator and preset in the spaces below. and carefully observe the incrementing of the timer's accumulator. and sets the DN (done) bit when the ACC (accumulated) time equals the PRESET time. keeps track of the accumulated intervals which have occurred (ACCumulator). the accumulator and all 3 control bits are reset to zero. As long as rung conditions remain true.  Once the Timer stops incrementing. Also indicate the state of each of the timer's control bits in the spaces provided: Initial State (Switch I:1/0=Open): T4:1. and the state of it's control bits below: Final State (Switch I:1/0=Closed): T4:1.  Confirm that when the rung is taken false. This output instruction begins timing when its rung goes "true". Timer1 is reset by Timer2's done bit. and pay particular attention to the way in which the timers are cascaded (one timer starts the next).  Try changing the value of one of the timer presets by double clicking on the preset value in the DataTable display. download your program to the PLC and select RUN.  Once you have modified your program. and then entering a new value. when Timer1 is reset. Obviously locating the timers on consecutive rungs.  Toggle the state of switch I:1/0 to ON and observe the operation of the timers in your program. and employing consecutive numbering will make such a program much easier to read and trouble-shoot. and then when Timer2 is done.  Close switch I:1/0 and observe the operation of the timers. and modify the first rung of your program as depicted below. The timers should now be operating in a continuous loop with Timer1 starting Timer2. to use the DN (done) bit of the previous timer to enable the next timer in the sequence.html 1/22/2003 .  Run the timers through their timing sequence a number of times. Self Resetting Timers  Place the PLC into the PGM mode. Don't move on until you are satisfied that the timers are working as you would expect In this exercise we have utilized just two timers. download it to the PLC and place the PLC into the RUN mode.  Bring the DataTable display into view.Introductory Timer Lab Page 3 of 7  Once you have completed this addition to your program.LogixPro . As before. The only thing to remember is. it in turn resets Timer2 which causes Timer2's done to go low (T4:2/DN=0). file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr. but there is nothing stopping us from sequencing as many timers as we wish. Most people consider TON timers to be simple to use and understand. the sequence is back to where it originally began.. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr. utilize the DN (XIC or "NOT"done) bit of the last timer in the sequence to reset the first timer in the sequence. but I'm going to let you decide for yourself. The thing to remember here is. The TOF Timer . and have ensured that it is correct. In this exercise we cascaded two timers. but as before there is nothing to stop us from cascading as many timers as we wish. so a switch might not be used or needed. Once again. and select "GoTo DataTable" from the drop- down menu. and then enter or modify your existing program to match the one shown below..Introductory Timer Lab Page 4 of 7 Once Timer2's done bit is low.  Download and RUN this modified version of your program  Does the timing operation continuously sequence as before? It should!  Can you stop the timing sequence? Not without taking the PLC out of the RUN mode! In many applications there may never be a need to stop such a timing sequence. consecutive rungs.  Once you have your program entered.  Make sure that switch I:1/0 is Closed. and the timing sequence will start over once again on the very next scan..  Remove the first instruction (switch XIC I:1/0) from rung zero of your program.LogixPro . many people find the operation of the Allen Bradley TOF (Timer OFF delay) timer to be less intuitive. and then place the PLC into the Run mode. the TON timer is by far the most commonly used type of timer. (Timer OFF Delay) In Allen Bradley PLC programming.  Ensure that Switch I:1/0 is Closed.  Right click on the Timer instruction. and numbering will make a program much easier to read and trouble-shoot.html 1/22/2003 . In comparison. download it to the PLC. . and then replace the TOF timer in your program with a RTO retentive timer.  Your program should now match the one shown below: file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr.. (Retentive Timer ON)  Make sure that switch I:1/0 is Open. note the final value of timer T4:1's accumulator.  Now insert a new rung below the timer.  Once the Timer stops incrementing. The RTO Timer .. Also indicate the state of each of the timer's control bits in the spaces provided: Initial State (Switch I:1/0=Closed): T4:1. and add the XIC. The Accumulated value is reset when rung conditions go true regardless of whether the timer has timed out." It waits the specified amount of time (as set in the PRESET).T4:1 instructions. Conclusions: Use the TOF instruction to turn an output on or off after its rung has been off for a preset time interval.html 1/22/2003 . and resets the DN (done) bit when the ACCUM (accumulated) time equals the PRESET time.LogixPro .ACC = _____ T4:1.PRE = ______ T4:1/EN = ____ T4:1/TT = ____ T4:1/DN = ____  Open switch I:1/0. and observe the operation of the Timer in both the DataTable display and in the Ladder Rung program display.PRE = ______ T4:1/EN = ____ T4:1/TT = ____ T4:1/DN = ____  Toggle the state of switch I:1/0 a number of times. and the state of each of it's control bits.Introductory Timer Lab Page 5 of 7  Note the initial value of timer T4:1's accumulator and preset in the spaces below. and the state of it's control bits below: Final State (Switch I:1/0=Open): T4:1. keeps track of the accumulated intervals which have occurred (ACCUM).  Confirm that when the rung is taken true.I:1/1 and RES. This output instruction begins timing when its rung goes "false. and carefully observe the incrementing of the timer's accumulator. the accumulator and all 3 control bits are reset to zero. The TOF timer like the TON timer is also a non-retentive instruction and can be reset by changing the truth of the rung. preset.ACC = _____ T4:1.  Now toggle switch I:1/0 several times and note that the timer should again start timing as expected.html 1/22/2003 . Are we starting off with the same values we had in the TON exercise? You should be answering Yes.!  Close switch I:1/0 for 2 or 3 seconds and then Open it again. until you are satisfied that you clearly understand the operation of both the RTO timer.  Now close Switch I:1/1 and leave it closed. but the accumulator was not reset to zero. preset and control bits.  Right click on the Timer instruction. and select "GoTo DataTable" from the drop- down menu. download it to the PLC.  Close the switch again and leave it closed which will allow the timer to time-out (ACC=PRE).Introductory Timer Lab Page 6 of 7  Once you have your program entered. and once again note the state of the control bits. and have ensured that it is correct. This will cause the Reset instruction to go true. It should not!  Open Switch I:1/1 which will cause the Reset instruction return to false. note the state of the control bits  Open the switch. Conclusions: file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr.  Ensure that both Switches are Open. and then place the PLC into the Run mode.  Once timed out.  Note the initial value of timer T4:1's accumulator.  Repeat the foregoing steps. and the Reset instruction.  Note that the timer stopped timing when the rung went false.LogixPro .  Close switch I:1/0 momentarily to see if the timer will start timing again. the RTO begins timing from the accumulated time which was held when rung continuity was lost.. When rung continuity returns (rung goes true again). the mode changes from RUN to PGM. a fault occurs.LogixPro . retentive timers measure the cumulative period during which rung conditions are true.. ...Introductory Timer Lab Page 7 of 7 An RTO timer functions the same as a TON with the exception that once it has begun timing. By retaining its accumulated value. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ntmr\intro-tmr. it holds its count of time even if the rung goes false.html 1/22/2003 .. or power is lost. amber and red lights in the following manner: Sequence of Operation: 1. Select the Traffic Light Simulation Using your knowledge of cascading timers.Traffic Control using 3 Lights From the Simulations Menu at the top of the screen. Light O:2/00 (Red) = 12 seconds ON 2. Light O:2/01 (Amber) = 4 seconds ON 4.Traffic Control Lab Page 1 of 3 LogixPro Traffic Control Lab Utilizing TON Timers Exercise #1 -.Time in Seconds ------------------> RED GREEN AMBER file://C:\Program%20Files\TheLearningPit\LogixPro\doc\tl\tl-ton. The sequence now repeats with Red = ON. Light O:2/02 (Green) = 8 seconds ON 3.html 1/22/2003 . <----------------. develop a ladder logic program which will sequence a set of green.LogixPro . Work the problem out. If a one second delay is not enough to get these drivers under control then just go ahead and jack the delay up to two! . and you'll end up with a much cleaner program as a bonus..Traffic Control Lab Page 2 of 3 12 Sec. You can solve this problem. Red = O:2/00 Green = O:2/02 Amber = O:2/01 Green = O:2/06 Amber = O:2/05 Red = O:2/04 8 Sec.. 8 Sec. 1 8 Sec.. but the job can be done with just four. 8 Sec. Red = O:2/00 Green = O:2/02 Amber = O:2/01 Green = O:2/06 Amber = O:2/05 Red = O:2/04 8 Sec.Traffic Light With Delayed Green Modify your program so that there is a 1 second period when both directions will have their RED lights illuminated. Still getting the odd Crash? Well it's pretty obvious that these drivers aren't paying much attention to Amber Lights! No need for any more wiring however. 4 Sec. Note that the timing diagram below only shows one of these 1 second intervals but two are actually required.. It is tempting to use six Timers for this task. 4 Sec. 4 Sec. 4 Sec. 4 Sec. Exercise #3 -.. but it's going take a little more programming.html 1/22/2003 . and try to keep the Timer count down to six. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\tl\tl-ton.LogixPro .Traffic Control using 6 Lights Modify your program so that the 3 lights which represent the other traffic direction are also controlled. Exercise #2 -. html 1/22/2003 .LogixPro .Traffic Control Lab Page 3 of 3 file://C:\Program%20Files\TheLearningPit\LogixPro\doc\tl\tl-ton.  Now enter the following program being careful to enter the addresses and values exactly as shown. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ncmp\intro-cmp.html 1/22/2003 . and then select the "Clear Data Table" entry in the Simulations menu.Introductory Word Compare Lab Page 1 of 6 LogixPro Introduction To Word Compare Instructions The RSLogix basic Comparison Instructions  From the LogixPro Simulations Menu. select the I/O Simulation.  Clear out any existing program by selecting the "New" entry in the File menu.LogixPro . html 1/22/2003 .  Once the count exceeds nine or ten. indicate the observed state of the lamps.LogixPro . reset the counter and repeat the above sequence.  Finally.  Toggle the state of switch SW0 (I:1/0) continuously while observing the truth of each of rungs as indicated by the lamps. Keep doing this until you are convinced that the instructions are operating as described in the RSLogix documentation.  Ensure that SW0 and SW! are configured as Normally Open pushbuttons then place the PLC into the Run mode. download your program to the PLC.Introductory Word Compare Lab Page 2 of 6  Once you have completed entering your program. by circling the appropriate numbers below: file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ncmp\intro-cmp. 6. The basic comparison instructions are:  EQU .....LogixPro ...10 Conclusions: The basic Comparison instructions compare the values stored in two memory locations..7.5. These two values can be the data stored in two different word locations...5....6.4........7.....9....8..8..3.. The Less Than OR Equal instruction goes true if the value in source A is Less Than or Equal to the value in source B  GEQ ..2.4............8.... or one can be the data stored in a word and the other can be a constant value....6....8...7.. The Greater Than OR Equal instruction goes true if the value in source A is Greater Than or Equal to the value in source B Since any PLC word including Timer and Counter accumulators and presets can be used as the source value in any of the basic comparison instructions.2.9.. these instructions prove extremely versatile and are widely used in RSLogix programs..4..3. The LIM Instruction . The Less Than instruction goes true if the value in source A is Less Than the value in source B  GRT ..7...2.10 Lamp 3 is On during counts: 1.......9.5.Introductory Word Compare Lab Page 3 of 6 Lamp 0 is On during counts: 1...10 Lamp 2 is On during counts: 1..... file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ncmp\intro-cmp...10 Lamp 1 is On during counts: 1...html 1/22/2003 .5... The Not Equal instruction goes true if the source A and B values are Not Equal to each other  LES .9..3.  Ensure that addresses and values are exactly as shown.....6.2... The Equal instruction goes true if the source A and B values are Equal to each other  NEQ ... The Greater Than instruction goes true if the value in source A is Greater Than the value in source B  LEQ ..4... Limit Comparison  Modify or rewrite your existing program so that the first 3 rungs appear as shown below....3.. indicate the observed state of Lamp 4.html 1/22/2003 . And ...3. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ncmp\intro-cmp.... The instruction goes true if .Introductory Word Compare Lab Page 4 of 6  Once you have completed modifying your program.7..4.  Once the count exceeds ten. Test is Equal to or Greater than the Low Limit . download your program and place the PLC into the Run mode..8.5.2. reset the counter and repeat the above sequence.  Finally..LogixPro ....... by circling the appropriate numbers below: Lamp 4 is On during counts: 1. A logical equivalent to rung 2 is shown below: The LIM instruction provides in a single package the same functionality that would normally necessitate the utilization of 2 basic comparison instructions.6....  Toggle the state of switch SW0 (I:1/0) continuously while observing the truth of Lamp 4.10 Conclusions: The LIM (Limit Comparison) instruction compares the Test value to the value of the Low Limit and the value of the High Limit. Keep doing this until you are convinced that the LIM instruction is operating as described in the RSLogix documentation...9.. Test is Less Than or Equal to the High Limit.. . There are several other instructions in the RSLogix instruction set that employ masking and work similarly. Masked. Equal Comparison The MEQ instruction is sometimes considered an advanced level instruction which many might deem inappropriate for inclusion in a basic level exercise.LogixPro . selected bits within the Source value can be "masked out" or deleted prior to doing the comparison for Equality.  Now enter the following program being careful to enter the addresses and values exactly as shown.  Once you have completed your program. The MEQ is however listed with the other comparison instructions. increment the displayed value up and down and note how both lamps energize when the value is set to 4. download your program and place the PLC into the Run mode. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ncmp\intro-cmp.Introductory Word Compare Lab Page 5 of 6 The MEQ Instruction . so a quick peek at it's functionality should not cause major harm.html 1/22/2003 .. The only difference is that with the MEQ instruction.  Now set the first thumbwheel to 4 and start incrementing the second (tens) thumbwheel..  Starting with the right hand (units) thumbwheel only.  Note: address I:5 is the address of the I/O simulator's input card which has the thumbwheel switches connected to it. The following program is a very simple demonstration of how extraneous information can be selectively ignored with the judicious use of masking. but only the MEQ instruction will be reviewed here. In the above MEQ example we are going to mask out all bits other than the 4 which contain the data from the first thumbwheel switch. The subject of "Masking" relates to the act of controlling which bits within a binary value or word are passed through to a destination. The MEQ and EQU instructions are almost identical in operation. If your program is operating correctly only lamp 6 should remain lighted.  Clear your existing program by selecting the "New" entry in the File menu. .4.. but it does require a reasonably good understanding of numbering systems and in particular binary. ... file://C:\Program%20Files\TheLearningPit\LogixPro\doc\ncmp\intro-cmp...54......104 Conclusions: The MEQ instruction has the same functionality of an EQU instruction.34.. and circle the appropriate number if the corresponding lamp is On..34.LogixPro ......html 1/22/2003 .... set the thumbwheel values to match those listed below..14... Lamp 5 is On when the thumbwheel value is: 1.54..94..94.. Advanced level? Not really.14.Introductory Word Compare Lab Page 6 of 6  Finally. but it allows you to first mask out any extraneous information or bits prior to doing the actual test for equality..4..104 Lamp 6 is On when the thumbwheel value is: 1. 4 Sec.html 1/22/2003 . Select the Traffic Light Simulation Utilizing a single timer. Red = O:2/00 Green = O:2/02 Amber = O:2/01 Green = O:2/06 Amber = O:2/05 Red = O:2/04 8 Sec. Note that the timing diagram below only shows one of these 1 second intervals. but two are actually required. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\tl\tl-cmp. 4 Sec.Traffic Control Lab Page 1 of 3 LogixPro Traffic Control Lab Utilizing Word Comparison Exercise #1 -. The sequence of operation and timing durations are set out in following timing diagram.Traffic Control utilizing 1 Timer From the Simulations Menu at the top of the LogixPro screen. Your program should incorporate a 1 second period (delayed green) when both directions will have only their RED lights illuminated. 1 8 Sec.LogixPro . employ the use of Word Comparison instructions to control our simulated traffic light. .Dealing with Pedestrians Modify your program so that the crosswalks are also controlled. ..  When the Amber light appears.  If the Green light is already illuminated when the button is pressed then the Walk signal sequence will be delayed until the next Red to Green transistion ocurrs.html 1/22/2003 . It might not be all that easy however! Your program should operate as follows:  When depressed. This is not necessarily a word comparison exercise. it will remain so for the duration of the Green signal. but it's a task that needs doing. the Walk Sign will commence to flash On and Off and continue to do so until the Red signal appears. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\tl\tl-cmp.... the crosswalk pushbutton will cause the appropriate Walk Sign to be illuminated at the next occurence of a Red to Green transition for the appropriate direction.  Once the Walk Sign is illuminated. You might consider using a bit from the free-running timer located in S2:4 to create the cautionary flashing effect. and you should now have sufficient expertise to accomplish it.Traffic Control Lab Page 2 of 3 If a one second delay proves insuficient to get these drivers under control then just go ahead and jack the delay up to two! Exercise #2 -.LogixPro . Traffic Control Lab Page 3 of 3 file://C:\Program%20Files\TheLearningPit\LogixPro\doc\tl\tl-cmp.html 1/22/2003 .LogixPro .  Now enter the following program being careful to enter the addresses exactly as shown.  Clear out any existing program by selecting the "New" entry in the File menu. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr.Introductory Counter Lab Page 1 of 7 LogixPro Introduction To RSLogix Counters The CTU and RES .  Confirm that you have entered the number 10 as the counter's preset value.. indicating that the count is complete.. select the I/O Simulation. and then select the "Clear Data Table" entry in the Simulations menu.... This value is optionally used to set the point at which the counter's Done Bit will be Set.LogixPro . Counter Instructions  From the LogixPro Simulations Menu.html 1/22/2003 . Final State (Switch I:1/0=Closed): file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr. and then increment the counter until the accumulator matches the preset.PRE = _______ C5:1/CU = ___ C5:1/CD = ___ C5:1/DN = ___  Open and Close switch I:1/00 a number of times and carefully observe the incrementing of C5:1's accumulator and the operation of the enable and done bits. You should not be able to increment the counter while the "RES" instruction is held "True".ACC = _______ C5:1.LogixPro .  Open switch I:1/01 to allow the "RES" instruction to go false. Also indicate the state of each of the Counter's primary control bits in the spaces provided: Initial State (Switch I:1/0=Open): C5:1.  Increment the counter 2 or 3 more times and note the final value of C5:1's accumulator.  Attempt to increment the counter while switch I:1/01 is closed.Introductory Counter Lab Page 2 of 7  Once you have your program entered. and select "GoTo DataTable" from the drop- down menu. download it to the PLC.  Ensure that Switch I:1/0 and I:1/1 are Open.  Note the initial value of Counter C5:1's accumulator and preset in the spaces below. and then place the PLC into the Run mode.html 1/22/2003 .  Right click on the CTU instruction.  Close switch I:1/01 and observe the effect that the "RES" instruction has on the counter. and have ensured that it is correct. preset and status bits in the spaces below. or another instruction in your program to overwrite the value of the accumulator and control bits.. The ability of the counter to detect a false-to-true transitions depends on the speed (frequency) of the incoming signal.Introductory Counter Lab Page 3 of 7 C5:1. Rung transitions might be triggered by a limit switch or by parts traveling past a detector etc.PRE = _______ C5:1/CU = ___ C5:1/CD = ___ C5:1/DN = ___ Conclusions: The CTU output instruction counts up for each false-to-true transition of conditions preceding it in the rung and produces an output (DN) when the accumulated value reaches the preset value. The on or off status of counter done.LogixPro .. and underflow bits is retentive.. This way you can base an output on the preset but continue counting to keep track of inventory/parts. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr. The accumulated value and control bits are reset when a RES is enabled. permitting counting to continue beyond the preset value. etc. Each count (accumulator) is retained when the rung conditions again become false. and Insert a new rung containing a CTD instruction just below the first rung in your program. overflow.. Count Down Instruction Ensure that switch I:1/00 and I:1/01 are open.ACC = _______ C5:1.html 1/22/2003 . The on and off duration of an incoming signal must not be faster than the scan time. then place the PLC into the Program mode. The CTD . Use a RES (reset) instruction with the same address as the counter.. or if another instruction in your program overwrites the value. The count is retained until a RES (reset) instruction with the same address as the counter is enabled. Also. Conclusions: The CTD output instruction counts down for each false-to-true transition of conditions preceding it in the rung and produces an output when the accumulated value reaches the preset value. Each count is retained when the rung conditions again become false. Increment and decrement the counter from below zero to beyond the preset a number of times.LogixPro . The accumulated value is retained after the CTU or CTD instruction goes false. and when power is removed from and then restored to the processor.Introductory Counter Lab Page 4 of 7  Once you have completed this addition to your program. the on or off file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr.  Now toggle switch I:1/02 and decrement counter C5:1 while carefully observing the status bits of the counter.html 1/22/2003 . Rung transitions might be triggered by a limit switch or by parts traveling past a detector.  Toggle the state of switch I:1/0 continuously until the accumulator of C5:1 exceeds the preset. download your program to the PLC and select RUN. LogixPro .  Continuously Open and Close switch I:1/00 while carefully observing the incrementing of C5:1's accumulator. download it to the PLC. and underflow bits is retentive.  If you have entered your program correctly. pushbutton then place the PLC into the "Run" mode.Introductory Counter Lab Page 5 of 7 status of counter done..  Now enter the following program being careful to enter the addresses exactly as shown. and then select the "Clear Data Table" entry in the Simulations menu. In this example. Applying Counter Instructions . An Up/Down Sequence Example  Ensure that the I/O Simulation is still selected..  Clear your existing program by selecting the "New" entry in the File menu.  Note the use of the "EQU" instruction in rung 2 of the following program..O. and have ensured that it is correct. This input instruction will go true if the value referenced by the Source entry is "Equal" to the value contained in the Source B entry. overflow.  Once you have your program entered.html 1/22/2003 . The accumulated value and control bits are reset when a RES is enabled.  Confirm that you have configured switch I:1/0 as a N. the instruction will go true if the accumulator of the counter is equal to zero. the accumulator should increment file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr. Introductory Counter Lab Page 6 of 7 until the count of 10 is reached. where up/down counting operations are required. containers being filled and then emptied are just 2 examples of where paired CTU/CTD counters might be employed. The CTD instruction is less widely employed. This last exercise was definitely not the only way to setup an up/down counting sequence.  Ensure that your program is operating as described...LogixPro . file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr.  Note the conditions that must be present in order for bit B3:1/0 to be latched On. the latching will occur as soon as the count of ten is reached and the CTD instruction will immediately decrement the counter back to a count of 9.  Set the scan speed to it's lowest value. but it is then immediately decremented.. Cars entering and leaving a parking lot. The elegance of the CTU/CTD pairing can extract a price however in terms of ease of use and program clarity.. but it does highlight the attention to detail that you will need to demonstrate when tackling the later sections of the next student exercise. and is utilized in almost a limitless number of counting applications. The first XIC instruction ensures that the latching only occurs when the pushbutton switch is released  Delete this XIC instruction from rung 1. one requires a very clear understanding of the operation of these instructions and the PLC's scan sequence. . and is typically very easy to understand and employ.  Without the XIC instruction. When the count reaches zero.html 1/22/2003 . and then download and run your program again. and then start to decrement. It is extremely useful however when paired with a CTU. and you should be able to see that the count does reach 10. As the last exercise highlighted. and carefully note how bit B3:1/0 is being employed to track and control the direction of the counting sequence.. in order to employ them effectively. Conclusions: The CTU is by far the most commonly used counter instruction. It can. the B3:1/0 flag bit should be cleared and the up/down sequence should then repeat. LogixPro .Introductory Counter Lab Page 7 of 7 file://C:\Program%20Files\TheLearningPit\LogixPro\doc\nctr\intro-ctr.html 1/22/2003 . Usando seus conhecimentos de contadores de PLC. utilize as entradas "Reset Simulation" e o "Reset Timers and Counters" no menu de Simulações para reiniciar seu programa.Batch Mix Counters Lab Page 1 of 3 LogixPro Laboratório de Mistura em Lote Utilizando Contadores De PLC Exercício #1--Enchimento do tanque de mistura de lote No Menu de Simulações no topo da tela.  Durante o teste.LogixPro . selecione o Batch Mixing Simulation(Simulação de Mistura de Lote).  A operação de preenchimento deve parar imediatamente se o botão Stop é pressionado. Os pulsos gerados pelo Medidor de Vazão 1 deverão ser usados para incrementar um contador.  Quando o contador alcança um valor onde o tanque está aproximadamente 90% cheio. esboce um programa que satisfaça os requerimentos a seguir:  Quando o botão Start (I:1/0) é pressionado.html 1/22/2003 . Para tornar um pouco mais fácil de ver o que está acontecendo com o contador. a bomba deve ser desligada e a luz dos painéis de controle FULL deve ser energizadas. a bomba P1 será energizada e o tanque começará a encher. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\bl\bl-ctr. e então moverá (copiará) este valor BCD para o display de LED (O:4) do Painel de Edição.. A instrução TOD pode ser localizada no grupo de instruções Compute/Math no Painel de Edição (Edit Panel).  Quando a mistura estiver completa.  Garanta que a luz RUN esteja energizada quando o misturador ou qualquer uma das bombas esteja funcionando. file://C:\Program%20Files\TheLearningPit\LogixPro\doc\bl\bl-ctr...  O processo deve reiniciar de onde parou se o botão Start for pressionado após uma parada.LogixPro . a bomba de drenagem P3 deve ser acionada e o tanque esvaziado. . convertê-lo-á para Codificação Binária Decimal. Exercício #2--Esvaziando o tanque de mistura de lote Modifique seu programa de modo que satisfaça os seguintes requerimentos adicionais:  O misturador funcionará por 8 segundos após o tanque estar cheio. Se corretamente inserida. e será permitida à drenagem continuar até os contadores retornarem zero.. O Medidor de Vazão 3 será usado para decrementar o contador existente. pressionar o botão Start causará a repetição da sequência.  A luz STANDBY deve acender e o processo deve parar quando o botão Stop é pressionado.html 1/22/2003 . Exercício #3--Operação Contínua Modifique seu programa de modo que a sequência de enchimento e esvaziamento seja repetida continuamente depois de ter sido iniciada pelo pressionamento inicial do botão Start.  Logo que o tanque estiver vazio novamente. Tenha certeza de alterar o entrada origem para corresponder ao número do contador que você está usando.Batch Mix Counters Lab Page 2 of 3 você poderia adicionar o seguinte diagrama para finalizar o programa.. a instrução TOD (para BCD) pegará o valor inteiro no acumulador de contadores. Batch Mix Counters Lab Page 3 of 3 file://C:\Program%20Files\TheLearningPit\LogixPro\doc\bl\bl-ctr.LogixPro .html 1/22/2003 . a bomba P3 será usada para drenar o produto do tanque. Exercício #2 -.Modo de Operação de Múltiplos Lotes Aperfeiçoe seu programa para incluir as seguintes características: file://C:\Program%20Files\TheLearningPit\LogixPro\doc\bl\bl-adv. O tanque deve ser preenchido até o ponto em que o sensor de alto nível retorne true.  O tanque deve ser preenchido com uma mistura obtida de linhas de preenchimentos separadas utilizando bombas de preenchimento P1 e P2.  O Misturador funcionará por 4 segundos depois que a mistura chegar a temperatura desejada.  Após uma sequência de lotes ter começado. o processo de mistura de lote funcionará no modo de lote único.  Quando o preenchimento estiver completo.Modo de Operação de Lote Único Using your knowledge of PLCs. O operador pode começar a sequência de mistura de lote pressionando momentaneamente o botão Start. Quando o Misturador parar.html 1/22/2003 . a sequência pode ser parada e retomada a qualquer momento usando os botões Stop e Start.Advanced Batch Lab e 1 of 2 Pag LogixPro Laboratório De Mistura de Lote Avançada Um Sistema Programável de Mistura de Lote Exercício #1 -. a luz Full ligará. A proporção de mistura do produto será controlada pelo ajuste das predefinições do contador. Um contador irá averiguar a quantidade de produto obtido da linha 1 (P1) enquanto o resto virá da linha 2 (P2).  Uma vez vazio. uma nova sequência de lote único pode ser iniciada novamente ao pressionar o botão Start enquanto o interruptor de seleção estiver na posição “A”. O Aquecedor O:2/04 e o Misturador O:2/00 será iniciado permitindo que a mistura comece a aquecer. O Termostato I:1/02 será usado para controlar a temperatura.PSIM . design a program to meet the following criteria:  Quando o Interruptor de Seleção 3 posições está na posição “A”. O tanque será drenado para o ponto onde o sensor de baixo nível dispara. O número de lotes produzidos será selecionável pelo operador. É sua responsabilidade fazer com que a interface do operador seja o mais simples e a prova de erros possível. e a contagem atual do lote será mostrada no display LED do painel de Controle. o processo produzirá múltiplos lotes. Pag  Quando o Interruptor de Seleção 3 posições está na posição “B”.  O operador será capaz de definir a proporção do produto inserindo uma porcentagem desejada do produto através do seletor rotativo do painel de Controle.  O operador será capaz definir a contagem de lotes desejada usando o seletor rotativo do painel de Controle. 1/22/2003 . faça o download para o PLC e teste sua operação.html 5/2/2004 . A lâmpada “C1” deverá estar acesa apenas quando o compressor #1 está funcionando.com/lp/doc/c2/comp2. Antes de testar o seu programa. A variação da pressão será definida pelas configurações mostradas para o PE1. ajuste a taxa do fluxo de descarga do sistema para 50% como mostrado. e certifique-se que a lâmpada “Run” está acesa sempre que o sistema está ativado.thelearningpit. Permita ao usuário que inicie e pare o sistema de ar usando um painel de interruptores apropriado. Com o programa criado. ajuste ambos o limite (para 120PSI) e a configuração de intervalo ajustável (20PSI) do PE1 para que correspondam às configurações abaixo. Uma vez que a pressão chegue a 120PSI. o interruptor de pressão PE1(I:1/02) deverá ser utilizado apenas para controlar a operação do motor (O:2/0) e manter a pressão do tanque de armazenamento do compressor. Essa configuração deverá provar que é baixa o suficiente para que um único compressor será então capaz de suprir as necessidades desse sistema pneumático em particular. Quando o botão de Start for pressionado. o compressor deverá ser ativado e iniciar o aumento de pressão no tanque de armazenamento. o compressor http://www. Usando o seu mouse.LogixPro Dual Compressor Exercise Page 1 of 5 LogixPro Compressor Duplo Exercícios De Estudante Exercício #1 --.Operação com Compressor Único Neste primeiro exercício. thelearningpit. Finalmente. No entanto. http://www. Antes de testar seu programa.. O interruptor pneumático/elétrico PE1 continuará sendo utilizado para este propósito.. A tarefa de alternar entre um e outro compressor entre os carregamentos às vezes é referida como uma função de alternância de carga.. ajuste mais uma vez a taxa do fluxo de descarga do sistema para 50% como mostrado... Com o programa criado.com/lp/doc/c2/comp2. e as configurações continuarão as mesmas do exercício anterior. ajuste a taxa de fluxo que controla a quantidade de ar que sai do tanque de armazenamento para 80% e depois para 100% e note o efeito. Exercício #2 --.. necessitaremos de um pouco de ajuda de tempos em tempos do segundo compressor.. No entanto. neste exercício é pedido que você se limite a utilizar apenas instruções básicas de relé ao criar sua solução..Lidando com Grandes Demandas por Ar da Planta Seu programa atual deverá ser adequado para manter a faixa de pressão desejada enquanto o consumo de ar da planta mantenha-se relativamente modesto. cada compressor terá seu turno para elevar a pressão no tanque de volta à configuração de pressão selecionada. quando o consumo de ar da planta se aproxima de 100% da capacidade... adicionar um segundo compressor irá dividir o carregamento e permitir um período de resfriamento entre ciclos estendido. Obviamente.LogixPro Dual Compressor Exercise Page 2 of 5 deverá parar e manter-se inativo até que a pressão no tanque de armazenamento caia abaixo de 100PSI..html 5/2/2004 . essa taxa de fluxo pode ser prontamente mantida por um único compressor. . No entanto.Alternando Compressores quando o Carregamento é leve Neste exercício... torna-se óbvio que nós precisaremos ter os dois compressores funcionando para que seja satisfeita a carga crescente.. A taxas de fluxo mais altas. Como já determinamos. faça o download para o PLC e teste completamente sua operação.. um único compressor não terá a capacidade de suprir o sistema em maior necessidade sozinho.. e há numerosos métodos de realizar isso em lógica de relé. ... Exercício #3 --. mas.. faça o download para o PLC e teste completamente sua operação a ambos 50% e 100% de taxas de fluxo. E possível que suas modificações irão também fazer com que ambos os compressores atuem ao iniciar o sistema pela primeira vez e a pressão do tanque está inicialmente sendo elevada ao alcance dos interruptores de pressão. ative o seu sistema com a taxa de fluxo ajustada para 78%. Por favor garanta que o seu sistema opere dessa forma.LogixPro Dual Compressor Exercise Page 3 of 5 Modifique o seu programa para que o segundo interruptor de pressão PE2 detecte quando a pressão do tanque de armazenamento caia abaixo da configuração atual mínima de 100PSI. e cuidadosamente observe o resultado.html 5/2/2004 . iremos garantir que funcionamento contínuo excesso simplesmente não ocorra. Você deverá agora ter uma boa ideia de onde melhorias podem ser feitas. e ambos os compressores então continuarão a funcionar até que o tanque esteja à pressão máxima. O seu programa agora deverá estar apto a suportar grandes e pequenas demandas por ar de forma eficaz.thelearningpit. Com o programa criado. 80%. . para nossos propósitos. o compressor inativo deverá iniciar seu funcionamento. ou sem obter qualquer tempo desativo para resfriamento. com apenas um pouco mais de esforço você deverá ser capaz de até aprimorá-la. Quanto temo um desses compressores deveria ser permitido a funcionar continuamente normalmente seria especificado pelo fabricante. Antes de continuar para o próximo exercício. e então 82%. Essa situação ocorrerá se um único compressor for incapaz de sustentar a carga e a pressão do tanque continuar a cair. Enquanto esta solução executa tão bem quanto a maioria dos sistemas que utilizam lógica de relé. A 100% de carga. Essa ação irá reduzir o tempo que o sistema de ar da planta leva para atingir a pressão adequada. os compressores deverão alternar entre si em turnos. sendo então considerado desejável.com/lp/doc/c2/comp2.. http://www. nossa solução de controle atual simplesmente desmorona.... ambos os compressores deverão funcionar logo que for detectado que a pressão está caindo. Se e quando a pressão cair para 98PSI. Quando a 50% de carga.. Exercício #4 --.Dectando Quando 1 Compressor Não é Suficiente Quando a exigência da planta por ar se aproxima do volume máximo que pode ser fornecido por um único compressor.. É possível que esse único compressor possa funcionar por horas sem ser notado... .. o compressor inativo poderá ser ativado para ajudar no esforço.. você deve ter uma boa base de controle de vários tipos de sistemas similares.. Continue a utilizar PE2 para detectar se a pressão do sistema decai abaixo do mínimo prescrito. O primeiro método pode gerar repetidos funcionamentos a curtos ciclos do compressor de suporte quando operando a certas taxas de fluxo contínuas.. mas sinta-se livre para aperfeiçoar ou ajustar ambos interruptor de pressão e qualquer mecanismo temporizador empregado para obter a melhor performance possível..html 5/2/2004 .. . Um segundo método poderá ser rastrear o tempo que leva para a pressão do tanque cair de sua configuração máxima até a mínima. forneça uma forma de exibir o tempo de funcionamento contínuo acumulado para cada compressor. Para monitorar quão bem seu sistema está funcionando.com/lp/doc/c2/comp2. Sua solução deve continuar a alternar entre compressores quando as taxas de fluxo estão tipicamente de 50% a 60% ou abaixo. você pode detectar alguns pequenos problemas em qualquer um dos dois métodos acima. O segundo método tenta antecipar a demanda de carga. É consideravelmente comum encontrar ventiladores. tente igualizar o desgaste de cada compressor. Modifique o seu programa para que o funcionamento contínuo de um único compressor não ocorra. e evite a ocorrência de ciclos curtos tanto quanto for possível. Se um único compressor funciona além do tempo que normalmente bastaria para atingir a máxima pressão a 50% ou 60% de fluxo. ou possivelmente um novo que sequer foi discutido. mas pode não permitir mudanças rápidas na utilização de ar da planta. Ademais. Ao pensar um pouco... Pode ser que sua solução deva combinar ambos os métodos.. http://www. Utilize ambos o painel de interruptores de seleção e LEDs para esse propósito..thelearningpit. etc..LogixPro Dual Compressor Exercise Page 4 of 5 Ao procurar uma solução para este problema de funcionamento contínuo algumas ideias podem surgir.. sendo controlados de forma similar... e as técnicas que você desenvolver aqui deverem se aplicar diretamente. e disso determinar de antemão se 1 ou 2 compressores devem ser empregados... Seu objetivo deve ser analisar o sistema e apresentar a melhor solução possível usando o equipamento disponível... ou bombas. Com o seu programa aperfeiçoado ao máximo. html 5/2/2004 .com/lp/doc/c2/comp2.thelearningpit.LogixPro Dual Compressor Exercise Page 5 of 5 http://www. . assumindo que o acompanhemos. mais tarde. portanto. .. deve tornar-se rapidamente evidente que teremos ampla informação para tomar tais decisões. Essencialmente 3 estados booleanos descrevendo as propriedades de cada garrafa que entra na linha. No exercício inicial você será solicitado a rastrear os 3 valores Booleanos descrevendo cada garrafa entrando em nossa linha de processo. "Large" e "Broken" e esses estados devem ser rastreados por você... o tamanho da garrafa. pode descrever uma propriedade única de um produto. e se a garrafa está totalmente intacta. http://www. No entanto.. eles não existirão mais.html 5/2/2004 . Na simulação da linha de garrafas.. Pode-se argumentar que "Existe" não precisam ser rastreados (= correto). quando você começar a desviar garrafas quebradas para sucata.thelearningpit.com/lp/doc/bot/bottle. por sua vez. Nós usaremos este fato para evidenciar nossas instruções de BSL e causar um deslocamento de nossa informação controlada. já que garrafas continuamente entram na linha. deve existir. Se analisarmos as várias maneiras pelas quais poderemos processar essas garrafas. nos deparamos com o desafio de a detectar e seguir alguns detalhes booleanos que têm que fazer com os frascos que entrem na linha.. utilizando 3 BSL separados (Bit Shift Left).. mas uma rápida revisão das instruções de mudança de bits de Allen Bradley certamente deve apontá-las como uma ferramenta ideal para uso neste processo específico. Sensores são fornecidos para detectar a presença de uma nova garrafa. Uma única instrução BSR ou BSL pode ser usada para rastrear um único estado booleano (0 ou 1) que. e. Os estados booleanos serão referidos como "Exists".. Essas garrafas ausentes poderiam ser detectadas depois de serem descartadas usando o estado "Quebrado".LogixPro Bottle Line Simulation Page 1 of 7 LogixPro Exercício Avançado Da Linha De Garrafa Iniciando Há sempre inúmeras maneiras de realizar uma tarefa de programação. mas por hora eu quero que você rastreie todos os 3 estados usando 3 matrizes de bits separadas. .LogixPro Bottle Line Simulation Page 2 of 7 Exercício#1 .thelearningpit. Para estes exercícios. e as garrafas devem entrar e sair continuamente da linha. Teste seu programa e use o monitor de exibição da Tabela de Dados. . por favor utilize os bits na word B3:0 se e quando bits únicos como flags etc. são necessários Utilizando LS1 (Exists).html 5/2/2004 . "Large" e "Broken" estão sendo deslocados dentro de seus arrays de bits apropriados. Quando o processo estiver em execução.. use os arquivos #B3:2...Rastreamento das Garrafas Crie um programa que permita ao operador iniciar e parar o processo usando os interruptores montados no painel disponíveis. Isto é devido ao fato de que os 3 interruptores de limite estão localizados exatamente a 2 de largura de distância das garrafas.. você provavelmente teria notado que há um deslocamento entre cada um desses 3 arrays. evidencie 3 instruções BSL para deslocar 3 arrays de bits diferentes consistindo de duas words de 16 bits cada. Ao restringir você a esses arquivos em particular na tabela binária. esse espaçamento é realmente crítico. Por favor. será muito mais fácil para você e seu instrutor monitorar o que está acontecendo com o programa usando a tela da tabela de dados. o transportador principal deve ser energizado. Se o seu programa está funcionando corretamente. Você pode achar que será necessário diminuir a taxa de digitalização usando o controle deslizante no painel do PLC para ver essa atividade claramente.. #B3:4 e #B3:6 para esta finalidade.. observe como os bits representando "Exists"..com/lp/doc/bot/bottle. Para usar o LS1 para estroboscópio com os dados de todos os 3 switches ao mesmo tempo. Exercício#2 – Utilizando Dados Booleanos Se você prestou atenção cuidadosamente aos bits sendo deslocados ao longo de cada matriz de bits. você deve agora ter um meio de determinar as propriedades associadas com cada garrafa que passa para baixo da linha de engarrafamento.. e deve ser um múltiplo exato da largura de uma http://www. . mas para esses exercícios será sua responsabilidade para compensar essas compensações.. http://www... Pode haver maneiras de superar isso. eu decidi ter você grind as garrafas quebradas que ocasionalmente descem a linha. conforme necessário. É claro que é sua responsabilidade assegurar que o vidro esmerilado é colocado em caixas.thelearningpit. Exercício#3 .LogixPro Bottle Line Simulation Page 3 of 7 garrafa.. Você terá que ajustar para sempre que você empregar qualquer um desses bits para determinar as propriedades de uma garrafa particular. Se você é bem sucedido em completar o acima. Modifique seu programa para que todas as garrafas grandes sejam desviadas para o transportador inferior localizado no lado direito da simulação.html 5/2/2004 ... Isto deve ser realizado utilizando o bit apropriado na matriz de bits "Grande" para invocar a transferência. você deve estar bem preparado para lidar com a tarefa de desviar garrafas quebradas para sucata . Além disso.. verifique se as garrafas não estão danificadas no processo.Encaixotando as Garrafas Quebradas Para adicionar um pouco de interesse para a simulação. Não é possível compensar facilmente esse deslocamento ao usar uma instrução BSL. O número das larguras das garrafa por sua vez determina o deslocamento que encontramos em nossos arrays. pois os dados do comutador sempre serão carregados no bit 0 da matriz.. e para trazer novas caixas no lugar.com/lp/doc/bot/bottle. Por esta razão. Ao criar a lógica para este exercício..com/lp/doc/bot/bottle.. Uma vez que uma pequena garrafa só produz 2/3 de vidro moído como uma garrafa grande. .. Em seguida.thelearningpit.Enchendo e Tampando as Garrafas Não há muitos detalhes que precisam ser explicados sobre a operação de enchimento. você terá que ajustar para esta diferença na sua lógica do programa. é essencial que você preencha cada caixa para sua capacidade máxima.LogixPro Bottle Line Simulation Page 4 of 7 O custo de fornecer caixas de cartão pode ser significativo ao longo do tempo.. e fazê-lo sem derramamento. os dados booleanos contidos nas matrizes de bits serão usados na determinação da ação correta a ser tomada. contudo fàcilmente situada. Exercício#4 . você pode achar que você é confrontado com variáveis de inicialização ou limpar contadores etc cada vez que você edita e reinicie o programa. Mais uma vez.. Uma vez que você veio acima com uma solução para o problema de sucata. Não há nenhum sentido desordenar acima seu programa com a lógica que executa somente uma vez cada vez que é funcionado.. Apenas para torná-lo um pouco mais fácil de encontrar essa lógica. http://www. A energização do solenóide do tubo de enchimento O: 2/6 fará com que o tubo de enchimento se estenda e entre no frasco posicionado. então você está agora entrando no trecho de casa.. gostaria de pedir que você adicione o seguinte rung para o topo do seu programa. você deve fazer a escolha de descarregar uma quantidade grande ou pequena de produto na garrafa utilizando o solenóide de carga apropriado O: 2/7 ou O: 2/8... assim que por favor coloque esta lógica em uma sub-rotina onde está fora da maneira.html 5/2/2004 . etc . Vou deixar questões como quando parar e iniciar a linha para você.... mas você não precisa ajustar para o tamanho do frasco com este equipamento de cobertura particular. O solenóide O: 2/9 do encaixe do encaixe deve ser energizado para estender o encaixe.LogixPro Bottle Line Simulation Page 5 of 7 O controle de estação de rolagem garrafa deve ser apenas uma questão de tampar cada garrafa que vem junto.. e 4 unidades de exibição de quatro dígitos fabricadas completas com travas embutidas foram selecionadas para este propósito .. Quatro saídas de reposição de Cartão O: 2 foram então ligados para controlar a linha estroboscópica (activação de trinco) de cada unidade de exibição em quadrante individual.. selecione o seguinte link: Interfacing to 7-Segment Displays . includes Bottle Line wiring details http://www.. Para ver um diagrama de fiação...com/lp/doc/bot/bottle. Para reduzir o número de sinais de saída do PLC necessários para controlar esses muitos displays.. Foi decidido multiplexar as quatro unidades de exibição. Uma saída para cada uma das 4 unidades de quad-display .... Exercise #5 -. e essas linhas de dados compartilhadas foram ligadas em uma placa de saída de 16 bits endereçada como O: 4 .... Depois de ter as operações de enchimento e de nivelamento funcionando com a máxima eficiência. As 16 entradas de dados de cada unidade de quad-display foram conectadas a um barramento de dados compartilhado de 16 bits. Tentando tampão de uma garrafa que não existe vai causar pouco dano.html 5/2/2004 . além de obter mais informações sobre displays de 7 segmentos de multiplexação. certifique-se de que você só tampão garrafas que realmente existem.thelearningpit. mas é um desperdício de bonés.. No entanto. além disso acrescenta a desordem no chão da planta.. Devido ao acima exposto... tenha em mente que queremos manter o mais alto nível de produção possível com o equipamento à nossa disposição. .Tracking the Production Numbers O painel de controle do operador foi equipado com quatro unidades de exibição de LEDs de quatro dígitos que foram incluídas de forma que o operador possa facilmente visualizar as contagens de produção atuais. podemos então passar para o trabalho de manter o operador totalmente informado dos detalhes de produção. Uma possibilidade é empregar um temporizador de auto- reinicialização e. Esta tarefa particular de atualizar os displays de LED se presta bem à modularização e. tudo o que deve ser deixado é lidar com os detalhes. mas não tão altas como para sobrecarregar o PLC desnecessariamente. mas regular.html 5/2/2004 .. mais As alterações nas linhas de entrada de dados serão ignoradas eo visor continuará a exibir a representação numérica dos dados mantidos nas travas . Sua tarefa. e então você seria configurado para repetir a mesma seqüência para a próxima unidade de exibição .LogixPro Bottle Line Simulation Page 6 of 7 As telas multiplexadas podem ser gravadas individualmente colocando a representação BCD do número a ser exibido na placa de saída O: 4 e. Colocar esta lógica onde será fora do caminho.. estroboscópica a linha apropriada de habilitação de trava de baixo para alto e. Mesmo se você chamar esta sub-rotina incondicionalmente cada varredura. para que um temporizador localizado na sub-rotina seja atualizado corretamente Depois de ter concluído o precedente. ainda há benefícios para esta abordagem.thelearningpit..... deve ser executada em uma sub-rotina.. em seguida. lembre-se de que a sub-rotina Precisam ser chamadas incondicionalmente (como mostrado acima) em cada varredura. Você pode primeiro enviar os dados BCD desejados para o cartão O: 4 e habilitar a habilitação da trava selecionada no mesmo Tempo . Se você usar um temporizador. e os dados são travados ou efetivamente congelados quando a linha de habilitação de trava é tomada baixa . A tarefa de escrever a sub-rotina será deixada para você. Siga isto desabilitando a mesma habilitação de trava no próximo intervalo de tempo. e existem muitos métodos que podem ser empregados para realizar a tarefa. Permitir que o operador defina a contagem de garrafas a serem processadas pode ser uma característica que vale a pena implementar.. é atualizar os displays multiplexados com os totais em execução dos grandes e pequenos frascos produzidos..com/lp/doc/bot/bottle... O visor continuará a mostrar os mesmos números até que a ativação da trava seja novamente tomada alta ou a energia está perdido. idealmente. gravar em cada unidade de exibição em um intervalo de tempo único. em seguida. Revisar seu programa e certificando-se de que ele está claramente documentado é uma obrigação. Adicionar algo novo. de volta para baixo novamente ... em seguida. como monitoramento do tempo de execução do equipamento é uma opção . garrafas descartadas e caixas preenchidas.. Os dados É permitido entrar e passar através das travas internas da unidade de exibição selecionada quando sua linha de habilitação de trava é tomada alta..... Uma vez baixo.... deve ser alta o suficiente para que as contagens individuais não sejam ignoradas. mas prontamente acessível pode fazer para um programa muito menos confuso e mais fácil de ler. A taxa na qual as atualizações ocorrem. se você aceitar esta atribuição [sorrir]. http://www. Isto...html 5/2/2004 . http://www..thelearningpit.. eu disse que "há sempre inúmeras maneiras de realizar tarefas na programação"..Apenas uma Modificação Pequena Na introdução desta série de exercícios para a linha de garrafa.. .. não existe mais. examine cuidadosamente a documentação AB para a instrução BSR e veja se você pode chegar a uma maneira de eliminar o offset que tínhamos nas matrizes de bits anteriores. eu também quero que você se limite a usar apenas matrizes de 2 bits para rastrear as propriedades do frasco. pressupõe que o frasco quebrado foi desviado para sucata e. . agora vou pedir que você modifique seu programa para que as instruções BSR (bit shift right) sejam usadas no lugar da BSL... Se apenas as matrizes de bits "Grandes" e "Quebradas" forem usadas..... Enquanto você está fazendo as modificações necessárias. naturalmente. Ao mesmo tempo. portanto..LogixPro Bottle Line Simulation Page 7 of 7 Exercício#6 ..com/lp/doc/bot/bottle.. você ainda deverá ser capaz de determinar se existe uma garrafa examinando a propriedade "Quebrada" da garrafa. Para provar que a declaração foi correta... thelearningpit.com/lp/doc/bot/bottle.html 5/2/2004 .LogixPro Bottle Line Simulation Page 8 of 7 http://www. O índice fornece uma visão geral a partir da qual o leitor pode prontamente discernir onde determinados tópicos estão localizados e.html 5/2/2004 . nos levará a travar a lâmpada embutida do interruptor de modo a confirmar visualmente o pedido foi reconhecido. como pegar um botão de imprensa que denota um pedido para o elevador toarrive. toda lógica adicional que você adicionar ao seu programa deve ser colocado na sub-rotina apropriada que foi alocada para a tarefa específica à mão.. A lâmpada para este interruptor deve permanecer energizada até que chegue a cabina do elevador e. um programador pode até optar por modularizar o programa total. em seguida. Abra um novo programa e entre os intervalos mostrados abaixo na seção principal ou LAD2 deste programa. é que vamos precisar de um número razoável de bandeiras para acompanhar o que estamos fazendo. Exercício # 1 .. Muito parecido com o Índice de um livro.. As tarefas de fechar e abrir a porta são candidatos óbvios para a modularização. simplesmente chamado incondicionalmente em cada varredura. Você deve estar bem ciente do raciocínio por trás disso.com/lp/doc/elv/vator.. portanto. que a lâmpada pode servir a dupla finalidade de sinalizar que os pedidos pendentes existem.. Outro fator que é um pouco único para este exercício. Se for decidido essa abordagem. Em casos extremos. e até mesmo tarefas que exigem execução contínua.Preparando o Índice do seu Programa. se não todas as tarefas que serão necessárias.. modularizar partes de um programa e colocar a lógica necessária em sub-rotinas muitas vezes resulta em um programa que é mais fácil de ler e entender. mas utilizando as instruções de trava (L) e destravamento (U) até agora foi geralmente desencorajado.. Quase todos os programas requerem uma seção de inicialização. Uma vez que isso é realizado. e isso acontece de ser um deles.The LogixPro Elevator Simulation Page 1 of 6 LogixPro Elevador Multi Piso Exercício do aluno Começando Como vimos anteriormente. é chão e indiretamente a direção necessária de viagem. então o núcleo resultante ou programa principal será nada além do que uma lista de chamadas para sub-rotinas onde os detalhes são tratados. e já deveríamos ter um bom resumo tópico para o Índice do nosso programa. Felizmente. muitas vezes podem ser agrupados em uma sub-rotina e.. mover prontamente para esse local para obter mais detalhes. . http://www. os fechamentos de interruptor que denotam um pedido para ter o elevador chegar. em seguida. eo que deve ser feito em seguida. não é muito difícil visualizar como poderemos modularizar muitas.thelearningpit. O uso de E / S nessa maneira de dupla finalidade não deve ser novo. até agora. No caso da simulação de Elevador.. mas há situações em que as instruções de trava são ideal para a tarefa. Adicione um módulo para acompanhar o movimento do elevador. ..com/lp/doc/elv/vator. Este naturalmente assume que o elevador começa em sua localização padrão no primeiro andar. . você adicionará toda a lógica apropriada para detectar quando o interruptor montado na parede do 4º andar (I: 1/11) é pressionado. Quando isto ocorre. Neste exercício.. http://www.Levando o elevador para o topo. e estes devem ser utilizados para controlar o fluxo lógico do seu programa final.The LogixPro Elevator Simulation Page 2 of 6 Você vai notar que um número de sinalizadores já foram pré-definidos. Apenas para tornar a vida um pouco mais fácil em seu instrutor..thelearningpit... você é solicitado a utilizar os bits não utilizados na palavra B3: Quando for necessárias quaisquer bandeiras adicionais..html 5/2/2004 .. o elevador deve ser posto em movimento e prosseguir para cima até que chegue ao 4º andar onde ele vai parar. Exercício # 2 .. esta sub-rotina assume o controle. e é aqui onde você deve garantir que todas as bandeiras etc estão em seu estado inicial correto. só será necessário monitorar a bandeira (lâmpada) O: 2/11 e definir o sinalizador "Close and Go" em resposta. todas as 6 sub-rotinas serão utilizadas e. ea bandeira "Stop and Open" deve ser definido (travado). Próxima Solicitação ou Espera: Esta subrotina é onde a decisão de mover o elevador será feita. Em exercícios posteriores. A posição vertical do carro pode ser determinada lendo o codificador do eixo do motor (I: 5). a lógica adicional será adicionada para os outros interruptores que podem iniciar uma mudança na localização do elevador. U7. a localização do carro deve ser marcada por atualizar as lâmpadas indicadoras de piso adequadas. Em particular. que por sua vez invocar a sub-rotina "Stop and Open Door". Para este fim. Track Car Movimento: Uma vez que o carro está em movimento. U6. Uma vez lá. Solicitações de Pavilhão: Esta sub-rotina é onde a lógica que vai detectar. Neste exercício a direcção eo destino são fixos (para cima. você deve primeiro redefinir a simulação usando a seleção no menu de simulações. cada uma deve primeiro ser programada com a lógica apropriada para realizar esta tarefa inicial. e definir o carro "está se movendo" bandeira para que o posicionamento do carro será controlado.html 5/2/2004 . Isso irá garantir que o elevador está de volta no primeiro andar e todo o hardware está em seu estado initia. e então energize o motor para obter o elevador em andamento. e é responsável por decidir onde parar o carro.The LogixPro Elevator Simulation Page 3 of 6 É imperativo que você realize essa tarefa enquanto mantém a compatibilidade com a estrutura do programa atual. mas isso só deve ocorrer se o elevador não está já no 4 º andar. Sub-rotina de Inicialização: Cada vez que você testar seu programa. e igualando esta leitura àqueles que você recolheu para os andares individuais.com/lp/doc/elv/vator. U3 será executado. o "DoNext ou espera" sinalizador deve ser bloqueado true que irá garantir que sub-rotina U7 (Next Request ou Wait) será activamente digitalizados neste momento. por sua vez. http://www. Fechar Porta e Mover: Nesta sub-rotina. que cuidará de obter o elevador em andamento. U5. Antes de sair desta subrotina. invocará a sub-rotina "Fechar Porta e Mover" (U7).thelearningpit. Pode demorar um pouco de tentativa e erro para inicialmente reunir esses valores. Por agora. Quando você coloca seu programa no modo de execução. A direção desejada é óbvia neste caso. portanto. certifique-se de que tanto o "DoNext or Wait" eo "Close and Go" (Desbloqueado). mas mais tarde você certamente vai precisar de sinalizadores para indicar em qual direção seguir. As lâmpadas incorporadas dos interruptores montados na parede podem ser usadas como uma bandeira para iniciar um movimento da cabina do elevador. mas a tarefa pode ser facilitada se você retardar temporariamente a taxa de digitalização do LogixPro para baixo um pouco. Isto. e reagir ao encerramento da 4 ª parede interruptor chão deve ser colocado. A lâmpada para este interruptor deve ser travada. 4º andar). pelo que só será necessário determinar quando o carro atingiu o quarto andar. U3. U4. localize a lógica para fechar a porta. thelearningpit. estar pronto para lidar com devolvê- lo para o primeiro andar... então. Uma vez que você tem o seu programa para o ponto onde o elevador pode ser movido a partir de sua localização inicial para o 4 º andar como descrito. a lâmpada de interruptor embutida para esse piso deve ser extinta ea lâmpada indicadora de floo apropriada acima da porta deve estar iluminada. mas que se tornará bastante complexa quando os andares adicionais são adicionados.. você deve. e os sinalizadores adicionais podem ser adicionados conforme necessário. o seu programa não deve responder a uma imprensa de interruptor associada com a posição atual do elevador. sentado em repouso com a porta do carro do elevador aberta. Os pavimentos 1 e 4 serão utilizados para este fim.... um pequeno atraso de decantação de 2 segundos deve ser permitido. determinar qual direção a percorrer é uma tarefa trivial. Além disso. . o elevador estará localizado em um dos 2 pisos servidos. Exercício # 3 . Quando não se movendo ativamente. Depois de ter certeza de que você pode controlar totalmente o funcionamento deste elevador de 2 andares. seguido pela abertura da porta... http://www.A Complete 2 Floor Elevator Control. Por último.com/lp/doc/elv/vator. Toda lógica adicionada deve ser colocada na sub-rotina considerada apropriada para a tarefa em particular. Enquanto estiver trabalhando em uma solução para este exercício. Os pedidos de piso que ocorram durante este período de atraso não devem ser ignorados... As luzes indicadoras de piso acima da porta podem ser utilizadas para determinar qual lâmpada deve ser extinta.. você deve adicionar a lógica necessária para implementar um sistema completo de controle de elevador de 2 andares. devendo todos os interruptores e lâmpadas associados a estes pavimentos estarem totalmente operacionais. Bandeiras para indicar em que direção o elevador está viajando será uma obrigação. você deve estar bem preparado para passar para o exercício de vários andares.. Você também deve extinguir a lâmpada embutida do interruptor de solicitação montado na parede..The LogixPro Elevator Simulation Page 4 of 6 U8. . Parada e Porta Aberta: A primeira coisa a fazer aqui é parar o motor e redefinir (unlatch) a bandeira "Carro está se movendo".. Neste exercício. A porta deve então ser feita para abrir 2 segundos mais tarde.. À chegada a um piso. as únicas lâmpadas iluminadas serão a lâmpada indicadora de piso apropriada localizada diretamente acima da porta do elevador. a porta deve permanecer aberta por um mínimo de 5 segundos antes de poder processar outra solicitação de piso. tenha em mente que em breve você terá que estender esse controle para todos os 4 andares. Além disso.. Quando em repouso. mas apenas atrasados no processamento.. Felizmente com jus 2 andares.html 5/2/2004 .. The LogixPro Elevator Simulation Page 5 of 6 Exercício # 4 - Controle Multi Elevador de Piso. Estendendo seu programa para acomodar vários andares, parece ser uma questão relativamente simples de apenas adicionar a lógica para lidar com os interruptores adicionais e lâmpadas. Isso deve ser feito, é claro, mas uma nova questão surge em um sistema multi-piso que pode revelar-se um grande desafio para resolver. Com um elevador de 2 andares, você realmente tem apenas uma escolha quando decidir em que direção o elevador deve mover. Em um sistema multi-floor no entanto, você pode ser confrontado com 2 escolhas de viajar sempre que o elevador está em um piso intermediário. Além disso, você também deve levar em conta se o elevador está em repouso, sem solicitações de serviço pendente, ou se parou temporariamente no andar intermediário, enquanto prosseguia para um andar mais além na mesma direção. No nosso sistema de pavimento múltiplo, o elevador deve continuar na sua direcção inicial de deslocação, parando em cada piso intermédio que tem um pedido pendente para essa direcção particular, e prosseguir nesta mesma direcção até que o pedido de assistência mais distante seja alcançado. Neste ponto, a direcção de deslocação deve então ser invertida se outros pedidos estiverem pendentes. Todas as solicitações associadas a esta nova direção de viagem devem ser atendidas. Uma vez em movimento para o piso mais distante pedido, o elevador não deve parar em um piso intermediário se o pedido nesse piso é para a direção oposta; A menos que este seja o pedido mais distante. Caso contrário, o floo deve ser contornado e reparado quando o elevador se aproximar mais tarde do chão da direção oposta de viagem. Manter o controle da direção da viagem será fundamental neste esquema de controle. Sugere-se, portanto, que você empregar tanto "Going Up" e "Going Down" bandeiras para ajudar no processo de tomada de decisão. Somente quando não houver solicitações pendentes o elevador seria considerado em repouso (Espera), e as duas bandeiras de direção seriam definidas como falsas (destravadas). O primeiro novo pedido detectado pode então ser utilizado para determinar a direcção inicial de deslocação, e o conjunto de sinalizadores apropriado (bloqueado). Uma vez que uma direção tenha sido sinalizada, o movimento ea manutenção continuarão até que todas as solicitações pendentes sejam atendidas. Se necessário, a direção pode ser alterada, mas não até que todas as solicitações sejam atendidas, as duas bandeiras de direção tornar-se-ão falsas. A lógica associada à determinação da direção inicial, mudança de direção e obtenção de um estado de repouso, idealmente pertence à sub-rotina "Próxima Solicitação ou Espera". Esta lógica definitivamente não será trivial para desenvolver, e você é fortemente aconselhado a utilizar as ferramentas que você tem à sua disposição, incluindo caneta e papel para atingir uma solução adequada. Boa sorte! .......... http://www.thelearningpit.com/lp/doc/elv/vator.html 5/2/2004 The LogixPro Elevator Simulation Page 6 of 6 .......... http://www.thelearningpit.com/lp/doc/elv/vator.html 5/2/2004 Interfacing to 7-Segment Displays Page 1 of 14 Interfacing to 7-Segment Numeric Displays 7-Segment Numeric LED Displays In industrial PLC applications, one of the old, but simpler methods of displaying numeric information is to use one or more 7-Segment numeric displays connected to an output card of a PLC... Although it is possible to build such a display yourself, it is far more common to employ a pre-manufactured product such as the 4-digit panel mount unit shown at the top of this page... To correctly interface a PLC to such a display, it helps to first understand what basic electronic components are typically employed in their makeup, and how this effects our task of interfacing to, and programming such a unit... Although both LED and LCD numeric displays are readily available, and interfaced similarly, we'll concentrate on the more common LED units in the examples to follow... http://www.thelearningpit.com/lp/doc/7seg/7seg.html 5/2/2004 .html 5/2/2004 .com/lp/doc/7seg/7seg.thelearningpit... For now the latch is set to simply allow input data to freely pass through to the decoder. this particular IC includes a built in 4-bit latch which we will make use of in later examples.. Although BCD to 7-Segment decoder ICs are available without built in latches. a simple IC known as a "BCD to 7Segment decoder" was quickly developed to simplify their use... Binary formatted data presented to this IC's inputs results in the IC's outputs being placed into the correct state to display the equivalent numeral (0 to 9) on a 7-Segment display..Interfacing to 7-Segment Displays Page 2 of 14 BCD to 7-Segment Decoder c/w 4-bit Latch Once 7-Segment LED displays became readily available. http://www.. Interfacing to 7-Segment Displays Page 3 of 14 In the above diagram. By using a decoder..html 5/2/2004 .thelearningpit..com/lp/doc/7seg/7seg. BCD Input Data SW3 SW2 SW1 SW0 Numeral Displayed 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 http://www. and the decoder takes care of the rest. SW0 to SW3 are used to select the desired numeral (0-9) that will appear on the 7-Segment display.. it's now simply a matter of setting the correct 4-bit BCD pattern feeding the inputs of the decoder.. the 4 toggle switches. . then two such circuits (2 digits) could be controlled. or identify display units that need to be replaced... This input is normally left at logic 1...........html 5/2/2004 .. LT will override BL so you can test even blanked-out display digits..thelearningpit. A 16-bit card would in turn allow us to control four such circuits (4 digits). One should also note that the same circuit could conceivably be controlled by a PLC. This is used in many cases to blank out leading or trailing zeros from a long display. Lamp Test (LT) turns all segments on so you can verify at once that all display segments are working. If an 8-bit output card were available.com/lp/doc/7seg/7seg. http://www. if 4 output bits from a 5VDC PLC output card were used in place of the 4 switches shown...Interfacing to 7-Segment Displays Page 4 of 14 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 The decoder section also has two additional inputs...etc. it forces the entire display off. The Blanking (BL) input is just the reverse. . http://www.. and each circuit (digit) has it's own decoder. and more tolerant of electrically noisy environments...thelearningpit.com/lp/doc/7seg/7seg. this unit employs additional components and circuitry making it far more versatile and easy to use. These strobe lines control built in IC latches which provide us with the option of multiplexing the digits.html 5/2/2004 .. the strobes are permanently enabled allowing data to simply pass through from the BCD inputs and be displayed as normal. one for each digit..Interfacing to 7-Segment Displays Page 5 of 14 Parallel Non-Multiplexed Multiple Digit Display The figure (above) on the left is taken from the LogixPro I/O simulator screen.. and depicts a common method of interfacing to a 4 digit display. if we wished to do so.. The manufactured unit does contain four separate circuits. In the above non-multiplexed application.. The figures on the right are taken from the data sheet of a pre-manufactured 4 digit display unit which could be readily employed in this particular application. Also note that this particular unit is designed for 24VDC use.. Note that there are 4 "Strobe" lines shown.. In comparison to 5VDC circuits. This is by far the most common DC voltage level used in industrial installations.. or displays... are less sensitive to the effects of contact resistance. 24VDC circuits can typically tolerate far greater supply voltage excursions. but compared to our earlier circuit example.... and PLC I/O cards designed for such use are therefore extremely common.. First the BCD equivalent of the desired numeral (0-9) is set using the 4 data switches..com/lp/doc/7seg/7seg. we can easily multiplex the digits if so desired..Interfacing to 7-Segment Displays Page 6 of 14 Multiplexed Digits By making use of the 4-bit latches that are built into the 4511 IC. the current BCD input data will enter the latch of the upper 4511 IC. we will be able to essentially treat each digit as a unique 4bit memory location where BCD data of our choosing can be stored and retained. With just a minor modification to our circuit.... By properly controlling the state of each latch enable pin (LE) we can use the same input data lines (4 switches) to selectively write to each 7-Segment display independently.html 5/2/2004 .thelearningpit... if SW1 is then opened.. the latch will retain the current http://www. each display may be written to separately... and will be passed on to the decoder causing the numeral to displayed.. In the above schematic diagram.. If SW1 is then closed. thelearningpit. By multiplexing the data in this fashion we would only require 8 PLC outputs to control a 4 digit display.. The down side is that writing a ladder logic program to update a display wired in this fashion will be somewhat more complicated then one written to control 4 digits wired in parallel.. If we wished to add additional digits.. Well essentially the 16 data lines are internally connected in parallel with these sockets.html 5/2/2004 . we can dramatically reduce the number of PLC outputs required (8) to control this 4 digit display.. and this allows us to easily add additional units by simply interconnecting them using a flat ribbon cable assembly..com/lp/doc/7seg/7seg. then close SW2 momentarily to store and retain the current BCD data. you may have questioned the purpose of the dual inline sockets located on the wiring PCB of this manufactured display unit.... 4 Digit Display configured for Multiplexed Digits By using multiplexed data lines as shown above.Interfacing to 7-Segment Displays Page 7 of 14 data. Set the BCD equivalent of the desired digit using the 4 data switches... or SW1 is again closed and new data is allowed to enter it's latch. The desired numeral will continue to be displayed by the upper LED display until power is lost. we would require 1 more PLC output for each digit added..... We might say that we are strobing the data into the display.. We could readily replace the 4 data switches and 2 latch switches if we had 6 5VDC outputs available on our PLC. If you have been looking closely..... The Lower 7-Segment display may be written to in a similar fashion. but will now ignore any changes on it's inputs..... http://www. com/lp/doc/7seg/7seg.Interfacing to 7-Segment Displays Page 8 of 14 Multiple 4 Digit Displays configured for Multiplexed Digits http://www.html 5/2/2004 .thelearningpit. Interfacing to 7-Segment Displays Page 9 of 14 For those with a fundamental knowledge of computers.com/lp/doc/7seg/7seg.thelearningpit.. and the strobe lines are in effect our address bus.html 5/2/2004 . you'll likely note that we have essentially created a 4-bit data bus. We can continue to http://www.. com/lp/doc/7seg/7seg.html 5/2/2004 . and for each digit added we will require 1 additional PLC output...thelearningpit.. will be investigated now. 1 Quad Display requires 4 data + 4 strobes = 8 outputs 2 Quad Displays requires 4 data + 8 strobes = 12 outputs 3 Quad Displays requires 4 data + 12 strobes = 16 outputs 4 Quad Displays requires 4 data + 16 strobes = 20 outputs If you are reading through this tutorial because you are having difficulty determining how to control the 4 quad displays in the Bottle Line Simulation. Why this method was chosen. Multiplexed 4 Digit Displays .... but rather the quad displays themselves are muxed. you may already have noted that the displays in that simulation do not employ muxed (multiplexed) digits... or 4 outputs per quad display. (Bottle Line Simulation) http://www.Interfacing to 7-Segment Displays Page 10 of 14 add additional digits... the 4 manufactured displays are wired to http://www..thelearningpit.Interfacing to 7-Segment Displays Page 11 of 14 The above diagram functionally depicts how the 4 panel mounted display units in the Bottle Line simulation are deemed to be configured..html 5/2/2004 .com/lp/doc/7seg/7seg. In this case. http://www...... plus a quicker scan. Need 10 displays. the BCD data will enter the selected latches......... If you need to control 4 quad displays..20 outputs 5 Quad Displays requires. to high state. fewer instructions typically equates to an easier to read program.......... the BCD data will (be latched) remain in the latches.Interfacing to 7-Segment Displays Page 12 of 14 a shared 16-bit data bus (wires) which is connected to a 16-bit 24VDC output card (O:4) that is dedicated to this purpose........ Also.22 outputs 10 Quad Displays requires..html 5/2/2004 .. muxed displays would be my choice....16 outputs............... The polarity of the strobe is non critical.......... If one of the four output bits 0:2/11 to O:2/14 is then taken from an initial low.8 outputs....24 outputs....... HMI?... and appropriately wired to allow control of the strobe lines associated with each display unit.......... and continue to be displayed....20 outputs...com/lp/doc/7seg/7seg.. while some of our earlier examples required a low state.... If this strobe line is then returned to the initial low state....26 outputs Another consideration relates to ease of programming.....16 outputs (no muxing) 2 Quad Displays requires. and it might be time to consider some other means of presenting information to the operator.28 outputs.. The task of writing digits one at a time is obviously going to be a greater challenge then writing 4 digits at a time. Multiplexed Digits vs Displays There are no hard and fast rules relating to this issue.....21 outputs 6 Quad Displays requires........ and the numerals will be displayed.....19 outputs 4 Quad Displays requires. but a quick look at the following chart does provide some food for thought. You may have noted that this configuration requires a high level on the strobe line to allow data to enter the latch.18 outputs 3 Quad Displays requires. Any changes in the state of the data lines will now be ignored.44 outputs..Muxed Displays 1 Quad Display requires...thelearningpit.. Each unit may be written to individually by first sending the 16 bit BCD representation of the 4 decimal numerals to output card O:2. 4 unused outputs from card O:2 were selected........ and with this particular make of display... and this will continue until the next low-to-high transition of this unit's strobe line occurs.... the choice of polarity is set by simply positioning a configuration DIP switch appropriately. .Muxed Digits.12 outputs.. ........... com/lp/doc/7seg/7seg.thelearningpit.html 5/2/2004 .Interfacing to 7-Segment Displays Page 13 of 14 http://www.
Copyright © 2024 DOKUMEN.SITE Inc.