<root>
<document scada='0' schema='102' license='1,Dev User,H1YQFU' title='' description='' fcversion='524801' target='PIC16.33E.ECIO40P16' >
	<config data='' clkspd='140000000' simspd='1' usewdt='0' constif='0' commport='28' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Xsamble' />
		<watch expr='X' />
	</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='2' />
			<data name='ClockPin' value='4' />
			<data name='DataPort' value='0' />
			<data name='DataPin' value='5' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='4' />
			<data name='CalculatedCommsDelay' value='4' />
			<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='3b2cbb5a-a07f-404a-88fe-4d23054e9a84' 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 />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Zsamble' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='xmin' type='s16' description='' isconst='0' isinit='1' usrinit='999' setinit='999' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ymax' type='s16' description='' isconst='0' isinit='1' usrinit='-9999' setinit='-9999' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Ysamble' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</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='ymin' type='s16' description='' isconst='0' isinit='1' usrinit='999' setinit='999' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Xsamble' type='s16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='zmax' type='s16' description='' isconst='0' isinit='1' usrinit='-9999' setinit='-9999' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Z' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Y' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='X' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='xmax' type='s16' description='' isconst='0' isinit='1' usrinit='-9999' setinit='-9999' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='zmin' type='s16' description='' isconst='0' isinit='1' usrinit='999' setinit='999' />
				</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='Z' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Zsamble = 0' />
							<exp exp='Z = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='2' exp='10' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='MPU6050' macro='GetGyroReadng' >
									<return exp='Z' />
									<argument exp='2' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Zsamble = Z + Z' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='1' type='1' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Zsamble = Zsamble / 10' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Zsamble &lt; Zmin' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Zmin = Zsamble' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Zsamble &gt; Zmax' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Zmax = Zsamble' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='Print' >
							<argument exp='&quot;Z: &quot;' />
							<argument exp='0' />
							<argument exp='16' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='PrintNumber' >
							<argument exp='Zmin' />
							<argument exp='15' />
							<argument exp='16' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='PrintNumber' >
							<argument exp='Zmax' />
							<argument exp='65' />
							<argument exp='16' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Y' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Ysamble = 0' />
							<exp exp='Y = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='2' exp='10' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='MPU6050' macro='GetGyroReadng' >
									<return exp='Y' />
									<argument exp='1' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Ysamble = Y + Y' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='1' type='1' />
							</flowline>
						</command>
						<command class_type='calculation' title='' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Ysamble = Y / 10' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Ysamble &lt; Ymin' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Ymin = Ysamble' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Ysamble &gt; Ymax' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Ymax = Ysamble' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='Print' >
							<argument exp='&quot;Y: &quot;' />
							<argument exp='0' />
							<argument exp='8' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='PrintNumber' >
							<argument exp='Ymin' />
							<argument exp='15' />
							<argument exp='8' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='PrintNumber' >
							<argument exp='Ymax' />
							<argument exp='65' />
							<argument exp='8' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='X' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Xsamble = 0' />
							<exp exp='X = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='2' exp='10' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='MPU6050' macro='SampleDevice' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='MPU6050' macro='GetGyroReadng' >
									<return exp='X' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Xsamble = X + X' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='1' type='1' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='Xsamble = Xsamble / 10' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Xsamble &lt; Xmin' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Xmin = Xsamble' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='Xsamble &gt; Xmax' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='Xmax = Xsamble' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='Print' >
							<argument exp='&quot;X: &quot;' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='PrintNumber' >
							<argument exp='Xmin' />
							<argument exp='15' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='PrintNumber' >
							<argument exp='Xmax' />
							<argument exp='65' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
						</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 Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='MPU6050' macro='Initialise' />
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='1' >
							<flowline >
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='200' type='1' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='gLCD_EBM001' macro='ClearDisplay' />
								<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='X' />
								<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Y' />
								<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Z' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='75a362f4-d74d-48e7-9790-530f4d0e78b6' vmin='0' vmaj='2' codename='MPU6050' x='-21.4999' y='-51.8419' z='18.5131' xsz='120' ysz='85.6838' zsz='29.8763' 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='AddressBit' data='0' />
					<value target='GyroRange' data='000' />
					<value target='AccelRange' data='000' />
					<value target='I2C_Master1::cal_i2c::CHANNEL' data='000' />
					<value target='I2C_Master1::cal_i2c::BAUD_LIST' data='002' />
					<value target='I2C_Master1::cal_i2c::BAUD' data='400000' />
					<value target='I2C_Master1::cal_i2c::StopDel' data='0' />
					<value target='I2C_Master1::cal_i2c::SDA' data='$PORTB.9' />
					<value target='I2C_Master1::cal_i2c::SCL' data='$PORTB.8' />
					<value target='SimulateComms' data='0' />
					<value target='I2C_Master1::label' data='MPU-6050' />
					<value target='I2C_Master1::cal_i2c::ConsoleData' data='' />
					<value target='I2C_Master1::cal_i2c::ScopeTraces' data='0' />
					<value target='I2C_Master1::cal_i2c::Injector' data='000' />
					<value target='AccelMult' data='16383.500000' />
					<value target='GyroMult' data='131.067993' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='5a6d2f2e-da92-49b4-ad5c-71f51e8fe24b' vmin='6' vmaj='1' codename='gLCD_EBM001' x='-50' y='40' 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' >
				<resources />
				<properties />
				<values >
					<value target='pixel_height' data='160' />
					<value target='pixel_width' data='128' />
					<value target='monochrome' data='0' />
					<value target='foreground_colour' data='0' />
					<value target='background_colour' data='16777215' />
					<value target='colour_bit_depth' data='16' />
					<value target='red_bit_depth' data='5' />
					<value target='green_bit_depth' data='6' />
					<value target='blue_bit_depth' data='5' />
					<value target='FGCOL' data='0' />
					<value target='BGCOL' data='65535' />
					<value target='data_pin' data='$PORTB.0' />
					<value target='clock_pin' data='$PORTB.1' />
					<value target='chip_sel_pin' data='$PORTB.2' />
					<value target='a0_pin' data='$PORTB.3' />
					<value target='reset_pin' data='$PORTB.4' />
					<value target='led_pin' data='$PORTB.5' />
					<value target='DisplayMethod' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='7292207' img='' style='0' />
		<camera xe='13.8375' ye='-3.22244' ze='263.125' xt='13.8375' yt='-3.22244' 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='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' />
	</panel3d>
	<layout >
		<view type='0' name='Z' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAPwUAAH8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Y' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAPwUAAH8DAAA' zoom='75' scrollx='0' scrolly='407' flags='0' />
		<view type='0' name='X' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAPwUAAH8DAAA' zoom='75' scrollx='0' scrolly='81' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAPwUAAH8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
