<root>
<document scada='0' schema='103' license='10,STEVET,X4QE0C' title='' description='' fcversion='655360' target='PIC.18F.MIAC' >
	<config data='' clkspd='48000000' simspd='1' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<traces />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='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='' 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='0' 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='0' poslock='0' comp2dType='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='outgoing' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='9' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='old_keypress' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='key_read_idx' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Temp' type='s16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Key_idx' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='incoming' 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='LCD_Lockout' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='out_len' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='in_len' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='next_key' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='keypress_buffer' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='8' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='current_keypress' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Request_Handler' description='This macro is called when ever the PC sends data via the USB connection.
The first byte of the transaction specifies the command to be processed on the MIAC.' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='a' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='b' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<command class_type='calculation' title='Initialize Return Values' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='out_len = 1' />
							<exp exp='outgoing[0] = 0' />
							<exp exp='outgoing[1] = 0' />
						</command>
						<command class_type='calculation' title='Copy incoming parameter string to input string' disable='1' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='Request_Handler.b = &quot;x&quot; + Request_Handler.b' />
							<exp exp='incoming = Request_Handler.b' />
						</command>
						<command class_type='decision' title='Input Digital Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 1' swap='0' >
							<flowline >
								<command class_type='call' title='Read Input' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
									<return exp='outgoing[0]' />
									<argument exp='.b[0]' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Multiple Digital Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 2' swap='0' >
							<flowline >
								<command class_type='call' title='Read All 8 Digital Channels' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Input_Bank_Read' />
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Input Analogue Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 3' swap='0' >
							<flowline >
								<command class_type='call' title='Read Input' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputANALOG' >
									<return exp='outgoing[0]' />
									<argument exp='.b[0]' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Read Keypad Buffer Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 4' swap='0' >
							<flowline >
								<command class_type='calculation' title='Copy Keypress byte to outgoing data' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='outgoing[0] = keypress_buffer[0]' />
								</command>
								<command class_type='decision' title='Is there a keypress to send?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='keypress_buffer[0] &lt; 255' swap='0' >
									<flowline >
										<command class_type='calculation' title='Shift contents of key buffer' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='keypress_buffer[0] = keypress_buffer[1]' />
											<exp exp='keypress_buffer[1] = keypress_buffer[2]' />
											<exp exp='keypress_buffer[2] = keypress_buffer[3]' />
											<exp exp='keypress_buffer[3] = keypress_buffer[4]' />
											<exp exp='keypress_buffer[4] = keypress_buffer[5]' />
											<exp exp='keypress_buffer[5] = keypress_buffer[6]' />
											<exp exp='keypress_buffer[6] = keypress_buffer[7]' />
											<exp exp='keypress_buffer[7] = 255' />
										</command>
										<command class_type='decision' title='Is there still data in the buffer' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Key_idx &gt; 0' swap='0' >
											<flowline >
												<command class_type='calculation' title='Decrement Key Index' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
													<exp exp='Key_idx = Key_idx - 1' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Clear Keypad Buffer Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 5' swap='0' >
							<flowline >
								<command class_type='calculation' title='clear contents of key buffer' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='keypress_buffer[0] = 255' />
									<exp exp='keypress_buffer[1] = 255' />
									<exp exp='keypress_buffer[2] = 255' />
									<exp exp='keypress_buffer[3] = 255' />
									<exp exp='keypress_buffer[4] = 255' />
									<exp exp='keypress_buffer[5] = 255' />
									<exp exp='keypress_buffer[6] = 255' />
									<exp exp='keypress_buffer[7] = 255' />
								</command>
								<command class_type='calculation' title='Clear Key Index' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='Key_idx = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Relay Control Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 6' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[1]' swap='0' >
									<flowline >
										<command class_type='call' title='Activate Relay' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayON' >
											<argument exp='.b[0]' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Deactivate Relay' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayOFF' >
											<argument exp='.b[0]' />
										</command>
									</flowline>
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Transistor Control Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 7' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[1]' swap='0' >
									<flowline >
										<command class_type='call' title='Activate Transistor' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputON' >
											<argument exp='.b[0]' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Deactivate Transistor' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputOFF' >
											<argument exp='.b[0]' />
										</command>
									</flowline>
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Output Control Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 8' swap='0' >
							<flowline >
								<command class_type='call' title='Write to all output channels with masking' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Output_Bank_Write' >
									<argument exp='.b[1]' />
									<argument exp='.b[0]' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='LCD Clear Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 9' swap='0' >
							<flowline >
								<command class_type='calculation' title='LCD Is In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayClear' />
								<command class_type='calculation' title='LCD Is not In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 0' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='LCD Cursor Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 10' swap='0' >
							<flowline >
								<command class_type='calculation' title='LCD Is In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayCursor' >
									<argument exp='.b[0] - 1' />
									<argument exp='.b[1] - 1' />
								</command>
								<command class_type='calculation' title='LCD Is not In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 0' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='LCD Print Number Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 11' swap='0' >
							<flowline >
								<command class_type='calculation' title='Recombine byte variables into INT' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='Temp = .b[0]' />
									<exp exp='Temp = Temp | (.b[1] &lt;&lt; 8)' />
								</command>
								<command class_type='calculation' title='LCD Is In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 1' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintNumber' >
									<argument exp='Temp' />
								</command>
								<command class_type='calculation' title='LCD Is not In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 0' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='LCD Print String Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 12' swap='0' >
							<flowline >
								<command class_type='calculation' title='LCD Is In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 1' />
								</command>
								<command class_type='call' title='Output Byte array to LCD' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Print_String' >
									<argument exp='.b' />
								</command>
								<command class_type='calculation' title='LCD Is not In operation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='LCD_Lockout = 0' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='PWM Control Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 13' swap='0' >
							<flowline >
								<command class_type='decision' title='Enable Channel?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[1]' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[0] = 2' swap='0' >
											<flowline >
												<command class_type='call' title='Activate PWM Channel' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM2' macro='Enable' />
											</flowline>
											<flowline >
												<command class_type='call' title='Activate PWM Channel' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='Enable' />
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[0] = 2' swap='0' >
											<flowline >
												<command class_type='call' title='Deactivate PWM Channel' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM2' macro='Disable' />
											</flowline>
											<flowline >
												<command class_type='call' title='Deactivate PWM Channel' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='Disable' />
											</flowline>
										</command>
									</flowline>
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='PWM Duty Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 14' swap='0' >
							<flowline >
								<command class_type='decision' title='Decision' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[0] = 2' swap='0' >
									<flowline >
										<command class_type='call' title='Set PWM Channel Duty' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM2' macro='SetDutyCycle' >
											<argument exp='.b[1]' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Set PWM Channel Duty' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='SetDutyCycle' >
											<argument exp='.b[1]' />
										</command>
									</flowline>
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='PWM Period Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 15' swap='0' >
							<flowline >
								<command class_type='decision' title='PWM Prescaler = 1' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[0] = 0' swap='0' >
									<flowline >
										<command class_type='call' title='Set PWM Master Period' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='ChangePeriod' >
											<argument exp='255' />
											<argument exp='1' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='PWM Prescaler = 4' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[0] = 1' swap='0' >
									<flowline >
										<command class_type='call' title='Set PWM Master Period' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='ChangePeriod' >
											<argument exp='255' />
											<argument exp='4' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='PWM Prescaler = 16' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.b[0] = 2' swap='0' >
									<flowline >
										<command class_type='call' title='Set PWM Master Period' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='PWM1' macro='ChangePeriod' >
											<argument exp='255' />
											<argument exp='16' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='PWM Overcurrent Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 16' swap='0' >
							<flowline >
								<command class_type='input' title='Check Overcurrent Input' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' mode='1' port='1048577' mask='8' exp='Temp' usechipref='1' />
								<command class_type='decision' title='If Input is not 0' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Temp' swap='0' >
									<flowline >
										<command class_type='calculation' title='Current is ok' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='outgoing[0] = 0' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Current is too high' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='outgoing[0] = 1' />
										</command>
									</flowline>
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='EEPROM Write Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 17' swap='0' >
							<flowline >
								<command class_type='call' title='Write Byte To EEPROM' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='eeprom0' macro='Write' >
									<argument exp='.b[0]' />
									<argument exp='.b[1]' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='EEPROM Read Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 18' swap='0' >
							<flowline >
								<command class_type='call' title='Read Byte From EEPROM' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='eeprom0' macro='Read' >
									<return exp='outgoing[0]' />
									<argument exp='.b[0]' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='CAN Specify Data Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 19' swap='0' >
							<flowline >
								<command class_type='call' title='Set CAN Transmission Data' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='SetTxData' >
									<argument exp='0' />
									<argument exp='.b[0]' />
									<argument exp='.b[1]' />
									<argument exp='.b[2]' />
									<argument exp='.b[3]' />
									<argument exp='.b[4]' />
									<argument exp='.b[5]' />
									<argument exp='.b[6]' />
									<argument exp='.b[7]' />
									<argument exp='.b[8]' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='CAN Send Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 20' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculate CAN ID' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='Temp = .b[0]' />
									<exp exp='Temp = Temp | (.b[1] &lt;&lt; 8)' />
									<exp exp='Temp = Temp &lt;&lt; 5' />
									<exp exp='' />
									<exp exp='outgoing[1] = Temp' />
									<exp exp='outgoing[2] = Temp &gt;&gt; 8' />
								</command>
								<command class_type='call' title='Set the CAN Message ID' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='SetTxID' >
									<argument exp='0' />
									<argument exp='outgoing[2]' />
									<argument exp='outgoing[1]' />
								</command>
								<command class_type='call' title='Transmit the CAN Message' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='SendBuffer' >
									<argument exp='0' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='CAN Check RX Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 21' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='CheckRx' >
									<return exp='Temp' />
									<argument exp='0' />
								</command>
								<command class_type='decision' title='Message Received?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Temp' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxIDLo' >
											<return exp='outgoing[0]' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='Call Component Macro' disable='1' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxIDHi' >
											<return exp='outgoing[1]' />
											<argument exp='0' />
										</command>
										<command class_type='calculation' title='Calculate CAN ID' disable='1' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='Temp = outgoing[0] &gt;&gt; 5' />
											<exp exp='Temp = Temp | (outgoing[1] &lt;&lt; 3)' />
											<exp exp='' />
											<exp exp='outgoing[0] = Temp' />
											<exp exp='outgoing[1] = Temp &gt;&gt; 8' />
										</command>
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxIdent' >
											<return exp='Temp' />
											<argument exp='0' />
										</command>
										<command class_type='calculation' title='Calculation' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='outgoing[0] = Temp' />
											<exp exp='outgoing[1] = Temp &gt;&gt; 8' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Return 2 byte ID' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='out_len = 2' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='CAN Get Data Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 22' swap='0' >
							<flowline >
								<command class_type='call' title='Collect Number of Incoming Bytes' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxDataCount' >
									<return exp='outgoing[0]' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Collect Data Byte 1' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[1]' />
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Collect Data Byte 2' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[2]' />
									<argument exp='0' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Collect Data Byte 3' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[3]' />
									<argument exp='0' />
									<argument exp='2' />
								</command>
								<command class_type='call' title='Collect Data Byte 4' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[4]' />
									<argument exp='0' />
									<argument exp='3' />
								</command>
								<command class_type='call' title='Collect Data Byte 5' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[5]' />
									<argument exp='0' />
									<argument exp='4' />
								</command>
								<command class_type='call' title='Collect Data Byte 6' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[6]' />
									<argument exp='0' />
									<argument exp='5' />
								</command>
								<command class_type='call' title='Collect Data Byte 7' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[7]' />
									<argument exp='0' />
									<argument exp='6' />
								</command>
								<command class_type='call' title='Collect Data Byte 8' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='GetRxData' >
									<return exp='outgoing[8]' />
									<argument exp='0' />
									<argument exp='7' />
								</command>
								<command class_type='calculation' title='Return 9 byte data' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='out_len = 9' />
								</command>
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Register Read Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 23' swap='0' >
							<flowline >
								<command class_type='calculation' title='Combine bytes into a 16-bit address' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='Temp = .b[0]' />
									<exp exp='Temp = Temp | (.b[1] &lt;&lt; 8)' />
								</command>
								<command class_type='native' title='C Code - Read register routine' ccode='volatile char* register_ptr = (char*)FCV_TEMP;
