Commit 3845ee28 LN

四个出料口和紧急出料口夹爪检测修改。

1 个父辈 d2c9ebc5
......@@ -619,53 +619,56 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1);
OutLog(outType + MoveInfo.SLog + ":升降伺服到P1");
if (!UpdownAxis.IsInPosition(Config.UpDownAxisP1))
if (IOValue(IO_Type.SL_MoveCylinder_Tighten).Equals(IO_VALUE.LOW))
{
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
MoveInfo.NextMoveStep(LineMoveStep.FO_217_ClampCheck);
OutLog(outType + MoveInfo.SLog + ":等待夹爪有料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_MoveCylinder_Tighten,IO_VALUE.HIGH));
}
else
{
FO_218_UpdownToP1(outType);
}
int trayNum = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.TrayNumber : currTrayNum;
//更新此托盘为空托盘
TrayManager.UpdateTrayInfo(trayNum, false);
//SecondMoveInfo.NextMoveStep(LineMoveStep.MO_12_MoveOk);
TrayMoveOk();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_217_UpdownAxisToP1))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_217_ClampCheck))
{
FO_218_UpdownToP1(outType);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_218_UpdownToP1))
{
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FO_218_CylinderGive);
MoveInfo.NextMoveStep(LineMoveStep.FO_219_CylinderGive);
OutLog(outType + MoveInfo.SLog + ":上料横移机构到放料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1);
MoveInfo.NextMoveStep(LineMoveStep.FO_218_UpdownToP1);
OutLog(outType + MoveInfo.SLog + ":上料横移机构到放料端前,先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_218_CylinderGive))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_219_CylinderGive))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_219_UpdownAxisToP3);
MoveInfo.NextMoveStep(LineMoveStep.FO_220_UpdownAxisToP3);
OutLog(outType + MoveInfo.SLog + ":移栽伺服到P3");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP3, Config.UpdownAxis_P3Speed);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_219_UpdownAxisToP3))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_220_UpdownAxisToP3))
{
OutStoreHeight += MoveInfo.MoveParam.PlateH;
OutStoreCount++;
MoveInfo.NextMoveStep(LineMoveStep.FO_220_CylinderSlack);
MoveInfo.NextMoveStep(LineMoveStep.FO_221_CylinderSlack);
OutLog(outType + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_220_CylinderSlack))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_221_CylinderSlack))
{
MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1);
MoveInfo.NextMoveStep(LineMoveStep.FO_222_UpdownAxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
OutLog(outType + MoveInfo.SLog + ":移栽伺服上升到待机点P1,通知服务器 afterPutCut");
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
......@@ -678,32 +681,29 @@ namespace OnlineStore.DeviceLibrary
}
afterPutOk = true;
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_221_UpdownAxisToP1))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_222_UpdownAxisToP1))
{
if (MoveCylineIsUp())
{
MoveInfo.NextMoveStep(LineMoveStep.FO_222_CylinderTake);
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
//只有提升轴位置过低时才需要到P3
int currPosition = BatchAxis.GetAclPosition();
if (currPosition <= (Config.BatchAxisP2 + Config.Height_ChangeValue * 40))
if (IOValue(IO_Type.SL_MoveCylinder_Tighten).Equals(IO_VALUE.HIGH))
{
OutLog(outType + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]需要到P3");
BatchAxisToP3();
MoveInfo.NextMoveStep(LineMoveStep.FO_223_ClampCheck);
OutLog(outType + MoveInfo.SLog + ":等待夹爪无料");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SL_MoveCylinder_Tighten, IO_VALUE.LOW));
}
else
{
OutLog(outType + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]不需要到P3");
FO_224_CylinderTake(outType);
}
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1);
MoveInfo.NextMoveStep(LineMoveStep.FO_222_UpdownAxisToP1);
OutLog(outType + MoveInfo.SLog + ":上料横移机构取料端 前先上升横移气缸");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_222_CylinderTake))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_224_CylinderTake))
{
if (afterPutOk)
{
......@@ -750,6 +750,37 @@ namespace OnlineStore.DeviceLibrary
}
}
}
private void FO_218_UpdownToP1(string outType)
{
MoveInfo.NextMoveStep(LineMoveStep.FO_218_UpdownToP1);
OutLog(outType + MoveInfo.SLog + ":升降伺服到P1");
if (!UpdownAxis.IsInPosition(Config.UpDownAxisP1))
{
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
}
int trayNum = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.TrayNumber : currTrayNum;
//更新此托盘为空托盘
TrayManager.UpdateTrayInfo(trayNum, false);
//SecondMoveInfo.NextMoveStep(LineMoveStep.MO_12_MoveOk);
TrayMoveOk();
}
private void FO_224_CylinderTake(string outType)
{
MoveInfo.NextMoveStep(LineMoveStep.FO_224_CylinderTake);
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
//只有提升轴位置过低时才需要到P3
int currPosition = BatchAxis.GetAclPosition();
if (currPosition <= (Config.BatchAxisP2 + Config.Height_ChangeValue * 40))
{
OutLog(outType + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]需要到P3");
BatchAxisToP3();
}
else
{
OutLog(outType + MoveInfo.SLog + ":上料横移机构回到取料端,提升轴[" + currPosition + "]不需要到P3");
}
}
private bool afterPutOk = false;
private void FO_214_CylinderDown(string outType)
{
......
......@@ -210,7 +210,7 @@ namespace OnlineStore.DeviceLibrary
firstLine = new List<int> { 3, 4 };
}
}
bool kongxian = MoveInfo.MoveType.Equals(LineMoveType.None) || MoveInfo.MoveStep >= LineMoveStep.PO_08_CylinderRelax;
bool kongxian = MoveInfo.MoveType.Equals(LineMoveType.None) || MoveInfo.MoveStep >= LineMoveStep.PO_09_CylinderRelax;
if (mustLine.Count > 0)
{
if (mustLine.Contains(lineNum))
......@@ -500,10 +500,11 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogInfo("开始出料【" + posId + "】处理(移栽):PO_00_CylinderAfter, 前后气缸后退");
LogInfo("开始出料【" + posId + "】处理(移栽):PO_00_CylinderAfter, 前后气缸后退,等待夹爪无料");
MoveInfo.NextMoveStep(LineMoveStep.PO_00_CylinderAfter);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Slack, IO_VALUE.LOW));
}
return true;
}
......@@ -597,24 +598,28 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_04_CylinderUp))
{
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.PO_05_WaitBox);
LogInfo("出料 【" + posId + "】" + MoveInfo.SLog + " 更新托盘【" + num + "】为空");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitProvidingEquipCanOut());
TrayManager.UpdateTrayInfo(num);
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false) && SecondMoveInfo.MoveStep < LineMoveStep.MO_14_TopDown)
if (IOValue(IO_Type.ClampCylinder_Slack).Equals(IO_VALUE.HIGH))
{
//阻挡气缸移动
MO_14_TopCylinder_Down();
PO_06_WaitBox();
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.PO_05_ClampCheck);
OutLog("出料:" + MoveInfo.SLog + " ,等待夹爪有料)");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.ClampCylinder_Slack, IO_VALUE.HIGH));
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_WaitBox))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_ClampCheck))
{
MoveInfo.NextMoveStep(LineMoveStep.PO_06_CylinderBefore);
PO_06_WaitBox();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_WaitBox))
{
MoveInfo.NextMoveStep(LineMoveStep.PO_07_CylinderBefore);
OutLog("出料:" + MoveInfo.SLog + " ,前后气缸前进)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_CylinderBefore))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_CylinderBefore))
{
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before))
{
......@@ -624,7 +629,7 @@ namespace OnlineStore.DeviceLibrary
//MoveInfo.NextMoveStep(LineMoveStep.PO_07_CylinderDown);
//OutLog("出料:" + MoveInfo.SLog + " ,上下气缸下降)");
//UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
MoveInfo.NextMoveStep(LineMoveStep.PO_08_CylinderRelax);
MoveInfo.NextMoveStep(LineMoveStep.PO_09_CylinderRelax);
OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
......@@ -657,26 +662,14 @@ namespace OnlineStore.DeviceLibrary
}
else
{
MoveInfo.NextMoveStep(LineMoveStep.PO_06_CylinderBefore);
MoveInfo.NextMoveStep(LineMoveStep.PO_07_CylinderBefore);
OutLog("出料:" + MoveInfo.SLog + " ,前后气缸前进)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_CylinderDown))
//{
// MoveInfo.NextMoveStep(LineMoveStep.PO_08_CylinderRelax);
// OutLog("出料:" + MoveInfo.SLog + ",夹料气缸放松)");
// CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
//}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_CylinderRelax))
{
// MoveInfo.NextMoveStep(LineMoveStep.PO_09_CylinderUp);
// OutLog("出料:" + MoveInfo.SLog + ",上下气缸上升)");
// UpdownUpMove();
//}
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_CylinderUp))
//{
MoveInfo.NextMoveStep(LineMoveStep.PO_10_CylinderAfter);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_CylinderRelax))
{
MoveInfo.NextMoveStep(LineMoveStep.PO_11_CylinderAfter);
OutLog("出料:" + MoveInfo.SLog + ",前后气缸后退,等待200 ,皮带线继续运动");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
......@@ -684,7 +677,7 @@ namespace OnlineStore.DeviceLibrary
//出料皮带线停止出料
DisLineContiune();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_10_CylinderAfter))
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_11_CylinderAfter))
{
if (afterPutCutOK)
{
......@@ -699,6 +692,21 @@ namespace OnlineStore.DeviceLibrary
}
}
}
private void PO_06_WaitBox()
{
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.PO_06_WaitBox);
LogInfo("出料 【" + posId + "】" + MoveInfo.SLog + " 更新托盘【" + num + "】为空");
TrayManager.UpdateTrayInfo(num);
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false) && SecondMoveInfo.MoveStep < LineMoveStep.MO_14_TopDown)
{
//阻挡气缸移动
MO_14_TopCylinder_Down();
}
}
private bool afterPutCutOK= false ;
private OutTrayLineBean GetDisLine()
{
......
......@@ -872,50 +872,58 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 紧急出料移栽:上料横移机构取料端
/// /// </summary>
FO_212_CylinderTake = 12212,
FO_212_CylinderTake ,
/// <summary>
/// 紧急出料移栽:升降伺服下降到P2
/// /// </summary>
FO_213_UpdownAxisToP2 = 12213,
FO_213_UpdownAxisToP2,
/// <summary>
/// 紧急出料移栽:上料横移机构下降
/// /// </summary>
FO_214_CylinderDown = 12214,
FO_214_CylinderDown,
/// <summary>
/// 紧急出料移栽:上料气缸夹紧
/// /// </summary>
FO_215_CylinderTighten = 12215,
FO_215_CylinderTighten,
/// <summary>
/// 紧急出料移栽:上料横移机构上升
/// /// </summary>
FO_216_CylinderUp = 12216,
FO_216_CylinderUp,
/// <summary>
/// 紧急出料移栽:等待夹爪有料
/// </summary>
FO_217_ClampCheck,
/// <summary>
/// 紧急出料移栽:升降伺服到P1
/// /// </summary>
FO_217_UpdownAxisToP1 = 12217,
FO_218_UpdownToP1,
/// <summary>
/// 紧急出料移栽:上料横移机构到放料端
/// /// </summary>
FO_218_CylinderGive = 12218,
FO_219_CylinderGive,
/// <summary>
/// 紧急出料移栽:升降伺服到P3
/// </summary>
FO_219_UpdownAxisToP3 = 12219,
FO_220_UpdownAxisToP3,
/// <summary>
/// 紧急出料移栽:出料横移机构放松
/// </summary>
FO_220_CylinderSlack = 12220,
FO_221_CylinderSlack,
/// <summary>
/// 紧急出料移栽:升降伺服回P1
/// </summary>
FO_221_UpdownAxisToP1 = 12221,
FO_222_UpdownAxisToP1,
/// <summary>
/// 紧急出料移栽:夹爪信号检测
/// </summary>
FO_223_ClampCheck,
/// <summary>
/// 紧急出料移栽:上料横移机构到取料端
/// </summary>
FO_222_CylinderTake = 12222,
FO_224_CylinderTake ,
/// <summary>
......@@ -997,34 +1005,38 @@ namespace OnlineStore.DeviceLibrary
PO_04_CylinderUp = 20004,
/// <summary>
/// 检测夹爪夹紧信号
/// </summary>
PO_05_ClampCheck,
/// <summary>
/// 等待可以移栽料盘到流水线
/// </summary>
PO_05_WaitBox = 20005,
PO_06_WaitBox,
/// <summary>
/// 前后气缸前进
/// </summary>
PO_06_CylinderBefore = 20006,
PO_07_CylinderBefore,
/// <summary>
/// 上下气缸下降
/// </summary>
PO_07_CylinderDown = 20007,
PO_08_CylinderDown,
/// <summary>
/// 夹料气缸放松
/// </summary>
PO_08_CylinderRelax = 20008,
PO_09_CylinderRelax,
/// <summary>
/// 上下气缸上升
/// </summary>
PO_09_CylinderUp = 20009,
PO_10_CylinderUp,
/// <summary>
/// 前后气缸后退,等待4000
/// </summary>
PO_10_CylinderAfter = 20010,
PO_11_CylinderAfter,
......@@ -1035,7 +1047,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 出料流水线复位,定位气缸下降,NG气缸后退
/// </summary>
DL_R_CylinderDown=30001,
DL_R_CylinderDown =30001,
/// <summary>
/// 转动皮带开始运行
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!