Sie sind auf Seite 1von 91

Co

ourse:PLCPro
ogramm
mingCo
oncepts
Dr.AshrafElnaggar

[2008]

Copyyright Conisyss 2008

[P a g e |1]

[Dr. Ashraff Elnaggar]

BUILDING#2042ELMERAAGCAIRORINGROADELMAADI
HTTP://WWW.CONISYSSHAKER.COM/TEL:(202)29705962 FAX:(202)25204518

CONISYSS.A.E.
Control&InstrumentationsSystemTechnology
MemberofSHAKERConsultancyGroup

PlcTrainingCourse

Copyright Conisys 2008

[P a g e |2]

[Dr. Ashraf Elnaggar]

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]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |4]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |5]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |6]

[Dr. Ashraf Elnaggar]

Course:PLCProgrammingConcepts
ByDr.AshrafElnaggar

Copyright Conisys 2008

[P a g e |7]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |8]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |9]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |10]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |11]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |12]

[Dr. Ashraf Elnaggar]

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]

[Dr. Ashraf Elnaggar]

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]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |15]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |16]

[Dr. Ashraf Elnaggar]

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)

Copyright Conisys 2008

[P a g e |17]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |18]

[Dr. Ashraf Elnaggar]

No.

Name

Function

Powermodule

Copyright Conisys 2008

[P a g e |19]

[Dr. Ashraf Elnaggar]

Inputmodule

1. LEDcoverthisisthecoverfortheLEDthatdisplaystheinputstatus.
Whentheinputsignalturnson,theLEDfortherelevantnumberlightsup.
TheLEDonlylightswhenthemoduleisenergized.
2. Lockbuttonwhendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixedfirmlybyascrew
(M4,10mm(0.39in.)).
3. I/Ocoverthisisthecoverattachedtotheterminalblockarea
4. Terminalblockthisistheterminalblockforconnectinginputsignals.The
terminalblockisremovable.

Copyright Conisys 2008

[P a g e |20]

[Dr. Ashraf Elnaggar]

Outputmodule

1. LEDcoverthisisthecoverfortheLEDthatdisplaystheinputstatus.
Whentheinputsignalturnson,theLEDfortherelevantnumber
lightsup.theLEDonlylightswhenthemoduleisenergized.
2. Lockbuttonwhendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixedfirmlybyascrew
(M4,10mm(0.39in.)).
3. I/Ocoverthisisthecoverattachedtotheterminalblockarea
4. Terminalblockthisistheterminalblockforconnectinginputsignals.The
terminalblockisremovable.

Copyright Conisys 2008

[P a g e |21]

[Dr. Ashraf Elnaggar]

AnalogI/Omodule

1. Lockbuttonwhendismountingthemodulefromabaseunit,pressthis
buttonandliftupthemodule.Themodulecanbefixed
firmlybyascrew(M4,10mm(0.39in.)).
2. I/Ocoverthisisthecoverattachedtotheterminalblockarea.
3. Terminalblockthisistheterminalblockforconnectingoutputsignals.The
terminalblockcanbeconnectedordisconnected.

Copyright Conisys 2008

[P a g e |22]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |23]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |24]

[Dr. Ashraf Elnaggar]

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.

Copyyright Conisyss 2008

[P a g e |25]

[Dr. Ashraff Elnaggar]

Q:Whatarethebenefitsofinput/outputmodules?
A:Byusingseparatemodules,aPLCcanbecustomizedfordifferentapplications.If
asinglemodulefails,itcanbereplacedquickly,withouthavingtoreplacetheentire
controller.

Q:WhatwillhappenifaDCoutputisswitchedbyanACoutput?
A:ACinputconditioningcircuitswillrectifyanACinputtoaDCwaveform
witharipple.Thiswillbesmoothed,andreducedtoareasonablevoltagelevelto
driveanoptocoupler.

Copyright Conisys 2008

