<root>
<document schema='101' license='1,HoughtonServices,MQ8QN1' title='' description='' target='PIC.16F.16F887' >
	<config data='!0,23e4!10,3eff%0,4%3,0%4,0%5,1%6,1%7,1%8,3%a,0%b,0%c,0%d,1%19,3%18,0' clkspd='4000000' simspd='1' 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='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='662c3389-8f08-44e1-b974-c5f536f74921' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' 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='D' type='u8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MotorPower' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PulseTrigger' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<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='OutString' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='6' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Index' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Dummy' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='NineHundredths' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Seconds' type='u16' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Pulse' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</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='Clock' description='' >
						<command class_type='calculation' title='Calculation' >
							<exp exp='PulseTrigger = NineHundredths MOD 100' />
						</command>
						<command class_type='decision' title='Decision' exp='PulseTrigger = 0' swap='0' >
							<flowline >
								<command class_type='output' title='MotorPulseStart' disable='1' mode='1' port='1048579' mask='2' exp='1' />
								<command class_type='calculation' title='Calculation' >
									<exp exp='Pulse = 0' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='EndofPulse?' exp='Pulse &gt; MotorPower' swap='0' >
							<flowline >
								<command class_type='output' title='MotorPulseEnd' disable='1' mode='1' port='1048579' mask='2' exp='0' />
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='NineHundredths = NineHundredths + 1' />
							<exp exp='Pulse = Pulse + 1' />
						</command>
						<command class_type='decision' title='Decision' exp='NineHundredths &gt; 900' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='NineHundredths = 0' />
									<exp exp='Seconds = Seconds + 1' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Macro' macro='Initialise' />
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Component Macro' disable='1' component='RS232' macro='SendString' >
									<argument exp='&quot;Test&quot;' />
								</command>
								<command class_type='call' title='Call Component Macro' component='Servo_Controller1' macro='SetPosition' >
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='calculation' title='Calculation' disable='1' >
									<exp exp='MotorPower = 100' />
								</command>
								<command class_type='delay' title='Delay' exp='5' type='2' />
								<command class_type='comment' title='' comment='Sevo Middle is 100
Rangs 0 Right to 200 Left' textarea='170,26,170,26' />
								<command class_type='call' title='Call Component Macro' component='Servo_Controller1' macro='SetPosition' >
									<argument exp='0' />
									<argument exp='50' />
								</command>
								<command class_type='calculation' title='Calculation' disable='1' >
									<exp exp='MotorPower = 0' />
								</command>
								<command class_type='delay' title='Delay' exp='5' type='2' />
							</flowline>
						</command>
						<command class_type='call' title='Call Component Macro' component='Servo_Controller1' macro='SetPosition' >
							<argument exp='0' />
							<argument exp='100' />
						</command>
						<command class_type='call' title='Call Component Macro' component='Servo_Controller1' macro='DisableServo' >
							<argument exp='0' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Initialise' description='' >
						<command class_type='interrupt' title='Clock' enable='1' name='TMR1' call='Clock' >
							<settings timer='1' prescale='1' postscale='-1' rollover='-1' bitcount='-1' trigger='3' maskhi='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' masklo='--------------------------------------------------------------------------------------------------------------------------------------------------------------------------8' >
								<option value='1' />
								<option value='0' />
								<option value='-1' />
								<option value='-1' />
							</settings>
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='Seconds = 0' />
							<exp exp='NineHundredths = 0' />
							<exp exp='' />
							<exp exp='MotorPower = 0' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' component='Servo_Controller1' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' component='Servo_Controller1' macro='EnableServo' >
							<argument exp='0' />
						</command>
						<command class_type='input' title='Tristate Unused Inputs' mode='2' port='1048576' mask='15' exp='Dummy' />
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='296' vmaj='16' codename='led_5mm1' x='-8' y='0' z='-1.90735e-007' 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 >
					<value target='pin' data='$PORTD.7' />
					<value target='polarity' data='001' />
					<value target='on_color' data='10551200' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='d92e8259-f3a8-4176-a8c4-fe7ca42b2c3f' vmin='296' vmaj='16' codename='led_5mm3' x='0' y='0' z='-1.90735e-007' 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 >
					<value target='pin' data='$PORTD.6' />
					<value target='polarity' data='001' />
					<value target='on_color' data='255' />
					<value target='length' data='4.000000' />
					<value target='show_label' data='002' />
					<value target='label_property' data='pin' />
					<value target='label_color' data='16777215' />
					<value target='label_scale' data='1.000000' />
					<value target='label_auto_scale' data='0' />
					<value target='label_position' data='003' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='296' vmaj='16' codename='RS232' x='-8' y='24' z='0.755' xsz='24' ysz='16' zsz='1.51' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='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='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='ref' guid='14683ea8-5a08-4b3a-be2d-3dea3e17e720' vmin='552' vmaj='16' codename='pot_color_cap5' x='-8' y='-16' z='9' xsz='25.1419' ysz='25.1419' zsz='18.45' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='1' >
				<resources />
				<properties />
				<values >
					<value target='angle_start' data='225.000000' />
					<value target='angle_sweep' data='270.000000' />
					<value target='cap_color' data='4652800' />
					<value target='point_color' data='16777215' />
					<value target='channel' data='0' />
					<value target='vrefvol' data='500' />
					<value target='vrefop' data='000' />
					<value target='convspd' data='003' />
					<value target='actime' data='40' />
					<value target='bits' data='10' />
					<value target='bitmul' data='0.004883' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='9202a62e-0a42-4780-adce-16b701e5ec53' vmin='296' vmaj='16' codename='Servo_Controller1' x='-24' y='0' z='6' 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 >
					<value target='Channel_Count' data='001' />
					<value target='pin0' data='$PORTD.2' />
					<value target='pin1' data='$PORTB.1' />
					<value target='pin2' data='$PORTB.2' />
					<value target='pin3' data='$PORTB.3' />
					<value target='pin4' data='$PORTB.4' />
					<value target='pin5' data='$PORTB.5' />
					<value target='pin6' data='$PORTB.6' />
					<value target='pin7' data='$PORTB.7' />
					<value target='trim0' data='000' />
					<value target='trim1' data='0' />
					<value target='trim2' data='0' />
					<value target='trim3' data='0' />
					<value target='trim4' data='0' />
					<value target='trim5' data='0' />
					<value target='trim6' data='0' />
					<value target='trim7' data='0' />
					<value target='min_pulse_width' data='1280' />
					<value target='max_pulse_width' data='2500' />
					<value target='CCPLo' data='196' />
					<value target='CCPHi' data='9' />
					<value target='Servo_Clock_Count_1280' data='1280' />
					<value target='sim0' data='' />
					<value target='sim1' data='' />
					<value target='sim2' data='' />
					<value target='sim3' data='' />
					<value target='sim4' data='' />
					<value target='sim5' data='' />
					<value target='sim6' data='' />
					<value target='sim7' data='' />
				</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='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='169.912' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Initialise' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAuQMAAKkCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Clock' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAuQMAAKkCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAuQMAAKkCAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
