<root>
<document scada='0' schema='102' license='10,FCDev,PUA8F7' title='Demo I2C Component' description='A starting point for creating a component based on I2C communications.

Includes the I2C CAL component with all the nesssisary exposed properties.' fcversion='590336' target='PIC.16F.16F18877' >
	<config data='!0,3f8c!10,37fd!20,3f92!30,1fff!40,3fff%0,4%4,0%8,1%b,1%d,1%10,1%11,0%15,1%16,3%19,1%1a,1%1b,0%1c,1%1d,1%20,12%25,0%28,7%2b,7%30,3%3c,1%3d,0%40,1%41,1' clkspd='32000000' simspd='0' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='.Ret' />
		<watch expr='.RetVal' />
		<watch expr='.f' />
	</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='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='6' />
			<data name='CalculatedCommsDelay' value='6' />
			<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='0' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='c416a604-834b-48ba-a5e8-a47cad4f08de' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='BME688 Air Quality' description='An air quality sensor connected using a standard I2C bus.
Capable of detecting indoor and outdoor air quality including CO² H² VOCs and VSCs.' category='Environmental' category2='' category3='' bIs2dOnly='1' catenable='1' author='MatrixTSL' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='1' embeddedCompatible='1' iconpath='..\..\icons\components\Science-Pressure-icon-32.png' />
		<gdiopts FullContainer='1' FullTransparency='1' ShowGdi='1' ShowOpengl='1' />
		<component class_type='root' codename='BME688' 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 >
				<property name='I2C Properties' folder='property_1' hidden='0' >
					<property name='Connections' folder='cal_i2c1::property_2' hidden='0' >
						<property name='Channel' target='cal_i2c1::CHANNEL' typeid='16' hidden='0' locked='0' info='Channel selection' filter='000Software
001Channel 1
002Channel 2
' />
						<property name='SDA' target='cal_i2c1::SDA' typeid='5' hidden='0' locked='1' info='Pin used for SDA (data signal)' />
						<property name='SDA Remap Pin' target='cal_i2c1::SDAPins' typeid='16' hidden='0' locked='0' info='' filter='016$PORTC.0
017$PORTC.1
018$PORTC.2
019$PORTC.3
020$PORTC.4
021$PORTC.5
022$PORTC.6
023$PORTC.7
008$PORTB.0
009$PORTB.1
010$PORTB.2
011$PORTB.3
012$PORTB.4
013$PORTB.5
014$PORTB.6
015$PORTB.7' />
						<property name='SCL' target='cal_i2c1::SCL' typeid='5' hidden='0' locked='1' info='Pin used for SCL (clock signal)' />
						<property name='SCL Remap Pin' target='cal_i2c1::SCLPins' typeid='16' hidden='0' locked='0' info='' filter='016$PORTC.0
017$PORTC.1
018$PORTC.2
019$PORTC.3
020$PORTC.4
021$PORTC.5
022$PORTC.6
023$PORTC.7
008$PORTB.0
009$PORTB.1
010$PORTB.2
011$PORTB.3
012$PORTB.4
013$PORTB.5
014$PORTB.6
015$PORTB.7' />
					</property>
					<property name='Options' folder='cal_i2c1::property_3' hidden='0' >
						<property name='Device Address' target='DeviceAddress' typeid='16' hidden='0' locked='0' info='' filter='0000x76
0010x77' />
						<property name='Stop Delay' target='cal_i2c1::StopDel' typeid='7' hidden='0' locked='0' info='On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not 
a 10ms delay between an I2C stop event and the next I2C start event.

Most modern microcontrollers will not have a problem so this property can be disabled to speed up the 
I2C communications. ' />
						<property name='Baud Select' target='cal_i2c1::BAUD_LIST' typeid='16' hidden='0' locked='0' info='Baud rate option selector' filter='000Custom
