浏览代码

代码更新

master
pengliangyang 1年前
父节点
当前提交
36d4157eb1
共有 5 个文件被更改,包括 27 次插入5 次删除
  1. +1
    -1
      BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs
  2. +8
    -0
      BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs
  3. +15
    -1
      BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs
  4. +2
    -2
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs
  5. +1
    -1
      BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs

+ 1
- 1
BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs 查看文件

@@ -189,7 +189,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model.HK_PLC
}
if (Math.Round(weight0, 1) != Math.Round(ReadWeight, 1))
{
MessageNotify.GetInstance.ShowRunLog($"地址:{Address},配方重量0,读取plc值{ReadWeight}");
MessageNotify.GetInstance.ShowRunLog($"地址:{Address},配方重量0,读取plc值{ReadWeight}");
return false;
}
}


+ 8
- 0
BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs 查看文件

@@ -228,6 +228,14 @@ namespace BPASmartClient.JXJFoodBigStation.Model
MessageNotify.GetInstance.ShowRunLog($"配方编号:{code},托盘编号:{trayCode},订单类型为洗桶");

HKDevice.WritePlcRecipeData(LocalRecipes.ElementAt(index));
Thread.Sleep(200);
if (!HKDevice.ReadPlcRecipeData(LocalRecipes.ElementAt(index)))
{
App.Current.Dispatcher.Invoke(() =>
{
MessageNotify.GetInstance.ShowDialog($"plc配方数据和西门子配方数据不一致!", DialogType.Error);
});
};
HKDevice.HK_PLC_S7.Write("DB99.DBX0.3", true);
GVL_BigStation.Recipe1DosingStatus = 1;
MessageNotify.GetInstance.ShowRunLog($"配方编号:{code},托盘编号:{trayCode},下发完成");


+ 15
- 1
BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs 查看文件

@@ -243,7 +243,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
if (GVL_SmallStation.GetInstance.WindSendDosingComple)
{
//HKDevice.HK_PLC_S7.Write<bool>("DB4.DBX1.7", true);
HKDevice.HK_PLC_S7.Write<bool>("DB4.DBX2.0", true);
HKDevice.HK_PLC_S7.Write<bool>("DB4.DBX4.0", true);
GVL_SmallStation.GetInstance.WindSendDosingComple = false;
MessageNotify.GetInstance.ShowRunLog("风送配料完成信号,发给产线plc信号");
}
@@ -529,6 +529,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
GVL_SmallStation.GetInstance.RecipeProcessStatus[i] = 0;
}
GVL_SmallStation.GetInstance.WindSendDosingStatus = 0;
GVL_SmallStation.GetInstance.WindSendDosing = false;
}
}
else
@@ -570,6 +571,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
GVL_SmallStation.GetInstance.RecipeProcessStatus[i] = 0;
}
GVL_SmallStation.GetInstance.WindSendDosingStatus = 0;
GVL_SmallStation.GetInstance.WindSendDosing = false;
}
}
}
@@ -699,6 +701,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
{
if (GVL_SmallStation.GetInstance.WindSendDosingStatus == 1)
{
WindSendReset();
WindSendData.TargetRecipeCode = code;
WindSendData.IsAllowDosing = true;
foreach (var item in RemoteRecipes.ElementAt(index).WindSend)
@@ -1283,6 +1286,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
GVL_SmallStation.GetInstance.SiemensSendRecipeStatus = 0;

GVL_SmallStation.GetInstance.WindSendDosingStatus = 0;
GVL_SmallStation.GetInstance.WindSendDosing = false;

GVL_SmallStation.GetInstance.Order_Cancel = false;
GVL_SmallStation.GetInstance.Order_CancelRecipeCode = "";
@@ -1295,6 +1299,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
GVL_SmallStation.GetInstance.Tray_AGVLogic[i] = 0;
}
StockBinInit();
WindSendReset();
//for (int i = 0; i < GVL_SmallStation.GetInstance.StockInDosingComple.Length; i++)
//{
// GVL_SmallStation.GetInstance.StockInDosingComple[i] = false;
@@ -1506,6 +1511,15 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
}
}
private void WindSendReset()
{
float weight = (float)0.0;
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD0", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD4", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD8", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBD12", weight);
WindSendDevice.Siemens_PLC_S7.Write("DB95.DBX38.1", false);
}
public void RawMaterialNameWithCode()
{
GVL_SmallStation.GetInstance.RawMaterialsNameCode.Clear();


+ 2
- 2
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs 查看文件

@@ -45,14 +45,14 @@ namespace BPASmartClient.JXJFoodSmallStation.Model
}
break;
case 3:
if (RTrig.GetInstance("CurrentCompleteSign").Start(readData.CurrentCompleteSign))
if (readData.CurrentCompleteSign)
{
Siemens_PLC_S7.Write("DB95.DBX38.1", true);
GVL_SmallStation.GetInstance.WindSendDosingStatus = 4;
}
break;
case 4:
if (TTrig.GetInstance("CurrentCompleteSign").Start(readData.CurrentCompleteSign))
if (!readData.CurrentCompleteSign)
{
Siemens_PLC_S7.Write("DB95.DBX38.1", false);
GVL_SmallStation.GetInstance.WindSendDosingStatus = 5;


+ 1
- 1
BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSend_Write.cs 查看文件

@@ -33,7 +33,7 @@ namespace BPASmartClient.JXJFoodSmallStation.Model.WindSend
/// 目标配方编码
/// </summary>
[Siemens(16)]
public string TargetRecipeCode { get; set; }
public string TargetRecipeCode { get; set; } = "";
/// <summary>
/// 允许配料
/// </summary>


正在加载...
取消
保存