Commit 0918f3ac LN

1

1 个父辈 82e759d4
......@@ -71,6 +71,7 @@
<Compile Include="assemblyLine\FeedingEquip_OutStore.cs" />
<Compile Include="assemblyLine\HY\HYEquipBase.cs" />
<Compile Include="assemblyLine\HY\HY_C1_SLStation.cs" />
<Compile Include="assemblyLine\HY\HY_Coveryor.cs" />
<Compile Include="assemblyLine\HY\HY_Coveryor_Partial.cs" />
<Compile Include="assemblymanager\ALineManager.cs" />
<Compile Include="assemblyLine\FeedingEquip_InStore.cs" />
......@@ -97,7 +98,6 @@
<Compile Include="deviceLibrary\AXIS\PanasonicServo\ACServerManager.cs" />
<Compile Include="deviceLibrary\AXIS\PanasonicServo\ACServerManager_Partial.cs" />
<Compile Include="assemblyLine\EquipBase.cs" />
<Compile Include="assemblyLine\HY\HY_Coveryor.cs" />
<Compile Include="model\LineAlarm.cs">
<SubType>Code</SubType>
</Compile>
......
......@@ -656,18 +656,27 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(Name + " " + posId + msg);
}
}
protected void OutLog(string msg)
/// <summary>
///
/// </summary>
/// <param name="msg"></param>
/// <param name="levle">-1是默认值,0时打印debug,1打印info</param>
protected void OutLog(string msg, int levle = -1)
{
string posId = MoveInfo.MoveParam != null ? "["+currTrayNum+"][" + MoveInfo.MoveParam.PosId + "][" + MoveInfo.MoveParam.WareCode + "]" : "";
//baseConfig.DType.Equals(DeviceType.HYEquip)
if (baseConfig.DType.Equals(DeviceType.MoveEquip))
string posId = MoveInfo.MoveParam != null ? "[" + currTrayNum + "][" + MoveInfo.MoveParam.PosId + "][" + MoveInfo.MoveParam.WareCode + "]" : "";
if (levle.Equals(-1) && baseConfig.DType.Equals(DeviceType.MoveEquip))
{
LogUtil.debug(Name + " " + posId + msg);
levle = 0;
}
else
if (levle.Equals(1))
{
LogUtil.info(Name + " " + posId + msg);
}
else if (levle.Equals(0))
{
LogUtil.debug(Name + " " + posId + msg);
}
}
public virtual string GetMoveStr()
......
......@@ -307,11 +307,11 @@ namespace OnlineStore.DeviceLibrary
//前进后退气缸后退以后才可以出库
else if (move.runStatus.Equals(LineRunStatus.Busy) && move.MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
if (move.MoveInfo.MoveStep >= (LineMoveStep.MO_58_CylinderDown))
if (move.MoveInfo.MoveStep >= (LineMoveStep.MO_60_CylinderDown))
{
return true;
}
else if (move.MoveInfo.IsStep(LineMoveStep.MO_57_CylinderAfter) && move.MoveInfo.IsInWait.Equals(false)
else if (move.MoveInfo.IsStep(LineMoveStep.MO_59_CylinderAfter) && move.MoveInfo.IsInWait.Equals(false)
&& move.CylinderIsOk(IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After))
{
return true;
......
......@@ -15,6 +15,7 @@ namespace OnlineStore.DeviceLibrary
{
#region 出库
private int ClampCount = 0;
public override bool StartOutStoreMove(InOutParam param)
{
string posId = param != null ? param.PosId : "";
......@@ -76,6 +77,8 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.IsStep(LineMoveStep.MO_51_CylinderBefore))
{
//重置夹料次数=0
ClampCount = 0;
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before))
{
MoveInfo.NextMoveStep(LineMoveStep.MO_52_CylinderDown);
......@@ -115,22 +118,43 @@ namespace OnlineStore.DeviceLibrary
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
else if (MoveInfo.IsStep(LineMoveStep.MO_56_ResetClamp))
{
MoveInfo.NextMoveStep(LineMoveStep.MO_52_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸下降 ");
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
}
else if (MoveInfo.IsStep(LineMoveStep.MO_55_CylinderUp))
{
MoveInfo.NextMoveStep(LineMoveStep.MO_56_ClampCheck);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH));
MoveInfo.NextMoveStep(LineMoveStep.MO_57_ClampCheck);
if (ClampCount.Equals(0))
{
OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH,超时1000");
MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH));
}
else
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
OutLog("出库 " + MoveInfo.SLog + ": 检测夹爪料盘检测=HIGH");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.HIGH));
}
}
else if (MoveInfo.IsStep(LineMoveStep.MO_56_ClampCheck))
else if (MoveInfo.IsStep(LineMoveStep.MO_57_ClampCheck))
{
if (UpdownIsUp())
{
if (IsBigStore())
if (IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH))
{
if (TrayIsOk())
if (IsBigStore())
{
MoveInfo.NextMoveStep(LineMoveStep.MO_58_WaitTray);
OutLog("出库 " + MoveInfo.SLog + ": 等待托盘到达");
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MO_57_CylinderAfter);
MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderAfter);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
OutLog("出库 " + MoveInfo.SLog + ": 前后气缸后退");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
......@@ -138,10 +162,10 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.MO_57_CylinderAfter);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
OutLog("出库 " + MoveInfo.SLog + ": 前后气缸后退");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.NextMoveStep(LineMoveStep.MO_56_ResetClamp);
ClampCount = 1;
OutLog("出库 " + MoveInfo.SLog + ": 第一次未抓到料,重新抓一次,夹爪先放松", 1);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
}
}
else
......@@ -151,10 +175,20 @@ namespace OnlineStore.DeviceLibrary
UpdownUpMove();
}
}
else if (MoveInfo.IsStep(LineMoveStep.MO_58_WaitTray))
{
if (TrayIsOk())
{
MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderAfter);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
OutLog("出库 " + MoveInfo.SLog + ": 前后气缸后退");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
}
}
#endregion
#region 移载装置,放物品到流水线操作
else if (MoveInfo.IsStep(LineMoveStep.MO_57_CylinderAfter))
else if (MoveInfo.IsStep(LineMoveStep.MO_59_CylinderAfter))
{
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After))
{
......@@ -162,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
{
int trayNum = SecondMoveInfo.MoveParam.TrayNumber;
//去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_CylinderDown);
MoveInfo.NextMoveStep(LineMoveStep.MO_60_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 夹具检测编码完成, 上下气缸下降 ,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INLINE】【" + trayNum + "】,顶升气缸上升");
if (MoveInfo.MoveParam != null)
{
......@@ -180,25 +214,25 @@ namespace OnlineStore.DeviceLibrary
}
}
}
else if (MoveInfo.IsStep(LineMoveStep.MO_58_CylinderDown))
else if (MoveInfo.IsStep(LineMoveStep.MO_60_CylinderDown))
{
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】");
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam.Clone());
TrayInfo tray = TrayManager.GetTrayInfo(MoveInfo.MoveParam.TrayNumber);
LogInfo("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘信息 " +tray.ToStr()+ "");
LogInfo("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘信息 " + tray.ToStr() + "");
//出库全部完成
MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax);
MoveInfo.NextMoveStep(LineMoveStep.MO_61_CylinderRelax);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
}
else if (MoveInfo.IsStep(LineMoveStep.MO_59_CylinderRelax))
else if (MoveInfo.IsStep(LineMoveStep.MO_61_CylinderRelax))
{
this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_CylinderUp);
this.MoveInfo.NextMoveStep(LineMoveStep.MO_62_CylinderUp);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升,同时顶升气缸先下降");
UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
}
else if (MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp))
else if (MoveInfo.IsStep(LineMoveStep.MO_62_CylinderUp))
{
// 减去需要的盘数
// TrayManager.DelNeedEmptyTrayNum();
......@@ -494,9 +528,9 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_56_ClampCheck && MoveInfo.IsInWait.Equals(false)) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter;
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_58_WaitTray) || MoveInfo.MoveStep >= LineMoveStep.MO_59_CylinderAfter;
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk
&& (!MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp)))
&& (!MoveInfo.IsStep(LineMoveStep.MO_62_CylinderUp)))
{
if (isFull.Equals(false))
{
......@@ -513,19 +547,15 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
if (OnlyProOutTray)
{
return false;
}
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_56_ClampCheck && MoveInfo.IsInWait.Equals(false)) || MoveInfo.MoveStep >= LineMoveStep.MO_57_CylinderAfter;
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_58_WaitTray) || MoveInfo.MoveStep >= LineMoveStep.MO_59_CylinderAfter;
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk
&& (!MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp)))
&& (!MoveInfo.IsStep(LineMoveStep.MO_62_CylinderUp)))
{
return true;
}
return false;
}
private bool ChekcIsNeedMoveReel()
{
......
......@@ -327,26 +327,34 @@ namespace OnlineStore.DeviceLibrary
MO_55_CylinderUp,
/// <summary>
/// 移栽装置出库处理。 夹料气缸检测
/// 移栽出库:开始重抓一次
/// </summary>
MO_56_ClampCheck,
MO_56_ResetClamp,
/// <summary>
/// 移栽出库。 夹料气缸检测
/// </summary>
MO_57_ClampCheck,
/// <summary>
/// 移栽出库:开始等待托盘
/// </summary>
MO_58_WaitTray,
/// <summary>
/// 移栽装置出库处理。 前后气缸1后退
/// </summary>
MO_57_CylinderAfter,
MO_59_CylinderAfter,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1下降
/// </summary>
MO_58_CylinderDown,
MO_60_CylinderDown,
/// <summary>
/// 移载(流水线)装置出库处理,夹料气缸1放松
/// </summary>
MO_59_CylinderRelax,
MO_61_CylinderRelax,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1上升
/// </summary>
MO_60_CylinderUp,
MO_62_CylinderUp,
#region 入料模块,紧急出料移栽处理
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!