Вы находитесь на странице: 1из 3

(http://www.siemens.

com)

IndustryOnlineSupport
ProductSupport

Home(start)

ProductSupport

Entrytype:FAQ,EntryID:38726591,Entrydate:08/23/2010

(1)
Rate

HowdoyousimulatecommunicationbetweentwoCPUmodules?
Entry Associatedproduct(s)

Instructions:
AsfromS7PLCSIMV5.4+SP3youcanuseS7PLCSIMtosimulatemultipleCPUmodulessimultaneouslyinaSTEP7projectandestablishcommunicationbetweentheCPUmodules.Thefollowingcommunicationblocksaresupportedfor
communication:
SFB8"USEND"
SFB9"URCV"
SFB12"BSEND"
SFB13"BRCV"
SFB15"PUT"
SFB14"GET"
SFB19"START"
SFB20"STOP"
SFB22"STATUS"
SFB23"USTATUS"
Duringcommunication,theremightbetimerestrictionsbecauseS7PLCSIMdoesnotsupportrealtime.
PleasealsorefertotheinformationintheS7PLCSIMreadmefile,section7.3.If,whenrunningalargenumberofWindowsprograms,youcannotstartanymoreprogramsoryoucannotopenanymorewindows,thenyoumustchangethe
operatingsystemproperty"desktopheapmemory"ofyourPC.OneremedyisdescribedinTable02(#Marke_1).
YoucannottestaprogramofyourSTEP7projectwitharealCPU(PLC)atthesametimeasaprogramwithS7PLCSIM.IfyouwishtosimulateyourCPUswithS7PLCSIM,youmustfirstdisconnectallconnectionstotherealCPU.
ProceedasdescribedinTable01belowtosimulatemultipleCPUmodulessimultaneously.

No.

Procedure:

OpenS7PLCSIMintheSIMATICManager,eitherviathemenucommand"Options>SimulateModules"orfromthemenubarwiththe"Simulationon/off"icon.Thedialogwiththeinstancenumber"S7PLCSIM1"withthefirst
simulatedCPUopens.

Inthe"S7PLCSIM1"dialog,youselecttheconfiguredinterfaceparameterizationfromthedropdownlistboxforthePG/PCinterface.TheMPIinterfaceispresetbydefault.Later,S7PLCSIMstartswiththeinterfacelastused.
However,dependingonyourhardwareconfiguration,youcanalsosetthe"PROFIBUS","TCP/IP"(viatheIPaddress),"ISO"(viatheMACaddress)or"Local"(viathevirtualbackplanebus)interface.
Note:
Youmustnotusetheaddressesmorethanonceinthesamesubnetwork.IfyouloadallyourprogramsviatheMPIinterface,forexample,thenthedifferentMPIaddressesmightlooklikethis:
Station1:MPIaddress:2
Station2:MPIaddress:3
etc.

IntheSIMATICManager,marktheblockfolderofyourfirstS7stationandloadyourblocksinS7PLCSIM1viathemenucommand"PLC>Upload".

Inthe"CPU"subwindowinS7PLCSIM,changetheoperatingmodefrom"STOP"to"RUNP".Viathe"Add"menu,youcanuploadthesubwindowsfortheinputs,outputs,markers...inordertomonitorandcontroltheprogram.

TosimulateanotherCPU,youexecutethemenucommand"Simulation>NewPLC"inS7PLCSIM.The"S7PLCSIM2"dialogopens.

ForthesecondCPUtobesimulated,youselecttheinterfaceparameterization(PG/PCinterface)configuredinthehardwareconfiguration.Fig.01showsanexampleofcommunicationbetweentwoS7400CPUmodules.In
S7PLCSIM1(simulationforStation1),EB1controlscounterZ1andtransfersthecountervaluetotheAW1inS7PLCSIM2(simulationforStation2).

Fig.01
Note:
IfyouusethesameaddressofthesameinterfaceforbothCPUs,theiteminthedropdownlistisgrayed.TheS7PLCSIMinstanceisnotaccessibleviathisinterface.Selecttheinterfacefromthedropdownlistboxforthe
PG/PCinterfaceevenifitisalreadyset.ThenthecolorchangesfromgraytoblackandtheS7PLCSIMinstanceisaccessibleviathisinterface.
7

IntheSIMATICManager,marktheblockfolderofyoursecondCPUandloadalltheblocksintotheinstance"S7PLCSIM2".Youmustselecttheinstance"S7PLCSIM2"beforeloading.Here,too,youaddthesubwindows
requiredfortheinputs,outputs,markers....
Note:
Executethedownloadonlywhenthecoloroftheinterfaceisblack(asdescribedinStep6above).MoreinformationisavailableintheS7PLCSIMreadmeinsection7.3.2.
Repeatsteps4to7foreveryotherCPUtobesimulated.

Table01
Changingtheoperatingsystemproperty"desktopheapmemory"
EvenifyouhavesufficientmainmemoryandexportmemoryinyourPC,youmightgettheerrormessage"Notenoughmainmemory"ortheprogrammightcrashwhenrunningalargenumberofWindowsprograms.Oneremedyis
describedinTable02.

No.

Procedure:

Starttheregistryeditorvia"Start>Run..."andbyentering"Regedt32.exe"inthecommandline.

Openthepath:

Rightclickon"Windows"andselectthe"Change"functioninthepopupmenu.The"EditString"dialogopens.

The"SharedSection"parameterhasthevalues1024(maximumsizeofthesystemwideheap)and3072(sizeoftheheapperdesktop).Increasethedesktopheapmemoryby512KBbyaddingthevalue512tothe
"SharedSection"parameterasshowninFig.02.Thenclick"OK"tosavethesettings.

HKEY_LOCAL_Machine\System\CurrentControlSet\Control\SessionManager\SubSystems

SiemensAG20092015 Imprint(http://www.siemens.com/corporate_info)

Dataprotectionregulations(http://www.siemens.com/privacy)

DataprotectionTermsofuse(http://www.siemens.com/terms_of_use)

DigitalID(http://www.siemens.com/digital_id_en) 0.0.0.0

Fig.02
WiththeadditionalSharedSectionvalueof512KB,thesizeofthedesktopheapisdefinedforeachdesktopthatisconnectedtoa"noninteractive"workstation.Displayoftheabovementionederrormessageorprogram
crashesshouldnownolongeroccur.
5

YoumustrebootyourPCtomakethechangestothedesktopheapmemoryeffective.
Note:
MoreinformationisavailableintheInternetontheMicrosoftHelpandSupportpageunderarticleID:KB126962.

Table02
Download:
Theattacheddownload"S7_PLCSIM_CPU_Communication"containsaSTEP7V5.4projectwiththecommunicationprogramdescribedabove.Copythe"S7_PLCSIM_CPU_Communication.zip"fileintoaseparatedirectoryandthenstart
thefilewithadoubleclick.TheSTEP7projectisnowunpackedautomaticallywithalltheassociatedsubdirectories.YoucanthenuseSTEP7toopenandprocesstheextractedproject.
S7_PLCSIM_CPU_Communication.zip(/cs/attachments/38726591/S7_PLCSIM_CPU_Communication.zip)(431KB)
Creationenvironment
Table03liststhecomponentsthathavebeenusedtocreatethisentryandverifythefunctiondescribed.

Testenvironment

Version

PCplatform

Intel(R)Core(TM)2DuoCPUP87002.53GHz

PCoperatingsystem

MSWindowsXPSP3

STEP7

V5.4+SP5

S7PLCSIM

V5.4+SP3

Table03
Keywords:
Outofmemory,Multiinstance

Alsoavailableinthefollowinglanguages:
Deutsch franais italiano espaol
Entrybelongstoproducttreefolder(s):
AutomationTechnology AutomationSystems IndustrialAutomationSystemsSIMATIC SoftwareforSIMATICController STEP7programmingsoftware S7PLCSIM(products?pnid=14356)

Rateentry

norating

Feedback
Name
Phonenumber
email
Comment Numberofcharacters:0(max.500)

Sendcopyofcommenttosender

Send

Вам также может понравиться