<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--AOI to read and write parameter data to an IO-Link K50 Pro L2.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="33.00" TargetName="Banner_K50ProL2_Param_v4" TargetType="AddOnInstructionDefinition" TargetRevision="4.0 " TargetLastEdited="2023-09-21T19:28:22.659Z" ContainsContext="true" ExportDate="Thu Sep 21 14:28:38 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_K50ProL2_CC_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[K50 Pro L2 Custom Color Setup Structure.]]>
</Description>
<Members>
<Member Name="Blue" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Green" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Red" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Color_Name" DataType="STRING" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
</Members>
</DataType>
<DataType Name="Banner_K50ProL2_RD_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[All of the read parameters for a K50 Pro L2]]>
</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"/>
</Members>
</DataType>
<DataType Name="Banner_K50ProL2_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[All of the parameters for a K50 Pro L2.]]>
</Description>
<Members>
<Member Name="ZZZZZZZZZZBanner_K500" 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_K500" 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="ZZZZZZZZZZBanner_K503" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Reset" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_K503" BitNumber="0" ExternalAccess="Read/Write">
<Description>
<![CDATA[Resets AOI.  This will force a complete parameter read of the sensor.]]>
</Description>
</Member>
<Member Name="Read_Data" DataType="Banner_K50ProL2_RD_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Write_Data" DataType="Banner_K50ProL2_WD_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Archive_Data" DataType="Banner_K50ProL2_WD_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
</Members>
<Dependencies>
<Dependency Type="DataType" Name="Banner_K50ProL2_RD_v4"/>
<Dependency Type="DataType" Name="Banner_K50ProL2_WD_v4"/>
<Dependency Type="DataType" Name="Banner_K50ProL2_WD_v4"/>
</Dependencies>
</DataType>
<DataType Name="Banner_K50ProL2_WD_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[All of the write parameters for a K50 Pro L2.]]>
</Description>
<Members>
<Member Name="System_Command" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Parameter_Access_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Data_Storage_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Local_Parameterization_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Local_User_Interface_Lock" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Reserved" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Restrict_To_Gamut" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Rotation_Speed" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Custom_Flash_Rate" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[.5 to 20 Hz]]>
</Description>
</Member>
<Member Name="Custom_Intensity" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[0 to 100 = 0 to 100%]]>
</Description>
</Member>
<Member Name="Custom_Color" DataType="Banner_K50ProL2_CC_v4" Dimension="6" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
</Members>
<Dependencies>
<Dependency Type="DataType" Name="Banner_K50ProL2_CC_v4"/>
</Dependencies>
</DataType>
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Banner_K50ProL2_Param_v4" Revision="4.0" Vendor="Banner Engineering" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2017-05-04T16:29:17.778Z" CreatedBy="DUKE\2011324" EditedDate="2023-09-21T19:28:22.659Z" EditedBy="DUKE\jpreisen"
 SoftwareRevision="v33.00">
