<root>
<document schema='101' license='1,30Day_16036626,09YVRW' title='TF Current to CAN module' description='Interface Sendyne current sensor to CAN bus' target='PIC.18F.18F26K80' >
	<config data='!0,bf!8,e2!10,ff!18,f4!20,ff!28,ff!30,ff!38,ff!40,ff!48,ff!50,ff!58,ff!60,ff!68,ff%0,1%2,1%3,3%6,0%8,2%c,0%e,1%f,1%10,1%11,3%13,3%15,3%18,0%1b,e%1a,1%28,1%2b,1%2f,1%30,1%34,1%37,1%40,1%41,1%42,1%43,1%4e,1%4f,1%50,1%51,1%52,1%53,1%5d,1%5e,1%5f,1%60,1%61,1%62,1%63,1%6e,1' clkspd='19660800' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='1' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='1000' />
			<data name='usev9' value='1' />
			<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='2' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='1' />
			<data name='ictrate' value='1000' />
			<data name='ictmask' value='1263' />
			<data name='anlpres' value='255' />
			<data name='digmask1' value='16777199' />
			<data name='digmask2' value='8' />
		</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='df327cfd-6987-4d5b-9cf1-6949442980a7' 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='1' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Sendyne_MeasuredCurrent_Control' type='u8' description='CUR_C' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_MeasuredCurrent_2' type='u8' description='CUR_OUTH = MSB' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_MeasuredCurrent_1' type='u8' description='CUR_OUTM' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SENDYNE_I_ADDR' type='s16' description='Current measurement page address' isconst='1' isinit='1' usrinit='0' setinit='0X32' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_MeasuredCurrent_0' type='u8' description='CUR_OUTL = LSB' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</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='SENDYNE_MODE_RD' type='s16' description='Sendyne Mode byte: read 3 bytes' isconst='1' isinit='1' usrinit='130' setinit='0b10000010' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_Checksum' type='u8' description='CRC8: 1 0000 0111' isconst='0' isinit='1' usrinit='0' setinit='0X19' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SENDYNE_INTERFRAME_TIMEOUT' type='s16' description='' isconst='1' isinit='1' usrinit='20' setinit='20' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_Mode' type='u8' description='Sendyne Mode byte: read 6 bytes' isconst='0' isinit='1' usrinit='131' setinit='0b10000011' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_Address' type='u8' description='Current measurement page address' isconst='0' isinit='1' usrinit='48' setinit='0x30' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SENDYNE_HDR_CHKSUM' type='s16' description='CRC8: 1 0000 0111 @ read ? bytes from Current Meas page addr' isconst='1' isinit='1' usrinit='0' setinit='0X02' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Sendyne_MeasuredCurrent_Status' type='u8' description='CUR_S' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Sendyne_SendHdr_Read' description='send cmd to read 6 bytes from I page' >
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='SendChar' >
							<argument exp='SENDYNE_MODE_RD' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='SendChar' >
							<argument exp='SENDYNE_I_ADDR' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='SendChar' >
							<argument exp='SENDYNE_HDR_CHKSUM' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Sendyne_Read_Current' description='Receive Current Measurement from SPF100' >
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='ReceiveChar' >
							<return exp='Sendyne_MeasuredCurrent_Status' />
							<argument exp='20' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='ReceiveChar' >
							<return exp='Sendyne_MeasuredCurrent_Control' />
							<argument exp='4' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='ReceiveChar' >
							<return exp='Sendyne_MeasuredCurrent_0' />
							<argument exp='4' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='ReceiveChar' >
							<return exp='Sendyne_MeasuredCurrent_1' />
							<argument exp='4' />
						</command>
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='ReceiveChar' >
							<return exp='Sendyne_MeasuredCurrent_2' />
							<argument exp='4' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Component Macro' component='can1' macro='Initialise' />
						<command class_type='call' title='Call Component Macro' component='RS232_Sendyne' macro='Initialise' />
						<command class_type='loop' title='Loop' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Call Macro' macro='Sendyne_SendHdr_Read' />
								<command class_type='call' title='Call Macro' macro='Sendyne_Read_Current' />
								<command class_type='call' title='Call Component Macro' component='can1' macro='SetTxData' >
									<argument exp='0' />
									<argument exp='8' />
									<argument exp='Sendyne_MeasuredCurrent_0' />
									<argument exp='Sendyne_MeasuredCurrent_1' />
									<argument exp='Sendyne_MeasuredCurrent_2' />
									<argument exp='0' />
									<argument exp='0' />
									<argument exp='0' />
									<argument exp='0' />
									<argument exp='0' />
								</command>
								<command class_type='call' title='Call Component Macro' component='can1' macro='SendBuffer' >
									<argument exp='0' />
								</command>
								<command class_type='output' title='Output' mode='1' port='1048576' mask='1' exp='0' />
								<command class_type='delay' title='Delay' exp='100' type='1' />
								<command class_type='output' title='Output' mode='1' port='1048576' mask='1' exp='1' />
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='c73616d1-7ad0-45d9-aada-69ccfa4c5efc' vmin='3' vmaj='1' codename='RS232_Sendyne' x='-48' y='0' 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='BAUD_LIST' data='005' />
					<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='ref' guid='da332928-6342-4c2c-afc7-eaf33917d33e' vmin='2' vmaj='1' codename='can1' x='32' y='0' z='0.755' 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='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='CHANNEL' data='001' />
					<value target='BUS_RATE' data='001' />
					<value target='SAMPLE' data='001' />
					<value target='SJW' data='000' />
					<value target='EXID' data='000' />
					<value target='REF' data='0' />
					<value target='OSC' data='19660800' />
					<value target='BAUD1' data='3' />
					<value target='BAUD2' data='209' />
					<value target='BAUD3' data='3' />
					<value target='SPIChannel' data='001' />
					<value target='TXPin' data='$PORTB.2' />
					<value target='RXPin' data='$PORTB.3' />
					<value target='TXRemap' data='' />
					<value target='RXRemap' data='' />
					<value target='SDO' data='$PORTC.5' />
					<value target='SDI' data='$PORTC.4' />
					<value target='SCK' data='$PORTC.3' />
					<value target='SPI_CS' data='$PORTC.6' />
					<value target='MosiRemap' data='' />
					<value target='MisoRemap' data='' />
					<value target='ClkRemap' data='' />
					<value target='TXB0ID' data='120' />
					<value target='TXB0LEN' data='8' />
					<value target='TXB0DB0' data='0' />
					<value target='TXB0DB1' data='11' />
					<value target='TXB0DB2' data='22' />
					<value target='TXB0DB3' data='33' />
					<value target='TXB0DB4' data='44' />
					<value target='TXB0DB5' data='55' />
					<value target='TXB0DB6' data='66' />
					<value target='TXB0DB7' data='77' />
					<value target='TXB1ID' data='0' />
					<value target='TXB1LEN' data='0' />
					<value target='TXB1DB0' data='0' />
					<value target='TXB1DB1' data='0' />
					<value target='TXB1DB2' data='0' />
					<value target='TXB1DB3' data='0' />
					<value target='TXB1DB4' data='0' />
					<value target='TXB1DB5' data='0' />
					<value target='TXB1DB6' data='0' />
					<value target='TXB1DB7' data='0' />
					<value target='TXB2ID' data='0' />
					<value target='TXB2LEN' data='0' />
					<value target='TXB2DB0' data='0' />
					<value target='TXB2DB1' data='0' />
					<value target='TXB2DB2' data='0' />
					<value target='TXB2DB3' data='0' />
					<value target='TXB2DB4' data='0' />
					<value target='TXB2DB5' data='0' />
					<value target='TXB2DB6' data='0' />
					<value target='TXB2DB7' data='0' />
					<value target='RXB0CFG' data='000' />
					<value target='RXM0' data='0' />
					<value target='RXF0' data='0' />
					<value target='RXF1' data='0' />
					<value target='RXB1CFG' data='000' />
					<value target='RXM1' data='0' />
					<value target='RXF2' data='0' />
					<value target='RXF3' data='0' />
					<value target='RXF4' data='0' />
					<value target='RXF5' data='0' />
					<value target='MIAC' data='0' />
					<value target='label' data='CAN Bus' />
					<value target='Injector' data='' />
					<value target='InjectorHandle' 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='536.6' 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='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAYQMAAD8DAAA' zoom='75' scrollx='0' scrolly='168' flags='0' />
		<view type='0' name='Sendyne_SendHdr_Read' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAYQMAAD8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Sendyne_Read_Current' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAAYQMAAD8DAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
