<root>
<document scada='0' schema='102' license='1,talig,Q3VNV1' title='' description='' fcversion='524801' target='PIC16.33E.33EP512MU810' >
	<config data='!0,ffcf!10,fff8!20,ff7d!30,ff7a!40,ffef!50,ffdf!60,ffcf%0,1%1,1%4,0%10,0%17,1%20,1%22,1%25,1%26,1%30,a%34,1%35,1%36,1%37,0%40,7%43,1%44,0%45,1%50,3%52,1%55,0%60,1%61,1%64,0' clkspd='120000000' 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='1' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='2' />
			<data name='CalculatedCommsDelay' value='2' />
			<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='62f86a42-bfde-4604-b7cf-99270186a685' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<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' >
			<resources />
			<properties >
				<property name='Columns' target='lcd_generic1::LCD::Columns' typeid='16' hidden='0' locked='0' info='Number of characters the LCD can display on a single line.' filter='000
01616
01818
02020
02828
04040' />
			</properties>
			<values >
				<value target='lcd_generic1::LCD::Columns' data='020' />
			</values>
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='R_RTD' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='EEPROM_RTD1_R_Ref' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='z4' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_DATA_H' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Ratio_STR' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='5' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='z3' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SAMA' type='f32' description='' isconst='1' isinit='1' usrinit='0.003922999836504459381103515625' setinit='0.003923' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='z2' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_R_Ref' type='f32' description='' isconst='1' isinit='1' usrinit='399.79998779296875' setinit='399.80' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Sample_No' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='z1' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD_R_Ref_CAL' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_FAULT_Register' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='iCVD_B' type='f32' description='' isconst='1' isinit='1' usrinit='-0.0000005774999749519338365644216537475586' setinit='-0.0000005775' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_DATA' type='u16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='CVD' type='f32' description='' isconst='1' isinit='1' usrinit='0.003908299840986728668212890625' setinit='0.0039083' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SAMPLE' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Pure_Platinum' type='f32' description='' isconst='1' isinit='1' usrinit='0.0039260000921785831451416015625' setinit='0.003926' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T_CVD' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_SAMPLE' type='u32' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='CALIBRATION_Alpha' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Ratio' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='EEPROM_RTD1_Nominal' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD_Nominal_CAL' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Convert' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Temperature' type='T8' description='' isconst='0' isinit='1' usrinit='&quot;    &quot;' setinit='&quot;    &quot;' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Nominal' type='f32' description='' isconst='1' isinit='1' usrinit='100.0' setinit='100.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Alpha' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ERROR1' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='T_CVD1' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='IEC751' type='f32' description='' isconst='1' isinit='1' usrinit='0.0038505499251186847686767578125' setinit='0.00385055' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_Temperature100' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='5' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RTD1_DATA_L' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='LCD_Update' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
							<argument exp='&quot;Temp:&quot;' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='ERROR1 = 128' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
									<argument exp='&quot;ERROR&quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintNumber' >
									<argument exp='RTD1_FAULT_Register' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
									<argument exp='&quot; &quot;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='T_CVD1 &gt;= 100.0' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
											<argument exp='RTD1_Temperature100' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
											<argument exp='RTD1_Temperature' />
										</command>
									</flowline>
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintAscii' >
									<argument exp='223' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
									<argument exp='&quot;C&quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='PrintString' >
									<argument exp='&quot;  &quot;' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Devise_INIT' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='true' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='LCD_1' macro='Start' />
						<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='200' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='RTD_Temp_Conversion' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='RTD_R_Ref_CAL = RTD1_R_Ref + EEPROM_RTD1_R_Ref' />
							<exp exp='RTD_Nominal_CAL = RTD1_Nominal + EEPROM_RTD1_Nominal' />
							<exp exp='R_RTD = (RTD1_Ratio * RTD_R_Ref_CAL) / 32768' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Callendar_Van_Dusen' />
						<command class_type='calculation' title='Temperature_To_String_For_LCD' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='T_CVD1 = T_CVD' />
							<exp exp='RTD1_Temperature = FloatToString$ (T_CVD1)' />
							<exp exp='RTD1_Temperature100 = FloatToString$ (T_CVD1)' />
							<exp exp='' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Clock_INIT' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='native' title='Clock Configuration' textarea='36,-16,36,-16' ccode='// Select Internal FRC at POR
