Commit 5f947b49 LN

界面调整

1 个父辈 2974d919
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
<add key="ConfigPath_DischargeLine" value="\LineConfig\Config_DischargeLine.csv" /> <add key="ConfigPath_DischargeLine" value="\LineConfig\Config_DischargeLine.csv" />
<add key ="ConfigPath_TrayList" value ="\LineConfig\TrayList.data"/> <add key ="ConfigPath_TrayList" value ="\LineConfig\TrayList.data"/>
<add key="Line_Type" value="Line" /> <add key="Line_Type" value="Line" />
<add key="Line_CID" value="rc1250" /> <add key="Line_CID" value="so664" />
<!--end one store config--> <!--end one store config-->
<!--摄像机名称列表配置,用#分割--> <!--摄像机名称列表配置,用#分割-->
<add key="CameraName" value="GigE:MV-CE100-30GC (00C69898519)#GigE:MV-CE100-30GC (00C95305929)" /> <add key="CameraName" value="GigE:MV-CE100-30GC (00C69898519)#GigE:MV-CE100-30GC (00C95305929)" />
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code--> <!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<add key="CodeType" value="Data Matrix ECC 200#QR Code#PDF417" /> <add key="CodeType" value="Data Matrix ECC 200#QR Code" />
<!--<add key="CodeType" value="Data Matrix ECC 200"/>--> <!--<add key="CodeType" value="Data Matrix ECC 200"/>-->
<add key="ACBaudRate" value="115200" /> <add key="ACBaudRate" value="115200" />
<!--二维码参数文件所在路径,文件名与二维码类型名一样--> <!--二维码参数文件所在路径,文件名与二维码类型名一样-->
...@@ -49,9 +49,7 @@ ...@@ -49,9 +49,7 @@
<add key="ABBServerPort" value="21" /> <add key="ABBServerPort" value="21" />
<!--是否打开托盘编码界面--> <!--是否打开托盘编码界面-->
<add key="OpenRFIDWrite" value="1" /> <add key="OpenRFIDWrite" value="1" />
<add key="DefaultPWD" value="123456" /> <add key="DefaultPWD" value="123456" />
<!--当前调试的设备ID,分号分割-->
<add key="DebugDeviceId" value="0" />
<add key="Server_Log_Open" value="0" /> <add key="Server_Log_Open" value="0" />
<add key="CodeCount" value="4" /> <add key="CodeCount" value="4" />
<add key="DefaultTrayNum" value="0" /> <add key="DefaultTrayNum" value="0" />
...@@ -61,14 +59,13 @@ ...@@ -61,14 +59,13 @@
<add key="Feed_LastShelfID_101" value="B19" /> <add key="Feed_LastShelfID_101" value="B19" />
<add key="Feed_LastShelfID_102" value="B23" /> <add key="Feed_LastShelfID_102" value="B23" />
<add key="Feed_LastShelfID_103" value="B25" /> <add key="Feed_LastShelfID_103" value="B25" />
<add key="Feed_LastShelfID_104" value="B7" /> <add key="Feed_LastShelfID_104" value="B7" />
<add key="Brush_Delay_Seconds" value="5" />
<add key ="SaveErrorImageToFile" value ="1"/> <add key ="SaveErrorImageToFile" value ="1"/>
<add key ="UseHCBoard" value ="1"/> <add key ="UseHCBoard" value ="1"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/Line-RC1250.log" /> <file value="logs/Line-SO664.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <rollingStyle value="Date" />
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
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.chbRightDis = new System.Windows.Forms.CheckBox();
this.chbLeftDis = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblPosId = new System.Windows.Forms.Label(); this.lblPosId = new System.Windows.Forms.Label();
this.btnUpdateStatus = new System.Windows.Forms.Button(); this.btnUpdateStatus = new System.Windows.Forms.Button();
...@@ -107,9 +109,11 @@ ...@@ -107,9 +109,11 @@
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
this.启用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.启用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator16 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator25 = new System.Windows.Forms.ToolStripSeparator();
this.aGVCancelStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aGVCancelStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator17 = new System.Windows.Forms.ToolStripSeparator();
this.自动保存托盘信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.自动保存托盘信息ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator24 = new System.Windows.Forms.ToolStripSeparator();
this.contextMenuStrip_control = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuStrip_control = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator();
this.toolName = new System.Windows.Forms.ToolStripMenuItem(); this.toolName = new System.Windows.Forms.ToolStripMenuItem();
...@@ -122,12 +126,6 @@ ...@@ -122,12 +126,6 @@
this.toolStripSeparator20 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator20 = new System.Windows.Forms.ToolStripSeparator();
this.control_Debug = new System.Windows.Forms.ToolStripMenuItem(); this.control_Debug = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator22 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator24 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator25 = new System.Windows.Forms.ToolStripSeparator();
this.启用右侧ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.启用左侧出料线ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chbLeftDis = new System.Windows.Forms.CheckBox();
this.chbRightDis = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -178,6 +176,28 @@ ...@@ -178,6 +176,28 @@
this.tabPage1.Text = " 运行日志 "; this.tabPage1.Text = " 运行日志 ";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// chbRightDis
//
this.chbRightDis.AutoSize = true;
this.chbRightDis.Location = new System.Drawing.Point(176, 14);
this.chbRightDis.Name = "chbRightDis";
this.chbRightDis.Size = new System.Drawing.Size(126, 24);
this.chbRightDis.TabIndex = 197;
this.chbRightDis.Text = "禁用右侧出料线";
this.chbRightDis.UseVisualStyleBackColor = true;
this.chbRightDis.CheckedChanged += new System.EventHandler(this.chbRightDis_CheckedChanged);
//
// chbLeftDis
//
this.chbLeftDis.AutoSize = true;
this.chbLeftDis.Location = new System.Drawing.Point(26, 14);
this.chbLeftDis.Name = "chbLeftDis";
this.chbLeftDis.Size = new System.Drawing.Size(126, 24);
this.chbLeftDis.TabIndex = 196;
this.chbLeftDis.Text = "禁用左侧出料线";
this.chbLeftDis.UseVisualStyleBackColor = true;
this.chbLeftDis.CheckedChanged += new System.EventHandler(this.chbLeftDis_CheckedChanged);
//
// groupBox1 // groupBox1
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -850,9 +870,7 @@ ...@@ -850,9 +870,7 @@
this.aGVCancelStateToolStripMenuItem, this.aGVCancelStateToolStripMenuItem,
this.toolStripSeparator17, this.toolStripSeparator17,
this.自动保存托盘信息ToolStripMenuItem, this.自动保存托盘信息ToolStripMenuItem,
this.toolStripSeparator24, this.toolStripSeparator24});
this.启用左侧出料线ToolStripMenuItem,
this.启用右侧ToolStripMenuItem});
this.运行参数ToolStripMenuItem.Name = "运行参数ToolStripMenuItem"; this.运行参数ToolStripMenuItem.Name = "运行参数ToolStripMenuItem";
this.运行参数ToolStripMenuItem.Size = new System.Drawing.Size(86, 25); this.运行参数ToolStripMenuItem.Size = new System.Drawing.Size(86, 25);
this.运行参数ToolStripMenuItem.Text = "运行参数"; this.运行参数ToolStripMenuItem.Text = "运行参数";
...@@ -881,6 +899,11 @@ ...@@ -881,6 +899,11 @@
this.toolStripSeparator16.Name = "toolStripSeparator16"; this.toolStripSeparator16.Name = "toolStripSeparator16";
this.toolStripSeparator16.Size = new System.Drawing.Size(203, 6); this.toolStripSeparator16.Size = new System.Drawing.Size(203, 6);
// //
// toolStripSeparator25
//
this.toolStripSeparator25.Name = "toolStripSeparator25";
this.toolStripSeparator25.Size = new System.Drawing.Size(203, 6);
//
// aGVCancelStateToolStripMenuItem // aGVCancelStateToolStripMenuItem
// //
this.aGVCancelStateToolStripMenuItem.Name = "aGVCancelStateToolStripMenuItem"; this.aGVCancelStateToolStripMenuItem.Name = "aGVCancelStateToolStripMenuItem";
...@@ -900,6 +923,11 @@ ...@@ -900,6 +923,11 @@
this.自动保存托盘信息ToolStripMenuItem.Text = "保存托盘信息"; this.自动保存托盘信息ToolStripMenuItem.Text = "保存托盘信息";
this.自动保存托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.自动保存托盘信息ToolStripMenuItem_Click); this.自动保存托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.自动保存托盘信息ToolStripMenuItem_Click);
// //
// toolStripSeparator24
//
this.toolStripSeparator24.Name = "toolStripSeparator24";
this.toolStripSeparator24.Size = new System.Drawing.Size(203, 6);
//
// contextMenuStrip_control // contextMenuStrip_control
// //
this.contextMenuStrip_control.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.contextMenuStrip_control.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -984,50 +1012,6 @@ ...@@ -984,50 +1012,6 @@
this.toolStripSeparator22.Name = "toolStripSeparator22"; this.toolStripSeparator22.Name = "toolStripSeparator22";
this.toolStripSeparator22.Size = new System.Drawing.Size(159, 6); this.toolStripSeparator22.Size = new System.Drawing.Size(159, 6);
// //
// toolStripSeparator24
//
this.toolStripSeparator24.Name = "toolStripSeparator24";
this.toolStripSeparator24.Size = new System.Drawing.Size(203, 6);
//
// toolStripSeparator25
//
this.toolStripSeparator25.Name = "toolStripSeparator25";
this.toolStripSeparator25.Size = new System.Drawing.Size(203, 6);
//
// 启用右侧ToolStripMenuItem
//
this.启用右侧ToolStripMenuItem.Name = "启用右侧ToolStripMenuItem";
this.启用右侧ToolStripMenuItem.Size = new System.Drawing.Size(206, 26);
this.启用右侧ToolStripMenuItem.Text = "启用右侧";
//
// 启用左侧出料线ToolStripMenuItem
//
this.启用左侧出料线ToolStripMenuItem.Name = "启用左侧出料线ToolStripMenuItem";
this.启用左侧出料线ToolStripMenuItem.Size = new System.Drawing.Size(206, 26);
this.启用左侧出料线ToolStripMenuItem.Text = "启用左侧出料线";
//
// chbLeftDis
//
this.chbLeftDis.AutoSize = true;
this.chbLeftDis.Location = new System.Drawing.Point(26, 14);
this.chbLeftDis.Name = "chbLeftDis";
this.chbLeftDis.Size = new System.Drawing.Size(126, 24);
this.chbLeftDis.TabIndex = 196;
this.chbLeftDis.Text = "禁用左侧出料线";
this.chbLeftDis.UseVisualStyleBackColor = true;
this.chbLeftDis.CheckedChanged += new System.EventHandler(this.chbLeftDis_CheckedChanged);
//
// chbRightDis
//
this.chbRightDis.AutoSize = true;
this.chbRightDis.Location = new System.Drawing.Point(176, 14);
this.chbRightDis.Name = "chbRightDis";
this.chbRightDis.Size = new System.Drawing.Size(126, 24);
this.chbRightDis.TabIndex = 197;
this.chbRightDis.Text = "禁用右侧出料线";
this.chbRightDis.UseVisualStyleBackColor = true;
this.chbRightDis.CheckedChanged += new System.EventHandler(this.chbRightDis_CheckedChanged);
//
// FrmLineStore // FrmLineStore
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -1171,8 +1155,6 @@ ...@@ -1171,8 +1155,6 @@
private System.Windows.Forms.ToolStripMenuItem 自动保存托盘信息ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 自动保存托盘信息ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator24; private System.Windows.Forms.ToolStripSeparator toolStripSeparator24;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator25; private System.Windows.Forms.ToolStripSeparator toolStripSeparator25;
private System.Windows.Forms.ToolStripMenuItem 启用左侧出料线ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 启用右侧ToolStripMenuItem;
private System.Windows.Forms.CheckBox chbLeftDis; private System.Windows.Forms.CheckBox chbLeftDis;
private System.Windows.Forms.CheckBox chbRightDis; private System.Windows.Forms.CheckBox chbRightDis;
} }
......
...@@ -36,7 +36,6 @@ namespace OnlineStore.AssemblyLine ...@@ -36,7 +36,6 @@ namespace OnlineStore.AssemblyLine
private void LoadStoreData() private void LoadStoreData()
{ {
this.Opacity = 0;
formLineStatus(false); formLineStatus(false);
string title = ConfigAppSettings.GetValue(Setting_Init.App_Title); string title = ConfigAppSettings.GetValue(Setting_Init.App_Title);
this.Text = title; this.Text = title;
...@@ -50,8 +49,8 @@ namespace OnlineStore.AssemblyLine ...@@ -50,8 +49,8 @@ namespace OnlineStore.AssemblyLine
return; return;
} }
FrmIOTest ioStatus = new FrmIOTest(); //FrmIOTest ioStatus = new FrmIOTest();
AddForm(" IO列表查看 ", ioStatus); //AddForm(" IO列表查看 ", ioStatus);
FrmLineIO frmIOStatus = new FrmLineIO(); FrmLineIO frmIOStatus = new FrmLineIO();
AddForm(" 流水线IO ", frmIOStatus); AddForm(" 流水线IO ", frmIOStatus);
...@@ -110,6 +109,8 @@ namespace OnlineStore.AssemblyLine ...@@ -110,6 +109,8 @@ namespace OnlineStore.AssemblyLine
} }
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
this.Opacity = 0;
this.Cursor = Cursors.WaitCursor;
FrmBase.GetVersion(true); FrmBase.GetVersion(true);
if (!LineManager.Init()) if (!LineManager.Init())
{ {
...@@ -118,14 +119,15 @@ namespace OnlineStore.AssemblyLine ...@@ -118,14 +119,15 @@ namespace OnlineStore.AssemblyLine
return; return;
} }
TrayManager.InitFileData(); TrayManager.InitFileData();
LoadStoreData(); LoadStoreData();
picLine.Image = ManagerUtil.M_Line;
this.Opacity = 100; this.Opacity = 100;
this.Visible = true; this.Visible = true;
this.WindowState = FormWindowState.Maximized; this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false; this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
this.Cursor = Cursors.Default ;
//tabControl1.TabPages.Remove(tabPage5); //tabControl1.TabPages.Remove(tabPage5);
picLine.Image = ManagerUtil.M_Line;
timer1.Start(); timer1.Start();
} }
...@@ -134,6 +136,20 @@ namespace OnlineStore.AssemblyLine ...@@ -134,6 +136,20 @@ namespace OnlineStore.AssemblyLine
this.Opacity = 0; this.Opacity = 0;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.notifyIcon1.Visible = true; this.notifyIcon1.Visible = true;
foreach (FrmEquipBase frm in FormMap.Values)
{
try
{
if (frm != null)
{
frm.Hide();
}
}
catch (Exception ex)
{
LogUtil.error("隐藏界面" + frm.Text + "出错:" + ex.ToString());
}
}
this.Hide(); this.Hide();
GC.Collect(); GC.Collect();
} }
...@@ -214,6 +230,21 @@ namespace OnlineStore.AssemblyLine ...@@ -214,6 +230,21 @@ namespace OnlineStore.AssemblyLine
this.WindowState = FormWindowState.Maximized; this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false; this.notifyIcon1.Visible = false;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
foreach (FrmEquipBase frm in FormMap.Values)
{
try
{
if (frm != null)
{
frm.Show();
}
}
catch (Exception ex)
{
LogUtil.error("显示界面" + frm.Text + "出错:" + ex.ToString());
}
}
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -896,7 +927,7 @@ namespace OnlineStore.AssemblyLine ...@@ -896,7 +927,7 @@ namespace OnlineStore.AssemblyLine
{ {
return; return;
} }
//frm.StartPosition = FormStartPosition.Manual;
frm.FormClosed += Frm_FormClosed; frm.FormClosed += Frm_FormClosed;
FormMap.Add(deviceId, frm); FormMap.Add(deviceId, frm);
frm.Show(); frm.Show();
......
...@@ -78,8 +78,7 @@ namespace OnlineStore.Common ...@@ -78,8 +78,7 @@ namespace OnlineStore.Common
public static string OpenRFIDWrite = "OpenRFIDWrite"; public static string OpenRFIDWrite = "OpenRFIDWrite";
public static string DefaultPWD = "DefaultPWD"; public static string DefaultPWD = "DefaultPWD";
public static string AgvServerIp = "AgvServerIp"; public static string AgvServerIp = "AgvServerIp";
public static string DebugDeviceId = "DebugDeviceId";
public static string NeedScanCode = "NeedScanCode"; public static string NeedScanCode = "NeedScanCode";
public static string CodeCount = "CodeCount"; public static string CodeCount = "CodeCount";
...@@ -87,14 +86,12 @@ namespace OnlineStore.Common ...@@ -87,14 +86,12 @@ namespace OnlineStore.Common
public static string MaxTrayNum = "MaxTrayNum"; public static string MaxTrayNum = "MaxTrayNum";
public static string UseBuzzer = "UseBuzzer"; public static string UseBuzzer = "UseBuzzer";
public static string NeedCheckTray = "NeedCheckTray";
public static string RfidServer_Port = "RfidServer_Port"; public static string RfidServer_Port = "RfidServer_Port";
public static string Feed_LastShelfID_ = "Feed_LastShelfID_"; public static string Feed_LastShelfID_ = "Feed_LastShelfID_";
public static string Brush_Delay_Seconds = "Brush_Delay_Seconds";
public static string SaveErrorImageToFile = "SaveErrorImageToFile"; public static string SaveErrorImageToFile = "SaveErrorImageToFile";
......
...@@ -437,44 +437,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -437,44 +437,7 @@ namespace OnlineStore.DeviceLibrary
} }
private Stopwatch needEnterWatch = new Stopwatch(); private Stopwatch needEnterWatch = new Stopwatch();
private Stopwatch needLeaveWatch = new Stopwatch(); private Stopwatch needLeaveWatch = new Stopwatch();
/// <summary>
/// 下降所有阻挡气缸
/// </summary>
internal override void OpenStopBlock()
{
//if (Config.SidesWayNum <= 0)
//{
// LogInfo("下降放料阻挡12 ,下降FL顶升气缸,上升横移机构 ");
// CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH);
// CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH);
// //顶升气缸下降
// CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
//}
//else
//{
// LogInfo(" 上升横移机构 ");
//}
//CylinderMove(null, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
}
internal override void CloseStopBlock()
{
//if (Config.SidesWayNum <= 0)
//{
// LogInfo("上升放料阻挡12,关闭顶升气缸,关闭横移上下气缸");
// CheckAndMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.LOW);
// CheckAndMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.LOW);
// //顶升气缸下降
// CheckAndMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW);
// CheckAndMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW);
//}
//else
//{
// LogInfo(" 关闭横移上下气缸");
//}
//CheckAndMove(IO_Type.SL_MoveCylinder_Down, IO_VALUE.LOW);
//CheckAndMove(IO_Type.SL_MoveCylinder_Up, IO_VALUE.LOW);
}
#region 气缸判断及动作 #region 气缸判断及动作
...@@ -672,35 +635,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -672,35 +635,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region AGV #region AGV
//internal bool AgvCanEnter(string nodeId, RFIDData data)
//{
// string logN = Name + "收到 AgvCanEnter 事件 [" + nodeId + "] [" + data.NumStr() + "] ";
// bool usable = false;
// if (nodeId.Equals(Config.AgvInName))
// {
// if (isInSuddenDown || isNoAirCheck)
// {
// usable = false;
// }
// else
// {
// //入料口无料架即可进入
// usable = (runStatus >= LineRunStatus.Runing
// && ProcessShelfEnter.Equals(false)
// && IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.LOW));
// }
// }
// else if (nodeId.Equals(Config.AgvOutName))
// {
// //出口有料架才可以进入
// usable = (runStatus >= LineRunStatus.Runing
// && ProcessShelfOut.Equals(false)
// && IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH));
// }
// LogUtil.info(logN + ":" + usable);
// return usable;
//}
internal void AgvArrive(string nodeId, string rfid) internal void AgvArrive(string nodeId, string rfid)
{ {
string logN = Name + "收到 AgvArrive 事件 [" + nodeId + "] [" + rfid + "] "; string logN = Name + "收到 AgvArrive 事件 [" + nodeId + "] [" + rfid + "] ";
...@@ -941,11 +876,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -941,11 +876,7 @@ namespace OnlineStore.DeviceLibrary
msg += "runS: " + runStatus + "\n"; msg += "runS: " + runStatus + "\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";
//msg += "SMoveT:" + SecondMoveInfo.MoveType + "\n";
//msg += "SMoveS:" + SecondMoveInfo.MoveStep + "\n";
// msg += "" + LastWidth + "X" + LastHeight + "="+ lastcode + "";
return msg; return msg;
} }
public string GetLastTrayInfo() public string GetLastTrayInfo()
......
...@@ -186,6 +186,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -186,6 +186,7 @@ namespace OnlineStore.DeviceLibrary
internal virtual void TrayCanLeave() internal virtual void TrayCanLeave()
{ {
} }
#region 定位气缸升降 ,链条转动 #region 定位气缸升降 ,链条转动
public void LocationCylinderUp(LineMoveInfo moveinfo = null) public void LocationCylinderUp(LineMoveInfo moveinfo = null)
{ {
......
...@@ -759,7 +759,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -759,7 +759,7 @@ namespace OnlineStore.DeviceLibrary
{ {
//判断是否禁用 //判断是否禁用
if(LineManager.DisLeftOutLine&&(DeviceID.Equals(204) || DeviceID.Equals(209))) if(LineManager.DisLeftOutLine&&(DeviceID.Equals(204) || DeviceID.Equals(206)))
{ {
return false; return false;
} }
......
...@@ -19,10 +19,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -19,10 +19,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public partial class LineBean : KTK_Store public partial class LineBean : KTK_Store
{ {
public bool IsDebug = false; public bool IsDebug = false;
/// <summary>
/// 灯闪烁定时器
/// </summary>
private System.Timers.Timer ledProcessTimer = null; private System.Timers.Timer ledProcessTimer = null;
/// <summary> /// <summary>
/// 分出一个线程,专门处理急停,报警,气压检测,工单信号检测等处理 /// 分出一个线程,专门处理急停,报警,气压检测,工单信号检测等处理
...@@ -30,19 +27,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,19 +27,13 @@ namespace OnlineStore.DeviceLibrary
private System.Timers.Timer IoCheckTimer = null; private System.Timers.Timer IoCheckTimer = null;
private System.Timers.Timer serverConTimer = null; private System.Timers.Timer serverConTimer = null;
/// <summary>
/// 流水线下所有的移载装置
/// </summary>
public Dictionary<int, MoveEquip> MoveEquipMap { get; set; } public Dictionary<int, MoveEquip> MoveEquipMap { get; set; }
public Dictionary<int, FeedingEquip> FeedingEquipMap { get; set; } public Dictionary<int, FeedingEquip> FeedingEquipMap { get; set; }
public Dictionary<int, HYEquipBase> HYEquipMap { get; set; } public Dictionary<int, HYEquipBase> HYEquipMap { get; set; }
public Dictionary<int, EquipBase> AllEquipMap { get; set; } public Dictionary<int, EquipBase> AllEquipMap { get; set; }
/// <summary>
/// 流水线配置
/// </summary>
public Line_Config Config { get; set; } public Line_Config Config { get; set; }
#region 初始化 #region 初始化
...@@ -61,15 +52,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -61,15 +52,10 @@ namespace OnlineStore.DeviceLibrary
baseConfig = lineConfig; baseConfig = lineConfig;
this.Config = lineConfig; this.Config = lineConfig;
this.DeviceID = lineConfig.Id; this.DeviceID = lineConfig.Id;
T3C1_MoveInfo = new LineMoveInfo(DeviceID, " T3-C1 "); T3C1_MoveInfo = new LineMoveInfo(DeviceID, " T3-C1 ");
//SW41_MoveInfo = new LineMoveInfo(DeviceID, "横移轨道-41");
//SW23_MoveInfo = new LineMoveInfo(DeviceID, "横移轨道-23");
//Shunt_MoveInfo = new LineMoveInfo(DeviceID, "分流横移1");
//Shunt2_MoveInfo = new LineMoveInfo(DeviceID, "分流横移2");
MoveInfo = new LineMoveInfo(DeviceID, "[流水线-Move] "); MoveInfo = new LineMoveInfo(DeviceID, "[流水线-Move] ");
Name = (" 流水线_" + Config.CID + " ").ToUpper(); Name = (" 流水线_" + Config.CID + " ").ToUpper();
//IsDebug = Config.IsDebug.Equals(1);
AllEquipMap = new Dictionary<int, EquipBase>(); AllEquipMap = new Dictionary<int, EquipBase>();
MoveEquipMap = new Dictionary<int, MoveEquip>(); MoveEquipMap = new Dictionary<int, MoveEquip>();
...@@ -88,8 +74,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -88,8 +74,7 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName(ioList, config.IOIPList); AddDeviceName(ioList, config.IOIPList);
FeedingEquipMap.Add(config.Id, equip); FeedingEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip); AllEquipMap.Add(config.Id, equip);
//equip.TrayPEndEvent += Equip_TrayPEndEvent;
} }
foreach (MoveEquip_Config config in configList.Values) foreach (MoveEquip_Config config in configList.Values)
{ {
...@@ -105,8 +90,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -105,8 +90,7 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName(ioList, config.IOIPList); AddDeviceName(ioList, config.IOIPList);
HYEquipMap.Add(config.Id, equip); HYEquipMap.Add(config.Id, equip);
AllEquipMap.Add(config.Id, equip); AllEquipMap.Add(config.Id, equip);
//equip.TrayPEndEvent += Equip_TrayPEndEvent;
} }
//先初始化设备 //先初始化设备
...@@ -116,8 +100,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,8 +100,7 @@ namespace OnlineStore.DeviceLibrary
//初始化摄像机配置 //初始化摄像机配置
CodeManager.LoadConfig(); CodeManager.LoadConfig();
cioList = new List<string>(ioList); cioList = new List<string>(ioList);
string ids = ConfigAppSettings.GetValue(Setting_Init.DebugDeviceId);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
......
...@@ -122,35 +122,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -122,35 +122,8 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
public static bool NeedCheckTray = ConfigAppSettings.GetIntValue(Setting_Init.NeedCheckTray).Equals(1);
//internal static bool CheckIsRightNum(int trayNum, int preTrayNum, bool isCanUpdateMax = true)
//{
// if (!NeedCheckTray)
// {
// return true;
// }
// int defNext = preTrayNum + 1;
// if (preTrayNum.Equals(0) || MaxTrayNum.Equals(0) || trayNum.Equals(defNext))
// {
// if (isCanUpdateMax && trayNum > MaxTrayNum)
// {
// MaxTrayNum = trayNum;
// LogUtil.info("更新MaxTrayNum=" + preTrayNum);
// }
// return true;
// }
// else if (trayNum.Equals(1) && preTrayNum >= MaxTrayNum)
// {
// return true;
// }
// return false;
//}
//internal static bool RightTrayCode(int trayNum, int preTrayNum, bool isCanUpdateMax = true)
//{
// return true;
// //return CheckIsRightNum(trayNum, preTrayNum, isCanUpdateMax);
//}
internal static void UpdateTrayNumError(int errorStoreID, string errorMsg) internal static void UpdateTrayNumError(int errorStoreID, string errorMsg)
{ {
......
...@@ -426,6 +426,11 @@ namespace HuichuanLibrary ...@@ -426,6 +426,11 @@ namespace HuichuanLibrary
Console.WriteLine(BoardName() + msg); Console.WriteLine(BoardName() + msg);
HCLogUtil.info(BoardName() + msg); HCLogUtil.info(BoardName() + msg);
} }
private static void DebugLog(string msg)
{
Console.WriteLine(BoardName() + msg);
HCLogUtil.debug(BoardName() + msg);
}
} }
public class AxisSts public class AxisSts
{ {
......
...@@ -152,7 +152,7 @@ namespace HuichuanLibrary ...@@ -152,7 +152,7 @@ namespace HuichuanLibrary
} }
else else
{ {
ShowLog(" Axis[" + axisNo + "] FinishHoming OK!"); DebugLog(" Axis[" + axisNo + "] FinishHoming OK!");
return true; return true;
} }
} }
...@@ -255,7 +255,7 @@ namespace HuichuanLibrary ...@@ -255,7 +255,7 @@ namespace HuichuanLibrary
} }
else else
{ {
ShowLog(" Axis[" + axisNo + "] StartPtpMove " + ptpType + " OK"); DebugLog(" Axis[" + axisNo + "] StartPtpMove " + ptpType + " OK");
return true; return true;
} }
} }
...@@ -269,12 +269,12 @@ namespace HuichuanLibrary ...@@ -269,12 +269,12 @@ namespace HuichuanLibrary
UInt32 ret = ImcApi.IMC_SetSingleAxMvPara(nCardHandle, axisNo, ptpVel, ptpAcc, ptpDec); UInt32 ret = ImcApi.IMC_SetSingleAxMvPara(nCardHandle, axisNo, ptpVel, ptpAcc, ptpDec);
if (ret != 0) if (ret != 0)
{ {
ShowErrorLog(" Axis[" + axisNo + "] SetSingleAxMvPara FAIL, ErrorCode=0x" + ret.ToString("x8")); ShowErrorLog(" Axis[" + axisNo + "] SetSingleAxMvPara ptpVel ["+ ptpVel + "] ptpAcc ["+ ptpAcc + "] ptpDec ["+ptpDec+"] FAIL, ErrorCode=0x" + ret.ToString("x8"));
return false; return false;
} }
else else
{ {
ShowLog(" Axis[" + axisNo + "] SetSingleAxMvPara OK"); DebugLog(" Axis[" + axisNo + "] SetSingleAxMvPara ptpVel [" + ptpVel + "] ptpAcc [" + ptpAcc + "] ptpDec [" + ptpDec + "] OK");
return true; return true;
} }
} }
...@@ -296,7 +296,7 @@ namespace HuichuanLibrary ...@@ -296,7 +296,7 @@ namespace HuichuanLibrary
} }
else else
{ {
ShowLog(" Axis[" + axisNo + "] MoveStop OK"); DebugLog(" Axis[" + axisNo + "] MoveStop OK");
return true; return true;
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net"> <Reference Include="log4net">
<HintPath>..\dll\log4net.dll</HintPath> <HintPath>..\..\dll\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -83,7 +83,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -83,7 +83,7 @@ namespace OnlineStore.LoadCSVLibrary
public virtual void LoadConfig(List<ConfigBase> configList) public virtual void LoadConfig(List<ConfigBase> configList)
{ {
List<string> ioTypeList = IO_Type.GetTypeList(); List<string> ioTypeList = IO_Type.GetTypeList();
ioTypeList = new List<string>(); //ioTypeList = new List<string>();
StringBuilder builder = new StringBuilder("\r\n"); StringBuilder builder = new StringBuilder("\r\n");
StringBuilder proBuilder = new StringBuilder("\r\n"); StringBuilder proBuilder = new StringBuilder("\r\n");
DIList = new Dictionary<string, ConfigIO>(); DIList = new Dictionary<string, ConfigIO>();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!