Commit b7962bf7 LN

增加出料线hy

1 个父辈 d91c1952
...@@ -113,8 +113,7 @@ namespace OnlineStore.AssemblyLine ...@@ -113,8 +113,7 @@ namespace OnlineStore.AssemblyLine
} }
if (chbAutoRead.Checked && this.Visible) if (chbAutoRead.Checked && this.Visible)
{ {
ReadIOList(); ReadIOList();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
} }
lblName.BackColor = equipBean.GetShowColor(); lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait) if (equipBean.runStatus > LineRunStatus.Wait)
...@@ -125,8 +124,7 @@ namespace OnlineStore.AssemblyLine ...@@ -125,8 +124,7 @@ namespace OnlineStore.AssemblyLine
} }
} }
else else
{ {
//lblName.BackColor= System.Drawing.Color.DodgerBlue;
if (!btnStart.Enabled) if (!btnStart.Enabled)
{ {
FormStatus(false ); FormStatus(false );
...@@ -139,7 +137,7 @@ namespace OnlineStore.AssemblyLine ...@@ -139,7 +137,7 @@ namespace OnlineStore.AssemblyLine
lblAgvInfo.Text = "AGV-" + equipBean.Config.AgvInName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvInName).ToString() + lblAgvInfo.Text = "AGV-" + equipBean.Config.AgvInName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvInName).ToString() +
"\t AGV-" + equipBean.Config.AgvOutName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvOutName).ToString() + ""; "\t AGV-" + equipBean.Config.AgvOutName + " 状态:" + AgvClient.GetAction(equipBean.Config.AgvOutName).ToString() + "";
string canOut = equipBean.Config.IsCanOut.Equals(1) ? "紧急出料模块" : "入料模块"; string canOut = equipBean.Config.IsCanOut.Equals(1) ? "紧急出料模块" : "入料模块";
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus) + "(" + canOut + ")"; lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus) + "(" + canOut + ")";
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
string text = ""; string text = "";
List<InOutParam> ps = new List<InOutParam>(equipBean.waitInStoreList); List<InOutParam> ps = new List<InOutParam>(equipBean.waitInStoreList);
...@@ -246,17 +244,13 @@ namespace OnlineStore.AssemblyLine ...@@ -246,17 +244,13 @@ namespace OnlineStore.AssemblyLine
axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis, equipBean.BatchAxis }); axisMoveControl1.LoadData(equipBean, new AxisBean[] { equipBean.UpdownAxis, equipBean.BatchAxis });
cmbSizeList.Items.Clear(); cmbSizeList.Items.Clear();
cmbSizeList.Items.Add("0=默认位置"); cmbSizeList.Items.Add("0=默认位置");
//for (int i = 8; i <= 48; i = i + 4)
//{
// cmbSizeList.Items.Add(i.ToString());
//}
foreach(int heigth in LineManager.GetTrayList()) foreach(int heigth in LineManager.GetTrayList())
{ {
cmbSizeList.Items.Add(heigth); cmbSizeList.Items.Add(heigth);
} }
cmbSizeList.SelectedIndex = 0; cmbSizeList.SelectedIndex = 0;
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, 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();
txtUpdownP3.Text = equipBean.Config.UpDownAxisP3.ToString(); txtUpdownP3.Text = equipBean.Config.UpDownAxisP3.ToString();
......
...@@ -52,7 +52,7 @@ namespace OnlineStore.AssemblyLine ...@@ -52,7 +52,7 @@ namespace OnlineStore.AssemblyLine
LoadDP2(); LoadDP2();
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
this.Text = equipBean.Name; this.Text = equipBean.Name;
...@@ -137,7 +137,7 @@ namespace OnlineStore.AssemblyLine ...@@ -137,7 +137,7 @@ namespace OnlineStore.AssemblyLine
} }
lblMoveInfo.Text = equipBean.GetMoveStr(); lblMoveInfo.Text = equipBean.GetMoveStr();
// string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库":"不可出库" ; // string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库":"不可出库" ;
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
} }
......
...@@ -53,7 +53,7 @@ namespace OnlineStore.AssemblyLine ...@@ -53,7 +53,7 @@ namespace OnlineStore.AssemblyLine
cmbSizeList.Items.Add(heigth); cmbSizeList.Items.Add(heigth);
} }
cmbSizeList.SelectedIndex = 0; cmbSizeList.SelectedIndex = 0;
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, 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;
...@@ -117,21 +117,18 @@ namespace OnlineStore.AssemblyLine ...@@ -117,21 +117,18 @@ namespace OnlineStore.AssemblyLine
} }
if ( this.Visible) if ( this.Visible)
{ {
ReadIOList(); ReadIOList();
//lblTrayNum.Text = "托盘编码:" + TrayManager.GetTrayNum(equipBean.DeviceID);
} }
lblName.BackColor = equipBean.GetShowColor(); lblName.BackColor = equipBean.GetShowColor();
if (equipBean.runStatus > LineRunStatus.Wait) if (equipBean.runStatus > LineRunStatus.Wait)
{ {
//lblName.BackColor = Color.Green;
if (btnStart.Enabled) if (btnStart.Enabled)
{ {
FormStatus(true); FormStatus(true);
} }
} }
else else
{ {
//lblName.BackColor = System.Drawing.Color.DodgerBlue;
if (!btnStart.Enabled) if (!btnStart.Enabled)
{ {
FormStatus(false); FormStatus(false);
...@@ -147,7 +144,7 @@ namespace OnlineStore.AssemblyLine ...@@ -147,7 +144,7 @@ namespace OnlineStore.AssemblyLine
} }
lblMoveInfo.Text = equipBean.GetMoveStr()+"\r\n料仓类型:"+(equipBean.Config.IsBigTray.Equals(1)?"大料盘":"小料盘"); lblMoveInfo.Text = equipBean.GetMoveStr()+"\r\n料仓类型:"+(equipBean.Config.IsBigTray.Equals(1)?"大料盘":"小料盘");
string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库" : "不可出库"; string canOut = LineManager.Line.CanOutStore(equipBean.DeviceID) ? "可出库" : "不可出库";
lblStoreStatus.Text = KTK_Store.GetRunStr(equipBean.lineStatus, equipBean.runStatus) + "(" + canOut + ")"; lblStoreStatus.Text = KTK_Store.GetRunStr( equipBean.runStatus) + "(" + canOut + ")";
lblThisSta.Text = equipBean.WarnMsg; lblThisSta.Text = equipBean.WarnMsg;
string text = ""; string text = "";
List<InOutParam> ps = new List<InOutParam>(equipBean.waitInStoreList); List<InOutParam> ps = new List<InOutParam>(equipBean.waitInStoreList);
......
...@@ -18,11 +18,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,11 +18,8 @@ namespace OnlineStore.DeviceLibrary
public bool UseAxis = false; public bool UseAxis = false;
public ConcurrentQueue<InOutParam> waitOutStoreList = new ConcurrentQueue<InOutParam>(); public ConcurrentQueue<InOutParam> waitOutStoreList = new ConcurrentQueue<InOutParam>();
public List<InOutParam> waitInStoreList = new List<InOutParam>(); public List<InOutParam> waitInStoreList = new List<InOutParam>();
internal object waitInListLock = ""; internal object waitInListLock = "";
/// <summary> public LineMoveInfo SecondMoveInfo = null;
///移栽装置后面分为两条移动线
/// </summary>
public LineMoveInfo SecondMoveInfo = null;
protected int trayCount = 0; protected int trayCount = 0;
/// <summary> /// <summary>
/// 上一个盘号 /// 上一个盘号
...@@ -77,10 +74,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -77,10 +74,7 @@ namespace OnlineStore.DeviceLibrary
{ {
} }
public bool MoveStop = false; public bool MoveStop = false;
/// <summary>
/// 运动处理
/// </summary>
protected override void BusyMoveProcess() protected override void BusyMoveProcess()
{ {
if (MoveStop) if (MoveStop)
...@@ -215,38 +209,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -215,38 +209,20 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isDebug) if (isDebug)
{ {
IsDebug = true; IsDebug = true;
//两个阻挡气缸下降
lineStatus = LineStatus.Debugging;
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH); IOMove(IO_Type.StopDown1, IO_VALUE.HIGH);
IOMove(IO_Type.StopDown2, IO_VALUE.HIGH); IOMove(IO_Type.StopDown2, IO_VALUE.HIGH);
LogInfo("从正常状态切换到调试状态!"); LogInfo("从正常状态切换到调试状态!");
} }
else if (lineStatus.Equals(LineStatus.Debugging)) else
{ {
IsDebug = false; IsDebug = false;
lineStatus = LineStatus.StoreOnline;
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH); IOMove(IO_Type.StopDown1, IO_VALUE.HIGH);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW); IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
LogInfo("从调试状态切换到正常状态!"); LogInfo("从调试状态切换到正常状态!");
} }
} }
else
{
if (isDebug)
{
IsDebug = true;
//两个阻挡气缸下降
lineStatus = LineStatus.Debugging;
LogInfo("从正常状态切换到调试状态!");
}
else if (lineStatus.Equals(LineStatus.Debugging))
{
IsDebug = false;
lineStatus = LineStatus.StoreOnline;
LogInfo("从调试状态切换到正常状态!");
}
}
} }
...@@ -657,8 +633,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -657,8 +633,7 @@ namespace OnlineStore.DeviceLibrary
msg += "上个托盘:" + preTrayNum + "\n"; msg += "上个托盘:" + preTrayNum + "\n";
msg += "当前托盘:" + currTrayNum + "\n"; msg += "当前托盘:" + currTrayNum + "\n";
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
msg += "lineS: " + lineStatus + "\n";
msg += "alarm: " + alarmType +" "+LastAlarmTime.ToLongTimeString()+ "\n"; msg += "alarm: " + alarmType +" "+LastAlarmTime.ToLongTimeString()+ "\n";
msg += "MoveT:"+ MoveInfo.MoveType+"\n"; msg += "MoveT:"+ MoveInfo.MoveType+"\n";
msg += "MoveS :" + MoveInfo.SLog + "\n"; msg += "MoveS :" + MoveInfo.SLog + "\n";
...@@ -667,8 +642,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -667,8 +642,7 @@ namespace OnlineStore.DeviceLibrary
return msg; return msg;
} }
internal void MoveEndS() internal void MoveEndS()
{ {
lineStatus = LineStatus.StoreOnline;
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
......
...@@ -64,8 +64,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,8 +64,7 @@ namespace OnlineStore.DeviceLibrary
{ {
mainTimer.Enabled = false; mainTimer.Enabled = false;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
lineStatus = LineStatus.StoreOnline;
runStatus = LineRunStatus.HomeMoving; runStatus = LineRunStatus.HomeMoving;
LogInfo("开始原点返回: "); LogInfo("开始原点返回: ");
...@@ -115,8 +114,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -115,8 +114,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreHeight = -1; OutStoreHeight = -1;
//OutStoreCount = 0; //OutStoreCount = 0;
BatchAxisStopCheck(); BatchAxisStopCheck();
ResetClearData(); ResetClearData();
lineStatus = LineStatus.ResetMove;
IOMove(IO_Type.SL_HddLed, IO_VALUE.HIGH); IOMove(IO_Type.SL_HddLed, IO_VALUE.HIGH);
MoveInfo.NextMoveStep(LineMoveStep.FR_01_StopUp); MoveInfo.NextMoveStep(LineMoveStep.FR_01_StopUp);
...@@ -325,8 +323,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,8 +323,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public override void StopRun() public override void StopRun()
{ {
runStatus = LineRunStatus.Wait; runStatus = LineRunStatus.Wait;
lineStatus = LineStatus.StoreOnline;
if (mainTimer != null) if (mainTimer != null)
{ {
mainTimer.Enabled = false; mainTimer.Enabled = false;
...@@ -963,8 +960,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -963,8 +960,7 @@ namespace OnlineStore.DeviceLibrary
msg += "上个托盘:" + preTrayNum + "\n"; msg += "上个托盘:" + preTrayNum + "\n";
msg += "当前托盘:" + currTrayNum + "\n"; msg += "当前托盘:" + currTrayNum + "\n";
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\n";
msg += "lineS: " + lineStatus + "\n";
msg += "alarm: " + alarmType + "\n"; msg += "alarm: " + alarmType + "\n";
msg += "MoveT:" + MoveInfo.MoveType + "\n"; msg += "MoveT:" + MoveInfo.MoveType + "\n";
msg += "MoveS :" + MoveInfo.SLog + "\n"; msg += "MoveS :" + MoveInfo.SLog + "\n";
......
...@@ -103,8 +103,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,8 +103,7 @@ namespace OnlineStore.DeviceLibrary
} }
public override bool StartInStoreMove(InOutParam param) public override bool StartInStoreMove(InOutParam param)
{ {
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
lineStatus = LineStatus.InStoreExecute;
MoveInfo.NewMove(LineMoveType.InStore); MoveInfo.NewMove(LineMoveType.InStore);
MoveInfo.MoveParam = new InOutParam(); MoveInfo.MoveParam = new InOutParam();
//判断是哪个工位有料架 //判断是哪个工位有料架
......
...@@ -48,8 +48,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,8 +48,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
lineStatus = LineStatus.OutStoreExecute;
string lastXuniRfid = LastOutParam.rfid; string lastXuniRfid = LastOutParam.rfid;
if (lastXuniRfid.Equals("") || lastXuniRfid.Equals(outParam.rfid)) if (lastXuniRfid.Equals("") || lastXuniRfid.Equals(outParam.rfid))
{ {
...@@ -158,8 +157,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -158,8 +157,7 @@ namespace OnlineStore.DeviceLibrary
public override bool StartOutStoreMove(InOutParam param) public override bool StartOutStoreMove(InOutParam param)
{ {
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
lineStatus = LineStatus.OutStoreExecute;
MoveInfo.NewMove(LineMoveType.OutStore); MoveInfo.NewMove(LineMoveType.OutStore);
MoveInfo.MoveParam = new InOutParam(); MoveInfo.MoveParam = new InOutParam();
taskData = null; taskData = null;
...@@ -370,8 +368,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -370,8 +368,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreCount = 0; OutStoreCount = 0;
//如果再出库中直接出库 //如果再出库中直接出库
MoveInfo.EndMove(); MoveInfo.EndMove();
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
lineStatus = LineStatus.StoreOnline;
// MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun); // MoveInfo.NextMoveStep(LineMoveStep.FO_39_OutLineRun);
OutLog("准备出库料架完成"); OutLog("准备出库料架完成");
// FO_11_AxisDownMove(); // FO_11_AxisDownMove();
...@@ -717,7 +714,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -717,7 +714,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(60)) else if (MoveInfo.IsTimeOut(60))
{ {
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待给服务器发送afterPut完成超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待给服务器发送afterPut完成超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID * 1000 + 21); LogUtil.error(WarnMsg, DeviceID * 1000 + 21);
Alarm(LineAlarmType.IoSingleTimeOut); Alarm(LineAlarmType.IoSingleTimeOut);
} }
......
...@@ -53,8 +53,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -53,8 +53,7 @@ namespace OnlineStore.DeviceLibrary
private void StartReset() private void StartReset()
{ {
ResetClearData(); ResetClearData();
lineStatus = LineStatus.ResetMove;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove); MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
LogInfo("开始" + MoveInfo.MoveType + ": 横移线体停止,阻挡上升,侧挡气缸上升 "); LogInfo("开始" + MoveInfo.MoveType + ": 横移线体停止,阻挡上升,侧挡气缸上升 ");
...@@ -102,14 +101,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,14 +101,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
} }
} }
} }
...@@ -157,7 +149,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -157,7 +149,7 @@ namespace OnlineStore.DeviceLibrary
} }
IOTimeOutProcess(); IOTimeOutProcess();
//判断流水线打开了才可以运行 //判断流水线打开了才可以运行
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None)) if (MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
if (LineManager.Line.CanProcessLine()) if (LineManager.Line.CanProcessLine())
{ {
......
...@@ -55,8 +55,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,8 +55,7 @@ namespace OnlineStore.DeviceLibrary
private void StartReset() private void StartReset()
{ {
ResetClearData(); ResetClearData();
lineStatus = LineStatus.ResetMove;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove); MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
LogInfo("开始"+MoveInfo.MoveType+": 横移线体停止,阻挡气缸上升 "); LogInfo("开始"+MoveInfo.MoveType+": 横移线体停止,阻挡气缸上升 ");
...@@ -101,14 +100,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -101,14 +100,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
} }
} }
} }
...@@ -155,7 +147,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -155,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
} }
IOTimeOutProcess(); IOTimeOutProcess();
//判断流水线打开了才可以运行 //判断流水线打开了才可以运行
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None)) if (MoveInfo.MoveType.Equals(LineMoveType.None))
{ {
if (LineManager.Line.CanProcessLine()) if (LineManager.Line.CanProcessLine())
{ {
......
...@@ -56,8 +56,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -56,8 +56,7 @@ namespace OnlineStore.DeviceLibrary
private void StartReset() private void StartReset()
{ {
ResetClearData(); ResetClearData();
lineStatus = LineStatus.ResetMove;
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove); MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
if (IsDebug) if (IsDebug)
...@@ -83,12 +82,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,12 +82,8 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.IsInWait) if (MoveInfo.IsInWait)
{ {
CheckWait(MoveInfo); CheckWait(MoveInfo);
} }
else if (SecondMoveInfo.IsInWait) if (!MoveInfo.IsInWait )
{
CheckWait(SecondMoveInfo);
}
if (!MoveInfo.IsInWait && !SecondMoveInfo.IsInWait)
{ {
//流水线各装置复原位,夹料气缸状态不变 //流水线各装置复原位,夹料气缸状态不变
//阻挡气缸全部=0 //阻挡气缸全部=0
...@@ -97,21 +92,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,21 +92,12 @@ namespace OnlineStore.DeviceLibrary
//复位时夹紧气缸需要发送,不然后面出入库会有问题 //复位时夹紧气缸需要发送,不然后面出入库会有问题
switch (MoveInfo.MoveStep) switch (MoveInfo.MoveStep)
{ {
case LineMoveStep.HY_R_01StopMove: case LineMoveStep.HY_R_01StopMove:
LogInfo(MoveInfo.MoveType + " 完成!"); LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
break; break;
default: break; default: break;
} }
...@@ -142,9 +128,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,9 +128,7 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
IOMove(IO_Type.StopDown1, IO_VALUE.LOW); IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW); IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
} }
public override void StopRun() public override void StopRun()
{ {
if (mainTimer != null) if (mainTimer != null)
...@@ -175,19 +159,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -175,19 +159,15 @@ namespace OnlineStore.DeviceLibrary
if (isInSuddenDown || isNoAirCheck) if (isInSuddenDown || isNoAirCheck)
{ {
return; return;
} }
BusyMoveProcess(); IOTimeOutProcess();
IOTimeOutProcess(); if (MoveInfo.MoveType.Equals(LineMoveType.None))
//判断流水线打开了才可以运行
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{ {
if (LineManager.Line.CanProcessLine()) if (LineManager.Line.CanProcessLine())
{ {
// LogUtil.info("StartCheckFixture");
StartCheckFixture(); StartCheckFixture();
} }
} }
//OutStoreListPro();
} }
private void StartCheckFixture() private void StartCheckFixture()
......
...@@ -215,7 +215,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -215,7 +215,7 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer.Enabled = false; IoCheckTimer.Enabled = false;
mainTimer.Enabled = false; mainTimer.Enabled = false;
ledProcessTimer.Enabled = true; ledProcessTimer.Enabled = true;
lineStatus = LineStatus.ResetMove;
runStatus = LineRunStatus.HomeMoving; runStatus = LineRunStatus.HomeMoving;
StartTime = DateTime.Now; StartTime = DateTime.Now;
LogUtil.info(Name + "开始启动,启动时间:" + StartTime.ToString() + "先转动链条"); LogUtil.info(Name + "开始启动,启动时间:" + StartTime.ToString() + "先转动链条");
...@@ -341,8 +341,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -341,8 +341,7 @@ namespace OnlineStore.DeviceLibrary
//停止运动 //停止运动
MoveInfo.EndMove(); MoveInfo.EndMove();
lineStatus = LineStatus.ResetMove;
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
LogUtil.info(Name + "开始复位,先转动链条5秒 "); LogUtil.info(Name + "开始复位,先转动链条5秒 ");
DateTime rstartTime = DateTime.Now; DateTime rstartTime = DateTime.Now;
...@@ -951,8 +950,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -951,8 +950,7 @@ namespace OnlineStore.DeviceLibrary
//打开流水线 //打开流水线
WriteDrivetMotorRun(IO_VALUE.HIGH); WriteDrivetMotorRun(IO_VALUE.HIGH);
//所有原点重置完成 //所有原点重置完成
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
lineStatus = LineStatus.StoreOnline;
MoveInfo.EndMove(); MoveInfo.EndMove();
mainTimer.Interval = 300; mainTimer.Interval = 300;
maxSeconds = 3; maxSeconds = 3;
...@@ -974,8 +972,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -974,8 +972,7 @@ namespace OnlineStore.DeviceLibrary
// int tLength = 20; // int tLength = 20;
//msg += "横移41托盘:" + Sw41TrayNum + "\n"; //msg += "横移41托盘:" + Sw41TrayNum + "\n";
msg += "T3C1托盘:" + T3C1_TrayNum + "\n"; msg += "T3C1托盘:" + T3C1_TrayNum + "\n";
msg += "状态: " + runStatus + "\t "; msg += "状态: " + runStatus + "\t ";
msg += " " + lineStatus + "\n";
msg += "alarm: " + alarmType + "\n"; msg += "alarm: " + alarmType + "\n";
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.SLog + "\n"; msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.SLog + "\n";
msg += "T3C1:" + T3C1_MoveInfo.MoveType + " " + T3C1_MoveInfo.MoveStep + "\n"; msg += "T3C1:" + T3C1_MoveInfo.MoveType + " " + T3C1_MoveInfo.MoveStep + "\n";
......
...@@ -102,8 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,8 +102,7 @@ namespace OnlineStore.DeviceLibrary
private void StartReset() private void StartReset()
{ {
ResetClearData(); ResetClearData();
lineStatus = LineStatus.ResetMove;
//移载装置原点状态:顶升气缸下降端,前后气缸后退端,上下气缸上升端,夹料气缸放松端,阻挡气缸输入=0 //移载装置原点状态:顶升气缸下降端,前后气缸后退端,上下气缸上升端,夹料气缸放松端,阻挡气缸输入=0
UpdownHomeMove(); UpdownHomeMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); // CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
...@@ -165,14 +164,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -165,14 +164,7 @@ namespace OnlineStore.DeviceLibrary
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
if (IsDebug)
{
lineStatus = LineStatus.Debugging;
}
else
{
lineStatus = LineStatus.StoreOnline;
}
break; break;
default: break; default: break;
} }
......
...@@ -27,8 +27,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,8 +27,7 @@ namespace OnlineStore.DeviceLibrary
if (runStatus.Equals(LineRunStatus.Runing)) if (runStatus.Equals(LineRunStatus.Runing))
{ {
LogInfo("启动出库【" + posId + "】升降气缸上升 "); LogInfo("启动出库【" + posId + "】升降气缸上升 ");
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
lineStatus = LineStatus.OutStoreExecute;
MoveInfo.NewMove(LineMoveType.OutStore); MoveInfo.NewMove(LineMoveType.OutStore);
MoveInfo.MoveParam = param; MoveInfo.MoveParam = param;
MoveInfo.NextMoveStep(LineMoveStep.MO_50_StartOutProcess); MoveInfo.NextMoveStep(LineMoveStep.MO_50_StartOutProcess);
...@@ -186,8 +185,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -186,8 +185,7 @@ namespace OnlineStore.DeviceLibrary
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】");
TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam); TrayManager.UpdateTrayInfo(MoveInfo.MoveParam.TrayNumber, true, ReelType.OutStore, MoveInfo.MoveParam);
//出库全部完成 //出库全部完成
lineStatus = LineStatus.StoreOnline;
MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax); MoveInfo.NextMoveStep(LineMoveStep.MO_59_CylinderRelax);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
} }
...@@ -243,8 +241,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,8 +241,7 @@ namespace OnlineStore.DeviceLibrary
string posId = param != null ? param.PosId : ""; string posId = param != null ? param.PosId : "";
if (runStatus.Equals(LineRunStatus.Runing)) if (runStatus.Equals(LineRunStatus.Runing))
{ {
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
lineStatus = LineStatus.InStoreExecute;
MoveInfo.MoveParam = param; MoveInfo.MoveParam = param;
MoveInfo.NewMove(LineMoveType.InStore); MoveInfo.NewMove(LineMoveType.InStore);
......
...@@ -20,13 +20,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,13 +20,7 @@ namespace OnlineStore.DeviceLibrary
/// 料仓状态 /// 料仓状态
/// </summary> /// </summary>
public LineRunStatus runStatus = LineRunStatus.Wait; public LineRunStatus runStatus = LineRunStatus.Wait;
/// <summary>
///1=设备联机(正常就绪)(入库后,BOX恢复原始状态)(出库后,移载装置恢复原始状态),
///2=急停,3=故障,4=警告,5=调试
/// 6=入库执行中,7=入仓完成,8=入仓失败
/// 9=出库执行,10=出仓完成,11=出库失败
/// </summary>
public LineStatus lineStatus = LineStatus.ResetMove;
/// <summary> /// <summary>
/// 提示消息,一般发给服务器后清空(LineBean表示报警提示消息,BoxBean表示出入库失败的原因记录) /// 提示消息,一般发给服务器后清空(LineBean表示报警提示消息,BoxBean表示出入库失败的原因记录)
/// </summary> /// </summary>
...@@ -325,45 +319,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,45 +319,7 @@ namespace OnlineStore.DeviceLibrary
break; break;
} }
if (runStatus > LineRunStatus.Wait) if (runStatus > LineRunStatus.Wait)
{ {
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch (lineStatus)
{
case LineStatus.Debugging:
aa = "设备调试中";
break;
//case LineStatus.InStoreEnd:
// aa = "料盘入仓位完成";
// break;
case LineStatus.InStoreExecute:
aa = "入库执行中";
break;
case LineStatus.InTrouble:
aa = "故障中";
break;
//case LineStatus.OutStoreBoxEnd:
// aa = "料盘出仓位完成";
// break;
case LineStatus.OutStoreExecute:
aa = "出库执行中";
break;
case LineStatus.StoreOnline:
aa = "设备联机";
break;
case LineStatus.SuddenStop:
aa = "急停中";
break;
//case LineStatus.OutMoveExecute:
// aa = "出库完成";
// break;
//case LineStatus.InStoreFaild:
// aa = "入库失败(" + WarnMsg + ")";
// break;
//case LineStatus.OutStoreFaild:
// aa = "出库失败(" + WarnMsg + ")";
// break;
}
if (isInSuddenDown) if (isInSuddenDown)
{ {
aa = "急停中"; aa = "急停中";
...@@ -382,7 +338,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -382,7 +338,7 @@ namespace OnlineStore.DeviceLibrary
return sta; return sta;
} }
} }
public static string GetRunStr(LineStatus ls, LineRunStatus runs) public static string GetRunStr( LineRunStatus runs, LineStatus ls=LineStatus.None)
{ {
string sta = "运行中"; string sta = "运行中";
string aa = ""; string aa = "";
...@@ -404,7 +360,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -404,7 +360,7 @@ namespace OnlineStore.DeviceLibrary
sta = "等待启动"; sta = "等待启动";
break; break;
} }
if (runs > LineRunStatus.Wait) if (runs > LineRunStatus.Wait&&ls>LineStatus.None)
{ {
//"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中", //"0":"急停中", "1":"设备联机", "2":"故障中", "3":"入库执行中", "4":"出库执行中", 5":"料盘入仓位完成", "6":"料盘出仓位完成", 7":"设备调试中",
switch (ls) switch (ls)
...@@ -444,7 +400,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -444,7 +400,7 @@ namespace OnlineStore.DeviceLibrary
// break; // break;
} }
} }
if (!aa.Equals("")) if (!aa.Equals(""))
{ {
return sta + "_" + aa; return sta + "_" + aa;
......
...@@ -1522,6 +1522,71 @@ namespace OnlineStore.DeviceLibrary ...@@ -1522,6 +1522,71 @@ namespace OnlineStore.DeviceLibrary
HY95_StopDownUp, HY95_StopDownUp,
#endregion #endregion
#region 出料线横移,52001
/// <summary>
/// 出料线横移(长线):短线阻挡检测到托盘
/// </summary>
OHY01_LongLCheck = 52001,
/// <summary>
/// 出料线横移(短线):顶升气缸下降
/// </summary>
OHY02_TopDown,
/// <summary>
/// 出料线横移(短线):长线体阻挡下降
/// </summary>
OHY03_LongLStopDown,
/// <summary>
/// 出料线横移(短线):等待托盘检测信号
/// </summary>
OHY04_WaitTray,
/// <summary>
/// 出料线横移(短线):长线体阻挡下降,再次等待托盘检测信号500ms
/// </summary>
OHY05_TrayCheck,
/// <summary>
/// 出料线横移(短线):短线阻挡检测到托盘
/// </summary>
OHY11_ShortLCheck = 52011,
/// <summary>
/// 出料线横移(短线):顶升气缸上升
/// </summary>
OHY12_TopUp,
/// <summary>
/// 出料线横移(短线):短线阻挡下降1200,线体转动
/// </summary>
OHY13_ShortLStopDown,
/// <summary>
/// 出料线横移(短线):等待托盘检测信号
/// </summary>
OHY14_WaitTray,
/// <summary>
/// 出料线横移(短线):再次等待托盘检测信号500ms
/// </summary>
OHY15_TrayCheck,
/// <summary>
/// 出料线横移(短线): 阻挡上升,顶升气缸下降
/// </summary>
OHY16_TopDown,
/// <summary>
/// 出料线横移: 等待托盘检测无信号
/// </summary>
OHY21_WaitTrayLeave=52021,
/// <summary>
/// 出料线横移: 延迟500ms后再次等待托盘无信号
/// </summary>
OHY22_TrayLeave,
#endregion
#endregion #endregion
} }
......
...@@ -32,7 +32,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -32,7 +32,7 @@ namespace OnlineStore.DeviceLibrary
public string ToShowStr() public string ToShowStr()
{ {
return KTK_Store.GetRunStr( (LineStatus)SStatus ,(LineRunStatus)SRunStatus ); return KTK_Store.GetRunStr((LineRunStatus)SRunStatus, (LineStatus)SStatus);
} }
/// <summary> /// <summary>
/// 编号,1-4 /// 编号,1-4
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!