|
|
|
@ -735,7 +735,7 @@ namespace ProductionSystem.Forms
|
|
|
|
|
|
|
|
|
|
public bool Over { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private CurveTool _curveTool = new CurveTool();
|
|
|
|
|
public void ToCache(Action action)
|
|
|
|
|
{
|
|
|
|
|
string name = GetCode() +":"+ action.Method.Name;
|
|
|
|
@ -819,6 +819,9 @@ namespace ProductionSystem.Forms
|
|
|
|
|
uyTool.Send();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_curveTool.Step = "BZ1";
|
|
|
|
|
_curveTool.Code = GetCode();
|
|
|
|
|
_curveTool.Start();
|
|
|
|
|
step.Id = Guid.NewGuid().ToString("N");
|
|
|
|
|
step.ReturnValue = uyTool.Val;
|
|
|
|
|
step.WriteValue = uyTool.Val;
|
|
|
|
@ -844,6 +847,8 @@ namespace ProductionSystem.Forms
|
|
|
|
|
PWMHelper.Close();
|
|
|
|
|
//清理状态
|
|
|
|
|
TmTool.CleanStatus();
|
|
|
|
|
|
|
|
|
|
_curveTool.Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -893,6 +898,8 @@ namespace ProductionSystem.Forms
|
|
|
|
|
//停止水泵1
|
|
|
|
|
uyTool.closeSend();
|
|
|
|
|
TmTool.WritePlc(TmTool.ShuiBeng1, 0);
|
|
|
|
|
|
|
|
|
|
_curveTool.Stop();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -931,6 +938,10 @@ namespace ProductionSystem.Forms
|
|
|
|
|
stepService.AddProductStep(step);
|
|
|
|
|
|
|
|
|
|
TmTool.WritePlc(TmTool.ShuiBeng2, 1);
|
|
|
|
|
|
|
|
|
|
_curveTool.Step = "BZ2";
|
|
|
|
|
_curveTool.Code = GetCode();
|
|
|
|
|
_curveTool.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -959,6 +970,9 @@ namespace ProductionSystem.Forms
|
|
|
|
|
//水泵2关闭
|
|
|
|
|
_uxTool.closeSend();
|
|
|
|
|
TmTool.WritePlc(TmTool.ShuiBeng2, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_curveTool.Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (D1004)
|
|
|
|
@ -980,6 +994,10 @@ namespace ProductionSystem.Forms
|
|
|
|
|
step.Ms = "0";
|
|
|
|
|
step.EquipmentName ="SB3ZS_DB";
|
|
|
|
|
stepService.AddProductStep(step);
|
|
|
|
|
|
|
|
|
|
_curveTool.Step = "BZ3";
|
|
|
|
|
_curveTool.Code = GetCode();
|
|
|
|
|
_curveTool.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1241,14 +1259,14 @@ namespace ProductionSystem.Forms
|
|
|
|
|
GetPlc(Program.BZ8, "BZ8");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Collect("BZ1");
|
|
|
|
|
Collect("BZ2");
|
|
|
|
|
Collect("BZ3");
|
|
|
|
|
Collect("BZ4");
|
|
|
|
|
Collect("BZ5");
|
|
|
|
|
Collect("BZ6");
|
|
|
|
|
Collect("BZ7");
|
|
|
|
|
Collect("BZ8");
|
|
|
|
|
// Collect("BZ1");
|
|
|
|
|
// Collect("BZ2");
|
|
|
|
|
// Collect("BZ3");
|
|
|
|
|
// Collect("BZ4");
|
|
|
|
|
// Collect("BZ5");
|
|
|
|
|
// Collect("BZ6");
|
|
|
|
|
// Collect("BZ7");
|
|
|
|
|
// Collect("BZ8");
|
|
|
|
|
|
|
|
|
|
SetMiddleData("BZ1_DB");
|
|
|
|
|
SetMiddleData("BZ2_DB");
|
|
|
|
@ -1267,24 +1285,24 @@ namespace ProductionSystem.Forms
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private TResult2Service _result2Service = new TResult2Service();
|
|
|
|
|
private void Collect(string par)
|
|
|
|
|
{
|
|
|
|
|
var tagDict = GetTagDict();
|
|
|
|
|
var entity =
|
|
|
|
|
Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == tagDict[par]);
|
|
|
|
|
if (entity != null)
|
|
|
|
|
{
|
|
|
|
|
string productBarCode = GetCode();
|
|
|
|
|
|
|
|
|
|
var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address);
|
|
|
|
|
if (value.Item2.ToDouble().ToInt() == 1)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// private void Collect(string par)
|
|
|
|
|
// {
|
|
|
|
|
// var tagDict = GetTagDict();
|
|
|
|
|
// var entity =
|
|
|
|
|
// Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == tagDict[par]);
|
|
|
|
|
// if (entity != null)
|
|
|
|
|
// {
|
|
|
|
|
// string productBarCode = GetCode();
|
|
|
|
|
//
|
|
|
|
|
// var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address);
|
|
|
|
|
// if (value.Item2.ToDouble().ToInt() == 1)
|
|
|
|
|
// {
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
public string GetPlcValue(string key)
|
|
|
|
|
{
|
|
|
|
@ -1299,7 +1317,7 @@ namespace ProductionSystem.Forms
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool D1004
|
|
|
|
|
private bool D1004
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
@ -1966,45 +1984,7 @@ namespace ProductionSystem.Forms
|
|
|
|
|
Program.MiddlePointKeyValues.ForEach(m => m.Val = "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 初始化曲线区域数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void InitCurveSectionData()
|
|
|
|
|
{
|
|
|
|
|
//曲线区域的开始索引
|
|
|
|
|
sectionStartIndex1 = 0;
|
|
|
|
|
sectionStartIndex2 = 0;
|
|
|
|
|
sectionStartIndex3 = 0;
|
|
|
|
|
sectionStartIndex4 = 0;
|
|
|
|
|
sectionStartIndex5 = 0;
|
|
|
|
|
sectionStartIndex6 = 0;
|
|
|
|
|
sectionStartIndex7 = 0;
|
|
|
|
|
sectionStartIndex8 = 0;
|
|
|
|
|
sectionStartIndex9 = 0;
|
|
|
|
|
//曲线区域的结束索引
|
|
|
|
|
sectionEndIndex1 = -1;
|
|
|
|
|
sectionEndIndex2 = -1;
|
|
|
|
|
sectionEndIndex3 = -1;
|
|
|
|
|
sectionEndIndex4 = -1;
|
|
|
|
|
sectionEndIndex5 = -1;
|
|
|
|
|
sectionEndIndex6 = -1;
|
|
|
|
|
sectionEndIndex7 = -1;
|
|
|
|
|
sectionEndIndex8 = -1;
|
|
|
|
|
sectionEndIndex9 = -1;
|
|
|
|
|
|
|
|
|
|
stepName1 = "";
|
|
|
|
|
stepName2 = "";
|
|
|
|
|
stepName3 = "";
|
|
|
|
|
stepName4 = "";
|
|
|
|
|
stepName5 = "";
|
|
|
|
|
stepName6 = "";
|
|
|
|
|
stepName7 = "";
|
|
|
|
|
stepName8 = "";
|
|
|
|
|
stepName9 = "";
|
|
|
|
|
|
|
|
|
|
stepChangeCount = 0;//步序变化次数
|
|
|
|
|
tempStepNum = 0;//临时存储步序号
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 心跳监测
|
|
|
|
|