Commit 84590fab LN

ste名称修改

1 个父辈 53c0a7cc
...@@ -25,8 +25,8 @@ namespace OnlineStore.AssemblyLine ...@@ -25,8 +25,8 @@ namespace OnlineStore.AssemblyLine
private System.Timers.Timer startTimer = null; private System.Timers.Timer startTimer = null;
internal FrmLineStore() internal FrmLineStore()
{ {
CheckForIllegalCrossThreadCalls = false;
InitializeComponent(); InitializeComponent();
LogUtil.logBox = this.logBox;
startTimer = new System.Timers.Timer(); startTimer = new System.Timers.Timer();
startTimer.Interval = 1000; startTimer.Interval = 1000;
startTimer.Enabled = false; startTimer.Enabled = false;
...@@ -125,6 +125,7 @@ namespace OnlineStore.AssemblyLine ...@@ -125,6 +125,7 @@ namespace OnlineStore.AssemblyLine
} }
cmbTrayType.SelectedIndex = 0; cmbTrayType.SelectedIndex = 0;
cmbTray.SelectedIndex = 0; cmbTray.SelectedIndex = 0;
LogUtil.logBox = this.logBox;
LoadOk = true; LoadOk = true;
HideForm(); HideForm();
timer1.Start(); timer1.Start();
...@@ -807,6 +808,10 @@ namespace OnlineStore.AssemblyLine ...@@ -807,6 +808,10 @@ namespace OnlineStore.AssemblyLine
private void logBox_VisibleChanged(object sender, EventArgs e) private void logBox_VisibleChanged(object sender, EventArgs e)
{ {
if (!LoadOk)
{
return;
}
if (logBox.Visible) if (logBox.Visible)
{ {
LogUtil.UpdateLogbox(); LogUtil.UpdateLogbox();
......
...@@ -77,7 +77,8 @@ D2(上料模块出口) ...@@ -77,7 +77,8 @@ D2(上料模块出口)
皮带线1相机:GigE:MV-CE200-10GC (00D76546944) 皮带线1相机:GigE:MV-CE200-10GC (00D76546944)
皮带线2相机:GigE:MV-CE200-10GC (00D76546876) 皮带线2相机:GigE:MV-CE200-10GC (00D76546876)
5 出库时根据StatusBean返回data中的参数决定料盘流转到哪里
 5 出库时根据StatusBean返回data中的参数决定料盘流转到哪里
urgentReel: true 表示紧急料,需要出到料串上 urgentReel: true 表示紧急料,需要出到料串上
cutReel: true 表示分盘料,需要出到料串上 cutReel: true 表示分盘料,需要出到料串上
smallReel: true 小料(7x8),放置到小料架上 smallReel: true 小料(7x8),放置到小料架上
...@@ -86,7 +87,14 @@ D2(上料模块出口) ...@@ -86,7 +87,14 @@ D2(上料模块出口)
// 仓位命名: 4D01020304
//第1和第2位表示楼层(4D)
//第3和第4位表示料仓(01) 01 - 18为流水线料仓, 19 - 24为包装料仓
//第5和第6位表示列(02)
//第7和第8位表示行(03)
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
......
...@@ -140,7 +140,7 @@ namespace OnlineStore.Common ...@@ -140,7 +140,7 @@ namespace OnlineStore.Common
logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本 logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本
TimeSpan span = DateTime.Now - lastTime; TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 30000) if (span.TotalSeconds > 3000000)
{ {
lastTime = DateTime.Now; lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾 logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
...@@ -161,7 +161,7 @@ namespace OnlineStore.Common ...@@ -161,7 +161,7 @@ namespace OnlineStore.Common
logBox.Text = LastText; logBox.Text = LastText;
TimeSpan span = DateTime.Now - lastTime; TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 30000) if (span.TotalSeconds > 3000000)
{ {
lastTime = DateTime.Now; lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾 logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
......
...@@ -153,7 +153,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,7 +153,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_03_GetTraySize))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_04_SeparateDeviceMove); MoveInfo.NextMoveStep(LineMoveStep.DO_04_SeparateMove);
if (LastWidth.Equals(7)) if (LastWidth.Equals(7))
{ {
LogInfo(hengyiName + "出口有料,料盘尺寸【" + LastWidth + "】上升分盘定位气缸"); LogInfo(hengyiName + "出口有料,料盘尺寸【" + LastWidth + "】上升分盘定位气缸");
...@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down); CylinderMove(MoveInfo, IO_Type.SeparateDevice_Up, IO_Type.SeparateDevice_Down);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_04_SeparateDeviceMove)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_04_SeparateMove))
{ {
if (TrayLine2.Line3CanRun && TrayLine1.Line3CanRun) if (TrayLine2.Line3CanRun && TrayLine1.Line3CanRun)
{ {
...@@ -180,13 +180,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -180,13 +180,13 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_05_LineRun)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_05_LineRun))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_06_Wait_SeparateDevice_Check); MoveInfo.NextMoveStep(LineMoveStep.DO_06_SeparateCheck);
Line3LastTrayP++; Line3LastTrayP++;
LogInfo(hengyiName + "出口有料,等待料盘到达分盘装置位置,最多等待5000"); LogInfo(hengyiName + "出口有料,等待料盘到达分盘装置位置,最多等待5000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SeparateDevice_Check, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SeparateDevice_Check, IO_VALUE.HIGH));
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_06_Wait_SeparateDevice_Check)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_06_SeparateCheck))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_07_CRun); MoveInfo.NextMoveStep(LineMoveStep.DO_07_CRun);
LogInfo(hengyiName + "出口有料,最多等待2000"); LogInfo(hengyiName + "出口有料,最多等待2000");
......
...@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -165,7 +165,7 @@ namespace OnlineStore.DeviceLibrary
} }
break; break;
case LineMoveStep.FR_02_LineRun: case LineMoveStep.FR_02_LineRun:
MoveInfo.NextMoveStep(LineMoveStep.FR_03_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FR_03_CylinderUp);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":链条停止转动,上料横移机构上升,出口顶升下降,所有阻挡气缸上升"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":链条停止转动,上料横移机构上升,出口顶升下降,所有阻挡气缸上升");
//线体停止 //线体停止
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW); IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
...@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -187,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SW_TopCylinder_Up, IO_Type.SW_TopCylinder_Down);
} }
break; break;
case LineMoveStep.FR_03_MoveCylinder_Up: case LineMoveStep.FR_03_CylinderUp:
MoveInfo.NextMoveStep(LineMoveStep.FR_04_UpdownAxisHome); MoveInfo.NextMoveStep(LineMoveStep.FR_04_UpdownAxisHome);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 升降伺服回原点"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 升降伺服回原点");
UpdownAxis.HomeMove(MoveInfo); UpdownAxis.HomeMove(MoveInfo);
...@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FR_06_MoveCylinder_Give); MoveInfo.NextMoveStep(LineMoveStep.FR_06_CylinderGive);
if (Config.IsCanOut.Equals(1)) if (Config.IsCanOut.Equals(1))
{ {
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 上料横移气缸取料端SOL"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 上料横移气缸取料端SOL");
...@@ -221,7 +221,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -221,7 +221,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
break; break;
case LineMoveStep.FR_06_MoveCylinder_Give: case LineMoveStep.FR_06_CylinderGive:
MoveInfo.NextMoveStep(LineMoveStep.FR_11_BatchAxisHome); MoveInfo.NextMoveStep(LineMoveStep.FR_11_BatchAxisHome);
MoveInfo.TimeOutSeconds = 120; MoveInfo.TimeOutSeconds = 120;
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":提升伺服回原点"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":提升伺服回原点");
...@@ -234,21 +234,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,21 +234,21 @@ namespace OnlineStore.DeviceLibrary
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
break; break;
case LineMoveStep.FR_12_BatchAxisToP2: case LineMoveStep.FR_12_BatchAxisToP2:
MoveInfo.NextMoveStep(LineMoveStep.FR_13_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FR_13_LocationDown);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 放开定位气缸,升降伺服到P1"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 放开定位气缸,升降伺服到P1");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
Thread.Sleep(50); Thread.Sleep(50);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
break; break;
case LineMoveStep.FR_13_LocationCylinder_Down: case LineMoveStep.FR_13_LocationDown:
MoveInfo.NextMoveStep(LineMoveStep.FR_14_TopCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.FR_14_TopDown);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":SL1定位气缸下降SOL,出口顶升气缸下降,夹紧气缸放松"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":SL1定位气缸下降SOL,出口顶升气缸下降,夹紧气缸放松");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
break; break;
case LineMoveStep.FR_14_TopCylinderDown: case LineMoveStep.FR_14_TopDown:
MoveInfo.NextMoveStep(LineMoveStep.FR_15_BatchAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FR_15_BatchAxisToP1);
//判断定位工位是否有料架 //判断定位工位是否有料架
......
...@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
if (CurrTrayIsNeed(currTrayNum, true)) if (CurrTrayIsNeed(currTrayNum, true))
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam); SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp);
CheckLog("检测到SW_TrayCheck:" + SecondMoveInfo.SLog + "横移顶升气缸上升 )"); CheckLog("检测到SW_TrayCheck:" + SecondMoveInfo.SLog + "横移顶升气缸上升 )");
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
return true; return true;
...@@ -180,12 +180,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -180,12 +180,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_01_TrayLocation_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_01_TrayLocation_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_02_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FO_02_LocationDown);
OutLog("出库: " + MoveInfo.SLog + " 开始:定位气缸下降,提升轴移动到P1"); OutLog("出库: " + MoveInfo.SLog + " 开始:定位气缸下降,提升轴移动到P1");
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Up, IO_Type.SL_LocationCylinder_Down);
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_02_LocationCylinder_Down)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_02_LocationDown))
{ {
LineOutStoreProcess(); LineOutStoreProcess();
} }
...@@ -198,7 +198,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -198,7 +198,7 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.HIGH))
{ {
//定位工位有料架,直接开始入料 //定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FO_05_LocationCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_05_LocationUp);
OutLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡下降, 定位气缸上升,读取料架号"); OutLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡下降, 定位气缸上升,读取料架号");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降 IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
...@@ -213,7 +213,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -213,7 +213,7 @@ namespace OnlineStore.DeviceLibrary
OutLog(" 未检测到料架,料架处理结束"); OutLog(" 未检测到料架,料架处理结束");
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_05_LocationCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_05_LocationUp))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_06_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_06_BatchAxisToP2);
OutLog("准备出库料架 " + MoveInfo.SLog + " :提升轴下降到位P2,定位气缸上升"); OutLog("准备出库料架 " + MoveInfo.SLog + " :提升轴下降到位P2,定位气缸上升");
...@@ -276,14 +276,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -276,14 +276,14 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_31_BatchAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_31_BatchAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_32_TrayLocationCylinder_After); MoveInfo.NextMoveStep(LineMoveStep.FO_32_TrayLocation_After);
OutLog("出料完成 " + MoveInfo.SLog + ": 升降盘定位气缸后退,重置OutEndSendShelfOut=fasle,OutStoreHeight = -1"); OutLog("出料完成 " + MoveInfo.SLog + ": 升降盘定位气缸后退,重置OutEndSendShelfOut=fasle,OutStoreHeight = -1");
OutEndSendShelfOut = false; OutEndSendShelfOut = false;
OutStoreHeight = -1; OutStoreHeight = -1;
OutStoreCount = 0; OutStoreCount = 0;
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_32_TrayLocationCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_32_TrayLocation_After))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_33_BatchAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_33_BatchAxisToP1);
OutLog("出料完成 " + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降"); OutLog("出料完成 " + MoveInfo.SLog + ":提升伺服到P1点,定位气缸下降");
...@@ -327,12 +327,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -327,12 +327,12 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_37_LineStop))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopCylinderDown); MoveInfo.NextMoveStep(LineMoveStep.FO_38_TopDown);
OutLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降 , "); OutLog("出料完成 " + MoveInfo.SLog + ", 料架到达出口,出口顶升下降 , ");
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_38_TopCylinderDown)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_38_TopDown))
{ {
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
...@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_212_MoveCylinder_Take); MoveInfo.NextMoveStep(LineMoveStep.FO_212_CylinderTake);
OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构取料端"); OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构取料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Give, IO_Type.SL_MoveCylinder_Take);
} }
...@@ -367,7 +367,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -367,7 +367,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_212_MoveCylinder_Take)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_212_CylinderTake))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FO_213_UpdownAxisToP2);
int targetP = Config.GetUpdownPositionP2(MoveInfo.MoveParam.PlateH); int targetP = Config.GetUpdownPositionP2(MoveInfo.MoveParam.PlateH);
...@@ -376,23 +376,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -376,23 +376,23 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_213_UpdownAxisToP2)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_213_UpdownAxisToP2))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_214_MoveCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FO_214_CylinderDown);
OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构下降"); OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构下降");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Up, IO_Type.SL_MoveCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_214_MoveCylinder_Down)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_214_CylinderDown))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_215_MoveCylinder_Tighten); MoveInfo.NextMoveStep(LineMoveStep.FO_215_CylinderTighten);
OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料气缸夹紧"); OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料气缸夹紧");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Slack, IO_Type.SL_MoveCylinder_Tighten);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_215_MoveCylinder_Tighten)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_215_CylinderTighten))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_216_MoveCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.FO_216_CylinderUp);
OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构上升"); OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_MoveCylinder_Up)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_216_CylinderUp))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_217_UpdownAxisToP1);
OutLog("紧急出料移栽" + MoveInfo.SLog + ":升降伺服到P1"); OutLog("紧急出料移栽" + MoveInfo.SLog + ":升降伺服到P1");
...@@ -407,7 +407,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -407,7 +407,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveCylineCanTakeOrGive()) if (MoveCylineCanTakeOrGive())
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_218_MoveCylinder_Give); MoveInfo.NextMoveStep(LineMoveStep.FO_218_CylinderGive);
OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构到放料端"); OutLog("紧急出料移栽" + MoveInfo.SLog + ":上料横移机构到放料端");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Take, IO_Type.SL_MoveCylinder_Give);
} }
...@@ -419,7 +419,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -419,7 +419,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_218_MoveCylinder_Give)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_218_CylinderGive))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_219_UpdownAxisToP3); MoveInfo.NextMoveStep(LineMoveStep.FO_219_UpdownAxisToP3);
OutLog("紧急出料移栽 " + MoveInfo.SLog + ":移栽伺服到P3"); OutLog("紧急出料移栽 " + MoveInfo.SLog + ":移栽伺服到P3");
...@@ -429,12 +429,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -429,12 +429,12 @@ namespace OnlineStore.DeviceLibrary
{ {
OutStoreHeight += MoveInfo.MoveParam.PlateH; OutStoreHeight += MoveInfo.MoveParam.PlateH;
OutStoreCount++; OutStoreCount++;
MoveInfo.NextMoveStep(LineMoveStep.FO_220_MoveCylinder_Slack); MoveInfo.NextMoveStep(LineMoveStep.FO_220_CylinderSlack);
OutLog("紧急出料移栽 " + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm"); OutLog("紧急出料移栽 " + MoveInfo.SLog + ":出料横移机构放松,累积出库【" + OutStoreCount + "】盘【" + OutStoreHeight + "】mm");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack); CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Tighten, IO_Type.SL_MoveCylinder_Slack);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_220_MoveCylinder_Slack)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.FO_220_CylinderSlack))
{ {
MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1); MoveInfo.NextMoveStep(LineMoveStep.FO_221_UpdownAxisToP1);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
......
...@@ -355,9 +355,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -355,9 +355,9 @@ namespace OnlineStore.DeviceLibrary
bool isNeedAllReset = false; bool isNeedAllReset = false;
if (isInSuddenDown || isNoAirCheck) if (isInSuddenDown || isNoAirCheck)
{ {
TrayManager.LineNeedEmptyTrayNum = 0; //TrayManager.LineNeedEmptyTrayNum = 0;
isNeedAllReset = true; isNeedAllReset = true;
LogUtil.error( Name + "收到复位信号,在急停中或没有气压中,强制所有设备复位,清理出库需要的托盘数量~"); LogUtil.error( Name + "收到复位信号,急停中或没有气压报警中,强制所有设备复位~");
} }
else if ((runStatus == LineRunStatus.HomeMoving || runStatus == LineRunStatus.Reset) && NoAlarm()) else if ((runStatus == LineRunStatus.HomeMoving || runStatus == LineRunStatus.Reset) && NoAlarm())
{ {
...@@ -926,7 +926,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -926,7 +926,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
SetWarnMsg(moveEquip.Name + "在复位过程中报警,需要重新复位"); //SetWarnMsg(moveEquip.Name + "在复位过程中报警,需要重新复位");
LogUtil.error(Name+" "+ moveEquip.Name + "在复位过程中报警,需要重新复位");
} }
} }
} }
......
...@@ -240,7 +240,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -240,7 +240,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Sw23TrayNum = trayNum; Sw23TrayNum = trayNum;
SW23_MoveInfo.NewMove(LineMoveType.InStore); SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitCheck);
SWLog("横移轨道23:检测到SW2_TrayCheck,定位气缸下降,等待横移2托盘检测信号,托盘号 [" + Sw23TrayNum + "] "); SWLog("横移轨道23:检测到SW2_TrayCheck,定位气缸下降,等待横移2托盘检测信号,托盘号 [" + Sw23TrayNum + "] ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down); CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
...@@ -258,7 +258,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -258,7 +258,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Sw41TrayNum = trayNum; Sw41TrayNum = trayNum;
SW41_MoveInfo.NewMove(LineMoveType.InStore); SW41_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitCheck);
SWLog("横移轨道41:检测到SW4_TrayCheck,定位气缸下降, 等待横移4托盘检测信号,更新托盘号 [" + Sw41TrayNum + "] "); SWLog("横移轨道41:检测到SW4_TrayCheck,定位气缸下降, 等待横移4托盘检测信号,更新托盘号 [" + Sw41TrayNum + "] ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down); CylinderMove(SW41_MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
...@@ -361,7 +361,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -361,7 +361,7 @@ namespace OnlineStore.DeviceLibrary
if (TrayManager.checkWatch(sw41WaitWatch, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(sw41WaitWatch, TrayManager.SwTrayWaitTime, true))
{ {
SW41_MoveInfo.NewMove(LineMoveType.InStore); SW41_MoveInfo.NewMove(LineMoveType.InStore);
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitCheck);
UpateSw41TrayNum(); UpateSw41TrayNum();
SWLog("横移轨道41:检测到SW4_TrayCheck,定位气缸下降, 等待横移4托盘检测信号,更新托盘号 [" + Sw41TrayNum + "] "); SWLog("横移轨道41:检测到SW4_TrayCheck,定位气缸下降, 等待横移4托盘检测信号,更新托盘号 [" + Sw41TrayNum + "] ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
...@@ -409,7 +409,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -409,7 +409,7 @@ namespace OnlineStore.DeviceLibrary
if (TrayManager.checkWatch(sw23WaitWatch, TrayManager.SwTrayWaitTime, true)) if (TrayManager.checkWatch(sw23WaitWatch, TrayManager.SwTrayWaitTime, true))
{ {
SW23_MoveInfo.NewMove(LineMoveType.InStore); SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitCheck);
UpateSw23TrayNum(); UpateSw23TrayNum();
SWLog("横移轨道23:检测到SW2_TrayCheck,定位气缸下降,等待横移2托盘检测信号,更新托盘号 [" + Sw23TrayNum + "] "); SWLog("横移轨道23:检测到SW2_TrayCheck,定位气缸下降,等待横移2托盘检测信号,更新托盘号 [" + Sw23TrayNum + "] ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
...@@ -525,7 +525,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -525,7 +525,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.SW4_TrayCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SW4_TrayCheck).Equals(IO_VALUE.HIGH))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitCheck);
SWLog("横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 "); SWLog("横移轨道41: 等待横移4托盘检测信号 ,SW4_StopDown上升 ");
CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
...@@ -540,7 +540,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -540,7 +540,7 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW4_TrayCheck, IO_VALUE.HIGH));
} }
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitFixtureCheck)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitCheck))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp);
SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 "); SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 ");
...@@ -562,12 +562,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -562,12 +562,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_DriveMotorMove)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_DriveMotorMove))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW05_WaitOutFixtureCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW05_WaitOutCheck);
SWLog("横移轨道41:等待托盘到达出口 "); SWLog("横移轨道41:等待托盘到达出口 ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(800)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(800));
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW1_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_WaitOutFixtureCheck)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_WaitOutCheck))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW06_WatOutFixture2); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW06_WatOutFixture2);
SWLog("横移轨道41:再次验证托盘是否在出口处 "); SWLog("横移轨道41:再次验证托盘是否在出口处 ");
...@@ -577,7 +577,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -577,7 +577,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_WatOutFixture2)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_WatOutFixture2))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW07_TopCylinderDown); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW07_TopDown);
SWLog("横移轨道41:托盘已到达出口,顶升气缸下降,判断入料1是否需要此托盘 "); SWLog("横移轨道41:托盘已到达出口,顶升气缸下降,判断入料1是否需要此托盘 ");
CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down); CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
Thread.Sleep(50); Thread.Sleep(50);
...@@ -586,7 +586,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -586,7 +586,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down); CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
} }
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_TopCylinderDown)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_TopDown))
{ {
//开始入库 //开始入库
bool result = FeedingEquipMap[101].CanStartCheckOut(Sw41TrayNum); bool result = FeedingEquipMap[101].CanStartCheckOut(Sw41TrayNum);
...@@ -675,7 +675,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -675,7 +675,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.HIGH))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitCheck);
SWLog("横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 "); SWLog("横移轨道23: 等待横移4托盘检测信号 ,SW2_StopDown上升 ");
CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
...@@ -690,7 +690,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -690,7 +690,7 @@ namespace OnlineStore.DeviceLibrary
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
} }
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitFixtureCheck)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitCheck))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp);
SWLog("横移轨道23:顶升气缸上升 ,至少等待1000 "); SWLog("横移轨道23:顶升气缸上升 ,至少等待1000 ");
...@@ -712,12 +712,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -712,12 +712,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_DriveMotorMove)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW04_DriveMotorMove))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW05_WaitOutFixtureCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW05_WaitOutCheck);
SWLog("横移轨道23:等待托盘到达出口 "); SWLog("横移轨道23:等待托盘到达出口 ");
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(800)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(800));
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW3_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_WaitOutFixtureCheck)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW05_WaitOutCheck))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW06_WatOutFixture2); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW06_WatOutFixture2);
SWLog("横移轨道23:再次验证托盘是否在出口处 "); SWLog("横移轨道23:再次验证托盘是否在出口处 ");
...@@ -727,7 +727,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -727,7 +727,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_WatOutFixture2)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW06_WatOutFixture2))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW07_TopCylinderDown); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW07_TopDown);
SWLog("横移轨道23:托盘已到达出口,顶升气缸下降 "); SWLog("横移轨道23:托盘已到达出口,顶升气缸下降 ");
CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down); CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Up, IO_Type.SW2_TopCylinder_Down);
Thread.Sleep(50); Thread.Sleep(50);
...@@ -736,7 +736,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -736,7 +736,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down); CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Up, IO_Type.SW3_TopCylinder_Down);
} }
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_TopCylinderDown)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW07_TopDown))
{ {
//开始入库 //开始入库
bool result = FeedingEquipMap[104].CanStartCheckOut(Sw23TrayNum); bool result = FeedingEquipMap[104].CanStartCheckOut(Sw23TrayNum);
...@@ -841,7 +841,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -841,7 +841,7 @@ namespace OnlineStore.DeviceLibrary
} }
//前进后退气缸后退以后才可以出库 //前进后退气缸后退以后才可以出库
else if (move.runStatus.Equals(LineRunStatus.Busy) && move.MoveInfo.MoveType.Equals(LineMoveType.OutStore) && else if (move.runStatus.Equals(LineRunStatus.Busy) && move.MoveInfo.MoveType.Equals(LineMoveType.OutStore) &&
move.MoveInfo.MoveStep >= (LineMoveStep.MO_58_UpDownCylinderDown)) move.MoveInfo.MoveStep >= (LineMoveStep.MO_58_CylinderDown))
{ {
return true; return true;
} }
......
...@@ -63,7 +63,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -63,7 +63,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving; runStatus = LineRunStatus.HomeMoving;
LogInfo("开始原点返回: 上下气缸回原点,阻挡1气缸上升 "); LogInfo("开始 原点返回: 升降轴回原点,阻挡气缸上升 ");
MoveInfo.NewMove(LineMoveType.ReturnHome); MoveInfo.NewMove(LineMoveType.ReturnHome);
StartReset(); StartReset();
if (isDebug) if (isDebug)
...@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -81,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
LogInfo("开始重置: 上下气缸回原点,阻挡1气缸上升 "); LogInfo("开始重置: 升降轴回原点,阻挡气缸上升 ");
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
...@@ -129,22 +129,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -129,22 +129,22 @@ namespace OnlineStore.DeviceLibrary
//复位时夹紧气缸需要发送,不然后面出入库会有问题 //复位时夹紧气缸需要发送,不然后面出入库会有问题
switch (MoveInfo.MoveStep) switch (MoveInfo.MoveStep)
{ {
case LineMoveStep.MH_UpDownHomeMove: case LineMoveStep.MH_UpDownHome:
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.MH_CylinderUp);
DebugInfo(MoveInfo.MoveType + " : (上下轴原点返回完成,上下轴走到待机点 )开始"); DebugInfo(MoveInfo.MoveType + " : 升降轴走到待机点");
UpdownUpMove(); UpdownUpMove();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
break; break;
case LineMoveStep.MH_UpDownCylinder_Up: case LineMoveStep.MH_CylinderUp:
MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back); MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinderBack);
DebugInfo(MoveInfo.MoveType + " : (上升到位,顶升气缸下降,前后气缸回退 )开始"); DebugInfo(MoveInfo.MoveType + " : 上升气缸到位,顶升气缸下降,前后气缸后退,夹紧气缸放松");
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
break; break;
case LineMoveStep.MH_OtherCylinder_Back: case LineMoveStep.MH_OtherCylinderBack:
LogInfo(MoveInfo.MoveType + " 完成!"); LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
...@@ -174,13 +174,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -174,13 +174,13 @@ namespace OnlineStore.DeviceLibrary
{ {
DebugInfo("停止运动时出库执行中,减去托盘数;"); DebugInfo("停止运动时出库执行中,减去托盘数;");
//减去需要的盘数 //减去需要的盘数
TrayManager.DelNeedEmptyTrayNum(); // TrayManager.DelNeedEmptyTrayNum();
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ,开始 "); LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ");
UpdownUpMove(); UpdownUpMove();
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
...@@ -333,12 +333,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -333,12 +333,12 @@ namespace OnlineStore.DeviceLibrary
{ {
if (UseAxis) if (UseAxis)
{ {
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownHomeMove); MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownHome);
UpdownAxis.HomeMove(MoveInfo); UpdownAxis.HomeMove(MoveInfo);
} }
else else
{ {
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.MH_CylinderUp);
CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
} }
} }
......
...@@ -60,13 +60,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -60,13 +60,13 @@ namespace OnlineStore.DeviceLibrary
private string posId = ""; private string posId = "";
public bool StartOut(InOutParam moveParam) public bool StartOut(InOutParam moveParam)
{ {
if (MoveInfo.MoveType.Equals(LineMoveType.None) && (equipBean.runStatus .Equals(LineRunStatus.Runing)|| equipBean.runStatus.Equals(LineRunStatus.Busy))) if (LineTurnIsStop() && MoveInfo.MoveType.Equals(LineMoveType.None) && (equipBean.runStatus .Equals(LineRunStatus.Runing)|| equipBean.runStatus.Equals(LineRunStatus.Busy)))
{ {
MoveInfo.MoveParam = moveParam; MoveInfo.MoveParam = moveParam;
MoveInfo.NewMove(LineMoveType.OutStore); MoveInfo.NewMove(LineMoveType.OutStore);
posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
MoveInfo.NextMoveStep(LineMoveStep.DLO_01_WaitEntryNoTray); MoveInfo.NextMoveStep(LineMoveStep.DLO_01_WaitEntryNoTray);
LogUtil.info(Name + "开始出料【" + moveParam.PosId + "】处理:" + MoveInfo.SLog + "等待入口无料盘,NG气缸后退"); LogUtil.info(Name + "开始出料【" + moveParam.ToStr() + "】:" + MoveInfo.SLog + "等待出口无料盘,NG气缸后退");
if (equipBeanId.Equals(302) && EntryLocation_Check.Equals(IO_Type.EntryLocation_Check2)) if (equipBeanId.Equals(302) && EntryLocation_Check.Equals(IO_Type.EntryLocation_Check2))
{ {
equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After); equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After);
...@@ -107,14 +107,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -107,14 +107,14 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - MoveInfo.LastSetpTime; TimeSpan span = DateTime.Now - MoveInfo.LastSetpTime;
if (span.TotalMinutes > 3) if (span.TotalMinutes > 3)
{ {
LogUtil.error(Name + "等待出库等待出口无料盘超时:" + FormUtil.GetSpanStr(span), 305); LogUtil.error(Name + "等待出口无料盘超时:" + FormUtil.GetSpanStr(span), 305);
} }
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_02_WaitExitNoTray)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_02_WaitExitNoTray))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_03_LineRun); MoveInfo.NextMoveStep(LineMoveStep.DLO_03_LineRun);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "入口出口都没有料盘,转动皮带线到入口定位亮"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "出口无料盘,转动到入口定位");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
lineRun.StartLineRun(LineRun_Do, EntryLocation_Check, null); lineRun.StartLineRun(LineRun_Do, EntryLocation_Check, null);
} }
...@@ -123,7 +123,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -123,7 +123,7 @@ namespace OnlineStore.DeviceLibrary
if (LineTurnIsStop()) if (LineTurnIsStop())
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_04_CanReviceTray); MoveInfo.NextMoveStep(LineMoveStep.DLO_04_CanReviceTray);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "------------等待移栽放下料盘--------"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "--- 等待移栽放料盘-- ");
if (equipBean.IsDebug) if (equipBean.IsDebug)
{ MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); } { MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); }
} }
...@@ -133,19 +133,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,19 +133,19 @@ namespace OnlineStore.DeviceLibrary
if (equipBean.IsDebug) if (equipBean.IsDebug)
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_05_TrayIsOk); MoveInfo.NextMoveStep(LineMoveStep.DLO_05_TrayIsOk);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "移栽放下料盘后更新为已放料盘"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "调试中更改为已放料盘");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_05_TrayIsOk)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_05_TrayIsOk))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_06_LineRun_OutLocation_Check); MoveInfo.NextMoveStep(LineMoveStep.DLO_06_OutCheck);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "------------料盘已放下--------转动到出口定位"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + " --料盘已放----转动到出口定位");
LastTrayPosition = 1; LastTrayPosition = 1;
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, null); lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, null);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_06_LineRun_OutLocation_Check)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_06_OutCheck))
{ {
if (LineTurnIsStop()) if (LineTurnIsStop())
{ {
...@@ -158,8 +158,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -158,8 +158,8 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveParam.InStoreNg) if (MoveInfo.MoveParam.InStoreNg)
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_08_NGCylinder_Before); MoveInfo.NextMoveStep(LineMoveStep.DLO_08_NGBefore);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸前进,等待2000"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸前进");
equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_After, IO_Type.NGCylinder_Before); equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_After, IO_Type.NGCylinder_Before);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
...@@ -169,13 +169,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -169,13 +169,13 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_08_NGCylinder_Before)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_08_NGBefore))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DLO_09_NGCylinder_After); MoveInfo.NextMoveStep(LineMoveStep.DLO_09_NGAfter);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸后退"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "NG气缸后退");
equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After); equipBean.CylinderMove(MoveInfo, IO_Type.NGCylinder_Before, IO_Type.NGCylinder_After);
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_09_NGCylinder_After)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DLO_09_NGAfter))
{ {
CheckIsNeedRun(); CheckIsNeedRun();
} }
...@@ -246,7 +246,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -246,7 +246,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
MoveInfo.NextMoveStep(nextStep); MoveInfo.NextMoveStep(nextStep);
LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "最后一盘料位置【" + LastTrayPosition + "】,继续转动一个工位"); LogUtil.info(Name + "出料【" + posId + "】:" + MoveInfo.SLog + "最后一盘料位置【" + LastTrayPosition + "】,转动到出口定位");
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, LineEndProcess); lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, LineEndProcess);
} }
...@@ -302,7 +302,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -302,7 +302,7 @@ namespace OnlineStore.DeviceLibrary
lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, LineEndProcess); lineRun.StartLineRun(LineRun_Do, ExitLocation_Check, LineEndProcess);
} }
else if (MoveInfo.MoveStep <= LineMoveStep.DLO_01_WaitEntryNoTray && else if (MoveInfo.MoveStep <= LineMoveStep.DLO_01_WaitEntryNoTray&&MoveInfo.IsInWait.Equals(false) &&
equipBean.IOValue(ExitTray_Check).Equals(IO_VALUE.HIGH)) equipBean.IOValue(ExitTray_Check).Equals(IO_VALUE.HIGH))
{ {
//皮带线1出口有料,皮带3入库无料,且在停止状态 //皮带线1出口有料,皮带3入库无料,且在停止状态
...@@ -372,6 +372,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,6 +372,10 @@ namespace OnlineStore.DeviceLibrary
while (true) while (true)
{ {
Thread.Sleep(50); Thread.Sleep(50);
if (IOManager.IOValue(moveDO, subType).Equals(IO_VALUE.LOW))
{
IOManager.IOMove(moveDO, IO_VALUE.HIGH, subType);
}
TimeSpan span = DateTime.Now - startTime; TimeSpan span = DateTime.Now - startTime;
if (!InTurn) if (!InTurn)
{ {
......
...@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving; runStatus = LineRunStatus.HomeMoving;
LogInfo("开始原点返回: (上下气上升,阻挡气缸上升 )开始"); LogInfo("开始 原点返回: 升降轴回原点,阻挡气缸上升 ");
MoveInfo.NewMove(LineMoveType.ReturnHome); MoveInfo.NewMove(LineMoveType.ReturnHome);
StartReset(); StartReset();
...@@ -78,7 +78,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,7 +78,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
LogInfo("开始重置:清理盘号,(上下气上升,阻挡气缸上升 )开始 "); LogInfo("开始重置:清理盘号,升降轴回原点,阻挡气缸上升 ");
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
MoveInfo.NewMove(LineMoveType.Reset); MoveInfo.NewMove(LineMoveType.Reset);
StartReset(); StartReset();
...@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary
{ {
ResetClearData(); ResetClearData();
lineStatus = LineStatus.ResetMove; lineStatus = LineStatus.ResetMove;
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.MH_CylinderUp);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownHomeMove(); UpdownHomeMove();
if (IsDebug) if (IsDebug)
...@@ -119,20 +119,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -119,20 +119,20 @@ namespace OnlineStore.DeviceLibrary
{ {
switch (MoveInfo.MoveStep) switch (MoveInfo.MoveStep)
{ {
case LineMoveStep.MH_UpDownHomeMove: case LineMoveStep.MH_UpDownHome:
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.MH_CylinderUp);
LogInfo(MoveInfo.MoveType + " : (上下轴原点返回完成,上下轴走到待机点 )开始"); LogInfo(MoveInfo.MoveType + " :升降轴走到待机点");
UpdownUpMove(); UpdownUpMove();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
break; break;
case LineMoveStep.MH_UpDownCylinder_Up: case LineMoveStep.MH_CylinderUp:
MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back); MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinderBack);
LogInfo(MoveInfo.MoveType + " : (上升到位,顶升气缸下降,前后气缸后退,夹紧气缸放松 )开始"); LogInfo(MoveInfo.MoveType + " :上升气缸到位,顶升气缸下降,前后气缸后退,夹紧气缸放松 ");
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
break; break;
case LineMoveStep.MH_OtherCylinder_Back: case LineMoveStep.MH_OtherCylinderBack:
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
LogInfo(MoveInfo.MoveType + " 完成!"); LogInfo(MoveInfo.MoveType + " 完成!");
...@@ -159,7 +159,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -159,7 +159,7 @@ namespace OnlineStore.DeviceLibrary
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
LogInfo("停止运动:(上下气缸上升 ,阻挡气缸输入=0,顶升气缸下降 ) "); LogInfo("停止运动: 上下气缸上升 ,阻挡气缸上升,顶升气缸下降 ");
if (UseAxis) if (UseAxis)
{ {
...@@ -257,13 +257,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,13 +257,13 @@ namespace OnlineStore.DeviceLibrary
{ {
if (UseAxis) if (UseAxis)
{ {
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownHomeMove); MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownHome);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
UpdownAxis.HomeMove(MoveInfo); UpdownAxis.HomeMove(MoveInfo);
} }
else else
{ {
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up); MoveInfo.NextMoveStep(LineMoveStep.MH_CylinderUp);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
} }
......
...@@ -95,15 +95,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -95,15 +95,19 @@ namespace OnlineStore.DeviceLibrary
if (!serverResult.pos.Equals("")) if (!serverResult.pos.Equals(""))
{ {
// 仓位命名: 4D01020304
//第1和第2位表示楼层(4D)
//第3和第4位表示料仓(01) 01 - 18为流水线料仓, 19 - 24为包装料仓
//第5和第6位表示列(02)
//第7和第8位表示行(03)
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
string posId = serverResult.pos; string posId = serverResult.pos;
int plateW = width; int plateW = width;
int plateH = height; int plateH = height;
string[] posArray = posId.Split('#');
if (!(posArray.Length == 2)) int storeId = InOutParam.GetPosStoreId(posId);
{
return msg = deviceName + " 入库库位格式错误:条码【" + codeStr + "】库位【" + posId + "】";
}
int storeId = int.Parse(posArray[0]);
string wareNum = serverResult.barcode; string wareNum = serverResult.barcode;
//根据库位号查找移栽 //根据库位号查找移栽
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId]; MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId];
......
...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 流水线需要的空盘数量 /// 流水线需要的空盘数量
/// </summary> /// </summary>
internal static int LineNeedEmptyTrayNum = 0; // internal static int LineNeedEmptyTrayNum = 0;
/// <summary> /// <summary>
/// 最大托盘号,必须按照顺序从1到6走过 /// 最大托盘号,必须按照顺序从1到6走过
/// </summary> /// </summary>
...@@ -44,15 +44,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -44,15 +44,15 @@ namespace OnlineStore.DeviceLibrary
{ {
return new List<TrayInfo>(TrayInfoMap.Values); return new List<TrayInfo>(TrayInfoMap.Values);
} }
internal static void AddNeedEmptyTrayNum() //internal static void AddNeedEmptyTrayNum()
{ //{
Interlocked.Increment(ref LineNeedEmptyTrayNum); // Interlocked.Increment(ref LineNeedEmptyTrayNum);
} //}
internal static void DelNeedEmptyTrayNum() //internal static void DelNeedEmptyTrayNum()
{ //{
Interlocked.Decrement(ref LineNeedEmptyTrayNum); // Interlocked.Decrement(ref LineNeedEmptyTrayNum);
} //}
/// <summary> /// <summary>
/// 对应的盘号(1-6)是否有料盘 /// 对应的盘号(1-6)是否有料盘
/// </summary> /// </summary>
......
...@@ -74,23 +74,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -74,23 +74,42 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!PosId.Equals("")) if (!PosId.Equals(""))
{ {
string[] arr = PosId.Split('#');
if (arr.Length >= 2)
{
try try
{ {
return int.Parse(arr[0]); return int.Parse(PosId.Substring(2, 2));
} }
catch (Exception ex) catch (Exception ex)
{ {
} }
} }
}
return -1; return -1;
} }
public static int GetPosStoreId(string posId)
{
if (!posId.Equals(""))
{
try
{
int index = posId.IndexOf("#");
if (index > 0)
{
string[] arr = posId.Split('#');
if (arr.Length >= 2)
{
return int.Parse(arr[0]);
}
}
return int.Parse(posId.Substring(2, 2));
}
catch (Exception ex)
{
}
}
return -1;
}
/// <summary> /// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上 /// urgentReel: true 表示紧急料,需要出到料串上
/// </summary> /// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!