[P a g e |26]

[Dr. Ashraf Elnaggar]

Section3:ProgrammingSoftware
ActWinLadder(LD)programming:
OpenActWin
YouwillgetthefollowingWindow:
Openanexistingproject,thelatestproject(inthiscaseMaxi_306.apgoranew
project.
SelectCreatenewprojectwiththemouse.
ClickonOK

Ifadialogappearspromptingyoutoselecttargetsystem:
SelectHitachiHseriesfromthelistofselectabletargetsystems,ClickOK
IfitsstandDEMOafterthedriver,partofthedriverorthewholedriverisin
DEMOmode.

Copyright Conisys 2008

[P a g e |27]

[Dr. Ashraf Elnaggar]


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)

Copyright Conisys 2008

[P a g e |28]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |29]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |30]

[Dr. Ashraf Elnaggar]


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]

[Dr. Ashraf Elnaggar]

StarttocreateaLadderprogram:
SelectthecontactsymbolwiththemouseorpresstheF10button.

Createacontact:
Movethemouseapproximatelytotheplacewhereyouwantthecontact.

Clickandkeeptheleftbuttonofthemousedownuntilyouseethesymbolbelow
anddropthecontact.

Keyboardediting:MovethecursorwiththearrowbuttonsandpressEnteror
(Shift+Enter).
Thesymbol/addresshandlingisprobablythemostimportantpartinaPLC
programmingsoftware.Thereasonforthisisthatasignificantpartofthe
programmingtimeisspenthere.Mostprogrammingerrorsareconnectedtousage
ofwrongaddressesordoubleusageofaddresses.ActWingivesamaximumcomfort,
guidelineandcontrolintheaddressallocation.
Inordertogiveaneasywaytodefineorsearchforanaddressandthesymbolname
thefollowingwindowwillpopupautomatically:

Copyright Conisys 2008

[P a g e |32]

[Dr. Ashraf Elnaggar]

Typethenameofthesymbol:
Whenthesymbolnamedoesnotexistyouwillalwaysgetasuggestionofthefirst
freeaddress.Thismakesallocationofnewsymbolsveryfastandyouwillavoid
doubleuseofaddresses.

Whenyoutypethesymbol,

allmatchingsymbolswill

beshown.

Hereyoucanchangetoaninverted

contactoredgedetection.

Selectanexistingsymbol:
Insteadoftypingtheentiresymbolname,youcanclickinthelistandselectthe
symbolyouwant.

Createanewsymbol:
Anewsymboldoesnothaveanymatch.IfthesuggestedaddressisOKyoucanpress
Entertocreatethesymbol.

Selectanaddresstypeforthesymbol:
Ifyouwantaspecialaddress,thenclickontheMemoryaddressandselectthetype
youwant.YoucanalsotypetheaddresswiththenumberdirectlyintheMemory
addresswindow.

Copyright Conisys 2008

[P a g e |33]

[Dr. Ashraf Elnaggar]

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:

Copyright Conisys 2008

[P a g e |34]

[Dr. Ashraf Elnaggar]

Thenewsymbolswillappearinthesymbolwindow.Thiswindowwillalsoinform
abouttype,(startvalue)PLCaddressandthecorrespondingIEC1131address
(usedifIEC1131programmingisselected).

Laddereditingwithoutsymbols:
Inordertomakesomedifferentladdereditingwithoutthesymbolprocedurefor
eachcontact,wecanturnthesymboleditingoff.(Youcanalsofetchthiswindow,
theContactProperties,byrightclickingonacontact).

Makea newcontactinseries.Butinstead

ofgivingasymbolname,disable

AutomaticpopupandpressOK.

Copyright Conisys 2008

[P a g e |35]

[Dr. Ashraf Elnaggar]

Thecontactwillbedrawnwithoutsymbolandaddress

Tomakeaninvertedcontact,PresstheShiftkeybeforeyouholdtheleftbuttonon
themousedown.

