<root>
<document schema='101' license='1,Dannyvn,EB40GK' title='' description='' target='PIC.16F.16F887' >
	<config data='!0,2012!10,3eff%0,2%3,0%4,1%5,0%6,0%7,0%8,0%a,0%b,0%c,0%d,1%19,3%18,0' clkspd='8000000' simspd='5' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='VarInpT0' />
		<watch expr='var_button' />
		<watch expr='array' />
		<watch expr='var_led_brightnes' />
		<watch expr='var_CRC' />
	</debug>
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='1' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='1' />
			<data name='DataPin' value='7' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='21' />
			<data name='CalculatedCommsDelay' value='21' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='' vstate='30' vmin='0' vmaj='1' srcleaf='' visiblename='HT1732 ' description='' category='Misc' catenable='1' author='Danny van Neijenhoff' manuname='HEFTRONIC' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='array' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='2' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='var_register' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='var_CRC' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='VarInpT0' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='var_led_brightnes' type='s16' description='PWM dimmer tbv led&apos;s' isconst='0' isinit='1' usrinit='2' setinit='2' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='var_button' type='b1' description='Input Test / Reset' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='_7_Button_Test_Reset' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='input' title='Test / Reset Input' cmdcolor='3610239' cmdcolor_sec='3610239' mode='1' port='1048579' mask='2' exp='var_button' />
						<command class_type='decision' title='Beslissing' cmdcolor='3568629' cmdcolor_sec='3568629' exp='var_button = 0' swap='0' >
							<flowline >
								<command class_type='decision' title='Led brightnes below max?' cmdcolor='3568629' cmdcolor_sec='3568629' exp='var_led_brightnes &lt; 600' swap='0' >
									<flowline >
										<command class_type='calculation' title='led_brightnes + 1' cmdcolor='7895044' cmdcolor_sec='7895044' >
											<exp exp='var_led_brightnes = var_led_brightnes + 1' />
										</command>
										<command class_type='decision' title='Led brightnes below max?' cmdcolor='3568629' cmdcolor_sec='3568629' exp='var_led_brightnes = 600' swap='0' >
											<flowline >
												<command class_type='delay' title='Vertraging' cmdcolor='7895044' cmdcolor_sec='7895044' exp='500' type='1' />
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='led_brightnes = 1' cmdcolor='7895044' cmdcolor_sec='7895044' >
											<exp exp='var_led_brightnes = 1' />
										</command>
									</flowline>
								</command>
								<command class_type='delay' title='Delay' cmdcolor='7895044' cmdcolor_sec='7895044' exp='1' type='1' />
							</flowline>
							<flowline />
						</command>
						<command class_type='switch' title='Select led brightnes' textarea='36,25,36,25' cmdcolor='3568629' cmdcolor_sec='3568629' exp='var_led_brightnes' >
							<case >
								<flowline />
							</case>
							<case exp='100' >
								<flowline >
									<command class_type='call' title='bedrijf led =1' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
										<argument exp='1' />
									</command>
								</flowline>
							</case>
							<case exp='200' >
								<flowline >
									<command class_type='call' title='bedrijf led = 10' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
										<argument exp='40' />
									</command>
								</flowline>
							</case>
							<case exp='300' >
								<flowline >
									<command class_type='call' title='bedrijf led = 20' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
										<argument exp='100' />
									</command>
								</flowline>
							</case>
							<case exp='400' >
								<flowline >
									<command class_type='call' title='bedrijf led =75' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
										<argument exp='300' />
									</command>
								</flowline>
							</case>
							<case exp='500' >
								<flowline >
									<command class_type='call' title='bedrijf led = 600' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
										<argument exp='600' />
									</command>
								</flowline>
							</case>
							<case exp='600' >
								<flowline >
									<command class_type='call' title='bedrijf led = 1000' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
										<argument exp='1000' />
									</command>
								</flowline>
							</case>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Interupt_Knipper_led' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='Main loop. De delay dient om programma te vertragen tot 100x/sec.' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Enable PWM power led' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='Enable' />
						<command class_type='call' title='Init Modbus Slave Component' cmdcolor='1975743' cmdcolor_sec='1975743' component='ModbusMaster1' macro='Initialise' />
						<command class_type='loop' title='Lus' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='1' >
							<flowline >
								<command class_type='comment' title='' comment='array werkt  :-)
in onderstaande' textarea='254,1,254,1' cmdcolor='1975743' cmdcolor_sec='1975743' />
								<command class_type='call' title='Component Macro Aanroepen' cmdcolor='1975743' cmdcolor_sec='1975743' component='ModbusMaster1' macro='ForceSingleCoil' >
									<argument exp='2' />
									<argument exp='7' />
									<argument exp='1' />
								</command>
								<command class_type='call' title='Component Macro Aanroepen' cmdcolor='1975743' cmdcolor_sec='1975743' component='ModbusMaster1' macro='ForceSingleCoil' >
									<argument exp='2' />
									<argument exp='7' />
									<argument exp='0' />
								</command>
								<command class_type='comment' title='' comment='
  Crystal = On
