<root>
<document scada='0' schema='103' license='1,FREE_VERSION,DF7JCQ' title='' description='' fcversion='655617' target='PIC16.24F.24FJ128GA702' >
	<config data='!0,ffff!10,ffff!20,ffff!30,ffbf!40,ffff!50,ffff!60,ffff!70,ffff%0,1%1,7%5,1%6,3%8,1%b,7%8,1%10,1fff%20,7%23,f%27,1%30,3%32,1%33,1%34,1%35,1%36,2%40,f%44,1%45,3%47,1%48,3%4b,1%48,3%50,3%52,1%53,1%60,3%65,1%71,1%72,1%73,1%74,1' clkspd='64000000' simspd='0' usewdt='1' 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='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='9e2a759b-cf83-43e6-ae67-5b41b1e3a585' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='' />
		<component class_type='root' codename='panel' panelId='-1' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='1' poslock='0' comp2dType='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='RecoverData' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='15' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TotLines' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='sv' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='2' />
					</def>
				</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='Data' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RetVal' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='z' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='strData' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='30' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='File' 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='BytesSector' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Num' type='u8' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ByteSize' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='i1' type='u32' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='SDstart' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' >
							<exp exp='File = &quot;data.txt&quot; //file to open' />
							<exp exp='RetVal = 1' />
						</command>
						<command class_type='loop' title='Wait for card to start up' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' type='0' exp='RetVal &gt; 0' >
							<flowline >
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='Initialise' >
									<return exp='RetVal' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' exp='1' type='2' />
							</flowline>
						</command>
						<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='OpenFile' >
							<argument exp='File' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' exp='RetVal' swap='0' >
							<flowline >
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='lcd_4x20' macro='Clear' />
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='lcd_4x20' macro='PrintString' >
									<argument exp='&quot;Fail to open file&quot;' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' exp='1' type='2' />
								<command class_type='loop' title='Loop' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' type='0' exp='1' >
									<flowline />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='ReadFileSize' >
									<return exp='ByteSize' />
								</command>
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='ReadFileLength' >
									<return exp='BytesSector' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GetData' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='loop' title='Loop to read stream of 15 bytes' disable='1' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' type='2' exp='15' >
							<flowline >
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='ReadByteFromFile' >
									<return exp='Data' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' >
									<exp exp='sv[0] = Data' />
									<exp exp='' />
								</command>
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='ReadByteFromFile' >
									<return exp='Data' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' >
									<exp exp='sv[1] = Data' />
									<exp exp='Num = StringToInt$(sv)' />
								</command>
								<command class_type='calculation' title='Fill vector line by line to check data' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' >
									<exp exp='RecoverData[z] = Num' />
									<exp exp='z = z + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='call' title='' cmdcolor='10526303' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' cmdAuto_color='0' cmdcustom_color='1' component='FileSD1' macro='ReadStringFromFile' >
							<return exp='strData' />
							<argument exp='30' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Jump over /n' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='ReadByteFromFile' >
							<return exp='Data' />
						</command>
						<command class_type='call' title='Jump over /r' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='FileSD1' macro='ReadByteFromFile' >
							<return exp='Data' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' >
							<exp exp='TotLines = TotLines + 1 //amount of lines on File (3150)' />
							<exp exp='z = 0' />
						</command>
						<command class_type='decision' title='Test data integrity' cmdcolor='5275647' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' cmdAuto_color='0' cmdcustom_color='1' exp='TotLines = 3137' swap='0' >
							<flowline >
								<command class_type='delay' title='Delay' break='1' cmdcolor='17919' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' cmdAuto_color='0' cmdcustom_color='1' exp='1' type='1' />
								<command class_type='comment' title='' comment='Print line data' textarea='36,40,36,40' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' />
							</flowline>
							<flowline />
						</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='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' component='lcd_4x20' macro='Start' />
						<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' macro='SDstart' />
						<command class_type='loop' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='' cmdcolor='16777215' cmdcolor_sec='16777215' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='1' macro='GetData' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='a2b40602-5421-4e2f-ba82-96db1be51d69' vmin='1' vmaj='1' codename='lcd_4x20' panelId='0' x='153.604' y='-150' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Pin_Data_0' data='$PORTB.0' />
					<value target='Pin_Data_1' data='$PORTB.1' />
					<value target='Pin_Data_2' data='$PORTB.2' />
					<value target='Pin_Data_3' data='$PORTB.3' />
					<value target='Pin_RS' data='$PORTB.4' />
					<value target='Pin_E' data='$PORTB.5' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::ComponentLabel' data='000' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::GdiText1::sText' data='lcd_4x20' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::GdiText1::dScale' data='1.4' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::foreground_colour' data='0' />
					<value target='LCD::ctrl_lcd::TextBg' data='14803425' />
					<value target='LCD::ctrl_lcd::Base_GLCD1::background_colour' data='16777215' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='0b61bd39-05a3-46ee-a2a5-da7bffb583c5' vmin='0' vmaj='3' codename='FileSD1' panelId='0' x='63.548' y='-303' z='1' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_spi::CHANNEL' data='000' />
					<value target='cal_spi::MOSI' data='$PORTB.6' />
					<value target='cal_spi::MOSIPins' data='008' />
					<value target='cal_spi::MISO' data='$PORTB.13' />
					<value target='cal_spi::MISOPins' data='013' />
					<value target='cal_spi::CLK' data='$PORTB.10' />
					<value target='cal_spi::CLKPins' data='004' />
					<value target='cal_spi::SS' data='$PORTB.11' />
					<value target='PR_SCALE' data='064' />
					<value target='PR_SCALE2' data='004' />
					<value target='max_concurrent_files' data='1' />
					<value target='EOFtype' data='000' />
					<value target='IsSim' data='0' />
					<value target='SimType' data='000' />
					<value target='root_dir' data='D:\FC10\Sd test' />
					<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>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='73.5196' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='370' dy='822' zoom='608.953' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='7360576' />
		<winpos ID='7005' RectRecentFloat='524,288,1174,738' RectRecentDocked='0,0,370,847' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</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='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
		<winpos ID='7004' RectRecentFloat='556,304,1206,754' RectRecentDocked='0,0,484,450' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='NewPanel' >
			<winpos ID='1171' RectRecentFloat='1270,553,1920,1003' RectRecentDocked='1572,150,1889,997' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
			<background fill='288230376151053813' showgrid='0' gridstyle='1' gridsize='5' gridbrush='71776119075691740' snaptogrid='1' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAaAAAA9gMAAEoDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SDstart' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAaAAAA9gMAAEoDAAA' zoom='75' scrollx='0' scrolly='26' flags='0' />
		<view type='0' name='GetData' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAaAAAA9gMAAEoDAAA' zoom='75' scrollx='0' scrolly='155' flags='0' />
	</layout>
</document>
</root>
