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.

1 / 6
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功