' textarea='505,-12,505,-12' cmdcolor='1975743' cmdcolor_sec='1975743' />
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ModbusMaster1' macro='GetResponse' >
									<return exp='var_CRC' />
								</command>
								<command class_type='switch' title='Switch' textarea='36,25,36,25' cmdcolor='3568629' cmdcolor_sec='3568629' exp='var_CRC' >
									<case >
										<flowline />
									</case>
									<case exp='0' >
										<flowline >
											<command class_type='comment' title='' comment='OK' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
											<command class_type='call' title='bedrijf led =1' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
												<argument exp='10' />
											</command>
										</flowline>
									</case>
									<case exp='1' >
										<flowline >
											<command class_type='comment' title='' comment='FAIL
' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
											<command class_type='call' title='bedrijf led =1' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
												<argument exp='50' />
											</command>
										</flowline>
									</case>
									<case exp='255' >
										<flowline >
											<command class_type='comment' title='' comment='NO DATA' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
											<command class_type='call' title='bedrijf led =1' cmdcolor='1975743' cmdcolor_sec='1975743' component='v5__pwm0' macro='SetDutyCycle10Bit' >
												<argument exp='1000' />
											</command>
										</flowline>
									</case>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='e8f04af0-03d9-4b1c-83d3-9d0b1dc0f80a' vmin='1' vmaj='1' codename='v5__switch0' x='-72.4882' y='-137.179' z='-2.4395' xsz='1.35593' ysz='1.25984' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTD.1' />
					<value target='polarity' data='001' />
					<value target='debounce' data='0' />
					<value target='operation' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label6' x='-73.18' y='-121.871' z='0' xsz='8.15094' ysz='8' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='0' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Test/Reset/dim' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='e8f04af0-03d9-4b1c-83d3-9d0b1dc0f80a' vmin='1' vmaj='1' codename='v5__switch2' x='-32.4882' y='-137.179' z='-0.617' xsz='1.35593' ysz='1.25984' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='pin' data='$PORTE.3' />
					<value target='polarity' data='000' />
					<value target='debounce' data='0' />
					<value target='operation' data='1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='444fb704-814c-4707-a15c-759ba088505c' vmin='6' vmaj='1' codename='v5__pwm0' x='-16' y='-208' z='0.93' xsz='2.77778' ysz='3.16667' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='channel' data='001' />
					<value target='altpin' data='0' />
					<value target='pwm_pin' data='$PORTC.2' />
					<value target='RemapPin' data='' />
					<value target='timer' data='2' />
					<value target='period' data='255' />
					<value target='prescale' data='004' />
					<value target='period_calc' data='2048.000000' />
					<value target='frequency_calc' data='0.488281' />
					<value target='pwm_prescale' data='16' />
					<value target='SimRep' data='001' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label55' x='-71.9122' y='-147.566' z='1.85' xsz='13.1707' ysz='13' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='0' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='D1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label56' x='-33.012' y='-148.194' z='0' xsz='13.1707' ysz='13' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='0' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='E3' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label60' x='52.3304' y='-240.723' z='0.3075' xsz='26.3415' ysz='25' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='0' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='C2' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='47f6b39b-ead7-40f5-9931-8a79aa54014a' vmin='4' vmaj='1' codename='ModbusMaster1' x='-60' y='-90' z='0.755' xsz='60' ysz='26' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='TX' data='$PORTC.6' />
					<value target='RX' data='$PORTC.7' />
					<value target='BaudByteDelay' data='1040' />
					<value target='BAUD_LIST' data='004' />
					<value target='BAUD' data='9600' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='BusType' data='001' />
					<value target='DDRP' data='$PORTD.0' />
					<value target='ReadDDRState' data='000' />
					<value target='FrameType' data='000' />
					<value target='ReceiveBufferSize' data='20' />
					<value target='AddressBytes' data='1' />
					<value target='SilentInterval' data='500' />
					<value target='RXTOUT' data='100' />
					<value target='TOUTCNT' data='2' />
					<value target='label' data='Modbus' />
					<value target='DataSource' data='000' />
					<value target='COM_port' data='001' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='0' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='0' vmaj='2' codename='RS232' x='20.339' y='-145' z='0.755' xsz='44.9123' ysz='15' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='BAUD_LIST' data='004' />
					<value target='BAUD' data='9600' />
					<value target='DBITS' data='008' />
					<value target='RETURN' data='000' />
					<value target='ToutVal' data='255' />
					<value target='FLOWEN' data='000' />
					<value target='ECHO' data='000' />
					<value target='TX' data='$PORTC.6' />
					<value target='RX' data='$PORTC.7' />
					<value target='CTS' data='$PORTB.1' />
					<value target='RTS' data='$PORTB.2' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='label' data='RS232' />
					<value target='ScopeTraces' data='0' />
					<value target='ConsoleData' data='0' />
					<value target='ConsoleColumns' data='64' />
					<value target='DataSource' data='001' />
					<value target='com_port' data='003' />
					<value target='Injector' data='000' />
					<value target='InjectorHandle' data='' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='text' codename='label19' x='-33.18' y='-121.871' z='0' xsz='8.15094' ysz='8' zsz='0' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='Color' data='0' />
					<value target='Background' data='-1' />
					<value target='Font' data='Arial' />
					<value target='Text' data='Save' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='0' />
		<camera xe='-1.95913' ye='-116.551' ze='287.329' xt='-1.95913' yt='-116.551' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA4AMAANUCAAA' zoom='70' scrollx='0' scrolly='135' flags='0' />
		<view type='0' name='_7_Button_Test_Reset' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA4AMAANUCAAA' zoom='65' scrollx='0' scrolly='220' flags='0' />
	</layout>
</document>
</root>
