Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ourse:PLCPro
ogramm
mingCo
oncepts
Dr.AshrafElnaggar
[2008]
[P a g e |1]
BUILDING#2042ELMERAAGCAIRORINGROADELMAADI
HTTP://WWW.CONISYSSHAKER.COM/TEL:(202)29705962 FAX:(202)25204518
CONISYSS.A.E.
Control&InstrumentationsSystemTechnology
MemberofSHAKERConsultancyGroup
PlcTrainingCourse
[P a g e |2]
Contents
Contents..................................................................................................................................3
Section1:Introduction....................................................................................................................8
BinarySignal................................................................................................................................8
ANALOGSignal............................................................................................................................9
Numbersystems........................................................................................................................10
DecimalSystem.....................................................................................................................10
BinarySystem........................................................................................................................10
BCDCode(8421Code)....................................................................................................11
HexadecimalNumberSystem...............................................................................................11
Conversionrules........................................................................................................................12
Convertingdecimal binary....................................................................................................12
Convertingdecimal hexadecimal........................................................................................13
Convertingbinaryhexadecimal.............................................................................................13
Termsfromcomputerscience...................................................................................................14
Section2:PLCHardware..............................................................................................................16
PLCHardwarecomponents......................................................................................................16
PLCConfiguration..................................................................................................................16
PLCMemories........................................................................................................................16
PLCStatus..............................................................................................................................17
TheEH150ofHitachi(Moduletype)....................................................................................17
CPUModule...........................................................................................................................18
Powermodule.......................................................................................................................19
Inputmodule.........................................................................................................................20
Outputmodule......................................................................................................................21
AnalogI/Omodule................................................................................................................22
Copyright Conisys 2008
[P a g e |3]
Baseunit................................................................................................................................23
ExpansionCable.....................................................................................................................23
I/Ocontroller.........................................................................................................................24
Inputs/Outputs......................................................................................................................24
Example.................................................................................................................................25
SelectionofaPLC......................................................................................................................25
ReviewQuestions......................................................................................................................25
Section3:ProgrammingSoftware................................................................................................27
ActWinLadder(LD)programming:............................................................................................27
OpenActWin.........................................................................................................................27
Hardwareconfiguration:.......................................................................................................29
StarttocreateaLadderprogram:.........................................................................................32
Typethenameofthesymbol:...............................................................................................33
Selectanexistingsymbol:.....................................................................................................33
Selecttheaddressnumber:...................................................................................................34
Toinsertaparallelconnection:.............................................................................................37
ToDeletecontacts:................................................................................................................39
Thesystemlibrary:................................................................................................................43
UserdefinedFunction:..........................................................................................................48
UserLibrary:..........................................................................................................................49
IncludedUserLibraryfiles:....................................................................................................50
Toprintouttheproject:........................................................................................................63
Exportthecontentofthesymbolwindow:...........................................................................63
Communicationsettings:.......................................................................................................65
Tochangesettings:................................................................................................................66
[P a g e |4]
ToCutandPast/Moverungsandcomments:......................................................................67
Tosearchforaddresses:........................................................................................................68
OnLineProgramming:..........................................................................................................70
OnLineChange:....................................................................................................................73
Datamemorytables:.............................................................................................................73
ExportfromDataMemory:...................................................................................................75
ImporttoDataMemory:.......................................................................................................75
Section4:ProgrammingConcepts................................................................................................76
ControlBranches.......................................................................................................................76
ProgrammingConcepts.............................................................................................................78
Flowchartbaseddesign.........................................................................................................79
LadderLogicfromflowcharts....................................................................................................79
Sequencebits........................................................................................................................79
Transitionlogic......................................................................................................................80
Section5:ProgrammingRules&more.........................................................................................81
ProgrammingRules...................................................................................................................81
AGoldenProgrammingRule.................................................................................................81
TheOnDominantRule..........................................................................................................81
OutputUsingSetResetTechnique........................................................................................82
CaseStudy1:TankFillingControlusingSet/Reset...............................................................82
CaseStudy:ControlofConveyorBelt...................................................................................84
Description............................................................................................................................84
Operation..............................................................................................................................84
I/OAssignment......................................................................................................................85
FlowChart.............................................................................................................................85
[P a g e |5]
Section6:TimersandCounters.....................................................................................................86
TheOnDelayTime....................................................................................................................86
TheSingleShotTimer................................................................................................................88
MonoStableTimer....................................................................................................................88
IntegralTimer............................................................................................................................90
UpCounter................................................................................................................................90
Up/DownCounter.....................................................................................................................91
Course:PLCProgrammingConcepts
Course:PLCProgrammingConcepts
Course:PLCProgrammingConcepts
Course:PLCProgrammingConcepts
Course:PLCProgrammingConcepts
[P a g e |6]
Course:PLCProgrammingConcepts
ByDr.AshrafElnaggar
[P a g e |7]
Section1:Introduction
Thecontrollerhasthetaskofleadingsingleoperationsofamachineoramachine
plantthatdependonsensorsignalsafteragivenfunctionexecution.
Typesofsignalsincontrolsystemtechnology
Theelectricalsignals,whichareappliedattheinputsandoutputs,canbein
principle,dividedintotwodifferentgroups:
BinarySignal
Binarysignalscantakethevalueoftwopossiblestates.Theyareasfollows:
Signalstate1=voltageavailable=e.g.Switchon
Signalstate0=voltagenotavailable=e.g.Switchoff
Incontrolengineering,afrequentDCvoltageof24Visusedasacontrolsupply
voltageAvoltagelevelof+24Vataninputclampmeansthatthesignalstatusis1
forthisinput.Accordingly,0Vmeansthatthesignalstatusis0.Inadditiontoa
signalstatus,anotherlogicalassignmentofthesensorisimportant.Itisamatterof
whetherthetransmitterisanormallyclosedcontactoranormallyopencontact.
Whenitisoperated,anormallyclosedcontactsuppliesasignalstatusof0inthe
activecase.Onecallsthisswitchingbehavioractive0oractivelow.Anormally
opencontactisactive1/activehigh,andsuppliesa1signal,whenitis
operated.
Inclosedloopcontrol,sensorsignalsareactive1.Atypicalapplicationforan
active0transmitterisanemergencystopbutton.Anemergencystopbuttonis
alwayson(currentflowsthroughit)inthenonactuatedstate(emergencystop
buttonnotpressed).Itsuppliesasignalof1(i.e.wirebreaksafetydevice)tothe
attachedinput.Ifoperationofanemergencystopbuttonistoimplementacertain
reaction(e.g.allvalvesclose),thenitmustbetriggeredwithasignalstatusof0.
Equivalentbinarydigits
Abinarysignalcanonlytakethetwovalues(signalstatuses)0or1.Sucha
binarysignalisalsodesignatedasanequivalentbinarydigitandreceivesthe
designationofBitinthetechnicallanguagebook.Severalbinarysignalsresultina
digitalsignalafteracertainassignment(code).Whileabinarysignalonlyprovidesa
groupingofabivalentsize/e.g.fordooropen/doorclose),onecanforme.g.a
numberordigitasdigitalinformationbythebundlingofequivalentbinarydigits.
[P a g e |8]
Thesummarizationofnequivalentbinarydigitsallowstherepresentationof2n
differentcombinations.
Onecanshowfourdifferenttypesofinformationwithe.g.twoequivalentbinary
digits2x2:
00Configuration1(e.g.bothswitchesopen)
01Configuration2(Switch1closed/Switch2open)
10Configuration3(Switch1open/Switch2closed)
11Configuration4(bothswitchesclosed)
ANALOGSignal
Contrarytoabinarysignalthatcanacceptonlysignalstatuses(Voltageavailable
+24VandVoltageavailable0V,therearesimilarsignalsthatcantakemanyvalues
withinacertainrangewhendesired.Atypicalexampleofananalogencoderisa
potentiometer.Dependinguponthepositionoftherotarybutton,anyresistancecan
beadjustedhereuptoamaximumvalue.
Examplesofanalogmeasurementsincontrolsystemtechnology:
Temperature50...+150C
Currentflow0...200l/min
Numberofrevolutions500...1500R/min
Etc.
Thesemeasurements,withthehelpofatransducerinelectricalvoltages,are
convertedtocurrentsorresistances.E.g.ifanumberofrevolutionsiscollected,the
speedrangecanconvertoveratransducerfrom500...1500R/minintoavoltage
rangefrom0...+10V.Atameasurednumberofrevolutionsof865R/min,the
transducerwouldgiveoutavoltagelevelof+3.65V.
IfsimilarmeasurementsareprocessedwithaPLC,thentheinputmustbeconverted
intodigitalinformationtoavoltage,currentorresistancevalue.Onecallsthis
transformationanalogtodigitalconversion(A/Dconversion).Thismeans,thate.g.a
voltagelevelof3.65Visdepositedasinformationintoasetofequivalentbinary
digits.Theequivalentbinarydigitsforthedigitalrepresentationwillbeused,in
orderfortheresolutiontobefiner.
Ifonewouldhavee.g.only1bitavailableforthevoltagerange0...+10V,onlyone
statementcouldbemet,ifthemeasuredvoltageisintherange0..+5Vor
+5V....+10V.With2bits,therangecanbepartitionedinto4singleareas,(0...
2.5/2.5...5/5...7.5/7.5...10V).Usuallyincontrolengineering,theA/Dconverteris
changedwiththe8thor11thbit.256singleareasarenormallyprovided,butwith8
or11bits,youcanhave2048singleareas.
[P a g e |9]
Numbersystems
Fortheprocessingoftheaddressesofmemorycells,inputs,outputs,times,bit
memoriesetc.byaprogrammablecontroller,thebinarysystemisusedinsteadof
thedecimalsystem.
DecimalSystem
Inordertounderstandthebinarynumbersystem,itisfirstnecessarytoconsider
thedecimalsystem.Herethenumberof215istobesubdivided.Therebythe
hundredsrepresentthetwo,theonestandforthetensandthefivefortheones.
Actually,onewouldhavetowrite215insuchaway:200+10+5.Ifonewritesdown
theexpression200+10+5,withthehelpofthepowersoftenasexplainedearlier,
thenonestatesthateachplaceisassignedapoweroftenwithinthenumber.
Eachnumberwithinthedecimalsystemisassignedapoweroften.
BinarySystem
Thebinarynumbersystemusesonlythenumbers0and1,whichareeasily
representedandevaluatedindataprocessing.Thusitiscalledabinarynumber
system.
[P a g e |10]
Thevaluesofadualnumberareassignedthepoweroftwonumbers,as
representedbelow.
Eachnumberassignedwithinthebinarynumbersystemisapoweroftwo.
BCDCode(8421Code)
Inordertorepresentlargenumericalvaluesmoreclearly,theBCDcode(binary
codeddecimalnumber)isfrequentlyused.Thedecimalnumbersarerepresented
withthehelpofthebinarynumbersystem.Thedecimaldigitwiththehighestvalue
isthe9.Oneneedstodemonstratethe9withpoweroftwonumbersuntil23,thus
using4placesfortherepresentationofthenumber.
Becausetherepresentationofthelargestdecimaldigitrequires4binaryplaces,a
fourplaceunitcalledatetrad,isusedforeachdecimaldigit.TheBCDcodeisthus
a4BitCode.Eachdecimalnumberiscodedindividually.Thenumberof285
consistse.g.ofthreedecimaldigits.EachdecimaldigitappearsintheBCDcodeasa
fourplaceunit(tetrad).
2
8
5
0010
1000
0101
Eachdecimaldigitisrepresentedbyanindividuallycodedtetrad.
HexadecimalNumberSystem
Thehexadecimalnumbersystembelongstothenotationalsystemsbecausevalue
powersofthenumber16areused.Thehexadecimalnumbersystemisthusa
sixteencountsystem.Eachplacewithinahexadecimalnumberisassigneda
sixteenthpower.Oneneedsaltogether16numbers,includingthezero.Forthe
numbers0to9oneusesthedecimalsystem,andforthenumbers10to15the
lettersA,B,C,D,EandFareused.
Eachdigitwithinahexadecimalnumbersystemisassignedapowerofthenumber
16.
[P a g e |11]
Demonstrationofthenumbersystems
Decimal
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Binary
*10
=10
*10
=1
*2
=16
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
*2 *2
=8
=4
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
BCD
*2
=2
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
*2
=1
8
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
Hexadecimal
TensTetrad
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
OnesTetrad
8
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
4
0
0
0
0
1
1
1
1
0
0
0
0
0
0
1
1
1
1
0
0
2
0
0
1
1
0
0
1
1
0
0
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
*16 *16
=16
=1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
Conversionrules
Thetransformationsofthedifferentnumbersystemsarebasedonsimplerules.
TheserulesshouldbecontrolledbythePLCusers,sincetheyareoftenusedin
handlingthistechnology.Fortheuseofanumbersystemonwhichagivennumber
isbased,anindexsignisplacedattheendofanumber.HereDstandsfordecimal,
Bforbinary,andHforhexadecimal.Thismarkingisoftennecessarytoidentifya
numbersystembecauseineachsystem,differentvaluescanbeobtainedwhenthe
samenumberisused.(e.g..111inthedecimalsystemhasthevalue
111D(onehundredeleven).Inthebinarysystem,itwouldbe111B,whichisthe
decimalvalue7(1x20+1x21+1x22).Asahexadecimalnumber,111Hwouldbethe
decimalvalue273(1x160+1x161+1x162).
Convertingdecimal binary
Integraldecimalnumbersaredividedbythebase2untiltheresultofzerois
obtained.Theremainderobtainedwiththedivision(0or1)resultsinabinary
number.Oneneedstoalsoconsiderthedirectionthattheremaindersarewritten
in.Theremainderofthefirstdivisionisthefirstrightbit(loworderwidthunitbit).
e.g.Thedecimalnumber123istobechangedintoanappropriatedualnumber.
[P a g e |12]
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0
1
2
3
123/2=61
reminder 1
61/2 =30
reminder 1
30/2 =15
reminder 0
Allocateinthe
15/2 =7
reminder 1
clockwisedirection
7/2 =3
reminder 1
3/2 =1
reminder 1
1/2 =0
reminder
1
123
1
1
1
1
0
1
Pattern:
1111011
1x2+1x2+1x2+1x2+0x2+1x2+1x2
64+32+16+8+0+2+1=123
Convertingdecimal hexadecimal
Thistransformationisperformedexactlylikethedecimal binarytransformation.
Theonlydifferenceisthatinsteadofusingbase2,weusebase16.Thus,thenumber
mustbedividedby16ratherthanby2.e.g.Thedecimalnumber123istobe
changedintotheappropriatehexnumber.
Allocateinthe
123/16=7
reminder
7
clockwisedirection
11/16=0
reminder
11(B)
123
7
B
Pattern:
7
B
7x16+Bx16
112+11 =123
Convertingbinaryhexadecimal
ForthetransformationofadualnumberintoaHexnumber,onecouldfirst
determinethedecimalvalueofthebinarynumber(additionofthepriorities).This
decimalnumbercouldthenbechangedintoahexadecimalnumberwiththehelpof
thedivision:16.Inaddition,thereisthepossibilityofdeterminingtheassociatedhex
valuedirectlyfromthebinarynumber.First,thebinarynumberisdividedfromthe
rightbeginninginthequadripartitegroups.Everyoneofthedetermined
quadripartitegroupsresultsinanumberofthehexadecimalnumbersystem.
Ifnecessary,fillthemissingbitsonthelefthandsidewithzerose.g.thebinary
number1111011istobechangeddirectlyintoahexnumber.
111
1011B
0
1
1
1
1
0
1
1
0x2+1x2+1x2+1x2 1x2+0x2+1x2+1x2
H
Copyright Conisys 2008
[P a g e |13]
Termsfromcomputerscience
Inconnectionwithprogrammablecontrollers,termssuchasBIT,BYTEandWORD
arefrequentlyusedintheexplanationofdataand/ordataprocessing.
BIT
Bitistheabbreviationforbinarydigit.TheBITisthesmallestbinary(bivalent)
informationunit,whichcanacceptasignalstatusof1or0.
BYTE
Foraunitof8binarycharacters,thetermBYTEisused.Abytehasthesizeof8bits.
0
SignalState
WORD
Awordisasequenceofbinarycharacters,whichisregardedasaunitinaspecific
connection.Thewordlengthcorrespondstothenumberfrom16binarycharacters.
Withwords,thefollowingcanberepresented:
0
1Byte1Byte
SignalState
Awordalsohasthesizeof2bytesor16bits.
DOUBLEWORD
Adoublewordcorrespondstothewordlengthof32binarycharacters.
Adoublewordalsohasthesizeof2words,4bytes,or32bits.
Furtherunitsarekilobitorkilobyte,whichstandfor210,or1024bits,andthemega
bitormegabyte,whichstandsfor1024kilobits.
BitAddress
Sothatindividualbitscanbeaddressedwithinabyte,eachindividualbitisassigned
abitlocation.Ineachbytethebitgetsthebitlocation7ontheleftmostsideandthe
bitlocation0ontherightmostside.
7
0
6
1
5
0
4
1
3
1
2
0
1
0
0
1
Bitaddress
WordAddress
Thenumberingofwordsresultsinawordaddress.
Copyright Conisys 2008
[P a g e |14]
Note:Thewordaddressisalwaysthesmallestaddressofthetwopertinentbytes
whenusingwords,e.g.inputword(IW),outputword(QW),bitmemoryword(MW),
etc.(e.g.WithawordthatcomesfromIB2andIB3,theaddressisIW2).
IW0
IB0
IB1
IB2
IW2
IB3
Wordaddress
Note:DuringWordProcessing,itistobenotedthate.g.theinputword0andthe
inputword1areinabyteoverlap.Inaddition,whencountingbits,onebeginsatthe
rightmostbit.Forexamplethebit0from
IW1isthebitofI2.0,bit1isI2.1...bit7isI2.7,bit8isI1.0...bit15isI1.7.Ajump
existsbetweenthebits7and8.
DoubleWordAddress
Thenumberingofdoublewordsresultsinadoublewordaddress.
Note:Whenusingdoublewordse.g.ID,QD,MDetc.thedoublewordaddressisthe
smallerwordaddressofthetwopertinentwords.
Doublewordaddress
ID0
IW0
IW2
IB0
IB1
IB2
IB3
IW1
IW1
[P a g e |15]
Section2:PLCHardware
PLCHardwarecomponents
PLCConfiguration
PowerSupply(Builtinorexternalunit)
24VDC
120VAC
220VAC
CPU(CentralProcessingUnit)
Acomputerwhereladderlogicisstoredandprocessed.
I/O(Input/output)
Anumberofinput/outputterminalsareprovidedallowingthePLCto
monitortheprocessandinitiateactions.
IndicatorLights
IndicatethestatusofthePLC(Poweron,programrunning,faults).
ConfigurationofPLCreferstothepackagingofthePLC,andwecanclassifyitto:
Racktype(canhandlemultiplecards).
Moduletype(similartoracks,smallersize,modulesinsteadofcards).
Micro(compact,small).
Module
Rack
Compact
PLCMemories
RAM(RandomAccessMemory)
Thismemoryisfast,butitwillloseitscontentswhenpowerislost,thisis
knownasvolatilememory.EveryPLCusesthismemoryforthecentralCPUwhen
runningthePLC.
[P a g e |16]
Rom(ReadOnlyMemory)
Thismemoryispermanentandcannotbeerased.Itisoftenusedforstoring
theoperatingsystemforthePLC.
EPROM(ErasableProgrammableReadOnlyMemory)
ThisismemorythatcanbeprogrammedtobehavelikeROM,butitcanbe
erasedwithultravioletlightandreprogrammed.
EEPROM(ElectronicallyErasableProgrammableReadOnlyMemory)
ThismemorycanStoreprogramslikeROM.Itcanbeprogrammedand
erasedusingavoltage,soitisbecomingmorepopularthanEPROM's.
PLCStatus
OnthefrontofthePLC,therearenormallylimitedstatuslights.Commonlights
indicate;
Poweron:thiswillbeonwheneverthePLChasapower.
Programrunning:thiswilloftenindicateifaprogramisrunning,orifno
programisrunning.
Fault:thiswillindicatewhenthePLChasexperiencedamajorhardwareor
softwareproblem.
Theselightsarenormallyusedfordebugging.Limitedbuttonswillalsobeprovided
forthePLChardware.
TheEH150ofHitachi(Moduletype)
[P a g e |17]
Itcontains:
NO
DeviceName
1
PowerModule
2
3
4
5
6
7
Descriptionoffunction
Convertspowersupplytothepowertobeusedwithin
theEH150
CPUModule
Performsoperationsbasedonthecontentsoftheuser
program,receivesinputand
controloutputs
I/OModule
Digitalinputmodule,Digitaloutputmodule,analoginput
module,etc.
BasicBase
Baseinwhichthepowermodule,CPUmoduleI/O
moduleetc.areloaded
Expansionbase Baseinwhichthepowermodule,I/Ocontroller,I/O
module,etc.areloaded
Expansioncable CablethatconnectstheI/Ocontrollersforthebasicbase
andexpansionbase
I/OController InterfacewithexpansionbaseandCPUmodule
CPUModule
[P a g e |18]
No.
Name
Function
Powermodule
[P a g e |19]
Inputmodule
1. LEDcoverthisisthecoverfortheLEDthatdisplaystheinputstatus.
Whentheinputsignalturnson,theLEDfortherelevantnumberlightsup.
TheLEDonlylightswhenthemoduleisenergized.
2. Lockbuttonwhendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixedfirmlybyascrew
(M4,10mm(0.39in.)).
3. I/Ocoverthisisthecoverattachedtotheterminalblockarea
4. Terminalblockthisistheterminalblockforconnectinginputsignals.The
terminalblockisremovable.
[P a g e |20]
Outputmodule
1. LEDcoverthisisthecoverfortheLEDthatdisplaystheinputstatus.
Whentheinputsignalturnson,theLEDfortherelevantnumber
lightsup.theLEDonlylightswhenthemoduleisenergized.
2. Lockbuttonwhendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixedfirmlybyascrew
(M4,10mm(0.39in.)).
3. I/Ocoverthisisthecoverattachedtotheterminalblockarea
4. Terminalblockthisistheterminalblockforconnectinginputsignals.The
terminalblockisremovable.
[P a g e |21]
AnalogI/Omodule
1. Lockbuttonwhendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixed
firmlybyascrew(M4,10mm(0.39in.)).
2. I/Ocoverthisisthecoverattachedtotheterminalblockarea.
3. Terminalblockthisistheterminalblockforconnectingoutputsignals.The
terminalblockcanbeconnectedordisconnected.
[P a g e |22]
Baseunit
1. Connectorforpowermodule.Thisistheconnectorforloadingthepower
module.
2. ConnectorforCPUmodule.ThisistheconnectorforloadingtheCPUmodule.
Whentheunitisusedasanexpansionbase,thisbecomestheconnectorfor
loadingtheI/Ocontroller.
3. ConnectorforI/Omodule.ThisistheconnectorforloadingtheI/Omodule.
Type Number of I/O modules to bemounted
a. EHBS3(A) 3
b. EHBS5(A)5
c. EHBS8(A)8
d. EHBS11(A)11
4. Expansioncableconnector.Connectorfortheexpansioncable.EHCPU104
(A)isnotsupportexpansionunit.
5. Mountingholes(4points).Theseareusedwhenthebaseunitisattachedtoa
panel,etc.UseM4 20mm(0.79in.)screws.
6. MountinghookforDINrail.ThisisusedwhenattachingtheunittoaDINrail.
7. Coverforexpansioncableconnector.Thiscoverisusedforprotectingthe
expansioncableconnectorwhenitisnotused.
ExpansionCable
[P a g e |23]
1. Connectorforthebaseunit*Connecttotheconnectorofthebasicbaseunit.
2. ConnectorfortheI/Ocontroller
Note:TheconnectorsarerepresentedasthebaseunitsideandI/Ocontroller
sideforpresentationpurposes,buteitheronecanbeconnectedtoeitherside.
I/Ocontroller
1. Lockbutton.Whendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixedfirmlybyascrew
(M4,10mm)
2. Connectorforexpansioncable.Connectorforexpansioncable.
3. UnitnumberswitchRotaryswitchforunitnumber.Besuretoset1to4for
expansionbasesfromCPUside.
Note:Otherunitnumberthan1to4maycausemaloutputbecauseofundefined
address.SinceCPUreadsalwaystheswitchinformation,besuretosetafter
poweroff.
Inputs/Outputs
Theinput/outputchannelsprovidesignalconditioningandisolationfunctionsso
thatsensorsandactuatorscanbedirectlyconnectedtothem.
Commoninputvoltagesare5Vand24V.
Commonoutputsare24Vand240V.
InsmallerPLCstheinputsarenormallybuiltinandarespecifiedwhenpurchasing
thePLC.ForlargerPLCstheinputsarepurchasedasmodulesorcards.With8or16
inputsofthesametypeoneachcardsormodule.
Aswithinputmodules,theoutputmodulesrarelysupplyanypowerbutinsteadact
asswitches.Externalpowersuppliesareconnectedtotheoutputcardandthecard
willswitchthepoweronoroffforeachoutput.Typicaloutputvoltagesarelisted
below:
120Vac,24Vdc,1248Vac,1248Vdc,5Vdc(TTL),and230Vac.
[P a g e |24]
Exa
ample
SellectionoffaPLC
WhatI/Occapacityisrequired,N
NoofI/Os,capabilityo
ofexpansio
onforfuturre
needs?
d,I.e.isolatiiononboarrdpowersupplyforI//Os,
WhattypesofI/Osarrerequired
signalcond
ditioning?
Whatsizeo
ofmemory
yisrequired?
Whatspeedandpow
werisrequirredoftheC
CPU?ThegreaterthenumberofI/Osto
behandled
dthefasterrtheCPUreequired.
RevviewQueestions
Q:CanaPLCinputswitccharelayccoiltocontrrolaMotorr?
outputcansswitchareelay.
A:NoaPLCo
utputcardsactsasaninterfaceb
betweentheePLCand
Q:Howdoinputandou
exteernaldevicces?
A:InputCard
dsareconn
nectedtoseensorstodeetermineth
hestateoftthesystem
m.
Outtputcardsaareconnecttedtoactuatorsthatccandriveth
heprocess.
ourcingand
dsinkingo
output?
Q:Whatisthedifferenccebetweenwiringaso
utputssupp
plycurrenttthatwillp
passthrougghanelectrricalloadto
o
A:SSourcingou
ground.Sinkin
nginputsalllowcurren
ntallowtoflowfromtheelectriccalloadtotthe
mmon.
com
Ceasiertointerrupt?
Q:IsACorDC
A:ACiseasieer,ithaszerrocrossingg.
happenifth
heratedvo
oltageonadeviceisexceeded?
Q:Whatcanh
A:Itwilllead
dtoprematturefailure.
[P a g e |25]
Q:Whatarethebenefitsofinput/outputmodules?
A:Byusingseparatemodules,aPLCcanbecustomizedfordifferentapplications.If
asinglemodulefails,itcanbereplacedquickly,withouthavingtoreplacetheentire
controller.
Q:WhatwillhappenifaDCoutputisswitchedbyanACoutput?
A:ACinputconditioningcircuitswillrectifyanACinputtoaDCwaveform
witharipple.Thiswillbesmoothed,andreducedtoareasonablevoltagelevelto
driveanoptocoupler.
[P a g e |26]
Section3:ProgrammingSoftware
ActWinLadder(LD)programming:
OpenActWin
YouwillgetthefollowingWindow:
Openanexistingproject,thelatestproject(inthiscaseMaxi_306.apgoranew
project.
SelectCreatenewprojectwiththemouse.
ClickonOK
Ifadialogappearspromptingyoutoselecttargetsystem:
SelectHitachiHseriesfromthelistofselectabletargetsystems,ClickOK
IfitsstandDEMOafterthedriver,partofthedriverorthewholedriverisin
DEMOmode.
[P a g e |27]
AnewwindowappearswhereyoucanselectwhatPLClanguageyouwanttouse:
LD(Ladder)
SFC(SequentialFlowChart)
FBD(FunctionalBlockdiagram)
IL(InstructionList)
InPLCspecificmodeonlyLDisavailable.
InMixedmodeLDandSFCareavailable.
AllareavailableinIEC11313mode.
SelectPLCSpecificModeandLD,pressOK
YouwillnowgetthefollowingscreenwiththreemainWindows:
1.ProgrammingWindow(Whereyouwritetheprogram,functionblocksetc.)
2.ProjectWindow(Completehardwareandsoftwareconfigurationoftheproject)
3.Symbolwindow(WhereallsymbolslikeInputs,Outputsetc.canbeedited)
[P a g e |28]
Theuppertoolbarwilllooklikethis:
Itisdividedintofollowinggroups:
1. Filehandlingandprintout.
2. Cut,paste,undoetc.
3. Zoomtools.
4. Ladderediting
5. Helpbuttons(Donotforgettousethehelpsystem)
6. OnLineandcommunication
Youcanalwaysgetbuttoninformationifyouplacethemouseonabutton,e.g.
Laddereditingbuttons:
12345678
1.
2.
3.
4.
5.
6.
7.
8.
Selection
Linedraw
Contactsymbol
Coilsymbol
Arithmeticinstruction(s)
Functionbox(e.g.Comparebox)
Comparebox
RungCommentorSectioncomment
Hardwareconfiguration:
OpentheHardwareconfigurationtoselectthehardwaretorunthePLCprogramby
clickinginthetreeonHWConfiguration
[P a g e |29]
Thiswillopensixnewitems.Theyallsymbolizetheracksintheconfiguration.The
firstistheonecontainingtheCPU.Theotheronesaretheexpansionracks.Startto
clickwiththerightmousebuttononthefirstrack.SelecttheAddModule
alternative.
Youwillnowgetalistofallracksavailable.Selectasuitablerackfromthelist,e.g.a
BSM4rack.TheitemwillchangenametoBSM4anda+willappeartoshowthat
wecanfillthisrackwithmodules.
Clickontherackitemandopenit.Inthiscase5newfolderswillappear.Theyare
representingthemodulesintherack.Clickwiththerightmousebuttononthefirst
module.SelecttheAddModulealternative.
Alistofallavailablemodulesforthatpositionwillshowup.Thelistforthefirst
modulewillcontainallavailablepowersupplies.Thelistforthesecondmodulewill
containallavailableCPUmodules.
[P a g e |30]
Thelistfortherestofthe
positionswillcontainall
Input/outputmodulesandall
Specialmodules.
Whentherackconfigurationisreadytheconfigurationisshownlikethis.
AllocateKnownsymbols(e.g.InputsandOutputs):RightclickontheCPUandselect
Symbols/Addresses.
YoucantypethesymbolnamesoneachaddresstypeintheCPU.(Somecharacters,
e.g.SpacearenotallowedduethecompatibilitytotheIECstandard,seehelp
system).
ToenterthesymbolsintheI/O
modules.Youcanimportsymbols
fromaCADsystemore.g.Wordor
ExcelwithCopy/Pastetothe
NameColumn.
Markthefirstcellandpress<Ctrl+
V>usethesebuttonstogofrom
onemoduletothenext.
Copyright Conisys 2008
[P a g e |31]
StarttocreateaLadderprogram:
SelectthecontactsymbolwiththemouseorpresstheF10button.
Createacontact:
Movethemouseapproximatelytotheplacewhereyouwantthecontact.
Clickandkeeptheleftbuttonofthemousedownuntilyouseethesymbolbelow
anddropthecontact.
Keyboardediting:MovethecursorwiththearrowbuttonsandpressEnteror
(Shift+Enter).
Thesymbol/addresshandlingisprobablythemostimportantpartinaPLC
programmingsoftware.Thereasonforthisisthatasignificantpartofthe
programmingtimeisspenthere.Mostprogrammingerrorsareconnectedtousage
ofwrongaddressesordoubleusageofaddresses.ActWingivesamaximumcomfort,
guidelineandcontrolintheaddressallocation.
Inordertogiveaneasywaytodefineorsearchforanaddressandthesymbolname
thefollowingwindowwillpopupautomatically:
[P a g e |32]
Typethenameofthesymbol:
Whenthesymbolnamedoesnotexistyouwillalwaysgetasuggestionofthefirst
freeaddress.Thismakesallocationofnewsymbolsveryfastandyouwillavoid
doubleuseofaddresses.
Whenyoutypethesymbol,
allmatchingsymbolswill
beshown.
Hereyoucanchangetoaninverted
contactoredgedetection.
Selectanexistingsymbol:
Insteadoftypingtheentiresymbolname,youcanclickinthelistandselectthe
symbolyouwant.
Createanewsymbol:
Anewsymboldoesnothaveanymatch.IfthesuggestedaddressisOKyoucanpress
Entertocreatethesymbol.
Selectanaddresstypeforthesymbol:
Ifyouwantaspecialaddress,thenclickontheMemoryaddressandselectthetype
youwant.YoucanalsotypetheaddresswiththenumberdirectlyintheMemory
addresswindow.
[P a g e |33]
Selecttheaddressnumber:
Thefirstavailableaddressofthetypeyousuggestedwillbesuggested.Acceptor
typethenumberyouwantandpressEnterforOK.YoucanalsopresstheNext
Freebuttontogetthenextavailableaddress.
Usingaddressesdirectly:
Eventhoughitisnotrecommendeditcaninsomecasesbecomfortabletousethe
addressdirectly.Justtypetheaddress.Thesymbolonthataddresswillbeusedorif
thereisnosymbolanewtemporarysymbol__Y200willbecreated.(Alladdresses
havetohaveasymbol).
ThebuttonCreateSymbolAreaallowsyoutodefineanynumberofsymbolsina
oneoperation.(seearithmeticboxdescriptionformoredetails.)
Makeaserialconnection:
Repeattheprocedurewiththecontactanddropthenewcontactclosetotheright
sideofthefirstone.
Asyoucansee,theeditingfieldoftherungismarked(shownasdeeper).This
meansthattherungisnotreadyandapprovedbyActWin.Whenitiscompletedthe
markingwilldisappear.
Givethenewcontactasymbolnameandanaddress:
[P a g e |34]
Thenewsymbolswillappearinthesymbolwindow.Thiswindowwillalsoinform
abouttype,(startvalue)PLCaddressandthecorrespondingIEC1131address
(usedifIEC1131programmingisselected).
Laddereditingwithoutsymbols:
Inordertomakesomedifferentladdereditingwithoutthesymbolprocedurefor
eachcontact,wecanturnthesymboleditingoff.(Youcanalsofetchthiswindow,
theContactProperties,byrightclickingonacontact).
Makea newcontactinseries.Butinstead
ofgivingasymbolname,disable
AutomaticpopupandpressOK.
[P a g e |35]
Thecontactwillbedrawnwithoutsymbolandaddress
Tomakeaninvertedcontact,PresstheShiftkeybeforeyouholdtheleftbuttonon
themousedown.
(ThiscanalsobechangedintheContactPropertiesWindow).
Notethatthewidthoftheladderdiagramisflexible.(Therightpowerlinemoves
rightwards).
Tomakeaparallelconnection:
Placethemousearrowonthehorizontallinewheretheparallelconnectionsshall
start.PresstheleftbuttonanddragthemousedownContinuetodragthemouse
aroundthecontactsyouwanttoconnectinparallel.
Whenyoureachthehorizontallineagain,andthenreleasetheleftbutton.
Theconnectioniscompleted.
[P a g e |36]
Toinsertaparallelconnection:
Makethesameprocedureasaboveinsidetheotherconnection.
Whenyoudropthemousebutton,thenthecircuitwillberedrawninaproperway.
Toconnectacontactinseries:
Placethemousearrowonthelinewhereyouwantthecontact.Presstheleftbutton
anddropthecontact.
Toinsertacontactinseries:
Placethemousearrowonthelinebetweenthecontactswhereyouwantthe
contact.Presstheleftbuttonanddropthecontact.
[P a g e |37]
Todrawaverticalline:
Pressthelinedrawtoolonthetoolbar.
Placethemouseonthelinewhereyouwantyoutostart.Presstheleftmousebutton
anddragtothelinewhereyouwanttoend.Releasethebuttonandthelinewillbe
completed.
Toselectoneormorecontacts:
Presstheselectiontoolonthetoolbar.
Movethemousetothestartpoint(upperleftcornerofthegroupofcontacts).Hold
theleftmousebuttondownanddragtothebottomrightcorner.
Releasethebutton.Thecontactswillbeselected.
[P a g e |38]
ToDeletecontacts:
PressDeleteandtherungwillberedrawnwithoutthedeletedcontacts.
Undo:
Letusregretthedeletionofthecontacts.GotoEditmenuandpressUndo(or
press<Ctrl+Z>).Thepreviousrungwillnowappearagain.
Createacoil:
Selectthecoilsymbolwiththemouse.
Usethesameprocedureaswhenthecoilwascreated.
[P a g e |39]
Createaparallelcoil:
Usethesameprocedureaswhenyoumadeparallelconnectionsofcontacts.But
dropthemouseontherightverticalline.
Giveorchangeasymbolto(allocate)contactsandcoils:
Gotothecontactorcoilyouwanttoallocate.DoubleClick(orclickwiththeright
mousebuttonandselectProperties).
TheSymbolselectionandsearchwindowwillappear.Typethenewsymbolname.
(Youarenotlimitedtoanylengthofthesymbol.Justuseasignificant,butnottoo
longsymbolnamesoutofpracticalreason.Notethatblanksarenotallowed.)
[P a g e |40]
Ifyouhavenotdecidedtheaddressnumberfromthebeginning,pressNextfree
andthesoftwarewillsuggestthefirstfreeunusedoutputaddress.
PressOKandthecoilisallocated.Continuewiththesameprocedureorselect
alreadyexistingsymbolsfromthelist.
NotethatbeforetherungwascompleteditwasshownonalowerlevelWhenthe
rungiscompletedandapprovedbyActWinthemarkingdisappears.
Towritearungcomment:
Pressthebuttonforcomment.Clickabovetherung,whereyouwanttowritethe
comment.
Clickonthe<Comment...>symbol.Awindowwillopen,whereyoucanwritethe
comment.
[P a g e |41]
PressOKandthecommentwillbeinsertedintheladderdiagram.
Tostartasecondrung:
Selectthecontacttoolagain.Dropacontactbelowthefirstblock(orlaterbetween
anyblocks)andcontinueediting.
Youcanalternativelydraganddropthesymbolsfromthesymboltree.
Youcancreatenewsymbolsinacomfortablewaythroughdraganddropinthe
symbolwindow.
Nextfreeaddresswillbeusedandthesymbolwillgetanindexnumber.Inthiscase
Start1withnewaddressX111willbecreatedfromStartwithaddressX110.
[P a g e |42]
Thesystemlibrary:
Openthesystemlibrary,whereyouwillfindHitachiHseriesOpenthisandyou
willfindthreefolders.OnecontainsHspecificFunctions.TheothertwocontainIEC
specificfunctions.
DependingonthemodewehaveselectedunderToolsActWinSettings
Programmingthefoldersareopenorlocked.Inthiscasetheonlyopenfolderisthe
PLCspecific.
TomakeacompareboxortoinsertaForFB:
SelecttheFunctiontool.Thereisnowaveryquickwayofselectingthefunctions.
Youwillgetalistofavailablefunctions.Everyfunctionhasanalias,whichmeansa
shortlogicalname.Youcanscrolldownandselecttherightfunction.
Youcanfindtherightfunctionbytypingthebeginningofthealias.
[P a g e |43]
Orthebeginningofthefunctionname.Thereisanalsoamoredetaileddescription
ofthefunctions.
Clickandkeeptheleftmousebuttondownonthefunctionanddragit
approximatelytotheplacewhereyouwanttoconnectit.
Youcanalsoinsertafunctionintheladderdiagram(theupperlineisthelogic
conditionforthecomparison)Dropthebuttonandthefunctionisconnected.The
twolowerlinesarethevalues.Toallocatethevaluelines,doubleclickontheline
anddefineavalueoraconstant.
TocreateaUserdefinedFunction(F)orFunctionBlock(FB):
Apartofaprogramthatwillberepeatedinthesameprogramorinotherprograms
canbeincludedinaFunctionoraFunctionBlock.
ThedifferencebetweenFunctionsandFunctionBlocksisthataFunctiondoesnot
keepanymemoryanditisthereforealwayspossibletotelltheresultofaFunction
calculationjustbylookingatit.E.g.anADD_INTisafunction.
AFunctionBlockcankeepastatusfromexecutiontoexecution.E.g.aCTUoraTON
areFunctionBlocks.
[P a g e |44]
ItispossibletocreateuserdefinedFunctionsandFBs.
CreateaFunctionBlock:
RightclickontheProjectFolderandselectNewFunctionBlock...(alsopossiblefrom
theInsertmenu.)
GiveanametotheFB.
ThenewFunctionBlockappearsinthetree.
DoubleclickonthenewFBandanewwindowwillappearwhereyoucanstartto
definetheFB.
IntheapplicationweareproducingweuseacalculationforwaterFlowseveral
times.Theinparametersaredifferentpulsecounters.BuildthecontentoftheFB
exactlylikeyoubuildaprogram.Youcanalsotakeapartfromanexistingprogram
simplybyCopyandPastefromtheprogramtotheFB.Therearenophysical
addressesintheFB.ButyouhavetodefineiftheyareInputaddresses,Output
addressesoriftheyareonlytoberepresentedLocallyintheFB.
Copyright Conisys 2008
[P a g e |45]
GototheSymbolWindowthathasbeenautomaticallycreatedfortheFB.Double
clickontheL.LstandsforLocalandallsymbolswillbeLocalbydefault.
[P a g e |46]
Thepropertywindowforthesymbolappears.
Youcannowselectifyou
wanttochangetoanInput
orOutputsymbol
Repeatfortheother
symbols.Youcanalsouse
thesebuttonstogoquickly
betweenthesymbols.
InthiscaseweonlyneedoneInputandoneOutputsymbol.
TheotherscanstayLocal.GobacktotheMainprogramthroughclickingontheMain
folderatthetopoftheprojecttree.
ThenewFunctionBlockisnowpresentinthetree.Thismeansthatyoucanusethis
blockoneorseveraltimesintheprogram.
[P a g e |47]
DragtheFBfromthetreeanddropitintheprogramConnectaninputandan
outputtotheFB.
RepeatforthenumberoftimesyouwanttousetheFB.AlltheseFunctionBlocks
willworkasseparateinstances,whichmeanthattheywillworkindependentlyfrom
eachother.
UserdefinedFunction:
Thedifference,comparedtocreatinganewFB,ifyoucreateanewfunctionisthatit
hasautomaticallyoneEN(enable)inputandoneENO(EnableOutput)andbesides
thatonlyoneOutput.
[P a g e |48]
YoucanbuildupanynumberofFunctionsandFunctionblockstobeusedoneor
severaltimesinyourprogram.
ThenameoftheOutputisidentical
totheFunctionname.(Inthiscase
New function).
UserLibrary:
IntheUserLibraryyoucanstorePrograms,Functions,FunctionBlocks,Hardware
configurations,Monitortables,Datamemoryareas,printersettingsetc.thatyoucan
reuse.
TocopybetweenthetreeandtheUserLibraryusenormallyCopyPast.
Inothercases,e.g.forHardwareConfigurations,useDragandDrop.
[P a g e |49]
IncludedUserLibraryfiles:
InActWinsomeUserlibraryfilesareincluded.IntheENGlibrarysomeexample
projectsareincluded.ForexamplethePulsetrainforMicroEHseries.
Tousethisexampleprojectdofollowing:
RightclickontheProgrammainunderPulsetrain.
MarktheprogramwindowandselectmenuEdit/Paste.
DraganddropthePulsetrainmonitortabletoMonitor.
TheActWinwindowwilllookasfollows:
Definesymbolarea:
Thisisausefulfunction,whichisavailableintheboxeswhereyoudefineyour
symbols.Ifyoue.g.wantanareaofdatamemoriesDATA1toDATA100fromWR100
orasinthiscase4analoginputsinarow.
Copyright Conisys 2008
[P a g e |50]
Ifwewanttocompareananaloginputwithaconstant1234thenwehavetocreate
thesymbolAnalogInputDoubleclickonthe*inthesymbolwindow.
TheSearch/Enterwindowappears.Typethesymbolname,selecttype(WORD).
Typea4in
theAreasize
fieldandpress
OK.
SelectWXtypeandaskforNextfree.Thenextfreewordinputisword0onslot2.
Nowwecanuseapracticalfeaturetocreateanareaof4analoginputsinarow.
Analog_Input14.
Nowall4Analoginputaddressesarecreatedautomatically.
[P a g e |51]
Dragthesymbolwiththemousefromthesymbollist.closetotheconnectionlineof
thebox.
Towritetheconstant,Doubleclickorrightclickontheconnectionlineandselect
Properties.Aboxwillappearwhereyoucantypetheconstantvalue.Youcanalso
defineavariablebyusingthebinocular.
Connectthelogicoutputoftheboxwithcontactsandcoils.Theresultwillbe:
Tomakeanarithmeticbox:
[P a g e |52]
Startanewrung.Selectthearithmeticboxtool.Thereisnowaveryquickwayof
selectingtheinstructions.Youwillgetalistofavailableinstructions.Every
instructionhasanalias,whichmeansashortlogicalname.Theyaresortedina
priorityorder,whichmeansthatthemostcommoninstructiond=sisonthetop.
(ford=s,justpressEnter).
YoucanscrolldownandselecttherightfunctionwithEnterorclickwiththemouse.
Selecte.g.d=s1+s2(binaryplus)bytypingthealias+PressEnter.
Presstheleftkeyanddroptheboxclosetothecontact.
[P a g e |53]
Youcanalternativelydragtheinstructionfromthetreeclosetowhereyouwantto
connectthebox.
Whenyoudroptheboxitwillconnectandfollowingwindowwillpopup.Hereyou
candefinethesymbolsthatareusedintheinstruction.Thesymboltypeselectable.
WORDisdefaulthere.Searchordefinethesymbollikeinthecontact/coildialog.
Press<Tab>toenterthesymbolandmovetothenextargument.
Whenthesymbolsandconstantsaredefined,pressOK.
Awindowwillpopupwherealleditingcanbedone.
Deletebuttonwilldeletealine.
AddButtonwillinsertanewline.Youwillgetalistofallfunctions.
Movebuttonswillmovealineupordown.
Copyright Conisys 2008
[P a g e |54]
Editbuttonwillallowyoutochangeanexistingline.
AddanotherinstructionandpresstheOKbuttonandtheboxiscompleted.
Toeditthecontentofanarithmeticbox:
Doubleclickonthebox(orRightclickandselectProperties).Theeditboxwill
openandallowyoutocontinueediting.
Insertrungcomments:
SelecttheCommenttool.Pressdowntheleftmousebuttonanddropthecomment.
[P a g e |55]
WritethecommentandpressOK.
andtheresultwillbe:
TomakeanHPLCspecificTimerdelay.
Createacoil.GivethenewsymbolanameandselectaddresstypeTDfromthe
addresslist.PressOKbutton.
[P a g e |56]
IntheTimerpropertieswindowenterTimerPresettimeandselectTimebase.
PressOKbutton.
[P a g e |57]
Createacontactinanewblock.Contactpropertieswindow.
CreateacoilwithforexampleaddressY100.
[P a g e |58]
IfInput_1istrue,Output1willbetrueafter10seconds.
TochangetheTimerpresetvalue.
RightclickontheTimercoilandSelectProperties.ClickontheTimer/counter
folder.ChangethepresetvalueortimebaseandpressbuttonOK.
TocreateanHPLCspecificCounterup
CreateacoilGivethenewsymbolanameandselectaddresstypeCUfromthe
addresslist.
[P a g e |59]
IntheCounterpropertieswindowenterCounterPresetvalue.
Createacontactinanewblock.Selectthe"Countersymbolinthecontact
propertieswindow.
[P a g e |60]
CreateacoilwithforexampleaddressY101.
ClearcurrentvalueinaCounter.
Createacontactinanewblock.Givethesymbolanameandanaddress.
[P a g e |61]
CreateacoilandselecttheCounter.CLsymbolinthecoilpropertieswindow.
EverytimeInput_1goeshigh,thecountercurrentvaluewillincreasewithone.
WhenClearcounterishightheCountercurrentvaluewillbesettozero.
TochangetheCounterpresetvalue:
RightclickontheCountercoilandSelectProperties".ClickontheTimer/counter
folder.
ChangethepresetvalueandpressbuttonOK.
[P a g e |62]
Toprintouttheproject:
Tomakeaproperprintout,starttomakefooterand/oraheader.(Tobeprintedout
oneverypage)Open"SettingsPrintSettingsFooterinthetree.
Exportthecontentofthesymbolwindow:
Testtheprintoutwithapreview:
[P a g e |63]
ApagelookinglikethefinalPaperprintoutwillbeshownonthescreen.
PaperPrintout:
Youcanclickonthesymbolthenyouwillgetthecompleteprintout.Youcan
alsoselect"PrintintheFilemenutogetamoredetailedprintoutCommand.
IfyouselectPrint
allYouwillgeta
selectionlist:
[P a g e |64]
SelectwhatprintoutyouwantandpressPrint.Youcanselecttoprintoutapartofa
program.MarkitandthenselecttheprograminPrintall.
Communicationsettings:
GotomenuToolsDriversettings"ForRS232communicationyoucanselect
Comm.portandbaudrate.ForTCP/IPprogrammingyoucanenterIPAddressand
portnumber.
FormoreinformationseemanualFortheEthernetcard(ForexampleEHETH)
Networkaddress.
FrommenuTools/DriversettingsSelecttheNetworkaddressfolder.
Copyright Conisys 2008
[P a g e |65]
LUMPaddress:
Withthisyoucanprogram/monitordifferentCPUsinaLINKsystem.Ifyounot
usingLINKconnection,thevalueshouldbe:FF,FF,00,00.Link:Linkmodule
number.
Unit:Substationnumber.
Stationnumbers:Formultidropuse.Enterstationnumberonunityoushould
access.
Tochangesettings:
GotoToolsActWinSettingsWehavestartedinthePLCspecificmode,which
onlyallowedustowriteprogramscompatibletotraditionalprogramming.Ifyou
wanttocontinueintheIEC11313programming,selectIEC11313orMixed
modeYoucanalsofindfoldersforLanguage,DisplayandSave.UnderSaveyou
canorderAutoSave,whichispractical.
[P a g e |66]
UnderDisplayyoucanselectahighercontrastdisplayoftheladderdiagraminstead
ofthemodernrelieftype.Thisispracticalonsomecomputerscreens.Youcanalso
editthefont'ssizesetc.inallscreens.IfyouselectHighcontrastthescreenwilllook
likethis:
ToCutandPast/Moverungsandcomments:
Leftclickwiththesymbol
ontherungortherungcommentinordertomark
oneormorerungsandcomments.(Tomarkmorerungskeepthe<Ctrl>button
down.)
[P a g e |67]
Nowyoucandragtherungorcommentwiththemousetoanotherplaceinthe
ladderdiagramanddropit.Startfromtheleftoftheleftpowerline.
Youcandeletetherungbypressing<Delete>oryoucanCut/Copy/Pastewiththe
commandsintheEditmenurungsandcommentsorthebuttons
Tosearchforaddresses:
TrytheFind<Ctrl+F3>andReplace<Shift+Ctrl+F3>tofind
andreplacesymbolsintheprogram.Anicewaytogetaquickoverviewofthe
existenceofaddressesintheprogramandtogototherelevantplaceistoRightclick
onasymbol.
[P a g e |68]
Alistwillappearinformingabouttherungnumbersande.g.ifitispresentasa
contactorcoil,ifitisopenorclosedetc.
Clickontherungnumberyouwanttogotoandyouwillmovetothatplaceinthe
program.
Letuschangetherackconfiguration.Wethereforehavetochangetheaddressesin
theprogram.
Wethereforehavetochangetheaddressesintheprogram.
Tomoveaddresses
ClickontheMovesymbolinthesymbolWindow.
AMoveaddresswindowwillpopup.Definefirstandlastaddressineverygroup
tobemovedandthefirstdestinationaddress.
[P a g e |69]
PresstheMovebuttonandsymbolswillchange.Continueuntilalladdressare
moved.
AllI/Oaddressesinthelistandintheladderprogramwillchange.
OnLineProgramming:
Communication/Transfer:
Followingbuttonsareavailable:
1234567
1.RUN(StartthePLC)
2.Stop
3.Monitor.
4.TransfertheprogramtothePLC
5.UploadtheprogramfromthePLC
6.GoOnLine(FirstComparesPLCPC)
7.Updateprogram.
[P a g e |70]
YoucanalsousetheCommunicationmenucommands
TransfertheprojecttothePLC:
PresstheOnLinebuttonwhenOnLineisOKthebuttonwillchangeto
ClickontheMonitorbutton.Nowyoucanseethemonitorstatusintheladder
diagram
MonitorWindows:
Manytimesyouneedtoseemonitorinformationfromdifferentpartsofthe
program,whichcannotbeshownjustbyarungsonthescreen.Thenyoucancreate
oneormoreI/OMonitortables:
RightclickontheMonitorfolderunderSettingsinthetree.
Clickon"NewmonitorI/Otable.Awindowwillpopupwhereyoucangivethe
Monitorboxauniquename.
Writee.g.MONITOR1.AsymbolinthetreeunderMonitorwillshowthenew
Monitorbox.Wehavetodefinethecontent.Rightclickonthesymbolandselect
[P a g e |71]
"NewMonitorSymbol.
TheSymbolselectionandsearchwindowwillpopup.Selectthesymbolsinthebox
oneaftertheother.Youcannowseethesymbolsinthetreeandifmonitorison
thenyoucanseethestatus.
Youcanselectthesymbolsinthemonitortableintwoways:
ClickontheSbutton.TheSymbolselectionandsearchwindowwillpopup.orjust
dragthesymbolsfromtheSymbolwindow.
Youcanplacethemonitorwindowanywhereonthescreenanddecidethesize.You
candefineseveralMonitorWindowsfordifferentpurposesanddisplaythem
togetheronthescreen.
YoucancatchtheMonitortableandthecurrentvaluesifyoupresstheCopybutton.
Thiscane.g.becopiedintoExcel.
[P a g e |72]
OnLineChange:
ContinuetoedittheprogramasyoudidinOffLinemode.Nowtherungorrungs
thatarechangedandnotupdatedinthePLCaremarked.(Itlooksliketherungis
higher)TheUpdatebuttonwillbeactive.
WhenyoupressthebuttonthePLCprogramwillbeupdatedwithallchangesand
themarkingswilldisappear.TheUpdatebuttonwillbeinactiveagain
Datamemorytables:
TomakeaDataMemorytable:RightclickonDatamemoryinthetree.
Select"NewDataMemorytable.
[P a g e |73]
GiveasignificantnametothetableDefinethefirstandthelastaddressinthetable.
Thenewtablewillnowbepresentinthetree.Rightclickonthetabletodooneof
thefollowing:
Edittheuploadedmemorycontent
UploadfromthePLC
DownloadtothePLC
VerifythatthecontentinthetableandthePLCareequal.
[P a g e |74]
SelectFromPLCandEditdatamemory.Youcannowmodifythecontentand
downloadtothePLC.
ExportfromDataMemory:
MakeaDataMemorytablecoveringthememoryarea:
RightclickontheDatamemorytableandselectFROMPLC.SelectEDITDATA
MEMORYSelectDecimalDisplaymode.
PressCopyGrid
Exporttoe.g.Exceltotakecareofthedata
ImporttoDataMemory:
Copydatafrome.g.Excel.SelectEDITDATAMEMORY.SelectDecimalmodeMark
thefirstcelltogivedatainto.Press<Ctrl+V>Thisoperationcantakealongtimeif
thetablehasgotmanyvalues.Insuchcaseselectsmallertables.
[P a g e |75]
Section4:ProgrammingConcep
pts
Con
ntrolBra
anches
Con
ntrolschem
mes
Con
ntentious:tthevaluesttobecontro
olledchanggesmoothly(thespeeedofthecaar).
Loggical:thevaaluestobeecontrolled
dareeasily
ydescribed
dasonoff (themotorofthe
carisonorofff).
Lineear:canbeedescribedasasimpleedifferentiialequation
n.
Seq
quential:alogicalconttrollerthatwillkeepttrackoftim
meandprevviouseventts.
Asiimplerela
aycontroller
[P a g e |76]
APLCwithre
elays
Lad
dderProgrram
Lad
dder
[P a g e |77]
Lad
dderlogici
inputs
dderLogicOutputs
Lad
Pro
ogrammiingConceepts
Booleanlogicdesign.
Karnau
ughmaps.
Ladderrlogic.
SFD(SeequenceFlowDiagram
m).
Flowch
harts.
Casessstudy.
[P a g e |78]
Flo
owchartb
baseddesiign
De
escribingprrocessconttrolusingfflowchart.
Co
onversionoffflowchartsstoladderlogic.
Fllowcharts
symbols
nstructing
gaflowcha
art
Con
Understand
U
dtheprocesss.
Determinet
D
themajoraactions,thesearedraw
wnasblock
ks.
Determinet
D
thesequencceofoperaations,thesearedraw
wnwitharro
ows.
Whenthese
W
equencemaaychangeu
usedecisionblocksfo
orbranchin
ng.
Lad
dderLogiicfromfllowchartts
BlocksofLadderlogiccode.
NormalLadd
derlogic.
Seq
quencebits
[P a g e |79]
Transitionl
logic
ogramming
gExample
es
Pro
[P a g e |80]
Section5:ProgrammingRules&
&more
Pro
ogrammiingRuless
AG
GoldenPro
ogrammingRule
A=(A+A[1])).A[0]
Ou
utput
OR
And
Exit con
ndition
Latch
Entrance condition
c
App
plicationo
oftheRule
e
Th
heOnDom
minantRu
ule
App
plicationo
oftheRule
e
[P a g e |81]
OuttputUsingSetRese
etTechnique
CasseStudy1
1:TankFiillingConttrolusing
gSet/Rese
et
Tan
nkFillingC
Control
[P a g e |82]
RisingEdge
FalllingEdge
Exa
ample:ASiingleTurn
nMotorAp
pplication
[P a g e |83]
The
eProgram
m
otherSolu
ution
Ano
CaseStudy:Controlo
ofConvey
yorBelt
Desscription
Th
he system is made up
u of a motordriven
n belt, carrrying som
me pallets from a
pallletizetoaw
warehouse.Threesen
nsorarealssopresent,respectivelyStart,Staackand
Stop
p.
Ope
eration
Th
he present
t of a pallet at the beeginning off the belt is
i belt deteected by seensor 1
whiich enabless motor M, starting the
t convey
yor belt. Th
he beltflow
ws until thee pallet
Copyyright Conisyss 2008
[P a g e |84]
reacches senso
or 2 which stops mottor M. The belt startss flowing again
a
only when
w
a
new
wpallethassbeenload
dedanddettectedbyssensor1. Seensor3,loccatedattheeendof
the belt, stopss motor M each time it detected
d the preseence of a p
pallet, read
dy to be
oaded.
unlo
I/O
OAssignm
ment
Flo
owChart
[P a g e |85]
Section6:TimersandCou
unters
TheOn
nDelayTim
mer.
TheSin
ngleShotTimer.
MonoSStableTimeer.
IntegraalTimer.
UpCou
unters.
Up/Dow
wnCounteers
The
eOnDela
ayTime
Exa
ample:SaffeStarting
gOperation
n
W
WriteaPLC
Ccodetoen
nsurethat theoperattorwantsttostartam
motorbyp
pressing
two
oPBssimulltaneouslyforoneseccondinord
dertostartthemotor.
[P a g e |86]
Exa
ample:StarrtingSequ
uence
Itt is commo
on in Siloss applicatio
ons that co
onveying belts
b
startss in sequen
nce and
stop
psinthereeversesequ
uence.DesignaLaddeerprogramthatcanpeerformthisstask.
onStart>m3on>d
delay1>m
m2on>delay2>m1
1on
Upo
Upo
onStop>m
m1off>delay3>m
m2off>dellay4>m3
3off
DetergentFillingLin
ne
CasseStudy:D
Desscription:
Th
heinfeedco
onveyorcaarriesdeterrgentboxesstobefilledandthen
ncarriesitaawayto
bep
processed inanotherrstage.Ap
photocellisslocatedun
nderhoppeertostoptthebox
read
dy to be fiilled .A hop
pper contaain the dettergent is located at tthe middlee of the
con
nveyorwheereavalve controlsitsdrainAleevelswitch
hislocated
dathopperrbutton
to indicate
i
falll of level .An operatting panel contains a
a start and
d stop butttons for
man
nual operaation and alarm
a
lamp
p for warning. The paanel also co
ontains auttomatic
and
dmanualbu
uttonsform
modeselecction.
N.B.Abakeisusedtosto
optheconv
veyorfromcoasting.
perations:
Scenarioofop
Theconveyo
orstartsm
motionbyprressingstartpushbutttonlocated
datthepan
nel.
1.T
2.T
Theconvey
yorcarries theboxes ofdetergen
nt&contin
nuesmotio
onuntiloneeofthe
boxxesisdetecctedbythephotocell (locatedunderthehopper)theenitisstop
ppedby
thebrake.
3.T
Thevalveo
openstheh
hoppergateetodispen
nsethecalcculatedam
mountofdeetergent
(nearlyforfiveeseconds).
Afteerthegate ofhopper isclosed,ttheconvey
yorstartsm
movingagaiinandthe cycleis
repeated
[P a g e |87]
The
eSingleS
ShotTime
er
Mo
onoStablleTimer
Circcuitopera
ation:
O
OutputR1isonattheesametimetheleadingedgeoffinputx1((fromoffto
oon)is
deteected. The leading ed
dge of inpu
ut x1 is dissregarded while
w
MS12
2 is on. Wh
hen the
currrenttimevvalueismorethantheesettimev
value,MS12
2isoff.
How
wever, if in
nput x1 is off at the first
f
scan aand on at the
t second
d scan, then
n MS12
deteectstheleaadingedge..
[P a g e |88]
Desscription
Th
heplantconsistsofa fourstreettscrossing,,thefourstreetsareccontrolledbyfour
traffficlights,iinparalleltwobytwo
o.
Ope
eration
Th
he traffic iss regulated
d by trafficc A and B. The green signal on traffic ligh
hts A is
alw
waysassociaatedtored
dontrafficlightsB.A
Afterafixeedtimet,o
ontrafficllightsA
theyellowsignalmuststtartup,folllowedthen
nbythered
dandgreen
nsignalon
ntraffic
ligh
htsB.
Tra
afficLightC
Control
[P a g e |89]
InttegralTim
mer
CirccuitOpera
ation:
Th
hecurrenttimervalueofTMR13
3isupdateedwhileinp
putX0103 ison.Thecurrent
timer value iss held when input X0
0103 is off.. When inp
put X0103 is on, the current
updatedaggain.TMR13
3isonwheenthecurrrenttimevvalueismo
orethan
timevalueisu
thesettimevaalue,andofffwhenCL13ison.
StarrDeltasw
witch
UpCounter
UpCounterTiimeChart
[P a g e |90]
Up/Down
Counter
Up/DownCounterTimeChart:
CurrentValueRemainstheSameDisregarded
[P a g e |91]