FCV_OUTGOING[0] = *register_ptr;' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' language='C' />
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Register Write Command' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Request_Handler.a = 24' swap='0' >
							<flowline >
								<command class_type='calculation' title='Combine bytes into a 16-bit address' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='Temp = .b[0]' />
									<exp exp='Temp = Temp | (.b[1] &lt;&lt; 8)' />
								</command>
								<command class_type='native' title='C Code - Write Register Routine' ccode='volatile char* register_ptr = (char*)FCV_TEMP;
*register_ptr = FCV_INCOMING[3];' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' language='C' />
								<command class_type='goto' title='Found correct command so skip others' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
							</flowline>
							<flowline />
						</command>
						<command class_type='label' title='Connection Point' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' labelid='0' labelname='A' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='usbslave0' macro='SendString' >
							<argument exp='outgoing' />
							<argument exp='out_len' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Init_LCD' 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='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayStart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintString' >
							<argument exp='&quot; MIAC USB Slave&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayCursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintString' >
							<argument exp='&quot;    23/04/18&quot;' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='2' type='2' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayClear' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintString' >
							<argument exp='&quot; Please Connect&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayCursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintString' >
							<argument exp='&quot; the MIAC unit&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayCursor' >
							<argument exp='0' />
							<argument exp='2' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintString' >
							<argument exp='&quot; to the USB&quot;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Key_Buffer' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='Only read the keypad if the LCD is not in use' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='LCD_Lockout = 0' swap='0' >
							<flowline >
								<command class_type='call' title='Read Keypad' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='GetKeypad' >
									<return exp='current_keypress' />
								</command>
								<command class_type='decision' title='is this keypress different from the last keypress' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='current_keypress != old_keypress' swap='0' >
									<flowline >
										<command class_type='calculation' title='Flag that the keypress has changed' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='next_key = 1' />
										</command>
										<command class_type='calculation' title='Stores the current keypress' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
											<exp exp='old_keypress = current_keypress' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Check that a key has been pressed' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='current_keypress &lt; 255' swap='0' >
									<flowline >
										<command class_type='decision' title='Has the keypress changed' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='next_key = 1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Reset Key Change Variable' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
													<exp exp='next_key = 0' />
												</command>
												<command class_type='decision' title='Space in buffer?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='Key_idx &lt; 7' swap='0' >
													<flowline >
														<command class_type='calculation' title='Store Keypress into Key Buffer' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
															<exp exp='keypress_buffer[Key_idx] = current_keypress' />
														</command>
														<command class_type='calculation' title='Increment Keypress index' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
															<exp exp='Key_idx = Key_idx + 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='USB_Connected' 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='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayClear' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintString' >
							<argument exp='&quot; USB Connected&quot;' />
						</command>
						<command class_type='delay' title='Delay' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='2' type='2' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='DisplayClear' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Print_String' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Data' type='T8*' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<command class_type='calculation' title='Initialize Index' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='Temp = 0' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' type='0' exp='.Data[Temp] &gt; 0' >
							<flowline >
								<command class_type='call' title='Send character to LCD' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='PrintASCII' >
									<argument exp='.Data[Temp]' />
								</command>
								<command class_type='calculation' title='Increment Index' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
									<exp exp='Temp = Temp + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='The main program starts up the USB and then 
