Commit b96e30eb LN

皮带线判断修改

1 个父辈 ab2d5cda
......@@ -288,6 +288,9 @@ IO_Value增加None的定义,防止误操作
扫码获取图片方式修改。
料盘到达接驳台后,给服务器发送条码信息,arriveRobotLocation增加barcode参数
20200312
皮带线判断修改
......
......@@ -124,7 +124,7 @@ namespace OnlineStore.DeviceLibrary
CheckAndMove(IO_Type.DLine_Run2, IO_VALUE.LOW);
CheckAndMove(IO_Type.DLine_Run3, IO_VALUE.LOW);
CheckAndMove(IO_Type.SeparateDevice_Run, IO_VALUE.LOW);
if (DeviceID.Equals(302))
if (IsNewType)
{
LogInfo("后退NG气缸,后退扫码NG气缸");
CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After);
......@@ -313,7 +313,7 @@ namespace OnlineStore.DeviceLibrary
}
internal bool InStoreNgISBack()
{
if (DeviceID.Equals(302))
if (IsNewType)
{
if (IOValue(IO_Type.NGCylinder_After).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.NGCylinder_Before).Equals(IO_VALUE.LOW))
{
......@@ -437,13 +437,8 @@ namespace OnlineStore.DeviceLibrary
}
private void NewTypeScan(bool isfirst = false)
{
// if (IsNewType)
{
IsInScanCode = true;
string LastCode = "";
//LastCodeList = new List<string
Task.Factory.StartNew(delegate
{
if (isfirst)
......@@ -499,10 +494,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(hengyiName + " 扫码工位 : 扫码结束 ," + StationInfo_Scan.ToStr + " IsInScanCode = " + IsInScanCode);
}
}
});
}
}
protected override void IOTimeOutProcess()
{
try
......@@ -624,7 +617,7 @@ namespace OnlineStore.DeviceLibrary
}
public void ScanNgForward(LineMoveInfo moveInfo = null)
{
if (DeviceID.Equals(302))
if (IsNewType)
{
if (moveInfo != null)
{
......@@ -637,7 +630,7 @@ namespace OnlineStore.DeviceLibrary
}
public void ScanNgBack(LineMoveInfo moveInfo)
{
if (DeviceID.Equals(302))
if (IsNewType)
{
if (moveInfo != null)
{
......
......@@ -24,6 +24,16 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
private int GetRobotIndex()
{
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}return robotIndex;
}
#region 是否可移栽料盘
......@@ -109,11 +119,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DO_03_GetTraySize);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LastWidth = 0;
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}
int robotIndex = GetRobotIndex();
string result = SServerManager.GetTraySize(Name, robotIndex, StationInfo_Move.CodeStr, out LastWidth);
LogUtil.info(hengyiName + "出口有料,二维码[" + StationInfo_Move.CodeStr + "] 获取料盘尺寸【" + LastWidth + "】【" + result + "】");
}
......@@ -182,13 +188,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DO_08_CRun);
if (IOValue(IO_Type.SeparateDevice_Check).Equals(IO_VALUE.HIGH))
{
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}
int robotIndex = GetRobotIndex();
LogUtil.info(hengyiName + "出口有料,转动接驳台皮带线2000 , 收到SeparateDevice_Check信号,调用arriveRobotLocation=" + robotIndex);
SServerManager.arriveRobotLocation(Name, robotIndex, StationInfo_Move.CodeStr);
}
else
......@@ -275,13 +276,8 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(LineMoveStep.DON_03_GetTraySize);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LastWidth = 0;
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}
int robotIndex = GetRobotIndex();
string result = SServerManager.GetTraySize(Name, robotIndex, StationInfo_Move.CodeStr, out LastWidth);
LogUtil.info(hengyiName + MoveInfo.SLog + "送料: [" + StationInfo_Move.CodeStr + "] 获取尺寸【" + LastWidth + "】【" + result + "】");
}
......@@ -334,11 +330,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.DON_08_CRun);
if (IOValue(IO_Type.SeparateDevice_Check).Equals(IO_VALUE.HIGH))
{
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}
int robotIndex = GetRobotIndex();
LogUtil.info(hengyiName + MoveInfo.SLog + "送料,接驳台有料盘,等待2000,调用arriveRobotLocation=" + robotIndex);
SServerManager.arriveRobotLocation(Name, robotIndex, StationInfo_Move.CodeStr);
......
......@@ -495,17 +495,23 @@ namespace OnlineStore.DeviceLibrary
//{
// wait.IsEnd = LineManager.Line.SideWay34HasTray().Equals(false);
//}
if (wait.IsEnd && moveInfo.OneWaitCanEndStep)
if (wait.IsEnd)
{
if (MoveInfo.OneWaitCanEndStep)
{
isOk = true;
break;
}
else if (!moveInfo.OneWaitCanEndStep)
}
else
{
if (!MoveInfo.OneWaitCanEndStep)
{
isOk = false;
break;
}
}
}
if (isOk)
{
moveInfo.EndStepWait();
......
......@@ -152,17 +152,23 @@ namespace OnlineStore.DeviceLibrary
{
wait.IsEnd = SwCanUpMove(wait.TargetPosition);
}
if (wait.IsEnd && checkWaitInfo.OneWaitCanEndStep)
if (wait.IsEnd)
{
if (MoveInfo.OneWaitCanEndStep)
{
isOk = true;
break;
}
else if (!checkWaitInfo.OneWaitCanEndStep && wait.IsEnd.Equals(false))
}
else
{
if (!MoveInfo.OneWaitCanEndStep)
{
isOk = false;
break;
}
}
}
if (isOk)
{
checkWaitInfo.EndStepWait();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!