<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--AOI handles sequence number handshaking to put all the ABR barcode reader's implicit messaging data into named tags, including the latest output string, with a character limit of 128 characters.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="30.00" TargetName="Banner_ABR_AOI_SMALL_IO_Data" TargetType="AddOnInstructionDefinition" TargetRevision="1.0 " TargetLastEdited="2019-03-04T21:59:10.435Z" ContainsContext="true" Owner="Windows User, Banner Engineering" ExportDate="Mon Mar 04 16:10:53 2019" ExportOptions="References NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Test">
<DataTypes Use="Context">
<DataType Name="Banner_ABR_SMALL_IO_Data_Type" Family="NoFamily" Class="User">
<Description>
<![CDATA[ABR AOI Data:]]>
</Description>
<Members>
<Member Name="InputBitsFromABR" DataType="SINT" Dimension="0" Radix="Binary" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[The 8 bits used to receive the ABR's discrete output signals]]>
</Description>
</Member>
<Member Name="OutputBitsToABR" DataType="SINT" Dimension="0" Radix="Binary" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[The 8 bits the ABR reads as inputs for control logic]]>
</Description>
</Member>
<Member Name="ItemStatus" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[The current status code of the ABR]]>
</Description>
</Member>
<Member Name="FailureCode" DataType="SINT" Dimension="0" Radix="Hex" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[The current failure code, if any. 0 = no failure.]]>
</Description>
</Member>
<Member Name="LastItemSeqNum" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[The 8-bit counter value for the last output message received from the ABR, goes up by 1 with each message received.]]>
</Description>
</Member>
<Member Name="LastItemData" DataType="STRING128" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[The last output message received from the ABR]]>
</Description>
</Member>
</Members>
<Dependencies>
<Dependency Type="DataType" Name="STRING128"/>
</Dependencies>
</DataType>
<DataType Name="STRING128" Family="StringFamily" Class="User">
<Members>
<Member Name="LEN" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="DATA" DataType="SINT" Dimension="128" Radix="ASCII" Hidden="false" ExternalAccess="Read/Write"/>
</Members>
</DataType>
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Banner_ABR_AOI_SMALL_IO_Data" Revision="1.0" Vendor="Banner Engineering" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2018-09-07T17:45:02.938Z" CreatedBy="DUKE\2011324" EditedDate="2019-03-04T21:59:10.435Z" EditedBy="DUKE\2011324"
 SoftwareRevision="v30.00">
<Description>
<![CDATA[AOI handles sequence number handshaking to put all the ABR barcode reader's implicit messaging data into named tags, including the latest output string, with a character limit of 128 characters.]]>
</Description>
<AdditionalHelpText>
<![CDATA[The character limit of 128 was chosen because this is the maximum number of characters that the ABR can transmit over EtherNet/IP in one fragment or poll. Any remaining characters after the first 128 will be ignored.]]>
</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="RawDataFromABR" TagType="Base" DataType="SINT" Dimensions="138" Usage="InOut" Radix="Decimal" Required="true" Visible="true" Constant="false"/>
<Parameter Name="RawDataToABR" TagType="Base" DataType="SINT" Dimensions="3" Usage="InOut" Radix="Decimal" Required="true" Visible="true" Constant="false"/>
<Parameter Name="ABR_AOI_Tags" TagType="Base" DataType="Banner_ABR_SMALL_IO_Data_Type" Usage="InOut" Required="true" Visible="true" Constant="false"/>
</Parameters>
<LocalTags>
<LocalTag Name="PLC_LastFragSeqNum" DataType="SINT" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[The last fraqment number the PLC took in from the ABR.]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="SINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="ABR_ItemSeqNum" DataType="SINT" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[The latest sequence number of the last item the ABR sent data for]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="SINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="ABR_FragSeqNum" DataType="SINT" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[The last fragment sequence number of the data sent by the ABR]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="SINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="ABR_FragDataSize" DataType="INT" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[The size of the last fragment sent by the ABR]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="Logic" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Comment>
<![CDATA[Copy the Item Sequence Number to our local tag]]>
</Comment>
<Text>
<![CDATA[COP(RawDataFromABR[0],ABR_ItemSeqNum,1);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Comment>
<![CDATA[Copy the Item Status to our local structure]]>
</Comment>
<Text>
<![CDATA[COP(RawDataFromABR[1],ABR_AOI_Tags.ItemStatus,1);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Comment>
<![CDATA[Copy the Input Bits to our local structure]]>
</Comment>
<Text>
<![CDATA[COP(RawDataFromABR[5],ABR_AOI_Tags.InputBitsFromABR,1);]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Comment>
<![CDATA[Copy the Failure Code to our local structure]]>
</Comment>
<Text>
<![CDATA[COP(RawDataFromABR[6],ABR_AOI_Tags.FailureCode,1);]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Comment>
<![CDATA[Copy the Fragment Sequence Number to our local structure]]>
</Comment>
<Text>
<![CDATA[COP(RawDataFromABR[7],ABR_FragSeqNum,1);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Comment>
<![CDATA[Copy the Fragment Data Size to our local structure]]>
</Comment>
<Text>
<![CDATA[COP(RawDataFromABR[8],ABR_FragDataSize,2);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Comment>
<![CDATA[Copy the Last Item Sequence Number Received from our local structure]]>
</Comment>
<Text>
<![CDATA[COP(ABR_AOI_Tags.LastItemSeqNum,RawDataToABR[0],1);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Comment>
<![CDATA[Copy the Fragment Data to our local structure]]>
</Comment>
<Text>
<![CDATA[NEQ(ABR_AOI_Tags.LastItemSeqNum,ABR_ItemSeqNum)GRT(ABR_FragSeqNum,0)[COP(RawDataFromABR[10],ABR_AOI_Tags.LastItemData.DATA[0],ABR_FragDataSize) ,MOV(ABR_FragDataSize,ABR_AOI_Tags.LastItemData.LEN) ,MOV(ABR_ItemSeqNum,ABR_AOI_Tags.LastItemSeqNum) ];]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<Comment>
<![CDATA[Copy the Remote Output Bits from our local structure]]>
</Comment>
<Text>
<![CDATA[COP(ABR_AOI_Tags.OutputBitsToABR,RawDataToABR[1],1);]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Comment>
<![CDATA[Copy the Last Fragment Sequence Number Received from our local structure]]>
</Comment>
<Text>
<![CDATA[COP(PLC_LastFragSeqNum,RawDataToABR[2],1);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
<Dependencies>
<Dependency Type="DataType" Name="Banner_ABR_SMALL_IO_Data_Type"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
