Sunteți pe pagina 1din 12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Version5.0.Updated10/01

GeneralNotesaboutPROFIBUSandEM277(Tip56)
Category:Communications
SpecialHardwareRequirements:
OneSIMATICS7200CPU222,CPU224,CPU226,orCPU226XM
OneEM277PROFIBUSDPexpansionmodule
PrintthisTip
TheS7200CPUscanbeconnectedtoaPROFIBUSDPnetworkbyusinganEM277PROFIBUSDPexpansion
module.PROFIBUSstandsforProcessFieldBus.DPstandsfordistributedperipherals,thatis,remoteI/O.TheEM
277allowstheS7200CPUstobeDPslavedevicesonaDPnetwork.ADPmastercanwritedatatoandreaddata
fromtheS7200CPUovertheDPnetworkbyusingtheEM277PROFIBUSDPmodule.
MemoryModelDPMasterandDPSlave
ThepurposeofaPROFIBUSDPconnectionistheexchangeofdata.Amasterdevicewritesoutputdatatoaslave
device.Theslavedevicerespondstothewriterequestwithinputdatatobereturnedtothemaster.
ThemastertransfersdatafromanI/Ooutputareatotheslave'soutputbuffer(Receivemailbox).Themasterreadsdata
fromtheslave'sinputbuffer(Sendmailbox)andstoresitinanI/Oinputarea.Theoutputandinputbuffersarelocatedin
theCPU'svariablememory(Vmemory)area.Thefigurebelowshowsthememorymodelforatransferof16outputbytes
and16inputbytes.
PROFIBUSDPalwaysdescribesdatatransferswithrespecttothemaster.Datathatistransferredfromthemasterto
theslaveisalwaysreferredtoasoutputdata.Datathatistransferredfromtheslavetothemasterisalwaysreferredto
asinputdata.Intheslave,datavaluesthatcomefromthemasterarestillreferredtoasoutputs,eventhoughtheyare
inputstotheslave.Inthesamemanner,datavaluesthatarereturnedtothemasterarestillreferredtoasinputs,even
thoughtheyareoutputsfromtheslave.

file:///E:/DATA%20PSM/PLC/tips/tip56.htm

1/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Themastertellstheslavethestartaddressoftheoutputbuffer(Receivemailbox).ThemastersendstheVmemory
offsetoftheoutputbuffertotheslaveaspartoftheparameterassignmentoftheslave.Ifthisoffsetiszero,theslave
willplacetheoutputbufferatVB0.Iftheoffsetis5000,theslavewillplacetheoutputbufferatVB5000.
Themasteralsotellstheslavethesizeoftheoutputbuffer(Receivemailbox).Theuserconfiguresthemastertowrite
somenumberofbytesofdatatotheslave.Themastersendsthisinformationtotheslaveaspartoftheconfigurationof
theslave.Theslaveusesthisinformationtosetthesizeoftheoutputbuffer.Ifthemastertellstheslavethatthereare
16outputbytes,theslavewillsetthesizeoftheoutputbufferto16bytes.IftheoutputbufferstartsatVB5000,output
datafromthemasterwillbewrittentolocationsVB5000throughVB5015.
Theinputbuffer(Sendmailbox,ordatatobereturnedtothemaster)immediatelyfollowstheoutputbuffer.Theuseralso
configuresthemasterfortheamountofdatatobereturnedbytheslave.Thisvalueiswrittentotheslaveaspartofthe
slaveconfiguration.Theslaveusesthisinformationtosetthesizeoftheinputbuffer.Continuingwiththeexample
above,ifthemasterplacestheoutputbufferatVB5000andsetsthesizeto16bytes,theinputbufferwillbeginat
VB5016,directlyaftertheoutputbuffer.Ifthesizeoftheinputbufferisalso16bytes,theinputbufferwillbeplacedat
VB5016throughVB5031.
Aftertheconnectionbetweenmasterandslavehasbeenestablished,thelocationoftheoutputbufferandthesizeof
eachbuffercanbereadfromthespecialmemory(SM)oftheCPU.Thefollowingspecialmemorylocationsdescribethe
firstEM277moduleattachedtotheexpansionbus.IftheEM277isthesecondintelligentmodule(nonI/Omodule),then
theSMaddressesareoffsetby50(SMB250toSMB279).
SMB200to215

Theselocationscontain16ASCIIcharactersgivingthemodulename.

SMB216to219

TheselocationscontainthesoftwarerevisionoftheEM277.Thefirsttwocharactersarethe
majorrevisionandthesecondtwocharactersaretheminorrevision.Forexample:ifSMB216219
contain0102,thesoftwarerevisionis1.02.

SMW220

ThisistheEM277moduleerrorstatus.Onlytwovaluesarecurrentlydefined.Azerointhis
locationmeansthattherearenoerrors.Avalueofonemeansthatthereisnousersupplied24
VDCpowerattachedtothemodule.

SMB222

ThisistheaddressoftheEM277thatisreadfromtheswitches.

SMB224

ThisbytelocationcontainsthestatusofthePROFIBUSDPconnection.Theuserprogramshould
monitorthislocationsothattheprogramknowsiftheDPconnectionisoperatingproperly.Ifthere

