<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--Takes the raw SINT information and converts that data into actual information.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="33.00" TargetName="Banner_R95_8B22_R130C_PD_v4" TargetType="AddOnInstructionDefinition" TargetRevision="4.0 " TargetLastEdited="2024-03-12T20:32:46.989Z" ContainsContext="true" ExportDate="Thu Mar 14 08:55:18 2024" ExportOptions="References NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Test">
<DataTypes Use="Context">
<DataType Name="Banner_R95C_R130C_8B22_PD_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[UDT that records the converted prcoess data.]]>
</Description>
<Members>
<Member Name="DTI" DataType="SINT" Dimension="2" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Data Transfer In]]>
</Description>
</Member>
<Member Name="DTO" DataType="SINT" Dimension="2" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Data Transfer Out]]>
</Description>
</Member>
<Member Name="Port_Data" DataType="Banner_R95C_R130C_8B22_Port_Data_v4" Dimension="9" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
</Members>
<Dependencies>
<Dependency Type="DataType" Name="Banner_R95C_R130C_8B22_Port_Data_v4"/>
</Dependencies>
</DataType>
<DataType Name="Banner_R95C_R130C_8B22_Port_Data_v4" Family="NoFamily" Class="User">
<Members>
<Member Name="ZZZZZZZZZZBanner_R950" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Discrete_1_In" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_R950" BitNumber="0" ExternalAccess="Read/Write"/>
<Member Name="Discrete_2_In" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_R950" BitNumber="1" ExternalAccess="Read/Write"/>
<Member Name="Discrete_1_Out" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_R950" BitNumber="2" ExternalAccess="Read/Write"/>
<Member Name="Discrete_2_Out" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_R950" BitNumber="3" ExternalAccess="Read/Write"/>
</Members>
</DataType>
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Banner_R95_8B22_R130C_PD_v4" Revision="4.0" Vendor="Banner Engineering" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2017-06-20T14:25:31.364Z" CreatedBy="DUKE\2011324" EditedDate="2024-03-12T20:32:46.989Z" EditedBy="DUKE\jpreisen"
 SoftwareRevision="v33.00">
