您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 薪酬管理 > xPC-Target-Setup
xPCTargetSetupMTSSystemsCorporationRev.07-Jul-10ObtainSoftwareSoftwarefromTheMathworks()(getthelatestversions):1)Matlab2)SignalProcessingToolbox3)Simulink4)RealTimeWorkshop5)xPCTargetSoftwarefromMicrosoft:MicrosoftVisualC++2008ExpressEditionversion9.0Note:Supportedcompilerschangeovertime.ContacttheMathworksat508-647-7000tofindoutwhichcompilerversionissupportedforusewiththecurrentversionofxPCTarget.TheabovecompilerissupportedforRelease2010aofxPCTarget.TheExpressEditionisfreefordownloadfrom():ScramnetGTdriverThisdriverisrequiredonlyifyouhaveScramnetGThardware.IfyouhaveScramnetPlushardware,thedriverissuppliedbyTheMathworksinitsstandardxPCTargetdistributionanditisnotnecessarytoobtainitfromCurtiss-Wright.Thedriversoftwareisfree.ContactCurtiss-Wrightat937-252-5601.HowtoinstalltheScramnetGTdriver:Step1:Extractthefilesinsidethezipfilecwcec_scgt_2007b_thirdpartydrivers.ziptotheMatlabfolder“C:\ProgramFilesMATLAB\R2010a\toolbox\rtw\targets\xpc\target\build\xpcblocks\thirdpartydrivers”.Ifyoursoftwarewasnotinstalledunder“C:\ProgramFiles”,orifyourversionofMatlabisnotR2010a,thenpleaseadjustthatportionofthedirectorynameaccordinglytomatchyoursystem.Step2:StartMatlab,andtypeintothecommandwindow:rehashtoolboxStep3:QuitMatlabandrestart.TheSimulinkdriverI/OblocksarenowaccessibleintheSimulinkLibraryBrowserasxPCTarget:SCRAMNetGTLibrary.ConfigureandVerifytheEntireSoftwareInstallationOnceyouhaveinstalledallofthesoftware,youmustconfigureitforusebyxPCTarget.Toseehowtodothis,startMatlabandenteritsHelpfacility,navigatetoxPCTarget,GettingStarted,InstallationandConfiguration,andfollowtheinstructionsinthesectiontitledInstallationontheHostPC.Next,verifytheinstallationbyrunningthexPCTargettestsuitedescribedinTestingandTroubleshootingtheInstallation.ItisverygoodideathatyoureadtheentireGettingStartedsectioninordertofamiliarizeyourselfwithxPCTarget.Ifyouhavedifficulties,contacttechsupportatTheMathworksat508-647-7000,option5.ToconfigurexPCTarget,typeintotheMatlabcommandwindow:xpcexplrandconfigurethewindowsasshownbelow.Notethatspecificdetailsforyourconfigurationmaybedifferent,forexample,youmaydecidetouseadifferentTargetPCIPaddress.ConfigureScramnetInterruptsTheMTScontrollersynchronizestheexecutionoftheSimulinkmodelviaScramnetinterrupts.TodeterminewhichIRQtheScramnetboarduses,typethefollowingintotheMatlabcommandwindow:getxpcpciallAlistofallPCIdeviceswillthenbeprintedinthecommandwindow.IfyouhaveaScramnetPlusboard,somethinglikethiswillappear:CurtissWrightControlsEmbeddedComputingSCRAMNet+SC150eBus12,Slot2,IRQ5SharedmemoryVendorID0x11b0,DeviceID0x4750,SubVendorID0x1387,SubDeviceID0x5301orifyouhaveaScramnetGTboard:CurtissWrightControlsEmbeddedComputingSCRAMNetGTBus5,Slot5,IRQ5SharedmemoryVendorID0x1387,DeviceID0x5310,SubVendorID0x1387,SubDeviceID0x5310NotethatifyouuseWindowsXP,thefirstlineidentifyingtheboardasaScramnetboardmaynotappear,inwhichcase,lookfortheappropriateVendorID.TheIRQnumbermustbeenteredintoyourmodel.Inyourmodel,calluptheConfigurationParameterswindowfromtheSimulationmenu(shownbelow),andselecttheappropriateIRQnumberasthe“Real-timeinterruptsource”.AlsomaketoselectyourparticularScramnetboardmodelinthe“I/Oboardgeneratingtheinterrupt”popupmenu.Notethatifyouhaveproblemsgettinginterruptstowork,youcanalwaysrunoffoftheinternaltimerbyselecting“Timer”asthe“Real-timeinterruptsource”.Youwillnotbesynchronizedwiththecontroller,butusuallythisisnotaproblem.DisableSystemManagementInterrupts(SMIs)ontheTargetComputer(ifrequired)Tosuccessfullyoperatereal-timesoftwareonanymicroprocessorsystem,controlandmanagementofallinterruptservicesisrequired.DependingonyourBIOS,certaininterruptsknownasSystemManagementInterrupts(SMIs)caninterrupttheprocessorduringtheexecutionofyourmodel.SMIsareusedtohandleavarietyoftasks,suchasCPUthermalmanagementormanagementoftheUSBports.Insomecases,theseSMIscantakeaconsiderableamountoftimetoprocess,causingxPCTargettohaltthemodelwitha“CPUOverload”fault.TheseSMIsmustbedisabledifrealtimeoperationistobeensured.Unfortunately,disablingSMIsmaynotbeeasy.SomeSMIscanbedisabledbyconfiguringtheBIOSduringthebootupprocess.OthersmaynotbeaccessiblefromtheBIOS,butforsomechipsets,suchastheIntelICH5family,itmaybepossibletoprogrammaticallypreventordisablethegenerationofSMIs.ContacttechnicalsupportatTheMathworks(508-647-7000,option5)formoredetails.Ifyourmodelhaltsduetoa“CPUOverload”,typethefollowingintotheMatlabcommandwindowtogenerateaplotoftheCPUloadingversustime:plot(tg.TimeLog,tg.TETLog)Ifyouseealargespikeinthisgraph,itmaybeduetoanSMI.
本文标题:xPC-Target-Setup
链接地址:https://www.777doc.com/doc-3141743 .html