<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--AOI to read and write parameter data to an IO-Link TL50.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="33.00" TargetName="Banner_TL50_Param_v4" TargetType="AddOnInstructionDefinition" TargetRevision="4.1 " TargetLastEdited="2023-10-17T13:05:27.614Z" ContainsContext="true" ExportDate="Tue Oct 17 08:07:33 2023" ExportOptions="References NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Test">
<DataTypes Use="Context">
<DataType Name="Banner_IOL_Port_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[UDT that has all of the data items necessary to communicate with a specific Port on a IO-Link Master]]>
</Description>
<Members>
<Member Name="Port_Controlled" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Each bit represents a port on an IO-Link Master.  Set to 1 to tell AOI to control that port.]]>
</Description>
</Member>
<Member Name="Port_Activate" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Each bit represents a port on an IO-Link Master.  When ON that port will process any commands in queue.]]>
</Description>
</Member>
<Member Name="Port_Read" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Each bit represents a port on an IO-Link Master.  Used to determine when device AOI has requested a Read command.]]>
</Description>
</Member>
<Member Name="Port_Write" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Each bit represents a port on an IO-Link Master.  Used to determine when device AOI has requested a Write command.]]>
</Description>
</Member>
<Member Name="Port_RW_Complete" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Each bit represents a port on an IO-Link Master.  Tells device AOI that Read or Write request has been completed.]]>
</Description>
</Member>
<Member Name="Port_Device_Read" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Data_Transfer" DataType="SINT" Dimension="190" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Array to transfer data from IO-Master to device AOIs.]]>
</Description>
</Member>
</Members>
</DataType>
<DataType Name="Banner_TL50_RD_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[All of the read parameters for a TL50.]]>
</Description>
<Members>
<Member Name="Master_Cycle_Time" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Min_Cycle_Time" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="M_Sequence_Capability" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="IO_Link_Version_ID" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Process_Data_Input_Length" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Process_Data_Output_Length" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Combined_Vendor_ID" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[IO-Link Vendor ID]]>
</Description>
</Member>
<Member Name="Vendor_ID1" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Vendor_ID2" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Combined_Device_ID" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[IO-Link Device ID]]>
</Description>
</Member>
<Member Name="Device_ID1" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Device_ID2" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Device_ID3" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Serial_Number" DataType="STRING" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Segment_1_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Segment_2_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Segment_3_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Segment_4_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Segment_5_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Segment_6_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Segment_7_State" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[State of the TL50 Segment. 0 = Off, 1 = On, 2 = Flashing]]>
</Description>
</Member>
<Member Name="Number_of_Segments" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Number of Segment detected for the TL50.]]>
</Description>
</Member>
</Members>
</DataType>
<DataType Name="Banner_TL50_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[All of the parameters for a TL50.]]>
</Description>
<Members>
<Member Name="ZZZZZZZZZZBanner_TL50" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Initial_Global_Read" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_TL50" BitNumber="0" ExternalAccess="Read/Write">
<Description>
<![CDATA[Determines if all of the IO-Link data has been read into the PLC yet]]>
</Description>
</Member>
<Member Name="Command" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value placed in here will activate a read or write to a specifc IO-Link Index]]>
</Description>
</Member>
<Member Name="Read_Data" DataType="Banner_TL50_RD_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Read Only Data]]>
</Description>
</Member>
<Member Name="Write_Data" DataType="Banner_TL50_WD_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Write Data]]>
</Description>
</Member>
<Member Name="Archive" DataType="Banner_TL50_WD_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Archive Data]]>
</Description>
</Member>
<Member Name="ZZZZZZZZZZBanner_TL56" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Reset" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_TL56" BitNumber="0" ExternalAccess="Read/Write">
<Description>
<![CDATA[Resets AOI.  This will force a complete parameter read of the sensor.]]>
</Description>
</Member>
</Members>
<Dependencies>
<Dependency Type="DataType" Name="Banner_TL50_RD_v4"/>
<Dependency Type="DataType" Name="Banner_TL50_WD_v4"/>
<Dependency Type="DataType" Name="Banner_TL50_WD_v4"/>
</Dependencies>
</DataType>
<DataType Name="Banner_TL50_WD_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[UDT that stores the  Write Data for a TL50.]]>
</Description>
<Members>
<Member Name="System_Command" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[See IODD file for list of commands that can be activated via the System Command interface]]>
</Description>
</Member>
<Member Name="Parameter_Access_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Write access to all parameters is prohibited while value is 1.  Only this parameter can be adjusted when value is 1.]]>
</Description>
</Member>
<Member Name="Data_Storage_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Automatic data storage is disabled when this value is equal to 1.  Read access is not affected.]]>
</Description>
</Member>
<Member Name="Local_Parameterization_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Parameterization via local control elements on device is disabled.]]>
</Description>
</Member>
<Member Name="Local_User_Interface_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Operation of local user interface is disabled.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_1" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_2" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_3" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_4" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_5" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_6" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
<Member Name="Flashing_Frequency_7" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value in .1 Hz increments.]]>
</Description>
</Member>
</Members>
</DataType>
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Banner_TL50_Param_v4" Revision="4.1" Vendor="Banner Engineering" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2017-05-04T16:29:17.778Z" CreatedBy="DUKE\2011324" EditedDate="2023-10-17T13:05:27.614Z" EditedBy="DUKE\jpreisen"
 SoftwareRevision="v33.00">
