Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-1Lab 9 – Proximity Sensors and PLC IntroductionFormatThis lab will be conducted during your regularly scheduled lab time in a group format.Rotate roles during the lab - don't let one person do all of the programming at the computer.You may ask the lab instructor for assistance if needed, but successful completion of the labis your responsibility – not theirs!ReportA short, informal, group report is due at 8:00 AM on the Friday of the week after youcomplete this lab. This short report does NOT need to follow the formal report formatdescribed in the ME 360 course manual. All of the information specifically requested in thislab handout should be present in your report.Procedures9.1 Testing Different Proximity Switches:Several different proximity switches will be provided. Each group will need to connectpower ( 12V) and ground to the proximity switches and read the output voltage with aDMM. Most of the proximity switches will have a small wiring diagram label attached tothe sensor or supplied with the packaging. A typical wiring arrangement is shown below inFigure 1.Note that the proximity switch manufacturers do NOT use the ME 360 color code!If the resistor symbol is shown on the label, then try a 10 k resistor first. If no resistorsymbol is shown on the label, try not using one first. Use a different color wire (orange,yellow, blue, etc.) for the output from each proximity switch. If you are not confident aboutyour wiring, please ask the lab monitor for assistance before applying power to the switch.Proximity SwitchWiresRedProximitySwitchUser SuppliedWiresWhite 12V 10 k resistorWhiteOrange, Yellow, Blue, etc. VOUTBlackBlack-Figure 1. Typical Proximity Switch Wiring
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-2As you bring different targets to close proximity (a relative term) to the different switches,the output voltage Vout should change from about 12V (“not activated”) to about 0V(“activated”). Some of the switches may operate in the opposite manner where the voltagechanges from about 0V (“not activated”) to about 12V (“activated”).For each of the switches, determine the effective sensing distance with each different target.There will be 6 to 8 target objects to be detected for each of the switches. Targets will bemade of a variety of materials, such as steel, aluminum, plastic, wood, Styrofoam, etc.Sensing distanceObjectSensorFigure 2. Sensing Distance DefinitionFor each switch and object combination,1. Record the approximate distance at which the object is sensed, i.e., when the outputvoltage changes from the not activated state to the activated state.2. Record the “activated” output voltage and the “not activated” output voltage from theproximity switch for each target.Outside of Lab:3. Create a table that clearly presents the information requested above.4. For each switch, write a brief sentence or two that describes your observations of thestrengths and weaknesses of each switch. (There will not necessarily be a greatdifference between some of the switches.)9.2 PLC Wiring Diagram1. Use the PLC program (ME360 Test Stand) to verify the solenoid and limit switchassignments shown in Figure 3. Pushbutton and indicator light assignments are shownin Figure 4. Note that the red LED light X0 on the PLC is on when the horizontal cylindercontrolled by Y1 is retracted. Note that the red LED light X1 on the PLC is off when the horizontal cylindercontrolled by Y1 is retracted. Press and hold C41 to turn on output Y1 and extend the horizontal cylinder. Note that the red LED light X0 goes off when the horizontal cylinder first movesand that the red LED light X1 goes on when the horizontal cylinder is fullyextended.
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-3 Observe the operation of the remaining limit switches and red LED lights as theother solenoid valves connected to Y2 and Y3 are activated. Notice the operation of the fan as output Y11 is activated.2. Make a rough sketch of the PLC wiring diagram (connection of limit switches,pushbuttons, solenoids, etc. to the PLC), including pushbuttons and limit switches,for the components used on the PLC test stand.Outside of Lab:3. Use the PowerPoint files provided on the ME 360 website to create a PLC wiringdiagram for the report, draw one by hand neatly with a ruler or straight edge, or drawone in AutoCAD. Include all of the components used on the PLC test stand.Operator Interface PanelPLCFan outputY11X1 (NO)Solenoid ValvesControlled by Y0X0 (NO)X6 (NC)X7 (NC)Controlled by Y1X3 (NO)Controlled by Y2Controlled by Y3X2 (NO)Figure 3. Solenoid and Limit Switch Assignments
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionWrite to internal contacts C12- C17 to turn on the “lamps”Lab 9-4Read from internal contactsC40 - C50 to read status of C46C47C50Figure 4. Pushbutton and Indicator Light Assignments9.3 Pneumatic System Schematic1. Make a rough sketch of the pneumatic systemschematic diagram for the PLC test stands. Include all of the components mounted to the teststand, including the ones mounted on the back. Be sure to include the flow control valves (shownin Figure 5) mounted to each of the four cylinders. Draw the “rodless” cylinder (mounted on the lowerleft side) as a double-acting, double-ended cylinder. Note that the schematic symbol for many of thecomponents is given on the component itself.Figure 5. Pneumatic ValvesOutside of Lab:2. Use the PowerPoint file provided on the ME 360 website to create a pneumaticsystem schematic diagram for the report, draw one by hand neatly with a ruler orstraight edge, or draw one in AutoCAD.For each of the remaining 4 assignments (#9.4 - #9.7):Draw the ladder logic diagram for the exercise (or make “screenshots”) and give a thoroughdescription of the operation of each configuration of the program. Be sure to give afunctional description of what is happening to the pneumatic cylinder as well as a descriptionof the operation of the PLC ladder logic program. Answer all questions asked for eachassignment.
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-59.4 PLC Program - Sample1Goal: Create the program shown below and name it Sample1. Page references in bold referto the DirectSoft 5 User Manual Quick Start guide.Steps:1. Start a new ladder diagram (called a “project” in DirectSoft) (p. 2-12)2. Enter the Edit Mode for the ladder diagram (2-15)3. Insert and edit the individual elements in rung #1 of the ladder diagram (2-16)a. N.O and N.C. contacts (2-17)b. Output coils (timers and counters go here as well) (2-18)4. Create the parallel row below rung #1 (“OR” constructs) (5-13)5. Insert and edit the individual elements in rung #1b of the ladder diagram6. Add the End rung below the two rungs already created (2-19)(Note that a Fatal Error occurs if program does not have the End rung!)7. Accept and save the program (2-20)8. DirectSoft 5 will compare the program you have just written and are saving to the onecurrently stored on the PLC, so the Online/Offline Differences dialog box will appear.Select Use Disk to continue. (2-25)9. Read the top of p. 2-26 and download the program to the PLC by clicking on the(Write Program to PLC) icon. (2-26)10. Place the PLC in the Run mode (2-26, 2-27)11. Check for Run mode status at the bottom of the screen (2-27)12. Monitor the status of the inputs and outputs on the PLC screen (2-28)
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-613. Execute the program several times (by pressing the C40 pushbutton to start theprogram and C41 to stop it on the operator interface panel).14. Describe what the PLC program and the pneumatic system do when you press thebuttons – this goes in your report!15. Review the procedure for drawing and/or deleting connecting lines (5-19)16. Review the procedure for selecting rungs for deleting, cutting, or copying (5-19)17. Return to the Edit mode (step #2) and modify your Sample1 program by changing thelocation of the NO contacts X0 as shown below. Accept your edits (step #4), thendownload the program to the PLC (step #6) and execute the modified program severaltimes.18. Describe what the modified PLC program and the pneumatic system do when youpress the buttons – this goes in your report!19. Hold the NO pushbutton C40 down for 3 seconds. How does program Sample1 worknow?Complete the DirectSoft 5 User Manual Quick Start guide by reviewing the remaining items.20. Summary of offline toolbar components (4-2)21. Summary of online toolbar components (4-5)22. Print ladder diagrams (8-3)(Note that printing to an Adobe PDF file is the only option)
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-7Timers (TMR) andCounters (CNT) can befound by selecting the Boxiconin the lower right-handcorner of the screen when inthe Edit mode.9.5 PLC Program – Sample2 Create the program shown below and name it Sample2. Accept your edits, save your PLC program to disk and download the program to the PLC Execute the program several times and adjust the flow controls on the Y2 cylinder suchthat it takes about 1 to 1.5 seconds to fully extend and 1 to 1.5 seconds to fully retract.If you are not sure about how to adjust the flow controls ask the lab monitor. Describe what the PLC program and the pneumatic system do when you press the buttons- this goes in your report! Execute the program several times and adjust the speed of the Y2 cylinder such that ittakes about 4 seconds to fully extend and 4 seconds to fully retract. What does theprogram do? Change the NO contacts X3 to a N.O. contact Y2. How does program Sample2 worknow? – this goes in your report!
Spring ‘11Lab 9 – Proximity Sensors and PLC IntroductionLab 9-89.6 PLC Program – Sample3 Create the program shown below and name it Sample3. Download the program to the PLC and execute several times. Describe what the PLCprogram and the pneumatic system do when you press the buttons - this goes in your report!Does it matter when in the cycle you press the NC pushbutton C45?Change the NC contacts X1 to NO contacts. How does program Sample3 work now? this goes in your report! 9.7 PLC Program – Sample4 Create the program shown below and name it Sample4. Download the program to the PLC and execute several times. Describe what the PLCprogram and the pneumatic system do when you press the buttons - this goes in yourreport!