<root>
<document scada='0' projtype='1' schema='103' license='1,82702381,95CJQR' title='' description='' fcversion='720896' target='ARD.ATMEGA.E-Blocks3 ArdMega Programmer' >
	<config data='' clkspd='16000000' simspd='0' usewdt='0' constif='0' Use3V3='0' />
	<plugins >
		<dll_models enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<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='7' />
			<data name='ClockPin' value='6' />
			<data name='DataPort' value='7' />
			<data name='DataPin' value='5' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='11' />
			<data name='CalculatedCommsDelay' value='11' />
			<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='25' fixedy='25' fixedz='25' headcode='0' />
		<definition guid='5d0e397b-8c3d-448e-a322-4a2cb1a6468c' vstate='40' vmin='0' vmaj='1' srcleaf='Eblocks2_Power_BL0110.fcfx' visiblename='Power Board (BL0110)' description='A component to drive the power board BL0110 either as a full bridge or as two half bridges.' category='E-blocks 2' category2='' category3='' bIs2dOnly='0' bIs3dOnly='0' bIsWysiwyg='0' catenable='1' author='Matrix TSL' manuname='' manucode='' sysinfo='1053451' keywords='' dynamic='1' scadaCompatible='0' embeddedCompatible='1' showmacros='1' iconpath='..\..\Icons\Components\Motor base.png' />
		<component class_type='root' codename='Power' panelId='-1' 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' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
			<resources />
			<properties >
				<property name='Setup' hidden='0' >
					<property name='Mode' target='Mode' typeid='16' hidden='0' locked='0' info='Defines how the driver is connected.
A full bridge is capable of controlling a load like a DC motor offering speed and direction control.
A half bridge is capable of controlling a load like a DC motor with speed control only.' filter='000Full Bridge
0012 x Half Bridge' />
					<property name='PWM A' target='PinA' typeid='5' hidden='0' locked='0' info='' />
					<property name='Enable A' target='EnableA' typeid='5' hidden='0' locked='0' info='' />
					<property name='PWM B' target='PinB' typeid='5' hidden='0' locked='0' info='' />
					<property name='Enable B' target='EnableB' typeid='5' hidden='0' locked='0' info='' />
				</property>
				<property name='Timer Properties' folder='TimedInterval1::property_2' hidden='0' >
					<property name='Timer' target='TimedInterval1::Timer' typeid='16' hidden='0' locked='0' info='Timer Peripheral to use to monitor the passage of time.' filter='000Timer 0
001Timer 1
002Timer 2
003Timer 3
004Timer 4
005Timer 5' />
					<property name='Frequency (Hz)' target='Frequency' typeid='21' hidden='0' locked='0' info='Sets the control frequency of the PWM output.
Recommend between 100 and 5000 Hz' />
					<property name='Resolution' target='Resolution' typeid='21' hidden='0' locked='0' info='Defines how many possible steps there are in the output PWM duty.
Recommend 100 - 256
100 would allow for duty control values in the range of 0 (fully off) to 99 (fully on)' />
					<property name='Interrupt Rate (Hz)' target='InterruptRate' typeid='21' hidden='0' locked='1' info='The overall timer interrupt rate. 