file:///E:/DATA%20PSM/PLC/tips/tip56.htm

2/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

isanerror(anyvalueexcept2),theprogramcantakeactionbasedonthefailureoftheDP
connection.Thefollowingstatusvaluesaredefined:
0=NoDPcommunicationhasoccurredsincetheEM277waspoweredon.
1=TheDPmasteriscommunicatingtotheEM277butthereisaproblemwiththeconfigurationor
parameterassignmentinformationsentbythemaster.
2=TheEM277andtheDPmasterarecurrentlyexchangingdata(normaloperation).
3=TheEM277andtheDPmasterarenotcurrentlyexchangingdatabutwereexchangingdatain
thepast.
SMB225

ThisbytecontainstheaddressofthemasterthatconfiguredtheEM277.Thisisthemasterthatis
abletowriteoutputsandreadtheinputsoftheslave.

SMW226

ThiswordcontainstheVmemoryaddressoftheoutputbuffer(Receivemailbox).Thisvalueis
writtentotheslaveinaparameterassignmentmessageduringtheinitializationoftheconnection.

SMB228

Thisbytecontainsthesizeoftheoutputbuffer(sizeoftheReceivemailboxinbytes).Thisvalueis
writtentotheslaveinaconfigurationmessageduringtheinitializationoftheconnection.

SMB229

Thisbytecontainsthesizeoftheinputbuffer(sizeoftheSendmailboxinbytes).Thisvalueis
writtentotheslaveinaconfigurationmessageduringtheinitializationoftheconnection.

Notethatspecialmemorylocations226through229(or276through279)showdatawrittentotheEM277bythe
PROFIBUSDPmaster.Writingtotheselocationswillnotchangetheaddressorsizeofthebuffers.TheEM277writes
theselocationstotheCPUwheneverthereisachangeinthePROFIBUSDPstatusorwhenthemasterwritesnew
valuestotheEM277.
InSTEP7Micro/WIN(revision3.1),todisplayallofthevaluesdescribedabove,clickPLConthemenubar.
OnthePLCmenu,clickInformation.IntheInformationscreen,selectanintelligentmodule,andthenclickthe
IntelligentModuleInformationbutton.
UsingtheEM277withaProgrammingDeviceorHMI
InadditiontoactingasaDPslave,theEM277canalsobeusedasaprogrammingorHMIport.Aprogrammingdevice
canuploadordownloadprogramstotheCPUthatisattachedtotheEM277.AnHMIdevicecanreaddatafromorwrite
datatotheCPUthatisattachedtotheEM277.TheprogrammingdeviceorHMIcanbeconnectedtotheEM277atthe
sametimeasaDPmastertheDPandprogrammingdevice/HMIoperationsdonotinterferewitheachother.Tousea
programmingdeviceorHMIdevicewithanEM277,theprogrammingdeviceorHMIdevicemustbesetuptouseMPIor
PROFIBUScommunications.(TheEM277willnotcommunicatewithaprogrammingdevice/HMIdevicethatisusing
PPIprotocol.)UsetheSettingthePG/PCInterfacedialogboxtosetupcommunicationsontheprogrammingdevice
SettingtheDPAddressoftheEM277
RemovepowerfromtheCPUandtheEM277.
SettherotaryswitchesonthefrontoftheEM277tothedesiredaddress.Thetopswitch(markedX10)sets
themostsignificantdigitoftheaddress(thetensdigit).Thelowerswitch(markedX1)setstheleastsignificant
digitoftheaddress(theonesdigit).
ApplypowertotheCPUandtheEM277.
NotethattheaddressswitchesontheEM277areonlyreadwhentheEM277ispoweredon.Changingtheaddress
switchesontheEM277withpowerappliedhasnoeffectuntilthenextpowercycle.
ConfiguringaDPmaster
TheconfigurationofaDPmastervariesconsiderablydependingonthetypeofdevicebeingconfigured.Tip57"Howto
ConnectanS7300(Master)toanS7200(Slave)byMeansofPROFIBUS"describeshowtoconfigureaCPU3152DP
tocommunicatewithanS7200CPUthathasanEM277PROFIBUSDPmodule.

GeneralNotesonPROFIBUSDP
Contents:

1.0General
2.0BasicPROFIBUSDPFunctions
2.1BasicCharacteristics
file:///E:/DATA%20PSM/PLC/tips/tip56.htm

3/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

2.2SystemConfigurationandTypesofDevices

2.3SystemBehavior
2.4CyclicDataTransmissionbetweentheDPM1andtheDPSlaves