waits forever in a loop for incoming data.' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Startup MIAC LCD' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='Init_LCD' />
						<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='can0' macro='Initialise' />
						<command class_type='call' title='Initialize USB' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='usbslave0' macro='Initialise' />
						<command class_type='comment' title='' comment='Wait for USB connect' textarea='12,0,12,0' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' />
						<command class_type='call' title='USB Connected Message' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' macro='USB_Connected' />
						<command class_type='calculation' title='Initialize Key Logging Variables' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='LCD_Lockout = 0' />
							<exp exp='Key_idx = 0' />
							<exp exp='keypress_buffer[0] = 255' />
							<exp exp='keypress_buffer[1] = 255' />
							<exp exp='keypress_buffer[2] = 255' />
							<exp exp='keypress_buffer[3] = 255' />
							<exp exp='keypress_buffer[4] = 255' />
							<exp exp='keypress_buffer[5] = 255' />
							<exp exp='keypress_buffer[6] = 255' />
							<exp exp='keypress_buffer[7] = 255' />
						</command>
						<command class_type='interrupt' title='Start Key Buffer Interrupt' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' enable='1' name='TMR0' call='Key_Buffer' >
							<settings timer='1' prescale='256' postscale='-1' rollover='-1' bitcount='0' trigger='3' ppsport='-1' ppspin='-1' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='1' />
								<option value='0' />
								<option value='8' />
								<option value='-1' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
								<option value='0' />
							</settings>
						</command>
						<command class_type='delay' title='Delay' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='20' type='1' />
						<command class_type='call' title='Start MIAC Slave Service' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='usbslave0' macro='RunSlaveService' />
						<command class_type='comment' title='' comment='Start slave service is
