Merge branch 'dep_yangw' of http://175.27.215.92:3000/yangw/ProductionSystem into dep_yangw

dep_yangw
frankiecao 11 months ago
commit 5535292daa

@ -738,12 +738,6 @@ namespace ProductionSystem.Forms
middleIsCanRound = false; middleIsCanRound = false;
Thread.Sleep(Program.ReadPlcRate); Thread.Sleep(Program.ReadPlcRate);
// if(txtProductCode)
//ClearMiddleData
var d1300Value = GetPlcValue("D1300"); var d1300Value = GetPlcValue("D1300");
// d1300Value = "1"; // d1300Value = "1";
//步骤1水泵1空载 //步骤1水泵1空载
@ -1640,15 +1634,9 @@ namespace ProductionSystem.Forms
Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == tagDict[par]); Program.CommandPointKeyValues.FirstOrDefault(m => m.Key == tagDict[par]);
if (entity != null) if (entity != null)
{ {
string productBarCode = ""; string productBarCode = GetCode();
//2024 暂无条码不插入数据
if (txtProductCode.Text.Contains("暂无条码"))
{
return;
}
//处理换行符
productBarCode=txtProductCode.Text;
productBarCode= productBarCode.Replace("\r", "").Replace("\n", "");
var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address); var value = OmronHelper.GetPlcVal(entity.DataType, entity.Address);
if (value.Item2.ToDouble().ToInt()==1) if (value.Item2.ToDouble().ToInt()==1)
@ -1670,24 +1658,28 @@ namespace ProductionSystem.Forms
{ {
t.Electricity = GetPlcValue("D1202"); t.Electricity = GetPlcValue("D1202");
t.Voltage = GetPlcValue("D1200"); t.Voltage = GetPlcValue("D1200");
_result2Service.AddTResult2(t);
} }
if (par == "BZ2") if (par == "BZ2")
{ {
t.Electricity = GetPlcValue("D1206"); t.Electricity = GetPlcValue("D1206");
t.Voltage = GetPlcValue("D1204"); t.Voltage = GetPlcValue("D1204");
_result2Service.AddTResult2(t);
} }
if (par == "BZ3") if (par == "BZ3")
{ {
t.Electricity = GetPlcValue("D1210"); t.Electricity = GetPlcValue("D1210");
t.Voltage = GetPlcValue("D1208"); t.Voltage = GetPlcValue("D1208");
_result2Service.AddTResult2(t);
} }
//高压 //高压
if (par == "BZ4") if (par == "BZ4")
{ {
t.Xll = GetPlcValue("D1224"); t.Xll = GetPlcValue("D1224");
t.Xllzt = GetPlcValue("D1226"); t.Xllzt = GetPlcValue("D1226");
_result2Service.AddTResult2(t);
} }
//内1 //内1
@ -1695,22 +1687,25 @@ namespace ProductionSystem.Forms
{ {
t.Xll = GetPlcValue("D1212"); t.Xll = GetPlcValue("D1212");
t.Xllzt = GetPlcValue("D1112"); t.Xllzt = GetPlcValue("D1112");
_result2Service.AddTResult2(t);
} }
//内2 //内2
if (par == "BZ6") if (par == "BZ6")
{ {
t.Xll = GetPlcValue("D1214"); t.Xll = GetPlcValue("D1214");
t.Xllzt = GetPlcValue("D1114"); t.Xllzt = GetPlcValue("D1114");
_result2Service.AddTResult2(t);
} }
//外漏 //外漏
if (par == "BZ7") if (par == "BZ7")
{ {
t.Xll = GetPlcValue("D1216"); t.Xll = GetPlcValue("D1216");
t.Xllzt = GetPlcValue("D1116"); t.Xllzt = GetPlcValue("D1116");
_result2Service.AddTResult2(t);
} }
_result2Service.AddTResult2(t);
} }
} }

Loading…
Cancel
Save