2.4.1ParameterAssignment
2.4.1Configuration
2.4.1DataExchange
2.5SYNCandFREEZEMode
2.6ProtectionMechanisms
3.0ExtendedDPFunctions
3.1DPV1Extensions
3.2OtherExtensions
4.0DeviceDatabase(GSD)Files
1.0General
PROFIBUSDPisdesignedforhighspeeddatacommunicationatthedevicelevel.Theprotocolandfunctionsare
designedaccordingtoEuropeanStandardEN50170.PROFIBUScontrollers(programmablelogiccontrollers/PCs)
communicatewiththeirdistributedfielddevices(suchasI/O,drives,andvalves)bymeansofahighspeedseriallink.
Mostofthedatacommunicationwiththesedistributeddevicesiscyclic.Thismeansthateachdeviceisaccessedin
sequenceandthesequenceisrepeatedcontinuously.Somefunctions,suchasconfiguration,parameterassignment,
diagnostics,andinterrupthandlingoccuroutsidethenormalI/Ocycle.Theseareknownasacyclicfunctions.
2.0BasicPROFIBUSDPFunctions
Thecentralcontroller(master)writesdatatoandreadsdatafromthefielddevices(slaves).Oftenthisisdoneatthe
sametimeastheprogramscanofthemastercontroller.Theupdateofallslavedevicesmustbeshorterthanthe
programscantimesothattheprogramscanandtheI/Oupdateremainsynchronized.
2.1BasicCharacteristics
PROFIBUSDPsupportshighspeeddatathroughput(upto12Mbaud).Thenetworkhassimpleinstallationrequirements
andusesaproventransmissiontechnology.PROFIBUSprovidesgooddiagnosticcapabilitiesandprovidesforsimple
serviceofthenetwork.
Speed:PROFIBUSDPrequiresonlyabout1msat12Mbpsforthetransmissionof2outputbytesand2input
bytestoeachof32stations.Figure1showsthetypicalPROFIBUSDPtransmissiontimedependingonnumber
ofstationsandtransmissionspeed.PROFIBUSDPismuchfasterthancorrespondingcontrollerfunctions,such
astheXPUTandXGETintheS7300/S7400CPUs,becauseoftheloweroverheadassociatedwiththeDP
communicationmessages.
Diagnosticfunctions:PROFIBUSDPsupportsdiagnosticfunctionstodeterminethelocationofsystemfaults.
Theslavedevicesnotifythemasterthatthereisaproblemorstatuschangewhentheyrespondtothenormaldata
exchangemessage.Oncenotified,themasterimmediatelysendsadiagnosticrequesttotheslavetodetermine
thesourceoftheproblem.Thediagnosticresponsemessagesaredividedintothreelevels:
Stationrelateddiagnostics
Thesemessagesconcernthegeneraloperationalstatusofthewholedevice.InthecaseoftheEM
277,thestationrelateddiagnosticsconsistsolelyofnotifyingthemasterthattheattachedCPUhas
enteredasystemfaultmode.TheEM277willreturnonlythestationrelateddiagnostic.
Modulerelateddiagnostics
ThesemessagesindicatethatafaultispresentinaspecificI/Orange(forexample,an8bitoutput
module)ofastation.ThistypeofdiagnosticissupportedbyslavedevicesthatcontrolseveralI/O
modules.
Channelrelateddiagnostics
Thesemessagesindicateanerroratanindividualinput/outputbit(suchasashortcircuitatoutput
7).ThistypeofdiagnosticissupportedonslavedevicesthatcontrolamodularI/Osystemwith
intelligentmodulescapableofdiagnosingerrors.

file:///E:/DATA%20PSM/PLC/tips/tip56.htm

4/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Testconditions:Eachslavehastwobytesofinputdataandtwobytesofoutputdata.Theminimumslaveintervaltimeis
200s.TSDI=37bittimesandTSDR=11bittimes.
Figure1:BusCycleTimeofaPROFIBUSDPSingleMasterSystem
2.2SystemConfigurationandTypesofDevices
PROFIBUSDPpermitssinglemasterormultiplemastersystems.Upto126devices(masterorslaves)canbe
connectedtoformasystem.Thedescriptionofthesystemconfigurationconsistsofthenumberofstations,the
assignmentbetweenthestationaddressandtheI/Oaddresses,formatoftheI/Odata,formatofthediagnostic
messages,andthebusparametersused.EachPROFIBUSDPsystemcancontainthreedifferenttypesofdevices:
DPMasterClass1(DPM1):Theclass1DPmasterisacentralcontrollerthatexchangesinformationwiththe
slavestationswithinaspecifiedmessagecycle.Typicalmasterdevicesincludeprogrammablelogiccontrollers
(PLCs)andPCorVMEsystems.
DPMasterClass2(DPM2):Class2DPmastersareprogrammingdevices,configurationdevices,oroperator
panels.TheyareusedduringcommissioningforconfigurationoftheDPsystemorforoperationandmonitoring
purposes.Class2mastersdonottransferoutputinformationtotheslavedevices.Thistypeofmastercanonly
monitortheslaveinputsandoutputs.
DPSlave:ADPslaveisaperipheraldevice(suchasanI/Odevice,aPLC,adrive,anHMI,oravalve)which
collectsinputinformationandsendsthatinformationtothemaster.Outputinformationfromthemasteris
transferredtophysicaloutputsorusedbytheslavedevice.Therearealsodevicesthatsupplyonlyinputoronly
outputinformation.
Theamountofinputandoutputinformationdependsonthedevicetype.PROFIBUSDPallowsamaximumof246bytes
ofinputinformationand246bytesofoutputinformationtobetransmittedwithinonemessage.Theamountofdata
transmittedisnormallydevicespecific.Manydevicessupportonlyoneortwobytesofdata.
TheEM277PROFIBUSDPmodulesupportsseveralI/Oconfigurationstosupportawiderangeofapplications.Different
outputandinputsizesletthetransferofdatabetweenthemasterandtheEM277matchthespecificapplication.TheEM
277writesoutputstoanareaofVmemoryintheCPU.Thisallowstheuserprogramtocontrolhowtheoutputdatais
applied.Likewise,inputdataisreadfromanareaofVmemoryintheCPUandtransferredtothemaster.
SingleMasterSystems:Insinglemastersystemsonlyonemasterisactiveonthebus.Figure2showsthesystem
configurationofasinglemastersystem.Theprogrammablecontrolleristhecentralcontrolcomponent(master).The
distributedDPslavesarelinkedbymeansofthebustothecontroller.Singlemastersystemshavetheshortestbus
cycletime.

