Commit 7290c4f8 张东亮

横移10#12#17不放行

1 个父辈 47660d67
...@@ -90,13 +90,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -90,13 +90,14 @@ namespace OnlineStore.DeviceLibrary
bool check2IsOk = CheckStopWatch(trayCheckLowWait, TrayWaitTime, false); bool check2IsOk = CheckStopWatch(trayCheckLowWait, TrayWaitTime, false);
if (IOValue(IO_Type.HY_FrontStopCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.HY_FrontStopCheck).Equals(IO_VALUE.HIGH))
{ {
if (CheckStopWatch(trayCheckWait, TrayWaitTime, false) && check2IsOk && canpro) //CheckStopWatch(trayCheckWait, TrayWaitTime, false) &&
if (check2IsOk && canpro)
{ {
StartTrayCheck(); StartTrayCheck();
} }
} }
else // else
{ {
trayCheckWait.Stop(); trayCheckWait.Stop();
} }
...@@ -190,8 +191,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -190,8 +191,9 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.NewMove(LineMoveType.Fixture); SecondMoveInfo.NewMove(LineMoveType.Fixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_05_TrayCheck); SecondMoveInfo.NextMoveStep(LineMoveStep.JHY_05_TrayCheck);
CheckLog("接驳台托盘" + SecondMoveInfo.SLog + "前阻挡上升,等待托盘到位 "); CheckLog("接驳台托盘" + SecondMoveInfo.SLog + "前阻挡下降1.2s,等待托盘到位 ");
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW); //IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH, 1200);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopDown, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopDown, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
...@@ -403,7 +405,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -403,7 +405,7 @@ namespace OnlineStore.DeviceLibrary
{ {
time = 800; time = 800;
} }
CheckLog(" 托盘放行" + SecondMoveInfo.SLog + ":等待"+ time + "ms,托盘检测无信号"); CheckLog(" 托盘放行" + SecondMoveInfo.SLog + ":等待" + time + "ms,托盘检测无信号");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(time)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(time));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.LOW));
} }
...@@ -487,7 +489,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,7 +489,7 @@ namespace OnlineStore.DeviceLibrary
string code = SecondMoveInfo.MoveParam.WareCode; string code = SecondMoveInfo.MoveParam.WareCode;
bool isNg = false; bool isNg = false;
string result = SServerManager.GetTraySize(Name, robotIndex, code, out LastWidth, out isNg); string result = SServerManager.GetTraySize(Name, robotIndex, code, out LastWidth, out isNg);
OutLog("接驳台托盘[" + currTrayNum + "] [" + code + "] 获取尺寸【" + LastWidth + "】"+(isNg?"NG":"")+"【" + result + "】",1); OutLog("接驳台托盘[" + currTrayNum + "] [" + code + "] 获取尺寸【" + LastWidth + "】" + (isNg ? "NG" : "") + "【" + result + "】", 1);
if (LastWidth > 0) if (LastWidth > 0)
{ {
...@@ -588,13 +590,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -588,13 +590,13 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
InOutParam inoup = trayInfo.InoutPar; InOutParam inoup = trayInfo.InoutPar;
if (trayInfo.IsFull && trayInfo.InoutPar.IsNG && this.DeviceID.Equals(217)&& trayInfo.InOrOutStore.Equals(1)) if (trayInfo.IsFull && trayInfo.InoutPar.IsNG && this.DeviceID.Equals(217) && trayInfo.InOrOutStore.Equals(1))
{ {
LogInfo(" NG料->NG箱" + "" + inoup.ToStr()); LogInfo(" NG料->NG箱" + "" + inoup.ToStr());
//如果分配了库位,需要调用取消 //如果分配了库位,需要调用取消
if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "") if (trayInfo.InoutPar.WareCode != "" && trayInfo.InoutPar.PosId != "")
{ {
SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode,false ); SServerManager.cancelPutInTask(Name, trayInfo.InoutPar.WareCode, false);
} }
SecondMoveInfo.MoveParam = inoup; SecondMoveInfo.MoveParam = inoup;
//MoveInfo.MoveParam = inoup; //MoveInfo.MoveParam = inoup;
...@@ -672,7 +674,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -672,7 +674,8 @@ namespace OnlineStore.DeviceLibrary
{ {
JM_02_CylinderTake(); JM_02_CylinderTake();
} }
else { else
{
MoveInfo.NextMoveStep(LineMoveStep.JM_01_UpdownToP1); MoveInfo.NextMoveStep(LineMoveStep.JM_01_UpdownToP1);
OutLog("托盘移栽 升降气缸上升 "); OutLog("托盘移栽 升降气缸上升 ");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
...@@ -737,7 +740,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -737,7 +740,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.JM_02_CylinderTake)) else if (MoveInfo.IsStep(LineMoveStep.JM_02_CylinderTake))
{ {
int p2 = Config.GetUpdownP2Detial(MoveInfo.MoveParam.PlateH,MoveInfo.MoveParam.PlateW); int p2 = Config.GetUpdownP2Detial(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
MoveInfo.NextMoveStep(LineMoveStep.JM_03_UpdownToP2); MoveInfo.NextMoveStep(LineMoveStep.JM_03_UpdownToP2);
OutLog(logName + MoveInfo.SLog + ":升降轴下降到取料点P2 [" + p2 + "]"); OutLog(logName + MoveInfo.SLog + ":升降轴下降到取料点P2 [" + p2 + "]");
UpdownAxis.AbsMove(MoveInfo, p2, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, p2, Config.UpdownAxis_P2Speed);
...@@ -758,7 +761,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -758,7 +761,7 @@ namespace OnlineStore.DeviceLibrary
{ {
OutTrayNum = currTrayNum; OutTrayNum = currTrayNum;
MoveInfo.NextMoveStep(LineMoveStep.JM_06_UpdownToP1); MoveInfo.NextMoveStep(LineMoveStep.JM_06_UpdownToP1);
OutLog(logName + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "],更新 getTrayReelOk=true,更新当前出库托盘号="+ OutTrayNum); OutLog(logName + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "],更新 getTrayReelOk=true,更新当前出库托盘号=" + OutTrayNum);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
getTrayReelOk = true; getTrayReelOk = true;
//如果不是NG口,提前放托盘离开 //如果不是NG口,提前放托盘离开
...@@ -786,10 +789,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -786,10 +789,10 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck)) else if (MoveInfo.IsStep(LineMoveStep.JM_07_ClampCheck))
{ {
//判断是否正常抓取料 //判断是否正常抓取料
if(IOValue(IO_Type.HY_ClampCylinder_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.HY_ClampCylinder_Check).Equals(IO_VALUE.LOW))
{ {
getTrayReelOk = false; getTrayReelOk = false;
LogInfo("从托盘["+ OutTrayNum + "]上抓取无料失败,夹爪气缸料盘检测信号=LOW"); LogInfo("从托盘[" + OutTrayNum + "]上抓取无料失败,夹爪气缸料盘检测信号=LOW");
} }
//TrayCanGo(); //TrayCanGo();
if (IsNgPro()) if (IsNgPro())
...@@ -852,7 +855,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -852,7 +855,7 @@ namespace OnlineStore.DeviceLibrary
//接驳台有料,直接发arrive //接驳台有料,直接发arrive
int robotIndex = GetRobotIndex(); int robotIndex = GetRobotIndex();
string msg = SServerManager.arrive3fRobotLocation(Name, robotIndex, code); string msg = SServerManager.arrive3fRobotLocation(Name, robotIndex, code);
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台,更新托盘[" + OutTrayNum + "]为空 ,发送 arrive3fRobotLocation = " + msg,1); OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台,更新托盘[" + OutTrayNum + "]为空 ,发送 arrive3fRobotLocation = " + msg, 1);
afterPutCutOK = true; afterPutCutOK = true;
//清空托盘 //清空托盘
TrayManager.UpdateTrayInfo(OutTrayNum); TrayManager.UpdateTrayInfo(OutTrayNum);
...@@ -865,19 +868,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -865,19 +868,19 @@ namespace OnlineStore.DeviceLibrary
afterPutCutOK = true; afterPutCutOK = true;
if (getTrayReelOk) if (getTrayReelOk)
{ {
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台失败 ,更新托盘[" + OutTrayNum + "]为NG ,发送 clearOutTask=" + msg,1); OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台失败 ,更新托盘[" + OutTrayNum + "]为NG ,发送 clearOutTask=" + msg, 1);
//更新托盘为NG //更新托盘为NG
TrayManager.UpdateInStoreNG(OutTrayNum, true, "工单料放料到接驳台失败"); TrayManager.UpdateInStoreNG(OutTrayNum, true, "工单料放料到接驳台失败");
} }
else else
{ {
OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台失败 (未抓起料盘),更新托盘[" + OutTrayNum + "]为NG ,发送 clearOutTask=" + msg,1); OutLog(logName + MoveInfo.SLog + ",工单料到达接驳台失败 (未抓起料盘),更新托盘[" + OutTrayNum + "]为NG ,发送 clearOutTask=" + msg, 1);
//更新托盘为NG //更新托盘为NG
TrayManager.UpdateInStoreNG(OutTrayNum, true, "工单料放料到接驳台失败(未抓起料盘)"); TrayManager.UpdateInStoreNG(OutTrayNum, true, "工单料放料到接驳台失败(未抓起料盘)");
} }
} }
MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck); MoveInfo.NextMoveStep(LineMoveStep.JM_15_ClampCheck);
OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料 ",1); OutLog(logName + MoveInfo.SLog + ":夹爪料盘检测无料 ", 1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_ClampCylinder_Check, IO_VALUE.LOW));
} }
...@@ -902,7 +905,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -902,7 +905,8 @@ namespace OnlineStore.DeviceLibrary
TaskData taskData; TaskData taskData;
string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData); string msg = SServerManager.afterPutCut(Name, "BN", code, "", 1, out taskData);
afterPutCutOK = true; afterPutCutOK = true;
}else if (MoveInfo.MoveParam.cutReel) }
else if (MoveInfo.MoveParam.cutReel)
{ {
OutLog(logName + MoveInfo.SLog + ",分盘料已放入NG箱,发送 afterPutCut "); OutLog(logName + MoveInfo.SLog + ",分盘料已放入NG箱,发送 afterPutCut ");
TaskData taskData; TaskData taskData;
...@@ -937,7 +941,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -937,7 +941,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (afterPutCutOK) if (afterPutCutOK)
{ {
ClearTimeoutAlarm("给服务器发送 "+ log + " 完成"); ClearTimeoutAlarm("给服务器发送 " + log + " 完成");
MoveEndS(); MoveEndS();
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
...@@ -1023,7 +1027,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1023,7 +1027,7 @@ namespace OnlineStore.DeviceLibrary
int tLength = 15; int tLength = 15;
if (!String.IsNullOrEmpty(RFIDIP)) if (!String.IsNullOrEmpty(RFIDIP))
{ {
msg += "当前托盘:" + currTrayNum + " 上个托盘:" + preTrayNum + ",料盘托盘:"+OutTrayNum+"\n"; msg += "当前托盘:" + currTrayNum + " 上个托盘:" + preTrayNum + ",料盘托盘:" + OutTrayNum + "\n";
} }
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
msg += "alarm: " + alarmType + " " + LastAlarmTime.ToLongTimeString() + "\n"; msg += "alarm: " + alarmType + " " + LastAlarmTime.ToLongTimeString() + "\n";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!