<Description>
<![CDATA[Takes the raw SINT information and converts that data into actual information.]]>
</Description>
<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="PD" TagType="Base" DataType="Banner_R95C_R130C_8B22_PD_v4" Usage="InOut" Required="true" Visible="true" Constant="false"/>
<Parameter Name="Byte_Swap" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Swap the LSB and the MSB with each other.]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
</Parameters>
<LocalTags>
<LocalTag Name="Temp_Measurement" DataType="DINT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Byte_Out" DataType="SINT" Dimensions="2" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[[0,0]]]>
</DefaultData>
<DefaultData Format="Decorated">
<Array DataType="SINT" Dimensions="2" Radix="Decimal">
<Element Index="[0]" Value="0"/>
<Element Index="[1]" Value="0"/>
</Array>
</DefaultData>
</LocalTag>
<LocalTag Name="Byte_In" DataType="SINT" Dimensions="2" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[[0,0]]]>
</DefaultData>
<DefaultData Format="Decorated">
<Array DataType="SINT" Dimensions="2" Radix="Decimal">
<Element Index="[0]" Value="0"/>
<Element Index="[1]" Value="0"/>
</Array>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="Logic" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Comment>
<![CDATA[Swap input bytes if required.]]>
</Comment>
<Text>
<![CDATA[XIC(Byte_Swap)MOV(PD.DTI[0],Byte_In[1])MOV(PD.DTI[1],Byte_In[0]);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[XIO(Byte_Swap)MOV(PD.DTI[0],Byte_In[0])MOV(PD.DTI[1],Byte_In[1]);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Comment>
<![CDATA[Port 1]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[0].0) OTE(PD.Port_Data[1].Discrete_1_In) ,XIC(Byte_In[0].1) OTE(PD.Port_Data[1].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[1].Discrete_1_Out) OTE(Byte_Out[0].0) ,XIC(PD.Port_Data[1].Discrete_2_Out) OTE(Byte_Out[0].1) ];]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Comment>
<![CDATA[Port 2]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[0].2) OTE(PD.Port_Data[2].Discrete_1_In) ,XIC(Byte_In[0].3) OTE(PD.Port_Data[2].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[2].Discrete_1_Out) OTE(Byte_Out[0].2) ,XIC(PD.Port_Data[2].Discrete_2_Out) OTE(Byte_Out[0].3) ];]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Comment>
<![CDATA[Port 3]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[0].4) OTE(PD.Port_Data[3].Discrete_1_In) ,XIC(Byte_In[0].5) OTE(PD.Port_Data[3].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[3].Discrete_1_Out) OTE(Byte_Out[0].4) ,XIC(PD.Port_Data[3].Discrete_2_Out) OTE(Byte_Out[0].5) ];]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<Comment>
<![CDATA[Port 4]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[0].6) OTE(PD.Port_Data[4].Discrete_1_In) ,XIC(Byte_In[0].7) OTE(PD.Port_Data[4].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[4].Discrete_1_Out) OTE(Byte_Out[0].6) ,XIC(PD.Port_Data[4].Discrete_2_Out) OTE(Byte_Out[0].7) ];]]>
</Text>
</Rung>
<Rung Number="10" Type="N">
<Comment>
<![CDATA[Port 5]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[1].0) OTE(PD.Port_Data[5].Discrete_1_In) ,XIC(Byte_In[1].1) OTE(PD.Port_Data[5].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="11" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[5].Discrete_1_Out) OTE(Byte_Out[1].0) ,XIC(PD.Port_Data[5].Discrete_2_Out) OTE(Byte_Out[1].1) ];]]>
</Text>
</Rung>
<Rung Number="12" Type="N">
<Comment>
<![CDATA[Port 6]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[1].2) OTE(PD.Port_Data[6].Discrete_1_In) ,XIC(Byte_In[1].3) OTE(PD.Port_Data[6].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="13" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[6].Discrete_1_Out) OTE(Byte_Out[1].2) ,XIC(PD.Port_Data[6].Discrete_2_Out) OTE(Byte_Out[1].3) ];]]>
</Text>
</Rung>
<Rung Number="14" Type="N">
<Comment>
<![CDATA[Port 7]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[1].4) OTE(PD.Port_Data[7].Discrete_1_In) ,XIC(Byte_In[1].5) OTE(PD.Port_Data[7].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="15" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[7].Discrete_1_Out) OTE(Byte_Out[1].4) ,XIC(PD.Port_Data[7].Discrete_2_Out) OTE(Byte_Out[1].5) ];]]>
</Text>
</Rung>
<Rung Number="16" Type="N">
<Comment>
<![CDATA[Port 8]]>
</Comment>
<Text>
<![CDATA[[XIC(Byte_In[1].6) OTE(PD.Port_Data[8].Discrete_1_In) ,XIC(Byte_In[1].7) OTE(PD.Port_Data[8].Discrete_2_In) ];]]>
</Text>
</Rung>
<Rung Number="17" Type="N">
<Text>
<![CDATA[[XIC(PD.Port_Data[8].Discrete_1_Out) OTE(Byte_Out[1].6) ,XIC(PD.Port_Data[8].Discrete_2_Out) OTE(Byte_Out[1].7) ];]]>
</Text>
</Rung>
<Rung Number="18" Type="N">
<Comment>
<![CDATA[Swap output bytes if required.]]>
</Comment>
<Text>
<![CDATA[XIC(Byte_Swap)MOV(Byte_Out[0],PD.DTO[1])MOV(Byte_Out[1],PD.DTO[0]);]]>
</Text>
</Rung>
<Rung Number="19" Type="N">
<Text>
<![CDATA[XIO(Byte_Swap)MOV(Byte_Out[0],PD.DTO[0])MOV(Byte_Out[1],PD.DTO[1]);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
<Dependencies>
<Dependency Type="DataType" Name="Banner_R95C_R130C_8B22_PD_v4"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