file:///E:/DATA%20PSM/PLC/tips/tip56.htm

5/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Figure2:PROFIBUSDPSingleMasterSystem
Multiplemastersystems:Inmultiplemasterconfigurations,severalmastersareconnectedtoabus.Thesemasterscan
beindependentsubsystems,eachconsistingofthemasteranditsassignedDPslaves,ortheothermasterscanbe
additionalconfigurationanddiagnosticdevicesasshowninFigure3.TheinputandoutputdataoftheDPslavescanbe
readbyallDPmasters.OnlyoneDPmaster,themasterwhichconfigurestheslaves,canwriteoutputstotheslaves.
Multiplemastersystemsproducealongerbuscycletimethansinglemastersystemsbecauseoftheadditionaltime
requiredtoallowthemasterstosharethesamebus.

Figure3:PROFIBUSDPMultipleMasterSystem
2.3SystemBehavior
Systembehaviorisdeterminedprimarilybytheoperatingstatusofthemaster.Therearethreeoperatingstatesofthe
PROFIBUSDPnetwork:
Stop
Inthisstate,thereisnodatatransmittedbetweenthemasterandtheDPslaves.Themastermaybeinanon
operationalstate.
Clear
Inthisstate,themasterreadstheinputinformationfromtheDPslavesandholdstheslaveoutputsinafailsafe
mode.Normallytheoutputsaresettozero(Clear),butsomeslavedevicesallowthedefinitionsofafailsafestate
fortheoutputs.
Operate
Inthisstate,themasterwritesoutputsandreadsinputsfromalltheconfiguredDPslaves.
2.4CyclicDataTransmissionbetweentheDPMasterandtheDPSlaves
DatatransmissionbetweenthemasterandtheDPslavesthatareassignedtoitisexecutedautomaticallybythemaster
inadefined,recurringorder.Thisrecurringdatatransferisknownasacyclicdatatransfer.Whenconfiguringthesystem,
file:///E:/DATA%20PSM/PLC/tips/tip56.htm

6/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