a blocking function so
we should not get here.' textarea='12,0,12,0' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Output_Bank_Write' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Mask' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Data' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Is mask 1 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x01' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x01' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayON' >
											<argument exp='1' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayOFF' >
											<argument exp='1' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 2 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x02' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x02' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayON' >
											<argument exp='2' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayOFF' >
											<argument exp='2' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 3 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x04' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x04' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayON' >
											<argument exp='3' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayOFF' >
											<argument exp='3' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 4 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x08' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x08' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayON' >
											<argument exp='4' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='RelayOFF' >
											<argument exp='4' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 5 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x10' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x10' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputON' >
											<argument exp='1' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputOFF' >
											<argument exp='1' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 6 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x20' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x20' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputON' >
											<argument exp='2' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputOFF' >
											<argument exp='2' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 7 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x40' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x40' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputON' >
											<argument exp='3' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputOFF' >
											<argument exp='3' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Is mask 8 active' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Mask &amp; 0x80' swap='0' >
							<flowline >
								<command class_type='decision' title='Switch On?' cmdcolor='4767473' cmdcolor_sec='11337727' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' exp='.Data &amp; 0x80' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputON' >
											<argument exp='4' />
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='OutputOFF' >
											<argument exp='4' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Input_Bank_Read' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Read Input 1' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[0]' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Read Input 2' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[1]' />
							<argument exp='2' />
						</command>
						<command class_type='call' title='Read Input 3' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[2]' />
							<argument exp='3' />
						</command>
						<command class_type='call' title='Read Input 4' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[3]' />
							<argument exp='4' />
						</command>
						<command class_type='call' title='Read Input 5' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[4]' />
							<argument exp='5' />
						</command>
						<command class_type='call' title='Read Input 6' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[5]' />
							<argument exp='6' />
						</command>
						<command class_type='call' title='Read Input 7' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[6]' />
							<argument exp='7' />
						</command>
						<command class_type='call' title='Read Input 8' cmdcolor='4487093' cmdcolor_sec='11066367' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' component='miac0' macro='InputDIGITAL' >
							<return exp='outgoing[7]' />
							<argument exp='8' />
						</command>
						<command class_type='calculation' title='Return 8 bytes' cmdcolor='4206456' cmdcolor_sec='10785756' cmdcolor_txt='16777215' cmdgradient='4' cmdopacity='0.64' >
							<exp exp='out_len = 8' />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='d69543a8-f38b-488a-b905-9fa2d5970beb' vmin='7' vmaj='1' codename='miac0' panelId='-1' x='45' y='0' z='-2733.1' xsz='57.8503' ysz='47.9091' zsz='1.14286' 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='LCD_X' data='12' />
					<value target='LCD_Y' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='26cbc2df-5ef0-47db-ab2f-c2425b14462f' vmin='3' vmaj='1' codename='usbslave0' panelId='0' x='330' y='-75' z='0.57143' xsz='25.4237' ysz='22.8557' zsz='1.14286' 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='vendor_ID' data='4799' />
					<value target='product_ID' data='528' />
					<value target='dev_name' data='Sense and Control MIAC' />
					<value target='dev_manufacturer' data='Matrix Multimedia Ltd.' />
					<value target='major_version' data='1' />
					<value target='minor_version' data='0' />
					<value target='enumeration_tout' data='0' />
					<value target='timeout' data='1' />
					<value target='country_code' data='0' />
					<value target='max_current' data='500' />
					<value target='usb_type' data='1' />
					<value target='slave_macro' data='Request_Handler' />
					<value target='slave_params' data='014' />
					<value target='driver_directory' data='$(srcdir)' />
					<value target='driver_filename' data='mm_mchpusb' />
					<value target='gen_driver' data='0' />
					<value target='Instance' data='000' />
					<value target='SimTimeout' data='1000' />
					<value target='vid_pid_str' data='vid_12bf&amp;pid_0210' />
					<value target='label' data='USB Slave' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='dcbf571f-a6fa-402d-bdd4-be00cca4070f' vmin='2' vmaj='1' codename='eeprom0' panelId='0' x='330' y='-218.55' z='0.949227' xsz='25.4237' ysz='23.2054' zsz='1.14286' 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='EESize' data='256 byte' />
					<value target='EEbitdepth' data='8 bit' />
					<value target='InitialValues' data='0,1,0x2,0x03,&apos;A&apos;,&apos;b&apos;,&quot;Hello&quot;' />
					<value target='InitValsParsed' data='0,1,0x2,0x03,&apos;A&apos;,&apos;b&apos;,&apos;H&apos;,&apos;e&apos;,&apos;l&apos;,&apos;l&apos;,&apos;o&apos;' />
					<value target='ResetValues' data='0' />
					<value target='BitDepth' data='8' />
					<value target='Sim' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='da332928-6342-4c2c-afc7-eaf33917d33e' vmin='10' vmaj='2' codename='can0' panelId='0' x='460' y='-210' z='0.755' xsz='23.0769' ysz='23.2054' 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='2' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL_CAN' data='0' />
					<value target='EXT_OSC' data='000' />
					<value target='BUS_RATE' data='002' />
					<value target='SJW' data='000' />
					<value target='SAMPLE' data='1' />
					<value target='cal_can::CCFG' data='0' />
					<value target='EXID' data='000' />
					<value target='OSM' data='000' />
					<value target='REF' data='0' />
					<value target='OSC' data='48000000' />
					<value target='BAUD1' data='1' />
					<value target='BAUD2' data='209' />
					<value target='BAUD3' data='3' />
					<value target='cal_spi::CHANNEL' data='1' />
					<value target='cal_spi::MOSI' data='$PORTC.7' />
					<value target='cal_spi::MOSIPins' data='000' />
					<value target='cal_spi::MISO' data='$PORTB.0' />
					<value target='cal_spi::MISOPins' data='086' />
					<value target='cal_spi::CLK' data='$PORTB.1' />
					<value target='cal_spi::CLKPins' data='001' />
					<value target='cal_spi::SS' data='$PORTD.7' />
					<value target='cal_spi::PR_SCALE' data='016' />
					<value target='cal_spi::SMP' data='001' />
					<value target='CONFIG_DELAY' data='000' />
					<value target='TXPin' data='' />
					<value target='TXRemap' data='' />
					<value target='RXPin' data='' />
					<value target='RXRemap' data='' />
					<value target='TXB0ID' data='109' />
					<value target='TXB0LEN' data='8' />
					<value target='TXB0DB0' data='0' />
					<value target='TXB0DB1' data='0' />
					<value target='TXB0DB2' data='0' />
					<value target='TXB0DB3' data='0' />
					<value target='TXB0DB4' data='0' />
					<value target='TXB0DB5' data='0' />
					<value target='TXB0DB6' data='0' />
					<value target='TXB0DB7' data='0' />
					<value target='TXB1ID' data='512' />
					<value target='TXB1LEN' data='8' />
					<value target='TXB1DB0' data='9' />
					<value target='TXB1DB1' data='8' />
					<value target='TXB1DB2' data='7' />
					<value target='TXB1DB3' data='6' />
					<value target='TXB1DB4' data='5' />
					<value target='TXB1DB5' data='4' />
					<value target='TXB1DB6' data='3' />
					<value target='TXB1DB7' data='2' />
					<value target='TXB2ID' data='513' />
					<value target='TXB2LEN' data='8' />
					<value target='TXB2DB0' data='0' />
					<value target='TXB2DB1' data='0' />
					<value target='TXB2DB2' data='0' />
					<value target='TXB2DB3' data='0' />
					<value target='TXB2DB4' data='0' />
					<value target='TXB2DB5' data='0' />
					<value target='TXB2DB6' data='0' />
					<value target='TXB2DB7' data='0' />
					<value target='RXB0CFG' data='2' />
					<value target='RXM0' data='2047' />
					<value target='RXF0' data='697' />
					<value target='Filter0' data='0x0209
