<root>
<document scada='0' schema='102' license='1,60006261,BZ9EZR' title='LKL1000_1-0-00' description='nachbau der Bascom Veraion' fcversion='590336' target='AVR.ATTINY.ATTINY45' >
	<config data='!0,62%0,22%6,1%7,0' clkspd='1000000' simspd='0' usewdt='1' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='Schwelle0' />
		<watch expr='Schwelle1' />
		<watch expr='Schwelle2' />
	</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='167' />
			<data name='CalculatedCommsDelay' value='167' />
			<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='5e54a9d1-30f4-497f-889d-b29b9524be99' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' category2='' category3='' bIs2dOnly='0' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' iconpath='' />
		<gdiopts FullContainer='1' FullTransparency='1' ShowGdi='1' ShowOpengl='1' />
		<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='0' scadavisible='1' interactive='0' solid='0' layer='0' poslock='0' comp2dType='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='MIN_GRENZE_2' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='488' setinit='488' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MIN_GRENZE_1' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='360' setinit='360' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MIN_GRENZE_0' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='160' setinit='160' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MAX_GRENZE_2' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='560' setinit='560' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MAX_GRENZE_1' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='400' setinit='400' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MAX_GRENZE_0' type='s16' description='' isconst='1' isHidden='0' isinit='1' usrinit='200' setinit='200' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='U_summe' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='U_summe2' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='U_summe1' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='U_Stroemung' type='u16' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Schwelle2' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Schwelle1' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Schwelle0' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Messschleife' description='&apos; Word = 65535 / 1024 = 64  Maximale Summenschleife = 20mS *64= 1,28s *2 = 2,56s
&apos; 2 Schleifen a 64*20ms = 2,56s Mittelwert' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment=' &apos;Messchleife  64 x 20ms + 6ms = ca. 1,29s *2 = 2,56s' 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='U_summe = 0' />
						</command>
						<command class_type='loop' title='Loop messe 64x' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='2' exp='64' >
							<flowline >
								<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='pot_panel1' macro='RawEnable' />
								<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='pot_panel1' macro='RawSampleInt' >
									<return exp='U_Stroemung' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='' />
									<exp exp='U_summe = U_summe + U_Stroemung' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='2' type='1' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='U_summe1 = U_summe &gt;&gt; 6' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='U_summe = 0' />
						</command>
						<command class_type='loop' title='Loop messe 64x' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='2' exp='64' >
							<flowline >
								<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='pot_panel1' macro='RawEnable' />
								<command class_type='call' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='pot_panel1' macro='RawSampleInt' >
									<return exp='U_Stroemung' />
								</command>
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='' />
									<exp exp='U_summe = U_summe + U_Stroemung' />
								</command>
								<command class_type='delay' title='Delay' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='2' type='1' />
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
							<exp exp='U_summe2 = U_summe &gt;&gt; 6' />
							<exp exp='U_summe = U_summe1 + U_summe2' />
							<exp exp='U_summe = U_summe &gt;&gt; 1' />
						</command>
						<command class_type='comment' title='' comment=' 
   &apos;Reset Watchdog                       &apos; ca 4s' textarea='12,0,12,0' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SchwellePruefen' description='Schwelle Pr�fen' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='comment' title='' comment='Schwelle uberschritten' textarea='1031,5,1031,5' 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='U_summe &gt; MAX_GRENZE_0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Schwelle0 = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='U_summe &gt; MAX_GRENZE_1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Schwelle1 = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='U_summe &gt; MAX_GRENZE_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='Schwelle2 = 1' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='comment' title='' comment='Hysterese Schwelle unterschritten' textarea='1139,-9,1139,-9' 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='U_summe &lt; MIN_GRENZE_0 &amp;&amp; Schwelle0 == 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Schwelle0 = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='U_summe &lt; MIN_GRENZE_1 &amp;&amp; Schwelle1 == 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Schwelle1 = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' exp='U_summe &lt; MIN_GRENZE_2 &amp;&amp; Schwelle2 == 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' >
									<exp exp='Schwelle2 = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Set_IO' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='Output' ccode='// Name: Output, Type: Output: Schwelle0 -&gt; B0
SET_PORT_PIN(B,0,(FCV_SCHWELLE0));
' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='1' exp='Schwelle0' usechipref='1' />
						<command class_type='output' title='Output' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='2' exp='Schwelle1' usechipref='1' />
						<command class_type='output' title='Output' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='4' exp='Schwelle2' usechipref='1' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='output' title='Output' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='16' exp='0' usechipref='1' />
						<command class_type='input' title='Input' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' mode='1' port='1048577' mask='16' exp='U_Stroemung' usechipref='1' />
						<command class_type='sim' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='pot_panel1' macro='SetProperties' >
							<argument exp='200' />
							<argument exp='0' />
							<argument exp='2' />
							<argument exp='40' />
						</command>
						<command class_type='sim' title='Component Macro' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' component='pot_panel1' macro='SetChannel' >
							<argument exp='2' />
						</command>
						<command class_type='loop' title='MainLoop' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Messschleife' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Messschleife' />
								<command class_type='call' title='Schwelle pruefen' comment='Schwelle' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='SchwellePruefen' />
								<command class_type='call' title='Ausgabe' cmdcolor='5767111' cmdcolor_sec='5767111' cmdcolor_txt='2105376' cmdgradient='1' cmdopacity='0.01' macro='Set_IO' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='8c97cc7d-3c7b-41b6-b255-6694b6b8eed9' vmin='4' vmaj='1' codename='pot_panel1' x='-150' y='210' 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='1' poslock='1' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='angle_start' data='225.000000' />
					<value target='angle_sweep' data='270.000000' />
					<value target='ScopeTraces' data='0' />
					<value target='channel' data='2' />
					<value target='vrefvol' data='200' />
					<value target='vrefop' data='001' />
					<value target='convspd' data='001' />
					<value target='actime' data='40' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='-109.857' ye='73.4532' ze='227.49' xt='-109.857' yt='73.4532' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='540' dy='1157' zoom='287.222' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='0' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='0' perspective='1' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='0' />
		<camera xe='-1558.22' ye='2318.86' ze='1885.81' xt='-1558.22' yt='2318.86' 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---------------------wUAAAAkAAAACQgAAPEEAAA' zoom='105' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Messschleife' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAkAAAACQgAAPEEAAA' zoom='105' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SchwellePruefen' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAkAAAACQgAAPEEAAA' zoom='95' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Set_IO' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAkAAAACQgAAPEEAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
