Commit abe4ab16 LN

修改物料的D7仓门口不抓的问题。

1 个父辈 d731fd6c
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLineStore)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLineStore));
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.lblCPU = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.lblOpText = new System.Windows.Forms.Label(); this.lblOpText = new System.Windows.Forms.Label();
...@@ -154,6 +155,7 @@ ...@@ -154,6 +155,7 @@
// //
// tabPage1 // tabPage1
// //
this.tabPage1.Controls.Add(this.lblCPU);
this.tabPage1.Controls.Add(this.panel1); this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Controls.Add(this.groupBox2); this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
...@@ -165,6 +167,18 @@ ...@@ -165,6 +167,18 @@
this.tabPage1.Text = " 运行日志 "; this.tabPage1.Text = " 运行日志 ";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// lblCPU
//
this.lblCPU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblCPU.AutoSize = true;
this.lblCPU.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCPU.ForeColor = System.Drawing.Color.Black;
this.lblCPU.Location = new System.Drawing.Point(7, 581);
this.lblCPU.Name = "lblCPU";
this.lblCPU.Size = new System.Drawing.Size(35, 17);
this.lblCPU.TabIndex = 203;
this.lblCPU.Text = "CPU:";
//
// panel1 // panel1
// //
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
...@@ -177,7 +191,7 @@ ...@@ -177,7 +191,7 @@
this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.label5);
this.panel1.Location = new System.Drawing.Point(5, 429); this.panel1.Location = new System.Drawing.Point(5, 429);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(128, 164); this.panel1.Size = new System.Drawing.Size(128, 146);
this.panel1.TabIndex = 202; this.panel1.TabIndex = 202;
// //
// label3 // label3
...@@ -807,43 +821,43 @@ ...@@ -807,43 +821,43 @@
// 开机自动启动ToolStripMenuItem // 开机自动启动ToolStripMenuItem
// //
this.开机自动启动ToolStripMenuItem.Name = "开机自动启动ToolStripMenuItem"; this.开机自动启动ToolStripMenuItem.Name = "开机自动启动ToolStripMenuItem";
this.开机自动启动ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.开机自动启动ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.开机自动启动ToolStripMenuItem.Text = "开机自动启动"; this.开机自动启动ToolStripMenuItem.Text = "开机自动启动";
this.开机自动启动ToolStripMenuItem.Click += new System.EventHandler(this.开机自动启动ToolStripMenuItem_Click); this.开机自动启动ToolStripMenuItem.Click += new System.EventHandler(this.开机自动启动ToolStripMenuItem_Click);
// //
// toolStripSeparator15 // toolStripSeparator15
// //
this.toolStripSeparator15.Name = "toolStripSeparator15"; this.toolStripSeparator15.Name = "toolStripSeparator15";
this.toolStripSeparator15.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator15.Size = new System.Drawing.Size(173, 6);
// //
// 启用蜂鸣器ToolStripMenuItem // 启用蜂鸣器ToolStripMenuItem
// //
this.启用蜂鸣器ToolStripMenuItem.Name = "启用蜂鸣器ToolStripMenuItem"; this.启用蜂鸣器ToolStripMenuItem.Name = "启用蜂鸣器ToolStripMenuItem";
this.启用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.启用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器"; this.启用蜂鸣器ToolStripMenuItem.Text = "启用蜂鸣器";
this.启用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.启用蜂鸣器ToolStripMenuItem_Click); this.启用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.启用蜂鸣器ToolStripMenuItem_Click);
// //
// toolStripSeparator25 // toolStripSeparator25
// //
this.toolStripSeparator25.Name = "toolStripSeparator25"; this.toolStripSeparator25.Name = "toolStripSeparator25";
this.toolStripSeparator25.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator25.Size = new System.Drawing.Size(173, 6);
// //
// toolStripMenuItem4 // toolStripMenuItem4
// //
this.toolStripMenuItem4.Name = "toolStripMenuItem4"; this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem4.Size = new System.Drawing.Size(176, 26);
this.toolStripMenuItem4.Text = "启用安全门禁"; this.toolStripMenuItem4.Text = "启用安全门禁";
this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click); this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click);
// //
// toolStripSeparator17 // toolStripSeparator17
// //
this.toolStripSeparator17.Name = "toolStripSeparator17"; this.toolStripSeparator17.Name = "toolStripSeparator17";
this.toolStripSeparator17.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator17.Size = new System.Drawing.Size(173, 6);
// //
// 自动保存托盘信息ToolStripMenuItem // 自动保存托盘信息ToolStripMenuItem
// //
this.自动保存托盘信息ToolStripMenuItem.Name = "自动保存托盘信息ToolStripMenuItem"; this.自动保存托盘信息ToolStripMenuItem.Name = "自动保存托盘信息ToolStripMenuItem";
this.自动保存托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.自动保存托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.自动保存托盘信息ToolStripMenuItem.Text = "保存托盘信息"; this.自动保存托盘信息ToolStripMenuItem.Text = "保存托盘信息";
this.自动保存托盘信息ToolStripMenuItem.Visible = false; this.自动保存托盘信息ToolStripMenuItem.Visible = false;
this.自动保存托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.自动保存托盘信息ToolStripMenuItem_Click); this.自动保存托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.自动保存托盘信息ToolStripMenuItem_Click);
...@@ -954,6 +968,7 @@ ...@@ -954,6 +968,7 @@
this.Load += new System.EventHandler(this.FrmMain_Load); this.Load += new System.EventHandler(this.FrmMain_Load);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
...@@ -1066,6 +1081,7 @@ ...@@ -1066,6 +1081,7 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator16; private System.Windows.Forms.ToolStripSeparator toolStripSeparator16;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
private System.Windows.Forms.Label lblCPU;
} }
} }
...@@ -445,15 +445,19 @@ namespace OnlineStore.AssemblyLine ...@@ -445,15 +445,19 @@ namespace OnlineStore.AssemblyLine
UpdateControl(); UpdateControl();
string canScanCode = ""; string canScanCode = "";
lblCPU.Text = "CPU:" + LineManager.CurrCPUvalue + "%";
lblStatus.Text = lineBean.GetRunStr() + canScanCode; lblStatus.Text = lineBean.GetRunStr() + canScanCode;
string warnMsg = ""; string warnMsg = "";
if (LineManager.Line.runStatus > LineRunStatus.Wait) if (LineManager.Line.runStatus > LineRunStatus.Wait)
{ {
string time = LineManager.Line.alarmType.Equals(LineAlarmType.None) ? "" : LineManager.Line.LastAlarmTime.ToLongTimeString(); string time = LineManager.Line.alarmType.Equals(LineAlarmType.None) ? "" : LineManager.Line.LastAlarmTime.ToLongTimeString();
warnMsg = LineManager.Line.WarnMsg.Equals("") ? "" : (time + LineManager.Line.WarnMsg + "\r\n"); warnMsg = LineManager.Line.WarnMsg.Equals("") ? "" : (time + LineManager.Line.WarnMsg + "\r\n");
if (!String.IsNullOrEmpty(LineManager.Line.CpuMsg))
{
warnMsg += LineManager.Line.CpuMsg + "\r\n";
}
if (TrayManager.TrayErrorMsg.Equals("").Equals(false)) if (TrayManager.TrayErrorMsg.Equals("").Equals(false))
{ {
warnMsg += TrayManager.TrayErrorMsg + "\r\n"; warnMsg += TrayManager.TrayErrorMsg + "\r\n";
......
...@@ -4,6 +4,7 @@ using OnlineStore.Common; ...@@ -4,6 +4,7 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
...@@ -478,6 +479,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -478,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
bool isNeedAlarmLed = false; bool isNeedAlarmLed = false;
bool isInOut = false; bool isInOut = false;
bool yellowShanShuo = false; bool yellowShanShuo = false;
GetCPU();
if (runStatus.Equals(LineRunStatus.HomeMoving) || runStatus.Equals(LineRunStatus.Reset)) if (runStatus.Equals(LineRunStatus.HomeMoving) || runStatus.Equals(LineRunStatus.Reset))
{ {
yellowShanShuo = true; yellowShanShuo = true;
...@@ -491,6 +493,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -491,6 +493,10 @@ namespace OnlineStore.DeviceLibrary
yellowShanShuo = true; yellowShanShuo = true;
} }
if (!String.IsNullOrEmpty(CpuMsg))
{
isNeedAlarmLed = true;
}
foreach (EquipBase moveEquip in AllEquipMap.Values) foreach (EquipBase moveEquip in AllEquipMap.Values)
{ {
if (moveEquip.isNoAirCheck || moveEquip.isInSuddenDown || moveEquip.alarmType >= LineAlarmType.IoSingleTimeOut) if (moveEquip.isNoAirCheck || moveEquip.isInSuddenDown || moveEquip.alarmType >= LineAlarmType.IoSingleTimeOut)
...@@ -582,6 +588,51 @@ namespace OnlineStore.DeviceLibrary ...@@ -582,6 +588,51 @@ namespace OnlineStore.DeviceLibrary
} }
Thread.Sleep(5); Thread.Sleep(5);
} }
private DateTime lastLogTime = DateTime.Now;
PerformanceCounter curtime = null;
public string CpuMsg = "";
private float GetCPU()
{
try
{
TimeSpan sp = DateTime.Now - lastLogTime;
if (sp.TotalMinutes >= 1)
{
lastLogTime = DateTime.Now;
Process process = Process.GetCurrentProcess();
if (curtime == null)
{
curtime = new PerformanceCounter("Process", "% Processor Time", process.ProcessName);
}
if (process != null)
{
PerformanceCounter pf1 = new PerformanceCounter("Process", "Working Set - Private", process.ProcessName);
float cpuv = curtime.NextValue() / Environment.ProcessorCount;
LineManager.CurrCPUvalue = cpuv;
if (LineManager.CurrCPUvalue > 80)
{
CpuMsg = "软件CPU过高:" + cpuv + "%,请检查";
LogUtil.info(Name + CpuMsg);
}
else
{
if (!String.IsNullOrEmpty(CpuMsg))
{
LogUtil.info(Name + "当前CPU:"+cpuv+" ,清理之前报警:" + CpuMsg);
CpuMsg = "";
}
}
return LineManager.CurrCPUvalue;
}
}
}
catch (Exception ex)
{
LogUtil.error("LogM Error: ", ex);
}
return 0;
}
#endregion #endregion
private void IoCheckTimerProcess(object sender, ElapsedEventArgs e) private void IoCheckTimerProcess(object sender, ElapsedEventArgs e)
...@@ -962,6 +1013,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -962,6 +1013,10 @@ namespace OnlineStore.DeviceLibrary
conIsPro = true; conIsPro = true;
conLastTime = DateTime.Now; conLastTime = DateTime.Now;
List<AlarmMsg> alarmList = new List<AlarmMsg>(); List<AlarmMsg> alarmList = new List<AlarmMsg>();
if (!String.IsNullOrEmpty(CpuMsg))
{
alarmList.Add(new AlarmMsg(Name, "line.soft_cpu", CpuMsg));
}
foreach (EquipBase equip in AllEquipMap.Values) foreach (EquipBase equip in AllEquipMap.Values)
{ {
if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时")) if (equip.alarmType.Equals(LineAlarmType.None) || equip.WarnMsg.Contains("等待空托盘到达超时"))
......
...@@ -315,7 +315,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -315,7 +315,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))
{ {
if (move.MoveInfo.MoveStep >= (LineMoveStep.MO_64_CylinderDown)) if (move.MoveInfo.MoveStep >= (LineMoveStep.MO_65_CylinderDown))
{ {
return true; return true;
} }
......
...@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
} }
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_62_WaitTray) || MoveInfo.MoveStep >= LineMoveStep.MO_63_CylinderAfter; bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_62_WaitTray) || MoveInfo.MoveStep >= LineMoveStep.MO_63_CylinderAfter;
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk
&& (!MoveInfo.IsStep(LineMoveStep.MO_66_CylinderUp))) && (!MoveInfo.IsStep(LineMoveStep.MO_67_CylinderUp)))
{ {
if (isFull.Equals(false)) if (isFull.Equals(false))
{ {
...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
} }
bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_62_WaitTray) || MoveInfo.MoveStep >= LineMoveStep.MO_63_CylinderAfter; bool moveOk = (IsBigStore() && MoveInfo.MoveStep >= LineMoveStep.MO_62_WaitTray) || MoveInfo.MoveStep >= LineMoveStep.MO_63_CylinderAfter;
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && moveOk
&& (!MoveInfo.IsStep(LineMoveStep.MO_66_CylinderUp))) && (!MoveInfo.IsStep(LineMoveStep.MO_67_CylinderUp)))
{ {
return true; return true;
} }
...@@ -222,6 +222,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -222,6 +222,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 出库 #region 出库
private int ClampCount = 0; private int ClampCount = 0;
private bool CheckCanPutOK = false;
public override bool StartOutStoreMove(InOutParam param) public override bool StartOutStoreMove(InOutParam param)
{ {
string posId = param != null ? param.PosId : ""; string posId = param != null ? param.PosId : "";
...@@ -234,6 +235,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,6 +235,7 @@ namespace OnlineStore.DeviceLibrary
if (runStatus.Equals(LineRunStatus.Runing)) if (runStatus.Equals(LineRunStatus.Runing))
{ {
LogInfo("启动出库【" + posId + "】升降气缸上升 "); LogInfo("启动出库【" + posId + "】升降气缸上升 ");
CheckCanPutOK = false;
runStatus = LineRunStatus.Busy; runStatus = LineRunStatus.Busy;
MoveInfo.NewMove(LineMoveType.OutStore); MoveInfo.NewMove(LineMoveType.OutStore);
MoveInfo.MoveParam = param; MoveInfo.MoveParam = param;
...@@ -409,7 +411,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -409,7 +411,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(LineMoveStep.MO_61_WaitCanPut)) else if (MoveInfo.IsStep(LineMoveStep.MO_61_WaitCanPut))
{ {
if (checkCanPutTask == null || checkCanPutTask.IsCompleted) if (checkCanPutTask == null || checkCanPutTask.IsCompleted)
{ {
MoveInfo.NextMoveStep(LineMoveStep.MO_62_WaitTray); MoveInfo.NextMoveStep(LineMoveStep.MO_62_WaitTray);
OutLog("出库 " + MoveInfo.SLog + ": 等待托盘到达"); OutLog("出库 " + MoveInfo.SLog + ": 等待托盘到达");
} }
...@@ -433,13 +435,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -433,13 +435,17 @@ namespace OnlineStore.DeviceLibrary
#region 移载装置,放物品到流水线操作 #region 移载装置,放物品到流水线操作
else if (MoveInfo.IsStep(LineMoveStep.MO_63_CylinderAfter)) else if (MoveInfo.IsStep(LineMoveStep.MO_63_CylinderAfter))
{ {
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After)) if (!CheckCanPutOK)
{
MO_64_WaitCanPut();
}
else if (CylinderIsOk(IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After))
{ {
if (TrayIsOk()) if (TrayIsOk())
{ {
int trayNum = SecondMoveInfo.MoveParam.TrayNumber; int trayNum = SecondMoveInfo.MoveParam.TrayNumber;
//去掉直接丢盘处理 //去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_64_CylinderDown); MoveInfo.NextMoveStep(LineMoveStep.MO_65_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 拦截到空托盘【" + trayNum + "】, 上下气缸下降 ,顶升气缸上升"); OutLog("出库 " + MoveInfo.SLog + ": 拦截到空托盘【" + trayNum + "】, 上下气缸下降 ,顶升气缸上升");
if (MoveInfo.MoveParam != null) if (MoveInfo.MoveParam != null)
{ {
...@@ -455,8 +461,39 @@ namespace OnlineStore.DeviceLibrary ...@@ -455,8 +461,39 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up); CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
} }
} }
else if (MoveInfo.IsTimeOut(20))
{
MoveTimeOut(MoveInfo, "等待横移气缸后退到位超时");
}
}
else if (MoveInfo.IsStep(LineMoveStep.MO_64_WaitCanPut))
{
if (CylinderIsOk(IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After))
{
if (TrayIsOk())
{
int trayNum = SecondMoveInfo.MoveParam.TrayNumber;
//去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_65_CylinderDown);
OutLog("出库 " + MoveInfo.SLog + ": 拦截到空托盘【" + trayNum + "】, 上下气缸下降 ,顶升气缸上升");
if (MoveInfo.MoveParam != null)
{
MoveInfo.MoveParam.TrayNumber = trayNum;
}
else
{
MoveInfo.MoveParam = SecondMoveInfo.MoveParam;
}
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
}
}
else if (MoveInfo.IsTimeOut(20))
{
MoveTimeOut(MoveInfo, "等待横移气缸后退到位超时");
}
} }
else if (MoveInfo.IsStep(LineMoveStep.MO_64_CylinderDown)) else if (MoveInfo.IsStep(LineMoveStep.MO_65_CylinderDown))
{ {
OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】"); OutLog("出库 " + MoveInfo.SLog + ": 夹料气缸放松,更新托盘【" + MoveInfo.MoveParam.TrayNumber + "】,有料盘,OutStore,【" + MoveInfo.MoveParam.ToStr() + "】");
//更新料盘位置 //更新料盘位置
...@@ -466,20 +503,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -466,20 +503,20 @@ namespace OnlineStore.DeviceLibrary
TrayInfo tray = TrayManager.GetTrayInfo(trayNum); TrayInfo tray = TrayManager.GetTrayInfo(trayNum);
LogInfo("出库 " + MoveInfo.SLog + ": ,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INLINE】更新托盘【" + trayNum + "】 " + tray.ToStr() + ""); LogInfo("出库 " + MoveInfo.SLog + ": ,更新料盘位置【" + MoveInfo.MoveParam.WareCode + "】【INLINE】更新托盘【" + trayNum + "】 " + tray.ToStr() + "");
//出库全部完成 //出库全部完成
MoveInfo.NextMoveStep(LineMoveStep.MO_65_CylinderRelax); MoveInfo.NextMoveStep(LineMoveStep.MO_66_CylinderRelax);
//CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax); //CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
ClampJwa.Relax(MoveInfo, MoveInfo.MoveParam.WareCode); ClampJwa.Relax(MoveInfo, MoveInfo.MoveParam.WareCode);
//EDataManager.UpdateParam(DeviceID); //EDataManager.UpdateParam(DeviceID);
} }
else if (MoveInfo.IsStep(LineMoveStep.MO_65_CylinderRelax)) else if (MoveInfo.IsStep(LineMoveStep.MO_66_CylinderRelax))
{ {
this.MoveInfo.NextMoveStep(LineMoveStep.MO_66_CylinderUp); this.MoveInfo.NextMoveStep(LineMoveStep.MO_67_CylinderUp);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升,同时顶升气缸先下降"); OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升,同时顶升气缸先下降");
UpdownUpMove(); UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
else if (MoveInfo.IsStep(LineMoveStep.MO_66_CylinderUp)) else if (MoveInfo.IsStep(LineMoveStep.MO_67_CylinderUp))
{ {
// 减去需要的盘数 // 减去需要的盘数
// TrayManager.DelNeedEmptyTrayNum(); // TrayManager.DelNeedEmptyTrayNum();
...@@ -497,6 +534,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -497,6 +534,7 @@ namespace OnlineStore.DeviceLibrary
private Task checkCanPutTask = null; private Task checkCanPutTask = null;
private void MO_61_WaitCanPut() private void MO_61_WaitCanPut()
{ {
CheckCanPutOK = true;
checkCanPutTask = null; checkCanPutTask = null;
if (MoveInfo.MoveParam.urgentReel) if (MoveInfo.MoveParam.urgentReel)
{ {
...@@ -506,8 +544,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -506,8 +544,7 @@ namespace OnlineStore.DeviceLibrary
} }
MoveInfo.NextMoveStep(LineMoveStep.MO_61_WaitCanPut); MoveInfo.NextMoveStep(LineMoveStep.MO_61_WaitCanPut);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
checkCanPutTask = Task.Factory.StartNew(delegate checkCanPutTask = Task.Factory.StartNew(delegate
{ {
int getlocationCount = 0; int getlocationCount = 0;
...@@ -526,6 +563,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -526,6 +563,37 @@ namespace OnlineStore.DeviceLibrary
} }
}); });
} }
private void MO_64_WaitCanPut()
{
CheckCanPutOK = true;
checkCanPutTask = null;
if (MoveInfo.MoveParam.urgentReel)
{
MoveInfo.NextMoveStep(LineMoveStep.MO_64_WaitCanPut);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
OutLog("出库 " + MoveInfo.SLog + ": 紧急料,直接等待托盘到达");
return;
}
MoveInfo.NextMoveStep(LineMoveStep.MO_64_WaitCanPut);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
LogUtil.info(Name + "出库 " + MoveInfo.SLog + ": 等待可以放到托盘上");
checkCanPutTask = Task.Factory.StartNew(delegate
{
int getlocationCount = 0;
while (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
getlocationCount++;
if (SServerManager.GetLocation(MoveInfo.MoveParam.WareCode))
{
LogUtil.info(Name+"出库 " + MoveInfo.SLog + ": GetLocation OK,开始等待托盘到达");
break;
}
//OutLog("出库 " + MoveInfo.SLog + ": 等待料盘可以放到托盘上,等待3秒后重新判断");
Thread.Sleep(3000);
}
});
}
private bool TrayIsOk() private bool TrayIsOk()
{ {
if (SecondMoveInfo.IsStep(LineMoveStep.MO_11_CodeRember) && !SecondMoveInfo.IsInWait) if (SecondMoveInfo.IsStep(LineMoveStep.MO_11_CodeRember) && !SecondMoveInfo.IsInWait)
......
...@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,6 +27,7 @@ namespace OnlineStore.DeviceLibrary
public static LineBean Line = null; public static LineBean Line = null;
public static Line_Config Config = null; public static Line_Config Config = null;
public static Dictionary<int, DeviceConfig> allConfigMap = null; public static Dictionary<int, DeviceConfig> allConfigMap = null;
public static float CurrCPUvalue = 0;
public LineManager() public LineManager()
{ {
} }
......
...@@ -360,18 +360,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -360,18 +360,28 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
MO_63_CylinderAfter, MO_63_CylinderAfter,
/// <summary>
/// 移栽出库:开始等待托盘
/// </summary>
MO_64_WaitCanPut,
/// <summary> /// <summary>
/// 移载(流水线)装置出库处理,上下气缸1下降 /// 移载(流水线)装置出库处理,上下气缸1下降
/// </summary> /// </summary>
MO_64_CylinderDown, MO_65_CylinderDown,
/// <summary> /// <summary>
/// 移载(流水线)装置出库处理,夹料气缸1放松 /// 移载(流水线)装置出库处理,夹料气缸1放松
/// </summary> /// </summary>
MO_65_CylinderRelax, MO_66_CylinderRelax,
/// <summary> /// <summary>
/// 移载(流水线)装置出库处理,上下气缸1上升 /// 移载(流水线)装置出库处理,上下气缸1上升
/// </summary> /// </summary>
MO_66_CylinderUp, MO_67_CylinderUp,
#region 入料模块,紧急出料移栽处理 #region 入料模块,紧急出料移栽处理
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!