<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--AOI that controls an Turck IO-Link Master with Banner devices for parameter data operations.. This is only available on firmware 3.3.1 or later.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="33.03" TargetName="Banner_IOLM_Param_T2_v4" TargetType="AddOnInstructionDefinition" TargetRevision="4.5 " TargetLastEdited="2025-10-01T12:41:20.539Z" ContainsContext="true" ExportDate="Wed Oct 01 08:26:09 2025" 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_IOLM_EL_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[Error Log for Messages to IOLM.]]>
</Description>
<Members>
<Member Name="RW" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[0 = Read, 1 = Write, 3 = AOI Failure.]]>
</Description>
</Member>
<Member Name="Port" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[Port number that generated error.]]>
</Description>
</Member>
<Member Name="Index" DataType="INT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[IO-Link Index for generated error.]]>
</Description>
</Member>
</Members>
</DataType>
<DataType Name="Banner_IOLM_v4" Family="NoFamily" Class="User">
<Description>
<![CDATA[UDT to control IO-Link Masters.]]>
</Description>
<Members>
<Member Name="Message_Source_Data" DataType="SINT" Dimension="190" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Message_Destination_Data" DataType="SINT" Dimension="190" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="Error_Log" DataType="Banner_IOLM_EL_v4" Dimension="10" Radix="NullType" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="ZZZZZZZZZZBanner_IOL3" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Error_Write_Retry" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL3" BitNumber="0" ExternalAccess="Read/Write"/>
<Member Name="Num_Error_MSGS" DataType="DINT" Dimension="0" Radix="Decimal" Hidden="false" ExternalAccess="Read/Write"/>
<Member Name="ZZZZZZZZZZBanner_IOL6" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="IO_Link_Master_Busy" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL6" BitNumber="0" ExternalAccess="Read/Write">
<Description>
<![CDATA[0 = While waiting for a command, 1 = Processing command]]>
</Description>
</Member>
<Member Name="AOI_Reset" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL6" BitNumber="1" ExternalAccess="Read/Write"/>
<Member Name="Port_Data" DataType="Banner_IOL_Port_v4" Dimension="0" Radix="NullType" Hidden="false" ExternalAccess="Read/Write">
<Description>
<![CDATA[All of the necessary data to work with the various ports of the IO-Link Master.]]>
</Description>
</Member>
<Member Name="ZZZZZZZZZZBanner_IOL10" DataType="SINT" Dimension="0" Radix="Decimal" Hidden="true" ExternalAccess="Read/Write"/>
<Member Name="Halt_Operation" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL10" BitNumber="0" ExternalAccess="Read/Write">
<Description>
<![CDATA[When parameter is 1 the AOI is halted as next available time frame.]]>
</Description>
</Member>
<Member Name="AOI_Halted" DataType="BIT" Dimension="0" Radix="Decimal" Hidden="false" Target="ZZZZZZZZZZBanner_IOL10" BitNumber="1" ExternalAccess="Read/Write">
<Description>
<![CDATA[AOI is in standby mode until Halt Operation tag is set back to 0.]]>
</Description>
</Member>
</Members>
<Dependencies>
<Dependency Type="DataType" Name="Banner_IOLM_EL_v4"/>
<Dependency Type="DataType" Name="Banner_IOL_Port_v4"/>
</Dependencies>
</DataType>
</DataTypes>
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="Banner_IOLM_Param_T2_v4" Revision="4.5" Vendor="Banner Engineering" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2017-10-02T11:29:02.741Z" CreatedBy="DUKE\2011324" EditedDate="2025-10-01T12:41:20.539Z" EditedBy="DUKE\jpreisen"
 SoftwareRevision="v33.03">
