How Do You Simulate Communication Between Two CPU Modules
-
Upload
darkblackred -
Category
Documents
-
view
21 -
download
0
description
Transcript of How Do You Simulate Communication Between Two CPU Modules
-
IndustryOnlineSupportProductSupport
Entrytype:FAQ,EntryID:38726591,Entrydate:08/23/2010
HowdoyousimulatecommunicationbetweentwoCPUmodules?Rate(1)
Instructions:AsfromS7PLCSIMV5.4+SP3youcanuseS7PLCSIMtosimulatemultipleCPUmodulessimultaneouslyinaSTEP7projectandestablishcommunicationbetweentheCPUmodules.Thefollowingcommunicationblocksaresupportedforcommunication:
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,thenyoumustchangetheoperatingsystemproperty"desktopheapmemory"ofyourPC.OneremedyisdescribedinTable02(#Marke_1).
YoucannottestaprogramofyourSTEP7projectwitharealCPU(PLC)atthesametimeasaprogramwithS7PLCSIM.IfyouwishtosimulateyourCPUswithS7PLCSIM,youmustfirstdisconnectallconnectionstotherealCPU.
ProceedasdescribedinTable01belowtosimulatemultipleCPUmodulessimultaneously.
No. Procedure:
1 OpenS7PLCSIMintheSIMATICManager,eitherviathemenucommand"Options>SimulateModules"orfromthemenubarwiththe"Simulationon/off"icon.Thedialogwiththeinstancenumber"S7PLCSIM1"withthefirstsimulatedCPUopens.
2 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:2Station2:MPIaddress:3etc.
3 IntheSIMATICManager,marktheblockfolderofyourfirstS7stationandloadyourblocksinS7PLCSIM1viathemenucommand"PLC>Upload".
4 Inthe"CPU"subwindowinS7PLCSIM,changetheoperatingmodefrom"STOP"to"RUNP".Viathe"Add"menu,youcanuploadthesubwindowsfortheinputs,outputs,markers...inordertomonitorandcontroltheprogram.
5 TosimulateanotherCPU,youexecutethemenucommand"Simulation>NewPLC"inS7PLCSIM.The"S7PLCSIM2"dialogopens.
6 ForthesecondCPUtobesimulated,youselecttheinterfaceparameterization(PG/PCinterface)configuredinthehardwareconfiguration.Fig.01showsanexampleofcommunicationbetweentwoS7400CPUmodules.InS7PLCSIM1(simulationforStation1),EB1controlscounterZ1andtransfersthecountervaluetotheAW1inS7PLCSIM2(simulationforStation2).
Associatedproduct(s)Entry
Home(start) ProductSupport
(http://www.siemens.com)
-
Fig.01
Note:IfyouusethesameaddressofthesameinterfaceforbothCPUs,theiteminthedropdownlistisgrayed.TheS7PLCSIMinstanceisnotaccessibleviathisinterface.SelecttheinterfacefromthedropdownlistboxforthePG/PCinterfaceevenifitisalreadyset.ThenthecolorchangesfromgraytoblackandtheS7PLCSIMinstanceisaccessibleviathisinterface.
7 IntheSIMATICManager,marktheblockfolderofyoursecondCPUandloadalltheblocksintotheinstance"S7PLCSIM2".Youmustselecttheinstance"S7PLCSIM2"beforeloading.Here,too,youaddthesubwindowsrequiredfortheinputs,outputs,markers....
Note:Executethedownloadonlywhenthecoloroftheinterfaceisblack(asdescribedinStep6above).MoreinformationisavailableintheS7PLCSIMreadmeinsection7.3.2.
Repeatsteps4to7foreveryotherCPUtobesimulated.
Table01
Changingtheoperatingsystemproperty"desktopheapmemory"EvenifyouhavesufficientmainmemoryandexportmemoryinyourPC,youmightgettheerrormessage"Notenoughmainmemory"ortheprogrammightcrashwhenrunningalargenumberofWindowsprograms.OneremedyisdescribedinTable02.
No. Procedure:
1 Starttheregistryeditorvia"Start>Run..."andbyentering"Regedt32.exe"inthecommandline.
2 Openthepath:HKEY_LOCAL_Machine\System\CurrentControlSet\Control\SessionManager\SubSystems
3 Rightclickon"Windows"andselectthe"Change"functioninthepopupmenu.The"EditString"dialogopens.
4 The"SharedSection"parameterhasthevalues1024(maximumsizeofthesystemwideheap)and3072(sizeoftheheapperdesktop).Increasethedesktopheapmemoryby512KBbyaddingthevalue512tothe"SharedSection"parameterasshowninFig.02.Thenclick"OK"tosavethesettings.
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
-
Alsoavailableinthefollowinglanguages:Deutsch franais italianoespaol
Entrybelongstoproducttreefolder(s):AutomationTechnologyAutomationSystems IndustrialAutomationSystemsSIMATICSoftwareforSIMATICControllerSTEP7programmingsoftwareS7PLCSIM(products?pnid=14356)
Rateentry
Feedback
Name
Phonenumber
email
CommentNumberofcharacters:0(max.500)
Sendcopyofcommenttosender
Fig.02
WiththeadditionalSharedSectionvalueof512KB,thesizeofthedesktopheapisdefinedforeachdesktopthatisconnectedtoa"noninteractive"workstation.Displayoftheabovementionederrormessageorprogramcrashesshouldnownolongeroccur.
5 YoumustrebootyourPCtomakethechangestothedesktopheapmemoryeffective.
Note:MoreinformationisavailableintheInternetontheMicrosoftHelpandSupportpageunderarticleID:KB126962.
Table02
Download:Theattacheddownload"S7_PLCSIM_CPU_Communication"containsaSTEP7V5.4projectwiththecommunicationprogramdescribedabove.Copythe"S7_PLCSIM_CPU_Communication.zip"fileintoaseparatedirectoryandthenstartthefilewithadoubleclick.TheSTEP7projectisnowunpackedautomaticallywithalltheassociatedsubdirectories.YoucanthenuseSTEP7toopenandprocesstheextractedproject.
S7_PLCSIM_CPU_Communication.zip(/cs/attachments/38726591/S7_PLCSIM_CPU_Communication.zip)(431KB)
CreationenvironmentTable03liststhecomponentsthathavebeenusedtocreatethisentryandverifythefunctiondescribed.
Testenvironment Version
PCplatform Intel(R)Core(TM)2DuoCPUP87002.53GHz
PCoperatingsystem MSWindowsXPSP3
STEP7 V5.4+SP5
S7PLCSIM V5.4+SP3Table03
Keywords:Outofmemory,Multiinstance
norating
Send