删除多余代码

dep_yangw
frankiecao 10 months ago
commit b5338099e4

@ -52,7 +52,6 @@ namespace ProductionSystem.Forms
private readonly ProductStepService productStepService = new ProductStepService(); private readonly ProductStepService productStepService = new ProductStepService();
private readonly TResult2Service result2Service = new TResult2Service(); private readonly TResult2Service result2Service = new TResult2Service();
private readonly TCurveService curveService = new TCurveService(); private readonly TCurveService curveService = new TCurveService();
TCurveService
private Random random = new Random(); private Random random = new Random();
DataProductService dataProductService = new DataProductService(); DataProductService dataProductService = new DataProductService();
@ -1081,7 +1080,11 @@ namespace ProductionSystem.Forms
private void Step8() private void Step8()
{ {
//采集数据
for (int i = 1; i < 8; i++)
{
CollectData("BZ"+i);
}
//sitongfa 2 3 //sitongfa 2 3
//膨胀阀0 //膨胀阀0
@ -1108,11 +1111,7 @@ namespace ProductionSystem.Forms
} }
//采集数据
for (int i = 1; i < 8; i++)
{
CollectData("BZ"+i);
}
} }
/// <summary> /// <summary>
@ -1125,7 +1124,7 @@ namespace ProductionSystem.Forms
Id = Guid.NewGuid().ToString("n"), Id = Guid.NewGuid().ToString("n"),
ProductType = Program.ProductType, ProductType = Program.ProductType,
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
Step = "", Step = par,
ProductBarcode = GetCode(), ProductBarcode = GetCode(),
Electricity = "-", Electricity = "-",
ElectricityState = "-", ElectricityState = "-",
@ -1179,12 +1178,9 @@ namespace ProductionSystem.Forms
if (par == "BZ4") if (par == "BZ4")
{ {
t.Xll = GetPlcValue("D1224"); t.Xll = GetPlcValue("D1224");
t.Xllzt = GetPlcValue("D1226"); t.Xllzt = GetPlcValue("D1226").ToDouble().ToInt() == 1 ? "OK" : "NG";
//t.Step = "步骤4"; //t.Step = "步骤4";
if (t.Xll.ToDouble()>0 ) _result2Service.AddTResult2(t);
{
_result2Service.AddTResult2(t);
}
} }
@ -1193,12 +1189,9 @@ namespace ProductionSystem.Forms
{ {
t.Xll = GetPlcValue("D1214"); t.Xll = GetPlcValue("D1214");
t.Xllzt = GetPlcValue("D1114"); t.Xllzt = GetPlcValue("D1114").ToDouble().ToInt() == 1 ? "OK" : "NG";
//t.Step = "步骤5"; //t.Step = "步骤5";
if (t.Xll.ToDouble() > 0 ) _result2Service.AddTResult2(t);
{
_result2Service.AddTResult2(t);
}
} }
@ -1206,23 +1199,17 @@ namespace ProductionSystem.Forms
if (par == "BZ6") if (par == "BZ6")
{ {
t.Xll = GetPlcValue("D1216"); t.Xll = GetPlcValue("D1216");
t.Xllzt = GetPlcValue("D1116"); t.Xllzt = GetPlcValue("D1116").ToDouble().ToInt() == 1 ? "OK" : "NG";
//t.Step = "步骤6"; //t.Step = "步骤6";
if (t.Xll.ToDouble() > 0 ) _result2Service.AddTResult2(t);
{
_result2Service.AddTResult2(t);
}
} }
//外漏 //外漏
if (par == "BZ7") if (par == "BZ7")
{ {
t.Xll = GetPlcValue("D1212"); t.Xll = GetPlcValue("D1212");
t.Xllzt = GetPlcValue("D1112"); t.Xllzt = GetPlcValue("D1112").ToDouble().ToInt() == 1 ? "OK" : "NG";
//t.Step = "步骤7"; //t.Step = "步骤7";
if (t.Xll.ToDouble() > 0) _result2Service.AddTResult2(t);
{
_result2Service.AddTResult2(t);
}
} }

@ -28,8 +28,11 @@ namespace ProductionSystem.Untils.Tool
public void Stop() public void Stop()
{ {
_timer.Dispose(); if (null != _timer)
_timer = null; {
_timer.Dispose();
_timer = null;
}
} }
TCurveService tc = new TCurveService(); TCurveService tc = new TCurveService();
//D1252 电压 D1250 电流 //D1252 电压 D1250 电流

@ -0,0 +1,22 @@
故障1:
模块"mscomm32.ocx"可能与您正在运行的Windows版本不兼容。检查该模块是否与regsvr32.exe的x86或x64版
解决:
把文件mscomm32.ocx复制到C:\Windows\SysWOW64
程序 - 附件 - 命令提示符在”命令提示符“上点击鼠标右键选择”以管理员身份运行“命令这个时候将打开Dos命令窗口现在就按正常写法输入C:\Windows\SysWOW64\regsvr32.exe mscomm32.ocx
故障2:
"DllRegisterServer的调用失败"
解决:
程序 - 附件 - 命令提示符在”命令提示符“上点击鼠标右键选择”以管理员身份运行“命令这个时候将打开Dos命令窗口现在就按正常写法输入regsvr32.exe mscomm32.ocx
故障3:
更改地址时,"通讯数据错误!"
解决:
如更改失败,多按几次"确定"

@ -0,0 +1,22 @@
故障1:
模块"mscomm32.ocx"可能与您正在运行的Windows版本不兼容。检查该模块是否与regsvr32.exe的x86或x64版
解决:
把文件mscomm32.ocx复制到C:\Windows\SysWOW64
程序 - 附件 - 命令提示符在”命令提示符“上点击鼠标右键选择”以管理员身份运行“命令这个时候将打开Dos命令窗口现在就按正常写法输入C:\Windows\SysWOW64\regsvr32.exe mscomm32.ocx
故障2:
"DllRegisterServer的调用失败"
解决:
程序 - 附件 - 命令提示符在”命令提示符“上点击鼠标右键选择”以管理员身份运行“命令这个时候将打开Dos命令窗口现在就按正常写法输入regsvr32.exe mscomm32.ocx
故障3:
更改地址时,"通讯数据错误!"
解决:
如更改失败,多按几次"确定"

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.
Loading…
Cancel
Save