(ThiscanalsobechangedintheContactPropertiesWindow).

Notethatthewidthoftheladderdiagramisflexible.(Therightpowerlinemoves
rightwards).

Tomakeaparallelconnection:
Placethemousearrowonthehorizontallinewheretheparallelconnectionsshall
start.PresstheleftbuttonanddragthemousedownContinuetodragthemouse
aroundthecontactsyouwanttoconnectinparallel.

Whenyoureachthehorizontallineagain,andthenreleasetheleftbutton.

Theconnectioniscompleted.

Copyright Conisys 2008

[P a g e |36]

[Dr. Ashraf Elnaggar]

Toinsertaparallelconnection:
Makethesameprocedureasaboveinsidetheotherconnection.

Whenyoudropthemousebutton,thenthecircuitwillberedrawninaproperway.

Toconnectacontactinseries:
Placethemousearrowonthelinewhereyouwantthecontact.Presstheleftbutton
anddropthecontact.

Toinsertacontactinseries:
Placethemousearrowonthelinebetweenthecontactswhereyouwantthe
contact.Presstheleftbuttonanddropthecontact.

Copyright Conisys 2008

[P a g e |37]

[Dr. Ashraf Elnaggar]

Todrawaverticalline:
Pressthelinedrawtoolonthetoolbar.

Placethemouseonthelinewhereyouwantyoutostart.Presstheleftmousebutton
anddragtothelinewhereyouwanttoend.Releasethebuttonandthelinewillbe
completed.

Toselectoneormorecontacts:
Presstheselectiontoolonthetoolbar.

Movethemousetothestartpoint(upperleftcornerofthegroupofcontacts).Hold
theleftmousebuttondownanddragtothebottomrightcorner.

Releasethebutton.Thecontactswillbeselected.

Copyright Conisys 2008

[P a g e |38]

[Dr. Ashraf Elnaggar]

ToDeletecontacts:
PressDeleteandtherungwillberedrawnwithoutthedeletedcontacts.

Undo:
Letusregretthedeletionofthecontacts.GotoEditmenuandpressUndo(or
press<Ctrl+Z>).Thepreviousrungwillnowappearagain.

Createacoil:
Selectthecoilsymbolwiththemouse.

Usethesameprocedureaswhenthecoilwascreated.

Copyright Conisys 2008

[P a g e |39]

[Dr. Ashraf Elnaggar]


Createaparallelcoil:
Usethesameprocedureaswhenyoumadeparallelconnectionsofcontacts.But
dropthemouseontherightverticalline.

Giveorchangeasymbolto(allocate)contactsandcoils:
Gotothecontactorcoilyouwanttoallocate.DoubleClick(orclickwiththeright
mousebuttonandselectProperties).

TheSymbolselectionandsearchwindowwillappear.Typethenewsymbolname.
(Youarenotlimitedtoanylengthofthesymbol.Justuseasignificant,butnottoo
longsymbolnamesoutofpracticalreason.Notethatblanksarenotallowed.)

Copyright Conisys 2008

[P a g e |40]

[Dr. Ashraf Elnaggar]

Ifyouhavenotdecidedtheaddressnumberfromthebeginning,pressNextfree
andthesoftwarewillsuggestthefirstfreeunusedoutputaddress.

PressOKandthecoilisallocated.Continuewiththesameprocedureorselect
alreadyexistingsymbolsfromthelist.

NotethatbeforetherungwascompleteditwasshownonalowerlevelWhenthe
rungiscompletedandapprovedbyActWinthemarkingdisappears.

Towritearungcomment:
Pressthebuttonforcomment.Clickabovetherung,whereyouwanttowritethe
comment.

Clickonthe<Comment...>symbol.Awindowwillopen,whereyoucanwritethe
comment.

Copyright Conisys 2008

[P a g e |41]

[Dr. Ashraf Elnaggar]