<Description>
<![CDATA[AOI to read and write parameter data to an IO-Link TL50.]]>
</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="TL50" TagType="Base" DataType="Banner_TL50_v4" Usage="InOut" Required="true" Visible="true" Constant="false"/>
<Parameter Name="Port_Data" TagType="Base" DataType="Banner_IOL_Port_v4" Usage="InOut" Required="true" Visible="true" Constant="false"/>
<Parameter Name="Port" TagType="Base" DataType="DINT" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
</Parameters>
<LocalTags>
<LocalTag Name="Local_Control" 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="Global_Read_Command_Value" DataType="INT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Global_Write_Command_Value" DataType="INT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Error_Generated" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Command_Being_Processed" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Index_Write_Inprocess" DataType="INT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Index_Write_Control" DataType="INT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Update_Archive" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Inprocess_Index" DataType="DINT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="DINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="Logic" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Comment>
<![CDATA[When reset is activated reset all tags used in the AOI.]]>
</Comment>
<Text>
<![CDATA[XIC(TL50.Reset)OTU(TL50.Initial_Global_Read)OTU(Command_Being_Processed)OTU(Update_Archive)MOV(0,TL50.Command)MOV(0,Index_Write_Inprocess)MOV(0,Index_Write_Control)MOV(0,Global_Read_Command_Value)MOV(0,Global_Write_Command_Value)MOV(0,Local_Control)OTU(TL50.Reset);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[MOV(0,Port_Data.Data_Transfer[186]);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Comment>
<![CDATA[*****Check to see if the Global Read command has been activated.  The next few rungs control reading of all TL50 parameters.*****]]>
</Comment>
<Text>
<![CDATA[[XIO(TL50.Initial_Global_Read) ,EQU(TL50.Command,1) ,XIC(Port_Data.Port_Device_Read.[Port]) ]XIO(Local_Control.0)XIO(Local_Control.2)MOV(1,Global_Read_Command_Value)MOV(0,TL50.Command)OTL(Local_Control.0);]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Text>
<![CDATA[XIC(Local_Control.0)XIO(Local_Control.1)LES(Global_Read_Command_Value,8)ADD(Global_Read_Command_Value,1,Global_Read_Command_Value)MOV(Global_Read_Command_Value,TL50.Command)OTL(Local_Control.1);]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Text>
<![CDATA[XIC(Local_Control.0)GEQ(Global_Read_Command_Value,8)MOV(1,Global_Read_Command_Value)MOV(0,TL50.Command)OTL(TL50.Initial_Global_Read)OTL(Update_Archive)OTU(Local_Control.0)OTU(Local_Control.1);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Comment>
<![CDATA[Update Archive with latest cycle information.]]>
</Comment>
<Text>
<![CDATA[XIC(Update_Archive)COP(TL50.Write_Data,TL50.Archive,1)OTU(Update_Archive);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Comment>
<![CDATA[*****Check to see if the Global Write command has been activated.  The next few rungs control writing of all TL50 parameters.*****]]>
</Comment>
<Text>
<![CDATA[XIC(TL50.Initial_Global_Read)EQU(TL50.Command,41)XIO(Local_Control.0)XIO(Local_Control.2)MOV(42,Global_Write_Command_Value)MOV(0,TL50.Command)OTL(Local_Control.2);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[XIO(TL50.Initial_Global_Read)EQU(TL50.Command,41)MOV(0,TL50.Command)OTU(Local_Control.2);]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<Text>
<![CDATA[XIC(Local_Control.2)XIO(Local_Control.3)LES(Global_Write_Command_Value,45)ADD(Global_Write_Command_Value,1,Global_Write_Command_Value)MOV(Global_Write_Command_Value,TL50.Command)OTL(Local_Control.3);]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Text>
<![CDATA[XIC(Local_Control.2)GEQ(Global_Write_Command_Value,45)MOV(0,Global_Write_Command_Value)MOV(0,TL50.Command)OTU(Local_Control.2)OTU(Local_Control.3);]]>
</Text>
</Rung>
<Rung Number="10" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="11" Type="N">
<Comment>
<![CDATA[Global Read command logic.]]>
</Comment>
<Text>
<![CDATA[XIC(Local_Control.4)XIO(Local_Control.5)XIC(Port_Data.Port_RW_Complete.[Port])OTL(Local_Control.5);]]>
</Text>
</Rung>
<Rung Number="12" Type="N">
<Text>
<![CDATA[XIC(Local_Control.6)XIO(Port_Data.Port_RW_Complete.[Port])MOV(0,TL50.Command)OTU(Local_Control.1)OTU(Command_Being_Processed)OTU(Local_Control.4)OTU(Local_Control.5)OTU(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="13" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="14" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls reading of the direct parameters (index 0).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(TL50.Command,2)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(0,Port_Data.Data_Transfer[188])MOV(16,Port_Data.Data_Transfer[189])MOV(0,TL50.Read_Data.Combined_Vendor_ID)OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="15" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)EQU(TL50.Command,2)BTD(Port_Data.Data_Transfer[1],0,TL50.Read_Data.Master_Cycle_Time,0,8)BTD(Port_Data.Data_Transfer[2],0,TL50.Read_Data.Min_Cycle_Time,0,8)BTD(Port_Data.Data_Transfer[3],0,TL50.Read_Data.M_Sequence_Capability,0,8)BTD(Port_Data.Data_Transfer[4],0,TL50.Read_Data.IO_Link_Version_ID,0,8)BTD(Port_Data.Data_Transfer[5],0,TL50.Read_Data.Process_Data_Input_Length,0,8)BTD(Port_Data.Data_Transfer[6],0,TL50.Read_Data.Process_Data_Output_Length,0,8)BTD(Port_Data.Data_Transfer[7],0,TL50.Read_Data.Combined_Vendor_ID,8,8)BTD(Port_Data.Data_Transfer[8],0,TL50.Read_Data.Combined_Vendor_ID,0,8)MOV(Port_Data.Data_Transfer[7],TL50.Read_Data.Vendor_ID1)MOV(Port_Data.Data_Transfer[8],TL50.Read_Data.Vendor_ID2)BTD(Port_Data.Data_Transfer[9],0,TL50.Read_Data.Combined_Device_ID,16,8)BTD(Port_Data.Data_Transfer[10],0,TL50.Read_Data.Combined_Device_ID,8,8)BTD(Port_Data.Data_Transfer[11],0,TL50.Read_Data.Combined_Device_ID,0,8)MOV(Port_Data.Data_Transfer[9],TL50.Read_Data.Device_ID1)MOV(Port_Data.Data_Transfer[10],TL50.Read_Data.Device_ID2)MOV(Port_Data.Data_Transfer[11],TL50.Read_Data.Device_ID3)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="16" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="17" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls reading of the Device Access Locks parameters (index 12).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(TL50.Command,3)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(12,Port_Data.Data_Transfer[188])MOV(2,Port_Data.Data_Transfer[189])OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="18" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)EQU(TL50.Command,3)BTD(Port_Data.Data_Transfer[1],0,TL50.Write_Data.Parameter_Access_Lock,0,1)BTD(Port_Data.Data_Transfer[1],1,TL50.Write_Data.Data_Storage_Lock,0,1)BTD(Port_Data.Data_Transfer[1],2,TL50.Write_Data.Local_Parameterization_Lock,0,1)BTD(Port_Data.Data_Transfer[1],3,TL50.Write_Data.Local_User_Interface_Lock,0,1)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="19" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="20" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls reading of the Serial Number parameter (index 21).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(TL50.Command,4)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(21,Port_Data.Data_Transfer[188])MOV(16,Port_Data.Data_Transfer[189])OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="21" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)EQU(TL50.Command,4)MOV(16,TL50.Read_Data.Serial_Number.LEN)CPS(Port_Data.Data_Transfer[0],TL50.Read_Data.Serial_Number.DATA[0],16)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="22" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="23" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls reading of the Process Data Output (index 41).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(TL50.Command,5)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(41,Port_Data.Data_Transfer[188])MOV(2,Port_Data.Data_Transfer[189])OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="24" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)EQU(TL50.Command,5)BTD(Port_Data.Data_Transfer[0],4,TL50.Read_Data.Segment_7_State,0,2)BTD(Port_Data.Data_Transfer[0],2,TL50.Read_Data.Segment_6_State,0,2)BTD(Port_Data.Data_Transfer[0],0,TL50.Read_Data.Segment_5_State,0,2)BTD(Port_Data.Data_Transfer[1],6,TL50.Read_Data.Segment_4_State,0,2)BTD(Port_Data.Data_Transfer[1],4,TL50.Read_Data.Segment_3_State,0,2)BTD(Port_Data.Data_Transfer[1],2,TL50.Read_Data.Segment_2_State,0,2)BTD(Port_Data.Data_Transfer[1],0,TL50.Read_Data.Segment_1_State,0,2)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="25" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="26" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls reading of the Number of Segments parameter (index 65).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(TL50.Command,6)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(65,Port_Data.Data_Transfer[188])MOV(1,Port_Data.Data_Transfer[189])OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="27" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)EQU(TL50.Command,6)BTD(Port_Data.Data_Transfer[0],0,TL50.Read_Data.Number_of_Segments,0,7)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="28" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="29" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls reading of the Flashing Frequency parameter (index 67).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(TL50.Command,7)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(67,Port_Data.Data_Transfer[188])MOV(14,Port_Data.Data_Transfer[189])OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="30" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)EQU(TL50.Command,7)BTD(Port_Data.Data_Transfer[0],0,TL50.Write_Data.Flashing_Frequency_7,8,8)BTD(Port_Data.Data_Transfer[1],0,TL50.Write_Data.Flashing_Frequency_7,0,8)BTD(Port_Data.Data_Transfer[2],0,TL50.Write_Data.Flashing_Frequency_6,8,8)BTD(Port_Data.Data_Transfer[3],0,TL50.Write_Data.Flashing_Frequency_6,0,8)BTD(Port_Data.Data_Transfer[4],0,TL50.Write_Data.Flashing_Frequency_5,8,8)BTD(Port_Data.Data_Transfer[5],0,TL50.Write_Data.Flashing_Frequency_5,0,8)BTD(Port_Data.Data_Transfer[6],0,TL50.Write_Data.Flashing_Frequency_4,8,8)BTD(Port_Data.Data_Transfer[7],0,TL50.Write_Data.Flashing_Frequency_4,0,8)BTD(Port_Data.Data_Transfer[8],0,TL50.Write_Data.Flashing_Frequency_3,8,8)BTD(Port_Data.Data_Transfer[9],0,TL50.Write_Data.Flashing_Frequency_3,0,8)BTD(Port_Data.Data_Transfer[10],0,TL50.Write_Data.Flashing_Frequency_2,8,8)BTD(Port_Data.Data_Transfer[11],0,TL50.Write_Data.Flashing_Frequency_2,0,8)BTD(Port_Data.Data_Transfer[12],0,TL50.Write_Data.Flashing_Frequency_1,8,8)BTD(Port_Data.Data_Transfer[13],0,TL50.Write_Data.Flashing_Frequency_1,0,8)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="31" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="32" Type="N">
<Comment>
<![CDATA[Check all Write parameters to see if they need to be updated.]]>
</Comment>
<Text>
<![CDATA[XIC(TL50.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.0)XIO(Update_Archive)NEQ(TL50.Write_Data.System_Command,TL50.Archive.System_Command)OTL(Index_Write_Inprocess.0)XIO(Command_Being_Processed)EQU(TL50.Command,0)MOV(42,TL50.Command)OTL(Index_Write_Control.0);]]>
</Text>
</Rung>
<Rung Number="33" Type="N">
<Text>
<![CDATA[XIC(TL50.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.1)XIO(Update_Archive)[NEQ(TL50.Write_Data.Parameter_Access_Lock,TL50.Archive.Parameter_Access_Lock) ,NEQ(TL50.Write_Data.Data_Storage_Lock,TL50.Archive.Data_Storage_Lock) ,NEQ(TL50.Write_Data.Local_Parameterization_Lock,TL50.Archive.Local_Parameterization_Lock) ,NEQ(TL50.Write_Data.Local_User_Interface_Lock,TL50.Archive.Local_User_Interface_Lock) ]OTL(Index_Write_Inprocess.1)XIO(Command_Being_Processed)EQU(TL50.Command,0)MOV(43,TL50.Command)OTL(Index_Write_Control.1);]]>
</Text>
</Rung>
<Rung Number="34" Type="N">
<Comment>
<![CDATA[Check all Write parameters to see if they need to be updated.]]>
</Comment>
<Text>
<![CDATA[XIC(TL50.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.2)XIO(Update_Archive)[NEQ(TL50.Write_Data.Flashing_Frequency_1,TL50.Archive.Flashing_Frequency_1) ,NEQ(TL50.Write_Data.Flashing_Frequency_2,TL50.Archive.Flashing_Frequency_2) ,NEQ(TL50.Write_Data.Flashing_Frequency_3,TL50.Archive.Flashing_Frequency_3) ,NEQ(TL50.Write_Data.Flashing_Frequency_4,TL50.Archive.Flashing_Frequency_4) ,NEQ(TL50.Write_Data.Flashing_Frequency_5,TL50.Archive.Flashing_Frequency_5) ,NEQ(TL50.Write_Data.Flashing_Frequency_6,TL50.Archive.Flashing_Frequency_6) ,NEQ(TL50.Write_Data.Flashing_Frequency_7,TL50.Archive.Flashing_Frequency_7) ]OTL(Index_Write_Inprocess.2)XIO(Command_Being_Processed)EQU(TL50.Command,0)MOV(44,TL50.Command)OTL(Index_Write_Control.2);]]>
</Text>
</Rung>
<Rung Number="35" Type="N">
<Comment>
<![CDATA[Wait until all automatic write updates are complete.  Request Archive update.]]>
</Comment>
<Text>
<![CDATA[GRT(Index_Write_Control,0)EQU(Index_Write_Inprocess,0)MOV(0,Index_Write_Control)OTL(Update_Archive);]]>
</Text>
</Rung>
<Rung Number="36" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="37" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls writing of the Standard Command parameter (index 2).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.11)EQU(TL50.Command,42)OTL(Command_Being_Processed)BTD(TL50.Write_Data.System_Command,0,Port_Data.Data_Transfer[0],0,8)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(2,Port_Data.Data_Transfer[188])MOV(1,Port_Data.Data_Transfer[189])MOV(0,Inprocess_Index)OTL(Port_Data.Port_Write.[Port])OTL(Local_Control.11);]]>
</Text>
</Rung>
<Rung Number="38" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="39" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls writing of the Device Access Locks parameter (index 12).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.11)EQU(TL50.Command,43)OTL(Command_Being_Processed)MOV(0,Port_Data.Data_Transfer[0])MOV(0,Port_Data.Data_Transfer[1])BTD(TL50.Write_Data.Parameter_Access_Lock,0,Port_Data.Data_Transfer[1],0,1)BTD(TL50.Write_Data.Data_Storage_Lock,0,Port_Data.Data_Transfer[1],1,1)BTD(TL50.Write_Data.Local_Parameterization_Lock,0,Port_Data.Data_Transfer[1],2,1)BTD(TL50.Write_Data.Local_User_Interface_Lock,0,Port_Data.Data_Transfer[1],3,1)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(12,Port_Data.Data_Transfer[188])MOV(2,Port_Data.Data_Transfer[189])MOV(1,Inprocess_Index)OTL(Port_Data.Port_Write.[Port])OTL(Local_Control.11);]]>
</Text>
</Rung>
<Rung Number="40" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="41" Type="N">
<Comment>
<![CDATA[************************************************************************************************************
Section of AOI that controls writing of the Flashing Frequency parameter (index 67).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.11)EQU(TL50.Command,44)OTL(Command_Being_Processed)BTD(TL50.Write_Data.Flashing_Frequency_7,8,Port_Data.Data_Transfer[0],0,8)BTD(TL50.Write_Data.Flashing_Frequency_7,0,Port_Data.Data_Transfer[1],0,8)BTD(TL50.Write_Data.Flashing_Frequency_6,8,Port_Data.Data_Transfer[2],0,8)BTD(TL50.Write_Data.Flashing_Frequency_6,0,Port_Data.Data_Transfer[3],0,8)BTD(TL50.Write_Data.Flashing_Frequency_5,8,Port_Data.Data_Transfer[4],0,8)BTD(TL50.Write_Data.Flashing_Frequency_5,0,Port_Data.Data_Transfer[5],0,8)BTD(TL50.Write_Data.Flashing_Frequency_4,8,Port_Data.Data_Transfer[6],0,8)BTD(TL50.Write_Data.Flashing_Frequency_4,0,Port_Data.Data_Transfer[7],0,8)BTD(TL50.Write_Data.Flashing_Frequency_3,8,Port_Data.Data_Transfer[8],0,8)BTD(TL50.Write_Data.Flashing_Frequency_3,0,Port_Data.Data_Transfer[9],0,8)BTD(TL50.Write_Data.Flashing_Frequency_2,8,Port_Data.Data_Transfer[10],0,8)BTD(TL50.Write_Data.Flashing_Frequency_2,0,Port_Data.Data_Transfer[11],0,8)BTD(TL50.Write_Data.Flashing_Frequency_1,8,Port_Data.Data_Transfer[12],0,8)BTD(TL50.Write_Data.Flashing_Frequency_1,0,Port_Data.Data_Transfer[13],0,8)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(67,Port_Data.Data_Transfer[188])MOV(14,Port_Data.Data_Transfer[189])MOV(2,Inprocess_Index)OTL(Port_Data.Port_Write.[Port])OTL(Local_Control.11);]]>
</Text>
</Rung>
<Rung Number="42" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="43" Type="N">
<Comment>
<![CDATA[Global Write Commands]]>
</Comment>
<Text>
<![CDATA[XIC(Local_Control.11)XIO(Local_Control.12)XIC(Port_Data.Port_RW_Complete.[Port])OTU(Port_Data.Port_Write.[Port])OTL(Local_Control.12);]]>
</Text>
</Rung>
<Rung Number="44" Type="N">
<Text>
<![CDATA[XIC(Local_Control.12)XIO(Port_Data.Port_RW_Complete.[Port])MOV(0,TL50.Command)OTU(Index_Write_Inprocess.[Inprocess_Index])OTU(Local_Control.3)OTU(Command_Being_Processed)OTU(Local_Control.11)OTU(Local_Control.12);]]>
</Text>
</Rung>
<Rung Number="45" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="46" Type="N">
<Text>
<![CDATA[EQU(Local_Control,0)XIO(Update_Archive)OTU(Port_Data.Port_Activate.[Port]);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
<Dependencies>
<Dependency Type="DataType" Name="Banner_IOL_Port_v4"/>
<Dependency Type="DataType" Name="Banner_TL50_v4"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
