<root>
<document scada='0' schema='102' license='10,Bubthenib,RMFW7Y' title='' description='' fcversion='590336' target='PIC.18F.18F46K22' >
	<config data='!0,9300!10,fcf9!20,f500!30,bb!40,3ff0!50,ffff!60,ffff%8,3%c,1%d,0%e,0%f,1%10,1%11,0%13,3%18,0%1a,f%28,1%29,0%2a,1%2b,0%2c,1%2d,1%2f,1%30,1%32,0%36,0%37,1%40,0%41,0%42,0%43,0%4e,0%4f,0%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='64000000' simspd='1' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Actual_Length_Total' />
		<watch expr='Sec_Counter' />
	</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='3' />
			<data name='CalculatedCommsDelay' value='3' />
			<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 />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='File_Open' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SD_Card_Status' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SD_Return_Val' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Filename' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='10' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Write_SD_Card' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Actual_Time_ST' 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='Actual_Date_ST' 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='Card_OK_Ack' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SD_Card_Present' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Actual_Length_Total_ST' 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='Filestream' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='200' />
					</def>
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Delay_500mS' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='500' type='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Check_SDCard_Status' 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='gLCD_SH1106_SPI1' macro='ClearDisplay' />
						<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
							<argument exp='&quot;Micro SD&quot;' />
							<argument exp='15' />
							<argument exp='10' />
							<argument exp='2' />
							<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='gLCD_SH1106_SPI1' macro='Print' >
							<argument exp='&quot;Card OK&quot;' />
							<argument exp='20' />
							<argument exp='27' />
							<argument exp='2' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
						<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='100' type='1' />
						<command class_type='call' title='Init FAT16' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='Initialise' >
							<return exp='SD_Return_Val' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SD_Return_Val = 0' 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='gLCD_SH1106_SPI1' macro='ClearDisplay' />
								<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
									<argument exp='&quot;Open File&quot;' />
									<argument exp='12' />
									<argument exp='10' />
									<argument exp='2' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
								<command class_type='call' title='Open the file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='OpenFile' >
									<return exp='SD_Return_Val' />
									<argument exp='Filename' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SD_Return_Val' 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='gLCD_SH1106_SPI1' macro='ClearDisplay' />
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
											<argument exp='&quot;File&quot;' />
											<argument exp='41' />
											<argument exp='10' />
											<argument exp='2' />
											<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='gLCD_SH1106_SPI1' macro='Print' >
											<argument exp='&quot;Missing&quot;' />
											<argument exp='24' />
											<argument exp='27' />
											<argument exp='2' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='ClearDisplay' />
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
											<argument exp='&quot;Creating&quot;' />
											<argument exp='17' />
											<argument exp='10' />
											<argument exp='2' />
											<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='gLCD_SH1106_SPI1' macro='Print' >
											<argument exp='&quot;File&quot;' />
											<argument exp='41' />
											<argument exp='27' />
											<argument exp='2' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
										<command class_type='call' title='Create File' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='CreateFile' >
											<return exp='SD_Return_Val' />
											<argument exp='Filename' />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SD_Return_Val' 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='gLCD_SH1106_SPI1' macro='ClearDisplay' />
												<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;File&quot;' />
													<argument exp='41' />
													<argument exp='10' />
													<argument exp='2' />
													<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='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;Error!&quot;' />
													<argument exp='28' />
													<argument exp='27' />
													<argument exp='2' />
													<argument exp='0' />
												</command>
												<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
												<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
													<exp exp='File_Open = 0' />
												</command>
											</flowline>
											<flowline >
												<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='ClearDisplay' />
												<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;File&quot;' />
													<argument exp='41' />
													<argument exp='10' />
													<argument exp='2' />
													<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='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;Created&quot;' />
													<argument exp='23' />
													<argument exp='27' />
													<argument exp='2' />
													<argument exp='0' />
												</command>
												<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
												<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='ClearDisplay' />
												<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;Open File&quot;' />
													<argument exp='12' />
													<argument exp='10' />
													<argument exp='2' />
													<argument exp='0' />
												</command>
												<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
												<command class_type='call' title='Open the file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='OpenFile' >
													<return exp='SD_Return_Val' />
													<argument exp='Filename' />
												</command>
												<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SD_Return_Val' 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='gLCD_SH1106_SPI1' macro='ClearDisplay' />
														<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
															<argument exp='&quot;File&quot;' />
															<argument exp='41' />
															<argument exp='10' />
															<argument exp='2' />
															<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='gLCD_SH1106_SPI1' macro='Print' >
															<argument exp='&quot;Error!&quot;' />
															<argument exp='28' />
															<argument exp='27' />
															<argument exp='2' />
															<argument exp='0' />
														</command>
														<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
														<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
															<exp exp='File_Open = 0' />
														</command>
													</flowline>
													<flowline >
														<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='ClearDisplay' />
														<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
															<argument exp='&quot;File&quot;' />
															<argument exp='41' />
															<argument exp='10' />
															<argument exp='2' />
															<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='gLCD_SH1106_SPI1' macro='Print' >
															<argument exp='&quot;Opened&quot;' />
															<argument exp='27' />
															<argument exp='27' />
															<argument exp='2' />
															<argument exp='0' />
														</command>
														<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
														<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
															<exp exp='File_Open = 1' />
														</command>
													</flowline>
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='ClearDisplay' />
										<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='gLCD_SH1106_SPI1' macro='Print' >
											<argument exp='&quot;File&quot;' />
											<argument exp='41' />
											<argument exp='10' />
											<argument exp='2' />
											<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='gLCD_SH1106_SPI1' macro='Print' >
											<argument exp='&quot;Opened&quot;' />
											<argument exp='27' />
											<argument exp='27' />
											<argument exp='2' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Delay_500mS' />
										<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
											<exp exp='File_Open = 1' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='File_Open = 0' />
								</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='gLCD_SH1106_SPI1' macro='ClearDisplay' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Write_SDCard' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='This has to be switched ON by some function to write' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Write_SD_Card = 1' swap='0' >
							<flowline >
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='Actual_Date_ST' />
								</command>
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='&quot;, &quot;' />
								</command>
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='Actual_Time_ST' />
								</command>
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='&quot;, &quot;' />
								</command>
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='Actual_Length_Total_ST' />
								</command>
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='&quot;, &quot;' />
								</command>
								<command class_type='call' title='Append data to file' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='FAT1' macro='AppendStringToFile' >
									<return exp='SD_Return_Val' />
									<argument exp='&quot;\r\n&quot;' />
								</command>
								<command class_type='decision' title='To check if writing is done' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SD_Return_Val = 0' swap='0' >
									<flowline >
										<command class_type='output' title='Output' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048576' mask='4' exp='1' usechipref='1' />
										<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='50' type='1' />
										<command class_type='output' title='Output' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048576' mask='4' exp='0' usechipref='1' />
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Write_SD_Card = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Delay_50mS' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='50' type='1' />
					</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='calculation' title='Assign filename and data' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='Filename = &quot;site1.csv&quot;' />
							<exp exp='Filestream = &quot;&quot;' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='SDC_Present' macro='ReadState' >
									<return exp='SD_Card_Status' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SD_Card_Status = 1' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Card_OK_Ack = 1' 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='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;CardOK&quot;' />
													<argument exp='6' />
													<argument exp='55' />
													<argument exp='0' />
													<argument exp='0' />
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
													<exp exp='Card_OK_Ack = 0' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='File_Open' swap='0' >
											<flowline >
												<command class_type='call' title='Call Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Write_SDCard' />
											</flowline>
											<flowline >
												<command class_type='native' title='Low Speed Mode' ccode='OSCCON=0x72;' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' language='C' />
												<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Check_SDCard_Status' />
												<command class_type='native' title='HighSpeedMode' ccode='OSCCON=0xE8;' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' language='C' />
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
											<exp exp='File_Open = 0' />
										</command>
										<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='Card_OK_Ack = 0' 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='gLCD_SH1106_SPI1' macro='Print' >
													<argument exp='&quot;NoCard&quot;' />
													<argument exp='6' />
													<argument exp='55' />
													<argument exp='0' />
													<argument exp='0' />
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
													<exp exp='Card_OK_Ack = 1' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='0b61bd39-05a3-46ee-a2a5-da7bffb583c5' vmin='0' vmaj='3' codename='FAT1' x='92.6822' y='70.4332' z='43.743' 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='cal_spi::CHANNEL' data='002' />
					<value target='cal_spi::MOSI' data='$PORTD.4' />
					<value target='cal_spi::MOSIPins' data='008' />
					<value target='cal_spi::MISO' data='$PORTD.1' />
					<value target='cal_spi::MISOPins' data='013' />
					<value target='cal_spi::CLK' data='$PORTD.0' />
					<value target='cal_spi::CLKPins' data='004' />
					<value target='cal_spi::SS' data='$PORTD.2' />
					<value target='PR_SCALE' data='064' />
					<value target='PR_SCALE2' data='064' />
					<value target='max_concurrent_files' data='5' />
					<value target='EOFtype' data='000' />
					<value target='IsSim' data='0' />
					<value target='AutoInsertCard' data='1' />
					<value target='SimType' data='000' />
					<value target='root_dir' data='' />
					<value target='cal_spi::ScopeTraces' data='0' />
					<value target='cal_spi::ConsoleData' data='0' />
					<value target='cal_spi::Injector' data='000' />
					<value target='cal_spi1::InjectorCS' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='91c1b7f5-6974-4ea3-84b3-4e24a9784631' vmin='0' vmaj='2' codename='gLCD_SH1106_SPI1' x='0' y='51.375' z='0' xsz='2' ysz='2.1374' 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='pixel_width' data='128' />
					<value target='pixel_height' data='64' />
					<value target='monochrome' data='1' />
					<value target='foreground_colour' data='16777215' />
					<value target='background_colour' data='0' />
					<value target='colour_bit_depth' data='1' />
					<value target='red_bit_depth' data='0' />
					<value target='green_bit_depth' data='0' />
					<value target='blue_bit_depth' data='0' />
					<value target='cal_spi::CHANNEL' data='000' />
					<value target='cal_spi::PR_SCALE' data='004' />
					<value target='cal_spi::MOSI' data='$PORTB.3' />
					<value target='cal_spi::MOSIPins' data='008' />
					<value target='cal_spi::MISO' data='$PORTB.2' />
					<value target='cal_spi::MISOPins' data='013' />
					<value target='cal_spi::CLK' data='$PORTB.1' />
					<value target='cal_spi::CLKPins' data='004' />
					<value target='cal_spi::SS' data='$PORTB.6' />
					<value target='dc_pin' data='$PORTB.4' />
					<value target='Reset' data='$PORTB.5' />
					<value target='Base_GLCD::FontCount' data='001' />
					<value target='Base_GLCD::gLCD_Font1::Font' data='000' />
					<value target='Base_GLCD::gLCD_Font1::FontSpace' data='001' />
					<value target='Base_GLCD::gLCD_Font1::SpaceWidth' data='004' />
					<value target='Base_GLCD::gLCD_Font2::Font' data='005' />
					<value target='Base_GLCD::gLCD_Font2::FontSpace' data='001' />
					<value target='Base_GLCD::gLCD_Font2::SpaceWidth' data='004' />
					<value target='Base_GLCD::gLCD_Font3::Font' data='002' />
					<value target='Base_GLCD::gLCD_Font3::FontSpace' data='001' />
					<value target='Base_GLCD::gLCD_Font3::SpaceWidth' data='004' />
					<value target='Base_GLCD::gLCD_Font4::Font' data='015' />
					<value target='Base_GLCD::gLCD_Font4::FontSpace' data='001' />
					<value target='Base_GLCD::gLCD_Font4::SpaceWidth' data='004' />
					<value target='DisplayMethod' data='000' />
					<value target='SimComms' data='0' />
					<value target='cal_spi::ConsoleData' data='0' />
					<value target='cal_spi::ScopeTraces' data='0' />
					<value target='cal_spi::Injector' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='e8f04af0-03d9-4b1c-83d3-9d0b1dc0f80a' vmin='1' vmaj='1' codename='SDC_Present' x='130' y='50' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.5' />
					<value target='polarity' data='001' />
					<value target='debounce' data='50' />
					<value target='operation' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='3e5cc6d0-3e36-46b8-bc40-f238a5735b6e' vmin='0' vmaj='1' codename='IntOscHelper1' x='0' y='120' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='OscSpeed' data='4' />
					<value target='OscFreq' data='1000000' />
					<value target='ClockSpeed' data='64000000' />
					<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>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='30.418' ye='71.2057' ze='341.491' xt='30.418' yt='71.2057' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='561' dy='506' zoom='198.778' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7884836' img='' style='0' size='25' />
		<camera xe='19.07' ye='29.2577' ze='256.257' xt='19.07' yt='29.2577' zt='-4.19725e-12' 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---------------------wUAAAAYAAAAqgQAAH4DAAA' zoom='65' scrollx='0' scrolly='134' flags='0' />
		<view type='0' name='Write_SDCard' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAqgQAAH4DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Check_SDCard_Status' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAqgQAAH4DAAA' zoom='50' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
