Commit 591be05b 张东亮

修改产线名前缀为MP

1 个父辈 0701d40a
......@@ -197,7 +197,7 @@ namespace OnlineStore.DeviceLibrary
}
WarnMsg = Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]等待 " + NotOkMsg
+ "超时[" + FormUtil.GetSpanStr(span ) + "] ";
+ "超时[" + FormUtil.GetSpanStr(span) + "] ";
int second = 10;
second = (int)(MoveInfo.TimeOutSeconds / span.TotalSeconds) * 10;
if (second > 120)
......@@ -348,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
}
private void GetPosId()
private void GetPosId()
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_30_SetInstoreParam);
InOutStoreLog("不扫码 " + MoveInfo.SLog + ": 获取库位号");
......@@ -369,7 +369,7 @@ namespace OnlineStore.DeviceLibrary
}
private void StartMoveToBag()
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_51_MoveToBag);
MoveInfo.NextMoveStep(StoreMoveStep.BI_51_MoveToBag);
InOutStoreLog("入库 " + MoveInfo.SLog + ":到库位点,旋转轴至P2( 库位点)轴2(上下) 至P3(库位入库前点)");
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
......@@ -450,7 +450,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_11_InoutToP1))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_12_MoveToShelf);
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":升降轴到P101低点["+ moveP.UpDown_LP101 + "],旋转轴到P101点["+ moveP.Middle_P101 + "],压紧轴到压紧前点p3["+ Config.CompAxis_Max_P3 + "]");
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":升降轴到P101低点[" + moveP.UpDown_LP101 + "],旋转轴到P101点[" + moveP.Middle_P101 + "],压紧轴到压紧前点p3[" + Config.CompAxis_Max_P3 + "]");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed);
ACAxisMove(Config.Comp_Axis, Config.CompAxis_Max_P3, Config.CompAxis_P3_Speed);
......@@ -458,7 +458,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_12_MoveToShelf))
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_13_InoutToP101);
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":叉子前进到P101点["+ moveP.InOut_P101 + "]",true);
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":叉子前进到P101点[" + moveP.InOut_P101 + "]", true);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_13_InoutToP101))
......@@ -513,7 +513,7 @@ namespace OnlineStore.DeviceLibrary
//单盘入库,不需要扫码
StartMoveToBag();
}
else if(MoveInfo.IsShelfLocked && !IsScanCodeWithLockedShelf)
else if (MoveInfo.IsShelfLocked && !IsScanCodeWithLockedShelf)
{
//该料架已锁定库位,不需要扫码,直接查询服务器
GetPosId();
......@@ -521,7 +521,7 @@ namespace OnlineStore.DeviceLibrary
else
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_21_ToScanPosition);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴到P2,旋转轴到P1",true );
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴到P2,旋转轴到P1", true);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
......@@ -694,7 +694,7 @@ namespace OnlineStore.DeviceLibrary
{
TimeSpan span = DateTime.Now - startInStoreTime;
storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NextMoveStep(StoreMoveStep.BI_10_StartGetTray);
MoveInfo.NextMoveStep(StoreMoveStep.BI_10_StartGetTray);
InOutStoreLog("料架入库 " + MoveInfo.SLog + ":上一盘入库结束, 耗时【" + FormUtil.GetSpanStr(span) + "】,旋转轴返回待机点,继续循环料架取料盘");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
......@@ -823,7 +823,7 @@ namespace OnlineStore.DeviceLibrary
private System.Timers.Timer axisCheckTimer = null;
private string TargetIoType = IO_Type.Compress_Check;
private IO_VALUE TargetIoValue = IO_VALUE.HIGH;
public bool ComAxisStartCheck(string targetIo = "", IO_VALUE value = IO_VALUE.HIGH)
public bool ComAxisStartCheck(string targetIo = "", IO_VALUE value = IO_VALUE.HIGH)
{
if (String.IsNullOrEmpty(targetIo))
{
......@@ -917,11 +917,47 @@ namespace OnlineStore.DeviceLibrary
InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
return true;
}
/// <summary>
/// 开始紧急料出库运动
/// </summary>
public bool StartUrgentOutStoreMove(InOutParam param)
{
startOutStoreTime = DateTime.Now;
string posId = param != null ? param.PosID : "";
if (isInSuddenDown || isNoAirCheck ||
(!storeRunStatus.Equals(StoreRunStatus.Runing))
|| (!MoveInfo.MoveType.Equals(StoreMoveType.None)))
{
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,忙碌或报警中 ,storeStatus:" + storeRunStatus + ",MoveType:" + MoveInfo.MoveType + ",isInSuddenDown:" + isInSuddenDown + ",isNoAirCheck:" + isNoAirCheck);
return false;
}
if (WaitShelfEnter)
{
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,WaitShelfEnter=true ,需要等待入库结束才能出库");
return false;
}
if (!StoreManager.LoadInoutParam(param, false, this))
{
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】出错,找不到库位信息");
return false;
}
taskData = null;
storeStatus = StoreStatus.OutStoreExecute;
storeRunStatus = StoreRunStatus.Busy;
MoveInfo.NewMove(StoreMoveType.OutStore, param);
LogInfo("启动紧急料出库【" + param.ToStr() + "】 ");
InOutStoreLog("紧急料出库 " + MoveInfo.SLog + ":进出轴到P1 开始");
InOutBackToP1(MoveInfo.MoveParam.MoveP.InOut_P1);
SO_03_ToBagPosition();
return true;
}
private void SO_03_ToBagPosition()
{
LineMoveP movep = MoveInfo.MoveParam.MoveP;
MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToPosition);
InOutStoreLog("出库 " + MoveInfo.SLog + ":走到库位,压紧轴至P3["+ movep.ComPress_P3 + "] ,旋转轴至P2["+ movep.Middle_P2 + "],升降轴至P5["+ movep.UpDown_P5 + "] ,顶升上升");
InOutStoreLog("出库 " + MoveInfo.SLog + ":走到库位,压紧轴至P3[" + movep.ComPress_P3 + "] ,旋转轴至P2[" + movep.Middle_P2 + "],升降轴至P5[" + movep.UpDown_P5 + "] ,顶升上升");
ACAxisMove(Config.Comp_Axis, movep.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, movep.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, movep.UpDown_P5, Config.UpDownAxis_P5_Speed);
......@@ -938,7 +974,54 @@ namespace OnlineStore.DeviceLibrary
{
return;
}
#region 把紧急料盘送到紧急料箱逻辑
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_15_ToUrgentDoor))
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_16_UrgentDoorUp);
InOutStoreLog("紧急料 " + MoveInfo.SLog + ":升降门上升", true);
CylinderMove(MoveInfo, IO_Type.NGDoorCylinder_Down, IO_Type.NGDoowCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_16_UrgentDoorUp))
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_17_InoutToUrgentDoor);
InOutStoreLog("紧急料 " + MoveInfo.SLog + ":进出轴到升降门口位置P11", true);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P11, Config.InOutAxis_P2_Speed);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_17_InoutToUrgentDoor))
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_18_UpdownDown);
InOutStoreLog("紧急料 " + MoveInfo.SLog + ":升降轴到P11,压紧轴到P3,放下料盘", true);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P11, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_18_UpdownDown))
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_19_InoutToP1);
InOutStoreLog("紧急料 " + MoveInfo.SLog + ":叉子后退到P1", true);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_19_InoutToP1))
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_20_UrgentDoorDown);
InOutStoreLog("紧急料 " + MoveInfo.SLog + ":关闭升降门,送出料盘结束", true);
CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_20_UrgentDoorDown))
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_21_UrgentLineRun);
InOutStoreLog("紧急料出库 " + MoveInfo.SLog + ":流水线转动10s", true);
IOMove(IO_Type.NGLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_21_UrgentLineRun))
{
IOMove(IO_Type.NGLine_Run, IO_VALUE.LOW);
MoveInfo.NextMoveStep(StoreMoveStep.);
InOutStoreLog("紧急料出库 " + MoveInfo.SLog + ":停止紧急料线体转动,继续出紧急料盘");
}
#endregion
#region 出入库步骤
......@@ -1007,13 +1090,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_03_ToPosition)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_04_ToPos);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进入库位中, 进出轴至P3["+ moveP.InOut_P3 + "] ");
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进入库位中, 进出轴至P3[" + moveP.InOut_P3 + "] ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_04_ToPos)
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_05_GetReel);
InOutStoreLog("出库 " + MoveInfo.SLog + ": 拿起物品,升降轴至P6["+ moveP.UpDown_P6 + "],压紧轴到压紧点P2 :" + moveP.ComPress_P2);
InOutStoreLog("出库 " + MoveInfo.SLog + ": 拿起物品,升降轴至P6[" + moveP.UpDown_P6 + "],压紧轴到压紧点P2 :" + moveP.ComPress_P2);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P2, Config.CompAxis_P2_Speed);
//MoveInfo.WaitList.Add(WaitResultInfo.WaitComAxis(Config.Comp_Axis, Config.CompAxis_P4_Position, Config.CompAxis_P4_Speed));
......@@ -1023,21 +1106,29 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_GetReel)
{
// SO_06_StartCompress();
//}
//else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_06_StartCompress))
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SO_07_ComDownMove);
// int currPosition = ACServerManager.GetActualtPosition(Config.Comp_Axis);
// int targetP = currPosition + Config.CompAxis_Down_Position;
// InOutStoreLog("出库 " + MoveInfo.SLog + ": 再向下压紧 [" + Config.CompAxis_Down_Position + "] 目标 [" + targetP + "] ");
// ACAxisMove(Config.Comp_Axis, targetP, Config.CompAxis_P1_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SO_07_ComDownMove)
//{
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_InoutBack);
InOutStoreLog("出库 " + MoveInfo.SLog + ":进出轴至待机点P1[" + moveP.InOut_P1 + "] ");
// SO_06_StartCompress();
//}
//else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_06_StartCompress))
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SO_07_ComDownMove);
// int currPosition = ACServerManager.GetActualtPosition(Config.Comp_Axis);
// int targetP = currPosition + Config.CompAxis_Down_Position;
// InOutStoreLog("出库 " + MoveInfo.SLog + ": 再向下压紧 [" + Config.CompAxis_Down_Position + "] 目标 [" + targetP + "] ");
// ACAxisMove(Config.Comp_Axis, targetP, Config.CompAxis_P1_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SO_07_ComDownMove)
//{
if (MoveInfo.MoveParam.urgentReel)
{
}
else
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_InoutBack);
}
InOutStoreLog("出库 " + MoveInfo.SLog + ":进出轴至待机点P1[" + moveP.InOut_P1 + "] ");
InOutBackToP1(moveP.InOut_P1);
//把库位的物品放到取到叉子上之后是出仓完成
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
......@@ -1053,11 +1144,13 @@ namespace OnlineStore.DeviceLibrary
//LogUtil.info("出库步骤 SO_07_CheckComSig :IsIgnoreComSig = false, CompressSigTimeOut = false");
IO_VALUE iov = IOValue(IO_Type.Compress_Check);
MoveInfo.NextMoveStep(StoreMoveStep.SO_10_ToShelfPosition);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子已到P1,Compress_Check="+iov+",走到料架位置,旋转轴至P101["+ moveP.Middle_P101 + "],升降轴至P102["+ moveP.UpDown_HP102 + "] ");
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子已到P1,Compress_Check=" + iov + ",走到料架位置,旋转轴至P101[" + moveP.Middle_P101 + "],升降轴至P102[" + moveP.UpDown_HP102 + "] ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed);
//MoveInfo.NextMoveStep(StoreMoveStep.SO_09_CheckComSig);
//InOutStoreLog("出库 " + MoveInfo.SLog + ":等待料叉压紧信号 ");
//MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Compress_Check, IO_VALUE.HIGH));
......@@ -1077,7 +1170,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else if (MoveInfo.MoveStep == StoreMoveStep.SO_10_ToShelfPosition)
{
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_ToShelf);
InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进出料口,进出轴至P101");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed);
......
......@@ -461,9 +461,39 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 送出空料架:关闭仓门
/// </summary>
BS_11_CloseDoor = 4011,
BS_11_CloseDoor = 4011,
#endregion
#region 把紧急料送到紧急料箱
/// <summary>
/// 送出料盘:紧急料,升降轴移动到NG料门口上端,旋转轴移动到NG料门口
/// </summary>
SO_15_ToUrgentDoor,
/// <summary>
/// 送出料盘:NG料口升降门上升
/// </summary>
SO_16_UrgentDoorUp,
/// <summary>
/// 送出料盘:进出轴前进到NG料门口位置
/// </summary>
SO_17_InoutToUrgentDoor,
/// <summary>
/// 送出料盘:升降轴缓慢下降,放下料盘
/// </summary>
SO_18_UpdownDown,
/// <summary>
/// 送出料盘:叉子后退到P1
/// </summary>
SO_19_InoutToP1,
/// <summary>
/// 送出料盘:关门NG料门,送出料盘结束
/// </summary>
SO_20_UrgentDoorDown,
/// <summary>
/// NG流水线转动指定的时间3000
/// </summary>
SO_21_UrgentLineRun,
#endregion
}
public enum StoreAlarmType
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!