0x0219
0x0229
0x0239
0x0249
0x0259
0x0269
0x0279
0x0289
0x0299
0x02a9
0x02b9
0x02c9
0x02d9
0x02e9
0x02f9
' />
					<value target='RXF1' data='2047' />
					<value target='Filter1' data='0x0209
0x0219
0x0229
0x0239
0x0249
0x0259
0x0269
0x0279
0x0289
0x0299
0x02a9
0x02b9
0x02c9
0x02d9
0x02e9
0x02f9
' />
					<value target='RXB1CFG' data='000' />
					<value target='RXM1' data='2047' />
					<value target='RXF2' data='704' />
					<value target='Filter2' data='0x0209
0x0219
0x0229
0x0239
0x0249
0x0259
0x0269
0x0279
0x0289
0x0299
0x02a9
0x02b9
0x02c9
0x02d9
0x02e9
0x02f9
' />
					<value target='RXF3' data='2047' />
					<value target='Filter3' data='0x00
0x10
0x20
0x30
0x40
0x50
0x60
0x70
0x80
0x90
0xa0
0xb0
0xc0
0xd0
0xe0
0xf0
' />
					<value target='RXF4' data='2047' />
					<value target='Filter4' data='0x00
0x10
0x20
0x30
0x40
0x50
0x60
0x70
0x80
0x90
0xa0
0xb0
0xc0
0xd0
0xe0
0xf0
' />
					<value target='RXF5' data='2047' />
					<value target='Filter5' data='0x00