<Description>
<![CDATA[AOI that controls an Turck IO-Link Master with Banner devices for parameter data operations.. This is only available on firmware 3.3.1 or later.]]>
</Description>
<RevisionNote>
<![CDATA[Sub-Index access now possible for read and write.]]>
</RevisionNote>
<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="Message_Read" TagType="Base" DataType="MESSAGE" Usage="InOut" Required="true" Visible="true">
<Description>
<![CDATA[Message used to gather data from a device plugged into an Allen Bradley IO-Link Master.]]>
</Description>
</Parameter>
<Parameter Name="Message_Write" TagType="Base" DataType="MESSAGE" Usage="InOut" Required="true" Visible="true">
<Description>
<![CDATA[Message used to send parameter updates to a device plugged into an Allen Bradley IO-Link Master.]]>
</Description>
</Parameter>
<Parameter Name="IOLM" TagType="Base" DataType="Banner_IOLM_v4" Usage="InOut" Required="true" Visible="true" Constant="false"/>
</Parameters>
<LocalTags>
<LocalTag Name="Lock" 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="Disable_Timer" 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="Byte_Length" DataType="SINT" Radix="Decimal" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="SINT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Current_Port" DataType="INT" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[Current port to communicate with via the IO-Link Master.]]>
</Description>
<DefaultData Format="L5K">
<![CDATA[0]]>
</DefaultData>
<DefaultData Format="Decorated">
<DataValue DataType="INT" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Array_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="Data_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="Message_Timer" DataType="TIMER" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[[0,100,0]]]>
</DefaultData>
<DefaultData Format="Decorated">
<Structure DataType="TIMER">
<DataValueMember Name="PRE" DataType="DINT" Radix="Decimal" Value="100"/>
<DataValueMember Name="ACC" DataType="DINT" Radix="Decimal" Value="0"/>
<DataValueMember Name="EN" DataType="BOOL" Value="0"/>
<DataValueMember Name="TT" DataType="BOOL" Value="0"/>
<DataValueMember Name="DN" DataType="BOOL" Value="0"/>
</Structure>
</DefaultData>
</LocalTag>
<LocalTag Name="Error_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="Message_Timer2" DataType="TIMER" ExternalAccess="None">
<DefaultData Format="L5K">
<![CDATA[[0,5000,0]]]>
</DefaultData>
<DefaultData Format="Decorated">
<Structure DataType="TIMER">
<DataValueMember Name="PRE" DataType="DINT" Radix="Decimal" Value="5000"/>
<DataValueMember Name="ACC" DataType="DINT" Radix="Decimal" Value="0"/>
<DataValueMember Name="EN" DataType="BOOL" Value="0"/>
<DataValueMember Name="TT" DataType="BOOL" Value="0"/>
<DataValueMember Name="DN" DataType="BOOL" Value="0"/>
</Structure>
</DefaultData>
</LocalTag>
<LocalTag Name="Temp_Index" DataType="INT" Radix="Decimal" ExternalAccess="None">
<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">
<Text>
<![CDATA[XIC(IOLM.AOI_Reset)MOV(0,Current_Port)MOV(0,IOLM.Port_Data.Port_Activate)MOV(0,IOLM.Port_Data.Port_Read)MOV(0,IOLM.Port_Data.Port_Write)MOV(0,IOLM.Port_Data.Port_RW_Complete)MOV(0,Lock)OTU(IOLM.AOI_Reset);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[GEQ(Error_Index,10)MOV(0,Error_Index);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Comment>
<![CDATA[************************************************************************************************************************
Configure EIP connection to a IO-Link Master.  This AOI is configured to handle Turck
IO-Link Masters.
************************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[EQU(IOLM.Port_Data.Port_Activate,0)ADD(Current_Port,1,Current_Port);]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Comment>
<![CDATA[Reset port back to 0 after all ports have had a chance to process commands.]]>
</Comment>
<Text>
<![CDATA[GRT(Current_Port,8)[MOV(0,Current_Port) ,EQU(IOLM.Port_Data.Port_Activate,0) XIC(IOLM.Halt_Operation) OTE(IOLM.AOI_Halted) ];]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Comment>
<![CDATA[Section controls when a port should process updates to the system.  This ensures only one port is accessed at a time.]]>
</Comment>
<Text>
<![CDATA[EQU(IOLM.Port_Data.Port_Activate,0)XIC(IOLM.Port_Data.Port_Controlled.[Current_Port])XIO(IOLM.Halt_Operation)OTL(IOLM.Port_Data.Port_Activate.[Current_Port]);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Comment>
<![CDATA[Wait for Read Request.  Configure Read Message so it will access the correct IO-Link Master and port.]]>
</Comment>
<Text>
<![CDATA[NEQ(IOLM.Port_Data.Port_Activate,0)NEQ(IOLM.Port_Data.Port_Read,0)XIO(Lock.0)MOV(16#67,Message_Read.Class)MOV(1,Message_Read.Instance)MOV(IOLM.Port_Data.Data_Transfer[185],Message_Read.Attribute)MOV(IOLM.Port_Data.Data_Transfer[188],IOLM.Message_Source_Data[0])MOV(IOLM.Port_Data.Data_Transfer[187],IOLM.Message_Source_Data[1])MOV(IOLM.Port_Data.Data_Transfer[186],IOLM.Message_Source_Data[2])MOV(IOLM.Port_Data.Data_Transfer[189],Byte_Length)MOV(0,Array_Index)MOV(0,Data_Index)MOV(3,Message_Read.REQ_LEN)OTL(Lock.0);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Text>
<![CDATA[MOV(100,Message_Timer.PRE)MOV(5000,Message_Timer2.PRE);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[[XIC(Lock.0) XIO(Lock.1) ,XIC(Lock.11) XIO(Lock.12) ][TON(Message_Timer,?,?) ,TON(Message_Timer2,?,?) ];]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<Comment>
<![CDATA[Send Read Message to IO-Link Master.  Wait for Error or Done bit to turn on before continuing on.]]>
</Comment>
<Text>
<![CDATA[XIC(Lock.0)XIO(Lock.1)XIO(Lock.4)MSG(Message_Read)XIC(Message_Timer.DN)[XIC(Message_Read.DN) OTL(Lock.1) ,XIC(Message_Read.ER) ADD(IOLM.Num_Error_MSGS,1,IOLM.Num_Error_MSGS) MOV(Current_Port,IOLM.Error_Log[Error_Index].Port) BTD(IOLM.Port_Data.Data_Transfer[187],0,Temp_Index,8,8) BTD(IOLM.Port_Data.Data_Transfer[188],0,Temp_Index,0,8) MOV(Temp_Index,IOLM.Error_Log[Error_Index].Index) MOV(0,IOLM.Error_Log[Error_Index].RW) ADD(Error_Index,1,Error_Index) OTL(Lock.4) ];]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Comment>
<![CDATA[Take raw data from the Read request and place it into a format that the Device AOI can interpret.]]>
</Comment>
<Text>
<![CDATA[XIC(Lock.1)XIO(Lock.2)MOV(IOLM.Message_Destination_Data[Array_Index],IOLM.Port_Data.Data_Transfer[Data_Index])OTL(Lock.2);]]>
</Text>
</Rung>
<Rung Number="10" Type="N">
<Text>
<![CDATA[XIC(Lock.2)XIO(Lock.3)ADD(Array_Index,1,Array_Index)ADD(Data_Index,1,Data_Index)OTL(Lock.3);]]>
</Text>
</Rung>
<Rung Number="11" Type="N">
<Text>
<![CDATA[XIC(Lock.3)XIO(Lock.4)[LES(Data_Index,Byte_Length) OTU(Lock.2) OTU(Lock.3) ,GEQ(Data_Index,Byte_Length) OTL(Lock.4) ];]]>
</Text>
</Rung>
<Rung Number="12" Type="N">
<Text>
<![CDATA[XIC(Lock.4)XIO(Lock.5)OTL(IOLM.Port_Data.Port_RW_Complete.[Current_Port])OTL(Lock.5);]]>
</Text>
</Rung>
<Rung Number="13" Type="N">
<Text>
<![CDATA[XIC(Lock.5)EQU(IOLM.Port_Data.Port_Read,0)MOV(0,IOLM.Port_Data.Port_RW_Complete)OTU(Lock.0)OTU(Lock.1)OTU(Lock.2)OTU(Lock.3)OTU(Lock.4)OTU(Lock.5);]]>
</Text>
</Rung>
<Rung Number="14" Type="N">
<Comment>
<![CDATA[Send Write Message to IO-Link Master.  Wait for Error or Done bit to turn on before continuing on.]]>
</Comment>
<Text>
<![CDATA[NEQ(IOLM.Port_Data.Port_Activate,0)NEQ(IOLM.Port_Data.Port_Write,0)XIO(Lock.8)MOV(16#67,Message_Write.Class)MOV(1,Message_Write.Instance)MOV(IOLM.Port_Data.Data_Transfer[185],Message_Write.Attribute)MOV(IOLM.Port_Data.Data_Transfer[188],IOLM.Message_Source_Data[0])MOV(IOLM.Port_Data.Data_Transfer[187],IOLM.Message_Source_Data[1])MOV(IOLM.Port_Data.Data_Transfer[186],IOLM.Message_Source_Data[2])ADD(IOLM.Port_Data.Data_Transfer[189],3,Message_Write.REQ_LEN)MOV(IOLM.Port_Data.Data_Transfer[189],Byte_Length)MOV(3,Array_Index)MOV(0,Data_Index)OTL(Lock.8);]]>
</Text>
</Rung>
<Rung Number="15" Type="N">
<Comment>
<![CDATA[Take data from the AOI and place it into the correct byte locations, so the write command can send it to the IO-Link Master in the proper manner. ]]>
</Comment>
<Text>
<![CDATA[XIC(Lock.8)XIO(Lock.9)MOV(IOLM.Port_Data.Data_Transfer[Data_Index],IOLM.Message_Source_Data[Array_Index])OTL(Lock.9);]]>
</Text>
</Rung>
<Rung Number="16" Type="N">
<Text>
<![CDATA[XIC(Lock.9)XIO(Lock.10)ADD(Array_Index,1,Array_Index)ADD(Data_Index,1,Data_Index)OTL(Lock.10);]]>
</Text>
</Rung>
<Rung Number="17" Type="N">
<Text>
<![CDATA[XIC(Lock.10)XIO(Lock.11)[LES(Data_Index,Byte_Length) OTU(Lock.9) OTU(Lock.10) ,GEQ(Data_Index,Byte_Length) OTL(Lock.11) ];]]>
</Text>
</Rung>
<Rung Number="18" Type="N">
<Text>
<![CDATA[XIC(Lock.11)XIO(Lock.12)MSG(Message_Write)XIC(Message_Timer.DN)[[XIC(Message_Write.DN) ,XIC(Message_Timer2.DN) ] ,XIC(Message_Write.ER) ADD(IOLM.Num_Error_MSGS,1,IOLM.Num_Error_MSGS) MOV(Current_Port,IOLM.Error_Log[Error_Index].Port) BTD(IOLM.Port_Data.Data_Transfer[187],0,Temp_Index,8,8) BTD(IOLM.Port_Data.Data_Transfer[188],0,Temp_Index,0,8) MOV(Temp_Index,IOLM.Error_Log[Error_Index].Index) MOV(1,IOLM.Error_Log[Error_Index].RW) ADD(Error_Index,1,Error_Index) ]OTL(Lock.12);]]>
</Text>
</Rung>
<Rung Number="19" Type="N">
<Text>
<![CDATA[XIC(Lock.12)XIO(Lock.13)OTL(IOLM.Port_Data.Port_RW_Complete.[Current_Port])OTL(Lock.13);]]>
</Text>
</Rung>
<Rung Number="20" Type="N">
<Text>
<![CDATA[XIC(Lock.13)EQU(IOLM.Port_Data.Port_Write,0)MOV(0,IOLM.Port_Data.Port_RW_Complete)OTU(Lock.8)OTU(Lock.9)OTU(Lock.10)OTU(Lock.11)OTU(Lock.12)OTU(Lock.13);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
<Dependencies>
<Dependency Type="DataType" Name="Banner_IOLM_v4"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