001100KHz
002400KHz
0031MHz' />
						<property name='Baud Rate' target='cal_i2c1::BAUD' typeid='14' hidden='0' locked='1' info='Baud rate to be used' />
					</property>
				</property>
				<property name='Simulation' folder='cal_i2c1::property_1' hidden='0' >
					<property name='Simulate Comms' target='SimComms' typeid='7' hidden='0' locked='0' info='' />
					<property name='Comms Simulation' folder='property_2' hidden='0' >
						<property name='Scope Traces' target='cal_i2c1::ScopeTraces' typeid='7' hidden='0' locked='0' info='Selects if the component pin connections are automatically generated on the data recorder window or not.
Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion.
No: Do not show the pin signals on the data recorder window.' />
						<property name='Console Data' target='cal_i2c1::ConsoleData' typeid='7' hidden='0' locked='0' info='Selects if the console data is automatically generated or not' />
						<property name='Injector' target='cal_i2c1::Injector' typeid='16' hidden='0' locked='0' info='Specifies the injector component on the panel to interact with to provide comms simulation.' filter='000
001API_InterfaceBoard1 I2C CH0' />
					</property>
					<property name='Injector Handle' target='cal_i2c1::InjectorHandle' typeid='21' hidden='1' locked='0' info='' />
				</property>
			</properties>
			<values >
				<value target='cal_i2c1::CHANNEL' data='001' />
				<value target='cal_i2c1::SDA' data='' />
				<value target='cal_i2c1::SDAPins' data='000' />
				<value target='cal_i2c1::SCL' data='' />
				<value target='cal_i2c1::SCLPins' data='001' />
				<value target='DeviceAddress' data='000' />
				<value target='cal_i2c1::StopDel' data='0' />
				<value target='cal_i2c1::BAUD_LIST' data='001' />
				<value target='cal_i2c1::BAUD' data='100000' />
				<value target='SimComms' data='1' />
				<value target='cal_i2c1::ScopeTraces' data='0' />
				<value target='cal_i2c1::ConsoleData' data='1' />
				<value target='cal_i2c1::Injector' data='001' />
				<value target='cal_i2c1::InjectorHandle' data='1177' />
			</values>
			<events >
				<event class='Components' event='Initialise' target='Ev_Initialise' />
				<event class='Components' event='Property' target='Ev_Property' />
			</events>
			<apis >
				<api name='ReadTemperature' alt='ReadTemperature' type='1' proto='1' />
				<api name='ReadPressure' alt='ReadPressure' type='1' proto='1' />
				<api name='SetMode' alt='SetMode' type='1' proto='1' />
				<api name='ReadRegister' alt='ReadRegisterSim' type='1' proto='1' />
				<api name='WriteRegister' alt='WriteRegisterSim' type='1' proto='1' />
				<api name='Initialise' alt='InitialiseSim' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='par_p1' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p10' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_t3' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_t2' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_t1' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='t_fine' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='temp_comp' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h7' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p9' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h6' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p8' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h5' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p7' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h4' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p6' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h3' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p5' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h2' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p4' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_h1' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p3' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='par_p2' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='InitialiseSim' description='Sim version of initialise macro, specified using the File -&gt; Export -&gt; Configuration -&gt; Interface Tab' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='decision' title='Are we simulating the communications?' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SimComms' swap='0' >
							<flowline >
								<command class_type='call' title='Call the embedded version of the macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Initialise' />
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadHumidity' description='Collects the humidity and returns as a floating point value in percent.' statediag='0' >
						<return name='Return' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='Index' type='u8' description='Forced Mode = 0 / Parallel Mode = 0-2' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='hum_adc' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Byte' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='var1' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='var2' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='var3' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='var4' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='.Index &gt; 2' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='.Index = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='comment' title='' comment='Collect 16-bit humidity measurement' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Read MSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x25 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.hum_adc = .Byte' />
						</command>
						<command class_type='call' title='Read LSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x26 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.hum_adc = .hum_adc &lt;&lt; 8' />
							<exp exp='.hum_adc = .hum_adc | .Byte' />
						</command>
						<command class_type='comment' title='' comment='Perform calcuation based on calibrated coefficients' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var1 = .hum_adc - ((FLOAT par_h1 * 16.0) + ((FLOAT par_h3 / 2.0) * temp_comp))' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var2 = .var1 * ((FLOAT par_h2 / 262144.0) * (1.0 + ((par_h4 / 16384.0) * temp_comp) + ((FLOAT par_h5 / 1048576.0) * temp_comp * temp_comp)))' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var3 = FLOAT par_h6 / 16384.0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var4 = FLOAT par_h7 / 2097152.0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = .var2 + ((.var3 + (.var4 * temp_comp)) * .var2 * .var2)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadTemperature' description='Collects the temperature and returns as a floating point value in degrees C.' statediag='0' >
						<return name='Return' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='Index' type='u8' description='Forced Mode = 0 / Parallel Mode = 0-2' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='temp_adc' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Byte' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='var1' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='var2' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='.Index &gt; 2' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='.Index = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='comment' title='' comment='Collect 20-bit temperature measurement' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Read MSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x22 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.temp_adc = .Byte' />
						</command>
						<command class_type='call' title='Read LSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x23 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.temp_adc = .temp_adc &lt;&lt; 8' />
							<exp exp='.temp_adc = .temp_adc | .Byte' />
						</command>
						<command class_type='call' title='Read XLSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x24 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.temp_adc = .temp_adc &lt;&lt; 4' />
							<exp exp='.temp_adc = .temp_adc | (.Byte &gt;&gt; 4)' />
						</command>
						<command class_type='comment' title='' comment='Perform calcuation based on calibrated coefficients' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var1 = ((FLOAT .temp_adc / 16384.0) - (FLOAT par_t1 / 1024.0)) * FLOAT par_t2' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var2 = (((FLOAT .temp_adc / 131072.0) - (FLOAT par_t1 / 8192.0)) * ((FLOAT .temp_adc / 131072.0) - (FLOAT par_t1 / 8192.0))) * (FLOAT par_t3 * 16.0)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='t_fine = .var1 + .var2' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='temp_comp = t_fine / 5120.0' />
							<exp exp='.Return = temp_comp' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Initialise' description='Initialisation routine for the component once the component is linked to its parent' statediag='0' >
						<return name='Return' type='u32' description='Non-zero to prevent initialisation' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='This code will execute when adding the component to the panel.
