300 lines
11 KiB
XML
300 lines
11 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||
<!--JAM PHOTOEYE-->
|
||
<RSLogix5000Content SchemaRevision="1.0" SoftwareRevision="36.00" TargetName="AOI_JPE" TargetType="AddOnInstructionDefinition" TargetClass="Standard" TargetRevision="1.0 " TargetLastEdited="2025-07-11T10:57:37.803Z" ContainsContext="true" ExportDate="Fri Jul 11 16:00:54 2025" ExportOptions="NoRawData L5KData DecoratedData Context Dependencies ForceProtectedEncoding AllProjDocTrans">
|
||
<Controller Use="Context" Name="MCM04">
|
||
<AddOnInstructionDefinitions Use="Context">
|
||
<AddOnInstructionDefinition Use="Target" Name="AOI_JPE" Class="Standard" Revision="1.0" Vendor="Automation Standard" ExecutePrescan="true" ExecutePostscan="false" ExecuteEnableInFalse="false" CreatedDate="2011-11-21T15:20:02.584Z" CreatedBy="Not Available" EditedDate="2025-07-11T10:57:37.803Z"
|
||
EditedBy="LCIBATUMI\robert.yevdokimov" SoftwareRevision="v36.00">
|
||
<Description>
|
||
<![CDATA[JAM PHOTOEYE]]>
|
||
</Description>
|
||
<Parameters>
|
||
<Parameter Name="EnableIn" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only"/>
|
||
<Parameter Name="EnableOut" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read Only"/>
|
||
<Parameter Name="HMI" TagType="Base" DataType="UDT_HMI_PE" Usage="InOut" Required="true" Visible="true" Constant="false"/>
|
||
<Parameter Name="CTRL" TagType="Base" DataType="UDT_CTRL_PE" Usage="InOut" Required="true" Visible="true" Constant="false"/>
|
||
<Parameter Name="Conveyor" TagType="Base" DataType="UDT_CTRL_VFD" Usage="InOut" Required="true" Visible="true" Constant="false"/>
|
||
<Parameter Name="Station" TagType="Base" DataType="UDT_CTRL_STATION" Usage="InOut" Required="true" Visible="true" Constant="false"/>
|
||
<Parameter Name="Parent_Comm_Faulted" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
|
||
<Description>
|
||
<![CDATA[Communication Faulted To Perent (IO Block / VFD)]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
|
||
</DefaultData>
|
||
</Parameter>
|
||
<Parameter Name="Clear_I" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
|
||
<Description>
|
||
<![CDATA[PE Input]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
|
||
</DefaultData>
|
||
</Parameter>
|
||
<Parameter Name="Blocked" 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="Jammed" 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="Run_Up_PE" TagType="Base" DataType="BOOL" Usage="Input" Radix="Decimal" Required="true" Visible="true" ExternalAccess="Read/Write">
|
||
<Description>
|
||
<![CDATA[This PE is Discharge PE Of Conveyor]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
|
||
</DefaultData>
|
||
</Parameter>
|
||
<Parameter Name="Run_Up" TagType="Base" DataType="BOOL" Usage="Output" Radix="Decimal" Required="false" Visible="false" ExternalAccess="Read/Write">
|
||
<Description>
|
||
<![CDATA[When Upstream Conveyors are Stopped, Conveyor keeps running untill Discharge PE is Blocked]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
|
||
</DefaultData>
|
||
</Parameter>
|
||
<Parameter Name="Beacon_Light_O" TagType="Base" DataType="BOOL" Usage="InOut" Radix="Decimal" Required="true" Visible="true" Constant="false">
|
||
<Description>
|
||
<![CDATA[Amber Beacon Light Output]]>
|
||
</Description>
|
||
</Parameter>
|
||
</Parameters>
|
||
<LocalTags>
|
||
<LocalTag Name="Jam_Timer" DataType="TIMER" ExternalAccess="None">
|
||
<Description>
|
||
<![CDATA[After Jam Timer is Done Jam Fault is reported]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<Structure DataType="TIMER">
|
||
<DataValueMember Name="PRE" DataType="DINT" Radix="Decimal" Value="0"/>
|
||
<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="ONS" DataType="BOOL" Radix="Decimal" ExternalAccess="None">
|
||
<Description>
|
||
<![CDATA[One Shot Instruction to skip Beacon Flashing Logic and Unlatch the Beacon Light when Jam is cleared]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<DataValue DataType="BOOL" Radix="Decimal" Value="0"/>
|
||
</DefaultData>
|
||
</LocalTag>
|
||
<LocalTag Name="Flip_Flop" DataType="AOI_FLIP_FLOP" ExternalAccess="None">
|
||
<Description>
|
||
<![CDATA[Beacon Flip Flop]]>
|
||
</Description>
|
||
<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="Concatenated_String" DataType="STRING" ExternalAccess="None">
|
||
<Description>
|
||
<![CDATA[String for Log]]>
|
||
</Description>
|
||
<DefaultData Format="String" Length="0">
|
||
<![CDATA['']]>
|
||
</DefaultData>
|
||
</LocalTag>
|
||
<LocalTag Name="Jam_String" DataType="STRING" ExternalAccess="None">
|
||
<Description>
|
||
<![CDATA[Jam String]]>
|
||
</Description>
|
||
<DefaultData Format="String" Length="4">
|
||
<![CDATA[' Jam']]>
|
||
</DefaultData>
|
||
</LocalTag>
|
||
<LocalTag Name="Full_Timer" DataType="TIMER" ExternalAccess="None">
|
||
<Description>
|
||
<![CDATA[After Full
|
||
Timer is Done Full
|
||
Fault is reported]]>
|
||
</Description>
|
||
<DefaultData Format="Decorated">
|
||
<Structure DataType="TIMER">
|
||
<DataValueMember Name="PRE" DataType="DINT" Radix="Decimal" Value="0"/>
|
||
<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="Name" DataType="STRING" ExternalAccess="None">
|
||
<DefaultData Format="String" Length="0">
|
||
<![CDATA['']]>
|
||
</DefaultData>
|
||
</LocalTag>
|
||
</LocalTags>
|
||
<Routines>
|
||
<Routine Name="Logic" Type="RLL">
|
||
<RLLContent>
|
||
<Rung Number="0" Type="N">
|
||
<Comment>
|
||
<![CDATA[Jam-Photo Eye – Blockage Detection & Run-Up Control
|
||
|
||
Blocked turns on whenever the beam is broken (input Clear_I false) and parent communications are healthy; the state is mirrored to CTRL.STS.Blocked.
|
||
|
||
While the conveyor is running (and not in maintenance), a timer whose preset is HMI.TimeOut 1000 ms starts when Blocked goes true.
|
||
If the timer finishes, the bit Jammed latches, signalling that a Jam condition exists.
|
||
|
||
A rising edge of Station.STS.Jam_Reset clears Jammed—provided the beam is now clear—and extinguishes the lamp and beacon.
|
||
|
||
Beacon behaviour
|
||
|
||
First scan of a Jam forces the lamp off so the flash sequence begins dark.
|
||
|
||
While the beam remains blocked, a 0.5 s flip-flop flashes the beacon.
|
||
|
||
Once the beam clears (but before the reset arrives) the beacon stays solid on.
|
||
|
||
When the Jam is cleared the beacon turns off.
|
||
|
||
Logging
|
||
On the first scan of each Jam the AOI writes “<Device HMI.Name> JAM” into both Conveyor.CMD.Log and Station.CMD.Log and increments each log’s quantity.
|
||
The entry self-clears when the same text appears in MCM.STS.Acknowledge_Log; MCM Unacknowledge All Logs re-arms the latch so a repeat Jam is re-logged.
|
||
|
||
Run-up enable
|
||
If the downstream photo-eye (Run_Up_PE) is clear and the conveyor interlock is on, the bit Run_Up latches and the AOI asserts Conveyor.CMD.Run_Up_Enabled so the upstream conveyor can empty itself.
|
||
Run Up unlatches if the eye blocks again or the Jam re-appears.
|
||
|
||
Command bits (received)
|
||
CTRL.CMD.Jammed
|
||
CTRL.CMD.Sorter_JPE_Blocked (Run_Up_PE)
|
||
Conveyor.STS.Running
|
||
Conveyor.STS.Maintenance_Mode
|
||
Conveyor.STS.Interlock
|
||
Conveyor.STS.MCM_Started
|
||
Parent_Comm_Faulted
|
||
Station.STS.Jam_Reset
|
||
HMI.TimeOut
|
||
MCM.STS.Unacknowledge_All_Logs
|
||
MCM.STS.Acknowledge_Log
|
||
|
||
Status bits (set)
|
||
CTRL.STS.Blocked
|
||
CTRL.STS.Jammed
|
||
Conveyor.CMD.Jammed
|
||
Station.CMD.Jammed
|
||
Conveyor.CMD.Run_Up_Enabled
|
||
Beacon_Light_O (flash/solid/off)
|
||
|
||
HMI bits
|
||
HMI.TimeOut (seconds before a block becomes a Jam)
|
||
HMI.STATE is not used; the HMI shows live beacon and alarm indicators.
|
||
HMI.Alarm.Jammed is set while Jammed is true.
|
||
|
||
Alarm bits
|
||
HMI.Alarm.Jammed – asserted whenever Jammed is latched.
|
||
]]>
|
||
</Comment>
|
||
<Text>
|
||
<![CDATA[MUL(HMI.TimeOut,1000,Jam_Timer.PRE);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="1" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Station.STS.Jam_Reset)XIC(Jammed)XIO(Blocked)OTU(Jammed);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="2" Type="N">
|
||
<Text>
|
||
<![CDATA[XIO(Clear_I)XIO(Parent_Comm_Faulted)[OTE(Blocked) ,OTE(CTRL.STS.Blocked) ];]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="3" Type="N">
|
||
<Text>
|
||
<![CDATA[XIO(Conveyor.STS.Maintenance_Mode)[XIC(Blocked) [XIC(Conveyor.STS.Running) ,XIC(Jam_Timer.DN) ] TON(Jam_Timer,?,?) ,XIC(Jam_Timer.DN) OTL(Jammed) ];]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="4" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Jammed)[OTL(Conveyor.CMD.Jammed) ,OTL(Station.CMD.Jammed) ,OTE(CTRL.STS.Jammed) ];]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="5" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Jammed)[MOVE(' JAM',Jam_String) CONCAT(HMI.Name,Concatenated_String,Conveyor.CMD.Log) ,MOVE(' JAM',Concatenated_String) CONCAT(HMI.Name,Concatenated_String,Station.CMD.Log) ];]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="6" Type="N">
|
||
<Text>
|
||
<![CDATA[XIO(Jammed)[ONS(ONS) OTU(Beacon_Light_O) ,JMP(JMP) ];]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="7" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Conveyor.STS.MCM_Started)XIC(Jammed)[XIC(Blocked) AOI_FLIP_FLOP(Flip_Flop,500,500) ,XIO(Blocked) ]OTE(Beacon_Light_O);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="8" Type="N">
|
||
<Text>
|
||
<![CDATA[LBL(JMP)NOP();]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="9" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Run_Up_PE)XIC(Conveyor.STS.Interlock)OTL(Run_Up);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="10" Type="N">
|
||
<Text>
|
||
<![CDATA[[XIC(Blocked) ,XIO(Run_Up_PE) ]OTU(Run_Up);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="11" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Run_Up)OTL(Conveyor.CMD.Run_Up_Enabled);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="12" Type="N">
|
||
<Text>
|
||
<![CDATA[XIC(Jammed)OTE(HMI.Alarm.Jammed);]]>
|
||
</Text>
|
||
</Rung>
|
||
</RLLContent>
|
||
</Routine>
|
||
<Routine Name="Prescan" Type="RLL">
|
||
<RLLContent>
|
||
<Rung Number="0" Type="N">
|
||
<Text>
|
||
<![CDATA[NOP();]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="1" Type="N">
|
||
<Text>
|
||
<![CDATA[FLL(0,CTRL,1)FLL(5,HMI.TimeOut,1);]]>
|
||
</Text>
|
||
</Rung>
|
||
<Rung Number="2" Type="N">
|
||
<Text>
|
||
<![CDATA[OTU(HMI.Alarm.Jammed)OTU(Jammed);]]>
|
||
</Text>
|
||
</Rung>
|
||
</RLLContent>
|
||
</Routine>
|
||
</Routines>
|
||
<Dependencies>
|
||
<Dependency Type="DataType" Name="UDT_CTRL_VFD"/>
|
||
<Dependency Type="DataType" Name="UDT_CTRL_PE"/>
|
||
<Dependency Type="AddOnInstructionDefinition" Name="AOI_FLIP_FLOP"/>
|
||
<Dependency Type="DataType" Name="UDT_HMI_PE"/>
|
||
<Dependency Type="DataType" Name="UDT_CTRL_STATION"/>
|
||
</Dependencies>
|
||
</AddOnInstructionDefinition>
|
||
</AddOnInstructionDefinitions>
|
||
</Controller>
|
||
</RSLogix5000Content>
|