<root>
<document scada='0' projtype='1' schema='103' license='1,60868906,6HTZ0E' title='' description='' fcversion='720897' target='ARD.ATMEGA.Arduino Uno R3 PDIP' >
	<config data='' clkspd='16000000' 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='3' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='3' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='11' />
			<data name='CalculatedCommsDelay' value='11' />
			<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' bIsWysiwyg='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' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='IN' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TIMEOUT' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RETVAL' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='IDX' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='RX_IP' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='1' >
					<def class_type='variable' name='RX_MAC' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='6' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='TX_IP' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='WAIT_FOR_KEY' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='label' title='Connection Point' textarea='36,0,511,300' labelid='0' labelname='A' />
						<command class_type='input' title='Input' textarea='36,0,511,300' mode='1' port='1048577' mask='2' exp='IN' usechipref='1' />
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='IN = 0' swap='0' >
							<flowline >
								<command class_type='goto' title='Goto Connection Point' textarea='36,0,511,300' labelid='0' labelname='A' />
							</flowline>
							<flowline >
								<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='10' type='1' />
							</flowline>
						</command>
						<command class_type='label' title='Connection Point' textarea='36,0,511,300' labelid='1' labelname='B' />
						<command class_type='input' title='Input' textarea='36,0,511,300' mode='1' port='1048577' mask='2' exp='IN' usechipref='1' />
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='IN &lt;&gt; 0' swap='0' >
							<flowline >
								<command class_type='goto' title='Goto Connection Point' textarea='36,0,511,300' labelid='1' labelname='B' />
							</flowline>
							<flowline >
								<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='10' type='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='DISPLAY_ARP_RESPONSE' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='Cursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_IP[0]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;RX IP - &quot;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_IP[0]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_IP[1]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_IP[1]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_IP[2]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_IP[2]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_IP[3]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_IP[3]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='Cursor' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;MAC - &quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_MAC[0]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_MAC[0]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_MAC[1]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_MAC[1]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_MAC[2]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_MAC[2]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_MAC[3]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_MAC[3]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_MAC[4]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_MAC[4]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintASCII' >
							<argument exp='&apos;.&apos;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;.&quot;' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintNumber' >
							<argument exp='RX_MAC[5]' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
							<argument exp='RX_MAC[5]' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SEND_ARP_REQUEST' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Start of packet' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxStart' >
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='Destination MAC address
Braodcast address =
255.255.255.255.255.255
' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='255' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='255' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='255' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='255' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='255' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='255' />
						</command>
						<command class_type='comment' title='' comment='source MAC address' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendMyMAC' >
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='Type = ARP
= 8,6' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='8' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='6' />
						</command>
						<command class_type='comment' title='' comment='End of Ethernet header
What follows is contained in the
Ethernet Data section' textarea='12,0,487,300' />
						<command class_type='comment' title='' comment='Start of ARP datagram' textarea='12,0,487,300' />
						<command class_type='comment' title='' comment='hardware type
Ethernet = 0,1' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='comment' title='' comment='protocol type
IP = 8,0' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='8' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='hardware size
MAC address = 6 bytes' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='6' />
						</command>
						<command class_type='comment' title='' comment='protocol size
IP address = 4 bytes' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='4' />
						</command>
						<command class_type='comment' title='' comment='operation
ARP request = 0,1
ARP reply = 0,2
' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='1' />
						</command>
						<command class_type='comment' title='' comment='source MAC' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendMyMAC' >
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='source IP' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendMyIP' >
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='destination MAC' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='comment' title='' comment='destination IP' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='TX_IP[0]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='TX_IP[1]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='TX_IP[2]' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxSendByte' >
							<argument exp='0' />
							<argument exp='TX_IP[3]' />
						</command>
						<command class_type='comment' title='' comment='End of packet' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' component='TCP_IP_W5500' macro='TxEnd' >
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Version_Comments' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='1B - Change device to Arduino UNO R3 PDIP. 
   - Change programmer to AVRISmkII.
   - Change input pin from 7 to 0.' textarea='12,0,12,0' />
						<command class_type='comment' title='' comment='1A - Change display to serial output.
   - Disable text display output.' textarea='12,0,12,0' />
					</flowline>
				</macro>
				<macro >
					<flowline name='CHECK_ARP_RESPONSE' description='Check ARP response' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='RxDataAvailable' >
							<return exp='RETVAL' />
							<argument exp='0' />
						</command>
						<command class_type='decision' title='Data received?' textarea='36,0,511,300' exp='RETVAL &lt;&gt; 0' swap='0' >
							<flowline >
								<command class_type='comment' title='' comment='check for ARP packet