Try to keep this as low as possible to avoid slowing down the system with excessive interrupts.' />
				</property>
			</properties>
			<values >
				<value target='Mode' data='000' />
				<value target='PinA' data='$PORTA.0' />
				<value target='EnableA' data='$PORTA.1' />
				<value target='PinB' data='$PORTA.2' />
				<value target='EnableB' data='$PORTA.3' />
				<value target='TimedInterval1::Timer' data='000' />
				<value target='Frequency' data='500' />
				<value target='Resolution' data='100' />
				<value target='InterruptRate' data='50000' />
			</values>
			<events >
				<event class='Components' event='AutoIdEBlock' target='Ev_AutoIdEBlock' />
				<event class='Components' event='Property' target='Ev_Property' />
			</events>
			<apis >
				<api name='StartPWM' alt='StartPWM' type='1' proto='1' />
				<api name='SetDirection' alt='SetDirection' type='1' proto='1' />
				<api name='SetDuty' alt='SetDuty' type='1' proto='1' />
				<api name='StopPWM' alt='StopPWM' type='1' proto='1' />
			</apis>
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Count' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='DutyB' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PWMEnabled' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='DutyA' type='u16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='PWMMode' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='Direction' type='b1' description='' isconst='0' isHidden='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isHidden='0' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='Ev_AutoIdEBlock' description='Send to a component so it can check for any auto-id connection info' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='idx' type='u8' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='port' type='s16' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='PinStr' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<local name='Str' type='T8' description='' isconst='0' isHidden='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
							<array size='20' />
						</local>
						<command class_type='sim' title='Built-in Function' macro='Connection.Autodetect' >
							<return exp='.port' />
							<argument exp='this' />
						</command>
						<command class_type='decision' title='Decision' exp='.port &gt;= 0' swap='0' >
							<flowline >
								<command class_type='sim' title='Built-in Function' macro='Connection.GetAutodetectedPortName' >
									<return exp='.Str' />
									<argument exp='this' />
								</command>
								<command class_type='loop' title='Loop' type='2' forvar='.idx' exp='4' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='.PinStr = &quot;$&quot; + .Str + &quot;.&quot; + ToString$(.idx)' />
										</command>
										<command class_type='switch' title='Switch' textarea='36,25,36,25' exp='.idx' >
											<case >
												<flowline >
													<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
														<argument exp='this' />
														<argument exp='&quot;PinA&quot;' />
														<argument exp='.PinStr' />
													</command>
												</flowline>
											</case>
											<case exp='1' >
												<flowline >
													<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
														<argument exp='this' />
														<argument exp='&quot;EnableA&quot;' />
														<argument exp='.PinStr' />
													</command>
												</flowline>
											</case>
											<case exp='2' >
												<flowline >
													<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
														<argument exp='this' />
														<argument exp='&quot;PinB&quot;' />
														<argument exp='.PinStr' />
													</command>
												</flowline>
											</case>
											<case exp='3' >
												<flowline >
													<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
														<argument exp='this' />
														<argument exp='&quot;EnableB&quot;' />
														<argument exp='.PinStr' />
													</command>
												</flowline>
											</case>
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='StartPWM' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='Count = Resolution - 1' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='PWMEnabled = 1' />
						</command>
						<command class_type='call' title='Component Macro' component='TimedInterval1' macro='StartTimerInterval' />
					</flowline>
				</macro>
				<macro >
					<flowline name='Ev_Property' description='Sent when a property has been changed by the User' statediag='0' >
						<return name='Return' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='Calc' type='u32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<local name='fCalc' type='f32' description='' isconst='0' isHidden='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Calc = Frequency * Resolution' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='this' />
							<argument exp='&quot;InterruptRate&quot;' />
							<argument exp='.Calc' />
						</command>
						<command class_type='calculation' title='Convert frequency into time in micro seconds' >
							<exp exp='.fCalc = 1.0 / .Calc' />
							<exp exp='.fCalc = .fCalc * 1000000.0' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='TimedInterval1' />
							<argument exp='&quot;TimePeriod&quot;' />
							<argument exp='FloatToString$(.fCalc)' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='SensorLibraryComponent1' />
							<argument exp='&quot;ValueCount&quot;' />
							<argument exp='Mode + 1' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='SensorLibraryComponent1' />
							<argument exp='&quot;MinTick0&quot;' />
							<argument exp='Resolution / 50' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='SensorLibraryComponent1' />
							<argument exp='&quot;Max0&quot;' />
							<argument exp='Resolution' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='SensorLibraryComponent1' />
							<argument exp='&quot;MinTick1&quot;' />
							<argument exp='Resolution / 50' />
						</command>
						<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
							<argument exp='SensorLibraryComponent1' />
							<argument exp='&quot;Max1&quot;' />
							<argument exp='Resolution' />
						</command>
						<command class_type='decision' title='Decision' exp='Mode' swap='0' >
							<flowline >
								<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
									<argument exp='SensorLibraryComponent1' />
									<argument exp='&quot;Label0::sText&quot;' />
									<argument exp='&quot;A&quot;' />
								</command>
								<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
									<argument exp='SensorLibraryComponent1' />
									<argument exp='&quot;Label1::sText&quot;' />
									<argument exp='&quot;B&quot;' />
								</command>
							</flowline>
							<flowline >
								<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
									<argument exp='SensorLibraryComponent1' />
									<argument exp='&quot;Label0::sText&quot;' />
									<argument exp='&quot;FW&quot;' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetMode' description='Specify what to do on the none active part of the PWM output.
