<root>
<document scada='0' schema='102' license='1,medelec35,07B0BN' title='' description='' fcversion='524545' target='PIC.18F.ECIO-40' >
	<config data='' clkspd='48000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='EnableIOC' />
		<watch expr='SwitchesStatus' />
		<watch expr='Item' />
		<watch expr='DefaultMenu.CurrentNameNumberStringLength' />
		<watch expr='CurrentName' />
		<watch expr='CurrentNameNumber' />
		<watch expr='CurrentNameNumberH' />
		<watch expr='CurrentNameNumberL' />
		<watch expr='CurrentPin' />
		<watch expr='CurrentNamePlusNumber' />
		<watch expr='SimulationIOC' />
		<watch expr='EnabledTimedEvent' />
		<watch expr='EditNameOrPin.Blink' />
		<watch expr='EditNameOrPin.Count' />
		<watch expr='EditNameOrPin.CurrentNamePlusNumberLength' />
		<watch expr='EditNameOrPin.CurrentNameTemp' />
		<watch expr='EditNameOrPin.Digit' />
		<watch expr='EditNameOrPin.EditName' />
		<watch expr='EditNameOrPin.Exit' />
		<watch expr='EditNameOrPin.FirstRun' />
		<watch expr='EditNameOrPin.Index' />
		<watch expr='EditNameOrPin.Index2' />
		<watch expr='EditNameOrPin.IndexMax' />
		<watch expr='EditNameOrPin.LoopCount' />
		<watch expr='EditNameOrPin.NameLength' />
		<watch expr='EditNameOrPin.SwitchedPressed' />
		<watch expr='EditNameOrPin.TempDisplay' />
		<watch expr='EditNameOrPin.TimerCount' />
		<watch expr='EditNameOrPin.ValueToEdit' />
	</debug>
	<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='4' />
			<data name='DataPin' value='2' />
			<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' />
		</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='dfb9b65a-360a-4ab3-bba9-30c91e8e8398' 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='SwitchesStatus' type='u8' description='' isconst='0' isinit='1' usrinit='112' setinit='112' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Count' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='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='SwitchValue' type='u8' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TimerTick' 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='Timer2ISR' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='TimerTick &lt; 200' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='TimerTick = TimerTick + 1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='Count = Count + 1' />
									<exp exp='TimerTick = 0' />
								</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='interrupt' title='Interrupt' cmdcolor='17151' cmdcolor_sec='355583' enable='1' name='TMR2' call='Timer2ISR' >
							<settings timer='1' prescale='16' postscale='15' rollover='250' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='2' />
								<option value='14' />
								<option value='250' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='Start' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='USB_Serial1' macro='Initialise' />
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='1' >
							<flowline >
								<command class_type='input' title='Input' cmdcolor='4664832' cmdcolor_sec='4470784' mode='2' port='1048577' mask='112' exp='SwitchesStatus' />
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='SwitchValue = (~SwitchesStatus &amp; 112) &gt;&gt; 4' />
									<exp exp='' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='Cursor' >
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='PrintNumber' >
									<argument exp='Count' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='PrintString' >
									<argument exp='&quot;  &quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='Cursor' >
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='PrintNumber' >
									<argument exp='SwitchValue' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='PrintString' >
									<argument exp='&quot;  &quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='Cursor' >
									<argument exp='0' />
									<argument exp='2' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='PrintNumber' >
									<argument exp='SwitchesStatus' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='lcd_4x20' macro='PrintString' >
									<argument exp='&quot;  &quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1879295' cmdcolor_sec='5751039' component='USB_Serial1' macro='SendString' >
									<argument exp='&quot;  Switch Value = &quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1879295' cmdcolor_sec='5751039' component='USB_Serial1' macro='SendNumber' >
									<argument exp='SwitchValue' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1879295' cmdcolor_sec='5751039' component='USB_Serial1' macro='SendString' >
									<argument exp='&quot;  Count = &quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1879295' cmdcolor_sec='5751039' component='USB_Serial1' macro='SendNumber' >
									<argument exp='Count' />
								</command>
								<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='1879295' cmdcolor_sec='5751039' component='USB_Serial1' macro='SendString' >
									<argument exp='&quot;\n\r&quot;' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='100' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='a2b40602-5421-4e2f-ba82-96db1be51d69' vmin='1' vmaj='1' codename='lcd_4x20' x='-14.1406' y='114.699' z='-75.086' 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 >
					<value target='Pin_Data_0' data='$PORTD.0' />
					<value target='Pin_Data_1' data='$PORTD.1' />
					<value target='Pin_Data_2' data='$PORTD.2' />
					<value target='Pin_Data_3' data='$PORTD.3' />
					<value target='Pin_RS' data='$PORTD.4' />
					<value target='Pin_E' data='$PORTD.5' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='3e28ac22-2855-410a-9660-0b0a4731e545' vmin='6' vmaj='1' codename='USB_Serial1' x='-50' y='270' z='0' xsz='66' ysz='34' zsz='7.5' 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 >
					<value target='vendor_ID' data='4799' />
					<value target='product_ID' data='61456' />
					<value target='dev_name' data='Flowcode USB Serial' />
					<value target='dev_manufacturer' data='Matrix Multimedia Ltd.' />
					<value target='major_version' data='1' />
					<value target='minor_version' data='0' />
					<value target='RETURN' data='000' />
					<value target='enumeration_tout' data='0' />
					<value target='timeout' data='10' />
					<value target='usb_type' data='1' />
					<value target='TXBUFSZ' data='64' />
					<value target='RXBUFSZ' data='64' />
					<value target='driver_directory' data='$(srcdir)' />
					<value target='driver_filename' data='Flowcode_USB_Serial_Driver' />
					<value target='gen_driver' data='' />
					<value target='COM_port' data='001' />
					<value target='label' data='USB Serial' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='42cb88b2-e965-4a49-893c-64eb001fc861' vmin='0' vmaj='1' codename='sw_rocker_neon1' x='-40' y='29.1499' 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 >
					<value target='LED_col' data='255' />
					<value target='rocker_col' data='32807' />
					<value target='bezel_col' data='11842740' />
					<value target='pin' data='$PORTB.5' />
					<value target='polarity' data='001' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='42cb88b2-e965-4a49-893c-64eb001fc861' vmin='0' vmaj='1' codename='sw_rocker_neon2' x='5.25' y='39.1499' z='2.75' 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 >
					<value target='LED_col' data='255' />
					<value target='rocker_col' data='32807' />
					<value target='bezel_col' data='11842740' />
					<value target='pin' data='$PORTB.6' />
					<value target='polarity' data='001' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='42cb88b2-e965-4a49-893c-64eb001fc861' vmin='0' vmaj='1' codename='sw_rocker_neon3' x='-38.5889' y='79.1499' 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 >
					<value target='LED_col' data='255' />
					<value target='rocker_col' data='32807' />
					<value target='bezel_col' data='11842740' />
					<value target='pin' data='$PORTB.4' />
					<value target='polarity' data='001' />
					<value target='debounce' data='10' />
					<value target='operation' data='000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c6c91999-1fe0-414e-b6aa-0a7ddc9a6417' vmin='1' vmaj='1' codename='sw_toggle_mtl_pcb1' x='0' y='0' z='13.7905' 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 >
					<value target='pin' data='$PORTA.0' />
					<value target='polarity' data='000' />
					<value target='debounce' data='10' />
					<value target='operation' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap >
		<key code='49' >
			<exp exp='SwitchesStatus = 1' />
		</key>
		<key code='48' >
			<exp exp='EnableIOC = 0' />
		</key>
		<key code='69' >
			<exp exp='KeymapVariable = 150' />
		</key>
		<key code='52' >
			<exp exp='SwitchesStatus = 4' />
		</key>
		<key code='73' >
			<exp exp='SimulationIOC = !SimulationIOC' />
		</key>
		<key code='50' >
			<exp exp='SwitchesStatus = 2' />
		</key>
	</keymap>
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='5' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='-37.9844' ye='81.1235' ze='-136.064' xt='-37.9844' yt='81.1235' zt='-221.333' 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---------------------wUAAAAYAAAAbwYAAHMCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Timer2ISR' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAbwYAAHMCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
