|
|
|
@ -425,7 +425,7 @@ namespace Admin.Core.Tasks
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
item.Production = obj.plc.ReadInt16("D181");
|
|
|
|
|
item.Production = objProduction.plc.ReadInt16("D181");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.ObjId == 2)
|
|
|
|
@ -457,9 +457,9 @@ namespace Admin.Core.Tasks
|
|
|
|
|
{
|
|
|
|
|
item.Production = 0;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
else if (objProduction != null&& objProduction.plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
item.Production = obj.plc.ReadInt16("D183");
|
|
|
|
|
item.Production = objProduction.plc.ReadInt16("D183");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.ObjId == 3)
|
|
|
|
@ -482,6 +482,7 @@ namespace Admin.Core.Tasks
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "停止";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
item.CuringTimeSettingValue = obj.plc.ReadInt16("D912").ToString();
|
|
|
|
|
item.ActualValue = obj.plc.ReadInt16("T23").ToString();
|
|
|
|
|
item.UpdatedTime = DateTime.Now;
|
|
|
|
@ -493,7 +494,7 @@ namespace Admin.Core.Tasks
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
item.Production = obj.plc.ReadInt16("D184");
|
|
|
|
|
item.Production = objProduction.plc.ReadInt16("D184");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.ObjId == 4)
|
|
|
|
@ -504,25 +505,26 @@ namespace Admin.Core.Tasks
|
|
|
|
|
{
|
|
|
|
|
string type = $"{obj.plc.ReadInt16("D3144")}{obj.plc.ReadInt16("D3145")}";
|
|
|
|
|
item.Fixtureboxtype = type;
|
|
|
|
|
|
|
|
|
|
item.CuringTimeSettingValue = obj.plc.ReadInt16("D913").ToString();
|
|
|
|
|
item.ActualValue = obj.plc.ReadInt16("T33").ToString();
|
|
|
|
|
item.UpdatedTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
|
|
|
|
|
if (objStatus != null) {
|
|
|
|
|
if (obj.plc.ReadBool("Y100"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y100"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "手动";
|
|
|
|
|
}
|
|
|
|
|
if (obj.plc.ReadBool("Y101"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y101"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "手动";
|
|
|
|
|
}
|
|
|
|
|
if (obj.plc.ReadBool("Y113"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y113"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "停止";
|
|
|
|
|
}
|
|
|
|
|
item.Production = obj.plc.ReadInt16("D185");
|
|
|
|
|
item.Production = objStatus.plc.ReadInt16("D185");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.ObjId == 5)
|
|
|
|
@ -537,22 +539,23 @@ namespace Admin.Core.Tasks
|
|
|
|
|
item.ActualValue = obj.plc.ReadInt16("T43").ToString();
|
|
|
|
|
item.UpdatedTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
|
|
|
|
|
if (objStatus != null)
|
|
|
|
|
if (objStatus != null&& objStatus.plc.IsConnected)
|
|
|
|
|
{
|
|
|
|
|
if (obj.plc.ReadBool("Y105"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y105"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "手动";
|
|
|
|
|
}
|
|
|
|
|
if (obj.plc.ReadBool("Y106"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y106"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "手动";
|
|
|
|
|
}
|
|
|
|
|
if (obj.plc.ReadBool("Y114"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y114"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "停止";
|
|
|
|
|
}
|
|
|
|
|
item.Production = obj.plc.ReadInt16("D186");
|
|
|
|
|
item.Production = objStatus.plc.ReadInt16("D186");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.ObjId == 6)
|
|
|
|
@ -563,25 +566,27 @@ namespace Admin.Core.Tasks
|
|
|
|
|
{
|
|
|
|
|
string type = $"{obj.plc.ReadInt16("D3152")}{obj.plc.ReadInt16("D3143")}";
|
|
|
|
|
item.Fixtureboxtype = type;
|
|
|
|
|
item.ActualValue = obj.plc.ReadInt16("T53").ToString();
|
|
|
|
|
item.CuringTimeSettingValue = obj.plc.ReadInt16("D915").ToString();
|
|
|
|
|
|
|
|
|
|
item.UpdatedTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
|
|
|
|
|
if (objStatus != null)
|
|
|
|
|
{
|
|
|
|
|
if (obj.plc.ReadBool("Y10A"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y10A"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "手动";
|
|
|
|
|
}
|
|
|
|
|
if (obj.plc.ReadBool("Y10B"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y10B"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "手动";
|
|
|
|
|
}
|
|
|
|
|
if (obj.plc.ReadBool("Y115"))
|
|
|
|
|
if (objStatus.plc.ReadBool("Y115"))
|
|
|
|
|
{
|
|
|
|
|
item.Fixturestatus = "停止";
|
|
|
|
|
}
|
|
|
|
|
item.Production = obj.plc.ReadInt16("D187");
|
|
|
|
|
item.ActualValue = objStatus.plc.ReadInt16("T53").ToString();
|
|
|
|
|
item.Production = objStatus.plc.ReadInt16("D187");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|