Commit cece86de LN

1

1 个父辈 6bb3f77f
...@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 ...@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.27130.2024 VisualStudioVersion = 15.0.27130.2024
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ACServoDriveTest", "source\ACServoDriveTest\ACServoDriveTest.csproj", "{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "source\Common\Common.csproj", "{43CDD09E-FCF3-4960-A01D-3BBFE9933122}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "source\Common\Common.csproj", "{43CDD09E-FCF3-4960-A01D-3BBFE9933122}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceLibrary", "source\DeviceLibrary\DeviceLibrary.csproj", "{513BC1C9-800D-43A6-9499-3700BAEC3554}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceLibrary", "source\DeviceLibrary\DeviceLibrary.csproj", "{513BC1C9-800D-43A6-9499-3700BAEC3554}"
...@@ -25,10 +23,6 @@ Global ...@@ -25,10 +23,6 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FA84E1E-BCDE-49F6-BE42-0BC397AF65B8}.Release|Any CPU.Build.0 = Release|Any CPU
{43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Debug|Any CPU.Build.0 = Debug|Any CPU {43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Release|Any CPU.ActiveCfg = Release|Any CPU {43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Release|Any CPU.ActiveCfg = Release|Any CPU
......
...@@ -13,7 +13,7 @@ namespace OnlineStore.AssemblyLine ...@@ -13,7 +13,7 @@ namespace OnlineStore.AssemblyLine
{ {
internal partial class FrmBase : Form internal partial class FrmBase : Form
{ {
internal static string GetVersion() internal static string GetVersion(bool IsShow=false)
{ {
string str = ""; string str = "";
string version = ""; string version = "";
...@@ -38,7 +38,10 @@ namespace OnlineStore.AssemblyLine ...@@ -38,7 +38,10 @@ namespace OnlineStore.AssemblyLine
str = version; str = version;
LogUtil.error("解析版本号【" + str + "】出错:" + ex.ToString()); LogUtil.error("解析版本号【" + str + "】出错:" + ex.ToString());
} }
LogUtil.info("版本号[" + version + "][" + str + "]["+GetCodeNum()+"]"); if (IsShow)
{
LogUtil.info("版本号[" + version + "][" + str + "][" + GetCodeNum() + "]");
}
return str; return str;
} }
internal static string GetCodeNum(string codeName = "RC1250-AssemblyLine") internal static string GetCodeNum(string codeName = "RC1250-AssemblyLine")
......
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
this.扫码测试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.扫码测试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.二维码学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.二维码学习ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.托盘初始化ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.版本号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.版本号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
...@@ -74,8 +76,6 @@ ...@@ -74,8 +76,6 @@
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.托盘初始化ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -318,9 +318,9 @@ ...@@ -318,9 +318,9 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(261, 4); this.lblWarnMsg.Location = new System.Drawing.Point(307, 4);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1491, 69); this.lblWarnMsg.Size = new System.Drawing.Size(1445, 69);
this.lblWarnMsg.TabIndex = 96; this.lblWarnMsg.TabIndex = 96;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -358,61 +358,61 @@ ...@@ -358,61 +358,61 @@
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(141, 6);
// //
// 启动AToolStripMenuItem // 启动AToolStripMenuItem
// //
this.启动AToolStripMenuItem.Name = "启动AToolStripMenuItem"; this.启动AToolStripMenuItem.Name = "启动AToolStripMenuItem";
this.启动AToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.启动AToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.启动AToolStripMenuItem.Text = "启动 "; this.启动AToolStripMenuItem.Text = "启动 ";
this.启动AToolStripMenuItem.Click += new System.EventHandler(this.启动所有料仓AToolStripMenuItem_Click); this.启动AToolStripMenuItem.Click += new System.EventHandler(this.启动所有料仓AToolStripMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(141, 6);
// //
// 复位RToolStripMenuItem // 复位RToolStripMenuItem
// //
this.复位RToolStripMenuItem.Name = "复位RToolStripMenuItem"; this.复位RToolStripMenuItem.Name = "复位RToolStripMenuItem";
this.复位RToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复位RToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复位RToolStripMenuItem.Text = "复位"; this.复位RToolStripMenuItem.Text = "复位";
this.复位RToolStripMenuItem.Click += new System.EventHandler(this.复位RToolStripMenuItem_Click); this.复位RToolStripMenuItem.Click += new System.EventHandler(this.复位RToolStripMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(141, 6);
// //
// 停止TToolStripMenuItem // 停止TToolStripMenuItem
// //
this.停止TToolStripMenuItem.Name = "停止TToolStripMenuItem"; this.停止TToolStripMenuItem.Name = "停止TToolStripMenuItem";
this.停止TToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.停止TToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.停止TToolStripMenuItem.Text = "停止"; this.停止TToolStripMenuItem.Text = "停止";
this.停止TToolStripMenuItem.Click += new System.EventHandler(this.停止所有料仓TToolStripMenuItem_Click); this.停止TToolStripMenuItem.Click += new System.EventHandler(this.停止所有料仓TToolStripMenuItem_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator5.Size = new System.Drawing.Size(141, 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(144, 26);
this.入库模式ToolStripMenuItem.Text = "入库模式"; this.入库模式ToolStripMenuItem.Text = "入库模式";
this.入库模式ToolStripMenuItem.Visible = false; this.入库模式ToolStripMenuItem.Visible = false;
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(141, 6);
this.toolStripSeparator2.Visible = false; this.toolStripSeparator2.Visible = false;
// //
// 退出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(144, 26);
this.退出ToolStripMenuItem.Text = "退出"; this.退出ToolStripMenuItem.Text = "退出";
this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click_1); this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click_1);
// //
...@@ -431,22 +431,34 @@ ...@@ -431,22 +431,34 @@
// 扫码测试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(160, 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);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(157, 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(160, 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);
// //
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(157, 6);
//
// 托盘初始化ToolStripMenuItem
//
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
//
// 帮助ToolStripMenuItem // 帮助ToolStripMenuItem
// //
this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.帮助ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
...@@ -515,18 +527,6 @@ ...@@ -515,18 +527,6 @@
this.listView1.View = System.Windows.Forms.View.Details; this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
// //
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
//
// 托盘初始化ToolStripMenuItem
//
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
//
// FrmLineStore // FrmLineStore
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......
...@@ -100,8 +100,8 @@ namespace OnlineStore.AssemblyLine ...@@ -100,8 +100,8 @@ namespace OnlineStore.AssemblyLine
} }
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
FrmBase. GetVersion(); FrmBase.GetVersion(true);
if(!LineManager.Init()) if (!LineManager.Init())
{ {
LogUtil.error("加载配置失败,直接退出程序"); LogUtil.error("加载配置失败,直接退出程序");
Application.Exit(); Application.Exit();
......
...@@ -38,7 +38,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -38,7 +38,7 @@ namespace OnlineStore.DeviceLibrary
public override bool StartRun(bool isDebug = false) public override bool StartRun(bool isDebug = false)
{ {
preTrayNum = 0; preTrayNum = 0;
currMoveTrayNum = 0; currTrayNum = 0;
mainTimer.Enabled = false; mainTimer.Enabled = false;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
...@@ -251,13 +251,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -251,13 +251,14 @@ namespace OnlineStore.DeviceLibrary
public override bool StartInStoreMove(InOutParam param) public override bool StartInStoreMove(InOutParam param)
{ {
return false; return false;
}
}
protected override void InStoreProcess() protected override void InStoreProcess()
{ {
} }
protected override void CheckFixtureProcess()
{
}
} }
} }
...@@ -11,31 +11,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,31 +11,8 @@ namespace OnlineStore.DeviceLibrary
{ {
partial class DischargeLine partial class DischargeLine
{ {
#region 托盘检测 #region 是否可移栽料盘
private void StartCheckFixture()
{
}
private bool CheckIsNeedOutStore()
{
return false;
}
protected override void CheckFixtureProcess()
{
if (!LineManager.Line.LineCanRun())
{
return;
}
if (SecondMoveInfo.IsInWait)
{
CheckWait(SecondMoveInfo);
}
if (SecondMoveInfo.IsInWait)
{
return;
}
}
internal bool CanStartOut(int lineNum) internal bool CanStartOut(int lineNum)
{ {
...@@ -117,10 +94,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -117,10 +94,8 @@ namespace OnlineStore.DeviceLibrary
} }
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (MoveInfo.MoveStep.Equals(LineMoveStep.DL_R_LineCheck)) if (MoveInfo.MoveStep.Equals(LineMoveStep.DL_R_LineCheck))
{ {
}
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DL_R_LineCheck)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DL_R_LineCheck))
{ {
LogInfo("出料【" + posId + "】处理完成!"); LogInfo("出料【" + posId + "】处理完成!");
......
...@@ -13,12 +13,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -13,12 +13,12 @@ namespace OnlineStore.DeviceLibrary
{ {
private bool IsIntSlvBlock = false; private bool IsIntSlvBlock = false;
public bool IsDebug = false; public bool IsDebug = false;
public AxisAlarmInfo AxisAlarm = new AxisAlarmInfo(); internal AxisAlarmInfo AxisAlarm = new AxisAlarmInfo();
public bool UseAxis = false; public bool UseAxis = false;
public List<InOutParam> waitOutStoreList = new List<InOutParam>(); public List<InOutParam> waitOutStoreList = new List<InOutParam>();
public List<InOutParam> waitInStoreList = new List<InOutParam>(); public List<InOutParam> waitInStoreList = new List<InOutParam>();
public object waitInListLock = ""; internal object waitInListLock = "";
public object waitOutListLock = ""; internal object waitOutListLock = "";
/// <summary> /// <summary>
///移栽装置后面分为两条移动线 ///移栽装置后面分为两条移动线
/// </summary> /// </summary>
...@@ -26,11 +26,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -26,11 +26,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 上一个盘号 /// 上一个盘号
/// </summary> /// </summary>
public int preTrayNum = 0; internal int preTrayNum = 0;
/// <summary> /// <summary>
/// 当前正在通过的托盘号 /// 当前正在通过的托盘号
/// </summary> /// </summary>
protected int currMoveTrayNum = 0; protected int currTrayNum = 0;
protected abstract void ReturnHomeProcess(); protected abstract void ReturnHomeProcess();
protected virtual void StopMoveProcess() protected virtual void StopMoveProcess()
......
...@@ -361,7 +361,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -361,7 +361,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return true; return true;
} }
if (TrayManager.IsHasFull()) if (TrayManager.IsHasFullTray())
{ {
return true; return true;
} }
...@@ -599,24 +599,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -599,24 +599,7 @@ namespace OnlineStore.DeviceLibrary
} }
// FeederProcess(); // FeederProcess();
//如果驱动电机正转过程中,驱动电机INV1状态 驱动电机INV2状态 有信号,需要报警
//if (IOValue(IO_Type.DriveMotor_Run).Equals(IO_VALUE.HIGH))
//{
// if (IOValue(IO_Type.DriveMotor_INV1).Equals(IO_VALUE.LOW))
// {
// WarnMsg = "驱动电机INV1状态异常";
// LogUtil.error("驱动电机正转过程中,DriveMotor_INV1 信号LOW,需要报警", 300);
// //Alarm(LineAlarmType.SuddenStop, "1", WarnMsg, LineMoveType.None);
// }
// else if (IOValue(IO_Type.DriveMotor_INV2).Equals(IO_VALUE.LOW))
// {
// WarnMsg = "驱动电机INV2状态异常";
// LogUtil.error("驱动电机正转过程中,DriveMotor_INV2 信号LOW,需要报警", 301);
// // Alarm(LineAlarmType.SuddenStop, "1", WarnMsg, LineMoveType.None);
// }
//}
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -625,21 +608,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -625,21 +608,6 @@ namespace OnlineStore.DeviceLibrary
} }
Thread.Sleep(1); Thread.Sleep(1);
} }
//public string GetINVMsg()
//{
// if (IOValue(IO_Type.DriveMotor_Run).Equals(IO_VALUE.HIGH))
// {
// if (IOValue(IO_Type.DriveMotor_INV1).Equals(IO_VALUE.LOW))
// {
// return " 驱动电机INV1状态异常";
// }
// else if (IOValue(IO_Type.DriveMotor_INV2).Equals(IO_VALUE.LOW))
// {
// return " 驱动电机INV2状态异常";
// }
// }
// return "";
//}
/// <summary> /// <summary>
/// 定时处理,监听信号,监听IO /// 定时处理,监听信号,监听IO
/// </summary> /// </summary>
......
...@@ -949,86 +949,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -949,86 +949,6 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
#region 高度传感器处理
public int GetWidth()
{
////根据料盘检测信号
//if (IOValue(IO_Type.InStore_TrayCheck2).Equals(IO_VALUE.HIGH))
//{
// return 13;
//}
return 7;
}
public int GetHeight()
{
if (GetWidth().Equals(13))
{
return Get13Height();
}
return Get7Height();
}
private int Get7Height()
{
int result = 0;
//if (IOValue(IO_Type.InStore_TrayCheck1).Equals(IO_VALUE.LOW))
//{
// return result;
//}
//int ai1 = AIManager.GetAIValue(Config.AIDI1_Addr);
//int ai2 = AIManager.GetAIValue(Config.AIDI2_Addr);
//double ai1Value = AIManager.ConvertAI(ai1, Config.AIDI1_DefaultPosition);
//double ai2Value = AIManager.ConvertAI(ai2, Config.AIDI2_DefaultPosition);
//result = CalHeight(ai1Value, ai2Value);
return result;
}
private int Get13Height()
{
int result = 0;
//if (IOValue(IO_Type.InStore_TrayCheck2).Equals(IO_VALUE.LOW))
//{
// return result;
//}
//double ai1Value = AIManager.ConvertAI(AIManager.GetAIValue(Config.AIDI3_Addr), Config.AIDI3_DefaultPosition);
//double ai2Value = AIManager.ConvertAI(AIManager.GetAIValue(Config.AIDI4_Addr), Config.AIDI4_DefaultPosition);
//result = CalHeight(ai1Value, ai2Value);
return result;
}
private int CalHeight(double ai1Value, double ai2Value)
{
int result = 0;
double Value = Math.Round((ai1Value + ai2Value) / 2, 1);
if (Value > 10)
{
int mo = (int)Value % 4;
if (!mo.Equals(0))
{
result = ((int)(Value + 2) / 4) * 4;
}
else
{
result = (int)Value;
}
}
else if (Value >= 4)
{
if (ai1Value >= 9 || ai2Value >= 9)
{
result = 12;
}
else
{
result = 8;
}
}
return result;
}
#endregion
#region 料仓出入库逻辑处理 #region 料仓出入库逻辑处理
......
...@@ -48,7 +48,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,7 +48,7 @@ namespace OnlineStore.DeviceLibrary
public override bool StartRun(bool isDebug=false) public override bool StartRun(bool isDebug=false)
{ {
preTrayNum = 0; preTrayNum = 0;
currMoveTrayNum = 0; currTrayNum = 0;
mainTimer.Enabled = false; mainTimer.Enabled = false;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
...@@ -65,7 +65,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -65,7 +65,7 @@ namespace OnlineStore.DeviceLibrary
public override void StopRun() public override void StopRun()
{ {
preTrayNum = 0; preTrayNum = 0;
currMoveTrayNum = 0; currTrayNum = 0;
if (mainTimer != null) if (mainTimer != null)
{ {
mainTimer.Enabled = false; mainTimer.Enabled = false;
...@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
//重置时清理盘号,从头开始判断 //重置时清理盘号,从头开始判断
preTrayNum = 0; preTrayNum = 0;
currMoveTrayNum = 0; currTrayNum = 0;
LogInfo("开始重置:清空托盘号,(上下气缸回原点,阻挡1气缸上升 )开始;"); LogInfo("开始重置:清空托盘号,(上下气缸回原点,阻挡1气缸上升 )开始;");
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
......
...@@ -323,7 +323,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -323,7 +323,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否是自己排队列表中的入库信息 //判断是否是自己排队列表中的入库信息
foreach (InOutParam cc in waitInStoreList) foreach (InOutParam cc in waitInStoreList)
{ {
if (cc.TrayNumber.Equals(currMoveTrayNum) && (!cc.WareCode.Equals(""))) if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")))
{ {
return true; return true;
} }
...@@ -340,13 +340,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -340,13 +340,13 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
private bool CheckIsNeedOutStore() private bool CheckIsNeedOutStore()
{ {
bool isFull = TrayManager.IsFixTureFull(currMoveTrayNum); bool isFull = TrayManager.TrayIsFull(currTrayNum);
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && (MoveInfo.MoveStep >= LineMoveStep.MO_56_BeforeAfterCylinderAfter) if (MoveInfo.MoveType.Equals(LineMoveType.OutStore) && (MoveInfo.MoveStep >= LineMoveStep.MO_56_BeforeAfterCylinderAfter)
&& (!MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp))) && (!MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp)))
{ {
if (isFull.Equals(false)) if (isFull.Equals(false))
{ {
LogInfo(" 托盘号【" + preTrayNum + "】,当前托盘号【(isFull=" + isFull + "):" + currMoveTrayNum + "】需要出库,不顶升直接让移栽放盘~"); LogInfo(" 托盘号【" + preTrayNum + "】,当前托盘号【(isFull=" + isFull + "):" + currTrayNum + "】需要出库,不顶升直接让移栽放盘~");
return true; return true;
} }
//去掉直接丢料盘处理 //去掉直接丢料盘处理
...@@ -364,8 +364,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -364,8 +364,8 @@ namespace OnlineStore.DeviceLibrary
/// <returns></returns> /// <returns></returns>
private bool CheckIsNeedInStore() private bool CheckIsNeedInStore()
{ {
bool isfull = TrayManager.IsFixTureFull(currMoveTrayNum); bool isfull = TrayManager.TrayIsFull(currTrayNum);
LogInfo("***************入库*****验证入库编号,托盘号【" + currMoveTrayNum + "】,isfull【" + isfull + "】"); LogInfo("***************入库*****验证入库编号,托盘号【" + currTrayNum + "】,isfull【" + isfull + "】");
//FixtureCodeInfo code = GetBox().currInOutFixture; //FixtureCodeInfo code = GetBox().currInOutFixture;
if (!isfull) if (!isfull)
{ {
...@@ -382,11 +382,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -382,11 +382,11 @@ namespace OnlineStore.DeviceLibrary
for (int i = 0; i < waitInStoreList.Count; i++) for (int i = 0; i < waitInStoreList.Count; i++)
{ {
InOutParam cc = waitInStoreList[i]; InOutParam cc = waitInStoreList[i];
if (cc.TrayNumber.Equals(currMoveTrayNum) && (!cc.WareCode.Equals(""))) if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")))
{ {
reIndex = i; reIndex = i;
currCode = cc; currCode = cc;
LogInfo("*******托盘" + currMoveTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽"); LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽");
SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW); SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW);
break; break;
} }
...@@ -396,7 +396,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -396,7 +396,7 @@ namespace OnlineStore.DeviceLibrary
waitInStoreList.RemoveAt(reIndex); waitInStoreList.RemoveAt(reIndex);
if (!LineServer.BoxCanInStore(DeviceID)) if (!LineServer.BoxCanInStore(DeviceID))
{ {
LogUtil.info(Name + "*******托盘" + currMoveTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先移栽再等待料仓可入库,开始入库移栽"); LogUtil.info(Name + "*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先移栽再等待料仓可入库,开始入库移栽");
return true; return true;
} }
else else
...@@ -490,15 +490,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -490,15 +490,16 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要顶升 //判断是否需要顶升
bool isNeed = false; bool isNeed = false;
//此处先对托盘号进行验证 //此处先对托盘号进行验证
currMoveTrayNum = TrayManager.GetTrayNum(DeviceID); preTrayNum = currTrayNum;
bool isFull = TrayManager.IsFixTureFull(currMoveTrayNum); currTrayNum = TrayManager.GetTrayNum(DeviceID);
if (TrayManager.RightTrayCode(currMoveTrayNum, preTrayNum, false)) bool isFull = TrayManager.TrayIsFull(currTrayNum);
if (TrayManager.RightTrayCode(currTrayNum, preTrayNum, false))
{ {
//出库中,需要拦盘 //出库中,需要拦盘
if (CheckIsNeedOutStore()) if (CheckIsNeedOutStore())
{ {
//preTrayNum = currMoveTrayNum; //preTrayNum = currMoveTrayNum;
SecondMoveInfo.MoveParam = new InOutParam(currMoveTrayNum); SecondMoveInfo.MoveParam = new InOutParam(currTrayNum);
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
return; return;
...@@ -510,7 +511,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -510,7 +511,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
string msg = Name + " 托盘顺序错乱,上个托盘号【" + preTrayNum + "】当前托盘号 【" + currMoveTrayNum + "】最大盘号【" + TrayManager.MaxTrayNum + "】"; string msg = Name + " 托盘顺序错乱,上个托盘号【" + preTrayNum + "】当前托盘号 【" + currTrayNum + "】最大盘号【" + TrayManager.MaxTrayNum + "】";
TrayManager.UpdateTrayNumError(DeviceID, msg); TrayManager.UpdateTrayNumError(DeviceID, msg);
LogUtil.error(msg); LogUtil.error(msg);
return; return;
...@@ -523,7 +524,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -523,7 +524,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogInfo(SecondMoveInfo.MoveNum + "***************上个托盘号【" + preTrayNum + "】,当前" + (isFull ? "有料托盘" : "空托盘") + "【" + currMoveTrayNum + "】没有出入库任务,放盘通过~"); LogInfo(SecondMoveInfo.MoveNum + "***************上个托盘号【" + preTrayNum + "】,当前" + (isFull ? "有料托盘" : "空托盘") + "【" + currTrayNum + "】没有出入库任务,放盘通过~");
// preTrayNum = currMoveTrayNum; // preTrayNum = currMoveTrayNum;
if (TrayManager.ErrorStoreId.Equals(DeviceID)) if (TrayManager.ErrorStoreId.Equals(DeviceID))
{ {
...@@ -552,7 +553,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -552,7 +553,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopCylinderUp)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopCylinderUp))
{ {
CheckLog("托盘检测(流水线阻挡)*************** 托盘号【" + currMoveTrayNum + "】"); CheckLog("托盘检测(流水线阻挡)*************** 托盘号【" + currTrayNum + "】");
//托盘号正确 //托盘号正确
//preTrayNum = num; //preTrayNum = num;
...@@ -560,9 +561,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -560,9 +561,9 @@ namespace OnlineStore.DeviceLibrary
//判断盘是空盘,空盘并且编号正确才需要放料盘过去 //判断盘是空盘,空盘并且编号正确才需要放料盘过去
if (CheckIsNeedOutStore()) if (CheckIsNeedOutStore())
{ {
SecondMoveInfo.MoveParam = new InOutParam(currMoveTrayNum); SecondMoveInfo.MoveParam = new InOutParam(currTrayNum);
isNeedMove = true; isNeedMove = true;
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currMoveTrayNum + "】可以放出库托盘,正在出库中,移栽料盘"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】可以放出库托盘,正在出库中,移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
} }
...@@ -570,13 +571,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -570,13 +571,13 @@ namespace OnlineStore.DeviceLibrary
{ {
if (CheckIsNeedInStore()) if (CheckIsNeedInStore())
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currMoveTrayNum + "】不是空盘,有对应的入库任务,等待移栽"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】不是空盘,有对应的入库任务,等待移栽");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_08_WaitInStore);
isNeedMove = true; isNeedMove = true;
} }
else else
{ {
LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currMoveTrayNum + "】不是空盘, 放盘通过"); LogInfo(SecondMoveInfo.MoveNum + "*************** 托盘号【" + currTrayNum + "】不是空盘, 放盘通过");
} }
} }
if (!isNeedMove) if (!isNeedMove)
...@@ -586,7 +587,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -586,7 +587,7 @@ namespace OnlineStore.DeviceLibrary
{ {
TrayManager.UpdateTrayNumError(-1, ""); TrayManager.UpdateTrayNumError(-1, "");
} }
CheckLog("托盘检测 SecondMove:(MO_13_TopCylinder_Down ,托盘号【" + currMoveTrayNum + "】,直接放盘通过,顶升气缸下降)"); CheckLog("托盘检测 SecondMove:(MO_13_TopCylinder_Down ,托盘号【" + currTrayNum + "】,直接放盘通过,顶升气缸下降)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopCylinder_Down);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
} }
...@@ -637,7 +638,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -637,7 +638,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_18_StopCylinder_Back)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_18_StopCylinder_Back))
{ {
preTrayNum = currMoveTrayNum; preTrayNum = currTrayNum;
CheckLog("托盘放行 SecondMove:(托盘放行结束) "); CheckLog("托盘放行 SecondMove:(托盘放行结束) ");
// IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); // IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
......
...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
public override bool StartRun(bool isDebug=false) public override bool StartRun(bool isDebug=false)
{ {
preTrayNum = 0; preTrayNum = 0;
currMoveTrayNum = 0; currTrayNum = 0;
mainTimer.Enabled = false; mainTimer.Enabled = false;
MoveInfo.EndMove(); MoveInfo.EndMove();
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = ""; WarnMsg = "";
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
preTrayNum = 0; preTrayNum = 0;
currMoveTrayNum = 0; currTrayNum = 0;
LogInfo("开始重置:清理盘号,(上下气上升,阻挡气缸上升 )开始 "); LogInfo("开始重置:清理盘号,(上下气上升,阻挡气缸上升 )开始 ");
runStatus = LineRunStatus.Reset; runStatus = LineRunStatus.Reset;
MoveInfo.EndMove(); MoveInfo.EndMove();
......
...@@ -103,9 +103,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,9 +103,9 @@ namespace OnlineStore.DeviceLibrary
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_04_Wait))
{ {
//此处先对托盘号进行验证 //此处先对托盘号进行验证
currMoveTrayNum = TrayManager.GetTrayNum(DeviceID); preTrayNum = currTrayNum;
bool isFull = TrayManager.IsFixTureFull(currMoveTrayNum); currTrayNum = TrayManager.GetTrayNum(DeviceID);
if (TrayManager.RightTrayCode(currMoveTrayNum, preTrayNum, false)) if (TrayManager.RightTrayCode(currTrayNum, preTrayNum, false))
{ {
if (TrayManager.ErrorStoreId.Equals(DeviceID)) if (TrayManager.ErrorStoreId.Equals(DeviceID))
{ {
...@@ -114,8 +114,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -114,8 +114,8 @@ namespace OnlineStore.DeviceLibrary
//出料中,需要拦盘 //出料中,需要拦盘
if (CheckIsNeedOutStore()) if (CheckIsNeedOutStore())
{ {
TrayInfo trayInfo = TrayManager.GetTrayInfo(currMoveTrayNum); TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
InOutParam param = new InOutParam(currMoveTrayNum, trayInfo.WareCode, trayInfo.PosId, trayInfo.PlateH, trayInfo.PlateW); InOutParam param = new InOutParam(currTrayNum, trayInfo.WareCode, trayInfo.PosId, trayInfo.PlateH, trayInfo.PlateW);
CheckLog("托盘检测(流水线阻挡)是需要出库" + param.ToStr() + ":(MIO_05_WaitTime 等待1秒后顶升上升 )"); CheckLog("托盘检测(流水线阻挡)是需要出库" + param.ToStr() + ":(MIO_05_WaitTime 等待1秒后顶升上升 )");
SecondMoveInfo.MoveParam = param; SecondMoveInfo.MoveParam = param;
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_05_WaitTime);
...@@ -126,15 +126,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -126,15 +126,15 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogInfo(SecondMoveInfo.MoveNum + "***************上个托盘号【" + preTrayNum + "】,当前" + (isFull ? "有料托盘" : "空托盘") + "【" + currMoveTrayNum + "】没有出入料任务,放盘通过~"); bool isFull = TrayManager.TrayIsFull(currTrayNum);
LogInfo(SecondMoveInfo.MoveNum + "***************上个托盘号【" + preTrayNum + "】,当前" + (isFull ? "有料托盘" : "空托盘") + "【" + currTrayNum + "】没有出入料任务,放盘通过~");
CheckLog("托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)"); CheckLog("托盘放行 SecondMove:(MO_14_WaitCanGo ,移栽2,需要判断是否可以放盘通过,最多等待10000)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_15_WaitCanGo);
} }
} }
else else
{ {
string msg = Name + " 托盘顺序错乱,上个托盘号【" + preTrayNum + "】当前托盘号 【" + currMoveTrayNum + "】最大盘号【" + TrayManager.MaxTrayNum + "】"; string msg = Name + " 托盘顺序错乱,上个托盘号【" + preTrayNum + "】当前托盘号 【" + currTrayNum + "】最大盘号【" + TrayManager.MaxTrayNum + "】";
TrayManager.UpdateTrayNumError(DeviceID, msg); TrayManager.UpdateTrayNumError(DeviceID, msg);
LogUtil.error(msg); LogUtil.error(msg);
return; return;
...@@ -152,8 +152,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -152,8 +152,8 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopCylinderUp)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_06_TopCylinderUp))
{ {
SecondMoveInfo.MoveParam = new InOutParam(currMoveTrayNum); SecondMoveInfo.MoveParam = new InOutParam(currTrayNum);
LogInfo(SecondMoveInfo.MoveNum + " 托盘号【" + currMoveTrayNum + "】等待移栽料盘"); LogInfo(SecondMoveInfo.MoveNum + " 托盘号【" + currTrayNum + "】等待移栽料盘");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_11_CodeRember);
SecondMoveInfo.EndStepWait(); SecondMoveInfo.EndStepWait();
} }
...@@ -198,7 +198,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -198,7 +198,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_18_StopCylinder_Back)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MO_18_StopCylinder_Back))
{ {
preTrayNum = currMoveTrayNum; preTrayNum = currTrayNum;
CheckLog("托盘放行 SecondMove:(托盘放行结束) "); CheckLog("托盘放行 SecondMove:(托盘放行结束) ");
// IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); // IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
SecondMoveInfo.EndMove(); SecondMoveInfo.EndMove();
......
...@@ -57,7 +57,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -57,7 +57,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
/// <param name="trayNum">盘号1-6</param> /// <param name="trayNum">盘号1-6</param>
/// <returns>盘上是否有料盘</returns> /// <returns>盘上是否有料盘</returns>
internal static bool IsFixTureFull(int trayNum) internal static bool TrayIsFull(int trayNum)
{ {
lock (fixtureMapLock) lock (fixtureMapLock)
{ {
...@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -129,7 +129,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 是否还有有料仓的盘 /// 是否还有有料仓的盘
/// </summary> /// </summary>
internal static bool IsHasFull() internal static bool IsHasFullTray()
{ {
foreach (int key in fixtureCodeFullMap.Keys) foreach (int key in fixtureCodeFullMap.Keys)
{ {
......
...@@ -377,17 +377,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -377,17 +377,55 @@ namespace OnlineStore.DeviceLibrary
/// 移载(流水线)装置出库处理,上下气缸1上升 /// 移载(流水线)装置出库处理,上下气缸1上升
/// </summary> /// </summary>
MO_60_UpDownCylinderUp = 3160, MO_60_UpDownCylinderUp = 3160,
#region 入料模块,紧急出料移栽处理
/// <summary>
/// 紧急出料移栽:升降伺服到P1点
/// </summary>
MO_201_UpDownToP1 = 3201,
/// <summary>
/// 紧急出料移栽:上料横移机构到放料端
/// /// </summary>
MO_202_MoveCylinder_Give = 3202,
/// <summary>
/// 紧急出料移栽:上料横移机构下降
/// /// </summary>
MO_203_MoveCylinder_Down = 3203,
/// <summary>
/// 紧急出料移栽:升降伺服下降到指定位置
/// /// </summary>
MO_204_UpdownAxisToP2= 3204,
/// <summary>
/// 紧急出料移栽:上料气缸夹紧
/// /// </summary>
MO_205_MoveCylinder_Tighten = 3205,
/// <summary>
/// 紧急出料移栽:升降伺服到P1
/// /// </summary>
MO_206_UpdownAxisToP1= 3206,
/// <summary>
/// 紧急出料移栽:上料横移机构上升
/// /// </summary>
MO_207_MoveCylinder_Up= 3207,
/// <summary>
/// 紧急出料移栽:上料横移机构到取料端
/// /// </summary>
MO_208_MoveCylinder_Take = 3208,
/// <summary>
/// 紧急出料移栽:等待料架准备好
/// /// </summary>
MO_209_Wait = 3209,
#endregion #endregion
#endregion
#region 横移轨道处理 5000 开始 #region 横移轨道处理 5000 开始
SW00_Wait=5000, SW00_Wait = 5000,
/// <summary> /// <summary>
/// 定位气缸下降 /// 定位气缸下降
/// </summary> /// </summary>
...@@ -663,11 +701,123 @@ namespace OnlineStore.DeviceLibrary ...@@ -663,11 +701,123 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 入料装置出料处理,12000开始 #region 入料装置出料处理,12000开始
/// <summary>
/// 出料流程:升降盘定位气缸后退
/// </summary>
FO_01_TrayLocation_After = 12001,
/// <summary>
/// 出料流程:定位气缸下降
/// </summary>
FO_02_LocationCylinder_Down = 12002,
/// <summary>
/// 入口流水线转动,等待出料检测信号消失
/// </summary>
FO_03_LineStart = 12003,
/// <summary>
/// 入口流水线转动,等待阻挡气缸信号到位
/// </summary>
FO_04_LineRunCheck = 12004,
/// <summary>
/// 入口流水线转动,等待出料阻挡信号消失
/// </summary>
FO_05_LineStart = 12005,
/// <summary>
/// 入口流水线转动,等待定位工位检测到位
/// </summary>
FO_06_LineRunCheck = 12006,
/// <summary>
///出料检测: 工位检测信号,定位气缸上升
/// </summary>
FO_07_LocationCylinder_Up = 12007,
/// <summary>
/// 出料检测:提升轴下降到位P2
/// </summary>
FO_08_BatchAxisToP2 = 12008,
/// <summary>
/// 出料检测:升降盘定位气缸前进
/// </summary>
FO_09_TrayLocation_Before = 12009,
/// <summary>
/// 出料检测:上料轴开始慢速上升到P3点
/// </summary>
FO_10_AxisUpMove = 12010,
/// <summary>
/// 料盘移栽:上料轴下降指定的高度
/// </summary>
FO_11_AxisDownMove = 12011,
/// <summary>
/// 料盘移栽:出料横移机构下降
/// </summary>
FO_12_MoveCylinder_Down = 12012,
/// <summary>
/// 料盘移栽:出料横移机构放松
/// </summary>
FO_13_MoveCylinder_Slack = 12013,
/// <summary>
/// 料盘移栽:出料横移机构上升
/// </summary>
FO_14_MoveCylinder_Up = 12014,
/// <summary>
/// 出料完成,料盘已放入料架,提升伺服到P2点
/// </summary>
FO_31_BatchAxisToP2 = 12031,
/// <summary>
/// 出料完成,升降盘定位气缸后退
/// </summary>
FO_32_TrayLocationCylinder_After = 12032,
/// <summary>
/// 出料完成,提升伺服到P1点
/// </summary>
FO_33_BatchAxisToP1 = 12033,
/// <summary>
/// 出料完成,判断出料线体是否有料架
/// </summary>
FO_34_OutCheck = 12034,
/// <summary>
/// 出料完成,出口顶升气缸上升
/// </summary>
FO_35_OutTopCylinder_Up = 12035,
/// <summary>
///出料完成, 线体横移电机运转,等待料架到达出口
/// </summary>
FO_36_SideWayLineRun = 12036,
/// <summary>
///出料完成, 料架到达出口,线体横移电机停止
/// </summary>
FO_37_LineStop = 12037,
/// <summary>
///出料完成, 料架到达出口,出口顶升下降,定位气缸下降,
/// </summary>
FO_38_TopCylinderDown = 12038,
/// <summary>
///出料完成, 出口线体运转,料架到达出口处, 通知AGV取空料架
/// </summary>
FO_39_OutLineRun = 12039,
/// <summary>
///出料完成, AGV到达,继续转动出口线体,送走出料料架,
/// </summary>
FO_40_OutLineRun = 12040,
/// <summary> /// <summary>
/// ///出料完成, 料架送出,
/// </summary> /// </summary>
FO_01_OutLineStart = 12000, FO_41_OutLineRun = 12041,
#endregion #endregion
#region 出料装置移栽出料,20000开始 #region 出料装置移栽出料,20000开始
......
...@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public int PlateW { get; set; } public int PlateW { get; set; }
public bool EmergencyOut = false;
} }
/// <summary> /// <summary>
/// 托盘上的物料的类型 /// 托盘上的物料的类型
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!