<root>
<document scada='0' schema='103' license='10,CompMaker,WNV3JN' title='' description='' fcversion='655618' target='PIC.16F.BL0011' >
	<config data='!0,3f8c!10,37fd!20,3f92!30,1fff!40,3fff%0,4%4,0%8,1' clkspd='32000000' simspd='1' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<traces />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='6' />
			<data name='CalculatedCommsDelay' value='6' />
			<data name='AnalogEB2PrescaleValue' value='2' />
			<data name='DigitalEB2SampleRate' value='100000' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='fc799b74-c5fa-40fd-b4b7-40ec95f35388' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='' />
		<component class_type='root' codename='panel' panelId='-1' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' comp2dType='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Duty' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='FreqControl' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='FreqControl_Old' type='f32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='DSP_Command' description='Keep things inside the interrupt as short as possible.
Just call the DSP icons in order.

Generate Wave Sample -&gt;Banpaas filter -&gt; Output -&gt; PWM' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='DSPFreqGen1' macro='Generate' />
						<command class_type='call' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='DSP_Filter1' macro='Filter' />
						<command class_type='call' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='DSP_Output1' macro='GetInt' >
							<return exp='Duty' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='SetDutyCycle10Bit' >
							<argument exp='Duty' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='Enable' />
						<command class_type='interrupt' title='Interrupt' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' enable='1' name='TMR4' call='DSP_Command' >
							<settings timer='1' prescale='64' postscale='5' rollover='5' bitcount='-1' trigger='3' ppsport='-1' ppspin='-1' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='6' />
								<option value='4' />
								<option value='5' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Read the ADC as a Floating Point Value' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='Potentiometer1' macro='GetVoltage' >
									<return exp='FreqControl' />
								</command>
								<command class_type='decision' title='Only update the frequency step if the control changes' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='FreqControl != FreqControl_Old' swap='0' >
									<flowline >
										<command class_type='call' title='Adjust the wave frequency' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='DSPFreqGen1' macro='ModifyFrequency' >
											<argument exp='FreqControl' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='FreqControl_Old = FreqControl' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='50' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='cbe42abc-5955-44da-a6d0-03e7cbcdcaca' vmin='2' vmaj='1' codename='DSPFreqGen1' panelId='0' x='228.287' y='-138.098' z='0' xsz='25' ysz='25' zsz='5.965' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='BuffSize' data='1' />
					<value target='BuffType' data='000' />
					<value target='wave_type' data='000' />
					<value target='wave_amplitude' data='240' />
					<value target='wave_offset' data='128' />
					<value target='CalculateData' data='0' />
					<value target='wave_period' data='100' />
					<value target='wave_duty' data='000' />
					<value target='wave_phase' data='000' />
					<value target='wave_data' data='128,135,143,150,157,165,172,179,185,192,198,204,210,215,220,225,229,233,236,239,242,244,245,247,247,248,247,247,245,244,242,239,236,233,229,225,220,215,210,204,198,192,185,179,172,165,157,150,143,135,128,121,113,106,99,91,84,77,71,64,58,52,46,41,36,31,27,23,20,17,14,12,11,9,9,8,9,9,11,12,14,17,20,23,27,31,36,41,46,52,58,64,71,77,84,91,99,106,113,121' />
					<value target='PeriodOffset' data='1.000000' />
					<value target='SamplePeriod' data='3.600000' />
					<value target='sample_rate' data='100.000000' />
					<value target='calc_period' data='1.000000' />
					<value target='calc_freq' data='1.000000' />
					<value target='min_a' data='0' />
					<value target='max_a' data='255' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
				<connection0 >
					<conncomp source='panel.DSPFreqGen1.Buff1.Connection1' target='' />
				</connection0>
			</component>
			<component class_type='ref' guid='317efb6a-2bad-4f83-a0bc-4ada0f4cd51e' vmin='3' vmaj='1' codename='DSP_Filter1' panelId='0' x='348.32' y='-138.098' z='1' xsz='25' ysz='25' zsz='5.965' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Ref1::LinkTo' data='001' />
					<value target='BuffSizeIn' data='1' />
					<value target='BuffTypeIn' data='000' />
					<value target='BuffSize' data='1' />
					<value target='BuffType' data='000' />
					<value target='Direction' data='000' />
					<value target='type' data='002' />
					<value target='VariableCoefficients' data='0' />
					<value target='coef0' data='8' />
					<value target='coef1' data='6' />
					<value target='cutoff_shift1' data='3' />
					<value target='cutoff_shift2' data='0' />
					<value target='LUTA::floatfixed' data='1.0,1.0' />
					<value target='LUTA::NumVals' data='2' />
					<value target='LUTB::floatfixed' data='1.0' />
					<value target='LUTB::NumVals' data='1' />
					<value target='order' data='000' />
					<value target='co0' data='1.000000' />
					<value target='co1' data='1.000000' />
					<value target='co2' data='1.000000' />
					<value target='co3' data='1.000000' />
					<value target='co4' data='1.000000' />
					<value target='co5' data='1.000000' />
					<value target='co6' data='1.000000' />
					<value target='co7' data='1.000000' />
					<value target='co8' data='1.000000' />
					<value target='co9' data='1.000000' />
					<value target='co10' data='1.000000' />
					<value target='co11' data='1.000000' />
					<value target='cob0' data='1.000000' />
					<value target='cob1' data='1.000000' />
					<value target='sample_rate' data='10000.000000' />
					<value target='nyquist' data='5000.000000' />
					<value target='cut_off_0' data='625.000000' />
					<value target='cut_off_1' data='833.333313' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
				<connection0 >
					<conncomp source='panel.DSP_Filter1.Ref1.Connection1' target='' >
						<connections size='4' >
							<anchor_0 obj_id='2' con_id='33' x='297' y='138' />
							<anchor_1 obj_id='-1' con_id='0' x='291' y='138' />
							<anchor_2 obj_id='-1' con_id='0' x='278' y='129' />
							<anchor_3 obj_id='1' con_id='32' x='271' y='129' />
						</connections>
					</conncomp>
				</connection0>
				<connection1 >
					<conncomp source='panel.DSP_Filter1.Buff1.Connection1' target='' />
				</connection1>
			</component>
			<component class_type='ref' guid='11ca2f38-de81-4812-9338-4b5a7a89a658' vmin='0' vmaj='1' codename='Potentiometer1' panelId='0' x='94.493' y='-138.098' z='2' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='adc_base1::channel' data='0' />
					<value target='adc_base1::vrefvol' data='500' />
					<value target='adc_base1::vrefop' data='000' />
					<value target='adc_base1::convspd' data='049' />
					<value target='adc_base1::actime' data='40' />
					<value target='adc_base1::bits' data='10' />
					<value target='VrefForCalculations' data='' />
					<value target='BitDepth' data='10' />
					<value target='SetValue' data='0.574074' />
					<value target='RetainValue' data='0' />
					<value target='ModifiedConnection' data='An 0' />
					<value target='ComponentLabel' data='000' />
					<value target='LabelColour' data='0' />
					<value target='GdiText2::sText' data='Potentiometer1' />
					<value target='ConnectionLabels' data='1' />
					<value target='ShowPinValue' data='1' />
					<value target='Style' data='0' />
					<value target='Gauge1::brFill' data='288230376147764163' />
					<value target='Gauge1::colFrameOutline' data='9868950' />
					<value target='Gauge1::brFrameFill' data='261490253360251843' />
					<value target='Gauge1::colPointerOutline' data='9868950' />
					<value target='Gauge1::brPointerFill' data='261490253360251843' />
					<value target='Gauge1::colText' data='0' />
					<value target='Gauge1::colTickMarkOutline' data='0' />
					<value target='Gauge1::brTickMarkFill' data='12829635' />
					<value target='Gauge1::colCapOutline' data='12829635' />
					<value target='Gauge1::brCapFill' data='261490253360251843' />
					<value target='Gauge1::sMainImage' data='' />
					<value target='Gauge1::sCapImage' data='' />
					<value target='GdiGauge1::nPointerKnob' data='  2' />
					<value target='GdiSwitch1::nType' data='  2' />
					<value target='UpperBoundValue' data='5.000050' />
					<value target='adc_base1::ScopeTraces' data='0' />
					<value target='StoredColourStyle' data='0' />
					<value target='FlowcodeType' data='0' />
					<value target='Enabled' data='1' />
					<value target='Product' data='PIC' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='1392d5c3-35ba-4c7f-a539-7f30a09758e4' vmin='2' vmaj='1' codename='DSP_Output1' panelId='0' x='459' y='-138.098' z='3' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Ref1::LinkTo' data='002' />
					<value target='AutoScale' data='0' />
					<value target='BuffSizeIn' data='1' />
					<value target='BuffTypeIn' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
				<connection0 >
					<conncomp source='panel.DSP_Output1.Ref1.Connection1' target='' >
						<connections size='4' >
							<anchor_0 obj_id='4' con_id='32' x='415' y='129' />
							<anchor_1 obj_id='-1' con_id='0' x='411' y='129' />
							<anchor_2 obj_id='-1' con_id='0' x='403' y='138' />
							<anchor_3 obj_id='2' con_id='32' x='399' y='138' />
						</connections>
					</conncomp>
				</connection0>
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='0' vmaj='12' codename='PWM1' panelId='0' x='474' y='-295' z='4' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTB.0' />
					<value target='RemapPin' data='000' />
					<value target='timer' data='002' />
					<value target='period' data='255' />
					<value target='prescale' data='0' />
					<value target='period_calc' data='32.000000' />
					<value target='frequency_calc2' data='31250.000000' />
					<value target='frequency_calc' data='31.250000' />
					<value target='pwm_prescale' data='1' />
					<value target='ReqFreq' data='100.000000' />
					<value target='OldReqFreq' data='100.000000' />
					<value target='CalcFreq' data='100.004570' />
					<value target='CalcPeriod' data='10936' />
					<value target='CalcScaler' data='64' />
					<value target='Apply' data='0' />
					<value target='ClockSpeed' data='32000000' />
					<value target='SimRep' data='001' />
					<value target='Family' data='PIC' />
					<value target='ModifiedConnection' data='B.0' />
					<value target='IsESP' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='0' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='-222.376' ye='-80.2777' ze='502.074' xt='-222.376' yt='-80.2777' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='303' dy='396' zoom='73.0231' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
		<winpos ID='7005' RectRecentFloat='2950,522,3600,972' RectRecentDocked='0,0,303,419' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel2d>
	<panel3d shadows='0' lighting='0' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='-20' ye='4' ze='220.437' xt='-20' yt='4' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
		<winpos ID='7004' RectRecentFloat='0,425,654,1002' RectRecentDocked='0,0,210,836' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='NewPanel' >
			<winpos ID='1171' RectRecentFloat='1432,537,2082,987' RectRecentDocked='696,141,999,977' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
			<background fill='72057594033782976' showgrid='0' gridstyle='1' gridsize='10' gridbrush='71776119075691740' snaptogrid='1' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAWgIAAD8DAAA' zoom='95' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DSP_Command' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAWgIAAD8DAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