PressOKandthecommentwillbeinsertedintheladderdiagram.

Tostartasecondrung:
Selectthecontacttoolagain.Dropacontactbelowthefirstblock(orlaterbetween
anyblocks)andcontinueediting.

Youcanalternativelydraganddropthesymbolsfromthesymboltree.

Youcancreatenewsymbolsinacomfortablewaythroughdraganddropinthe
symbolwindow.

Nextfreeaddresswillbeusedandthesymbolwillgetanindexnumber.Inthiscase
Start1withnewaddressX111willbecreatedfromStartwithaddressX110.

Copyright Conisys 2008

[P a g e |42]

[Dr. Ashraf Elnaggar]

Thesystemlibrary:
Openthesystemlibrary,whereyouwillfindHitachiHseriesOpenthisandyou
willfindthreefolders.OnecontainsHspecificFunctions.TheothertwocontainIEC
specificfunctions.

DependingonthemodewehaveselectedunderToolsActWinSettings
Programmingthefoldersareopenorlocked.Inthiscasetheonlyopenfolderisthe
PLCspecific.

TomakeacompareboxortoinsertaForFB:
SelecttheFunctiontool.Thereisnowaveryquickwayofselectingthefunctions.

Youwillgetalistofavailablefunctions.Everyfunctionhasanalias,whichmeansa
shortlogicalname.Youcanscrolldownandselecttherightfunction.
Youcanfindtherightfunctionbytypingthebeginningofthealias.

Copyright Conisys 2008

[P a g e |43]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |44]

[Dr. Ashraf Elnaggar]


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]

[Dr. Ashraf Elnaggar]

GototheSymbolWindowthathasbeenautomaticallycreatedfortheFB.Double
clickontheL.LstandsforLocalandallsymbolswillbeLocalbydefault.

Copyright Conisys 2008

[P a g e |46]

[Dr. Ashraf Elnaggar]

Thepropertywindowforthesymbolappears.

Youcannowselectifyou
wanttochangetoanInput
orOutputsymbol

Repeatfortheother
symbols.Youcanalsouse

thesebuttonstogoquickly

betweenthesymbols.

InthiscaseweonlyneedoneInputandoneOutputsymbol.
TheotherscanstayLocal.GobacktotheMainprogramthroughclickingontheMain
folderatthetopoftheprojecttree.

ThenewFunctionBlockisnowpresentinthetree.Thismeansthatyoucanusethis
blockoneorseveraltimesintheprogram.

Copyright Conisys 2008

[P a g e |47]

[Dr. Ashraf Elnaggar]

DragtheFBfromthetreeanddropitintheprogramConnectaninputandan
outputtotheFB.

RepeatforthenumberoftimesyouwanttousetheFB.AlltheseFunctionBlocks
willworkasseparateinstances,whichmeanthattheywillworkindependentlyfrom
eachother.

UserdefinedFunction:

Thedifference,comparedtocreatinganewFB,ifyoucreateanewfunctionisthatit
hasautomaticallyoneEN(enable)inputandoneENO(EnableOutput)andbesides
thatonlyoneOutput.

Copyright Conisys 2008

[P a g e |48]

[Dr. Ashraf Elnaggar]

YoucanbuildupanynumberofFunctionsandFunctionblockstobeusedoneor
severaltimesinyourprogram.

ThenameoftheOutputisidentical

totheFunctionname.(Inthiscase

New function).

UserLibrary:
IntheUserLibraryyoucanstorePrograms,Functions,FunctionBlocks,Hardware
configurations,Monitortables,Datamemoryareas,printersettingsetc.thatyoucan
reuse.
TocopybetweenthetreeandtheUserLibraryusenormallyCopyPast.

Inothercases,e.g.forHardwareConfigurations,useDragandDrop.

Copyright Conisys 2008

[P a g e |49]

[Dr. Ashraf Elnaggar]

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]