youspecifywhichDPslavesareassignedtothemasterandwhichslavesaretobeincludedorexcludedfromthecyclic
datatransfer.Nearlyallslavesaresetupforacyclicdatatransfer.
DatatransmissionbetweenthemasterandtheDPslaveisdividedintothreephases:parameterassignment,
configuration,anddataexchange.Thefirsttwophasesnormallyoccuronlyoncewhenthesystemisstartedorwhena
slaveisadded.Thedataexchangephaseisthenormaloperatingmodeofthesystem.
Theparameterassignmentandconfigurationinformationsenttotheslavescomesfromselectionsthatyoumadewhen
settingupthesystemandfromthedevicedatabasefiles(GSDfiles)fortheslavedevices.TheGSDfiles(discussed
later)aretextfilesdescribingtheattributesoftheslavedevices.Thesystemselectionsandslaveattributesareloaded
intotheDPmaster,whichthenusesthisinformationtobuildtheparameterassignment,andconfigurationmessagessent
totheslaves.
2.4.1ParameterAssignment
WhenthemasterfirstenterstheOperatestatefromtheStopstate,itmustfirstinitializealloftheslavedevicesby
writingtheparameterassignmentandconfigurationtotheslavesThemasterfirstsendsadiagnosticrequesttotheslave
device.Thediagnosticresponsetellsthemasterthestateoftheslave,theslaveidentificationnumber,andwhether
someothermasteralreadycontrolsthatslave.Theslaveidentificationnumberisauniquenumberassignedbythe
PROFIBUSUserOrganizationtoallslavesandmasters.ThefourdigitslaveIDnumberallowsthemastertoverifythat
thedeviceonthenetworkisthedevicespecifiedbyyouduringtheconfigurationofthemaster.IftheslaveIDdoesnot
matchyourconfigurationortheslaveisalreadycontrolledbyanothermaster,themasterabortstheconfigurationofthe
slaveandreportsanerrortoyou.
Iftheslaveisavailable,themastersendsaparameterassignmentmessagetotheslave.Theparameterassignment
messageconsistsofafewfixeditemswhichconfiguretheslavetomatchthenetworkparameters(suchaswatchdog
timeouts),andoptionally,parameterstoconfigurespecificfunctionsormoduleswithintheslave.
TheEM277acceptsonlyoneparameterinadditiontothenetworkparameters.ThisistheVmemoryoffsetfortheoutput
buffer.Ifthisvalueispresent,theEM277usesthisoffsettoaccesstheoutputbufferandinputbufferintheCPU.Ifthe
valueisnotpresentintheparameterassignmentmessage,theEM277assumesthattheoutputbufferstartsatVB0in
theCPU.
2.4.2Configuration
Aftertheparameterassignmentmessage,themastersendstheslaveaconfigurationmessage.Thismessagecontains
theI/Oconfigurationthatthemasterexpectsfortheslave.MostPROFIBUSdeviceshaveafixedconfiguration,andfor
thesedevices,thewritingoftheconfigurationmessagesisverificationthattheproperslavedeviceispresent.Ifthe
configurationisacceptable,theslaveislockedtothatmasteraddressuntilthemasterreleasesitortheslaveispower
cycled.Onlythemasterthatconfiguresaslaveisabletoenterdataexchangemodewiththatslave.
InthecaseoftheEM277,thewritingoftheconfigurationtellstheEM277howmanyoutputandinputbytesthemaster
isrequestingtheEM277andtheattachedCPUtosupport.TheEM277cansupportseveralstandardconfigurations
(documentedintheS7200ProgrammableControllerSystemManualandGSDfile)andmanymoreoptional
configurationsifthemasterallowstheenteringofnonstandardconfigurations.Afterreceivingtheconfigurationmessage,
theEM277verifiesthattheconfigurationisacceptableandthattheoutputandinputbufferswillfitwithinthememoryof
theattachedCPU.Iftherearenoproblemswiththeconfigurationorparameterassignmentmessage,theEM277
attachesitselftothemasteraddressthatsenttheconfigurationmessages.
TheI/Oselectionthatyoudefinedalsoselectsthedataconsistency.Thedataconsistencyselectiontellsboththemaster
andtheslavehowmuchdatatotransferbetweenthenetworkandmemorywithoutinterruption.PROFIBUSsupports
threetypesofconsistency:byte,word,andbuffer.
Byteconsistencyensuresthatbytesaretransferredaswholeunits.Byteconsistencyshouldbeusedifallofthe
byteswithintheDPdataareindependentdataitems.
Wordconsistencyensuresthatwordtransferscannotbeinterruptedbyotherprocesses.Wordconsistency
shouldbeusedwhentheDPdatacontainsinteger(twobyte)values.Wordconsistencyforcesthemasterand/or
slavetomovebothbytesofeachwordbetweenmemoryandtheDPnetworkasaunitthatcannotbeinterrupted
ormodifiedbyanyotherprocessintheCPU.
Bufferconsistencyensuresthattheentirebufferofdataistransferredasasingleunit,uninterruptedbyanyother
process.Bufferconsistencyforcesthemasterand/orslavetomovetheentirebufferofDPdata(all
inputs/outputs)betweenmemoryandthenetworkwithoutinterruption.Bufferconsistencyshouldbeusedwhen
transferringdoublewordvalues,floatingpointvaluesoragroupofdatavalueswhichmustbeacteduponasone
unit.
Forexample,theEM277supportsI/Oconfigurationsof:
file:///E:/DATA%20PSM/PLC/tips/tip56.htm

7/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

8bytesout/8bytesin
4wordout/4wordin
8bytebufferI/O
Alloftheseconfigurationstransfer8bytestotheEM277and8bytesbacktothemaster,butthedataconsistencyis
differentforeachconfiguration.The8byteout/inconfigurationallowsuserinterruptsintheCPUtooccuranytimeduring
thetransferofthebytesbetweentheEM277andtheCPUsVmemory.The4wordout/inconfigurationallowsuser
interruptsonlybetweenwordsduringthetransfer,ensuringthatthebytesmakingupthewordsarenotseparatedduring
thetransfer.The8bytebufferI/OconfigurationcausestheCPUtodisableuserinterruptsaroundtheentiretransferof
data.ThebufferconsistencyselectionsintheEM277arelimitedsothatthetimethatuserinterruptsaredisableddoes
notadverselyaffectthesystem.
Afteraparameterassignmentorconfigurationmessagehasbeenreceived,theEM277writestheVmemoryoffsetand
theoutputandinputbuffersizestothespecialmemoryoftheCPU,evenifthevaluesarenotvalidfortheattached
CPU.TheDPERRORLEDonthefaceoftheEM277willflashredifthereisanerrorinparameterassignmentor
configuration.IftheEM277willnotenterdataexchangemodewiththemaster,youcanviewtheSMlocationstohelp
determinewherethereisaproblem.
2.4.3DataExchange
Aftertheparameterassignmentandconfigurationmessageshavebeensenttotheslave,themastersendsanother
diagnosticrequesttotheslavetodetermineiftheslavehasacceptedtheparameterassignmentandconfiguration
messages.Iftheslavedeterminesthattherewereerrorswiththeparameterassignmentandconfigurationmessages,the
masterattemptstosendthesemessagestotheslaveagain.Iftherearenoerrorsinthediagnosticresponse,themaster
movestothenextoperationalphase,dataexchange.
DataexchangemodeisthenormalmodeofoperationforaDPnetwork.Inthismode,themasterwritesoutputstothe
slaveandtheslavereturnsinputs.Iftheslavehasnooutputs,themasterstillsendsamessage,butwithnooutputdata,
andtheslaverespondswithitsinputs.Ifaslavehasoutputsbutnoinputs,theslaverespondstotheoutputmessage
withamessagethatcontainsnodata.
TheDXMODELEDonthefaceoftheEM277isgreenwhentheEM277isindataexchangemodewiththemaster.The
EM277isnotindataexchangemodeiftheDXMODELEDisnotlit.TheDPERRORLEDontheEM277isredifthe
EM277waspreviouslyindataexchangemodebutisnotcurrentlyinthatmode.
Theslavesetsadiagnosticmemorybitintheresponseifitnotesaproblemorfault.Thediagnosticmemorybitcauses
themastertosendadiagnosticrequesttotheslavebeforetransferringanymoredatatotheslave.Thisallowsthe
mastertorespondtoslavefaultspromptly.

