<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--AOI that controls an Allen Bradley IO-Link Master with Banner devices for parameter data operations. Created for use with the 5032-8IOLM units only.-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="36.00" TargetName="Banner_IOLM_Param_A2_v4" TargetType="AddOnInstructionDefinition" TargetRevision="4.3 " TargetLastEdited="2025-05-22T19:29:45.432Z" ContainsContext="true" ExportDate="Thu May 22 14:30:09 2025" ExportOptions="References NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="Test_5069">
<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.]]>
</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_A2_v4" Revision="4.3" Vendor="Banner Engineering" ExecutePrescan="false" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2017-10-02T11:29:02.741Z" CreatedBy="DUKE\2011324" EditedDate="2025-05-22T19:29:45.432Z" EditedBy="DUKE\jpreisen"
 SoftwareRevision="v36.00">
<Description>
<![CDATA[AOI that controls an Allen Bradley IO-Link Master with Banner devices for parameter data operations. Created for use with the 5032-8IOLM units only.]]>
</Description>
<RevisionNote>
<![CDATA[Fixed an issue with Halt AOI causing a Major fault due to array going out of index.]]>
</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"/>
<Parameter Name="ISDU_Path" TagType="Base" DataType="STRING" Dimensions="8" 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="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)MOVE(0,Current_Port)MOVE(0,IOLM.Port_Data.Port_Activate)MOVE(0,IOLM.Port_Data.Port_Read)MOVE(0,IOLM.Port_Data.Port_Write)MOVE(0,IOLM.Port_Data.Port_RW_Complete)MOVE(0,Lock)OTU(IOLM.AOI_Reset);]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[GE(Error_Index,10)MOVE(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 Allen Bradley
IO-Link Masters.
************************************************************************************************************************]]>
</Comment>
<Text>
<![CDATA[EQ(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[GT(Current_Port,8)[MOVE(0,Current_Port) ,EQ(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[EQ(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[Complete Index Read.  Wait for Read Request.  Configure Read Message so it will access the correct IO-Link Master and port.]]>
</Comment>
<Text>
<![CDATA[NE(IOLM.Port_Data.Port_Activate,0)NE(IOLM.Port_Data.Port_Read,0)EQ(IOLM.Port_Data.Data_Transfer[186],0)XIO(Lock.0)COP(ISDU_Path[Current_Port],Message_Read.Path,1)MOVE(16#10b,Message_Read.Class)BTD(IOLM.Port_Data.Data_Transfer[187],0,Temp_Index,8,8)BTD(IOLM.Port_Data.Data_Transfer[188],0,Temp_Index,0,8)MOVE(Temp_Index,Message_Read.Instance)MOVE(0,Message_Read.Attribute)MOVE(IOLM.Port_Data.Data_Transfer[189],Byte_Length)MOVE(0,Array_Index)MOVE(0,Data_Index)OTL(Lock.0);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Comment>
<![CDATA[Sub Index Request detected.  Skip this command as AB doesn't handle this correctly.]]>
</Comment>
<Text>
<![CDATA[NE(IOLM.Port_Data.Port_Activate,0)NE(IOLM.Port_Data.Port_Read,0)NE(IOLM.Port_Data.Data_Transfer[186],0)XIO(Lock.0)OTL(Lock.4);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[MOVE(100,Message_Timer.PRE)MOVE(5000,Message_Timer2.PRE);]]>
</Text>
</Rung>
<Rung Number="8" 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="9" 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)EQ(IOLM.Port_Data.Data_Transfer[186],0)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) MOVE(Current_Port,IOLM.Error_Log[Error_Index].Port) MOVE(Temp_Index,IOLM.Error_Log[Error_Index].Index) MOVE(0,IOLM.Error_Log[Error_Index].RW) ADD(Error_Index,1,Error_Index) OTL(Lock.4) ];]]>
</Text>
</Rung>
<Rung Number="10" 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)MOVE(IOLM.Message_Destination_Data[Array_Index],IOLM.Port_Data.Data_Transfer[Data_Index])OTL(Lock.2);]]>
</Text>
</Rung>
<Rung Number="11" 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="12" Type="N">
<Text>
<![CDATA[XIC(Lock.3)XIO(Lock.4)[LT(Data_Index,Byte_Length) OTU(Lock.2) OTU(Lock.3) ,GE(Data_Index,Byte_Length) OTL(Lock.4) ];]]>
</Text>
</Rung>
<Rung Number="13" 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="14" Type="N">
<Text>
<![CDATA[XIC(Lock.5)EQ(IOLM.Port_Data.Port_Read,0)MOVE(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="15" 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[NE(IOLM.Port_Data.Port_Activate,0)NE(IOLM.Port_Data.Port_Write,0)XIO(Lock.8)COP(ISDU_Path[Current_Port],Message_Write.Path,1)MOVE(16#10b,Message_Write.Class)BTD(IOLM.Port_Data.Data_Transfer[187],0,Temp_Index,8,8)BTD(IOLM.Port_Data.Data_Transfer[188],0,Temp_Index,0,8)MOVE(Temp_Index,Message_Write.Instance)MOVE(0,Message_Write.Attribute)MOVE(IOLM.Port_Data.Data_Transfer[189],Message_Write.REQ_LEN)MOVE(IOLM.Port_Data.Data_Transfer[189],Byte_Length)MOVE(0,Array_Index)MOVE(0,Data_Index)OTL(Lock.8);]]>
</Text>
</Rung>
<Rung Number="16" 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)MOVE(IOLM.Port_Data.Data_Transfer[Data_Index],IOLM.Message_Source_Data[Array_Index])OTL(Lock.9);]]>
</Text>
</Rung>
<Rung Number="17" 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="18" Type="N">
<Text>
<![CDATA[XIC(Lock.10)XIO(Lock.11)[LT(Data_Index,Byte_Length) OTU(Lock.9) OTU(Lock.10) ,GE(Data_Index,Byte_Length) OTL(Lock.11) ];]]>
</Text>
</Rung>
<Rung Number="19" 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) ] OTL(Lock.12) ,XIC(Message_Write.ER) ADD(IOLM.Num_Error_MSGS,1,IOLM.Num_Error_MSGS) MOVE(Current_Port,IOLM.Error_Log[Error_Index].Port) MOVE(Temp_Index,IOLM.Error_Log[Error_Index].Index) MOVE(1,IOLM.Error_Log[Error_Index].RW) ADD(Error_Index,1,Error_Index) ];]]>
</Text>
</Rung>
<Rung Number="20" Type="N">
<Text>
<![CDATA[XIC(Message_Write.ER)XIC(IOLM.Error_Write_Retry)OTU(Lock.11)OTU(IOLM.Error_Write_Retry);]]>
</Text>
</Rung>
<Rung Number="21" 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="22" Type="N">
<Text>
<![CDATA[XIC(Lock.13)EQ(IOLM.Port_Data.Port_Write,0)MOVE(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>