[Dr. Ashraf Elnaggar]

Ifwewanttocompareananaloginputwithaconstant1234thenwehavetocreate
thesymbolAnalogInputDoubleclickonthe*inthesymbolwindow.

TheSearch/Enterwindowappears.Typethesymbolname,selecttype(WORD).

Typea4in
theAreasize
fieldandpress
OK.

SelectWXtypeandaskforNextfree.Thenextfreewordinputisword0onslot2.
Nowwecanuseapracticalfeaturetocreateanareaof4analoginputsinarow.
Analog_Input14.
Nowall4Analoginputaddressesarecreatedautomatically.

Copyright Conisys 2008

[P a g e |51]

[Dr. Ashraf Elnaggar]

Dragthesymbolwiththemousefromthesymbollist.closetotheconnectionlineof
thebox.

Towritetheconstant,Doubleclickorrightclickontheconnectionlineandselect
Properties.Aboxwillappearwhereyoucantypetheconstantvalue.Youcanalso
defineavariablebyusingthebinocular.

Connectthelogicoutputoftheboxwithcontactsandcoils.Theresultwillbe:

Tomakeanarithmeticbox:

Copyright Conisys 2008

[P a g e |52]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |53]

[Dr. Ashraf Elnaggar]

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]

[Dr. Ashraf Elnaggar]

Editbuttonwillallowyoutochangeanexistingline.

AddanotherinstructionandpresstheOKbuttonandtheboxiscompleted.

Toeditthecontentofanarithmeticbox:
Doubleclickonthebox(orRightclickandselectProperties).Theeditboxwill
openandallowyoutocontinueediting.

Insertrungcomments:
SelecttheCommenttool.Pressdowntheleftmousebuttonanddropthecomment.

Copyright Conisys 2008

[P a g e |55]

[Dr. Ashraf Elnaggar]

WritethecommentandpressOK.

andtheresultwillbe:

TomakeanHPLCspecificTimerdelay.
Createacoil.GivethenewsymbolanameandselectaddresstypeTDfromthe
addresslist.PressOKbutton.

Copyright Conisys 2008

[P a g e |56]

[Dr. Ashraf Elnaggar]

IntheTimerpropertieswindowenterTimerPresettimeandselectTimebase.

PressOKbutton.

Copyright Conisys 2008

[P a g e |57]

[Dr. Ashraf Elnaggar]

Createacontactinanewblock.Contactpropertieswindow.
CreateacoilwithforexampleaddressY100.

Copyright Conisys 2008

[P a g e |58]

[Dr. Ashraf Elnaggar]

IfInput_1istrue,Output1willbetrueafter10seconds.

TochangetheTimerpresetvalue.
RightclickontheTimercoilandSelectProperties.ClickontheTimer/counter
folder.ChangethepresetvalueortimebaseandpressbuttonOK.

TocreateanHPLCspecificCounterup
CreateacoilGivethenewsymbolanameandselectaddresstypeCUfromthe
addresslist.

Copyright Conisys 2008

[P a g e |59]

[Dr. Ashraf Elnaggar]

IntheCounterpropertieswindowenterCounterPresetvalue.

Createacontactinanewblock.Selectthe"Countersymbolinthecontact
propertieswindow.

Copyright Conisys 2008

[P a g e |60]

[Dr. Ashraf Elnaggar]

CreateacoilwithforexampleaddressY101.

ClearcurrentvalueinaCounter.
Createacontactinanewblock.Givethesymbolanameandanaddress.

Copyright Conisys 2008

[P a g e |61]

[Dr. Ashraf Elnaggar]

CreateacoilandselecttheCounter.CLsymbolinthecoilpropertieswindow.

EverytimeInput_1goeshigh,thecountercurrentvaluewillincreasewithone.
WhenClearcounterishightheCountercurrentvaluewillbesettozero.