Figure4:UserDataTransmissionwithPROFIBUSDP
2.5SYNCandFREEZEModes
Themastercansendcontrolcommandstoasingleslave,agroupofslaves,orallslavessimultaneously.Thesecontrol
commandsareusuallytransmittedasbroadcastcommandsthataresenttoallslavessimultaneouslyandacteduponby
allslavesifthecommandwasappropriatefortheslave.ThecontrolcommandspermituseofSYNCandFREEZE
modesforsynchronizationoftheinputsandoutputsoftheDPslaves.
file:///E:/DATA%20PSM/PLC/tips/tip56.htm

8/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Themastercanassignaslavetoagroupduringtheparameterassignmentphaseofstartup.Thecontrolcommands
containagroupfieldinthecommand.Ifthegroupnumberinthecontrolcommandmatchesthegroupassignedatstartup,
theslaveacceptsandactsonthecommand.Ifthegroupnumbersdonotmatch,theslaveignoresthecontrolcommand.
Themastercanassignaslavetoanyoneofeightgroups,ortonogroup.
SYNCmodeallowsthemastertosynchronizetheoutputsofagroupofslavedevices.TheslavesbeginSYNCmode
whentheyreceiveaSYNCcommandfromtheirmaster.Theoutputsofalladdressedslavesarefrozenintheircurrent
state.Duringsubsequentuserdatatransmissionsfromthemaster,theoutputdatavaluesareacceptedandstoredbythe
slaves,buttheoutputstates(thephysicaloutputs)remainunchanged.Thestoredoutputdataarenotsenttotheoutputs
untilthenextSYNCcommandisreceived.TheSYNCmodeallowsthemastertowriteoutputdatatotheslavesand
thenhavealltheslavesassertthoseoutputsattheexactsametimewhenthemasterbroadcastsaSYNCcommand.
SYNCmodeisterminatedwhenthemastersendsanUNSYNCcommand.
FREEZEmodeallowsthemastertosynchronizetheinputsofagroupofslavedevices.TheFREEZEmodecommand
causestheaddressedslavestoFREEZEtheirinputstothecurrentvalues.Themastercannowreadthefrozeninput
datavaluesfromtheslaves.TheinputdatavaluesarenotupdatedagainuntilthemastersendsthenextFREEZE
command.FREEZEmodeisterminatedwhenthemastersendstheunfreezecommand.
TheEM277supportsboththeSYNCandFREEZEmodes.TheEM277transfersdatatotheVmemoryintheCPUand
nottophysicalI/O,buttheconceptofSYNCandFREEZEisthesame.InSYNCmode,theEM277doesnottransfer
newoutputdatatotheCPUuntilaSYNCcommandisreceived.InFREEZEmode,theinputdatathatistransferredto
themasterisnotupdateduntilaFREEZEcommandisreceived.
2.6ProtectionMechanisms
PROFIBUSDPprovidesseveralprotectionmechanismstoguardagainstsetuperrors,dataerrors,andfailureofthe
transmissionequipment.
OntheNetwork
PROFIBUSDPusesanasynchronouscommunicationmethodwithchecksums,parity,andredundantdatafieldsto
detecterrorsinthemessage.ThehammingdistanceofPROFIBUSDPis4.Thehammingdistanceisameasureofhow
secureaprotocolisagainstmisinterpretationofapacketwitherrorsasadifferentlegalpacket.Hammingdistance4
meansthatatleast4bitshavetobewrongandstillmatchthechecksumcalculationsinordertobemistakenasanother
validpacket.
AttheDPmaster
TheDPmastermonitorsdatatransmissionoftheslaveswithatimer.Aseparatetimerisusedforeachslave.Thistimer
expireswhencorrectdatatransmissiondoesnotoccurwithinthespecifiedmonitoringinterval.Thismonitoringintervalis
basedonthenetworkconfiguration,thatis,thenumberofmasters,thenumberofslaves,andthespeedofthe
transmissionmedia.Theuserisinformedwhenanyslaveexceedsitstimeout.
Themastercanbesetuptotakeactionifanyslavefails.Iftheautomaticerrorreaction(Auto_Clear=True)hasbeen
enabled,themasterexitstheOperatestate,switchestheoutputsofallassignedslavestofailsafestatus,andchanges
toitsClearstate.Ifthisparameterissettofalse,themasterremainsintheOperatestateevenwhenafaultoccurs,and
youspecifythesystemreaction,usuallybyaspecialfunctionoruserprogramblock.
AttheDPslave
Theslaveusesawatchdogtimertodetectfailuresofthemasterorthetransmissionline.Ifnodatacommunicationwith
themasteroccurswithinthewatchdogtimerinterval,theslaveautomaticallyswitchesitsoutputstothefailsafestatus.
PROFIBUSprovidesaccessprotectionfortheoutputsoftheDPslavesthatoperateinmultiplemastersystems.The
accessprotectionensuresthatonlytheauthorizedmastercanwritedataandissuecontrolcommandstotheslave.The
authorizedmasteristhemasterthatconfiguredtheslave.Allothermasterscanonlyreadtheinputsandoutputsofa
slave,buttheycannotwriteoutputsorsendcontrolcommands.
3.0ExtendedDPFunctions
PROFIBUSDPhasprovidedextendedfunctionstoallowreadandwriteaccessestoslaves,interruptfunctionsand
uploadordownloadofdataandprograms.TheseextensionsareintendedforusewithmorecomplexPROFIBUSdevices
thatmayrequireparameterchangesduringnormaloperation.
TheextendedDPfunctionstakeplaceinparallelwiththenormaldataexchangecycle.Theextendedfunctionsare
executedatalowerprioritythanthenormaldataexchangemessagessothatthenormalDPfunctionshavepriorityover
file:///E:/DATA%20PSM/PLC/tips/tip56.htm

