Agile and Startups - What can go wrong - a Case study (Presented at ExpoQA 20...
PLC Class project Lab Brett Bloomberg
1. EET310 – Programmable Controllers and Robotics
Class Project
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:
Thisclass projectbroughttogether4 unique engineeringstudentstosolve andprograma PLC to a
specificapplication.We usedall of ourknowledgethatwe gainedthroughoutthe classtogetthe system
to performat itsbestwithminimal errorsof operation. Thisprojecthelpeduslearnandgrow fromone
another.We were able tobring differentapproachestolighttohelpussee if there wasa betterwayto
program thisapplicationthatwe were askedtodo.Our teamhad manydifferenttalentsandskill sets
that made thisprojectenjoyable,andagood learningexperience.We wouldtalkaboutsolvingdifferent
issuesthatour programhad and come up witha bettersolutionthatwe all thoughtwaseasiestto
program.
Intro:
Thisclass projectaskedusto create a PLCprogram that wouldcomplete anautomatedtask. Thislab
asksus to complete aPLC program that mixesandpumpstwoliquidsintothe same tankandheatsthem
for a certainamountof time.Withthislabwe usedour skillsandeducationthatwe gainedthroughout
term.We workedina groupto build,design,implementthe ladderlogic,andtroubleshootthe
application.Thistookeverybitof the educationthatwe learnedandkeptusthinking.We were able to
understandeachandeveryaspectof thisapplicationandlab.The class andlectureswere whatgave us
the foundationfortobe able toexecute the program.
Our groupwentthroughmany differentapplicationcodingchanges.Some of usdidn’tsee eye toeye at
firston howthe program wasto be coded,andsome of us wentabove andbeyondwhatthe application
was askingfor.We wentthrough4-5 mainchangesof the programand each of us I believetackledsome
aspectsinour ownway that we thoughtwasbest.We didhave some disagreements,butitwasn’ta
drag out fightjustexplainingeachside andwhywe programeditthe waywe did.Each renditionof the
code changedand improveddramaticallywitheachnew version.Once we were all onthe same page I
believewe foundaveryhighlyfunctioningladderlogiccode forthisapplication.We believeitwould
give minimal errorsthatwouldrequire userintervention.We were thinkingaboutgoingdeeperintothe
projectwiththe errorsand makingan error logthat wouldpopupeverytime somethingunexpected
wouldhappen.Thiswasn’tinthe scope of the assignment andwouldhave takenmuchmore
interaction.Insteadwe justdidthe basicladderlogiccode redundancyof makingsure thatthe idle light
isn’tonwhile the systemisrunning.We couldhave made sure the thattank wasn’tfull while beingin
idle,butthatdidrequire a lotmore work andwe thoughtthat it wouldbe outside the scope of the
assignment.
Lab question:
The lab tellsusthat twoingredientsaand B are to be heatedandmixedtogether.TwopumpsP1andP2
provide the necessarypressuretosendthe ingredientsthroughthe lines.The procedureisas follows.
The start pushbuttonispressedtostartthe processand pump1 (P1)
After100 gallonsof ingredientA ispumpedintothe tank,P1 turns off andstopsautomaticallyandthe
heaterisautomaticallyturnedon.
The heateris automaticallyturnedoff after2 seconds,andP2 isenergized.
3. IngredientBispumpedintothe tank,byP2 until the liquidreachesthe highlevel sensor.
The mixermotorstarts automaticallyandrunsfor10 seconds.
Afterthe mixermotorstopsP3 dischargesstartsautomaticallyandrunsuntil the low level sensoris
actuated.
The processstops.
The processcan be stoppedatany time,bymeansof the stopbutton,withoutlossof the counter
accumulatedcountor the timeraccumulatedtime.
The idle lightisenergizedwheneverthe processisstopped.
The run lightisenergizedwheneverthe processisinoperation.
The full lightisenergizedwheneverthe tankisfull.
Classprojectreport:
Thiswas an experience toworkina groupto be able tosolve andfigure outthe finerdetailsof the
program andhow to solve the issuesthatwouldcome upwiththem.We discussedthe properwayto
resetthe timersandcounters.Withmy programI was lazy I will admit,andIdidn’twantto sit there and
turn on andoff a switchfor100 timestomake the program run. I loweredeachrequirementtomake
the automationgoquickerformonitoringpurposeswhenthe programwasrunning.We alsousedsome
internal bitsandlatchingandunlatchingoutputs.These wereveryuseful touse,butrequiredsome
modificationsandreworkstogetjustright.These bitstookus a while togetworkingproperlyandwere
one of the majorconcernswe had while workingonthe project.Anothermajorissue we hadwaswhen
to resetall the clocksand counters.Eventuallywe decidedtoresetall the countersandtimerswhenthe
lowlevel limitswitchismade thatiswhenthe projectisdone andwaitingfora user to start the program
again.One of the final partswe had that tooka while forusto decide onwhat the pilotlights.We
startedwithsome verysimple ladderlogicforthese lights,andmostof the groupthat that itwas ok.We
didn’tthinkaboutthe erroraspect of it until later.There were timesinourprogramthat wouldhave the
idle lightandthe runninglightonat the same time,andthe full lightandidle light.These combinations
shouldneverbe ontogetheratthe same time.We couldhave usedinternal lockingbitsthat wouldturn
on and off eachpart of the automationprocess,butwe decidedthatsince the processranone time and
didn’tstopuntil the tankwas filledupanddrainedwe didn’tthinkitwasnecessarytostopeachpart if
the idle wasstill onor if the tank was full anditwas inidle mode.
In the endI believewe were able toovercome ourdifferencesandmake sure the applicationworkedas
intended.We hada lotof discussionsabouthow togo about solvingeachportionof the problem. We
were able tobuilda teamand workwell withone another. Thiswasa greatexercise inteambuilding,
and I reallyenjoyedthe environmentthatthe groupmade bybeingopenandcommunicatingasbestwe
could.It wasa groupexperience thatmade usall betterengineers.
4. Procedures:
Withthe projectItook manydifferentscreenshotsandIgotcomplete ladderlogicprogram.Iwill post
all picturesagainafterthe conclusiontomake sure I didn’tforgettopost anypictures,butas another
reference aswell. The code isas follows.
Thisprogram may seembasicbutit doescovera wide range of techniquesandcodingthatallows the
applicationtobe completed. There are manydifferentapproachesthataprogrammercan take to make
thisapplicationwork. Ibelieve alotof it hasto do withthe way the personthinksandhow theyhandle
the differenttasksandthe throughprocess.Atfirstlookingateverythingthatthe programrequiredus
to do I wasa bitoverwhelmedbythe amountof countersandtimersandhow to make each inputwork
properly. Inthe endI decidedtocode one rung at a time.My code is as followsandIbelievethatit
worksas the questionandlabintended.
Withthisprogram we had manydifferentpathsthatwe were takinginorderto complete the task.At
firstI was thinkingaboutusingajumpcommandand notevenusingthe latchesatfirst.It wouldhave
beena differentprogramandstill wouldhave worked.One thingIlike aboutprogramingPLC’sand in
general computerprograming.Itisveryinterestingto see how youcan make one automatedprogram
and have itcodedand workedmultipledifferentways.
Our groupdidhave issueswithhowthe pilotlightsshouldwork.Itwasn’tabigissue Iguessbut one
where communicationbecamesomewhatdifficult.Ittook a lotto overcome thisdisagreement,andI
honestdon’tbelieve thatitwascompletelytakencare of.Withgroupprojectsthisisgoingto happen,
and ittakesa groupof individualswillingtoworkwithone anotherto be able to keepthe linesof
communicationopenduringadisagreement.Ibelieve thatthiswasa verybiglearningexperience for
me in termsof communicationandworkingwithagroup thatdoesn’tthinkthe same way.I have
honestlyneverbeeninthistype of situation.Itwasagood educational avenuetobe able to
communicate andworkwiththe onesthat weren’tcommunicatingandputtinginall the effortthatthey
could.
5.
6. Thisis the start of the program.Our groupdecidedtouse latchesinorderto start and stop the program.
Thisbasic start control setupallowsustostart and stopthe systemandskill keepall the counter
numbers.We usedthe stopbuttonwiththe low level sensortoensure thatthe systemwentintoidle
mode once that lowlevel sensorismade.Thiswaythe system will shutdownproperlyincase if there is
an error or somethingdoesn’tgoright.The start will latchthe internal bitandkeepitonuntil the stop
buttonispushed,orthe lowlevel sensorismade.The internal relayalsoactivatesthe MCRor master
control relaywhichneedstoremainactive forthe program to automate.
7. Thisnextpart of the programwe have the mainpumpsource the 100 galloncounterandthe master
reset.We decidedtoputthe masterresetthatresetsall the countersand timerson the low level
sensor.Ourreasoningforthisisbecause once the low level sensorismade the automationisover,and
it nolongerneedstokeeptrackof the gallonspumpedandthe time it’smixed.Atthatpointthe process
isover andthe systemisinidle mode waitingtobe startedagain. Once the start buttonispushedit
latchesonthe internal bitwhichstartsthe firstpump.Thisrungthenlatchesontoitself tokeeprunning
until the flowsensorhascompleted100gallonsfilledintothe tank. Once the counterhascountedto
100 bythe fromthe flowof gallonsitopensupthe pump whichcausesitto turn off.Theywayonce it’s
done pumpingthe first100 gallonsintothe tankthe pumpwill actuallyshutoff.
Thisnextsectionof code isbrokenintoa few parts.Once the counterhas completeditstaskof pumping
the material intothe tankit immediatelybeginstoheatthe material thatwaspouredintothe firsttank.
It heatsthisfor 20 seconds.We usedthe TT commandof the counterthat way whenthe counteris
timingthe heaterisalsoon,but once the time isdone the heaterwill turnoff.Atthispointinthe
program once it isdone heatingthe firstmaterial asecondpumpturnson. Thisfillsthe tankwith
anotherfluidandfillsitupuntil the tankisfull whichisindicatedbythe highlevel sensorthatisbeing
used. Once the highlevel sensorismade itwill openupthe normallyclosedhighlevelsensorinseries
withthe pumpoutputwhichwill inturnunmake or DE energize the pump.Afterthistaskiscomplete it
starts to mix the twomaterialstogether.Itdoesthisfor10 seconds.Whenthe mixingisfinishedpump3
isturnedon and the drainingof the tank begins. Once the tankgetsto a certainlow pointthe lowlevel
sensorwill be energizedandturnoff the drainage pump. Thennextrungafterthatis the end
classificationof the MCR.
8. In our groupthiswas the sectionthatwe had the most difficultywithcomingtoadecisiononhowto
make it workor not. Above ishowthe restof the groupwantedit.Below ishow I thoughtitshouldbe
coded.Asyou can see fromthe picture above the programhas a chance to have boththe runand full
tank lightson.Thismightnotbe a bad thing,butif the full tanklightison and the systemisinidle we
have a prettybig issue.Thatmeansthatthe automationdidn’tcompletelyworkandthe tankdidn’t
completelyemptywhichissomethingthatneedstobe lookedat.Ijustchangedthe lightoutputsif I
reallywantto dothisit wouldhave takena much differentpath. Eachpumpwouldbe normallyclosed
withinthe otherpumpsrungsto make sure that twopumpsweren’trunningatthe same time.The
groupdidn’tthinkthatthis wasa big deal andthat there couldneverbe thiserroror take themas
concern.I justfeltlike since the programrequire the systemtodrainorfill ina certainorderthat if
somethingdidn’thappenthe outputsshouldn’tbe energizedforthatparticularpart of the program.
9.
10. Results:
We were able togeta workingprogramthat meteachand everyrequirementthatthe programasked
for.We had a lotof differentrevisionsandalotof discussionsonhow toreallymake thisprogramwork.
Below are all the screenshotsand picturesthatI took to show andexplainthe project. Iputthe main
picture of the program up alongwithall the otherpicturesthatI have taken.AlthoughthinkingaboutitI
guessyoureallyonlyneedthe mainpicture.
In weektwoisreallywhenourgroupdecidedtogowiththislayoutfor the program.It seemedtobe the
easiestandthe mostlegible forotherprogramstounderstand.We were able todecide onalot of
things,butnot all.Iwas able to make some keychangestothe startingcontrol systemthatwasn’t
workingquite properly.Thatwasmy maintask while workinginthe group.Everyone elsehadtheirown
little tasksthatneededtobe completedinorderforthe groupto getthisprogramingworkingproperly.
Everyone didpitchinandhelpputtheirownadvice and knowledgeof the taskat hand. We didhave a
goodgroup of knowledge studentsthatknew exactlywhattodoandhow to make the automated
processwork.We didagree ona lot.Some thingsdidn’tworkoutas well andItwas more of a
confrontationthata discussion.The pilotlightswere reallysomethingthatone studentdidn’tthinkwas
necessaryatall.I feltitbestat that time to become more passive withinthe groupanddomy ownwork.
11.
12.
13.
14. Conclusions:
Thiswas a verygood experience workinginagroupand tryingto bringtogethera projectthatmore
than one personisworkingonat a time.It opensupto allow some of usto trouble shootwhypart of
the systemisn’tworkingwhilethe othersworkonthe more finerdetails.Itwasanexperience Iwill
rememberandIlearnedvaluable lessonsand techniquesthatIwill bringtomy nextjob.Ienjoyed
learningandworkingina groupthat had manydifferentideasandtalents.Itwasinterestingand
somethingthatIwill take withme.Withthislablike the lastlabthat we didin unit5 the requirements
and assignmentsweren’tquite clear.Itleftalotof roomfor questionandgave the chance for error.
Withthese assignmentsitall dependsonthe personreadingthemandwhattheythinkthe system
shouldbe doingat the time.Itis noone’sfaultforthinkingdifferentlyorthe waytheydo.
Withthislab I didchange aroundthe counttimesforthe indicationof flow counttomake iteasieron
me to not have to openandclose the flow sensor100 timestosimulate the gallonsgoingintothe tank.
Withour group I believe we all generallycame upwiththe same code inthe beginningof the firstunit
and thenmodifieditintowhatitis today.
Thiswas my favorite labthatwe completedinthisclassbecause itwasthe one that I didn’twanttodo
the most.It wasn’tthe fact of doingthe labit wasthe fact of workingwitha groupand tryingto get
everythingtogetherandeveryone communicatingandagreeingonthe same stuff.Like Imentioned
before eachstudenthastheirownbackgroundandtheirowntraining.We are all greatengineersand
will continue togrowanddevelop.