Or when loading a saved project that includes the component.' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadRegisterSim' description='Sim version of ReadRegistermacro, specified using the File -&gt; Export -&gt; Configuration -&gt; Interface Tab' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Are we simulating the communications?' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SimComms' swap='0' >
							<flowline >
								<command class_type='call' title='Call the embedded version of the macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='.Return' />
									<argument exp='.Address' />
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Maybe do a panel simulation here using runtime panel components' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadRegister16' description='Reads a dual byte value from a register pair LSB / MSB' statediag='0' >
						<return name='Return' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='Address of the first LSB' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='LSB' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='MSB' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.LSB' />
							<argument exp='.Address' />
						</command>
						<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.MSB' />
							<argument exp='.Address + 1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = (.MSB &lt;&lt; 8) + .LSB' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadPressure' description='Collects the pressure and returns as a floating point value in pascal.' statediag='0' >
						<return name='Return' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='Index' type='u8' description='Forced Mode = 0 / Parallel Mode = 0-2' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='press_adc' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Byte' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='var1' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='var2' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<local name='var3' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='.Index &gt; 2' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='.Index = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='comment' title='' comment='Collect 20-bit Pressure measurement' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Read MSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x1F + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.press_adc = .Byte' />
						</command>
						<command class_type='call' title='Read LSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x20 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.press_adc = .press_adc &lt;&lt; 8' />
							<exp exp='.press_adc = .press_adc | .Byte' />
						</command>
						<command class_type='call' title='Read XLSB' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.Byte' />
							<argument exp='0x21 + (.Index * 0x11)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.press_adc = .press_adc &lt;&lt; 4' />
							<exp exp='.press_adc = .press_adc | (.Byte &gt;&gt; 4)' />
						</command>
						<command class_type='comment' title='' comment='Perform calcuation based on calibrated coefficients' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var1 = (FLOAT t_fine / 2.0) - 64000.0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var2 = .var1 * .var1 * (FLOAT par_p6 / 131072.0)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var2 = .var2 + (.var1 * FLOAT par_p5 * 2.0)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var2 = (.var2 / 4.0) + (FLOAT par_p4 * 65536.0)' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var1 = ((FLOAT par_p3 * .var1 * .var1) / 16384.0) + (FLOAT par_p2 * .var1) / 524288.0' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var1 = (1.0 + (.var1 / 32768.0)) * FLOAT par_p1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = 1048576.0 - FLOAT .press_adc' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = ((.Return - (.var2 / 4096.0)) * 6250.0) / .var1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var1 = (FLOAT par_p9 * .Return * .Return) / 2147483648.0' />
							<exp exp='' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var2 = .Return * (FLOAT par_p8 / 32768.0)' />
							<exp exp='' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.var3 = (.Return / 256.0) * (.Return / 256.0) * (.Return / 256.0) * (FLOAT par_p10 / 131072.0)' />
							<exp exp='' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = .Return + (.var1 + .var2 + .var3 + (FLOAT par_p7 * 128.0)) / 16.0' />
							<exp exp='' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Property' description='Sent when a property has been changed by the User' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='comment' title='' comment='This code will execute when any of the component property values are changed.' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SimComms' swap='0' >
							<flowline >
								<command class_type='sim' title='Show Comms Simulation Property Folder' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Component.Property.SetVisible' >
									<argument exp='this' />
									<argument exp='&quot;property_2&quot;' />
									<argument exp='1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='sim' title='Hide Comms Simulation Property Folder' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Component.Property.SetVisible' >
									<argument exp='this' />
									<argument exp='&quot;property_2&quot;' />
									<argument exp='0' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetMode' description='Sets the mode of the sensor to low power sleep, forced or parallel' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Mode' type='u8' description='0=Sleep, 1=Forced, 2=Parallel' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='WriteRegister' >
							<argument exp='0x74' />
							<argument exp='.Mode &amp; 0x03' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='WriteRegisterSim' description='Sim version of WriteRegister macro, specified using the File -&gt; Export -&gt; Configuration -&gt; Interface Tab' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Address' 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='Are we simulating the communications?' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='SimComms' swap='0' >
							<flowline >
								<command class_type='call' title='Call the embedded version of the macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='WriteRegister' >
									<argument exp='.Address' />
									<argument exp='.Data' />
								</command>
							</flowline>
							<flowline >
								<command class_type='comment' title='' comment='Maybe do a panel simulation here using runtime panel components' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ReadRegister' description='A simple example showing a generic way to read a register using I2C.' statediag='0' >
						<return name='Return' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Address' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='buff' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='1' />
						</local>
						<command class_type='calculation' title='Assign address to read/write buffer' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.buff[0] = .Address' />
						</command>
						<command class_type='call' title='Write 1 byte - don&apos;t stop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='cal_i2c1' macro='Transaction_Write' >
							<argument exp='.buff' />
							<argument exp='0x8001' />
						</command>
						<command class_type='call' title='Read 1 byte' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='cal_i2c1' macro='Transaction_Read' >
							<argument exp='.buff' />
							<argument exp='1' />
						</command>
						<command class_type='calculation' title='Read return value from buffer' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.Return = .buff[0]' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<local name='Ret' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='f' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='sim' title='Only for testing - ' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='API_InterfaceBoard1' macro='Initialise' />
						<command class_type='comment' title='' comment='Main macro is not included when you export the code as a component.
