Sunteți pe pagina 1din 1

6/22/2016

Tip27:HowtoUseFreeportModetoConnectSeveralS7200CPUsinaRemoteI/ONetwork

Version4.0.Updated1/99

HowtoUseFreeportModetoConnectSeveralS7200CPUsinaRemoteI/ONetwork(Tip27)
Category:Communications
SpecialHardwareRequirements:
Oneconnectioncable,9pin
IfmorethantwoPLCsareused(morethanoneslave),youwillneedaSiemensnetworkbusconnector.
ProjectExample#1(MasterProgram)
ProjectExample#2(SlaveProgram)
PrintthisTip
Inthisexample,threeSIMATICS7200CPUsareconnected.EachoneisaCPU214.Station0,calledthemaster,is
linkedtostations1and2,calledtheslaves.Themasterstationsendsfourbytesofoutputdatatoeachstationinturn.
Asaresult,eachstationrespondswithfourbytesofinputdata.TheFreeportcommunicationmodeisusedforthedata
transmission.
Twomemorybuffersarereserved:oneforremoteinputsandoneforremoteoutputs.Theoutputdatathatistobe
transmittediscapturedbymovingadoublewordvaluefromtheoutputbuffertotheTransmitbuffer.Aftertransmitting,
themasterstationreceivestheresponseoftheslavestationsandstoresthedataintheReceivebuffer.
Thisprogramincludesseveraltimedinterruptroutines.Eachtimedinterruptroutineiscalledbyoneofthefollowingtwo
interruptevents:interruptevent10andevent11.Forexample,inthisprogram,interruptevent10callstimedinterrupt
routineINT0andtimedinterruptroutineINT1.Atonepointintheprogram,interruptevent11callsINT0.
Thetimeintervalforatimedinterruptroutinethatiscalledbyeventnumber10isspecifiedinspecialmemorybyte
SMB34.Thetimeintervalforthetimedinterruptthatiscalledbyeventnumber11isspecifiedinspecialmemorybyte
SMB35.Inbothcases,thetimeintervalisfixedinincrementsof1ms.Thesmallestvaluepermittedforthetimeinterval
is5ms.Thelargestvaluepermittedforthetimeintervalis255ms.
Inthisprogram,thetimeintervalspecifiedinSMB34is5ms.ThetimeintervalthatisspecifiedinSMB35is20ms.
ItisalsopossibletousetheNetworkRead(NETR)andNetworkWrite(NETW)instructionstolinkaCPU214toother
S7200CPUsinthePointtoPointInterface(PPI)mode.InthePPImode,itispossibletoconnectTD200unitsand
operatorpanels(OPs)tothenetworkandstilllinkthestationstogether.

Copyright2002SiemensEnergy&Automation
SIMATICS7200customershavefreeuseoftheapplicationtips.ThesetipsareonlyageneralapproachtousingtheS7200withvariousapplications.Yourspecific
applicationmaybedifferent.ItisyourresponsibilitytousetheSIMATICS7200properlyinyourapplications.

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

1/1

S-ar putea să vă placă și