Commit 3796e43e LN

修改内容:

1.阻挡1下降2秒自动上升。
2.入料放料盘到托盘,夹爪放松完成,升降轴上升时再更新托盘有料。
3.入料复位时,把当前拦截的托盘放行,防止放两次料盘。
4.进仓界面增加清理入库任务按钮
5.HY16 托盘去出料线后阻挡上升。
1 个父辈 4fc38933
...@@ -258,7 +258,11 @@ namespace OnlineStore.AssemblyLine ...@@ -258,7 +258,11 @@ namespace OnlineStore.AssemblyLine
string code = txtTrayCode.Text.Trim(); string code = txtTrayCode.Text.Trim();
if (hasTray) if (hasTray)
{ {
InOutParam inoutP = new InOutParam(num, "CodeTest", posId, ph, pw, inNg, urg, cutReel, isSmall, "", loc); if (String.IsNullOrEmpty(code))
{
code = "CodeTest";
}
InOutParam inoutP = new InOutParam(num, code, posId, ph, pw, inNg, urg, cutReel, isSmall, "", loc);
TrayManager.UpdateTrayInfo(num, hasTray, trayType, inoutP, "InStoreNG "); TrayManager.UpdateTrayInfo(num, hasTray, trayType, inoutP, "InStoreNG ");
} }
else else
......
...@@ -54,7 +54,7 @@ namespace OnlineStore.AssemblyLine ...@@ -54,7 +54,7 @@ namespace OnlineStore.AssemblyLine
} }
chbMoveStop.Checked = equipBean.MoveStop; chbMoveStop.Checked = equipBean.MoveStop;
cmbSizeList.SelectedIndex = 0; cmbSizeList.SelectedIndex = 0;
lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString(); txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
...@@ -194,7 +194,7 @@ namespace OnlineStore.AssemblyLine ...@@ -194,7 +194,7 @@ namespace OnlineStore.AssemblyLine
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.StackTrace, "Exception(异常)", MessageBoxButtons.OK, MessageBoxIcon.Error);
LogUtil.error("",ex); LogUtil.error("", ex);
} }
} }
private void btnOpenDo_Click(object sender, EventArgs e) private void btnOpenDo_Click(object sender, EventArgs e)
...@@ -209,6 +209,7 @@ namespace OnlineStore.AssemblyLine ...@@ -209,6 +209,7 @@ namespace OnlineStore.AssemblyLine
{ {
string deviceName = txtDoName.Text; string deviceName = txtDoName.Text;
int index = FormUtil.GetIntValue(txtDOIndex); int index = FormUtil.GetIntValue(txtDOIndex);
lblAddr.Text = deviceName + "_" + index;
// IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW; // IO_VALUE value = checkBox1.Checked ? IO_VALUE.HIGH : IO_VALUE.LOW;
int time = FormUtil.GetIntValue(txtWriteTime); int time = FormUtil.GetIntValue(txtWriteTime);
int slaveId = FormUtil.GetIntValue(txtSlaveId); int slaveId = FormUtil.GetIntValue(txtSlaveId);
...@@ -242,6 +243,7 @@ namespace OnlineStore.AssemblyLine ...@@ -242,6 +243,7 @@ namespace OnlineStore.AssemblyLine
// txtIp.Text = io.DeviceName; // txtIp.Text = io.DeviceName;
txtDOIndex.Text = io.GetIOAddr().ToString(); txtDOIndex.Text = io.GetIOAddr().ToString();
txtDoName.Text = io.IO_IP; txtDoName.Text = io.IO_IP;
lblAddr.Text = io.IO_IP + "_" + io.GetIOAddr().ToString();
txtSlaveId.Text = io.SlaveID.ToString(); txtSlaveId.Text = io.SlaveID.ToString();
IOTextControl newControl = DOControlList[io.ProName]; IOTextControl newControl = DOControlList[io.ProName];
if (selectControl != null) { selectControl.BackColor = Color.White; } if (selectControl != null) { selectControl.BackColor = Color.White; }
...@@ -359,7 +361,7 @@ namespace OnlineStore.AssemblyLine ...@@ -359,7 +361,7 @@ namespace OnlineStore.AssemblyLine
if (equipBean.runStatus.Equals(LineRunStatus.Runing)) if (equipBean.runStatus.Equals(LineRunStatus.Runing))
{ {
InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false); InOutParam param = new InOutParam(999, "barcode-test", "posid-test", 12, 7, false, false, false);
LogUtil.info(equipBean.Name + "点击:出库测试 "+ param.ToShortStr()); LogUtil.info(equipBean.Name + "点击:出库测试 " + param.ToShortStr());
equipBean.StartOutStoreMove(param); equipBean.StartOutStoreMove(param);
} }
else else
...@@ -401,7 +403,7 @@ namespace OnlineStore.AssemblyLine ...@@ -401,7 +403,7 @@ namespace OnlineStore.AssemblyLine
{ {
int position = FormUtil.GetIntValue(txtP2); int position = FormUtil.GetIntValue(txtP2);
int speed = equipBean.Config.UpdownAxis_P2Speed; int speed = equipBean.Config.UpdownAxis_P2Speed;
LogUtil.info(equipBean.Name+"点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】"); LogUtil.info(equipBean.Name + "点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed); equipBean.UpdownAxis.AbsMove(null, position, speed);
} }
...@@ -411,13 +413,13 @@ namespace OnlineStore.AssemblyLine ...@@ -411,13 +413,13 @@ namespace OnlineStore.AssemblyLine
this.Enabled = false; this.Enabled = false;
equipBean.RunAxis(false, equipBase.UpdownAxis); equipBean.RunAxis(false, equipBase.UpdownAxis);
this.Enabled = true; this.Enabled = true;
LogUtil.info(equipBean.Name+"伺服运转ON完成"); LogUtil.info(equipBean.Name + "伺服运转ON完成");
} }
private void btnAxisOff_Click(object sender, EventArgs e) private void btnAxisOff_Click(object sender, EventArgs e)
{ {
equipBean.CloseAxis(equipBase.UpdownAxis); equipBean.CloseAxis(equipBase.UpdownAxis);
LogUtil.info(equipBean.Name+"伺服运转OFF完成"); LogUtil.info(equipBean.Name + "伺服运转OFF完成");
} }
private void btnCloseAll_Click(object sender, EventArgs e) private void btnCloseAll_Click(object sender, EventArgs e)
...@@ -441,7 +443,7 @@ namespace OnlineStore.AssemblyLine ...@@ -441,7 +443,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP1); int position = FormUtil.GetIntValue(txtP1);
int speed = equipBean.Config.UpdownAxis_P1Speed; int speed = equipBean.Config.UpdownAxis_P1Speed;
LogUtil.info(equipBean.Name+ "点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】"); LogUtil.info(equipBean.Name + "点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed); equipBean.UpdownAxis.AbsMove(null, position, speed);
} }
...@@ -470,7 +472,7 @@ namespace OnlineStore.AssemblyLine ...@@ -470,7 +472,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP3); int position = FormUtil.GetIntValue(txtP3);
int speed = equipBean.Config.UpdownAxis_P3Speed; int speed = equipBean.Config.UpdownAxis_P3Speed;
LogUtil.info(equipBean.Name+"点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】"); LogUtil.info(equipBean.Name + "点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
equipBean.UpdownAxis.AbsMove(null, position, speed); equipBean.UpdownAxis.AbsMove(null, position, speed);
} }
...@@ -508,7 +510,7 @@ namespace OnlineStore.AssemblyLine ...@@ -508,7 +510,7 @@ namespace OnlineStore.AssemblyLine
int height = Convert.ToInt32(cmbDHeight.Text); int height = Convert.ToInt32(cmbDHeight.Text);
int position = FormUtil.GetIntValue(txtDP2); int position = FormUtil.GetIntValue(txtDP2);
DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存",MessageBoxButtons.OKCancel); DialogResult result = MessageBox.Show("保存后只能修改不能删除,是否确定保存?", "确定保存", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK)) if (result.Equals(DialogResult.OK))
{ {
equipBean.Config.UpdateUpdownP2Detial(size, height, position); equipBean.Config.UpdateUpdownP2Detial(size, height, position);
...@@ -538,7 +540,7 @@ namespace OnlineStore.AssemblyLine ...@@ -538,7 +540,7 @@ namespace OnlineStore.AssemblyLine
} }
int size = Convert.ToInt32(cmbDSize.Text); int size = Convert.ToInt32(cmbDSize.Text);
int height = Convert.ToInt32(cmbDHeight.Text); int height = Convert.ToInt32(cmbDHeight.Text);
int position = equipBean.Config.GetUpdownP2Detial( height, size); int position = equipBean.Config.GetUpdownP2Detial(height, size);
txtDP2.Text = position.ToString(); txtDP2.Text = position.ToString();
} }
...@@ -564,11 +566,11 @@ namespace OnlineStore.AssemblyLine ...@@ -564,11 +566,11 @@ namespace OnlineStore.AssemblyLine
cmbDHeight.Text = height.ToString(); cmbDHeight.Text = height.ToString();
cmbDSize.Text = size.ToString(); cmbDSize.Text = size.ToString();
txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height,size).ToString(); txtDP2.Text = equipBean.Config.GetUpdownP2Detial(height, size).ToString();
} }
} }
} }
catch(Exception ex) catch (Exception ex)
{ {
} }
...@@ -662,6 +664,39 @@ namespace OnlineStore.AssemblyLine ...@@ -662,6 +664,39 @@ namespace OnlineStore.AssemblyLine
equipBean.MoveStop = chbMoveStop.Checked; equipBean.MoveStop = chbMoveStop.Checked;
LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop); LogUtil.info(equipBean.Name + "用户切换是否暂停: " + equipBean.MoveStop);
} }
private void btnClear_Click(object sender, EventArgs e)
{
string posId = txtPosId.Text.Trim();
if (String.IsNullOrEmpty(posId))
{
MessageBox.Show("请输入正确的库位号", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
txtPosId.Focus();
return;
}
LogUtil.info("点击 " + btnClear.Text + " , 库位号[" + posId + "]");
InOutParam param = null;
List<InOutParam> paramList = new List<InOutParam>(equipBean.waitInStoreList);
foreach (InOutParam p in paramList)
{
if (p.PosId.Equals(posId))
{
param = p;
break;
}
}
if (param == null)
{
MessageBox.Show("未找到对应的任务,请输入正确的库位号", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
txtPosId.Focus();
return;
}
else
{
equipBean.RemoveInStore(param, "手动清除入库任务");
txtPosId.Clear();
}
}
} }
} }
......
20200105 20200203
修改内容:
1.阻挡下降2秒自动上升。
2.入库放料完成,升降轴上升时再更新托盘信息。
3.进仓界面增加清理入库任务按钮
20200105
1.获取入库库位号时需要判断是否是出库料。 1.获取入库库位号时需要判断是否是出库料。
2.HY9和HY15,如果是NG料直接横移。 2.HY9和HY15,如果是NG料直接横移。
3.入库时需要判断托盘的库位号和入库任务的库位号一致。 3.入库时需要判断托盘的库位号和入库任务的库位号一致。
......
...@@ -189,6 +189,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -189,6 +189,12 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
break; break;
case LineMoveStep.FR_05_UpdownAxis_P1: case LineMoveStep.FR_05_UpdownAxis_P1:
currTrayNum = -1;
if (LineManager.Line.TrayIsReady(DeviceID, out currTrayNum))
{
LogInfo("复位中,发现托盘准备完成,放托盘离开");
TrayMoveOk();
}
if (UpdownIsInP1()) if (UpdownIsInP1())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FR_06_CylinderGive); MoveInfo.NextMoveStep(LineMoveStep.FR_06_CylinderGive);
...@@ -284,7 +290,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -284,7 +290,6 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.FR_18_ClampCheck: case LineMoveStep.FR_18_ClampCheck:
LogInfo("重置完成!"); LogInfo("重置完成!");
MoveEndS(); MoveEndS();
break; break;
default: break; default: break;
......
...@@ -517,20 +517,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -517,20 +517,7 @@ namespace OnlineStore.DeviceLibrary
int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth); int targetPositon = Config.GetUpdownP2Detial(LastHeight, LastWidth);
UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed); UpdownAxis.AbsMove(MoveInfo, targetPositon, Config.UpdownAxis_P2Speed);
LastPosParam.TrayNumber = currTrayNum; LastPosParam.TrayNumber = currTrayNum;
if (LastResult.Equals(98)) InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 暂不更新托盘信息");
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.OutStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 更新料盘位置,更新托盘信息【" + tray.ToStr() + "】");
SServerManager.UpdateTrayLoc(Name, LastPosParam.WareCode, LocStatus.INLINE, "E" + currTrayNum.ToString().PadLeft(2, '0'));
}
else
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P2: [" + targetPositon + "] 更新托盘信息【" + tray.ToStr() + "】");
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
}
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false)) if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{ {
InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果"); InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果");
...@@ -553,8 +540,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -553,8 +540,24 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(LineMoveStep.FI_35_AxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FI_35_AxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1点 [" + Config.UpDownAxisP1 + "]"); //InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1点 [" + Config.UpDownAxisP1 + "]");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
if (LastResult.Equals(98))
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.OutStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "] 更新料盘位置,更新托盘信息【" + tray.ToStr() + "】");
SServerManager.UpdateTrayLoc(Name, LastPosParam.WareCode, LocStatus.INLINE, "E" + currTrayNum.ToString().PadLeft(2, '0'));
}
else
{
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam.Clone(), LastPosParam.NgMsg);
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
InLog("料盘移栽" + MoveInfo.SLog + ":升降轴到P1 [" + Config.UpDownAxisP1 + "] 更新托盘信息【" + tray.ToStr() + "】");
SServerManager.SendPosToStoreCheck(Name, LastPosParam.Clone());
}
} }
else if (MoveInfo.IsStep(LineMoveStep.FI_35_AxisToP1)) else if (MoveInfo.IsStep(LineMoveStep.FI_35_AxisToP1))
{ {
......
...@@ -286,7 +286,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -286,7 +286,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog(" 托盘检测:" + MoveInfo.SLog + ",检测到前阻挡托盘,前阻挡下降"); CheckLog(" 托盘检测:" + MoveInfo.SLog + ",检测到前阻挡托盘,前阻挡下降");
} }
ClearTrayRFID(); ClearTrayRFID();
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH, 1200); IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH, TrayManager.StopDTime);
MoveInfo.OneWaitCanEndStep = true; MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopCheck, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_FrontStopCheck, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
...@@ -480,7 +480,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -480,7 +480,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
HY_StopCylinderUp(MoveInfo); HY_StopCylinderUp(MoveInfo);
OL_StopCylinderUp(MoveInfo); OL_StopCylinderUp(MoveInfo);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
//如果是出库料,才需要更新位置 //如果是出库料,才需要更新位置
TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum); TrayInfo tray = TrayManager.GetTrayInfo(currTrayNum);
......
...@@ -736,7 +736,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -736,7 +736,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog(" 托盘检测:料盘检测StopCylinder_Check1 " + SecondMoveInfo.SLog + "阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0,清理托盘RFID"); CheckLog(" 托盘检测:料盘检测StopCylinder_Check1 " + SecondMoveInfo.SLog + "阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0,清理托盘RFID");
ClearTrayRFID(); ClearTrayRFID();
IOMove(IO_Type.StopDown2, IO_VALUE.LOW); IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH, 1200); IOMove(IO_Type.StopDown1, IO_VALUE.HIGH, TrayManager.StopDTime);
SecondMoveInfo.OneWaitCanEndStep = true; SecondMoveInfo.OneWaitCanEndStep = true;
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck1, IO_VALUE.LOW));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCheck2, IO_VALUE.HIGH));
......
...@@ -15,6 +15,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,6 +15,9 @@ namespace OnlineStore.DeviceLibrary
{ {
public class TrayManager public class TrayManager
{ {
public static int StopDTime = 2000;
public static bool DisTraySave = ConfigAppSettings.GetIntValue(Setting_Init.DisTraySave).Equals(1); public static bool DisTraySave = ConfigAppSettings.GetIntValue(Setting_Init.DisTraySave).Equals(1);
/// <summary> /// <summary>
/// 托盘集合,key=托盘编号,value=托盘详细信息 /// 托盘集合,key=托盘编号,value=托盘详细信息
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!