<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--MAIN CONTROL MODULE-->
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="36.00" TargetName="AOI_MCM" TargetType="AddOnInstructionDefinition" TargetRevision="1.0 " TargetLastEdited="2025-05-30T12:02:44.982Z" ContainsContext="true" ExportDate="Sat Jun 14 16:51:41 2025" ExportOptions="NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
<Controller Use="Context" Name="BaseProgram">
<AddOnInstructionDefinitions Use="Context">
<AddOnInstructionDefinition Use="Target" Name="AOI_MCM" Revision="1.0" Vendor="Automation Standard" ExecutePrescan="true" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2018-11-09T20:08:51.991Z" CreatedBy="Rob-PC\Rob" EditedDate="2025-05-30T12:02:44.982Z" EditedBy="LCIBATUMI\gigi.mamaladze"
 SoftwareRevision="v36.00">
<Description>
<![CDATA[MAIN CONTROL MODULE]]>
</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="HMI" TagType="Base" DataType="UDT_HMI_MCM" Usage="InOut" Required="true" Visible="true" Constant="false"/>
<Parameter Name="CTRL" TagType="Base" DataType="UDT_CTRL_MCM" Usage="InOut" Required="true" Visible="true" Constant="false"/>
<Parameter Name="System_Started" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[MCM System Started]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Maintenance_Mode" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[In Maintenance Mode]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Motor_Fault" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Motor Faulted in MCM System]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Jam_Fault" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Conveyor Jammed in System]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="EStopped" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[System EStopped]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Low_Air_Pressure_Fault" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Low Air Pressure in System]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Horn_Sound" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="true" ExternalAccess="Read/Write">
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_Start_PB" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Start PushButton]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_Stop_PB" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Stop PushButton]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_EStop_PB" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Emergency Stop PushButton]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_Fire_Relay" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Fire Relay]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_VFD_Fault_Reset_PB" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[VFD Fault Reset PushButton]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_Jam_Restart_PB" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Jam Reset PushButton]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_LAP_PB" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Low Air Pressure PushButton]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_UPS_Battery_Fault" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Uninterrupted Power Supply Faulted]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_UPS_Battery_On" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Uninterrupted Power Supply On]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="In_UPS_Battery_Low" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Uninterrupted Power Supply Low]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Out_EStop_PB_LT" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
<Description>
<![CDATA[Emergenyc Stop PushButton Light]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Out_Start_PB_LT" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Start PushButton Light]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Out_Motor_Fault_PB_LT" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Motor Fault PushButton Light]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Out_Jam_Restart_PB_LT" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Jam Reset PushButton Light]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Out_LAP_PB_LT" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read Only">
<Description>
<![CDATA[Low Air Pressure PushButton Light]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
<Parameter Name="Communication_Fault" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only">
<Description>
<![CDATA[Communication Faulted in System]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</Parameter>
</Parameters>
<LocalTags>
<LocalTag Name="EStoped_Was_Actuated" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[Emergency Stop Was Actuated in System]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="Concattenated_String" DataType="STRING" ExternalAccess="None">
<Description>
<![CDATA[String for Log]]>
</Description>
<DefaultData Format="String" Length="0">
<![CDATA['']]>
</DefaultData>
</LocalTag>
<LocalTag Name="Encoder_Fault" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
<Description>
<![CDATA[Encder Faulted or Conveyor is Running at Low Speed]]>
</Description>
<DefaultData Format="Decorated">
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
</DefaultData>
</LocalTag>
<LocalTag Name="EncoderFault_FlipFlip" DataType="AOI_FLIP_FLOP" ExternalAccess="None">
<DefaultData Format="Decorated">
<Structure DataType="AOI_FLIP_FLOP">
<DataValueMember Name="EnableIn" DataType="BOOL" Value="1"/>
<DataValueMember Name="EnableOut" DataType="BOOL" Value="0"/>
<DataValueMember Name="On" DataType="DINT" Radix="Decimal" Value="0"/>
<DataValueMember Name="Off" DataType="DINT" Radix="Decimal" Value="0"/>
<DataValueMember Name="Flash" DataType="BOOL" Value="0"/>
</Structure>
</DefaultData>
</LocalTag>
<LocalTag Name="Beacon_Flip_Flop" DataType="AOI_FLIP_FLOP" ExternalAccess="None">
<DefaultData Format="Decorated">
<Structure DataType="AOI_FLIP_FLOP">
<DataValueMember Name="EnableIn" DataType="BOOL" Value="1"/>
<DataValueMember Name="EnableOut" DataType="BOOL" Value="0"/>
<DataValueMember Name="On" DataType="DINT" Radix="Decimal" Value="0"/>
<DataValueMember Name="Off" DataType="DINT" Radix="Decimal" Value="0"/>
<DataValueMember Name="Flash" DataType="BOOL" Value="0"/>
</Structure>
</DefaultData>
</LocalTag>
</LocalTags>
<Routines>
<Routine Name="Logic" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Text>
<![CDATA[[COP(CTRL.CMD.Log,CTRL.STS.Log,1) COP(CTRL.CMD.Log_Quantity,CTRL.STS.Log_Quantity,1) ,XIC(CTRL.CMD.Acknowledge_Log) COP(CTRL.CMD.Log,CTRL.STS.Acknowledge_Log,1) ,XIC(CTRL.CMD.All_Unacknowledge_Log) OTE(CTRL.STS.All_Unacknowledge_Log) ];]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[XIC(CTRL.STS.LAP_PB_LT)OTE(Low_Air_Pressure_Fault);]]>
</Text>
</Rung>
<Rung Number="2" Type="N">
<Text>
<![CDATA[[XIC(CTRL.STS.Start_PB) ,XIC(System_Started) ]XIO(CTRL.STS.Stop_PB)OTE(CTRL.STS.System_Started)OTE(System_Started);]]>
</Text>
</Rung>
<Rung Number="3" Type="N">
<Text>
<![CDATA[XIC(CTRL.CMD.VFD_Was_Faulted)OTE(CTRL.STS.VFD_Faulted)OTE(Motor_Fault);]]>
</Text>
</Rung>
<Rung Number="4" Type="N">
<Text>
<![CDATA[XIC(CTRL.CMD.Jam_Fault)OTE(CTRL.STS.Jam_Fault)OTE(Jam_Fault);]]>
</Text>
</Rung>
<Rung Number="5" Type="N">
<Text>
<![CDATA[XIC(CTRL.CMD.Encoder_Fault)OTE(CTRL.STS.Encoder_Fault)OTE(Encoder_Fault);]]>
</Text>
</Rung>
<Rung Number="6" Type="N">
<Text>
<![CDATA[[XIC(CTRL.CMD.EStop_Actuated) ,XIO(In_EStop_PB) ]OTE(EStopped);]]>
</Text>
</Rung>
<Rung Number="7" Type="N">
<Text>
<![CDATA[XIC(CTRL.CMD.Communication_Was_Faulted)OTE(CTRL.STS.Communication_Fault)OTE(Communication_Fault);]]>
</Text>
</Rung>
<Rung Number="8" Type="N">
<Text>
<![CDATA[[XIO(In_Start_PB) ,XIC(HMI.Start_PB) ]OTL(CTRL.CMD.Start_PB)OTE(CTRL.STS.Start_Request);]]>
</Text>
</Rung>
<Rung Number="9" Type="N">
<Text>
<![CDATA[[XIO(In_Stop_PB) ,XIO(In_Fire_Relay) ,XIC(HMI.Stop_PB) ,XIC(CTRL.STS.EStopped) ,XIC(CTRL.CMD.Communication_Was_Faulted) ]OTL(CTRL.CMD.Stop_PB);]]>
</Text>
</Rung>
<Rung Number="10" Type="N">
<Text>
<![CDATA[XIO(In_EStop_PB)OTL(CTRL.CMD.EStop_PB);]]>
</Text>
</Rung>
<Rung Number="11" Type="N">
<Text>
<![CDATA[XIO(In_EStop_PB)OTE(CTRL.STS.EStopped);]]>
</Text>
</Rung>
<Rung Number="12" Type="N">
<Text>
<![CDATA[[XIC(In_VFD_Fault_Reset_PB) ,XIC(HMI.VFD_Reset_PB_Pressed) ]OTL(CTRL.CMD.VFD_Fault_Reset_PB);]]>
</Text>
</Rung>
<Rung Number="13" Type="N">
<Text>
<![CDATA[[XIC(In_Jam_Restart_PB) ,XIC(HMI.Jam_Reset_PB_Pressed) ]OTL(CTRL.CMD.Jam_Restart_PB);]]>
</Text>
</Rung>
<Rung Number="14" Type="N">
<Text>
<![CDATA[[XIC(In_LAP_PB) ,XIC(HMI.LAR_PB_Pressed) ]OTL(CTRL.CMD.LAP_PB);]]>
</Text>
</Rung>
<Rung Number="15" Type="N">
<Text>
<![CDATA[XIC(System_Started)OTE(Out_Start_PB_LT);]]>
</Text>
</Rung>
<Rung Number="16" Type="N">
<Text>
<![CDATA[[XIO(CTRL.CMD.VFD_Faulted) XIC(CTRL.CMD.VFD_Was_Faulted) ,XIC(CTRL.CMD.VFD_Faulted) ]OTE(Out_Motor_Fault_PB_LT);]]>
</Text>
</Rung>
<Rung Number="17" Type="N">
<Text>
<![CDATA[[XIC(Jam_Fault) ,XIC(Encoder_Fault) AOI_FLIP_FLOP(EncoderFault_FlipFlip,2000,2000) ]OTE(Out_Jam_Restart_PB_LT);]]>
</Text>
</Rung>
<Rung Number="18" Type="N">
<Text>
<![CDATA[XIC(Low_Air_Pressure_Fault)OTE(Out_LAP_PB_LT);]]>
</Text>
</Rung>
<Rung Number="19" Type="N">
<Text>
<![CDATA[[XIC(EStopped) ,XIC(CTRL.CMD.EStop_Was_Actuated) XIO(EStopped) ]OTE(Out_EStop_PB_LT);]]>
</Text>
</Rung>
<Rung Number="20" Type="N">
<Text>
<![CDATA[XIC(EStopped)OTE(HMI.Beacon_Light);]]>
</Text>
</Rung>
<Rung Number="21" Type="N">
<Comment>
<![CDATA[ALARMS
]]>
</Comment>
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="22" Type="N">
<Text>
<![CDATA[XIO(In_EStop_PB)OTE(HMI.Alarm.EStop_PB_Pressed);]]>
</Text>
</Rung>
<Rung Number="23" Type="N">
<Text>
<![CDATA[XIO(In_UPS_Battery_Fault)OTE(HMI.Alarm.UPS_Fault);]]>
</Text>
</Rung>
<Rung Number="24" Type="N">
<Text>
<![CDATA[XIO(In_UPS_Battery_On)OTE(HMI.Alarm.UPS_Battery_On);]]>
</Text>
</Rung>
<Rung Number="25" Type="N">
<Text>
<![CDATA[XIO(In_UPS_Battery_Low)OTE(HMI.Alarm.UPS_Battery_Low);]]>
</Text>
</Rung>
<Rung Number="26" Type="N">
<Text>
<![CDATA[XIO(In_Fire_Relay)OTE(HMI.Alarm.Fire_Relay_De_Energized);]]>
</Text>
</Rung>
<Rung Number="27" Type="N">
<Text>
<![CDATA[[XIC(Jam_Fault) ,XIC(Encoder_Fault) ,XIC(Motor_Fault) ,XIC(EStopped) ]OTE(HMI.System_Fault_Present);]]>
</Text>
</Rung>
<Rung Number="28" Type="N">
<Text>
<![CDATA[XIC(System_Started)OTE(HMI.Start_PB_LT);]]>
</Text>
</Rung>
<Rung Number="29" Type="N">
<Text>
<![CDATA[XIO(System_Started)OTE(HMI.Stop_PB_LT);]]>
</Text>
</Rung>
<Rung Number="30" Type="N">
<Text>
<![CDATA[XIC(HMI.Start_PB)OTU(HMI.Start_PB);]]>
</Text>
</Rung>
<Rung Number="31" Type="N">
<Text>
<![CDATA[XIC(HMI.Stop_PB)OTU(HMI.Stop_PB);]]>
</Text>
</Rung>
<Rung Number="32" Type="N">
<Text>
<![CDATA[XIC(HMI.VFD_Reset_PB_Pressed)OTU(HMI.VFD_Reset_PB_Pressed);]]>
</Text>
</Rung>
<Rung Number="33" Type="N">
<Text>
<![CDATA[XIC(HMI.Jam_Reset_PB_Pressed)OTU(HMI.Jam_Reset_PB_Pressed);]]>
</Text>
</Rung>
<Rung Number="34" Type="N">
<Text>
<![CDATA[XIC(HMI.LAR_PB_Pressed)OTU(HMI.LAR_PB_Pressed);]]>
</Text>
</Rung>
<Rung Number="35" Type="N">
<Text>
<![CDATA[XIC(HMI.Communication_Fault_Reset_Button)OTU(HMI.Communication_Fault_Reset_Button);]]>
</Text>
</Rung>
<Rung Number="36" Type="N">
<Comment>
<![CDATA[Colors of Animation
]]>
</Comment>
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="37" Type="N">
<Comment>
<![CDATA[Off - White (0.0.0)
]]>
</Comment>
<Text>
<![CDATA[XIO(System_Started)MOVE(13,HMI.Color);]]>
</Text>
</Rung>
<Rung Number="38" Type="N">
<Comment>
<![CDATA[Running - Green (0.255.0)
]]>
</Comment>
<Text>
<![CDATA[XIC(System_Started)MOVE(10,HMI.Color);]]>
</Text>
</Rung>
<Rung Number="39" Type="N">
<Comment>
<![CDATA[Jam - Yellow (255.255.0)
]]>
</Comment>
<Text>
<![CDATA[[XIC(Jam_Fault) ,XIC(Encoder_Fault) ]MOVE(4,HMI.Color);]]>
</Text>
</Rung>
<Rung Number="40" Type="N">
<Comment>
<![CDATA[VFD Fault - Blue (0.0.255)
]]>
</Comment>
<Text>
<![CDATA[XIC(Motor_Fault)MOVE(2,HMI.Color);]]>
</Text>
</Rung>
<Rung Number="41" Type="N">
<Comment>
<![CDATA[EStopped - Red (255.0.0)
]]>
</Comment>
<Text>
<![CDATA[XIC(EStopped)MOVE(1,HMI.Color);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
<Routine Name="Prescan" Type="RLL">
<RLLContent>
<Rung Number="0" Type="N">
<Comment>
<![CDATA[Initiation Control tags]]>
</Comment>
<Text>
<![CDATA[NOP();]]>
</Text>
</Rung>
<Rung Number="1" Type="N">
<Text>
<![CDATA[FLL(0,CTRL,1)FLL(0,HMI.Alarm,1);]]>
</Text>
</Rung>
</RLLContent>
</Routine>
</Routines>
<Dependencies>
<Dependency Type="AddOnInstructionDefinition" Name="AOI_FLIP_FLOP"/>
<Dependency Type="DataType" Name="UDT_CTRL_MCM"/>
<Dependency Type="DataType" Name="UDT_HMI_MCM"/>
</Dependencies>
</AddOnInstructionDefinition>
</AddOnInstructionDefinitions>
</Controller>
</RSLogix5000Content>
