Commit 97c22ba4 LN

增加夹爪检测信号兼容逻辑

1 个父辈 1db45a77
......@@ -1166,7 +1166,7 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
else if (move.MoveInfo.MoveStep.Equals(LineMoveStep.MO_56_CylinderAfter) && move.MoveInfo.IsInWait.Equals(false)
else if (move.MoveInfo.MoveStep.Equals(LineMoveStep.MO_57_CylinderAfter) && move.MoveInfo.IsInWait.Equals(false)
&&move.CylinderIsOk(IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After))
{
return true;
......
......@@ -17,13 +17,14 @@ namespace OnlineStore.DeviceLibrary
{
public MoveEquip_Config Config;
private bool ClampNeedCheck=false;
public MoveEquip(string cid, MoveEquip_Config config)
{
this.DeviceID = config.Id;
this.Config = config;
baseConfig = config;
IsDebug = config.IsDebug.Equals(1);
Name = (" " + "_进仓_" + DeviceID.ToString().PadLeft(2, '0') + " ").ToUpper();
Name = (" " + "进仓_" + DeviceID.ToString().PadLeft(2, '0') + " ").ToUpper();
Init();
......@@ -44,6 +45,8 @@ namespace OnlineStore.DeviceLibrary
Config.UpDown_Axis.ServerOnDO = IO_Type.UpDownAxis_ServoOn;
Config.UpDown_Axis.BreakOnDO = IO_Type.UpDownAxis_BreakOn;
}
ClampNeedCheck = config.DIList.ContainsKey(IO_Type.ClampCylinder_Check);
UpdownAxis = new AxisBean(config.UpDown_Axis, Name);
}
......@@ -95,8 +98,7 @@ namespace OnlineStore.DeviceLibrary
ResetClearData();
lineStatus = LineStatus.ResetMove;
//移载装置原点状态:顶升气缸下降端,前后气缸后退端,上下气缸上升端,夹料气缸放松端,阻挡气缸输入=0
UpdownHomeMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownHomeMove();
if (IsDebug)
{
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
......@@ -121,12 +123,7 @@ namespace OnlineStore.DeviceLibrary
CheckWait(SecondMoveInfo);
}
if (!MoveInfo.IsInWait && !SecondMoveInfo.IsInWait)
{
//流水线各装置复原位,夹料气缸状态不变
//阻挡气缸全部=0
//上下气缸上升,、
//上升到位,顶升气缸下降,前后气缸回退
//复位时夹紧气缸需要发送,不然后面出入库会有问题
{
switch (MoveInfo.MoveStep)
{
case LineMoveStep.MH_UpDownHome:
......@@ -145,25 +142,40 @@ namespace OnlineStore.DeviceLibrary
break;
case LineMoveStep.MH_OtherCylinderBack:
LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
if (IsDebug)
if (ClampNeedCheck && IOValue(IO_Type.ClampCylinder_Check).Equals(IO_VALUE.HIGH))
{
lineStatus = LineStatus.Debugging;
MoveInfo.NextMoveStep(LineMoveStep.MH_ClampCheck);
LogInfo(MoveInfo.MoveType + " : 等待夹爪无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Check, IO_VALUE.LOW));
}
else
{
lineStatus = LineStatus.StoreOnline;
ResetEnd();
}
break;
case LineMoveStep.MH_ClampCheck:
ResetEnd();
break;
default: break;
}
}
}
private void ResetEnd()
{
LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
}
/// <summary>
/// 停止运动
/// </summary>
......
......@@ -187,41 +187,54 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
MH_OtherCylinderBack = 2002,
/// <summary>
/// 料仓移载装置,等待夹爪无料
/// </summary>
MH_ClampCheck = 2003,
#endregion
#region 移载装置入库处理 3000-3050
#region 移载装置入库处理 3000-3050
/// <summary>
///移载装置入库处理,横移气缸到流水线上方
///移载装置入库处理,升降气缸上升
/// </summary>
MI_05_ToLineUp = 3005,
MI_01_UpdownUp = 3001,
/// <summary>
///移载装置入库处理,横移气缸后退
/// </summary>
MI_02_ToLineUp ,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降
/// </summary>
MI_06_CylinderDown = 3006,
MI_03_CylinderDown,
/// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降后,等待0.3秒,防止没有 下降到位就夹紧
/// </summary>
MI_07_DownWait = 3007,
MI_04_DownWait,
/// <summary>
///移载装置入库处理,夹料气缸1夹紧
/// </summary>
MI_08_CylinderOpen = 3008,
MI_05_CylinderOpen,
/// <summary>
///移载装置入库处理,上下气缸1上升
/// </summary>
MI_09_CylinderUp = 3009,
MI_06_CylinderUp,
/// <summary>
///移载装置入库处理,,前后气缸1前进
///移载装置入库处理,等待夹爪有料
/// </summary>
MI_10_CylinderBefore = 3010,
MI_07_ClampCheck,
/// <summary>
/// 移载装置入库处理,等待box等待状态才能继续操作
/// </summary>
MI_10_WaitBox = 3030,
MI_08_WaitBox,
/// <summary>
///移载装置入库处理,,前后气缸1前进
/// </summary>
MI_09_CylinderBefore,
/// <summary>
///移载装置入库处理,上下气缸1下降
/// </summary>
......@@ -246,22 +259,7 @@ namespace OnlineStore.DeviceLibrary
///移载装置入库处理,检测到X102-1=1送料流程完成
/// </summary>
MI_16_SendEnd = 3016,
/// <summary>
///移载装置入库处理,编码不一致,顶升气缸1下降
/// </summary>
MI_20_TopDown = 3020,
/// <summary>
///移载装置入库处理,阻挡气缸1-2下降
/// </summary>
MI_21_StopDown = 3021,
/// <summary>
///移载装置入库处理,检测Check4=0,
/// </summary>
MI_22_FixtureCheck_Low = 3022,
/// <summary>
///移载装置入库处理,,,阻挡气缸1-2 上升,等待200毫秒
/// </summary>
MI_23_StopCylinderReset = 3023,
#endregion
......@@ -354,48 +352,53 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 移栽装置出库处理。。前后气缸1前进
/// </summary>
MO_51_CylinderBefore = 3151,
MO_51_CylinderBefore,
/// <summary>
/// 移栽装置出库处理。上下气缸1下降
/// </summary>
MO_52_CylinderDown = 3152,
MO_52_CylinderDown,
/// <summary>
/// 移栽装置出库处理。上下气缸1下降后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作
/// </summary>
MO_53_DownWait = 3153,
MO_53_DownWait,
/// <summary>
/// 移栽装置出库处理。 夹料气缸1夹紧
/// </summary>
MO_54_CylinderOpen = 3154,
MO_54_CylinderOpen,
/// <summary>
/// 移栽装置出库处理。 上下气缸1上升
/// </summary>
MO_55_CylinderUp = 3155,
MO_55_CylinderUp,
/// <summary>
/// 移栽装置出库处理。 检测夹爪有料
/// </summary>
MO_56_ClarmpCheck,
/// <summary>
/// 移栽装置出库处理。 前后气缸1后退
/// </summary>
MO_56_CylinderAfter = 3156,
MO_57_CylinderAfter,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1下降
/// </summary>
MO_58_CylinderDown = 3158,
MO_58_CylinderDown,
/// <summary>
/// 移载(流水线)装置出库处理,夹料气缸1放松
/// </summary>
MO_59_CylinderRelax = 3159,
MO_59_CylinderRelax,
/// <summary>
/// 移载(流水线)装置出库处理,上下气缸1上升
/// </summary>
MO_60_CylinderUp = 3160,
MO_60_CylinderUp ,
#region 入料模块,紧急出料移栽处理
/// <summary>
/// 等待当前的出入库结束
/// </summary>
MO_200_WaitInoutParam=3200,
MO_200_WaitInoutParam =3200,
/// <summary>
/// 等待紧急出料结束
/// </summary>
......@@ -981,9 +984,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
PO_01_CylinderDown = 20001,
/// <summary>
/// 等待0.3秒后再夹紧
/// 顶升气缸上升
/// </summary>
PO_02_DownWait = 20002,
PO_02_TopUP = 20002,
/// <summary>
/// 夹料气缸夹紧
/// </summary>
......
......@@ -690,6 +690,11 @@ namespace OnlineStore.LoadCSVLibrary
public static string DLine_Brush2 = "DLine_Brush2";
/// <summary>
/// DI,19,进仓19夹料夹紧料盘检测,ClampCylinder_Check,6,PRO_AOI_IP_37,0,进仓19夹料夹紧料盘检测,X577,X577
/// </summary>
public static string ClampCylinder_Check = "ClampCylinder_Check";
#region 20200715 新增分流横移装置
/// <summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!