9/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

theextendedfunctions.
TheextendedDPfunctionsareoptionalandallslavesneednotsupportthem.ExistingDPdevicesthatdonotwantor
needtousethenewfunctionscancontinuetobeusedsincetheextendedfunctionsareonlysupplementstoalready
existingfunctions.
3.1DPV1Extensions
TheDPV1extensionsaredocumentedinPROFIBUSguidelinenumber2.082.Theseextensionsallowamastertoread
andwritedatatoaslave,acknowledgeinterrupts,andtotransferoperationalstatusofthemastertotheslaves(suchas
theRUN/STOPstatusofaprogrammablelogiccontrollermaster).TheEM277doesnotsupportanyoftheDPV1
extensions.
3.2OtherDPExtensions
PROFIBUSsupportsextensionstoallowatransportlayerwithinthePROFIBUSdatamessage.Thistransportlayeris
usedtosupportthehighlevelfunctionssuchastheuploadinganddownloadingofprogramsanddatatoaslavedevice.
Theseextensionsrequirethemastertosetupaconnectiontotheslavedevice.Themastercanthencommunicatetothe
slaveaslongastheconnectionisopen.Theconnectionwillbeclosedifeitherthemasterorslavedetectsanerror,orif
themasterorslavefailstocommunicatewithinaconnectiontimeoutperiod.Ifaconnectionisclosedbecauseoferroror
timeout,themastermustreestablishtheconnectiontotheslavebeforecommunicationcancontinue.Thetransport
layerextensionsaredevicespecificandnotallPROFIBUSslavessupporttheseextensions.
TheEM277supportsthetransportlayerextensionstoprovideallofthefunctionsfoundintheprogrammingpackagefor
theS7200CPUs.Throughthismechanism,theusercanprogram,debug,andmonitortheS7200CPUattachedtothe
EM277.TheS7300orS7400CPUsusetheseDPextensionstocommunicatetoanS7200CPUbymeansofthe
GETXandPUTXcommands.
TheEM277supportssixconnections.OneoftheseconnectionsisreservedforaprogrammingdeviceorPC,andone
connectionisreservedforanoperatorpanel(i.e.OP7orTD200).Theremainingfourconnectionsarenotreservedand
canbeusedbyotheroperatorpanels,programmingdevices,orotherdevicessuchasanS7300CPU.ThesixDP
extensionconnectionsareinadditiontothenormalPROFIBUSDPdataexchangefunction.
TheEM277canonlybeusedwithaprogrammingdevicethathasaCPorMPIcommunicationcard.SelecttheMPIor
PROFIBUSParameterAssignmentinthePG/PCinterfacetoallowcommunicationtoanEM277andS7200CPU.The
PPIParameterAssignmentcannotbeusedwithanEM277.
4.0DeviceDatabaseFiles(GSDFiles)
PROFIBUSdeviceshavedifferentperformancecharacteristics.Devicefeaturesdifferinregardtoavailablefunctionality
(suchasnumberofI/Osignalsanddiagnosticmessages)orpossiblebusparameterssuchasbaudrate.These
parametersvaryindividuallyforeachdevicetypeandvendorandareusuallydocumentedinthetechnicalmanual.To
achieveasimplePlugandPlayconfigurationofaPROFIBUSnetwork,thecharacteristicfeaturesofadeviceare
specifiedinanelectronicdatasheetsometimescalledadevicedatabasefileorGSDfile.
Thedevicedatabasefiles(GSDfiles)provideacomprehensivedescriptionofthecharacteristicsofadevicetypeina
preciselydefinedformat.TheGSDfilesarepreparedbythevendorforeachtypeofdeviceandmadeavailabletothe
userintheformofadevicedatabasesheetandadevicedatabasefile.TheformatoftheGSDfilepermitsthe
configurationsystemtoreadinthefileofanyPROFIBUSDPdeviceandautomaticallyusethisinformationwhen
configuringthesystem.Duringtheconfigurationphase,theconfigurationsystemautomaticallyperformschecksforinput
errorsandconsistencyofthedataenteredinrelationtothetotalsystem.

