提交bug

This commit is contained in:
Admin
2025-04-24 15:45:01 +08:00
parent 77b75050b2
commit 6973d39cad
11 changed files with 332 additions and 27 deletions

View File

@ -656,6 +656,7 @@ namespace DHSoftware
cam.Exposure = cameraBase.Exposure;
cam.Gain = cameraBase.Gain;
cam.RotateImage = cameraBase.RotateImage;
cam.IsAllPicEnabled=cameraBase.IsAllPicEnabled;
cam.ROIX= cameraBase.ROIX;
cam.ROIH= cameraBase.ROIH;
cam.ROIW= cameraBase.ROIW;
@ -1083,6 +1084,8 @@ namespace DHSoftware
{
if (_monitorThread == null || !_monitorThread.IsAlive)
{
//关闭按钮自身功能(比如按按钮转盘自己启动等)
PLC.WriteBool("M40", true);
_isRunning = true;
_monitorThread = new Thread(MonitorPlcButtons);
_monitorThread.IsBackground = true; // 后台线程
@ -1144,6 +1147,7 @@ namespace DHSoftware
{
_monitorThread.Join(1000); // 等待线程退出
}
PLC.WriteBool("M40", false);
}
private bool _isClosing = false; // 状态标志
@ -1269,6 +1273,7 @@ namespace DHSoftware
LogAsync(DateTime.Now, LogLevel.Information, "流程启动中,请稍候...");
ResetAllCameraCounts();
//开始流程
StartProcess();
LogAsync(DateTime.Now, LogLevel.Action, "流程启动完成!");
}
@ -1371,9 +1376,8 @@ namespace DHSoftware
//mOfflineImageTimer.Start();
#endregion
//流程执行时PLC
PLC.StartProcess();
LogAsync(DateTime.Now, LogLevel.Action, "流程启动11111111111完成");
///这里会执行完成后会造成后台线程断断续续会造成界面UI卡顿
//var settings = ConfigModel.DetectionList.Where(u => u.IsEnabled && u.IsAddStation).ToList();
//if (settings != null)
@ -1417,7 +1421,8 @@ namespace DHSoftware
InitialOEEStatistic();
//流程执行时PLC
PLC.StartProcess();
CurrentMachine = true;
}
catch (Exception ex)
@ -1863,6 +1868,7 @@ namespace DHSoftware
// Add the code for the "停止" button click here
PLC.StopProcess();
CurrentMachine = false;
//sLDMotion.Stop();
}