TochangetheCounterpresetvalue:
RightclickontheCountercoilandSelectProperties".ClickontheTimer/counter
folder.
ChangethepresetvalueandpressbuttonOK.

Copyright Conisys 2008

[P a g e |62]

[Dr. Ashraf Elnaggar]

Toprintouttheproject:
Tomakeaproperprintout,starttomakefooterand/oraheader.(Tobeprintedout
oneverypage)Open"SettingsPrintSettingsFooterinthetree.

Exportthecontentofthesymbolwindow:

Testtheprintoutwithapreview:

Copyright Conisys 2008

[P a g e |63]

[Dr. Ashraf Elnaggar]

ApagelookinglikethefinalPaperprintoutwillbeshownonthescreen.

PaperPrintout:
Youcanclickonthesymbolthenyouwillgetthecompleteprintout.Youcan
alsoselect"PrintintheFilemenutogetamoredetailedprintoutCommand.

IfyouselectPrint
allYouwillgeta
selectionlist:

Copyright Conisys 2008

[P a g e |64]

[Dr. Ashraf Elnaggar]

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]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |66]

[Dr. Ashraf Elnaggar]

UnderDisplayyoucanselectahighercontrastdisplayoftheladderdiagraminstead
ofthemodernrelieftype.Thisispracticalonsomecomputerscreens.Youcanalso
editthefont'ssizesetc.inallscreens.IfyouselectHighcontrastthescreenwilllook
likethis:

ToCutandPast/Moverungsandcomments:
Leftclickwiththesymbol
ontherungortherungcommentinordertomark
oneormorerungsandcomments.(Tomarkmorerungskeepthe<Ctrl>button
down.)

Copyright Conisys 2008

[P a g e |67]

[Dr. Ashraf Elnaggar]

Nowyoucandragtherungorcommentwiththemousetoanotherplaceinthe
ladderdiagramanddropit.Startfromtheleftoftheleftpowerline.
Youcandeletetherungbypressing<Delete>oryoucanCut/Copy/Pastewiththe
commandsintheEditmenurungsandcommentsorthebuttons

Tosearchforaddresses:
TrytheFind<Ctrl+F3>andReplace<Shift+Ctrl+F3>tofind
andreplacesymbolsintheprogram.Anicewaytogetaquickoverviewofthe
existenceofaddressesintheprogramandtogototherelevantplaceistoRightclick
onasymbol.

Copyright Conisys 2008

[P a g e |68]

[Dr. Ashraf Elnaggar]

Alistwillappearinformingabouttherungnumbersande.g.ifitispresentasa
contactorcoil,ifitisopenorclosedetc.

Clickontherungnumberyouwanttogotoandyouwillmovetothatplaceinthe
program.

Letuschangetherackconfiguration.Wethereforehavetochangetheaddressesin
theprogram.

Wethereforehavetochangetheaddressesintheprogram.
Tomoveaddresses
ClickontheMovesymbolinthesymbolWindow.

AMoveaddresswindowwillpopup.Definefirstandlastaddressineverygroup
tobemovedandthefirstdestinationaddress.

Copyright Conisys 2008

[P a g e |69]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |70]

[Dr. Ashraf Elnaggar]

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

Copyright Conisys 2008

[P a g e |71]

[Dr. Ashraf Elnaggar]

"NewMonitorSymbol.

TheSymbolselectionandsearchwindowwillpopup.Selectthesymbolsinthebox
oneaftertheother.Youcannowseethesymbolsinthetreeandifmonitorison
thenyoucanseethestatus.

Youcanselectthesymbolsinthemonitortableintwoways:
ClickontheSbutton.TheSymbolselectionandsearchwindowwillpopup.orjust
dragthesymbolsfromtheSymbolwindow.

Youcanplacethemonitorwindowanywhereonthescreenanddecidethesize.You
candefineseveralMonitorWindowsfordifferentpurposesanddisplaythem
togetheronthescreen.
YoucancatchtheMonitortableandthecurrentvaluesifyoupresstheCopybutton.
Thiscane.g.becopiedintoExcel.

