<?xml version="1.0" encoding="utf-8"?>
<!-- This file represents configuration database for dspMC Motion Controller -->
<dspMCConfig>
	<HardEncoderPolarity>
		<!-- 1 = as is, -1 = reversed  -->
		<Channel_0> 1 </Channel_0>
		<Channel_1> -1 </Channel_1>
		<Channel_2> 1 </Channel_2>
		<Channel_3> 1 </Channel_3>
		<Channel_4> 1 </Channel_4>
		<Channel_5> 1 </Channel_5>
	</HardEncoderPolarity>
	<Mach3Config>
		<Spindle>
			<DAC>7</DAC>
		</Spindle>
		<MaxBufferLevel> 50 </MaxBufferLevel>
		<!-- upto 100% for 4096 points/axis -->
		<!-- 1 = Ignore limit switches while homing.  0 = Do not ignore limit switches -->
		<HomingIgnoreLimitSw> 0 </HomingIgnoreLimitSw>
		<BackLash>
			<!-- Raw Encoder Counts -->
			<Counts_x> 0 </Counts_x>
			<Counts_y> 0 </Counts_y>
			<Counts_z> 0 </Counts_z>
			<Counts_a> 0 </Counts_a>
			<Counts_b> 0 </Counts_b>
			<Counts_c> 0 </Counts_c>
		</BackLash>
		<RPM>
			<CountsPerRev_x> 10000 </CountsPerRev_x>
			<CountsPerRev_y> 10000 </CountsPerRev_y>
			<CountsPerRev_z> 10000 </CountsPerRev_z>
			<CountsPerRev_a> 10000 </CountsPerRev_a>
			<CountsPerRev_b> 2000 </CountsPerRev_b>
			<CountsPerRev_c> 2000 </CountsPerRev_c>
		</RPM>
		<MpgSource1>
			<Type>HardEncoder</Type>
			<!-- Options: SoftEncoder, HardEncoder-->
			<Index>3</Index>
		</MpgSource1>
		<Threading>
			<RPM_Sync_Source> HardEncoder </RPM_Sync_Source>
			<!-- HardEncoder or DigitalInput -->
			<RPM_Sync_Index> 3 </RPM_Sync_Index>
			<RPM_Count_Per_Rev> 2000 </RPM_Count_Per_Rev>
			<RPM_Sampling_Milli_Second> 50 </RPM_Sampling_Milli_Second>
			<!-- 1 ms thru 10000 ms -->
		</Threading>
		<Probing>
			<ProbingType> DualCycle </ProbingType>
			<!-- SingleCycle or DualCycle (coarse and fine moves) -->
			<ProbingMoveBack> 0.35 </ProbingMoveBack>
			<!-- Distance in mm/inch to move back from touch point before starting the second (fine) move -->
			<ProbingFeedRate> 15.5 </ProbingFeedRate>
			<!-- Feedrate for the second cycle (fine move) in mm or inch per minute -->
		</Probing>
	</Mach3Config>
	<Axis0>
		<PID_Filter>
			<P>800</P>
			<I>250</I>
			<D>20000</D>
			<!-- Feed Forward Command Gain -->
			<ffcGain>0</ffcGain>
			<!-- Feed Forward Command Derivative Gain -->
			<ffcdGain>0</ffcdGain>
			<!-- Max Limit on Error (Command - Feedback) -->
			<MaxError>0</MaxError>
			<!-- Max Limit on Integral Error -->
			<MaxError_I>310</MaxError_I>
			<!-- Max Limit on Differential Error -->
			<MaxError_D>0</MaxError_D>
			<!-- Max Limit on Following Error -->
			<MaxError_F>3000</MaxError_F>
			<!-- Range of Error where PID Loop does not respond -->
			<Deadband>0</Deadband>
			<!-- Max Limit on Command Derivative -->
			<MaxCmd_D>0</MaxCmd_D>
			<!-- Divisor for PID Calculation -->
			<Scale>150</Scale>
			<!-- Constant to be added after PID calculation and scalling -->
			<Offset>0</Offset>
		</PID_Filter>
		<ControlInput>
			<!-- Source: TrajectoryPlanner, CommandPosition, Counter, A2D -->
			<Source>CommandPosition</Source>
			<Index>0</Index>
			<Gain>1.000000</Gain>
		</ControlInput>
		<!-- Feedback: Counter, A2D -->
		<PID_Feedback>
			<Source>Counter</Source>
			<Index>0</Index>
			<Gain>1.000000</Gain></PID_Feedback>
		<ControlOutput>
			<!-- Output: undefined,DAC, Stepper -->
			<Type>DAC</Type>
			<Index>0</Index>
		</ControlOutput>
		<AmpEnable>
			<!-- Bit Index 0=undefined, 1..16 (bit number - 1) -->
			<Index>0</Index>
		</AmpEnable>
		<Homing>
			<Type>HomeSensor</Type>
			<!-- Options: HomeSensor, IndexPulseOnly -->
			<UseIndexPulse>0</UseIndexPulse>
			<!-- Options: 1 = use index pulse, 0 = donot use index pulse -->
		</Homing>
	</Axis0>
	<Axis1>
		<PID_Filter>
			<P>900</P>
			<I>550</I>
			<D>15000</D>
			<!-- Feed Forward Command Gain -->
			<ffcGain>0</ffcGain>
			<!-- Feed Forward Command Derivative Gain -->
			<ffcdGain>0</ffcdGain>
			<!-- Max Limit on Error (Command - Feedback) -->
			<MaxError>0</MaxError>
			<!-- Max Limit on Integral Error -->
			<MaxError_I>180</MaxError_I>
			<!-- Max Limit on Differential Error -->
			<MaxError_D>0</MaxError_D>
			<!-- Max Limit on Following Error -->
			<MaxError_F>3000</MaxError_F>
			<!-- Range of Error where PID Loop does not respond -->
			<Deadband>0</Deadband>
			<!-- Max Limit on Command Derivative -->
			<MaxCmd_D>0</MaxCmd_D>
			<!-- Divisor for PID Calculation -->
			<Scale>180</Scale>
			<!-- Constant to be added after PID calculation and scalling -->
			<Offset>0</Offset>
		</PID_Filter>
		<ControlInput>
			<!-- Source: TrajectoryPlanner, CommandPosition, Counter, A2D -->
			<Source>CommandPosition</Source>
			<Index>1</Index>
			<Gain>1.000000</Gain>
		</ControlInput>
		<!-- Feedback: Counter, A2D -->
		<PID_Feedback>
			<Source>Counter</Source>
			<Index>1</Index>
			<Gain>1.000000</Gain></PID_Feedback>
		<ControlOutput>
			<!-- Output: DAC, Stepper -->
			<Type>DAC</Type>
			<Index>1</Index>
		</ControlOutput>
		<AmpEnable>
			<!-- Bit Index 0=undefined, 1..16 bit number - 1 -->
			<Index>0</Index>
		</AmpEnable>
		<Homing>
			<Type>HomeSensor</Type>
			<!-- Options: HomeSensor, IndexPulseOnly -->
			<UseIndexPulse>0</UseIndexPulse>
			<!-- Options: 1 = use index pulse, 0 = donot use index pulse -->
		</Homing>
	</Axis1>
	<Axis2>
		<PID_Filter>
			<P>4000</P>
			<I>0</I>
			<D>100000</D>
			<!-- Feed Forward Command Gain -->
			<ffcGain>0</ffcGain>
			<!-- Feed Forward Command Derivative Gain -->
			<ffcdGain>0</ffcdGain>
			<!-- Max Limit on Error (Command - Feedback) -->
			<MaxError>0</MaxError>
			<!-- Max Limit on Integral Error -->
			<MaxError_I>0</MaxError_I>
			<!-- Max Limit on Differential Error -->
			<MaxError_D>0</MaxError_D>
			<!-- Max Limit on Following Error -->
			<MaxError_F>2000</MaxError_F>
			<!-- Range of Error where PID Loop does not respond -->
			<Deadband>0</Deadband>
			<!-- Max Limit on Command Derivative -->
			<MaxCmd_D>0</MaxCmd_D>
			<!-- Divisor for PID Calculation -->
			<Scale>800</Scale>
			<!-- Constant to be added after PID calculation and scalling -->
			<Offset>0</Offset>
		</PID_Filter>
		<ControlInput>
			<!-- Source: TrajectoryPlanner, CommandPosition, Counter, A2D -->
			<Source>CommandPosition</Source>
			<Index>2</Index>
			<Gain>1.000000</Gain>
		</ControlInput>
		<!-- Feedback: Counter, A2D -->
		<PID_Feedback>
			<Source>Counter</Source>
			<Index>2</Index>
			<Gain>1.000000</Gain></PID_Feedback>
		<ControlOutput>
			<!-- Output: DAC, Stepper -->
			<Type>DAC</Type>
			<Index>2</Index>
		</ControlOutput>
		<AmpEnable>
			<!-- Bit Index 0=undefined, 1..16 bit number - 1 -->
			<Index>0</Index>
		</AmpEnable>
		<Homing>
			<Type>HomeSensor</Type>
			<!-- Options: HomeSensor, IndexPulseOnly -->
			<UseIndexPulse>0</UseIndexPulse>
			<!-- Options: 1 = use index pulse, 0 = donot use index pulse -->
		</Homing>
	</Axis2>
	<Axis3>
		<PID_Filter>
			<P>800</P>
			<I>250</I>
			<D>20000</D>
			<!-- Feed Forward Command Gain -->
			<ffcGain>0</ffcGain>
			<!-- Feed Forward Command Derivative Gain -->
			<ffcdGain>0</ffcdGain>
			<!-- Max Limit on Error (Command - Feedback) -->
			<MaxError>0</MaxError>
			<!-- Max Limit on Integral Error -->
			<MaxError_I>310</MaxError_I>
			<!-- Max Limit on Differential Error -->
			<MaxError_D>0</MaxError_D>
			<!-- Max Limit on Following Error -->
			<MaxError_F>3000</MaxError_F>
			<!-- Range of Error where PID Loop does not respond -->
			<Deadband>0</Deadband>
			<!-- Max Limit on Command Derivative -->
			<MaxCmd_D>0</MaxCmd_D>
			<!-- Divisor for PID Calculation -->
			<Scale>150</Scale>
			<!-- Constant to be added after PID calculation and scalling -->
			<Offset>0</Offset>
		</PID_Filter>
		<ControlInput>
			<Source>CommandPosition</Source>
			<Index>0</Index>
			<Gain>-1.000000</Gain>
		</ControlInput>
		<PID_Feedback>
			<Source>Counter</Source>
			<Index>3</Index>
			<Gain>1.000000</Gain>
		</PID_Feedback>
		<ControlOutput>
			<Type>DAC</Type>
			<Index>3</Index>
		</ControlOutput>
		<AmpEnable>
			<Index>0</Index>
		</AmpEnable>
		<Homing>
			<Type>HomeSensor</Type>
			<!-- Options: HomeSensor, IndexPulseOnly -->
			<UseIndexPulse>0</UseIndexPulse>
			<!-- Options: 1 = use index pulse, 0 = donot use index pulse -->
		</Homing>
	</Axis3>
	<Axis4>
		<PID_Filter>
			<P>5000</P>
			<I>20</I>
			<D>400</D>
			<ffcGain>0</ffcGain>
			<ffcdGain>0</ffcdGain>
			<MaxError>0</MaxError>
			<MaxError_I>100</MaxError_I>
			<MaxError_D>0</MaxError_D>
			<MaxError_F>3000</MaxError_F>
			<Deadband>0</Deadband>
			<MaxCmd_D>0</MaxCmd_D>
			<Scale>15000</Scale>
			<Offset>0</Offset>
		</PID_Filter>
		<ControlInput>
			<Source>TrajectoryPlanner</Source>
			<Index>4</Index>
			<Gain>1.000000</Gain>
		</ControlInput>
		<PID_Feedback>
			<Source>Counter</Source>
			<Index>4</Index>
			<Gain>1.000000</Gain>
		</PID_Feedback>
		<ControlOutput>
			<Type>Undefined</Type>
			<Index>4</Index>
		</ControlOutput>
		<AmpEnable>
			<Index>0</Index>
		</AmpEnable>
		<Homing>
			<Type>HomeSensor</Type>
			<!-- Options: HomeSensor, IndexPulseOnly -->
			<UseIndexPulse>1</UseIndexPulse>
			<!-- Options: 1 = use index pulse, 0 = donot use index pulse -->
		</Homing>
	</Axis4>
	<Axis5>
		<PID_Filter>
			<P>5000</P>
			<I>20</I>
			<D>400</D>
			<ffcGain>0</ffcGain>
			<ffcdGain>0</ffcdGain>
			<MaxError>0</MaxError>
			<MaxError_I>100</MaxError_I>
			<MaxError_D>0</MaxError_D>
			<MaxError_F>3000</MaxError_F>
			<Deadband>0</Deadband>
			<MaxCmd_D>0</MaxCmd_D>
			<Scale>15000</Scale>
			<Offset>0</Offset>
		</PID_Filter>
		<ControlInput>
			<Source>TrajectoryPlanner</Source>
			<Index>5</Index>
			<Gain>1.000000</Gain>
		</ControlInput>
		<PID_Feedback>
			<Source>A2D</Source>
			<Index>5</Index>
			<Gain>1.000000</Gain>
		</PID_Feedback>
		<ControlOutput>
			<Type>Undefined</Type>
			<Index>5</Index>
		</ControlOutput>
		<AmpEnable>
			<Index>0</Index>
		</AmpEnable>
		<Homing>
			<Type>HomeSensor</Type>
			<!-- Options: HomeSensor, IndexPulseOnly -->
			<UseIndexPulse>1</UseIndexPulse>
			<!-- Options: 1 = use index pulse, 0 = donot use index pulse -->
		</Homing>
	</Axis5>
</dspMCConfig>