file:///E:/DATA%20PSM/PLC/tips/tip56.htm

10/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Figure5:DeviceDatabasesPermitOpenConfiguration
Thedevicedatabasefileisdividedintothreeparts:
Generalspecifications
Thissectioncontainsvendoranddevicenames,hardwareandsoftwarereleaseinformation,baudratessupported,
featuressupported,andnetworktiminginformation.
DPmasterrelatedspecifications
ThissectioncontainsallparameterswhichonlyapplytoDPmasterdevices,suchasthemaximumnumberof
slaveswhichcanbeconnected,oruploadanddownloadcapabilities.Thissectiondoesnotexistforslave
devices.
DPslaverelatedspecifications
Thissectioncontainsallspecificationsrelatedtoslaves,suchasthenumberandtypeofI/Ochannels,
specificationofdiagnostictests,andinformationontheconsistencyoftheI/Odata.
TheGSDfileisorganizedasparameterkeywordsfollowedbytheparametervalue.Someparameters,suchas
Vendor_Name,aremandatorysomeareoptional.TheformatoftheGSDfileisdesignedtobeflexible.Someofthe
entriesarelists,likethebaudratessupportedbyadevice.Someentrieslisttheinputandoutputconfigurationsofthe
devices.TheGSDfilealsoallowsplaintexttobeassignedtodiagnosticinformation.
GSDfilesofallPROFIBUSDPdevicesthathavebeentestedfortheirconformitytothePROFIBUSstandardare
availableintheGSDlibraryontheSiemensWorldWideWebserverofthePROFIBUSUserOrganizationfor
downloading.Theaddressis:http://www.ad.siemens.de/csi_e/gsd
TodownloadtheEM277GSDfile,gototheSiemensinternetlocationhttp://www.ad.siemens.de/csi_e/gsdandselect
thePROFIBUSGSD:SIMATIC.GSDlibrary.OnthepageofSIMATICdownloads,scrolldownthepageuntilyoufind
theentryfortheEM277PROFIBUSDP.FromhereyoucandownloadtheGSDfileandthebitmapfilesfortheEM277.
TheGSDfilefortheisnamedsiem089D.gsd.
Forfurtherinformation,refertoyourlocalPROFIBUSusergroup.Theusergroupsforeachcountrycanbefoundonthe
PROFIBUSwebsite:http://www.profibus.com
Disclaimer
TheseSIMATICS7200ApplicationTipsareprovidedfreeofchargetogiveusersoftheS7200examplesof
programmingtechniquesavailabletoaccomplishcertaintasksinvariousapplications.TheseTipsdonotpurporttocover
alldetailsorvariationsinequipment,nordotheyprovideforeverypossiblecontingency.Yourapplicationmaybedifferent
fromthosedescribedherein.ItisyourresponsibilitytousetheSIMATICS7200properlyinyourapplication.TheseTips
donotrelieveyouoftheresponsibilitytousesoundpracticesinapplication,installation,operationandmaintenance.By
usingtheseTips,youacknowledgethatSiemensshallnotbeliableunderanytheoryfordamagesorpersonalinjury
resultingfromsuchuse.
SiemensreservestherighttomakechangesintheseTipsatanytimewithoutnoticeorobligation.Shouldaconflictarise
betweenthesuggestionsintheseTipsandotherSiemenspublicationssuchastheS7200ProgrammableController
SystemManualortheSIMATICS7/M7/C7ProgrammableControllersCatalogST70,theotherpublicationshalltake
precedence.
file:///E:/DATA%20PSM/PLC/tips/tip56.htm

11/12

6/22/2016

Tip56:GeneralNotesaboutPROFIBUSandEM277

Copyright2002SiemensEnergy&Automation
SIMATICS7200customershavefreeuseoftheapplicationtips.ThesetipsareonlyageneralapproachtousingtheS7200withvariousapplications.Your
specificapplicationmaybedifferent.ItisyourresponsibilitytousetheSIMATICS7200properlyinyourapplications.

file:///E:/DATA%20PSM/PLC/tips/tip56.htm

12/12