Copyright Conisys 2008

[P a g e |72]

[Dr. Ashraf Elnaggar]

OnLineChange:
ContinuetoedittheprogramasyoudidinOffLinemode.Nowtherungorrungs
thatarechangedandnotupdatedinthePLCaremarked.(Itlooksliketherungis
higher)TheUpdatebuttonwillbeactive.

WhenyoupressthebuttonthePLCprogramwillbeupdatedwithallchangesand
themarkingswilldisappear.TheUpdatebuttonwillbeinactiveagain

Datamemorytables:
TomakeaDataMemorytable:RightclickonDatamemoryinthetree.
Select"NewDataMemorytable.

Copyright Conisys 2008

[P a g e |73]

[Dr. Ashraf Elnaggar]

GiveasignificantnametothetableDefinethefirstandthelastaddressinthetable.

Thenewtablewillnowbepresentinthetree.Rightclickonthetabletodooneof
thefollowing:
Edittheuploadedmemorycontent
UploadfromthePLC
DownloadtothePLC
VerifythatthecontentinthetableandthePLCareequal.

Copyright Conisys 2008

[P a g e |74]

[Dr. Ashraf Elnaggar]

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.

Copyright Conisys 2008

[P a g e |75]

[Dr. Ashraf Elnaggar]

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

Copyyright Conisyss 2008

[P a g e |76]

[Dr. Ashraff Elnaggar]

APLCwithre
elays

Lad
dderProgrram

Lad
dder

Copyyright Conisyss 2008

[P a g e |77]

[Dr. Ashraff Elnaggar]

Lad
dderlogici
inputs

dderLogicOutputs
Lad

Pro
ogrammiingConceepts

Booleanlogicdesign.
Karnau
ughmaps.
Ladderrlogic.
SFD(SeequenceFlowDiagram
m).
Flowch
harts.
Casessstudy.

Copyyright Conisyss 2008

[P a g e |78]

[Dr. Ashraff Elnaggar]

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

Copyyright Conisyss 2008

[P a g e |79]

[Dr. Ashraff Elnaggar]

Transitionl
logic

ogramming
gExample
es
Pro

Copyyright Conisyss 2008

[P a g e |80]

[Dr. Ashraff Elnaggar]

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

Copyyright Conisyss 2008

[P a g e |81]

[Dr. Ashraff Elnaggar]

OuttputUsingSetRese
etTechnique

CasseStudy1
1:TankFiillingConttrolusing
gSet/Rese
et

Tan
nkFillingC
Control

Copyyright Conisyss 2008

[P a g e |82]

[Dr. Ashraff Elnaggar]

RisingEdge

FalllingEdge

Exa
ample:ASiingleTurn
nMotorAp
pplication

Copyyright Conisyss 2008

[P a g e |83]

[Dr. Ashraff Elnaggar]

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]

[Dr. Ashraff Elnaggar]

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

Copyyright Conisyss 2008

[P a g e |85]

[Dr. Ashraff Elnaggar]

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.

Copyyright Conisyss 2008

[P a g e |86]

[Dr. Ashraff Elnaggar]


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

Copyyright Conisyss 2008

[P a g e |87]

[Dr. Ashraff Elnaggar]

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..

Copyyright Conisyss 2008

[P a g e |88]

[Dr. Ashraff Elnaggar]

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

Copyyright Conisyss 2008

[P a g e |89]

[Dr. Ashraff Elnaggar]

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

Copyyright Conisyss 2008

[P a g e |90]

[Dr. Ashraff Elnaggar]

Up/Down

Counter

Up/DownCounterTimeChart:
CurrentValueRemainstheSameDisregarded

Copyright Conisys 2008

[P a g e |91]

[Dr. Ashraf Elnaggar]

Das könnte Ihnen auch gefallen