<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="20.01" TargetName="T2MOV" TargetType="AddOnInstructionDefinition" TargetRevision="1.1 " TargetLastEdited="2015-04-29T19:59:56.719Z" ContainsContext="true" Owner="Exlar, Exlar" ExportDate="Mon May 04 14:50:05 2015" ExportOptions="References DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Exlar_AOI_Sample_Project_v1_0">
<DataTypes Use="Context">
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="T2MOV" Revision="1.1" Vendor="Exlar Corporation" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2014-04-17T12:59:30.407Z" CreatedBy="INT\jalvarez" EditedDate="2015-04-29T19:59:56.719Z" EditedBy="INT\jalvarez"
 SoftwareRevision="v20.01">
<AdditionalHelpText>
<![CDATA[Use the Tritex 2 Move (T2MOV) instruction to execute an drive move command
The Move instruction is used to set up move profile parameters for both primary and secondary move.  The AOI also includes the ability to control the execution of the move. 

Configured for Exlar EIP AOI. 07/01/2014

----------------------------------------------------------------------------------------------------------------------------
Parameters Bit Definition
----------------------------------------------------------------------------------------------------------------------------

Execute:   (Input) Control Move 0 commands       
------------------------------------------------------------------
     Execute.0:     Move 0 Maintained
     Execute.1:     Move 0 Momentary


Options:   (Input) Move 0 Options       
------------------------------------------------------------------
     Options.0:     Secondary Motion Enable


PrimOption:   (Input) Move 0 Primary Options       
------------------------------------------------------------------
     PrimOption.2.1.0:    Three bits determine Primary Move Options
                                    %000 = Absolute Position
                                    %001 = Incremental
                                    %010 = Unlimited(+)
                                    %011 = Unlimted(-)
                                    %100 = Absolute(+) only
                                    %101 = Absolute(-) only
     PrimOption.3:     Limit maximum Current
     PrimOption.4:     Terminate on Current Limit
     PrimOption.5:     Fault if terminated by current limit



SecOption:   (Input) Move 0 Secondary Options       
------------------------------------------------------------------
     SecOption.2.1.0:    Three bits determine Secondary Move Options
                                    %000 = Absolute Position
                                    %001 = Incremental
                                    %010 = Unlimited(+)
                                    %011 = Unlimted(-)
                                    %100 = Absolute(+) only
                                    %101 = Absolute(-) only
     SecOption.3:     Limit maximum Current
     SecOption.4:     Terminate on Current Limit
     SecOption.5:     Fault if terminated by current limit


Active:  (Output) Move 0 status information      
------------------------------------------------------------------
     Active.0:     Ready -  is set when both the ENABLED and HOMED flags are active.
     Active.1:     Move 0 in Position
     Active.2:     Move 0 active



  ]]>