Default - Coast.' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Mode' type='b1' description='0=Coast, 1=Brake' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='PWMMode = .Mode' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetDirection' description='Allows the direction of current to be reversed.
Only applies to the Full Bridge mode. ' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Direction' type='b1' description='0=Forwards, 1=Reverse' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' exp='Mode = 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='Direction = .Direction' />
								</command>
								<command class_type='decision' title='Decision' exp='Direction' swap='0' >
									<flowline >
										<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
											<argument exp='SensorLibraryComponent1' />
											<argument exp='&quot;Label0::sText&quot;' />
											<argument exp='&quot;BW&quot;' />
										</command>
										<command class_type='calculation' title='Invert Duty when changing direction' >
											<exp exp='DutyB = DutyA' />
										</command>
										<command class_type='calculation' title='Calculation' >
											<exp exp='PinA = 0' />
											<exp exp='EnableA = 0' />
										</command>
									</flowline>
									<flowline >
										<command class_type='sim' title='Built-in Function' macro='Component.Property.SetValue' >
											<argument exp='SensorLibraryComponent1' />
											<argument exp='&quot;Label0::sText&quot;' />
											<argument exp='&quot;FW&quot;' />
										</command>
										<command class_type='calculation' title='Invert Duty when changing direction' >
											<exp exp='DutyA = DutyB' />
										</command>
										<command class_type='calculation' title='Calculation' >
											<exp exp='PinB = 0' />
											<exp exp='EnableB = 0' />
										</command>
									</flowline>
								</command>
								<command class_type='calculation' title='Calculation' >
									<exp exp='Count = Resolution - 1' />
								</command>
							</flowline>
							<flowline />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='SetDuty' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Channel' type='u8' description='0=A, 1=B' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='Duty' type='u16' description='Range: 0 to Resolution - 1' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' exp='.Channel' swap='0' >
							<flowline >
								<command class_type='sim' title='Component Macro' component='SensorLibraryComponent1' macro='SetValue' >
									<argument exp='1' />
									<argument exp='.Duty' />
								</command>
								<command class_type='calculation' title='Calculation' >
									<exp exp='DutyB = .Duty' />
								</command>
							</flowline>
							<flowline >
								<command class_type='sim' title='Component Macro' component='SensorLibraryComponent1' macro='SetValue' >
									<argument exp='0' />
									<argument exp='.Duty' />
								</command>
								<command class_type='decision' title='Decision' exp='Direction' swap='0' >
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='DutyB = .Duty' />
										</command>
									</flowline>
									<flowline >
										<command class_type='calculation' title='Calculation' >
											<exp exp='DutyA = .Duty' />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='Count = Resolution - 1' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='StopPWM' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Component Macro' component='TimedInterval1' macro='StopTimerInterval' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='PWMEnabled = 0' />
						</command>
						<command class_type='calculation' title='Calculation' >
							<exp exp='PinA = 0' />
							<exp exp='EnableA = 1' />
							<exp exp='PinB = 0' />
							<exp exp='EnableB = 1' />
						</command>
					</flowline>
				</macro>
				<macro keep='1' >
					<flowline name='TimerRoutine' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='Count = Count + 1' />
						</command>
						<command class_type='decision' title='Decision' exp='Count = Resolution' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='Count = 0' />
								</command>
								<command class_type='decision' title='Decision' exp='Mode' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' exp='DutyA' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' >
													<exp exp='PinA = 1' />
													<exp exp='EnableA = 1' />
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' exp='DutyB' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' >
													<exp exp='PinB = 1' />
													<exp exp='EnableB = 1' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' exp='Direction' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' exp='DutyB' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' >
															<exp exp='PinB = 1' />
															<exp exp='EnableB = 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' exp='DutyA' swap='0' >
													<flowline >
														<command class_type='calculation' title='Calculation' >
															<exp exp='PinA = 1' />
															<exp exp='EnableA = 1' />
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' exp='Mode' swap='0' >
									<flowline >
										<command class_type='decision' title='Decision' exp='Count = DutyA' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' exp='PWMMode' swap='0' >
													<flowline >
														<command class_type='calculation' title='Output Low' >
															<exp exp='PinA = 0' />
															<exp exp='EnableA = 0' />
														</command>
													</flowline>
													<flowline >
														<command class_type='calculation' title='High Impedance' >
															<exp exp='PinA = 0' />
															<exp exp='EnableA = 1' />
														</command>
													</flowline>
												</command>
											</flowline>
											<flowline />
										</command>
										<command class_type='decision' title='Decision' exp='DutyB' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' exp='PWMMode' swap='0' >
													<flowline >
														<command class_type='calculation' title='Output Low' >
															<exp exp='PinB = 0' />
															<exp exp='EnableB = 0' />
														</command>
													</flowline>
													<flowline >
														<command class_type='calculation' title='High Impedance' >
															<exp exp='PinB = 0' />
															<exp exp='EnableB = 1' />
														</command>
													</flowline>
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' exp='Direction' swap='0' >
											<flowline >
												<command class_type='decision' title='Decision' exp='Count = DutyB' swap='0' >
													<flowline >
														<command class_type='decision' title='Decision' exp='PWMMode' swap='0' >
															<flowline >
																<command class_type='calculation' title='Output Low' >
																	<exp exp='PinB = 0' />
																	<exp exp='EnableB = 0' />
																</command>
															</flowline>
															<flowline >
																<command class_type='calculation' title='High Impedance' >
																	<exp exp='PinB = 0' />
																	<exp exp='EnableB = 1' />
																</command>
															</flowline>
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
											<flowline >
												<command class_type='decision' title='Decision' exp='Count = DutyA' swap='0' >
													<flowline >
														<command class_type='decision' title='Decision' exp='PWMMode' swap='0' >
															<flowline >
																<command class_type='calculation' title='Output Low' >
																	<exp exp='PinA = 0' />
																	<exp exp='EnableA = 0' />
																</command>
															</flowline>
															<flowline >
																<command class_type='calculation' title='High Impedance' >
																	<exp exp='PinA = 0' />
																	<exp exp='EnableA = 1' />
																</command>
															</flowline>
														</command>
													</flowline>
													<flowline />
												</command>
											</flowline>
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
					</flowline>
				</macro>
				<macro >
					<flowline name='SetOverride' description='Drives the output to a specific state - no PWM' statediag='0' >
						<return name='Return' type='v0' description='' isconst='0' isHidden='0' isinit='0' usrinit='' setinit='' />
						<param name='Channel' type='b1' description='0=A, 1=B' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<param name='State' type='u8' description='0=Low, 1=High, 2=High Impedance' isconst='0' isHidden='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' exp='PWMEnabled' swap='0' >
							<flowline >
								<command class_type='call' title='User Macro' macro='StopPWM' />
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' exp='.Channel' swap='0' >
							<flowline >
								<command class_type='decision' title='Decision' exp='.State = 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Output Low' >
											<exp exp='PinB = 0' />
											<exp exp='EnableB = 0' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' exp='.State = 1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Output High' >
											<exp exp='PinB = 1' />
											<exp exp='EnableB = 1' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' exp='.State = 2' swap='0' >
									<flowline >
										<command class_type='calculation' title='High Impedance' >
											<exp exp='PinB = 0' />
											<exp exp='EnableB = 1' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' exp='.State = 0' swap='0' >
									<flowline >
										<command class_type='calculation' title='Output Low' >
											<exp exp='PinA = 0' />
											<exp exp='EnableA = 0' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' exp='.State = 1' swap='0' >
									<flowline >
										<command class_type='calculation' title='Output High' >
											<exp exp='PinA = 1' />
											<exp exp='EnableA = 1' />
										</command>
									</flowline>
									<flowline />
								</command>
								<command class_type='decision' title='Decision' exp='.State = 2' swap='0' >
									<flowline >
										<command class_type='calculation' title='High Impedance' >
											<exp exp='PinA = 0' />
											<exp exp='EnableA = 1' />
										</command>
									</flowline>
									<flowline />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='d7633558-54a4-47ff-8c00-95170632c57e' vmin='2' vmaj='1' codename='TimedInterval1' panelId='0' x='76' y='-76' z='0' xsz='24.9572' ysz='25' zsz='25' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='0' scadavisible='1' interactive='0' solid='0' layer='2' poslock='0' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='TimeUnit' data='005' />
					<value target='TimePeriod' data='20.000000' />
					<value target='EstBestPeriod' data='19.937500' />
					<value target='MaxTimeMeasurement' data='68719476736.000000' />
					<value target='CallbackMacro' data='TimerRoutine' />
					<value target='Timer' data='000' />
					<value target='BitDepth' data='8' />
					<value target='PrescalerFilter' data='000' />
					<value target='Prescaler' data='1' />
					<value target='PostscalerFilter' data='000' />
					<value target='PostScaler' data='1' />
					<value target='InstructionRate' data='16000000' />
					<value target='InstructionTime' data='0.000063' />
					<value target='RolloverFreq' data='62500.000000' />
					<value target='RolloverTime' data='0.000016' />
					<value target='RegHighUsed' data='0' />
					<value target='WholePeriods' data='1' />
					<value target='UseSubPeriod' data='1' />
					<value target='SubInstCount' data='63' />
					<value target='SubPeriodOverflow' data='193' />
					<value target='Instance' data='1' />
					<value target='DeviceBits' data='8' />
					<value target='CountRegLow' data='TCNT0' />
					<value target='CountRegHigh' data='' />
					<value target='EnableCode' data='sei(); TIMSK0 |= (1 &lt;&lt; TOIE0);  TCCR0B &amp;= 0xf8; TCCR0B |= 0x01; ' />
					<value target='DisableCode' data='TIMSK0 &amp;= ~(1 &lt;&lt; TOIE0); ' />
					<value target='HandlerCodeStart' data='ISR(TIMER0_OVF_vect) {  ' />
					<value target='HandlerCodeEnd' data=' }' />
					<value target='Family' data='ARD' />
					<value target='TimerDelay' data='50' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='960e433c-1295-4aeb-ac84-04d75422119e' vmin='0' vmaj='1' codename='SensorLibraryComponent1' panelId='0' x='66.5' y='-145.5' z='1' xsz='100.72' ysz='99.8673' zsz='100' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' scadavisible='1' interactive='1' solid='1' layer='2' poslock='1' ancTop='0' ancBottom='0' ancLeft='0' ancRight='0' ancMinX='0' ancMinY='0' comp2dType='0' >
				<resources />
				<properties />
				<values >
					<value target='Text::sText' data='Power Board' />
					<value target='Name' data='Power' />
					<value target='Peripheral::sText' data='' />
					<value target='ShowComms' data='0' />
					<value target='InputIcon::CommsType' data='255' />
					<value target='OutputIcon::CommsType' data='255' />
					<value target='OutputIcon::LinkTo' data='0' />
					<value target='ConsoleHandle' data='0' />
					<value target='NumDP' data='0' />
					<value target='ValueCount' data='1' />
					<value target='Label0::sText' data='FW' />
					<value target='Max0' data='100' />
					<value target='Min0' data='0.000000' />
					<value target='MajTick0' data='10' />
					<value target='MinTick0' data='2' />
					<value target='Label1::sText' data='B' />
					<value target='Max1' data='100' />
					<value target='Min1' data='0.000000' />
					<value target='MajTick1' data='10' />
					<value target='MinTick1' data='2' />
					<value target='Label2::sText' data='Val 2' />
					<value target='Max2' data='100.000000' />
					<value target='Min2' data='0.000000' />
					<value target='MajTick2' data='10' />
					<value target='MinTick2' data='2.000000' />
					<value target='Label3::sText' data='Val 3' />
					<value target='Max3' data='100.000000' />
					<value target='Min3' data='0.000000' />
					<value target='MajTick3' data='10' />
					<value target='MinTick3' data='2.000000' />
					<value target='Label4::sText' data='Val 4' />
					<value target='Max4' data='100.000000' />
					<value target='Min4' data='0.000000' />
					<value target='MajTick4' data='10' />
					<value target='MinTick4' data='2.000000' />
					<value target='Label5::sText' data='Val 5' />
					<value target='Max5' data='100.000000' />
					<value target='Min5' data='0.000000' />
					<value target='MajTick5' data='10' />
					<value target='MinTick5' data='2.000000' />
					<value target='Label6::sText' data='Val 6' />
					<value target='Max6' data='100.000000' />
					<value target='Min6' data='0.000000' />
					<value target='MajTick6' data='10' />
					<value target='MinTick6' data='2.000000' />
					<value target='Label7::sText' data='Val 7' />
					<value target='Max7' data='100.000000' />
					<value target='Min7' data='0.000000' />
					<value target='MajTick7' data='10' />
					<value target='MinTick7' data='2.000000' />
					<value target='Label8::sText' data='Val 8' />
					<value target='Max8' data='100.000000' />
					<value target='Min8' data='0.000000' />
					<value target='MajTick8' data='10' />
					<value target='MinTick8' data='2.000000' />
					<value target='Label9::sText' data='Val 9' />
					<value target='Max9' data='100.000000' />
					<value target='Min9' data='0.000000' />
					<value target='MajTick9' data='10' />
					<value target='MinTick9' data='2.000000' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<scadaresourcelookup />
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='0' ye='0' ze='1685.24' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<viewport dx='642' dy='419' zoom='46.0956' fix_topleft='0' />
		<page x='1000' y='1000' show='0' rgb='0' />
		<winpos ID='7005' RectRecentFloat='717,360,1367,810' RectRecentDocked='0,0,549,419' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel2d>
	<panel3d shadows='1' lighting='2' brightness='0' perspective='1' >
		<background rgb='7895160' img='' style='0' />
		<table rgb='8388608' img='' style='0' size='0' />
		<camera xe='0' ye='0' ze='781.66' 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' />
		<winpos ID='7004' RectRecentFloat='153,370,807,947' RectRecentDocked='0,0,292,872' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='0' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
	</panel3d>
	<panels2d count='1' >
		<panel2d_0 id='0' name='2D Panel' type='0' >
			<winpos ID='1171' RectRecentFloat='2050,429,2320,855' RectRecentDocked='921,141,1470,707' RecentFrameAlignment='16384' RecentRowIndex='0' IsFloating='1' MRUWidth='32767' PinState='0' IsMaximized='0' IsVisible='0' />
			<background fill='288230376149408988' showgrid='1' gridstyle='1' gridsize='10' gridbrush='71776119075691740' snaptogrid='1' fitcomp='0' disp_x='300' disp_y='400' scale='100' disp_col='16777215' />
		</panel2d_0>
	</panels2d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='TimerRoutine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='270' flags='0' />
		<view type='0' name='StartPWM' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='StopPWM' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_Property' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetDuty' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetDirection' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Ev_AutoIdEBlock' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetMode' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='SetOverride' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAARgQAAGMDAAA' zoom='100' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
