<root>
<document schema='101' license='1,Dev User,HVZ3ET' title='' description='' target='RPI.RPI.BL0036' >
	<config data='' clkspd='76800000' simspd='1' usewdt='0' constif='0' SSH_IP='01652BBCDF86326B5B326859C5568F76' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='19' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='14' />
			<data name='CalculatedCommsDelay' value='14' />
		</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='f533d40a-1b58-4080-b8eb-99412d9c9b4e' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='PrintLastError' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='ErrorCode' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='ErrorText' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='32' />
						</local>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='LastError' >
							<return exp='.ErrorCode' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='ErrorAsString' >
							<return exp='.ErrorText' />
							<argument exp='.ErrorCode' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='print' >
							<argument exp='&quot;MQTT ERROR: &quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
							<argument exp='.ErrorText' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<local name='State' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Topic' type='T8' description='' isconst='0' isinit='1' usrinit='&quot;&quot;' setinit='&quot;&quot;' >
							<array size='64' />
						</local>
						<local name='MessageSize' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Exit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Counter' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Value' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Payload' type='T8' description='' isconst='0' isinit='1' usrinit='&quot;&quot;' setinit='&quot;&quot;' >
							<array size='64' />
						</local>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
							<argument exp='&quot;Starting&quot;' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='TCP_IP_Pi1' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='Connect' >
							<return exp='.State' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.State' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
									<argument exp='&quot;Connected OK&quot;' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.MessageSize = 0' />
									<exp exp='.Exit = 0' />
									<exp exp='.Topic = &quot;&quot;' />
									<exp exp='.Counter = 0' />
								</command>
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='Subscribe' >
									<return exp='.State' />
									<argument exp='&quot;test&quot;' />
								</command>
								<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.State' swap='0' >
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
											<argument exp='&quot;Subscribed OK&quot;' />
										</command>
										<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='(.Exit = 0)' start='0' >
											<flowline >
												<command class_type='delay' title='Delay' cmdcolor='12632064' cmdcolor_sec='16769676' exp='100' type='1' />
												<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='Read' >
													<return exp='.MessageSize' />
												</command>
												<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.MessageSize' swap='0' >
													<flowline >
														<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='GetTopic' >
															<argument exp='.Topic' />
															<argument exp='64' />
														</command>
														<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='GetPayload' >
															<argument exp='.Payload' />
															<argument exp='64' />
														</command>
														<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='print' >
															<argument exp='.Topic' />
														</command>
														<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='print' >
															<argument exp='&quot;,&quot;' />
														</command>
														<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
															<argument exp='.Payload' />
														</command>
													</flowline>
													<flowline />
												</command>
												<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
													<exp exp='.Counter = .Counter + 1' />
												</command>
												<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.Counter &gt; 100' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
															<exp exp='.Counter = 0' />
														</command>
														<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='Ping' >
															<return exp='.State' />
														</command>
														<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.State = 0' swap='0' >
															<flowline >
																<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
																	<argument exp='&quot;Ping failed&quot;' />
																</command>
																<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
																	<exp exp='.Exit = 1' />
																</command>
															</flowline>
															<flowline >
																<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
																	<argument exp='&quot;Sent Ping&quot;' />
																</command>
															</flowline>
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
										</command>
									</flowline>
									<flowline >
										<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
											<argument exp='&quot;Subscribe failed&quot;' />
										</command>
										<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='PrintLastError' />
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
									<argument exp='&quot;Not connected&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='PrintLastError' />
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='MQTT_Client1' macro='Disconnect' >
							<return exp='.State' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.State' swap='0' >
							<flowline />
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
									<argument exp='&quot;Disconnect failed&quot;' />
								</command>
								<command class_type='call' title='Call Macro' cmdcolor='1879295' cmdcolor_sec='5751039' macro='PrintLastError' />
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1879295' cmdcolor_sec='5751039' component='DebugPrint1' macro='println' >
							<argument exp='&quot;Test completed&quot;' />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='459c9cfb-82e3-40ad-9456-54fc40ba5e6c' vmin='0' vmaj='1' codename='MQTT_Client1' x='-30' y='0' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='HOST' data='192.168.1.18' />
					<value target='PORT' data='1883' />
					<value target='CLIENT' data='Flowcode' />
					<value target='TIMEOUT' data='100' />
					<value target='KEEP_ALIVE' data='20' />
					<value target='NETWORK_COMPONENT' data='NetworkComms1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='a1da060c-e74a-4e12-bb90-3ddb43265592' vmin='0' vmaj='1' codename='DebugPrint1' x='-30' y='30' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values />
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='0341d84f-f7fd-473c-8076-b38b2d563e13' vmin='9' vmaj='1' codename='TCP_IP_Pi1' x='-10' y='-40' z='0' xsz='66' ysz='34' zsz='7.5' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='label' data='RPi TCP/IP' />
					<value target='RemapIndex' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='91049bf5-2436-42dc-947a-c30c86463d98' vmin='2' vmaj='1' codename='NetworkComms1' x='0' y='0' z='0' xsz='25' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Component' data='TCP_IP_Pi1' />
					<value target='RemapIndex' data='1' />
					<value target='Status' data='Supported' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='ParseIPString' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Connect' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Connect' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='5' scrolly='401' flags='0' />
		<view type='0' name='Connect' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='295' scrolly='83' flags='0' />
		<view type='0' name='SocketOpen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='0' scrolly='1197' flags='0' />
		<view type='0' name='SocketOpen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintLastError' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARAMAAEgDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
