<root>
<document scada='0' schema='102' license='10,Bubthenib,RMFW7Y' title='' description='' fcversion='590336' target='PIC.18F.18F45K22' >
	<config data='!0,f200!10,ffff!20,ff00!30,ff!40,ffff!50,ffff!60,ffff%8,2%c,1%d,1%e,1%f,1%10,1%11,3%13,3%18,3%1a,f%28,1%29,1%2a,1%2b,1%2c,1%2d,1%2f,1%30,1%32,1%36,1%37,1%40,1%41,1%42,1%43,1%4e,1%4f,1%50,1%51,1%52,1%53,1%5d,1%5e,1%5f,1%60,1%61,1%62,1%63,1%6e,1' clkspd='19660800' 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='9' />
			<data name='CalculatedCommsDelay' value='9' />
			<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='' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<gdiopts FullContainer='1' FullTransparency='1' ShowGdi='1' ShowOpengl='1' />
		<component class_type='root' codename='panel' 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 >
				<property name='Sim Model' target='SimModel' typeid='16' hidden='0' locked='0' info='' filter='0002nd Order
0013rd Order' />
				<property name='Second Order Coefficient' target='SndOrd' typeid='15' hidden='0' locked='0' info='' />
				<property name='Third Order Coefficient' target='TrdOrd' typeid='15' hidden='0' locked='0' info='' />
			</properties>
			<values >
				<value target='SimModel' data='001' />
				<value target='SndOrd' data='0.200000' />
				<value target='TrdOrd' data='0.400000' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Count' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Change' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Test' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='end' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ProcessPID' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</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='GetFeedbackt' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='3' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='temp' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='3' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RawData' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TemperatureString' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='20' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Control' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SecOrdSimVar' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='setup' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TrdOrdSimVar' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='trigger' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Setpoint' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Feedback' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</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='Displaysetup' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Clear' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;Set Temp    C&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Cursor' >
							<argument exp='10' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='PrintString' >
							<argument exp='temp' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ProcessPID' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='GetRawTemp' >
							<return exp='RawData' />
						</command>
						<command class_type='calculation' title='Convert raw value to temperature C' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='Feedback = RawData * 0.25' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Read the stored set point value ' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='eeprom1' macro='Read' >
							<return exp='Setpoint' />
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='I think i have changed this corectly' textarea='489,41,489,41' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Assign Feedback' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='DSPInputFB' macro='AddByte' >
							<argument exp='Feedback' />
						</command>
						<command class_type='call' title='Assign Setpoint' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='DSPInputFB' macro='AddByte' >
							<argument exp='Setpoint' />
						</command>
						<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='DSPControl1' macro='Process' />
						<command class_type='call' title='Read from DSP output buffer' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='DSPOutput1' macro='GetByte' >
							<return exp='Control' />
						</command>
						<command class_type='call' title='Assign to PWM duty' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='PWM1' macro='SetDutyCycle' >
							<argument exp='Control' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetControlValue' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='end = 0' />
							<exp exp='temp = ToString$ (Setpoint)' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='end &lt; 1' >
							<flowline >
								<command class_type='comment' title='' comment='Need to read int0 RA11 (pin 17)' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
								<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='1' exp='setup' usechipref='1' />
								<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='setup = 1' swap='0' >
									<flowline >
										<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='3' type='2' />
										<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='1' exp='setup' usechipref='1' />
										<command class_type='comment' title='' comment='Need to read int0 RA11 (pin 17)' textarea='182,60,182,60' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
										<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='setup = 1' swap='0' >
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Displaysetup' />
												<command class_type='loop' title='debounce' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='setup = 1' >
													<flowline >
														<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='1' exp='setup' usechipref='1' />
													</flowline>
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
													<exp exp='Change = 0' />
													<exp exp='end = 0' />
												</command>
												<command class_type='loop' title='Loop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='end = 0' >
													<flowline >
														<command class_type='comment' title='' comment='Need to read pin RC14 (pin 16)' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
														<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048579' mask='2' exp='Change' usechipref='1' />
														<command class_type='decision' title='increase set point' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Change = 1' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' disable='1' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
																	<exp exp='Setpoint = Setpoint + 1' />
																	<exp exp='temp = ToString$ (Setpoint)' />
																</command>
																<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
																	<exp exp='Test = Test + .1' />
																	<exp exp='temp = FloatToString$ (Test)' />
																</command>
																<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Displaysetup' />
																<command class_type='loop' title='debounce' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='Change = 1' >
																	<flowline >
																		<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048579' mask='2' exp='Change' usechipref='1' />
																	</flowline>
																</command>
															</flowline>
															<flowline />
														</command>
														<command class_type='comment' title='' comment='Need to read pin RC13 (pin 15)' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
														<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='16' exp='Change' usechipref='1' />
														<command class_type='decision' title='decrease set point' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Change = 1' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
																	<exp exp='Test = Test - .1' />
																	<exp exp='temp = FloatToString$ (Test)' />
																</command>
																<command class_type='calculation' title='Calculation' disable='1' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
																	<exp exp='Setpoint = Setpoint - 1' />
																	<exp exp='temp = ToString$ (Setpoint)' />
																</command>
																<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Displaysetup' />
																<command class_type='loop' title='debounce' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='Change = 1' >
																	<flowline >
																		<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='16' exp='Change' usechipref='1' />
																	</flowline>
																</command>
															</flowline>
															<flowline />
														</command>
														<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='135266304' mask='8' exp='setup' usechipref='1' />
														<command class_type='decision' title='exit' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='setup = 1' swap='0' >
															<flowline >
																<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
																	<exp exp='end = 1' />
																</command>
															</flowline>
															<flowline />
														</command>
													</flowline>
												</command>
												<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='eeprom1' macro='Write' >
													<argument exp='0' />
													<argument exp='Setpoint' />
												</command>
												<command class_type='loop' title='debounce' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='setup = 1' >
													<flowline >
														<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='1' exp='setup' usechipref='1' />
													</flowline>
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
													<exp exp='end = 1' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetRawTemp' description='' statediag='0' >
						<return name='Return' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='MSB' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='LSB' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='SPI_Master1ReadTemp' macro='GetChar' >
							<return exp='.MSB' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='SPI_Master1ReadTemp' macro='GetChar' >
							<return exp='.LSB' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = .LSB &gt;&gt; 3' />
							<exp exp='.Return = .Return | .MSB &lt;&lt; 5' />
						</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='Enable PWM Output' textarea='36,0,511,300' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='PWM1' macro='Enable' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='SPI_Master1ReadTemp' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='eeprom1' macro='Read' >
							<return exp='Setpoint' />
							<argument exp='0' />
						</command>
						<command class_type='label' title='Connection Point' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' labelid='0' labelname='A' />
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Setpoint &lt; 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Setpoint = 78' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='eeprom1' macro='Write' >
									<argument exp='0' />
									<argument exp='Setpoint' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='interrupt' title='Interrupt' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' enable='1' name='INT0' call='SetControlValue' >
							<settings timer='0' prescale='-1' postscale='-1' rollover='-1' bitcount='-1' trigger='1' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Clear' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='PrintString' >
							<argument exp='&quot;Ref Temp     C&quot;' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='TemperatureString = ToString$ (Setpoint)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Cursor' >
							<argument exp='10' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='PrintString' >
							<argument exp='TemperatureString' />
						</command>
						<command class_type='loop' title='Loop' textarea='36,0,511,300' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ProcessPID' />
								<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Count = 50' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Cursor' >
											<argument exp='0' />
											<argument exp='1' />
										</command>
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='PrintString' >
											<argument exp='&quot;Real Temp      C&quot;' />
										</command>
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='Cursor' >
											<argument exp='1' />
											<argument exp='11' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
											<exp exp='TemperatureString = FloatToString$ (Feedback)' />
											<exp exp='TemperatureString = Left$ (TemperatureString,5)' />
										</command>
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='lcd_eb005' macro='PrintString' >
											<argument exp='TemperatureString' />
										</command>
										<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
											<exp exp='Count = 0' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='end = 1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
													<exp exp='end = 0' />
												</command>
												<command class_type='goto' title='Goto Connection Point' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' labelid='0' labelname='' />
											</flowline>
											<flowline />
										</command>
									</flowline>
								</command>
								<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='10' type='1' />
								<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='135266304' mask='8' exp='setup' usechipref='1' />
								<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='setup = 1' swap='0' >
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='SetControlValue' />
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Count = Count + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='e6dd1315-4acf-4fb5-abd9-5743d3715cbe' vmin='2' vmaj='1' codename='DSPControl1' x='-121.874' y='-63.4782' z='308.961' xsz='52' ysz='32' zsz='1.14286' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='ConnectTo2' data='DSPInput2' />
					<value target='ConnectTo' data='DSPInput1' />
					<value target='BuffSizeIn' data='1' />
					<value target='BuffTypeIn' data='000' />
					<value target='BuffSize' data='1' />
					<value target='BuffType' data='000' />
					<value target='method' data='003' />
					<value target='proportional' data='4.500000' />
					<value target='integral' data='2.500000' />
					<value target='derivative' data='0.400000' />
					<value target='InvertError' data='0' />
					<value target='SampleTime' data='0.001000' />
					<value target='IntegralClamping' data='1' />
					<value target='ClampMax' data='255' />
					<value target='ClampMin' data='0' />
					<value target='MonitorSetpoint' data='1' />
					<value target='DerFiltering' data='1' />
					<value target='FilterCoefficient' data='10' />
					<value target='BuffSizeIn2' data='1' />
					<value target='BuffTypeIn2' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='1392d5c3-35ba-4c7f-a539-7f30a09758e4' vmin='2' vmaj='1' codename='DSPOutput1' x='-59.6108' y='-62.6386' z='308.961' xsz='43.5' ysz='32' zsz='1.14286' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='ConnectTo' data='DSPControl1' />
					<value target='BuffSizeIn' data='1' />
					<value target='BuffTypeIn' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='1' vmaj='2' codename='PWM1' x='-4.51127' y='-66.3376' z='309.318' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='1' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTC.2' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='0' />
					<value target='period_calc' data='52.083332' />
					<value target='frequency_calc2' data='19200.000000' />
					<value target='frequency_calc' data='19.200001' />
					<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='SimRep' data='001' />
					<value target='Family' data='PIC' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73d493a-b6a0-4dbe-b4b5-79648f67d11e' vmin='2' vmaj='1' codename='DSPInputFB' x='-188.568' y='-74.4645' z='310.861' xsz='43.5' ysz='32' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='BuffSize' data='1' />
					<value target='BuffType' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='96862c4d-debc-45fa-9433-74711a4b9a3b' vmin='1' vmaj='2' codename='SPI_Master1ReadTemp' x='-240' y='-120' z='0' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_spi::CHANNEL' data='001' />
					<value target='cal_spi::MOSI' data='$PORTC.5' />
					<value target='cal_spi::MOSIPins' data='008' />
					<value target='cal_spi::MISO' data='$PORTC.4' />
					<value target='cal_spi::MISOPins' data='013' />
					<value target='cal_spi::CLK' data='$PORTC.3' />
					<value target='cal_spi::CLKPins' data='004' />
					<value target='cal_spi::UseAutoCS' data='1' />
					<value target='cal_spi::SS' data='$PORTC.2' />
					<value target='cal_spi::PR_SCALE' data='016' />
					<value target='cal_spi::CKE' data='000' />
					<value target='cal_spi::CKP' data='000' />
					<value target='cal_spi::SMP' data='000' />
					<value target='label' data='SPI Read Temp' />
					<value target='cal_spi::ScopeTraces' data='1' />
					<value target='cal_spi::ConsoleData' data='1' />
					<value target='cal_spi::Injector' data='000' />
					<value target='cal_spi::InjectorCS' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='1' vmaj='1' codename='sw_push_rnd_pnl1' x='-127.079' y='-122.873' z='307.879' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTA.11' />
					<value target='polarity' data='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='1' vmaj='1' codename='sw_push_rnd_pnl2' x='-93.2546' y='-122.873' z='307.879' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.14' />
					<value target='polarity' data='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5c1da48f-ce54-4622-bdd9-fc812e373696' vmin='1' vmaj='1' codename='sw_push_rnd_pnl3' x='-54.695' y='-121.82' z='307.879' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTC.13' />
					<value target='polarity' data='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d29dda88-17de-4008-991a-c881890d4c57' vmin='1' vmaj='1' codename='lcd_eb005' x='-126.01' y='-3.37325' z='307.879' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Pin_Data_0' data='$PORTA.0' />
					<value target='Pin_Data_1' data='$PORTA.1' />
					<value target='Pin_Data_2' data='$PORTA.2' />
					<value target='Pin_Data_3' data='$PORTA.3' />
					<value target='Pin_RS' data='$PORTE.0' />
					<value target='Pin_E' data='$PORTA.5' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='dcbf571f-a6fa-402d-bdd4-be00cca4070f' vmin='1' vmaj='1' codename='eeprom1' x='-58.1005' y='-8.11366' z='307.879' xsz='20' ysz='20' zsz='20' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='EESize' data='256 byte' />
					<value target='EEbitdepth' data='8 bit' />
					<value target='InitialValues' data='0,1,0x2,0x03,&apos;A&apos;,&apos;b&apos;,&quot;Hello&quot;' />
					<value target='InitValsParsed' data='0,1,0x2,0x03,&apos;A&apos;,&apos;b&apos;,&apos;H&apos;,&apos;e&apos;,&apos;l&apos;,&apos;l&apos;,&apos;o&apos;' />
					<value target='ResetValues' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='3e5cc6d0-3e36-46b8-bc40-f238a5735b6e' vmin='0' vmaj='1' codename='IntOscHelper1' x='-233.426' y='5.5744' z='307.879' xsz='2.5' ysz='2.5' zsz='2.5' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='OscSpeed' data='4' />
					<value target='OscFreq' data='1000000' />
					<value target='ClockSpeed' data='19660800' />
					<value target='Info' data='Warning: Clock Speed In Project Options Does Not Match Internal Oscillator Speed' />
					<value target='Code' data='OSCCON = 0x30;' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73d493a-b6a0-4dbe-b4b5-79648f67d11e' vmin='2' vmaj='1' codename='DSPInputSP' x='-188.568' y='-41.4645' z='315.464' xsz='43.5' ysz='32' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='BuffSize' data='1' />
					<value target='BuffType' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='-111.969' ye='-68.5905' ze='459.706' xt='-111.969' yt='-68.5905' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='693' dy='327' zoom='182.406' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='-37.7485' ye='-21.241' ze='428.105' xt='-37.7485' yt='-21.241' zt='-1.98255e-18' 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' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAegQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetControlValue' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAegQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Displaysetup' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAegQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GetRawTemp' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAegQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ProcessPID' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAegQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