' textarea='12,0,487,300' />
								<command class_type='decision' title='Decision' exp='RETVAL = 62' swap='0' >
									<flowline >
										<command class_type='call' title='Skip Ethernet Destination' component='TCP_IP_W5500' macro='RxSkipBytes' >
											<argument exp='0' />
											<argument exp='6' />
										</command>
										<command class_type='call' title='Skip Ethernet Source' component='TCP_IP_W5500' macro='RxSkipBytes' >
											<argument exp='0' />
											<argument exp='6' />
										</command>
										<command class_type='call' title='Match ARP Packet' component='TCP_IP_W5500' macro='RxMatch_2_Bytes' >
											<return exp='RETVAL' />
											<argument exp='0' />
											<argument exp='8' />
											<argument exp='6' />
										</command>
										<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='RETVAL &lt;&gt; 0' swap='0' >
											<flowline >
												<command class_type='comment' title='' comment='Check for APR reply
' textarea='12,0,487,300' />
												<command class_type='call' title='Skip Hardware Type' component='TCP_IP_W5500' macro='RxSkipBytes' >
													<argument exp='0' />
													<argument exp='2' />
												</command>
												<command class_type='call' title='Skip Protocol Type' component='TCP_IP_W5500' macro='RxSkipBytes' >
													<argument exp='0' />
													<argument exp='2' />
												</command>
												<command class_type='call' title='Skip Hardware Size' component='TCP_IP_W5500' macro='RxSkipBytes' >
													<argument exp='0' />
													<argument exp='1' />
												</command>
												<command class_type='call' title='Skip Protocol Size' component='TCP_IP_W5500' macro='RxSkipBytes' >
													<argument exp='0' />
													<argument exp='1' />
												</command>
												<command class_type='call' title='Match ARP Response' component='TCP_IP_W5500' macro='RxMatch_2_Bytes' >
													<return exp='RETVAL' />
													<argument exp='0' />
													<argument exp='0' />
													<argument exp='2' />
												</command>
												<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='RETVAL &lt;&gt; 0' swap='0' >
													<flowline >
														<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='READ_MAC_AND_IP' />
														<command class_type='comment' title='' comment='we can ignore the remainder 
of the packet' textarea='12,0,487,300' />
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='RxFlushData' >
									<argument exp='0' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='READ_MAC_AND_IP' description='read in the MAC and IP addresses' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Read MAC address' textarea='12,0,487,300' />
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
							<exp exp='IDX = 0' />
						</command>
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='IDX &lt; 6' >
							<flowline >
								<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='RxReadByte' >
									<return exp='RETVAL' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='RX_MAC[IDX] = RETVAL' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='IDX = IDX + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='Read IP address' textarea='12,0,487,300' />
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
							<exp exp='IDX = 0' />
						</command>
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='IDX &lt; 4' >
							<flowline >
								<command class_type='call' title='Call Macro' component='TCP_IP_W5500' macro='RxReadByte' >
									<return exp='RETVAL' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='RX_IP[IDX] = RETVAL' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' >
									<exp exp='IDX = IDX + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Initialize the LCD' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='Start' />
						<command class_type='call' title='Component Macro' component='UART1' macro='Initialise' />
						<command class_type='call' title='' disable='1' component='LCD_BL0169' macro='PrintString' >
							<argument exp='&quot;Init &quot;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;INIT&quot;' />
						</command>
						<command class_type='call' title='Initialise the Internet E-Block' component='TCP_IP_W5500' macro='Initialise' />
						<command class_type='call' title='' disable='1' component='LCD_BL0169' macro='PrintString' >
							<argument exp='&quot;Socket &quot;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;SOCKET&quot;' />
						</command>
						<command class_type='call' title='Create a socket' textarea='56,-6,56,-6' component='TCP_IP_W5500' macro='CreateMACSocket' >
							<return exp='RETVAL' />
							<argument exp='0' />
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' exp='RETVAL &lt;&gt; 0' swap='1' >
							<flowline >
								<command class_type='call' title='Call Macro' disable='1' component='LCD_BL0169' macro='PrintString' >
									<argument exp='&quot;Failed&quot;' />
								</command>
								<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
									<argument exp='&quot;FAILED&quot;' />
								</command>
								<command class_type='comment' title='' comment='Socket initialisation failed.
Go to end' textarea='12,0,487,300' />
								<command class_type='goto' title='Goto Connection Point' textarea='36,0,511,300' labelid='1' labelname='B' />
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='' disable='1' component='LCD_BL0169' macro='PrintString' >
							<argument exp='&quot;OK&quot;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;OK&quot;' />
						</command>
						<command class_type='call' title='Wait until user presses a key' textarea='36,0,511,300' macro='WAIT_FOR_KEY' />
						<command class_type='calculation' title='Initial IP to check' >
							<exp exp='TX_IP[0] = 192' />
							<exp exp='TX_IP[1] = 168' />
							<exp exp='TX_IP[2] = 0' />
							<exp exp='TX_IP[3] = 1' />
						</command>
						<command class_type='loop' title='Loop' textarea='36,0,511,300' type='0' exp='TX_IP[3] &lt; 255' start='0' >
							<flowline >
								<command class_type='comment' title='' comment='Display IP on the LCD' textarea='12,0,487,300' />
								<command class_type='call' title='Clear LCD' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='Clear' />
								<command class_type='call' title='Display IP' disable='1' component='LCD_BL0169' macro='PrintNumber' >
									<argument exp='TX_IP[3]' />
								</command>
								<command class_type='call' title='Component Macro' component='UART1' macro='SendNumber' >
									<argument exp='TX_IP[3]' />
								</command>
								<command class_type='comment' title='' comment='Send out an ARP request' textarea='12,0,487,300' />
								<command class_type='call' title='Call Component Macro' component='TCP_IP_W5500' macro='RxFlushData' >
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='SEND_ARP_REQUEST' />
								<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='10' type='1' />
								<command class_type='calculation' title='Reset the timeout' textarea='36,0,511,300' >
									<exp exp='TIMEOUT = 0' />
								</command>
								<command class_type='comment' title='' comment='Check for an ARP response' textarea='12,0,487,300' />
								<command class_type='label' title='Connection Point' textarea='36,0,511,300' labelid='0' labelname='A' />
								<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='CHECK_ARP_RESPONSE' />
								<command class_type='decision' title='Is there an ARP response?' textarea='36,0,511,300' exp='RETVAL &lt;&gt; 0' swap='1' >
									<flowline >
										<command class_type='calculation' title='Inc timeout' textarea='36,0,511,300' >
											<exp exp='TIMEOUT = TIMEOUT + 1' />
										</command>
										<command class_type='decision' title='Timeout reached?' textarea='36,0,511,300' exp='TIMEOUT = 200' swap='1' >
											<flowline >
												<command class_type='delay' title='Delay' textarea='36,0,511,300' exp='1' type='1' />
												<command class_type='goto' title='Recheck for ARP response' textarea='36,0,511,300' labelid='0' labelname='A' />
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='comment' title='' comment='Display the ARP response' textarea='12,0,487,300' />
										<command class_type='call' title='Call Macro' macro='DISPLAY_ARP_RESPONSE' />
										<command class_type='comment' title='' comment='Wait for the user to 
press a key' textarea='12,0,487,300' />
										<command class_type='call' title='Call Macro' textarea='36,0,511,300' macro='WAIT_FOR_KEY' />
										<command class_type='call' title='Clear LCD' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='Clear' />
									</flowline>
								</command>
								<command class_type='calculation' title='Inc IP address' textarea='36,0,511,300' >
									<exp exp='TX_IP[3] = TX_IP[3] + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='Finished' textarea='12,0,487,300' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='Clear' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' disable='1' component='LCD_BL0169' macro='PrintString' >
							<argument exp='&quot;Done&quot;' />
						</command>
						<command class_type='call' title='Component Macro' component='UART1' macro='SendString' >
							<argument exp='&quot;DONE&quot;' />
						</command>
						<command class_type='label' title='Connection Point' textarea='36,0,511,300' labelid='1' labelname='B' />
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='e18e39d3-2e05-4a15-b8aa-e8ada16cd3ef' vmin='0' vmaj='10' codename='TCP_IP_W5500' panelId='0' x='227.776' y='-233' z='0' xsz='25' ysz='25' 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='2' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='ORDINAL' data='000' />
					<value target='cal_spi::CHANNEL' data='000' />
					<value target='cal_spi::PR_SCALE' data='064' />
					<value target='cal_spi::MOSI' data='$PORTC.3' />
					<value target='cal_spi::MOSIPins' data='008' />
					<value target='cal_spi::MISO' data='$PORTC.4' />
					<value target='cal_spi::MISOPins' data='013' />
					<value target='cal_spi::CLK' data='$PORTC.5' />
					<value target='cal_spi::CLKPins' data='004' />
					<value target='cal_spi::SS' data='$PORTC.2' />
					<value target='gateway0' data='192' />
					<value target='gateway1' data='168' />
					<value target='gateway2' data='0' />
					<value target='gateway3' data='1' />
					<value target='subnet0' data='255' />
					<value target='subnet1' data='255' />
					<value target='subnet2' data='255' />
					<value target='subnet3' data='0' />
					<value target='ip0' data='192' />
					<value target='ip1' data='168' />
					<value target='ip2' data='0' />
					<value target='ip3' data='222' />
					<value target='mac0' data='0' />
					<value target='mac1' data='8' />
					<value target='mac2' data='220' />
					<value target='mac3' data='123' />
					<value target='mac4' data='23' />
					<value target='mac5' data='0' />
					<value target='MIAC_SYSTEM' data='0' />
					<value target='label' data='WIZ TCP/IP' />
					<value target='SimType' data='000' />
					<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='' />
					<value target='TCP_Base::interface' data='0' />
					<value target='DHCP' data='0' />
					<value target='RemapIndex' data='3' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='ee697d50-7fb5-4074-8cd6-996e5c386722' vmin='0' vmaj='1' codename='LCD_BL0169' panelId='0' x='248.056' y='-56.984' z='1' xsz='25' ysz='25' 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' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='LCD1::Pin_Data_0' data='$PORTB.0' />
					<value target='LCD1::Pin_Data_1' data='$PORTB.1' />
					<value target='LCD1::Pin_Data_2' data='$PORTB.2' />
					<value target='LCD1::Pin_Data_3' data='$PORTB.3' />
					<value target='LCD1::Pin_RS' data='$PORTB.4' />
					<value target='LCD1::Pin_E' data='$PORTB.5' />
					<value target='LCD1::ctrl_lcd::Base_GLCD1::ComponentLabel' data='000' />
					<value target='LCD1::ctrl_lcd::Base_GLCD1::GdiText1::sText' data='LCD_BL0169' />
					<value target='LCD1::ctrl_lcd::Base_GLCD1::GdiText1::dScale' data='1.000000' />
					<value target='LCD1::ctrl_lcd::TextColour' data='0' />
					<value target='LCD1::ctrl_lcd::TextBg' data='14803425' />
					<value target='LCD1::ctrl_lcd::DisplayBg' data='16777215' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='3' codename='UART1' panelId='0' x='394' y='-227' z='2' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='000' />
					<value target='cal_uart::BAUD_LIST' data='004' />
					<value target='cal_uart::BAUD' data='9600' />
					<value target='cal_uart::DBITS' data='008' />
					<value target='cal_uart::RETURN' data='001' />
					<value target='cal_uart::ECHO' data='000' />
					<value target='cal_uart::UseTX' data='1' />
					<value target='cal_uart::TX' data='$PORTD.1' />
					<value target='cal_uart::OutputPins' data='000' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::UseRX' data='0' />
					<value target='cal_uart::RX' data='' />
					<value target='cal_uart::InputPins' data='001' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::FLOWEN' data='000' />
					<value target='cal_uart::RTS' data='$PORTB.2' />
					<value target='cal_uart::CTS' data='$PORTB.1' />
					<value target='label' data='UART' />
					<value target='cal_uart::ScopeTraces' data='0' />
					<value target='cal_uart::ConsoleData' data='1' />
					<value target='cal_uart::ConsoleFormat' data='000' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='000' />
					<value target='cal_uart::com_port' data='000' />
					<value target='cal_uart::Injector' data='000' />
					<value target='cal_uart::APIUseDDR' data='' />
					<value target='cal_uart::APIDDRPin' data='' />
					<value target='cal_uart::APIDDRRXState' data='' />
					<value target='cal_uart::APIUseFC' data='' />
					<value target='cal_uart::APICTSPin' data='' />
					<value target='cal_uart::APIRTSPin' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='3' codename='UART2' panelId='0' x='97' y='-234' z='3' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='cal_uart::CHANNEL' data='002' />
					<value target='cal_uart::BAUD_LIST' data='004' />
					<value target='cal_uart::BAUD' data='9600' />
					<value target='cal_uart::DBITS' data='008' />
					<value target='cal_uart::RETURN' data='001' />
					<value target='cal_uart::ECHO' data='000' />
					<value target='cal_uart::UseTX' data='1' />
					<value target='cal_uart::TX' data='$PORTB.0' />
					<value target='cal_uart::OutputPins' data='000' />
					<value target='cal_uart::TXAlt' data='0' />
					<value target='cal_uart::UseRX' data='1' />
					<value target='cal_uart::RX' data='' />
					<value target='cal_uart::InputPins' data='001' />
					<value target='cal_uart::RXAlt' data='0' />
					<value target='cal_uart::FLOWEN' data='000' />
					<value target='cal_uart::RTS' data='$PORTB.2' />
					<value target='cal_uart::CTS' data='$PORTB.1' />
					<value target='label' data='UART' />
					<value target='cal_uart::ScopeTraces' data='0' />
					<value target='cal_uart::ConsoleData' data='1' />
					<value target='cal_uart::ConsoleFormat' data='000' />
					<value target='cal_uart::ConsoleColumns' data='64' />
					<value target='cal_uart::DataSource' data='000' />
					<value target='cal_uart::com_port' data='000' />
					<value target='cal_uart::Injector' data='000' />
					<value target='cal_uart::APIUseDDR' data='' />
					<value target='cal_uart::APIDDRPin' data='' />
					<value target='cal_uart::APIDDRRXState' data='' />
					<value target='cal_uart::APIUseFC' data='' />
					<value target='cal_uart::APICTSPin' data='' />
					<value target='cal_uart::APIRTSPin' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='0' ye='0' ze='215.459' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='420' dy='513' zoom='235.868' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='0' />
		<winpos ID='7005' RectRecentFloat='781,33,1680,1025' RectRecentDocked='0,0,420,536' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='0' perspective='1' >
		<background rgb='32768' img='' style='0' />
		<table rgb='8404224' img='' style='0' size='25' />
		<camera xe='-2.22802' ye='-12.8483' ze='291.135' xt='-2.22802' yt='-12.8483' 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='0,239,654,816' RectRecentDocked='0,0,432,566' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='Embedded Internet' type='0' >
			<winpos ID='1171' RectRecentFloat='843,606,1424,982' RectRecentDocked='846,141,1294,602' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='1' />
			<background fill='72057594032269737' showgrid='0' gridstyle='1' gridsize='10' gridbrush='71776119075691740' snaptogrid='1' fitcomp='0' disp_x='300' disp_y='400' scale='100' disp_col='16777215' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='WAIT_FOR_KEY' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='CHECK_ARP_RESPONSE' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='DISPLAY_ARP_RESPONSE' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='READ_MAC_AND_IP' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SEND_ARP_REQUEST' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Version_Comments' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAfAMAAMgBAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
