⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c2808adcpwmtest.mdl

📁 This example demonstrates the use of the ADC block and PWM blocks. The generated DSP code produces t
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain4"
	  Position		  [430, 90, 470, 130]
	  Gain			  "100"
	  ParameterScaling	  "2^-15"
	  OutDataType		  "uint(16)"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Constant
	  Name			  "Pulse Width\nSource"
	  Position		  [45, 170, 85, 210]
	  Value			  "64000"
	  OutDataTypeMode	  "single"
	  ConRadixGroup		  "Best Precision: Vector-wise"
	  OutScaling		  "2^-10"
	}
	Block {
	  BlockType		  Outport
	  Name			  "PWM Emulation"
	  Position		  [515, 103, 545, 117]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Gain3"
	  SrcPort		  1
	  DstBlock		  "Gain2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain2"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " "
	  SrcPort		  1
	  DstBlock		  "Gain3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Divide"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Divide"
	  SrcPort		  1
	  DstBlock		  "Gain4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulse Width\nSource"
	  SrcPort		  1
	  Points		  [220, 0; 0, -70]
	  DstBlock		  "Divide"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Gain4"
	  SrcPort		  1
	  DstBlock		  "PWM Emulation"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem "
      Tag		      "sdfsfsf"
      Ports		      [0, 1]
      Position		      [105, 160, 185, 200]
      ForegroundColor	      "gray"
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      MaskHideContents	      off
      System {
	Name			"Subsystem "
	Location		[303, 412, 736, 661]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Sum
	  Name			  "Add"
	  Ports			  [2, 1]
	  Position		  [190, 65, 230, 105]
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via back propagation"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "Pulse\nGenerator"
	  Ports			  [0, 1]
	  Position		  [35, 58, 80, 92]
	  Amplitude		  "0.78"
	  Period		  "4000"
	  PulseWidth		  "2000"
	  SampleTime		  "64/80000"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Pulse Width\nSource"
	  Position		  [40, 155, 80, 195]
	  Value			  "0.39"
	  OutDataTypeMode	  "single"
	  ConRadixGroup		  "Best Precision: Vector-wise"
	  OutScaling		  "2^-10"
	}
	Block {
	  BlockType		  Outport
	  Name			  "ADC Emulation"
	  Position		  [355, 78, 385, 92]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Pulse\nGenerator"
	  SrcPort		  1
	  DstBlock		  "Add"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulse Width\nSource"
	  SrcPort		  1
	  Points		  [50, 0; 0, -80]
	  DstBlock		  "Add"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Add"
	  SrcPort		  1
	  DstBlock		  "ADC Emulation"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "ePWM"
      Ports		      [1]
      Position		      [470, 80, 580, 130]
      BackgroundColor	      "orange"
      UserDataPersistent      on
      SourceBlock	      "c280xdspchiplib/ePWM"
      SourceType	      "C280x ePWM"
      useModule		      "ePWM1"
      periodUnits	      "Clock cycles"
      timerSource	      "Specify via dialog"
      timerPeriod	      "64000"
      countingMode	      "Up"
      synchronizationOption   "Disable"
      synchronizationEnable   off
      phaseActiveEnable	      "Input port"
      phaseDirection	      "Count down after sync"
      phaseActive	      "0"
      clockPrescale	      "1"
      HSclockPrescale	      "1"
      ePWMxAStatus	      on
      enableDBePWMxA	      off
      dutyCycleUnits1	      "Clock cycles"
      ePWMxASource	      "Input port"
      ePWMxAValue	      "18500"
      ePWMxAactionLogic1      "Do nothing"
      ePWMxAactionLogic2      "Clear"
      ePWMxAactionLogic3      "Set"
      ePWMxAactionLogic4      "Do nothing"
      ePWMxAactionLogic5      "Do nothing"
      ePWMxAactionLogic6      "Do nothing"
      ePWMxALoadMode	      "Load on CTR=PRD"
      ePWMxACSFenable	      off
      ePWMxACSFvalue	      "Forcing Disable"
      ePWMxASFreload	      "Zero"
      ePWMxBStatus	      off
      enableDBePWMxB	      off
      dutyCycleUnits2	      "Percentages"
      ePWMxBSource	      "Specify via dialog"
      ePWMxBValue	      "50"
      ePWMxBactionLogic1      "Do nothing"
      ePWMxBactionLogic2      "Set"
      ePWMxBactionLogic3      "Do nothing"
      ePWMxBactionLogic4      "Do nothing"
      ePWMxBactionLogic5      "Clear"
      ePWMxBactionLogic6      "Do nothing"
      ePWMxBLoadMode	      "Load on CTR=Zero"
      ePWMxBCSFenable	      off
      ePWMxBCSFvalue	      "Forcing Disable"
      ePWMxBSFreload	      "Zero"
      DBpolarity	      "AH"
      DBedgeDelay	      "Positive"
      DBperiodSource	      "Specify via dialog"
      REDperiod		      "0"
      FEDperiod		      "0"
      adcstartModuleA	      off
      adcrequestEventA	      "First event"
      adcstartEventA	      "CTR=Zero"
      adcstartModuleB	      off
      adcrequestEventB	      "First event"
      adcstartEventB	      "CTR=Zero"
      chopperEnable	      off
      chopperFrequency	      "1"
      chopperFirstwidth	      "1"
      chopperDuty	      "12.5%"
      tripZoneoption	      "OSHT&CBC"
      tripZonesource	      "Specify via dialog"
      tzselOSHT1	      off
      tzselOSHT2	      off
      tzselOSHT3	      off
      tzselOSHT4	      off
      tzselOSHT5	      off
      tzselOSHT6	      off
      tzselCBC1		      off
      tzselCBC2		      off
      tzselCBC3		      off
      tzselCBC4		      off
      tzselCBC5		      off
      tzselCBC6		      off
      ePWMxAforced	      "No action"
      ePWMxBforced	      "No action"
    }
    Line {
      SrcBlock		      "ADC"
      SrcPort		      1
      DstBlock		      "Gain1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem "
      SrcPort		      1
      Points		      [0, 0; 60, 0]
      Branch {
	Points			[0, 35]
	DstBlock		"Pulse Width\nControl"
	DstPort			1
      }
      Branch {
	DstBlock		"Subsystem"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Gain1"
      SrcPort		      1
      DstBlock		      "ePWM"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem"
      SrcPort		      1
      DstBlock		      "Duty Cycle\n(%)"
      DstPort		      1
    }
    Annotation {
      Name		      "ADC Control of PWM Duty Cycle"
      Position		      [334, 34]
      UseDisplayTextAsClickCallback off
      FontName		      "Arial Narrow"
      FontSize		      22
      FontWeight	      "bold"
    }
  }
}
MatData {
  NumRecords		  2
  DataRecord {
    Tag			    DataTag1
    Data		    "  %)30     .    .,X   8    (     @         %    "
"\"     $    !     0         %  0 $0    $   #_    8VAI<$EN9F\\           !M96T"
"                  &-A8VAE                8V-S0F]A<F1.86UE      !C8W-0<F]C3F%M"
"90       &)O87)D5'EP90          :7-3:6UU;&%T;W(       !E;F%B;&5(4U)41%@      "
"'9E<G-I;VY.=6UB97(     9'-P8FEO<P            !L87-T17)R             &-U<W1O;4"
"-O9&4         96YA8FQE1%-00DE/4U1A8@!25$]3                 '!E<FEP:&5R86QS   "
"       X   # 6   !@    @    \"          4    (     0    $    !          4 !  "
"1     0   (<!  !D979I8V5)1            &-O9&5G96YH;V]K<&]I;G0 ;&EB7VQE        "
"      !L:6)?8F4              &EN8P                  <W)C                  !C;"
"W!Y<W)C             '!R97!R;V,             ;&EN:V5R;W!T:6]N<P    !C;VUP:6QE<F"
"]P=&EO;G,  &UV4W=I=&-H            <W5B1F%M:6QY          !C<'5#;&]C:U)A=&5-2'H"
"  &EN=$UE;0              ;G5M4V5C=&EO;G,       !S96-T:6]N             &%L;&YA"
";65S            ;G5M4E1/4P            !25$]3                 '-C:&5D=6QE<@   "
"       :7-\"=6EL=$EN          !D97-C<FEP=&EO;@       &-O;G1E;G1S             "
" X    X    !@    @    $          4    (     0    4    !         !     %    1C"
"(X,#@    .    .     8    (    !          %    \"     $    %     0         0  "
"  !0   $,R,# P    #@    @\"   &    \"     $         !0    @    !    !     $  "
"       #@   &     &    \"     0         !0    @    !    +P    $         $    "
"\"\\    D*$EN<W1A;&Q?9&ER*5QC,C P,%QC9W1O;VQS7&QI8EQR=',R.# P7VUL+FQI8@ .    "
">     8    (    !          %    \"     $   !!     0         0    00   \"0H34%"
"43$%\"7U)/3U0I7'1O;VQB;WA<<G1W7'1A<F=E='-<8V-S;&EN:UQR=&QI8EQD<W!?<G1?8S(X,# "
"N;&EB          X   !X    !@    @    $          4    (     0   $$    !        "
" !    !!    )\"A-051,04)?4D]/5\"E<=&]O;&)O>%QR='=<=&%R9V5T<UQC8W-L:6YK7')T;&E"
"B7')T=U]R=%]C,C@P,\"YL:6(         #@   '     &    \"     0         !0    @   "
" !    .P    $         $    #L    D*$U!5$Q!0E]23T]4*5QT;V]L8F]X7')T=UQT87)G971"
"S7&-C<VQI;FM<<G1L:6)<25%M871H+FQI8@      #@   \"@    &    \"     $         !0"
"    @               $         #@   )@    &    \"     $         !0    @    !  "
"   0    $         #@   &@    &    \"     0         !0    @    !    -@    $   "
"      $    #8    D*$U!5$Q!0E]23T]4*5QT;V]L8F]X7')T=UQT87)G971S7&-C<VQI;FM<8V-"
"S;&EN:UQI;F,   X   !@!0  !@    @    !          4    (     0    H    !        "
"  X   !X    !@    @    $          4    (     0   $@    !         !    !(    )"
"\"A-051,04)?4D]/5\"E<=&]O;&)O>%QR='=<=&%R9V5T<UQC8W-L:6YK7&-C<VQI;FM<<W)C7$13"
"4#(X,'A?365M0V]P>2YC#@   (     &    \"     0         !0    @    !    2@    $ "
"        $    $H    D*$U!5$Q!0E]23T]4*5QT;V]L8F]X7')T=UQT87)G971S7&-C<VQI;FM<8"
"V-S;&EN:UQS<F-<1%-0,C@P>%]#<'54:6UE<G,N8P        X   \"     !@    @    $     "
"     4    (     0   $L    !         !    !+    )\"A-051,04)?4D]/5\"E<=&]O;&)O"
">%QR='=<=&%R9V5T<UQC8W-L:6YK7&-C<VQI;FM<<W)C7$134#(X,'A?1&5F875L=$ES<BYC     "

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -