Commit d963e77d 刘韬

1

1 个父辈 0ca76a74
...@@ -344,6 +344,7 @@ namespace DeviceLibrary ...@@ -344,6 +344,7 @@ namespace DeviceLibrary
} }
public void MonitorAxisLoadRate() { public void MonitorAxisLoadRate() {
Task.Run(() => { Task.Run(() => {
Task.Delay(200).Wait();
LogUtil.info($"{AxisName}-开始负载监控,最大负载阈值:{Setting_Init.Device_InOutMaxLoadRate}"); LogUtil.info($"{AxisName}-开始负载监控,最大负载阈值:{Setting_Init.Device_InOutMaxLoadRate}");
List<float> loadrate = new List<float>(); List<float> loadrate = new List<float>();
while (IsBusy) while (IsBusy)
......
...@@ -13,6 +13,7 @@ using System.Text; ...@@ -13,6 +13,7 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
public class HIKCamera public class HIKCamera
{ {
...@@ -62,6 +63,8 @@ public class HIKCamera ...@@ -62,6 +63,8 @@ public class HIKCamera
LogUtil.error(Name + "加载监控相机配置文件失败:" + e.ToString()); LogUtil.error(Name + "加载监控相机配置文件失败:" + e.ToString());
return false; return false;
} }
PictureBox p1 = new PictureBox();
camera.PreviewImage(DeviceName, p1.Handle);
camera.Open(DeviceName); camera.Open(DeviceName);
Bitmap bmp = camera.GetImage(DeviceName); Bitmap bmp = camera.GetImage(DeviceName);
if (bmp == null) if (bmp == null)
......
...@@ -245,20 +245,26 @@ namespace DeviceLibrary ...@@ -245,20 +245,26 @@ namespace DeviceLibrary
public void Resume() public void Resume()
{ {
LastResumeTime = DateTime.Now; LastResumeTime = DateTime.Now;
try
if (moveInfo1.WaitList.Count > 0) { {
if (moveInfo1.WaitList[0].WaitType == WaitEnum.W013_Action) { if (moveInfo1.WaitList.Count > 0)
for (int i = 0; i < 10; i++) {
if (moveInfo1.WaitList[0].WaitType == WaitEnum.W013_Action)
{ {
var w = moveInfo1.WaitList[0].Action?.Invoke(moveInfo1.WaitList[0]); var wt = moveInfo1.WaitList[0];
if (w == null) for (int i = 0; i < 10; i++)
return; {
if (w.Value) var w = wt.Action?.Invoke(moveInfo1.WaitList[0]);
break; if (w == null)
Task.Delay(1000).Wait(); return;
if (w.Value)
break;
Task.Delay(1000).Wait();
}
} }
} }
} }
catch{ }
} }
} }
} }
...@@ -47,7 +47,7 @@ namespace DeviceLibrary ...@@ -47,7 +47,7 @@ namespace DeviceLibrary
get => jobInfos.Count; get => jobInfos.Count;
} }
public void ClearLastPosid(string posid) { public void ClearLastPosid(string posid) {
if (lastoutpos == posid) //if (lastoutpos == posid)
lastoutpos = ""; lastoutpos = "";
} }
} }
......
...@@ -51,7 +51,7 @@ namespace DeviceLibrary ...@@ -51,7 +51,7 @@ namespace DeviceLibrary
Msg.add(w.ActionMsg, w.Data); Msg.add(w.ActionMsg, w.Data);
} }
}); });
foreach (WaitResultInfo wait in MoveInfo.WaitList) foreach (WaitResultInfo wait in MoveInfo.WaitList.ToList())
{ {
if (wait.IsEnd) if (wait.IsEnd)
{ {
......
...@@ -141,6 +141,7 @@ namespace DeviceLibrary ...@@ -141,6 +141,7 @@ namespace DeviceLibrary
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed); StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed);
StringDoor.DownOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_DownOverTimeMS", 0); StringDoor.DownOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_DownOverTimeMS", 0);
StringDoor.UpOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_UpOverTimeMS", 0); StringDoor.UpOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_UpOverTimeMS", 0);
StringDoor.ResumeWaitTimeSec = 5;
LogUtil.info("加载料串门类型为:步进"); LogUtil.info("加载料串门类型为:步进");
} }
else else
...@@ -525,6 +526,8 @@ namespace DeviceLibrary ...@@ -525,6 +526,8 @@ namespace DeviceLibrary
boxTransport.Reset(); boxTransport.Reset();
ResetMoveInfo.log("回原完成"); ResetMoveInfo.log("回原完成");
ResetMoveInfo.EndMove(); ResetMoveInfo.EndMove();
OutSingleJobList.ClearLastPosid("");
OutStoreJobList.ClearLastPosid("");
if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait) if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait)
{ {
StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre); StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre);
......
...@@ -6,14 +6,10 @@ using OnlineStore.Common; ...@@ -6,14 +6,10 @@ using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices; using System.Runtime.ExceptionServices;
using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
......
...@@ -39,6 +39,7 @@ namespace TheMachine ...@@ -39,6 +39,7 @@ namespace TheMachine
this.tp = new System.Windows.Forms.TableLayoutPanel(); this.tp = new System.Windows.Forms.TableLayoutPanel();
this.cb_usefixpos = new System.Windows.Forms.CheckBox(); this.cb_usefixpos = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword();
this.tp.SuspendLayout(); this.tp.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -148,7 +149,7 @@ namespace TheMachine ...@@ -148,7 +149,7 @@ namespace TheMachine
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(356, 65); this.button1.Location = new System.Drawing.Point(903, 101);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(102, 48); this.button1.Size = new System.Drawing.Size(102, 48);
this.button1.TabIndex = 7; this.button1.TabIndex = 7;
...@@ -157,9 +158,19 @@ namespace TheMachine ...@@ -157,9 +158,19 @@ namespace TheMachine
this.button1.Visible = false; this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click_1); this.button1.Click += new System.EventHandler(this.button1_Click_1);
// //
// uC_SetUserPassword1
//
this.uC_SetUserPassword1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uC_SetUserPassword1.Location = new System.Drawing.Point(303, 3);
this.uC_SetUserPassword1.Margin = new System.Windows.Forms.Padding(5);
this.uC_SetUserPassword1.Name = "uC_SetUserPassword1";
this.uC_SetUserPassword1.Size = new System.Drawing.Size(405, 272);
this.uC_SetUserPassword1.TabIndex = 8;
//
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.uC_SetUserPassword1);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.tp); this.Controls.Add(this.tp);
this.Name = "SettingControl"; this.Name = "SettingControl";
...@@ -182,5 +193,6 @@ namespace TheMachine ...@@ -182,5 +193,6 @@ namespace TheMachine
private System.Windows.Forms.TableLayoutPanel tp; private System.Windows.Forms.TableLayoutPanel tp;
private System.Windows.Forms.CheckBox cb_usefixpos; private System.Windows.Forms.CheckBox cb_usefixpos;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private UC_SetUserPassword uC_SetUserPassword1;
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!