</AdditionalHelpText>
<Parameters>
<Parameter Name="EnableIn" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only">
<Description>
<![CDATA[Enable Input - System Defined Parameter]]>
</Description>
</Parameter>
<Parameter Name="EnableOut" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only">
<Description>
<![CDATA[Enable Output - System Defined Parameter]]>
</Description>
</Parameter>
<Parameter Name="ModuleInputs" TagType="Base" DataType="INT" Dimensions="101" Usage="InOut" Radix="Decimal" Required="true" Visible="true" Constant="false">
<Description>
<![CDATA[Module Input Array]]>
</Description>
</Parameter>
<Parameter Name="ModuleOutputs" TagType="Base" DataType="INT" Dimensions="101" Usage="InOut" Radix="Decimal" Required="true" Visible="true" Constant="false">
<Description>
<![CDATA[Module Outputs Array]]>
</Description>
</Parameter>
<Parameter Name="Units" TagType="Base" DataType="REAL" Dimensions="4" Usage="InOut" Radix="Float" Required="true" Visible="true" Constant="false">
<Description>
<![CDATA[Units]]>
</Description>
</Parameter>
<Parameter Name="Execute" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Move Control]]>
</Description>
<DefaultData>00 00</DefaultData>
<Comments>
<Comment Operand=".0">
<![CDATA[Maintained]]>
</Comment>
<Comment Operand=".1">
<![CDATA[Momentary]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Options" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Move Options]]>
</Description>
<DefaultData>00 00</DefaultData>
<Comments>
<Comment Operand=".0">
<![CDATA[Secondary Motion Enable]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="CurrentLimit" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Move Current Limit]]>
</Description>
<DefaultData>00 00 00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Acceleration" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Acceleration rate of the drive in Accel Units]]>
</Description>
<DefaultData>00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Deceleration" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Deceleration rate of the drive in Accel Units]]>
</Description>
<DefaultData>00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Prim_Position" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Absolute position or incremental distance for the move]]>
</Description>
<DefaultData>00 00 00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Prim_Velocity" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Speed to move the drive in Speed Units]]>
</Description>
<DefaultData>00 00 00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Prim_Option" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Primary Move Options]]>
</Description>
<DefaultData>00 00</DefaultData>
<Comments>
<Comment Operand=".0">
<![CDATA[TYPE Bit]]>
</Comment>
<Comment Operand=".1">
<![CDATA[TYPE Bit]]>
</Comment>
<Comment Operand=".2">
<![CDATA[TYPE Bit]]>
</Comment>
<Comment Operand=".3">
<![CDATA[Limit maximum Current]]>
</Comment>
<Comment Operand=".4">
<![CDATA[Terminate on Current Limit]]>
</Comment>
<Comment Operand=".5">
<![CDATA[Fault if terminated by current limit]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Sec_Position" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Absolute position or incremental distance for the move]]>
</Description>
<DefaultData>00 00 00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Sec_Velocity" TagType="Base" DataType="REAL" Usage="Input" Radix="Float" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Speed to move the drive in Speed Units]]>
</Description>
<DefaultData>00 00 00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="REAL" Radix="Float" Value="0.0"/>
</DefaultData>
</Parameter>
<Parameter Name="Sec_Option" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Secondary Move Options]]>
</Description>
<DefaultData>00 00</DefaultData>
<Comments>
<Comment Operand=".0">
<![CDATA[TYPE Bit]]>
</Comment>
<Comment Operand=".1">
<![CDATA[TYPE Bit]]>
</Comment>
<Comment Operand=".2">
<![CDATA[TYPE Bit]]>
</Comment>
<Comment Operand=".3">
<![CDATA[Limit maximum Current]]>
</Comment>
<Comment Operand=".4">
<![CDATA[Terminate on Current Limit]]>
</Comment>
<Comment Operand=".5">
<![CDATA[Fault if terminated by current limit]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="DF" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[A Drive Fault is active]]>
</Description>
<DefaultData>00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="ER" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[A Instruction error is Active]]>
</Description>
<DefaultData>00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="IP" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Move 0 In Position]]>
</Description>
<DefaultData>00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Active" TagType="Base" DataType="INT" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Active]]>
</Description>
<DefaultData>00 00</DefaultData>
<Comments>
<Comment Operand=".0">
<![CDATA[Ready]]>
</Comment>
<Comment Operand=".1">
<![CDATA[Move 0 In Position]]>
</Comment>
<Comment Operand=".2">
<![CDATA[Move 0 active]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
</Parameters>
<LocalTags>
<LocalTag Name="dintResults" DataType="DINT" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[Temporary register]]>
</Description>
<DefaultData>00 00 00 00</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="Logic" Type="ST">
<STContent>
<Line Number="0">
<![CDATA[(***********************************************)]]>
</Line>
<Line Number="1">
<![CDATA[(*   Exlar Tritex 2 Move                       *)]]>
</Line>
<Line Number="2">
<![CDATA[(*                                             *)]]>
</Line>
<Line Number="3">
<![CDATA[(***********************************************)]]>
</Line>
<Line Number="4">
<![CDATA[]]>
</Line>
<Line Number="5">
<![CDATA[]]>
</Line>
<Line Number="6">
<![CDATA[(********** Inputs ***********)]]>
</Line>
<Line Number="7">
<![CDATA[]]>
</Line>
<Line Number="8">
<![CDATA[(* Execute *)]]>
</Line>
<Line Number="9">
<![CDATA[	(* 4318.0  Move 0 Maintained *)]]>
</Line>
<Line Number="10">
<![CDATA[	if Execute.0 then]]>
</Line>
<Line Number="11">
<![CDATA[		ModuleOutputs[2].0 := 1;]]>
</Line>
<Line Number="12">
<![CDATA[	else]]>
</Line>
<Line Number="13">
<![CDATA[		ModuleOutputs[2].0 := 0;		]]>
</Line>
<Line Number="14">
<![CDATA[	end_if;]]>
</Line>
<Line Number="15">
<![CDATA[]]>
</Line>
<Line Number="16">
<![CDATA[	(* 4319.0  Move 0 Momentary *)]]>
</Line>
<Line Number="17">
<![CDATA[	if Execute.1 then]]>
</Line>
<Line Number="18">
<![CDATA[		ModuleOutputs[12].0 := 1;]]>
</Line>
<Line Number="19">
<![CDATA[	else]]>
</Line>
<Line Number="20">
<![CDATA[		ModuleOutputs[12].0 := 0;		]]>
</Line>
<Line Number="21">
<![CDATA[	end_if;]]>
</Line>
<Line Number="22">
<![CDATA[]]>
</Line>
<Line Number="23">
<![CDATA[(* Option *)]]>
</Line>
<Line Number="24">
<![CDATA[	(* 6100.0  Secondary Motion Enable *)]]>
</Line>
<Line Number="25">
<![CDATA[	if Options.0 then]]>
</Line>
<Line Number="26">
<![CDATA[		ModuleOutputs[17].0 := 1;]]>
</Line>
<Line Number="27">
<![CDATA[	else]]>
</Line>
<Line Number="28">
<![CDATA[		ModuleOutputs[17].0 := 0;		]]>
</Line>
<Line Number="29">
<![CDATA[	end_if;]]>
</Line>
<Line Number="30">
<![CDATA[]]>
</Line>
<Line Number="31">
<![CDATA[(* Primary Option *)]]>
</Line>
<Line Number="32">
<![CDATA[	(* 6106.0  - Move Type *)]]>
</Line>
<Line Number="33">
<![CDATA[	if Prim_Option.0 then]]>
</Line>
<Line Number="34">
<![CDATA[		ModuleOutputs[23].0 := 1;]]>
</Line>
<Line Number="35">
<![CDATA[	else]]>
</Line>
<Line Number="36">
<![CDATA[		ModuleOutputs[23].0 := 0;		]]>
</Line>
<Line Number="37">
<![CDATA[	end_if;]]>
</Line>
<Line Number="38">
<![CDATA[	(* 6106.1  - Move Type *)]]>
</Line>
<Line Number="39">
<![CDATA[	if Prim_Option.1 then]]>
</Line>
<Line Number="40">
<![CDATA[		ModuleOutputs[23].1 := 1;]]>
</Line>
<Line Number="41">
<![CDATA[	else]]>
</Line>
<Line Number="42">
<![CDATA[		ModuleOutputs[23].1 := 0;		]]>
</Line>
<Line Number="43">
<![CDATA[	end_if;]]>
</Line>
<Line Number="44">
<![CDATA[	(* 6106.2  - Move Type *)]]>
</Line>
<Line Number="45">
<![CDATA[	if Prim_Option.2 then]]>
</Line>
<Line Number="46">
<![CDATA[		ModuleOutputs[23].2 := 1;]]>
</Line>
<Line Number="47">
<![CDATA[	else]]>
</Line>
<Line Number="48">
<![CDATA[		ModuleOutputs[23].2 := 0;		]]>
</Line>
<Line Number="49">
<![CDATA[	end_if;]]>
</Line>
<Line Number="50">
<![CDATA[]]>
</Line>
<Line Number="51">
<![CDATA[	(* 6106.4 Limit maximum Current *)]]>
</Line>
<Line Number="52">
<![CDATA[	if Prim_Option.3 then]]>
</Line>
<Line Number="53">
<![CDATA[		ModuleOutputs[23].4 := 1;]]>
</Line>
<Line Number="54">
<![CDATA[	else]]>
</Line>
<Line Number="55">
<![CDATA[		ModuleOutputs[23].4 := 0;		]]>
</Line>
<Line Number="56">
<![CDATA[	end_if;]]>
</Line>
<Line Number="57">
<![CDATA[]]>
</Line>
<Line Number="58">
<![CDATA[	(* 6106.8 Terminate on Current Limit *)]]>
</Line>
<Line Number="59">
<![CDATA[	if Prim_Option.4 then]]>
</Line>
<Line Number="60">
<![CDATA[		ModuleOutputs[23].8 := 1;]]>
</Line>
<Line Number="61">
<![CDATA[	else]]>
</Line>
<Line Number="62">
<![CDATA[		ModuleOutputs[23].8 := 0;		]]>
</Line>
<Line Number="63">
<![CDATA[	end_if;]]>
</Line>
<Line Number="64">
<![CDATA[]]>
</Line>
<Line Number="65">
<![CDATA[	(* 6106.12 Fault if terminated by current limit *)]]>
</Line>
<Line Number="66">
<![CDATA[	if Prim_Option.5 then]]>
</Line>
<Line Number="67">
<![CDATA[		ModuleOutputs[23].12 := 1;]]>
</Line>
<Line Number="68">
<![CDATA[	else]]>
</Line>
<Line Number="69">
<![CDATA[		ModuleOutputs[23].12 := 0;		]]>
</Line>
<Line Number="70">
<![CDATA[	end_if;]]>
</Line>
<Line Number="71">
<![CDATA[]]>
</Line>
<Line Number="72">
<![CDATA[(* Secondary Option	*)]]>
</Line>
<Line Number="73">
<![CDATA[	(* 6112.0  - Move Type *)]]>
</Line>
<Line Number="74">
<![CDATA[	if Sec_Option.0 then]]>
</Line>
<Line Number="75">
<![CDATA[		ModuleOutputs[29].0 := 1;]]>
</Line>
<Line Number="76">
<![CDATA[	else]]>
</Line>
<Line Number="77">
<![CDATA[		ModuleOutputs[29].0 := 0;		]]>
</Line>
<Line Number="78">
<![CDATA[	end_if;]]>
</Line>
<Line Number="79">
<![CDATA[]]>
</Line>
<Line Number="80">
<![CDATA[	(* 6112.1  - Move Type *)]]>
</Line>
<Line Number="81">
<![CDATA[	if Sec_Option.1 then]]>
</Line>
<Line Number="82">
<![CDATA[		ModuleOutputs[29].1 := 1;]]>
</Line>
<Line Number="83">
<![CDATA[	else]]>
</Line>
<Line Number="84">
<![CDATA[		ModuleOutputs[29].1 := 0;		]]>
</Line>
<Line Number="85">
<![CDATA[	end_if;]]>
</Line>
<Line Number="86">
<![CDATA[]]>
</Line>
<Line Number="87">
<![CDATA[	(* 6112.2  - Move Type *)]]>
</Line>
<Line Number="88">
<![CDATA[	if Sec_Option.2 then]]>
</Line>
<Line Number="89">
<![CDATA[		ModuleOutputs[29].2 := 1;]]>
</Line>
<Line Number="90">
<![CDATA[	else]]>
</Line>
<Line Number="91">
<![CDATA[		ModuleOutputs[29].2 := 0;		]]>
</Line>
<Line Number="92">
<![CDATA[	end_if;]]>
</Line>
<Line Number="93">
<![CDATA[]]>
</Line>
<Line Number="94">
<![CDATA[	(* 6112.4 Limit maximum Current *)]]>
</Line>
<Line Number="95">
<![CDATA[	if Sec_Option.3 then]]>
</Line>
<Line Number="96">
<![CDATA[		ModuleOutputs[29].4 := 1;]]>
</Line>
<Line Number="97">
<![CDATA[	else]]>
</Line>
<Line Number="98">
<![CDATA[		ModuleOutputs[29].4 := 0;		]]>
</Line>
<Line Number="99">
<![CDATA[	end_if;]]>
</Line>
<Line Number="100">
<![CDATA[]]>
</Line>
<Line Number="101">
<![CDATA[	(* 6112.8 Terminate on Current Limit *)]]>
</Line>
<Line Number="102">
<![CDATA[	if Sec_Option.4 then]]>
</Line>
<Line Number="103">
<![CDATA[		ModuleOutputs[29].8 := 1;]]>
</Line>
<Line Number="104">
<![CDATA[	else]]>
</Line>
<Line Number="105">
<![CDATA[		ModuleOutputs[29].8 := 0;		]]>
</Line>
<Line Number="106">
<![CDATA[	end_if;]]>
</Line>
<Line Number="107">
<![CDATA[]]>
</Line>
<Line Number="108">
<![CDATA[	(* 6112.12 Fault if terminated by current limit *)]]>
</Line>
<Line Number="109">
<![CDATA[	if Sec_Option.5 then]]>
</Line>
<Line Number="110">
<![CDATA[		ModuleOutputs[29].12 := 1;]]>
</Line>
<Line Number="111">
<![CDATA[	else]]>
</Line>
<Line Number="112">
<![CDATA[		ModuleOutputs[29].12 := 0;		]]>
</Line>
<Line Number="113">
<![CDATA[	end_if;]]>
</Line>
<Line Number="114">
<![CDATA[]]>
</Line>
<Line Number="115">
<![CDATA[]]>
</Line>
<Line Number="116">
<![CDATA[(********** Outputs **********)]]>
</Line>
<Line Number="117">
<![CDATA[(* Drive Faults Active *)]]>
</Line>
<Line Number="118">
<![CDATA[	(* 104.03 Fault *)]]>
</Line>
<Line Number="119">
<![CDATA[	If ModuleInputs[1].03 then]]>
</Line>
<Line Number="120">
<![CDATA[ 		DF := 1;]]>
</Line>
<Line Number="121">
<![CDATA[	Else]]>
</Line>
<Line Number="122">
<![CDATA[		DF := 0;]]>
</Line>
<Line Number="123">
<![CDATA[	End_If;]]>
</Line>
<Line Number="124">
<![CDATA[]]>
</Line>
<Line Number="125">
<![CDATA[(* Active *)]]>
</Line>
<Line Number="126">
<![CDATA[	(* 104.2 Ready *)]]>
</Line>
<Line Number="127">
<![CDATA[	If ModuleInputs[1].2 Then]]>
</Line>
<Line Number="128">
<![CDATA[		Active.0 := 1;]]>
</Line>
<Line Number="129">
<![CDATA[	else]]>
</Line>
<Line Number="130">
<![CDATA[		Active.0 := 0;]]>
</Line>
<Line Number="131">
<![CDATA[	end_if;]]>
</Line>
<Line Number="132">
<![CDATA[]]>
</Line>
<Line Number="133">
<![CDATA[	(* 108.0 Move 0 in Position *)]]>
</Line>
<Line Number="134">
<![CDATA[	If ModuleInputs[2].0 Then]]>
</Line>
<Line Number="135">
<![CDATA[		Active.1 := 1;]]>
</Line>
<Line Number="136">
<![CDATA[		IP := 1;]]>
</Line>
<Line Number="137">
<![CDATA[	else]]>
</Line>
<Line Number="138">
<![CDATA[		Active.1 := 0;]]>
</Line>
<Line Number="139">
<![CDATA[		IP := 0;]]>
</Line>
<Line Number="140">
<![CDATA[	end_if;]]>
</Line>
<Line Number="141">
<![CDATA[]]>
</Line>
<Line Number="142">
<![CDATA[	(* 107.0 Move 0 Moving *)]]>
</Line>
<Line Number="143">
<![CDATA[	If ModuleInputs[0].0 Then]]>
</Line>
<Line Number="144">
<![CDATA[		Active.2 := 1;]]>
</Line>
<Line Number="145">
<![CDATA[	else]]>
</Line>
<Line Number="146">
<![CDATA[		Active.2 := 0;]]>
</Line>
<Line Number="147">
<![CDATA[	end_if;]]>
</Line>
<Line Number="148">
<![CDATA[]]>
</Line>
<Line Number="149">
<![CDATA[]]>
</Line>
<Line Number="150">
<![CDATA[(* Convert Units *)	]]>
</Line>
<Line Number="151">
<![CDATA[	IF Units[0] > 0 THEN]]>
</Line>
<Line Number="152">
<![CDATA[		ER	:= 1;]]>
</Line>
<Line Number="153">
<![CDATA[	else]]>
</Line>
<Line Number="154">
<![CDATA[		ER  := 0;]]>
</Line>
<Line Number="155">
<![CDATA[]]>
</Line>
<Line Number="156">
<![CDATA[		(* Velocity in Seconds ? *)]]>
</Line>
<Line Number="157">
<![CDATA[		if Units[2] = 0 then 	]]>
</Line>
<Line Number="158">
<![CDATA[			(** Move Group **)]]>
</Line>
<Line Number="159">
<![CDATA[			(* ID:6102, Move.0.Acceleration:  ModuleOutputs[20],ModuleOutputs[19] *)]]>
</Line>
<Line Number="160">
<![CDATA[			dintResults := ((Acceleration / Units[3]) * 16#100000);]]>
</Line>
<Line Number="161">
<![CDATA[			cps(dintResults, ModuleOutputs[19],2);]]>
</Line>
<Line Number="162">
<![CDATA[]]>
</Line>
<Line Number="163">
<![CDATA[			(* ID:6500, Move.0.Deceleration:  ModuleOutputs[22],ModuleOutputs[21] *)]]>
</Line>
<Line Number="164">
<![CDATA[			dintResults := ((Deceleration / Units[3]) * 16#100000);]]>
</Line>
<Line Number="165">
<![CDATA[			cps(dintResults, ModuleOutputs[21],2);]]>
</Line>
<Line Number="166">
<![CDATA[			]]>
</Line>
<Line Number="167">
<![CDATA[			(* Primary Group **)]]>
</Line>
<Line Number="168">
<![CDATA[			(* ID:6110, Move.0.Primary.Velocity:  ModuleOutputs[28],ModuleOutputs[27] *)]]>
</Line>
<Line Number="169">
<![CDATA[			ModuleOutputs[28] := (Prim_Velocity / Units[3] * 255);]]>
</Line>
<Line Number="170">
<![CDATA[]]>
</Line>
<Line Number="171">
<![CDATA[]]>
</Line>
<Line Number="172">
<![CDATA[			(* Secondary Group **)]]>
</Line>
<Line Number="173">
<![CDATA[			(* ID:6116, Move.0.Secondary.Velocity:  ModuleOutputs[34],ModuleOutputs[33] *)]]>
</Line>
<Line Number="174">
<![CDATA[			ModuleOutputs[34] := (Sec_Velocity / Units[3] * 255);]]>
</Line>
<Line Number="175">
<![CDATA[						]]>
</Line>
<Line Number="176">
<![CDATA[		else]]>
</Line>
<Line Number="177">
<![CDATA[			(* Velocity in Minutes ? *)]]>
</Line>
<Line Number="178">
<![CDATA[			if Units[2] = 1 then]]>
</Line>
<Line Number="179">
<![CDATA[]]>
</Line>
<Line Number="180">
<![CDATA[				(** Move Group  **)]]>
</Line>
<Line Number="181">
<![CDATA[				(* ID:6102, Move.0.Acceleration:  ModuleOutputs[20],ModuleOutputs[19] *)]]>
</Line>
<Line Number="182">
<![CDATA[				dintResults := ((Acceleration / Units[3]) * 16#100000)/60;]]>
</Line>
<Line Number="183">
<![CDATA[				cps(dintResults, ModuleOutputs[19],2);]]>
</Line>
<Line Number="184">
<![CDATA[]]>
</Line>
<Line Number="185">
<![CDATA[				(* ID:6500, Move.0.Deceleration:  ModuleOutputs[22],ModuleOutputs[21] *)]]>
</Line>
<Line Number="186">
<![CDATA[				dintResults := ((Deceleration / Units[3]) * 16#100000)/60;]]>
</Line>
<Line Number="187">
<![CDATA[				cps(dintResults, ModuleOutputs[21],2);]]>
</Line>
<Line Number="188">
<![CDATA[]]>
</Line>
<Line Number="189">
<![CDATA[				(* Primary Group **)]]>
</Line>
<Line Number="190">
<![CDATA[				(* ID:6110, Move.0.Primary.Velocity: ModuleOutputs[28],ModuleOutputs[27] *)]]>
</Line>
<Line Number="191">
<![CDATA[				ModuleOutputs[28] := ((Prim_Velocity / Units[3])/60 ) *255;]]>
</Line>
<Line Number="192">
<![CDATA[]]>
</Line>
<Line Number="193">
<![CDATA[				(* Secondary Group **)]]>
</Line>
<Line Number="194">
<![CDATA[				(* ID:6116, Move.0.Secondary.Velocity:  ModuleOutputs[34],ModuleOutputs[33] *)]]>
</Line>
<Line Number="195">
<![CDATA[				ModuleOutputs[34] := ((Sec_Velocity / Units[3])/60) *255;]]>
</Line>
<Line Number="196">
<![CDATA[]]>
</Line>
<Line Number="197">
<![CDATA[			end_if;]]>
</Line>
<Line Number="198">
<![CDATA[		end_if;]]>
</Line>
<Line Number="199">
<![CDATA[]]>
</Line>
<Line Number="200">
<![CDATA[]]>
</Line>
<Line Number="201">
<![CDATA[		(* ID:6114, Move.0.Secondary.Position:  ModuleOutputs[32],ModuleOutputs[31] *)]]>
</Line>
<Line Number="202">
<![CDATA[		dintResults	:= (Sec_Position / Units[3]) * 65536;]]>
</Line>
<Line Number="203">
<![CDATA[		cps(dintResults, ModuleOutputs[31],2);]]>
</Line>
<Line Number="204">
<![CDATA[]]>
</Line>
<Line Number="205">
<![CDATA[		(* ID:6108, Move.0.Primary.Position:  ModuleOutputs[26],ModuleOutputs[25] *)]]>
</Line>
<Line Number="206">
<![CDATA[		dintResults	:= (Prim_Position / Units[3]) * 65536;]]>
</Line>
<Line Number="207">
<![CDATA[		cps(dintResults, ModuleOutputs[25],2);]]>
</Line>
<Line Number="208">
<![CDATA[]]>
</Line>
<Line Number="209">
<![CDATA[		(* Set Velocity lower word to zero *)	]]>
</Line>
<Line Number="210">
<![CDATA[		(* ID: 6110, Move.0.Primary.Velocity[Low]   : ModuleOutputs[27] *)]]>
</Line>
<Line Number="211">
<![CDATA[		 ModuleOutputs[27]  :=0;]]>
</Line>
<Line Number="212">
<![CDATA[		(* ID: 6116, Move.0.Secondary.Velocity[Low] : ModuleOutputs[33] *)]]>
</Line>
<Line Number="213">
<![CDATA[		 ModuleOutputs[33]  :=0;]]>
</Line>
<Line Number="214">
<![CDATA[]]>
</Line>
<Line Number="215">
<![CDATA[		(* Current Scale   *)]]>
</Line>
<Line Number="216">
<![CDATA[		(*       0: AMPs   *)]]>
</Line>
<Line Number="217">
<![CDATA[		(*       1: %      *)]]>
</Line>
<Line Number="218">
<![CDATA[		(* ID:6101,  Move.0.CurrentLimit:  ModuleOutputs[18] *)]]>
</Line>
<Line Number="219">
<![CDATA[		if Units[1] = 0	then]]>
</Line>
<Line Number="220">
<![CDATA[			ModuleOutputs[18] := CurrentLimit / 0.0078125 ;	]]>
</Line>
<Line Number="221">
<![CDATA[		else]]>
</Line>
<Line Number="222">
<![CDATA[			(* Use for % ,ID:5108, Config.CurrentLimit:   ModuleInputs[13],  *)]]>
</Line>
<Line Number="223">
<![CDATA[			ModuleOutputs[18] := ModuleInputs[13] * (CurrentLimit /100);]]>
</Line>
<Line Number="224">
<![CDATA[		end_if;]]>
</Line>
<Line Number="225">
<![CDATA[	end_if;]]>
</Line>
<Line Number="226">
<![CDATA[]]>
</Line>
<Line Number="227">
<![CDATA[]]>
</Line>
<Line Number="228">
<![CDATA[]]>
</Line>
<Line Number="229">
<![CDATA[]]>
</Line>
<Line Number="230">
<![CDATA[]]>
</Line>
<Line Number="231">
<![CDATA[]]>
</Line>
<Line Number="232">
<![CDATA[]]>
</Line>
<Line Number="233">
<![CDATA[]]>
</Line>
<Line Number="234">
<![CDATA[]]>
</Line>
<Line Number="235">
<![CDATA[]]>
</Line>
</STContent>
</Routine>
</Routines>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
