Wenn ich nach Backup_Outfeed_1_CTU.Q suche, dann findet er nichts.
Bei TransportSystem.Outfeed_1_Backup_Cnt findet er 5 Übereinstimmungen.
Die ersten 4 Übereinstimmungen sind alle in einem Baustein.
// Automatik operation.
if (GlobalState.MachineType==540) {
TransportSystem.MachineTargetVelocity=GetRelativeVelocityFromRegisterValue(AI_TargetVelocity)*TransportSystem.AutoVelocity*(TP_Backup_Outfeed_1.Q?0.80f:1.00f);
} else {
TransportSystem.MachineTargetVelocity=TransportSystem.AutoVelocity*(TP_Backup_Outfeed_1.Q?0.80f:1.00f);
}
if (TransportSystem.AutoRequest) {
if (GlobalState.MachineType==540) {
SplitStarwheelDrive.AO_Velocity=GetRegisterValueFromRelativeVelocity(TransportSystem.MachineTargetVelocity);
// Control infeed bottle stream.
// Gap at the bottle present sensor -> machine stop and error message.
if (!BottleDetection.DI_BottlePresent_Infeed) {
SetMessage(25,1);
}
// Gap at the bottle backup sensor -> machine halt and warning message.
if (!BottleDetection.DI_Backup_Infeed) {
// Gap in bottle stream at infeed -> make machine halt.
SplitStarwheelDrive.DO_Enable_Bottom=0;
SetMessage(202,1);
} else if (!Peripheral.DI_ExternalEnable) {
// External enable missing -> make machine halt.
SplitStarwheelDrive.DO_Enable_Bottom=0;
SetMessage(203,1);
} else if (TransportSystem.Outfeed_1_Backup_Cnt>3) {
// Backup on production outfeed conveyor -> make machine halt.
SplitStarwheelDrive.DO_Enable_Bottom=0;
SetMessage(204,1);
} else {
// Regular automatic operation.
SplitStarwheelDrive.DO_Enable_Bottom=1;
SetMessage(202,0);
SetMessage(203,0);
SetMessage(204,0);
}
} else if (GlobalState.MachineType==550) {
// Control infeed bottle stream.
Peripheral.DI_ExternalEnable=1;
// Gap at the bottle backup sensor -> machine halt and warning message.
/*if (!BottleDetection.DI_Backup_Infeed) {
// Gap in bottle stream at infeed -> make machine halt.
LinosBeltDrive.EnableMovement=0;
SetMessage(202,1);
} else */if (!Peripheral.DI_ExternalEnable) {
// External enable missing -> make machine halt.
LinosBeltDrive.EnableMovement=0;
SetMessage(203,1);
} else if (TransportSystem.Outfeed_1_Backup_Cnt>40) {
// Backup on production outfeed conveyor -> make machine halt.
LinosBeltDrive.EnableMovement=0;
Peripheral.PausedWithAutoRestart=1;
SetMessage(204,1);
} else {
// Regular automatic operation.
LinosBeltDrive.EnableMovement=1;
SetMessage(202,0);
SetMessage(203,0);
SetMessage(204,0);
}
}
} else {
if (GlobalState.MachineType==540) {
SplitStarwheelDrive.DO_Enable_Bottom=0;
} else if (GlobalState.MachineType==550) {
LinosBeltDrive.EnableMovement=0;
}
TransportState=1000;
}
}
//----------------------------------------------------------------------------
// Compute actual values.
if (GlobalState.MachineType==540) {
TransportSystem.MachineActualPositionInc=SplitStarwheelDrive.DC_Position_Bottom-DC_PosAtRef_Bottom;
// Measure difference of top and bottom drive.
if (PrevPosInc_Bottom>16000 && SplitStarwheelDrive.DC_Position_Bottom<-16000) {
EncCycle_Bottom++;
} else if (PrevPosInc_Bottom<-16000 && SplitStarwheelDrive.DC_Position_Bottom>16000) {
EncCycle_Bottom--;
}
PrevPosInc_Bottom=SplitStarwheelDrive.DC_Position_Bottom;
if (PrevPosInc_Top>16000 && SplitStarwheelDrive.DC_Position_Top<-16000) {
EncCycle_Top++;
} else if (PrevPosInc_Top<-16000 && SplitStarwheelDrive.DC_Position_Top>16000) {
EncCycle_Top--;
}
PrevPosInc_Top=SplitStarwheelDrive.DC_Position_Top;
SplitStarwheelDrive.TopBottomDiffInc=(EncCycle_Top-EncCycle_Bottom)*0x10000+((SplitStarwheelDrive.DC_Position_Top-DC_PosAtRef_Top)-(SplitStarwheelDrive.DC_Position_Bottom-DC_PosAtRef_Bottom));
SplitStarwheelDrive.TopBottomDiffMm=(SplitStarwheelDrive.TopBottomDiffInc*TrackingParams.CycleLength)/((float)0x10000);
} else if (GlobalState.MachineType==550) {
TransportSystem.MachineActualPositionInc=LinosBeltDrive.DC_PositionL;
}
//----------------------------------------------------------------------------
// Conveyor outfeed 1.
TP_Backup_Outfeed_1.IN=(TransportSystem.Outfeed_1_Backup_Cnt>1);
TP(&TP_Backup_Outfeed_1);
if (GlobalState.MachineType==540) {
TOF_Conveyor_Outfeed_1.PT=(DINT)(1000*TransportSystem.Conveyor_Outfeed_1_OffDelay);
TOF_Conveyor_Outfeed_1.IN=SplitStarwheelDrive.DO_Enable_Bottom;
TOF(&TOF_Conveyor_Outfeed_1);
DO_Conveyor_Outfeed_1_Enable=TOF_Conveyor_Outfeed_1.Q;
AO_Conveyor_Outfeed_1_Velocity=GetRegisterValueFromRelativeVelocity(MIN(1.0,TransportSystem.MachineTargetVelocity*TransportSystem.Conveyor_Outfeed_1_GearFactor));
}
//----------------------------------------------------------------------------
// Conveyor outfeed 2.
TOF_Conveyor_Outfeed_2.PT=(DINT)(1000*TransportSystem.Conveyor_Outfeed_2_OffDelay);
if (GlobalState.MachineType==540) {
TOF_Conveyor_Outfeed_2.IN=SplitStarwheelDrive.DO_Enable_Bottom;
} else if (GlobalState.MachineType==550) {
TOF_Conveyor_Outfeed_2.IN=LinosBeltDrive.EnableMovement;
}
TOF(&TOF_Conveyor_Outfeed_2);
DO_Conveyor_Outfeed_2_Enable=TOF_Conveyor_Outfeed_2.Q;
AO_Conveyor_Outfeed_2_Velocity=GetRegisterValueFromRelativeVelocity(MIN(1.0,TransportSystem.MachineTargetVelocity*TransportSystem.Conveyor_Outfeed_2_GearFactor));
//----------------------------------------------------------------------------
// Enable preceding machine and conveyor.
if (GlobalState.MachineType==550) {
TON_DO_ExternalEnable.IN=LinosBeltDrive.EnableMovement;
TON(&TON_DO_ExternalEnable);
Peripheral.DO_ExternalEnable=TON_DO_ExternalEnable.Q && ((TransportSystem.AutoRequest && TransportSystem.Outfeed_1_Backup_Cnt<3));
}
//----------------------------------------------------------------------------