<Description>
<![CDATA[AOI to read and write parameter data to an IO-Link K50 Pro L2.]]>
</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="K50ProL2" TagType="Base" DataType="Banner_K50ProL2_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="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>
<LocalTag Name="CC_R_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>
<LocalTag Name="CC_WC_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>
<LocalTag Name="CC_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>
<LocalTag Name="CC_W_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>
<LocalTag Name="CC_WC2_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(K50ProL2.Reset)OTU(K50ProL2.Initial_Global_Read)OTU(Command_Being_Processed)OTU(Update_Archive)MOV(0,K50ProL2.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(K50ProL2.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 K50 parameters.*****]]>
</Comment>
<Text>
<![CDATA[[XIO(K50ProL2.Initial_Global_Read) ,EQU(K50ProL2.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,K50ProL2.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,11)ADD(Global_Read_Command_Value,1,Global_Read_Command_Value)MOV(Global_Read_Command_Value,K50ProL2.Command)OTL(Local_Control.1);]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Text>
<![CDATA[XIC(Local_Control.0)GEQ(Global_Read_Command_Value,11)MOV(1,Global_Read_Command_Value)MOV(0,K50ProL2.Command)OTU(Port_Data.Port_Device_Read.[Port])OTL(K50ProL2.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(K50ProL2.Write_Data,K50ProL2.Archive_Data,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 K50 parameters.*****]]>
</Comment>
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)EQU(K50ProL2.Command,41)XIO(Local_Control.0)XIO(Local_Control.2)MOV(42,Global_Write_Command_Value)MOV(0,K50ProL2.Command)OTL(Local_Control.2);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[XIO(K50ProL2.Initial_Global_Read)EQU(K50ProL2.Command,41)MOV(0,K50ProL2.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,50)ADD(Global_Write_Command_Value,1,Global_Write_Command_Value)MOV(Global_Write_Command_Value,K50ProL2.Command)OTL(Local_Control.3);]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Text>
<![CDATA[XIC(Local_Control.2)GEQ(Global_Write_Command_Value,50)MOV(0,Global_Write_Command_Value)MOV(0,K50ProL2.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,K50ProL2.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(K50ProL2.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(15,Port_Data.Data_Transfer[189])MOV(0,K50ProL2.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(K50ProL2.Command,2)BTD(Port_Data.Data_Transfer[1],0,K50ProL2.Read_Data.Master_Cycle_Time,0,8)BTD(Port_Data.Data_Transfer[2],0,K50ProL2.Read_Data.Min_Cycle_Time,0,8)BTD(Port_Data.Data_Transfer[3],0,K50ProL2.Read_Data.M_Sequence_Capability,0,8)BTD(Port_Data.Data_Transfer[4],0,K50ProL2.Read_Data.IO_Link_Version_ID,0,8)BTD(Port_Data.Data_Transfer[5],0,K50ProL2.Read_Data.Process_Data_Input_Length,0,8)BTD(Port_Data.Data_Transfer[6],0,K50ProL2.Read_Data.Process_Data_Output_Length,0,8)BTD(Port_Data.Data_Transfer[7],0,K50ProL2.Read_Data.Combined_Vendor_ID,8,8)BTD(Port_Data.Data_Transfer[8],0,K50ProL2.Read_Data.Combined_Vendor_ID,0,8)MOV(Port_Data.Data_Transfer[7],K50ProL2.Read_Data.Vendor_ID1)MOV(Port_Data.Data_Transfer[8],K50ProL2.Read_Data.Vendor_ID2)BTD(Port_Data.Data_Transfer[9],0,K50ProL2.Read_Data.Combined_Device_ID,16,8)BTD(Port_Data.Data_Transfer[10],0,K50ProL2.Read_Data.Combined_Device_ID,8,8)BTD(Port_Data.Data_Transfer[11],0,K50ProL2.Read_Data.Combined_Device_ID,0,8)MOV(Port_Data.Data_Transfer[9],K50ProL2.Read_Data.Device_ID1)MOV(Port_Data.Data_Transfer[10],K50ProL2.Read_Data.Device_ID2)MOV(Port_Data.Data_Transfer[11],K50ProL2.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(K50ProL2.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(15,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(K50ProL2.Command,3)BTD(Port_Data.Data_Transfer[1],0,K50ProL2.Write_Data.Parameter_Access_Lock,0,1)BTD(Port_Data.Data_Transfer[1],1,K50ProL2.Write_Data.Data_Storage_Lock,0,1)BTD(Port_Data.Data_Transfer[1],2,K50ProL2.Write_Data.Local_Parameterization_Lock,0,1)BTD(Port_Data.Data_Transfer[1],3,K50ProL2.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(K50ProL2.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(K50ProL2.Command,4)MOV(16,K50ProL2.Read_Data.Serial_Number.LEN)CPS(Port_Data.Data_Transfer[0],K50ProL2.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 Settings (index 64).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)EQU(K50ProL2.Command,5)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(64,Port_Data.Data_Transfer[188])MOV(4,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(K50ProL2.Command,5)BTD(Port_Data.Data_Transfer[0],1,K50ProL2.Write_Data.Reserved,0,7)BTD(Port_Data.Data_Transfer[0],0,K50ProL2.Write_Data.Restrict_To_Gamut,0,1)BTD(Port_Data.Data_Transfer[1],0,K50ProL2.Write_Data.Rotation_Speed,0,8)BTD(Port_Data.Data_Transfer[2],0,K50ProL2.Write_Data.Custom_Flash_Rate,0,8)BTD(Port_Data.Data_Transfer[3],0,K50ProL2.Write_Data.Custom_Intensity,0,8)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 Custom Color 1 to 5 parameter (index 65 to 69).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)GEQ(K50ProL2.Command,6)LEQ(K50ProL2.Command,10)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])ADD(59,K50ProL2.Command,Port_Data.Data_Transfer[188])MOV(11,Port_Data.Data_Transfer[189])SUB(K50ProL2.Command,5,CC_R_Index)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)GEQ(K50ProL2.Command,6)LEQ(K50ProL2.Command,10)BTD(Port_Data.Data_Transfer[0],0,K50ProL2.Write_Data.Custom_Color[CC_R_Index].Blue,0,8)BTD(Port_Data.Data_Transfer[1],0,K50ProL2.Write_Data.Custom_Color[CC_R_Index].Green,0,8)BTD(Port_Data.Data_Transfer[2],0,K50ProL2.Write_Data.Custom_Color[CC_R_Index].Red,0,8)MOV(8,K50ProL2.Write_Data.Custom_Color[CC_R_Index].Color_Name.LEN)CPS(Port_Data.Data_Transfer[3],K50ProL2.Write_Data.Custom_Color[CC_R_Index].Color_Name.DATA[0],8)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[Check all Write parameters to see if they need to be updated.]]>
</Comment>
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.0)XIO(Update_Archive)NEQ(K50ProL2.Write_Data.System_Command,K50ProL2.Archive_Data.System_Command)OTL(Index_Write_Inprocess.0)XIO(Command_Being_Processed)EQU(K50ProL2.Command,0)MOV(42,K50ProL2.Command)OTL(Index_Write_Control.0);]]>
</Text>
</Rung>
<Rung Number="30" Type="N">
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.1)XIO(Update_Archive)[NEQ(K50ProL2.Write_Data.Parameter_Access_Lock,K50ProL2.Archive_Data.Parameter_Access_Lock) ,NEQ(K50ProL2.Write_Data.Data_Storage_Lock,K50ProL2.Archive_Data.Data_Storage_Lock) ,NEQ(K50ProL2.Write_Data.Local_Parameterization_Lock,K50ProL2.Archive_Data.Local_Parameterization_Lock) ,NEQ(K50ProL2.Write_Data.Local_User_Interface_Lock,K50ProL2.Archive_Data.Local_User_Interface_Lock) ]OTL(Index_Write_Inprocess.1)XIO(Command_Being_Processed)EQU(K50ProL2.Command,0)MOV(43,K50ProL2.Command)OTL(Index_Write_Control.1);]]>
</Text>
</Rung>
<Rung Number="31" Type="N">
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.2)XIO(Update_Archive)[NEQ(K50ProL2.Write_Data.Restrict_To_Gamut,K50ProL2.Archive_Data.Restrict_To_Gamut) ,NEQ(K50ProL2.Write_Data.Rotation_Speed,K50ProL2.Archive_Data.Rotation_Speed) ,NEQ(K50ProL2.Write_Data.Custom_Flash_Rate,K50ProL2.Archive_Data.Custom_Flash_Rate) ,NEQ(K50ProL2.Write_Data.Custom_Intensity,K50ProL2.Archive_Data.Custom_Intensity) ]OTL(Index_Write_Inprocess.2)XIO(Command_Being_Processed)EQU(K50ProL2.Command,0)MOV(44,K50ProL2.Command)OTL(Index_Write_Control.2);]]>
</Text>
</Rung>
<Rung Number="32" Type="N">
<Text>
<![CDATA[EQU(Index_Write_Control,0)ADD(CC_WC_Index,1,CC_WC_Index)GEQ(CC_WC_Index,6)MOV(1,CC_WC_Index);]]>
</Text>
</Rung>
<Rung Number="33" Type="N">
<Text>
<![CDATA[ADD(CC_WC_Index,2,CC_WC2_Index);]]>
</Text>
</Rung>
<Rung Number="34" Type="N">
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)XIO(Local_Control.0)XIO(Index_Write_Control.[CC_WC2_Index])XIO(Update_Archive)[NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Blue,K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Blue) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Green,K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Green) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Red,K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Red) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[0],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[0]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[1],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[1]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[2],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[2]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[3],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[3]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[4],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[4]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[5],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[5]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[6],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[6]) ,NEQ(K50ProL2.Write_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[7],K50ProL2.Archive_Data.Custom_Color[CC_WC_Index].Color_Name.DATA[7]) ]OTL(Index_Write_Inprocess.[CC_WC2_Index])XIO(Command_Being_Processed)EQU(K50ProL2.Command,0)ADD(44,CC_WC_Index,K50ProL2.Command)OTL(Index_Write_Control.[CC_WC2_Index]);]]>
</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[XIC(K50ProL2.Initial_Global_Read)XIO(Command_Being_Processed)XIO(Local_Control.11)EQU(K50ProL2.Command,42)OTL(Command_Being_Processed)BTD(K50ProL2.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(K50ProL2.Command,43)OTL(Command_Being_Processed)MOV(0,Port_Data.Data_Transfer[0])MOV(0,Port_Data.Data_Transfer[1])BTD(K50ProL2.Write_Data.Parameter_Access_Lock,0,Port_Data.Data_Transfer[1],0,1)BTD(K50ProL2.Write_Data.Data_Storage_Lock,0,Port_Data.Data_Transfer[1],1,1)BTD(K50ProL2.Write_Data.Local_Parameterization_Lock,0,Port_Data.Data_Transfer[1],2,1)BTD(K50ProL2.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 Setting parameter (index 64).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)XIO(Command_Being_Processed)XIO(Local_Control.11)EQU(K50ProL2.Command,44)OTL(Command_Being_Processed)MOV(0,Port_Data.Data_Transfer[0])BTD(K50ProL2.Write_Data.Restrict_To_Gamut,0,Port_Data.Data_Transfer[0],0,1)BTD(K50ProL2.Write_Data.Rotation_Speed,0,Port_Data.Data_Transfer[1],0,8)BTD(K50ProL2.Write_Data.Custom_Flash_Rate,0,Port_Data.Data_Transfer[2],0,8)BTD(K50ProL2.Write_Data.Custom_Intensity,0,Port_Data.Data_Transfer[3],0,8)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(64,Port_Data.Data_Transfer[188])MOV(4,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[************************************************************************************************************
Section of AOI that controls writing of the Custom 1  to 5 parameter (index 65 to 69).
************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[XIC(K50ProL2.Initial_Global_Read)XIO(Command_Being_Processed)XIO(Local_Control.11)GEQ(K50ProL2.Command,45)LEQ(K50ProL2.Command,49)OTL(Command_Being_Processed)SUB(K50ProL2.Command,44,CC_W_Index)BTD(K50ProL2.Write_Data.Custom_Color[CC_W_Index].Blue,0,Port_Data.Data_Transfer[0],0,8)BTD(K50ProL2.Write_Data.Custom_Color[CC_W_Index].Green,0,Port_Data.Data_Transfer[1],0,8)BTD(K50ProL2.Write_Data.Custom_Color[CC_W_Index].Red,0,Port_Data.Data_Transfer[2],0,8)CPS(K50ProL2.Write_Data.Custom_Color[CC_W_Index].Color_Name.DATA[0],Port_Data.Data_Transfer[3],8)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[187])MOV(65,Port_Data.Data_Transfer[188])MOV(11,Port_Data.Data_Transfer[189])SUB(K50ProL2.Command,42,Inprocess_Index)OTL(Port_Data.Port_Write.[Port])OTL(Local_Control.11);]]>
</Text>
</Rung>
<Rung Number="44" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="45" 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="46" Type="N">
<Text>
<![CDATA[XIC(Local_Control.12)XIO(Port_Data.Port_RW_Complete.[Port])MOV(0,K50ProL2.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="47" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="48" 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_K50ProL2_v4"/>
<Dependency Type="DataType" Name="Banner_IOL_Port_v4"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
