Merge branch 'dev_xiao' into dev_lilili
This commit is contained in:
@ -176,11 +176,11 @@ namespace DHSoftware
|
||||
InitData();
|
||||
//绑定事件
|
||||
BindEventHandler();
|
||||
UserConfigFrm userControlFrm = new UserConfigFrm();
|
||||
//UserConfigFrm userControlFrm = new UserConfigFrm();
|
||||
|
||||
userControlFrm.Window = this;
|
||||
userControlFrm.Dock = DockStyle.Fill;
|
||||
tabPage2.Controls.Add(userControlFrm);
|
||||
//userControlFrm.Window = this;
|
||||
//userControlFrm.Dock = DockStyle.Fill;
|
||||
//tabPage2.Controls.Add(userControlFrm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -267,7 +267,7 @@ namespace DHSoftware
|
||||
cam.CameraIP = cameraBase.CameraIP;
|
||||
cam.IsEnabled = cameraBase.IsEnabled;
|
||||
Cameras.Add(cam);
|
||||
//cam.CameraConnect();
|
||||
cam.CameraConnect();
|
||||
cam.OnHImageOutput += OnCameraHImageOutput;
|
||||
}
|
||||
else if (cameraBase.CamType == EnumCamType.海康hik)
|
||||
@ -294,6 +294,7 @@ namespace DHSoftware
|
||||
if (plcBase.PLCType == EnumPLCType.信捷XC网口)
|
||||
{
|
||||
PLC.IP = plcBase.IP;
|
||||
PLC.PLCType = plcBase.PLCType;
|
||||
PLC.Enable = plcBase.Enable;
|
||||
PLC.PLCName = plcBase.PLCName;
|
||||
PLC.PLCItemList = plcBase.PLCItemList;
|
||||
@ -321,8 +322,10 @@ namespace DHSoftware
|
||||
detectionConfig.ModelHeight = detection.ModelHeight;
|
||||
detectionConfig.In_lable_path = detection.In_lable_path;
|
||||
detectionConfig.IsEnabled = detection.IsEnabled;
|
||||
detectionConfig.ShowLocation.X = detection.ShowLocation.X;
|
||||
detectionConfig.ShowLocation.Y = detection.ShowLocation.Y;
|
||||
detectionConfig.ShowLocation.X = (i + 1) % 5+ (i + 1) / 5;
|
||||
// detectionConfig.ShowLocation.X = detection.ShowLocation.X;
|
||||
detectionConfig.ShowLocation.Y = (i + 1) / 5+1;
|
||||
// detectionConfig.ShowLocation.Y = detection.ShowLocation.Y;
|
||||
DetectionConfigs.Add(detectionConfig);
|
||||
}
|
||||
}
|
||||
@ -354,6 +357,7 @@ namespace DHSoftware
|
||||
//初始化模型 加载模型
|
||||
_visionEngine.Init();
|
||||
CtrlVisionRunBase ctrlVisionRun = new CtrlVisionRunBase(_visionEngine);
|
||||
ctrlVisionRun.Dock = DockStyle.Fill;
|
||||
tabImgDisplay.Controls.Add(ctrlVisionRun);
|
||||
}
|
||||
|
||||
@ -577,14 +581,17 @@ namespace DHSoftware
|
||||
|
||||
private void StartProcess()
|
||||
{
|
||||
startTime= DateTime.Now;
|
||||
//计数清零
|
||||
PieceCount = 0;
|
||||
//吹气点位归置
|
||||
currentRegister = 411;
|
||||
|
||||
if (_PLCConfig?.Enable == true)
|
||||
|
||||
if (PLC?.Enable == true)
|
||||
{
|
||||
PLC.CountToZero();
|
||||
PLC.OnNewPieces -= MainMotion_NewPieces;
|
||||
PLC.OnNewPieces += MainMotion_NewPieces;
|
||||
}
|
||||
|
||||
ConfigModel.CameraBaseList.ForEach(d =>
|
||||
@ -696,7 +703,7 @@ namespace DHSoftware
|
||||
PLCItem itemSpeed = PLC.PLCItemList.FirstOrDefault(u => u.Name == "转盘速度");
|
||||
if (itemSpeed != null)
|
||||
{
|
||||
PLC.TurntableOpen(Convert.ToInt32(itemSpeed.Value), true);
|
||||
PLC.TurntableOpen();
|
||||
}
|
||||
|
||||
Thread.Sleep(500);
|
||||
@ -1410,7 +1417,7 @@ namespace DHSoftware
|
||||
//UPM = (int)UPH / 60;
|
||||
this.BeginInvoke(new MethodInvoker(delegate ()
|
||||
{
|
||||
label1.Text = UPH.ToString();
|
||||
labuph.Text = UPH.ToString();
|
||||
}));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user