1. EET310 – Programmable Controllers and Robotics
Unit 5
By: Brett Bloomberg
Instructor:
William Routt
Online EET Department
ECPI University
Date: 10/21/2016
ECPI’s Honor Pledge: I pledge to support the Honor System of ECPI. I will refrain from any form of
academic dishonesty or deception, such as cheating or plagiarism. I am aware that as a member of
the academic community it is my responsibility to turn in all suspected violators of the honor code. I
understand that any failure on my part to support the Honor System will be turned over to a Judicial
Review Board for determination. I will report to a Judicial Review Board hearing if summoned.
Brett Bloomberg
2. Objective:
These final labsthatwe are to performhave broughtthe more advancedconceptstolightand made us
betterengineers.We have learnedthatwe canmake PLC’sperformcircuitry,andBooleanoperations
withease.Ourprogramingskillswiththislabhave increasedfromthe knowledgewe learnedfromthe
lecturesandbooks.We learnedhowshiftregisters, NetworkingPLC’s,andone of the mostimportant
trouble shooting.These labshelpeduslearnwhattolookfor whensomethingwasn’tworkingquite
right.
Lab 12-9
Thislab asksus to implementthe shiftregisterspray paintingapplicationprogramshownbelow.The
sequence of operationisasfollows.
Each file bitlocationrepresentsastationonthe line,andthe statusof the bitindicateswhetherornota
part is presentatthe station.
The bit addressI:1/2 detects whetherornota part has come onthe line.
The shiftregistersfunctionisusedtokeeptrackof itemsto be sprayed.A bitshiftleftinstructionisused
to indicate aforwardmotionof the line.Asthe partspassalong the productionline,the shiftregisterbit
patternsrepresentthe itemsonthe conveyorhangertobe painted.LS1is usedtodetectthe hangerand
LS2 to detectthe part.
Whena part tobe paintedanda part hangeroccur in sequence (indicatedbyasequential closingof LS2
followbyLS1 logic1 is inputintothe shiftregister.
The logic1 will cause the undercoatspraygun to operate,andfive stepslater,when1occurs in the shift
register,the topcoatspraygun isoperated.Limitswitch3counts the parts as theyexitthe oven.
The counts obtainedbylimitswitch2and limitswitch3shouldbe equal atthe endof the spraypainting
run. PL1 isenergizedandisan indicationthatthe partscommencingthe spraypaintingrunequal the
parts that have completedit.Logic0 inthe shiftregisterindicatesthatthe conveyorhasnoparts onit to
be sprayedand inhibitsthe operationof the spray.
Operations:
Thisprogram worksininterestingways,butitisa basicshiftregister.Once youknow the basicsof how
theywork,and whatit takes to setthe bitto a zeroor a 1. The requirementsthatthe labasksyouis in
orderto set a 1 inthe 8 bitregisteryoufirstneedlimitswitch2to be set,and thensetlimitswitch1.
The settingof limitswitchone locksthe bitintothe register.When yousetlimitswitch3it meansthat
once limitswitch1 doesgetsetthat it will lockina zerointothe bit register. The shiftregisterisstored
inthe internal bitof B3:0. Thiswill letyousee the whole registerandhow the bitsare shiftingthrough.
WhenbothB3:0 andb3:5 are made each one will displayalightindication.
3. Conclusion:
As youcan see if bothlimitsswitchone andlimitswitchthree are equal itwill lightupa lightthatwill
showwhenboththe inputand the outputof the systemare equal.Thisprogramisfairlysimple indesign
and implicational use of the shiftregister.Settinga1 or a 0 inthe registerisn’thard.TO geta one limit
switch2 needsto be activated,andto seta 0 limitswitchthree needstobe activatedwhile limitswitch
1 isactivated.
4. Lab 12-10
Thislab asksus to implementthe shiftregister programusedtokeeptrackof carriersflowingthrough
the 16 stationsprogram shownbelow.
The program is as follows
Proximity switches #1sense acarrier, while proximityswitch#2sensesapart of the carrier.
Pilotlightsconnectedtooutputmodule O:4turnonas carrieswithpartsmove throughthe machine.
Theyturn off as emptycarriesmove through.
Station#4 isan inspectionstation.If the partfails,the inspectorspushPB1astheyremove the part from
the system.WhichturnsoutputO:4/4 Off.
Reworkisaddedback intothe systemat station#6. Whenthe operatorputs a part on an emptycarrier
he or she pushespb2turningoutputO:4/6 on.
The program is blow.
Thisis a simple program,butithas a huge function.Inorderto make thisprogram shiftthe bitsthrough
the registerwe have tolatch or unlatchto move the bitdownthe O: 4
5.
6. Conclusion:
Thisshiftregisterallowsthe outputstobe usedasthe register.We usedO:4 to monitorthe bitsthat
wentthroughthe register.Eachtime it wouldcounttokeeptrack of the parts onthe system.The lights
will turnoff whenthe spotisemptyinthe physical worldshowingthatthe physical andlogical actually
match up.
Lab 12-11
Thislab asksus to implementthe firstinfirstoutinstructionsetof the shiftregisters.Boththe Fifo
instructionsare outputinstructions,andtheyare usedasa pair.The fifolaodFFLloadsdata from a
source elementandthe FIFOunloadunloadsthe instructiondatafroma file toa destinationword.This
program permitsthe stackingof datain a file.Twoseparate shiftspulsesare required:one toshiftdata
intothe file (load) andthe otherone isshiftdataout of the file (unload).
Thisis a simple firstinfirstoutdata shiftregister,anditworksverywell.We see withthe program
below. Asyoucan see fromthe integertable thatI have addednumbersintothe table todemonstrate
howthisprogram workseach numberthatisentereddoesn’tmatterasmuchas what the program does
withit.
7.
8.
9. What thisprogram doesistakesthe random numbersandsetsthemall to zeros,once thatis done itwill
setthemall to 5’s or the firstnumberthatis inthe shiftregister.Whendealingwithregistersof this
nature it isimportantto rememberthatitisfirstinfirstout. Thismeansthat if the firstnumberinis a 5
the last numberwill travel all the waydownthe registeruntil itisunloaded.Thiswill setthe entire
registeras5’s since it traveleddownthe line as5’s.Youcan resetthisbyunloadingall of the numbers
and loadingina zero.Thiswill loadinzerosuntil itiscompleted.
13-3 Trouble shooting
Thislab asksus to lookat the PLC program and execute tosequentiallyturnPL1 off for5 secondsandon
for 10 secondswheneverinputaisclosed.Troubleshootthe circuitandidentifywhatneedstobe
changedto have itoperate properly.Use the I/osimulatorscreenandthe following.The firstpicture
belowisthe startingprogram.Thisprogram has errorsin itthat don’treallyallow the programto
operate properly,asthe applicationisdesiredtooperate. We see thatthe systemdoesn’tturnproperly.
I noticedthatthe needforinternal bitwasunneeded.The firstprogramisthe books,andthe secondis
my changedprogram.
10. I addedthe timerlatchto the firstrung,whichmakesthe pushbuttonandusernotworry abouthaving
to holddownthe pushbuttonto keepthe programgoinglatchinginthe timerintoit allowsthe userto
justhave to pushthe buttoninorderto start the program.My secondchange was to remove the
internal bitusedtostopthe timersandthe latchedinfirstcounter.I removedthatbecause itwas
redundantanddidn’tneedtobe inthe program.Once the secondtimerisdone counteritturnsoff the
firsttimerandturns off the system.Whenthe secondtimeriscounteritturns onPL1.
11. Havingto thinkaboutwaysto make a programwork fromsomeone else’sprogramcertainlymakes
thingsinteresting.Havingtounderstandtheirlogicof whytheyprogramedthe things thatthey
programed,andfindingoutwhatisnecessaryandwhat isnot. Beingable tounderstandtheirlogiccan
be difficult.Ithinkthere isn’tarightandwrong wayto program. There are easierways,butthere isno
rightanswerinorder to make somethingworkornot.You can have a programwith10 rungs dothe
same thingwitha program with2. It all dependsonhow youthinkof the program and the applicationat
hand.Trouble shootingaPLC isdifferentthananythingelse inthe worldof automation.It’sthe code or
the brainof howthe systemworks.It’snotsomethingthatcomeseasytoeveryone,butwhenyouhave
that knowledgeandabilitytosee howthe code shouldflow verseswhatitsactuallydoingisaskill thatis
highlyvaluable.
Lab 13-4
Thislab asksus to construct a simulatedPLCprogramforthe program editingandcontrol.The program
isgivenandwe have tofollowinstructionsonwhatto doin orderto make the program workproperly.
The PLC program and requirementsare listedbelow.
12. Once we made all the changesthe program lookedlikethis.
13. As youcan see I may nothave followedthe directionscompletely.The directionswerealittle hardto
understandintermsof whatthe start and runrung were andwhichrung was whichsince myprogram
startedwithrung 0 and the drawingstartedwithrung1. Thisyoumay thinkisa simple mathproblem,
but whenyouare deletingmultiple rungsandinsertingthemaswell youlosewhichrungwassupposed
to be remove andwhichone wasn’t.Thisbringsup a whole listof communicationerrorsthatcan
happenwhentryingtocommunicate tothe program whatthe program needstodo, andwhat words
and the tone of howto make the corrections.
Conclusions:
Since wrappingupthisPLC laband the mainPLC course I have foundor renewedmyenjoymentfor
automationandplc programming.Iam veryinterestedinlearningmore aboutroboticsandhow to
program themas well.Iwishwe gotmore intoroboticsand their applications,butthiswasa veryfun
course.I didactuallylearna lotand had a verygoodrefresher.We learnedaboutshiftregistersand
othertopicsthat we didn’tlearnaboutinthe main course whichIthoughtwas veryinteresting. I
enjoyedthiscourse andIam excitedthatmytime here iscomingto an end.I am hopingthatwithall my
experience Iwill findmyeducationagoodreturnon investment,andbe fulfilled.Thiswill be ajourney.
References:
Petruzella,F.(2011) LogixproPLC labmamual foruse withprogrammable logiccontrollers( fourthed).
NewYork,NY: McGraw-Hill
Petruzella,F.D.(2011). LogixPro PLClab manualforusewith programmablelogiccontrollers. NewYork,
NY: McGraw-Hill.
LogixPro(VersionTLP) [Computersoftware].(n.d.).