So you can use this as your test routine for the component.' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Call User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Initialise' >
							<return exp='.Ret' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='.Ret' swap='0' >
							<flowline >
								<command class_type='call' title='Set to Forced mode' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='SetMode' >
									<argument exp='1' />
								</command>
								<command class_type='loop' title='Loop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='1' breakend='1' >
									<flowline >
										<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadTemperature' >
											<return exp='.f' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='User Macro' break='1' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadPressure' >
											<return exp='.f' />
											<argument exp='0' />
										</command>
										<command class_type='call' title='User Macro' break='1' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadHumidity' >
											<return exp='.f' />
											<argument exp='0' />
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='WriteRegister' description='A simple example showing a generic way to write a register using I2C.' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Address' 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='' />
						<local name='buff' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='2' />
						</local>
						<command class_type='calculation' title='Assign address and data to write buffer' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='.buff[0] = .Address' />
							<exp exp='.buff[1] = .Data' />
						</command>
						<command class_type='call' title='Write 2 bytes' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='cal_i2c1' macro='Transaction_Write' >
							<argument exp='.buff' />
							<argument exp='2' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='Initialises the I2C bus and sets up the device ready for operation.
Returns 1 if the device has been found and is communicating.' statediag='0' >
						<return name='Return' type='b1' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='RetVal' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Byte' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='call' title='Startup I2C comms' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='cal_i2c1' macro='Master_Init' />
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='DeviceAddress' swap='0' >
							<flowline >
								<command class_type='call' title='Assign 7-bit I2C Device Address' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='cal_i2c1' macro='Transaction_Initialise' >
									<argument exp='0x77' />
								</command>
							</flowline>
							<flowline >
								<command class_type='call' title='Assign 7-bit I2C Device Address' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='cal_i2c1' macro='Transaction_Initialise' >
									<argument exp='0x76' />
								</command>
							</flowline>
						</command>
						<command class_type='comment' title='' comment='Do any setup code here to configure and enable the device.' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
						<command class_type='call' title='Read Variant ID' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
							<return exp='.RetVal' />
							<argument exp='0xF0' />
						</command>
						<command class_type='decision' title='Variant = BME688?' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='.RetVal = 0x01' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='.Return = 1' />
								</command>
								<command class_type='comment' title='' comment='Set Oversampling to 1' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
								<command class_type='call' title='Humidity Oversampling' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='WriteRegister' >
									<argument exp='0x72' />
									<argument exp='0x01' />
								</command>
								<command class_type='call' title='Pressure &amp; Temperature Oversampling' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='WriteRegister' >
									<argument exp='0x74' />
									<argument exp='0x24' />
								</command>
								<command class_type='comment' title='' comment='Read Temperature Calibration Values' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_t1' />
									<argument exp='0xE9' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_t2' />
									<argument exp='0x8A' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_t3' />
									<argument exp='0x8C' />
								</command>
								<command class_type='comment' title='' comment='Read Pressure Calibration Values' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_p1' />
									<argument exp='0x8E' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_p2' />
									<argument exp='0x90' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_p3' />
									<argument exp='0x92' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_p4' />
									<argument exp='0x94' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_p5' />
									<argument exp='0x96' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_p6' />
									<argument exp='0x99' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_p7' />
									<argument exp='0x98' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_p8' />
									<argument exp='0x9C' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister16' >
									<return exp='par_p9' />
									<argument exp='0x9E' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_p10' />
									<argument exp='0xA0' />
								</command>
								<command class_type='comment' title='' comment='Read Humidity Calibration Values' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='.Byte' />
									<argument exp='0xE2' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h1' />
									<argument exp='0xE3' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='par_h1 = (par_h1 &lt;&lt; 4) | (.Byte &amp; 0x0F)' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h2' />
									<argument exp='0xE1' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='par_h2 = (par_h2 &lt;&lt; 4) | ((.Byte &amp; 0xF0) &gt;&gt; 4)' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h3' />
									<argument exp='0xE4' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h4' />
									<argument exp='0xE5' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h5' />
									<argument exp='0xE6' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h6' />
									<argument exp='0xE7' />
								</command>
								<command class_type='call' title='User Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='ReadRegister' >
									<return exp='par_h7' />
									<argument exp='0xE8' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Device not found' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='.Return = 0' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='ed3a5141-43bb-43e0-86b0-2243fd1147ca' vmin='0' vmaj='2' codename='cal_i2c1' x='0' y='0' z='0' xsz='20' ysz='20' zsz='20' 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='ENABLED' data='1' />
					<value target='REF' data='1' />
					<value target='CHANNEL' data='001' />
					<value target='Mode' data='000' />
					<value target='SDA' data='' />
					<value target='SDAPins' data='000' />
					<value target='SCL' data='' />
					<value target='SCLPins' data='001' />
					<value target='StopDel' data='0' />
					<value target='BAUD_LIST' data='001' />
					<value target='BAUD' data='100000' />
					<value target='SRC' data='000' />
					<value target='SMB' data='000' />
					<value target='ClockStretching' data='1' />
					<value target='BMODE' data='0' />
					<value target='SDA_PORT' data='' />
					<value target='SDA_TRIS' data='' />
					<value target='SDA_PIN' data='0' />
					<value target='SCL_PORT' data='' />
					<value target='SCL_TRIS' data='' />
					<value target='SCL_PIN' data='0' />
					<value target='MASTER' data='1' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='1' />
					<value target='Injector' data='001' />
					<value target='InjectorHandle' data='1177' />
					<value target='InjectorChannel' data='0' />
					<value target='REMAPPABLE' data='1' />
					<value target='SDABank' data='b' />
					<value target='SDABank2' data='c' />
					<value target='SCLBank' data='b' />
					<value target='SCLBank2' data='c' />
					<value target='SDARPNUM' data='21' />
					<value target='SCLRPNUM' data='20' />
					<value target='SDARPREG' data='SSP1DATPPS' />
					<value target='SCLRPREG' data='SSP1CLKPPS' />
					<value target='SDAREG' data='000' />
					<value target='SCLREG' data='001' />
					<value target='Sim' data='1' />
					<value target='ParentName' data='' />
					<value target='BitDelay' data='10' />
					<value target='SDAAlts' data='000' />
					<value target='SCLAlts' data='000' />
					<value target='SDAAlt' data='0' />
					<value target='SCLAlt' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='58be670e-18fb-477e-ab09-61fde14b23ec' vmin='0' vmaj='1' codename='LibraryComponent1' x='0' y='0' z='0' xsz='100' ysz='100' zsz='100' 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='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Text::sText' data='BME688
