Commit d963e77d 刘韬

1

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