<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--AOI to read and write parameter generic IO-Link parameter data.

Sub-Index access not possible at this time.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="33.00" TargetName="Banner_IOL_Generic_Param_v4" TargetType="AddOnInstructionDefinition" TargetRevision="4.0 " TargetLastEdited="2023-01-24T14:34:58.260Z" ContainsContext="true" ExportDate="Tue Jan 24 08:35:20 2023" ExportOptions="References NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Test">
<DataTypes Use="Context">
<DataType Name="Banner_IOL_Generic_v4" Family="NoFamily" Class="User">
<Members>
<Member Name="Index" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value of Index to read/write.]]>
</Description>
</Member>
<Member Name="Sub_Index" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Value of Sub-Index to read/write.]]>
</Description>
</Member>
<Member Name="Data_Length" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Length (in bytes) for the data.]]>
</Description>
</Member>
<Member Name="ZZZZZZZZZZBanner_IOL3" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Activate" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="0" ExternalAccess="Read/Write">
<Description>
<![CDATA[True starts the read or write of parameter from an IO-Link device.]]>
</Description>
</Member>
<Member Name="RW" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="1" ExternalAccess="Read/Write">
<Description>
<![CDATA[False = Read, True = Write.]]>
</Description>
</Member>
<Member Name="Busy" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="2" ExternalAccess="Read/Write"/>
<Member Name="Done" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="3" ExternalAccess="Read/Write"/>
<Member Name="Reset" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="4" ExternalAccess="Read/Write"/>
<Member Name="Clear_Data" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="5" ExternalAccess="Read/Write"/>
<Member Name="Data" DataType="SINT" Dimension="180" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
</Members>
</DataType>
<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>
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Banner_IOL_Generic_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-01-24T14:34:58.260Z" EditedBy="DUKE\jpreisen"
 SoftwareRevision="v33.00">
<Description>
<![CDATA[AOI to read and write parameter generic IO-Link parameter data.

Sub-Index access not possible at this time.]]>
</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="IOL" TagType="Base" DataType="Banner_IOL_Generic_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="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>
</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(IOL.Reset)OTU(Command_Being_Processed)MOV(0,Local_Control)OTU(IOL.Activate)OTU(IOL.Done)OTU(IOL.Busy)OTU(IOL.Reset);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Comment>
<![CDATA[Clear the Data Array.]]>
</Comment>
<Text>
<![CDATA[XIC(IOL.Clear_Data)FLL(0,IOL.Data[0],180)OTU(IOL.Clear_Data);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Comment>
<![CDATA[Generic Read command logic.]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.4)XIO(IOL.RW)XIC(IOL.Activate)OTL(Command_Being_Processed)FLL(0,IOL.Data[0],180)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[186])BTD(IOL.Index,8,Port_Data.Data_Transfer[187],0,8)BTD(IOL.Index,0,Port_Data.Data_Transfer[188],0,8)MOV(IOL.Data_Length,Port_Data.Data_Transfer[189])OTU(IOL.Done)OTL(IOL.Busy)OTL(Port_Data.Port_Read.[Port])OTL(Local_Control.4);]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Text>
<![CDATA[XIC(Local_Control.4)XIO(Local_Control.5)XIC(Port_Data.Port_RW_Complete.[Port])CPS(Port_Data.Data_Transfer[0],IOL.Data[0],IOL.Data_Length)OTL(Local_Control.5);]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Text>
<![CDATA[XIC(Local_Control.5)XIO(Local_Control.6)OTU(Port_Data.Port_Read.[Port])OTL(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Text>
<![CDATA[XIC(Local_Control.6)XIO(Port_Data.Port_RW_Complete.[Port])OTL(IOL.Done)OTU(IOL.Busy)OTU(IOL.Activate)OTU(Local_Control.1)OTU(Command_Being_Processed)OTU(Local_Control.4)OTU(Local_Control.5)OTU(Local_Control.6);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Comment>
<![CDATA[Generic Write Commands]]>
</Comment>
<Text>
<![CDATA[XIO(Command_Being_Processed)XIO(Local_Control.11)XIC(IOL.RW)XIC(IOL.Activate)OTL(Command_Being_Processed)MOV(Port,Port_Data.Data_Transfer[185])MOV(0,Port_Data.Data_Transfer[186])BTD(IOL.Index,8,Port_Data.Data_Transfer[187],0,8)BTD(IOL.Index,0,Port_Data.Data_Transfer[188],0,8)MOV(IOL.Data_Length,Port_Data.Data_Transfer[189])CPS(IOL.Data[0],Port_Data.Data_Transfer[0],IOL.Data_Length)OTU(IOL.Done)OTL(IOL.Busy)OTL(Port_Data.Port_Write.[Port])OTL(Local_Control.11);]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<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="9" Type="N">
<Text>
<![CDATA[XIC(Local_Control.12)XIO(Port_Data.Port_RW_Complete.[Port])FLL(0,IOL.Data[0],180)OTL(IOL.Done)OTU(IOL.Busy)OTU(IOL.Activate)OTU(Local_Control.3)OTU(Command_Being_Processed)OTU(Local_Control.11)OTU(Local_Control.12);]]>
</Text>
</Rung>
<Rung Number="10" Type="N">
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="11" Type="N">
<Text>
<![CDATA[EQU(Local_Control,0)OTU(Port_Data.Port_Activate.[Port]);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
<Dependencies>
<Dependency Type="DataType" Name="Banner_IOL_Generic_v4"/>
<Dependency Type="DataType" Name="Banner_IOL_Port_v4"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