Air Quality
Sensor' />
					<value target='Text::nVerticalAlignment' data='002' />
					<value target='ShowComms' data='1' />
					<value target='InputIcon::CommsType' data='255' />
					<value target='OutputIcon::CommsType' data='004' />
					<value target='ConsoleHandle' data='0' />
					<value target='Upgraded' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='ed171d42-05fd-4946-9bf1-e59a9c98c5b8' vmin='0' vmaj='1' codename='API_InterfaceBoard1' x='61' y='1' z='0' 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='1' poslock='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='ConnType' data='000' />
					<value target='AutoDetectPort' data='1' />
					<value target='scada_uart1::RefreshPorts' data='0' />
					<value target='scada_uart1::com_port' data='6' />
					<value target='NetworkComms1::NetworkInterface' data='000' />
					<value target='NetworkComms1::IPAddress' data='0.0.0.0' />
					<value target='WIFIIP' data='192.168.1.96' />
					<value target='AutoDetectIP' data='0' />
					<value target='ScanRes' data='000' />
					<value target='ScanStart' data='0' />
					<value target='EndScan' data='001' />
					<value target='APIDIGIO' data='18' />
					<value target='APIANIN' data='3' />
					<value target='APIANOUT' data='1' />
					<value target='APIPWM' data='2' />
					<value target='APII2C' data='1' />
					<value target='APISPI' data='1' />
					<value target='APIUART' data='1' />
					<value target='APISERVO' data='6' />
					<value target='ConsoleLog' data='1' />
					<value target='LogMode' data='001' />
					<value target='ShowRaw' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='-1.65554' ye='-10.6922' ze='223.254' xt='-1.65554' yt='-10.6922' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='507' dy='419' zoom='274.786' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='0' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='781.66' 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='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAjAQAAH4DAAA' zoom='75' scrollx='0' scrolly='48' flags='0' />
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAjAQAAH4DAAA' zoom='75' scrollx='0' scrolly='362' flags='0' />
		<view type='0' name='ReadHumidity' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAjAQAAH4DAAA' zoom='75' scrollx='0' scrolly='192' flags='0' />
		<view type='0' name='ReadTemperature' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAAjAQAAH4DAAA' zoom='75' scrollx='0' scrolly='268' flags='0' />
	</layout>
</document>
</root>
