<root>
<document scada='0' schema='102' license='1,medelec35,07B0BN' title='' description='' fcversion='524545' target='PIC.16F.16F15344' >
	<config data='!0,3fff!10,3fff!20,3f9f!30,3fff!40,3fff%0,7%4,7%8,1%b,1%d,1%10,1%11,1%15,1%16,3%19,1%1a,1%1b,1%1c,1%1d,1%20,1f%25,0%28,7%2b,7%30,1%33,1%34,1%37,1%38,1%39,1%3b,1%3d,1%40,1' clkspd='19660800' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='1' head='char const unsigned  Image1[]={75,165,10,153,74,169,74,173,73,165,42,153,241,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,09,161,138,193,43,234,235,209,138,189,138,185,170,197,11,226,11,222,41,161,51,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,157,43,230,170,193,138,189,11,226,108,250,108,254,76,246,0,0,0};
char const unsigned  Image2[] =
{255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,239,189,157,243,90,235,83,202,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,
255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,255,127,239,189,157,243,90,235,83,202,255,127,255,127,255,127,255,127,255,127,255,127,255,127};' 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='0' />
			<data name='ClockPin' value='1' />
			<data name='DataPort' value='0' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='9' />
			<data name='CalculatedCommsDelay' value='9' />
		</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='2f534b78-c932-48d1-ab11-9ffeaa72d4c0' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='CGenDemo' description='' category='Misc' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<component class_type='root' codename='CGenDemo' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties >
				<property name='Number Images' target='NumImages' typeid='21' hidden='0' locked='0' info='Sets the number of images to create.' />
				<property name='Max Images' target='MaxImages' typeid='21' hidden='1' locked='1' info='' />
			</properties>
			<values >
				<value target='NumImages' data='4' />
				<value target='MaxImages' data='4' />
			</values>
			<events >
				<event class='Components' event='Property' target='Ev_Property' />
				<event class='Compile' event='AddHeader' target='Ev_AddHeader' />
			</events>
			<apis >
				<api name='ShowImage' alt='ShowImage' type='1' proto='1' />
			</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='Ev_Property' description='Sent when a property has been changed by the User' >
						<return name='Return' type='u32' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Commas' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='DataStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='SizeStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='idx' type='u16' description='' isconst='0' isinit='1' usrinit='1' setinit='1' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.idx = .idx + 1' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='.idx &lt; MaxImages' >
							<flowline >
								<command class_type='calculation' title='Start of property variables' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.DataStr = &quot;ImageData&quot; + ToString$ (.idx)' />
									<exp exp='.SizeStr = &quot;ImageSize&quot; + ToString$ (.idx)' />
								</command>
								<command class_type='decision' title='Property enabled?' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; .idx' swap='0' >
									<flowline >
										<command class_type='sim' title='Simulation' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetVisible' >
											<argument exp='this' />
											<argument exp='.DataStr' />
											<argument exp='1' />
										</command>
										<command class_type='sim' title='Simulation' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetVisible' >
											<argument exp='this' />
											<argument exp='.SizeStr' />
											<argument exp='1' />
										</command>
										<command class_type='call' title='Work out amount of data in string' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Prv_CountCommas' >
											<return exp='.Commas' />
											<argument exp='.DataStr' />
										</command>
										<command class_type='sim' title='Simulation' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetValue' >
											<argument exp='this' />
											<argument exp='.SizeStr' />
											<argument exp='.Commas + 1' />
										</command>
									</flowline>
									<flowline >
										<command class_type='sim' title='Simulation' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetVisible' >
											<argument exp='this' />
											<argument exp='.DataStr' />
											<argument exp='0' />
										</command>
										<command class_type='sim' title='Simulation' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetVisible' >
											<argument exp='this' />
											<argument exp='.SizeStr' />
											<argument exp='0' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.idx = .idx + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_AddHeader' description='Sent to a component to allow dynamic amendment of header code' >
						<return name='Return' type='u32' description='Non-zero to block header code insertion' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='HeadCode' type='T8*' description='Text to amend for header' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<local name='idx' type='u8' description='' isconst='0' isinit='1' usrinit='1' setinit='1' />
						<local name='PropSize' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='PropData' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.idx = 1' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.HeadCode = .HeadCode + &quot;//AddHeader Added Content\n\n&quot;' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='.idx &lt; NumImages' >
							<flowline >
								<command class_type='calculation' title='Create string references to properties' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.PropData = &quot;ImageData&quot; + ToString$ (.idx)' />
									<exp exp='.PropSize = &quot;ImageSize&quot; + ToString$ (.idx)' />
								</command>
								<command class_type='sim' title='Override property reference string with property value' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.GetValue' >
									<return exp='.PropData' />
									<argument exp='this' />
									<argument exp='.PropData' />
								</command>
								<command class_type='sim' title='Override property reference string with property value' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.GetValue' >
									<return exp='.PropSize' />
									<argument exp='this' />
									<argument exp='.PropSize' />
								</command>
								<command class_type='calculation' title='Add C code variable declaration including size and data' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.HeadCode = .HeadCode + &quot;const char Image&quot;' />
									<exp exp='.HeadCode = .HeadCode + ToString$ (.idx)' />
									<exp exp='.HeadCode = .HeadCode + &quot;[&quot;' />
									<exp exp='.HeadCode = .HeadCode + .PropSize' />
									<exp exp='.HeadCode = .HeadCode + &quot;] = {&quot;' />
									<exp exp='.HeadCode = .HeadCode + .PropData' />
									<exp exp='.HeadCode = .HeadCode + &quot;};\n&quot;' />
									<exp exp='' />
								</command>
								<command class_type='calculation' title='Next Image' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.idx = .idx + 1' />
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.HeadCode = .HeadCode + &quot;\n//AddHeader Added Content End\n\n&quot;' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ShowImage' description='' >
						<return name='Return' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='ImageIndex' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='MaxImages' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='MaxNumberOfImages' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.MaxNumberOfImages = 4' />
						</command>
						<command class_type='sim' title='Set Max Limit' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetValue' >
							<argument exp='this' />
							<argument exp='&quot;MaxImages&quot;' />
							<argument exp='.MaxNumberOfImages' />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; .MaxImages' swap='0' >
							<flowline >
								<command class_type='sim' title='Set Max Limit' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.SetValue' >
									<argument exp='this' />
									<argument exp='&quot;NumImages&quot;' />
									<argument exp='MaxImages' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='switch' title='Switch' textarea='36,25,36,25' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.ImageIndex' >
							<case >
								<flowline />
							</case>
							<case exp='1' >
								<flowline >
									<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; 0' swap='0' >
										<flowline >
											<command class_type='native' title='C Code' ccode='FCV_RETURN = Image1[FCL_DATAPOINTER];' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
										</flowline>
										<flowline />
									</command>
								</flowline>
							</case>
							<case exp='2' >
								<flowline >
									<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; 1' swap='0' >
										<flowline >
											<command class_type='native' title='C Code' ccode='FCV_RETURN = Image2[FCL_DATAPOINTER];' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
										</flowline>
										<flowline />
									</command>
								</flowline>
							</case>
							<case exp='3' >
								<flowline >
									<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; 2' swap='0' >
										<flowline >
											<command class_type='native' title='C Code' ccode='FCV_RETURN = Image3[FCL_DATAPOINTER];' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
										</flowline>
										<flowline />
									</command>
								</flowline>
							</case>
							<case exp='4' >
								<flowline >
									<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; 3' swap='0' >
										<flowline >
											<command class_type='native' title='C Code' ccode='FCV_RETURN = Image4[FCL_DATAPOINTER];' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
										</flowline>
										<flowline />
									</command>
								</flowline>
							</case>
							<case exp='5' >
								<flowline >
									<command class_type='decision' title='Decision' cmdcolor='12615680' cmdcolor_sec='15376912' exp='NumImages &gt; 4' swap='0' >
										<flowline >
											<command class_type='native' title='C Code' ccode='FCV_RETURN = Image5[FCL_DATAPOINTER];' cmdcolor='7687168' cmdcolor_sec='8152576' language='C' />
										</flowline>
										<flowline />
									</command>
								</flowline>
							</case>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Prv_CountCommas' description='Hidden sim only macro used by Ev_Property to count commas in a property string' >
						<return name='Return' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='PropName' type='T8*' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</param>
						<local name='Length' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='idx' type='u16' description='' isconst='0' isinit='1' usrinit='1' setinit='1' />
						<local name='PropString' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.Return = 0' />
						</command>
						<command class_type='sim' title='Get Property Value' disable='1' cmdcolor='1879295' cmdcolor_sec='5751039' macro='Component.Property.GetValue' >
							<return exp='.PropString' />
							<argument exp='this' />
							<argument exp='.PropName' />
						</command>
						<command class_type='calculation' title='Calculate length ' cmdcolor='16760919' cmdcolor_sec='16760832' >
							<exp exp='.Length = Length$ (.PropString)' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='12615680' cmdcolor_sec='15376912' type='0' exp='.idx &lt; .Length' >
							<flowline >
								<command class_type='decision' title='Check for a comma' cmdcolor='12615680' cmdcolor_sec='15376912' exp='.PropString[.idx] = &apos;,&apos;' swap='0' >
									<flowline >
										<command class_type='calculation' title='Increment Return' cmdcolor='16760919' cmdcolor_sec='16760832' >
											<exp exp='.Return = .Return + 1' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='16760919' cmdcolor_sec='16760832' >
									<exp exp='.idx = .idx + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
			</macros>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='8882055' img='' style='0' />
		<camera xe='-194.298' ye='867.914' ze='306.369' xt='-194.298' yt='867.914' 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='5' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='320.252' ye='1111.82' ze='191.335' xt='320.252' yt='1111.82' 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---------------------wUAAAAeAAAAGwEAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ShowImage' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAGwEAAFYCAAA' zoom='70' scrollx='56' scrolly='28' flags='0' />
		<view type='0' name='Ev_AddHeader' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAGwEAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Property' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAGwEAAFYCAAA' zoom='75' scrollx='0' scrolly='58' flags='0' />
		<view type='0' name='Prv_CountCommas' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAeAAAAGwEAAFYCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