//_FOSCSEL(FNOSC_FRC &amp; IESO_OFF);
// Enable Clock Switching and Configure POSC in XT mode
//_FOSC(FCKSM_CSECMD &amp; OSCIOFNC_OFF &amp; POSCMD_XT);



//Setup configuration for 60MIPs (120Mhz) using 8MHz Crystal
PLLFBD = 60;			// M=60
CLKDIVbits.PLLPOST = 0;		// N1=2
CLKDIVbits.PLLPRE = 0;		// N2=2
OSCTUN = 0;			//Tune FRC oscillator, if FRC is used

//Disable Watch Dog Timer
RCONbits.SWDTEN = 0;

// Clock switching to incorporate PLL
__builtin_write_OSCCONH(0x03);	// Initiate Clock Switch to Primary

// Oscillator with PLL (NOSC=0b011)
__builtin_write_OSCCONL(0x03);	// Start clock switching, start SOSC (LPOSCEN=1)
while(OSCCONbits.COSC != 0b011);
//OSCCONbits.LPOSCEN = 1;

// Wait for Clock switch to occur	
while(OSCCONbits.LOCK != 1);


//USB H/W initialization for 70 MIPs
ACLKCON3 = 0x24C1;
ACLKDIV3 = 0x7;

// Wait for PLL to lock
ACLKCON3bits.ENAPLL = 1;
while(ACLKCON3bits.APLLCK != 1);' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
					</flowline>
				</macro>
				<macro >
					<flowline name='RTD_SENSOR_SETUP' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='CS1_LOW' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='false' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='SendChar' >
							<argument exp='0x80' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='SendChar' >
							<argument exp='0xd1' />
						</command>
						<command class_type='output' title='CS1_HIGH' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='true' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SAMPLE_Tick' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='SAMPLE = true' />
							<exp exp='' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Var_INIT' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='ERROR1 = false' />
							<exp exp='RTD1_DATA_H = false' />
							<exp exp='RTD1_DATA_L = false' />
							<exp exp='CALIBRATION_Alpha = 1' />
							<exp exp='RTD1_SAMPLE = 0' />
							<exp exp='RTD1_Sample_No = 0' />
							<exp exp='' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Callendar_Van_Dusen' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='switch' title='Switch' textarea='36,25,36,25' cmdcolor='12615680' cmdcolor_sec='15376912' exp='CALIBRATION_Alpha' >
							<case >
								<flowline >
									<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
										<exp exp='Alpha = CVD' />
									</command>
								</flowline>
							</case>
							<case exp='1' >
								<flowline >
									<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
										<exp exp='Alpha = IEC751' />
									</command>
								</flowline>
							</case>
							<case exp='2' >
								<flowline >
									<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
										<exp exp='Alpha = Pure_Platinum' />
									</command>
								</flowline>
							</case>
							<case exp='3' >
								<flowline >
									<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
										<exp exp='Alpha = SAMA' />
									</command>
								</flowline>
							</case>
						</command>
						<command class_type='calculation' title='Callendar_Van_Dusen_Resistance_To_Temperature_Formula' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='z1 = -Alpha' />
							<exp exp='z2 = Alpha * Alpha - (4 * iCVD_B)' />
							<exp exp='z3 = (4 * iCVD_B) / RTD_Nominal_CAL' />
							<exp exp='z4 = 2 * iCVD_B' />
							<exp exp='T_CVD = z2 + (z3 * R_RTD)' />
							<exp exp='T_CVD = (sqrt (T_CVD) + z1) / z4' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='RTD_SAMPLE_AVERAGE' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='ERROR1 = 0' />
						</command>
						<command class_type='group' title='Get Sample' comment='Read two bytes' textmode='3' textarea='113,0,113,0' cmdcolor='3568629' cmdcolor_sec='3568629' >
							<flowline >
								<command class_type='output' title='CS1_LOW' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='false' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='SendChar' >
									<argument exp='0x01' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='GetChar' >
									<return exp='RTD1_DATA_H' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='GetChar' >
									<return exp='RTD1_DATA_L' />
								</command>
								<command class_type='output' title='CS1_HIGH' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='true' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' textarea='126,-4,126,-4' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='ERROR1 = RTD1_DATA_L &lt;&lt; 7' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='ERROR1 = 128' swap='0' >
							<flowline >
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='1' />
								<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='false' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='SendChar' >
									<argument exp='0x07' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='GetChar' >
									<return exp='RTD1_FAULT_Register' />
								</command>
								<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='true' />
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='1' type='1' />
								<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='false' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='SendChar' >
									<argument exp='0x80' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='SPI_Master1' macro='SendChar' >
									<argument exp='0xd3' />
								</command>
								<command class_type='output' title='Output' cmdcolor='16762795' cmdcolor_sec='13879979' mode='1' port='1048578' mask='2' exp='true' />
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='RTD1_SAMPLE = 0' />
									<exp exp='RTD1_Sample_No = 0' />
									<exp exp='RTD1_Temperature100 = &quot;ERROR&quot;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='RTD1_Sampe' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='' />
									<exp exp='RTD1_DATA = (RTD1_DATA_H &lt;&lt; 7) OR (RTD1_DATA_L &gt;&gt; 1)' />
									<exp exp='' />
									<exp exp='RTD1_SAMPLE = RTD1_SAMPLE + RTD1_DATA' />
									<exp exp='' />
									<exp exp='RTD1_Sample_No = RTD1_Sample_No + 1' />
									<exp exp='' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='RTD1_Sample_No = 20' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='RTD1_Sample_No = 0' />
											<exp exp='RTD1_Ratio = RTD1_SAMPLE / 20' />
											<exp exp='//RTD1_Ratio_STR = FloatToString$ (RTD1_Ratio)' />
											<exp exp='RTD1_Convert = true' />
											<exp exp='RTD1_SAMPLE = 0' />
										</command>
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='RTD_Temp_Conversion' />
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Clock_INIT' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Var_INIT' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Devise_INIT' />
						<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='RTD_SENSOR_SETUP' />
						<command class_type='interrupt' title='Interrupt' cmdcolor='17151' cmdcolor_sec='355583' enable='1' name='TMR8' call='SAMPLE_Tick' >
							<settings timer='1' prescale='256' postscale='-1' rollover='23437' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='0' />
								<option value='3' />
								<option value='23437' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='1' >
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='SAMPLE = true' swap='0' >
									<flowline >
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='RTD_SAMPLE_AVERAGE' />
										<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='SAMPLE = false' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='LCD_Update' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='a2b40602-5421-4e2f-ba82-96db1be51d69' vmin='1' vmaj='1' codename='LCD_1' x='-200' y='-20' z='3.575' 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' >
				<resources />
				<properties />
				<values >
					<value target='Pin_Data_0' data='$PORTF.8' />
					<value target='Pin_Data_1' data='$PORTA.2' />
					<value target='Pin_Data_2' data='$PORTA.3' />
					<value target='Pin_Data_3' data='$PORTA.4' />
					<value target='Pin_RS' data='$PORTF.3' />
					<value target='Pin_E' data='$PORTF.2' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='96862c4d-debc-45fa-9433-74711a4b9a3b' vmin='1' vmaj='2' codename='SPI_Master1' x='-200' y='20' z='0.755' 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' >
				<resources />
				<properties />
				<values >
					<value target='cal_spi::CHANNEL' data='002' />
					<value target='cal_spi::MOSI' data='$PORTG.8' />
					<value target='cal_spi::MOSIPins' data='008' />
					<value target='cal_spi::MISO' data='$PORTG.7' />
					<value target='cal_spi::MISOPins' data='013' />
					<value target='cal_spi::CLK' data='$PORTG.6' />
					<value target='cal_spi::CLKPins' data='004' />
					<value target='cal_spi::UseAutoCS' data='0' />
					<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='001' />
					<value target='cal_spi::SMP' data='001' />
					<value target='label' data='SPI  Master' />
					<value target='cal_spi::ScopeTraces' data='0' />
					<value target='cal_spi::ConsoleData' data='0' />
					<value target='cal_spi::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='-209.449' ye='-2.28598' ze='250.172' xt='-209.449' yt='-2.28598' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='-367.101' ye='12.9121' ze='804.108' xt='-367.101' yt='12.9121' zt='-70.1374' 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='RTD_SENSOR_SETUP' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Callendar_Van_Dusen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='RTD_SAMPLE_AVERAGE' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='243' flags='0' />
		<view type='0' name='Devise_INIT' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Var_INIT' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Clock_INIT' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='LCD_Update' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='119' flags='0' />
		<view type='0' name='RTD_Temp_Conversion' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAcwYAAHACAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
