|
|
|
@ -19,13 +19,15 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
public HwPLc.PlcModel plc3 = null;
|
|
|
|
|
public HwPLc.PlcModel plc4 = null;
|
|
|
|
|
public static List<FixtureStatus> listFixtureStatus = new List<FixtureStatus>();
|
|
|
|
|
public static List<SpaceDetailModel> spaceDetailModel = new List<SpaceDetailModel>();
|
|
|
|
|
|
|
|
|
|
public List<int> BoxTypeList = new List<int>();
|
|
|
|
|
public List<int> HolderStatusList = new List<int>();
|
|
|
|
|
public List<int> HolderOutPutList = new List<int>();
|
|
|
|
|
public List<int> SolidifyTimeList = new List<int>();
|
|
|
|
|
public List<int> StoreTypeList = new List<int>();
|
|
|
|
|
public List<int> StoreAmountList = new List<int>();
|
|
|
|
|
public List<string> StoreTypeList = new List<string>();
|
|
|
|
|
public List<string> StoreAmountList = new List<string>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Collection() {
|
|
|
|
|
|
|
|
|
@ -69,15 +71,15 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
ReadSolidifyTime(plc3,SolidifyTimeList);
|
|
|
|
|
ReadSolidifyTime(plc4,SolidifyTimeList);
|
|
|
|
|
|
|
|
|
|
ReadStoreType(plc1);
|
|
|
|
|
ReadStoreType(plc2);
|
|
|
|
|
ReadStoreType(plc3);
|
|
|
|
|
ReadStoreType(plc4);
|
|
|
|
|
ReadStoreType(plc1, StoreTypeList);
|
|
|
|
|
ReadStoreType(plc2, StoreTypeList);
|
|
|
|
|
ReadStoreType(plc3, StoreTypeList);
|
|
|
|
|
ReadStoreType(plc4, StoreTypeList);
|
|
|
|
|
|
|
|
|
|
ReadStoreAmount(plc1);
|
|
|
|
|
ReadStoreAmount(plc2);
|
|
|
|
|
ReadStoreAmount(plc3);
|
|
|
|
|
ReadStoreAmount(plc4);
|
|
|
|
|
ReadStoreAmount(plc1, StoreAmountList);
|
|
|
|
|
ReadStoreAmount(plc2, StoreAmountList);
|
|
|
|
|
ReadStoreAmount(plc3, StoreAmountList);
|
|
|
|
|
ReadStoreAmount(plc4, StoreAmountList);
|
|
|
|
|
for(int i = 0; i < 24; i++)
|
|
|
|
|
{
|
|
|
|
|
FixtureStatus model = new FixtureStatus();
|
|
|
|
@ -89,6 +91,17 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
|
|
|
|
|
listFixtureStatus.Add(model);
|
|
|
|
|
}
|
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
|
|
|
{
|
|
|
|
|
SpaceDetailModel model = new SpaceDetailModel();
|
|
|
|
|
model.ObjId = i + 1;
|
|
|
|
|
//if (BoxTypeList.Count > 0) model.FixtureBoxType = BoxTypeList[i].ToString();
|
|
|
|
|
//if (HolderStatusList.Count > 0) model.Status = HolderStatusList[i];
|
|
|
|
|
//if (HolderOutPutList.Count > 0) model.Yield = HolderOutPutList[i];
|
|
|
|
|
//if (SolidifyTimeList.Count > 0) model.PlanCuringTime = SolidifyTimeList[i];
|
|
|
|
|
|
|
|
|
|
spaceDetailModel.Add(model);
|
|
|
|
|
}
|
|
|
|
|
Thread.Sleep(10000);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -279,7 +292,7 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 读取泡前库箱型
|
|
|
|
|
/// </summary>
|
|
|
|
|
static void ReadStoreType(PlcModel obj)
|
|
|
|
|
static void ReadStoreType(PlcModel obj, List<string> storeType)
|
|
|
|
|
{
|
|
|
|
|
if (obj == null) return;
|
|
|
|
|
if (obj.plc.IsConnected == false) return;
|
|
|
|
@ -290,12 +303,17 @@ namespace Aucma.Core.OldBoxFoam.Business
|
|
|
|
|
int temp2 = short.Parse(StringChange.bytesToHexStr(array(info.Skip(20).Take(2).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
|
|
|
|
|
int temp3 = short.Parse(StringChange.bytesToHexStr(array(info.Skip(40).Take(2).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
|
|
|
|
|
int temp4 = short.Parse(StringChange.bytesToHexStr(array(info.Skip(60).Take(2).ToArray()), 2), System.Globalization.NumberStyles.HexNumber);
|
|
|
|
|
|
|
|
|
|
storeType.Add(temp1.ToString());
|
|
|
|
|
storeType.Add(temp2.ToString());
|
|
|
|
|
storeType.Add(temp2.ToString());
|
|
|
|
|
storeType.Add(temp2.ToString());
|
|
|
|
|
Console.WriteLine($"读取泡前库箱型,1#:{temp1};2#{temp2};3#:{temp3};4#:{temp4}");
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 读取泡前库库存
|
|
|
|
|
/// </summary>
|
|
|
|
|
static void ReadStoreAmount(PlcModel obj)
|
|
|
|
|
static void ReadStoreAmount(PlcModel obj, List<string> storeAmount)
|
|
|
|
|
{
|
|
|
|
|
if (obj == null) return;
|
|
|
|
|
if (obj.plc.IsConnected == false) return;
|
|
|
|
|