<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="20.03" TargetName="Manual_Measurement_Mode_Apply_Preset" TargetType="AddOnInstructionDefinition" TargetRevision="1.0 " TargetLastEdited="2021-06-10T15:01:09.339Z" ContainsContext="true" Owner="Jeff Sutula, AMCI" ExportDate="Thu Jun 10 14:19:16 2021" ExportOptions="DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="AMCI_ANA2E_AOI_sample_RSLogix_V20">
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Manual_Measurement_Mode_Apply_Preset" Revision="1.0" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="true" CreatedDate="2021-06-08T12:12:59.446Z" CreatedBy="AMCI_HQ\jsutula" EditedDate="2021-06-10T15:01:09.339Z" EditedBy="AMCI_HQ\jsutula" SoftwareRevision="v20.03"
>
<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="module_status" TagType="Base" DataType="INT" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Comments>
<Comment Operand=".15">
<![CDATA[Acknowledge bit]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="slot_number" TagType="Base" DataType="DINT" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="enable_ch1_or_multiturn_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="disable_ch1_LED_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="enable_ch2_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="disable_ch2_LED_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Apply_preset_ch1_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Apply_preset_ch2_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Save_Offset_in_flash_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="clear_tranducer_faults_0_no_1_yes" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="ANA2E_output_data" TagType="Base" DataType="INT" Dimensions="10" Usage="InOut" Radix="Decimal" Required="true" Visible="true" Constant="false"/>
<Parameter Name="EN" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="DN" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read Only">
<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">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
</Parameters>
<LocalTags>
<LocalTag Name="command_data_block" DataType="INT" Dimensions="10" Radix="Decimal" ExternalAccess="None">
<Comments>
<Comment Operand="[0].11">
<![CDATA[measurement mode command bit]]>
</Comment>
<Comment Operand="[0].15">
<![CDATA[Transmit bit]]>
</Comment>
</Comments>
<DefaultData Format="Decorated">
<Array DataType="INT" Dimensions="10" Radix="Decimal">
<Element Index="[0]" Value="0"/>
<Element Index="[1]" Value="0"/>
<Element Index="[2]" Value="0"/>
<Element Index="[3]" Value="0"/>
<Element Index="[4]" Value="0"/>
<Element Index="[5]" Value="0"/>
<Element Index="[6]" Value="0"/>
<Element Index="[7]" Value="0"/>
<Element Index="[8]" Value="0"/>
<Element Index="[9]" Value="0"/>
</Array>
</DefaultData>
</LocalTag>
<LocalTag Name="index" DataType="INT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="errors" DataType="INT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="allow_programming" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="EnableInFalse" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Text>
<![CDATA[OTU(EN)OTU(DN)OTU(ER)OTU(allow_programming);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
<Routine Name="Logic" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Comment>
<![CDATA[The following rung resets the Transmit bit if the Acknowledge bit is set during the first scan of the AOI’s logic.   ]]>
</Comment>
<Text>
<![CDATA[XIC(module_status.15)XIO(EN)MOV(0,command_data_block[0]);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[XIO(module_status.15)XIC(EN)XIO(allow_programming)OTL(allow_programming);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Text>
<![CDATA[AND(module_status,16#000f,errors);]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(enable_ch1_or_multiturn_0_no_1_yes)OTE(command_data_block[0].0);]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(disable_ch1_LED_0_no_1_yes)OTE(command_data_block[0].1);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(enable_ch2_0_no_1_yes)OTE(command_data_block[0].2);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(disable_ch2_LED_0_no_1_yes)OTE(command_data_block[0].3);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(Apply_preset_ch1_0_no_1_yes)OTE(command_data_block[0].4);]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(Apply_preset_ch2_0_no_1_yes)OTE(command_data_block[0].5);]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(Save_Offset_in_flash_0_no_1_yes)OTE(command_data_block[0].6);]]>
</Text>
</Rung>
<Rung Number="10" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIC(clear_tranducer_faults_0_no_1_yes)OTE(command_data_block[0].7);]]>
</Text>
</Rung>
<Rung Number="11" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIO(DN)XIO(ER)OTE(command_data_block[0].11);]]>
</Text>
</Rung>
<Rung Number="12" Type="N">
<Text>
<![CDATA[XIC(allow_programming)XIO(DN)XIO(ER)OTE(command_data_block[0].15);]]>
</Text>
</Rung>
<Rung Number="13" Type="N">
<Comment>
<![CDATA[When the counter that controls which programming block is sent to the ANA2E is done, set the AOI's DN bit.]]>
</Comment>
<Text>
<![CDATA[XIC(module_status.15)XIC(allow_programming)EQU(errors,0)OTL(DN)MOV(0,command_data_block[0]);]]>
</Text>
</Rung>
<Rung Number="14" Type="N">
<Comment>
<![CDATA[When the counter that controls which programming block is sent to the ANA2E is done, set the AOI's DN bit.]]>
</Comment>
<Text>
<![CDATA[XIC(module_status.15)XIC(allow_programming)NEQ(errors,0)OTL(ER)MOV(0,command_data_block[0]);]]>
</Text>
</Rung>
<Rung Number="15" Type="N">
<Text>
<![CDATA[EQU(slot_number,0)MOV(0,index);]]>
</Text>
</Rung>
<Rung Number="16" Type="N">
<Text>
<![CDATA[EQU(slot_number,1)MOV(10,index);]]>
</Text>
</Rung>
<Rung Number="17" Type="N">
<Text>
<![CDATA[EQU(slot_number,2)MOV(20,index);]]>
</Text>
</Rung>
<Rung Number="18" Type="N">
<Text>
<![CDATA[EQU(slot_number,3)MOV(30,index);]]>
</Text>
</Rung>
<Rung Number="19" Type="N">
<Text>
<![CDATA[EQU(slot_number,4)MOV(40,index);]]>
</Text>
</Rung>
<Rung Number="20" Type="N">
<Text>
<![CDATA[EQU(slot_number,5)MOV(50,index);]]>
</Text>
</Rung>
<Rung Number="21" Type="N">
<Comment>
<![CDATA[Move the command block data internal to the Add on Instruction to the output registers assigned to the ANAE2  ]]>
</Comment>
<Text>
<![CDATA[CPS(command_data_block[0],ANA2E_output_data[index],10);]]>
</Text>
</Rung>
<Rung Number="22" Type="N">
<Text>
<![CDATA[OTL(EN);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