0x10
0x20
0x30
0x40
0x50
0x60
0x70
0x80
0x90
0xa0
0xb0
0xc0
0xd0
0xe0
0xf0
' />
					<value target='MIAC' data='0' />
					<value target='label' data='CAN Bus' />
					<value target='SimComms' data='0' />
					<value target='cal_spi::ScopeTraces' data='1' />
					<value target='cal_spi::ConsoleData' data='1' />
					<value target='cal_spi::Injector' data='000' />
					<value target='cal_spi1::InjectorCS' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='0' vmaj='1' codename='PWM1' panelId='0' x='70' y='-150' z='1.75' xsz='25.4237' ysz='25.796' 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='2' poslock='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTC.2' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='0' />
					<value target='period_calc' data='21.333334' />
					<value target='frequency_calc2' data='46875.000000' />
					<value target='frequency_calc' data='46.875000' />
					<value target='pwm_prescale' data='1' />
					<value target='ReqFreq' data='100.000000' />
					<value target='OldReqFreq' data='100.000000' />
					<value target='CalcFreq' data='100.004570' />
					<value target='CalcPeriod' data='10936' />
					<value target='CalcScaler' data='64' />
					<value target='Apply' data='0' />
					<value target='ClockSpeed' data='48000000' />
					<value target='SimRep' data='000' />
					<value target='Family' data='PIC' />
					<value target='ModifiedConnection' data='C.2' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='0' vmaj='1' codename='PWM2' panelId='0' x='190' y='-150' z='0.511' xsz='25.4237' ysz='25.796' 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='2' poslock='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='002' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTC.1' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='000' />
					<value target='period_calc' data='21.333334' />
					<value target='frequency_calc2' data='46875.000000' />
					<value target='frequency_calc' data='46.875000' />
					<value target='pwm_prescale' data='1' />
					<value target='ReqFreq' data='100.000000' />
					<value target='OldReqFreq' data='100.000000' />
					<value target='CalcFreq' data='100.004570' />
					<value target='CalcPeriod' data='10936' />
					<value target='CalcScaler' data='64' />
					<value target='Apply' data='0' />
					<value target='ClockSpeed' data='48000000' />
					<value target='SimRep' data='000' />
					<value target='Family' data='PIC' />
					<value target='ModifiedConnection' data='C.1' />
				</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='28.5865' ye='21.1421' ze='911.092' xt='28.5865' yt='21.1421' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='512' dy='401' zoom='67.9975' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='65535' />
		<winpos ID='7005' RectRecentFloat='-990,806,-450,1314' RectRecentDocked='2244,-97,2755,638' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='76' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='39' />
		<camera xe='563.31' ye='14.668' ze='4673.3' xt='563.31' yt='14.668' 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='-861,465,-207,1042' RectRecentDocked='702,356,1348,896' 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='-1590,830,-1005,1291' RectRecentDocked='0,0,400,1000' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
			<background fill='288230376151053813' showgrid='1' gridstyle='1' gridsize='10' gridbrush='71776119075691740' snaptogrid='1' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Request_Handler' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA.gMAABkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA.gMAABkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Init_LCD' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA.gMAABkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Print_String' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA.gMAABkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='USB_Connected' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA.gMAABkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Output_Bank_Write' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAA.gMAABkDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
