change - 门体发泡机数据采集程序修改

dev
wenjy 1 year ago
parent 72acbbf30a
commit 4011dce315

@ -3,7 +3,7 @@ using Admin.Core.IService;
using Admin.Core.Model;
using Aucma.Core.DoorFoam.Models;
using Aucma.Core.HwPLc;
using Microsoft.Extensions.DependencyInjection;
using NetTaste;
using NPOI.Util;
using System;
@ -22,29 +22,115 @@ namespace Aucma.Core.DoorFoam.Business
/// </summary>
public class CollectionFoamMachine
{
/// <summary>
/// 刷新最后一枪DATAGRID
/// </summary>
public delegate void RefreshLastShotDataDelegate(BoxLastShotRecord record);
public static event RefreshLastShotDataDelegate RefreshLastShotDataDelegateEvent;
/// <summary>
/// 刷新每一枪数据
/// </summary>
public delegate void RefreshGunDataDelegate(Dictionary<string, BoxLastShotRecord> keys);
public static event RefreshGunDataDelegate RefreshGunDataDelegateEvent;
/// <summary>
/// 刷新系统数据
/// </summary>
public delegate void RefreshSystemDataDelegate(Dictionary<string, FoamMachinesModel> keys);
public static event RefreshSystemDataDelegate RefreshSystemDataDelegateEvent;
private static System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
List<FoamMachinesModel> foamMachinesList = new List<FoamMachinesModel>();
private static BoxLastShotRecord tempLastRecord = null;
public void startCollect()
Dictionary<string, BoxLastShotRecord> gunKeys = new Dictionary<string, BoxLastShotRecord>();
Dictionary<string, BoxLastShotRecord> tempKeys = new Dictionary<string, BoxLastShotRecord>();
// 系统参数
Dictionary<string, FoamMachinesModel> systemKeys = new Dictionary<string, FoamMachinesModel>();
Semaphore semaphore = new Semaphore(1, 1);
private readonly IBoxLastShotRecordServices? _lastShotRecordServices = App.ServiceProvider.GetService<IBoxLastShotRecordServices>();
public CollectionFoamMachine()
{
}
public void startCollect()
{
Task.Run( () =>
Task.Run(() =>
{
Task.Delay(2000);
//Thread.Sleep(6000);
var obj = PlcHelper.siemensList.FirstOrDefault(d => d.EquipName.Equals("foamMachinePlc"));
if (obj != null)
while (true)
{
ReadEquipSystem(obj, "DB50.388"); //采集1系统
//ReadEquipSystem(obj, "DB50.642"); //采集2系统
//ReadGunData(obj, "DB50.896"); //A1枪数据
//ReadGunData(obj, "DB50.1084"); //A1枪数据
//ReadGunData(obj, "DB50.1272"); //A1枪数据
//ReadGunData(obj, "DB50.1460"); //A1枪数据
try
{
Thread.Sleep(3000);
var obj = PlcHelper.siemensList.FirstOrDefault(d => d.EquipName.Equals("FoamPlc"));
if (obj != null)
{
ReadEquipSystem(obj, "DB50.388", systemKeys, "1"); //采集1系统
ReadEquipSystem(obj, "DB50.642", systemKeys, "2"); //采集2系统
ReadGunData(obj, "DB50.896", gunKeys, "A1"); //A1枪数据
ReadGunData(obj, "DB50.1084", gunKeys, "B1"); //B1枪数据
ReadGunData(obj, "DB50.1272", gunKeys, "A2"); //A2枪数据
ReadGunData(obj, "DB50.1460", gunKeys, "B2"); //A2枪数据
RefreshSystemDataDelegateEvent?.Invoke(systemKeys);
RefreshGunDataDelegateEvent?.Invoke(gunKeys);
foreach (KeyValuePair<string, BoxLastShotRecord> kvPair in gunKeys)
{
//程序启动缓存没数据查数据库
if (!tempKeys.ContainsKey(kvPair.Key))
{
BoxLastShotRecord record = _lastShotRecordServices.Query(x => x.System == kvPair.Value.System && x.ProductLineCode == kvPair.Value.ProductLineCode && x.GunCode == kvPair.Value.GunCode).OrderByDescending(x => x.CreateTime).FirstOrDefault();
if (record == null)
{
// 数据库也没数据
int a = _lastShotRecordServices.AddAsync(kvPair.Value).Result;
RefreshLastShotDataDelegateEvent?.Invoke(kvPair.Value);
continue;
}
tempKeys.Add(kvPair.Key, record);
}
if (!kvPair.Value.MixpistOff.Equals(tempKeys[kvPair.Key].MixpistOff))
{
int b = _lastShotRecordServices.AddAsync(kvPair.Value).Result;
RefreshLastShotDataDelegateEvent?.Invoke(kvPair.Value);
}
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
finally
{
foreach (KeyValuePair<string, BoxLastShotRecord> kvp in gunKeys)
{
if (tempKeys.ContainsKey(kvp.Key))
{
// 键已存在,更新值
tempKeys[kvp.Key] = kvp.Value;
}
else
{
// 键不存在,添加键值对
tempKeys.Add(kvp.Key, kvp.Value);
}
}
// tempKeys = gunKeys;
}
}
});
}
@ -52,38 +138,54 @@ namespace Aucma.Core.DoorFoam.Business
/// 采集设备系统参数
/// </summary>
/// <returns></returns>
static void ReadEquipSystem(HwPLc.PlcModel obj, string startStr)
static void ReadEquipSystem(HwPLc.PlcModel obj, string startStr, Dictionary<string, FoamMachinesModel> keys, string systemId)
{
if (obj == null && !obj.plc.IsConnected) return;
if (obj == null || !obj.plc.IsConnected) return;
if (obj.plc.IsConnected)
{
FoamMachinesModel mode=new FoamMachinesModel();
byte[] info = obj.plc.Read(startStr, 170);
int temp1 = judgeStatus(ByteArrayToBinary(info.Skip(0).Take(1).ToArray()));
int temp2 = judgeStatus(ByteArrayToBinary(info.Skip(1).Take(1).ToArray()));
float temp3 = byteToFloat(info.Skip(2).Take(4).ToArray());
float temp4 = byteToFloat(info.Skip(14).Take(4).ToArray());
float temp5 = byteToFloat(info.Skip(18).Take(4).ToArray());
float temp6 = byteToFloat(info.Skip(22).Take(4).ToArray());
if (info == null) return;
FoamMachinesModel model = new FoamMachinesModel();
model.systemId = systemId;
model.Machine_Status_0 = judgeStatus(ByteArrayToBinary(info.Skip(0).Take(1).ToArray())).ToString();
model.Machine_Status_1 = judgeStatus(ByteArrayToBinary(info.Skip(1).Take(1).ToArray())).ToString();
model.POL_Level = byteToFloat(info.Skip(2).Take(4).ToArray()).ToString();
model.POL_Temp = byteToFloat(info.Skip(14).Take(4).ToArray()).ToString();
model.POL_LP = byteToFloat(info.Skip(18).Take(4).ToArray()).ToString();
model.POL_HP = byteToFloat(info.Skip(22).Take(4).ToArray()).ToString();
float temp7 = byteToFloat(info.Skip(34).Take(4).ToArray());
float temp8 = byteToFloat(info.Skip(38).Take(4).ToArray());
float temp9 = byteToFloat(info.Skip(42).Take(4).ToArray());
model.POL_Vol = byteToFloat(info.Skip(34).Take(4).ToArray()).ToString();
model.POL_Usage = byteToFloat(info.Skip(38).Take(4).ToArray()).ToString();
model.POL_Freq_Speed = byteToFloat(info.Skip(42).Take(4).ToArray()).ToString();
float temp10 = byteToFloat(info.Skip(82).Take(4).ToArray());
model.ISO_Level = byteToFloat(info.Skip(82).Take(4).ToArray()).ToString();
float temp11 = byteToFloat(info.Skip(94).Take(4).ToArray());
float temp12 = byteToFloat(info.Skip(98).Take(4).ToArray());
float temp13 = byteToFloat(info.Skip(102).Take(4).ToArray());
model.ISO_Temp = byteToFloat(info.Skip(94).Take(4).ToArray()).ToString();
model.ISO_LP = byteToFloat(info.Skip(98).Take(4).ToArray()).ToString();
model.ISO_HP = byteToFloat(info.Skip(102).Take(4).ToArray()).ToString();
float temp14 = byteToFloat(info.Skip(114).Take(4).ToArray());
float temp15 = byteToFloat(info.Skip(118).Take(4).ToArray());
float temp16 = byteToFloat(info.Skip(122).Take(4).ToArray());
model.ISO_Vol = byteToFloat(info.Skip(114).Take(4).ToArray()).ToString();
model.ISO_Usage = byteToFloat(info.Skip(118).Take(4).ToArray()).ToString();
model.ISO_Freq_Speed = byteToFloat(info.Skip(122).Take(4).ToArray()).ToString();
float temp17 = byteToFloat(info.Skip(162).Take(4).ToArray());
float temp18 = byteToFloat(info.Skip(166).Take(4).ToArray());
model.Hydr_Press = byteToFloat(info.Skip(162).Take(4).ToArray()).ToString();
model.Hydr_Temp = byteToFloat(info.Skip(166).Take(4).ToArray()).ToString();
model.collectTime = DateTime.Now;
if (keys.ContainsKey(systemId))
{
// 键已存在,更新值
keys[systemId] = model;
}
else
{
// 键不存在,添加键值对
keys.Add(systemId, model);
}
}
}
@ -91,98 +193,57 @@ namespace Aucma.Core.DoorFoam.Business
/// 每一枪数据 ---A1,B1,A2,B2
/// </summary>
/// <returns></returns>
static void ReadGunData(HwPLc.PlcModel obj, string startStr)
static void ReadGunData(HwPLc.PlcModel obj, string startStr, Dictionary<string, BoxLastShotRecord> keys, string gunCode)
{
if (obj == null && !obj.plc.IsConnected) return;
if (obj == null || !obj.plc.IsConnected) return;
if (obj.plc.IsConnected)
{
byte[] info = obj.plc.Read(startStr, 88);
float temp1 = byteToFloat(info.Skip(0).Take(4).ToArray());
float temp2 = byteToFloat(info.Skip(4).Take(4).ToArray());
float temp3 = byteToFloat(info.Skip(8).Take(4).ToArray());
float temp4 = byteToFloat(info.Skip(12).Take(4).ToArray());
float temp5 = byteToFloat(info.Skip(16).Take(4).ToArray());
float temp6 = byteToFloat(info.Skip(20).Take(4).ToArray());
float temp7 = byteToFloat(info.Skip(24).Take(4).ToArray());
float temp8 = byteToFloat(info.Skip(28).Take(4).ToArray());
short temp9 = short.Parse(StringChange.bytesToHexStr(info.Skip(36).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber);
int temp10 = int.Parse(StringChange.bytesToHexStr(info.Skip(38).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber);
float temp11 = byteToFloat(info.Skip(42).Take(4).ToArray());
float temp12 = byteToFloat(info.Skip(46).Take(4).ToArray());
float temp13 = byteToFloat(info.Skip(50).Take(4).ToArray());
float temp14 = byteToFloat(info.Skip(54).Take(4).ToArray());
int temp15 = int.Parse(StringChange.bytesToHexStr(info.Skip(58).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber);
int temp16 = int.Parse(StringChange.bytesToHexStr(info.Skip(62).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber);
float temp17 = byteToFloat(info.Skip(66).Take(4).ToArray());
float temp18 = byteToFloat(info.Skip(70).Take(4).ToArray());
int temp19 = int.Parse(StringChange.bytesToHexStr(info.Skip(74).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber);
int temp20 = int.Parse(StringChange.bytesToHexStr(info.Skip(78).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber);
int temp21 = int.Parse(StringChange.bytesToHexStr(info.Skip(82).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber);
int temp22 = judgeStatus(ByteArrayToBinary(info.Skip(87).Take(1).ToArray()));
if (info == null) return;
BoxLastShotRecord lastShotRecord = new BoxLastShotRecord();
lastShotRecord.System = gunCode.Substring(1, 1);
lastShotRecord.GunCode = gunCode;
lastShotRecord.ProductLineCode = "CX_02";
lastShotRecord.PolTemp = byteToFloat(info.Skip(0).Take(4).ToArray()).ToString();
lastShotRecord.PolHp = byteToFloat(info.Skip(4).Take(4).ToArray()).ToString();
lastShotRecord.PolVol = byteToFloat(info.Skip(8).Take(4).ToArray()).ToString();
lastShotRecord.PolUsage = byteToFloat(info.Skip(12).Take(4).ToArray()).ToString();
lastShotRecord.IsoTemp = byteToFloat(info.Skip(16).Take(4).ToArray()).ToString();
lastShotRecord.IsoHp = byteToFloat(info.Skip(20).Take(4).ToArray()).ToString();
lastShotRecord.IsoVol = byteToFloat(info.Skip(24).Take(4).ToArray()).ToString();
lastShotRecord.IsoUsage = byteToFloat(info.Skip(28).Take(4).ToArray()).ToString();
lastShotRecord.PourNu = short.Parse(StringChange.bytesToHexStr(info.Skip(36).Take(2).ToArray(), 2), System.Globalization.NumberStyles.HexNumber).ToString();
lastShotRecord.SetTime = int.Parse(StringChange.bytesToHexStr(info.Skip(38).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString();
lastShotRecord.SetWeight = byteToFloat(info.Skip(42).Take(4).ToArray()).ToString();
lastShotRecord.SetRatio = byteToFloat(info.Skip(46).Take(4).ToArray()).ToString(); ;
lastShotRecord.PourWeight = byteToFloat(info.Skip(50).Take(4).ToArray()).ToString();
lastShotRecord.PourRatio = byteToFloat(info.Skip(54).Take(4).ToArray()).ToString();
lastShotRecord.MpTime = int.Parse(StringChange.bytesToHexStr(info.Skip(58).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString();
lastShotRecord.HpTime = int.Parse(StringChange.bytesToHexStr(info.Skip(62).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString();
lastShotRecord.HydrPress = byteToFloat(info.Skip(66).Take(4).ToArray()).ToString();
lastShotRecord.HydrTemp = byteToFloat(info.Skip(70).Take(4).ToArray()).ToString();
lastShotRecord.MixpistOn = int.Parse(StringChange.bytesToHexStr(info.Skip(74).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString();
lastShotRecord.MixpistOff = int.Parse(StringChange.bytesToHexStr(info.Skip(78).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString(); ;
lastShotRecord.TotalYield = int.Parse(StringChange.bytesToHexStr(info.Skip(82).Take(4).ToArray(), 4), System.Globalization.NumberStyles.HexNumber).ToString(); ;
lastShotRecord.PourEnd = judgeStatus(ByteArrayToBinary(info.Skip(87).Take(1).ToArray())).ToString();
lastShotRecord.CreateTime = DateTime.Now;
if (keys.ContainsKey(gunCode))
{
// 键已存在,更新值
keys[gunCode] = lastShotRecord;
}
else
{
// 键不存在,添加键值对
keys.Add(gunCode, lastShotRecord);
}
}
}
///// <summary>
///// 采集最后一枪数据
///// </summary>
///// <returns></returns>
//public async Task CollectLast()
//{
// var obj = PlcHelper.siemensList.FirstOrDefault(d => d.EquipName.Equals("Plc1"));
// if (obj != null && obj.plc.IsConnected)
// {
// BoxLastShotRecord lastShotRecord = new BoxLastShotRecord();
// byte[] info = obj.plc.ReadBytes("DB50.896", (ushort)88);
// IByteTransform byteTransform = new RegularByteTransform();
// lastShotRecord.System = "1";
// lastShotRecord.GunCode = "A1";
// lastShotRecord.GunCode = "A1";
// #region 赋值
// lastShotRecord.PolTemp = Encoding.ASCII.GetString(info.Skip(0).Take(4).ToArray());
// lastShotRecord.PolHp = StringChange.bytesToHexStr(info.Skip(4).Take(4).ToArray(), 4);
// lastShotRecord.PolVol = StringChange.bytesToHexStr(info.Skip(8).Take(4).ToArray(), 4);
// lastShotRecord.PolUsage = StringChange.bytesToHexStr(info.Skip(12).Take(4).ToArray(), 4);
// lastShotRecord.IsoTemp = StringChange.bytesToHexStr(info.Skip(16).Take(4).ToArray(), 4);
// lastShotRecord.IsoHp = StringChange.bytesToHexStr(info.Skip(20).Take(4).ToArray(), 4);
// lastShotRecord.IsoVol = StringChange.bytesToHexStr(info.Skip(24).Take(4).ToArray(), 4);
// lastShotRecord.IsoUsage = StringChange.bytesToHexStr(info.Skip(28).Take(4).ToArray(), 4);
// lastShotRecord.PourNu = StringChange.bytesToHexStr(info.Skip(36).Take(2).ToArray(), 2);
// lastShotRecord.SetTime = StringChange.bytesToHexStr(info.Skip(38).Take(4).ToArray(), 4);
// lastShotRecord.SetWeight = StringChange.bytesToHexStr(info.Skip(42).Take(4).ToArray(), 4);
// lastShotRecord.SetRatio = StringChange.bytesToHexStr(info.Skip(46).Take(4).ToArray(), 4);
// lastShotRecord.PourWeight = StringChange.bytesToHexStr(info.Skip(50).Take(4).ToArray(), 4);
// lastShotRecord.PourRatio = StringChange.bytesToHexStr(info.Skip(54).Take(4).ToArray(), 4);
// lastShotRecord.MpTime = StringChange.bytesToHexStr(info.Skip(58).Take(4).ToArray(), 4);
// lastShotRecord.HpTime = StringChange.bytesToHexStr(info.Skip(62).Take(4).ToArray(), 4);
// lastShotRecord.HydrPress = StringChange.bytesToHexStr(info.Skip(66).Take(4).ToArray(), 4);
// lastShotRecord.HydrTemp = StringChange.bytesToHexStr(info.Skip(70).Take(4).ToArray(), 4);
// lastShotRecord.MixpistOn = StringChange.bytesToHexStr(info.Skip(74).Take(4).ToArray(), 4);
// lastShotRecord.MixpistOff = StringChange.bytesToHexStr(info.Skip(78).Take(4).ToArray(), 4);
// lastShotRecord.TotalYield = StringChange.bytesToHexStr(info.Skip(82).Take(4).ToArray(), 4);
// lastShotRecord.PourEnd = StringChange.bytesToHexStr(info.Skip(87).Take(1).ToArray(), 1);
// lastShotRecord.CreateTime = DateTime.Now;
// #endregion
// //if (tempLastRecord == null)
// //{
// // //数据库查
// // tempLastRecord = _lastShotRecordServices.Query(x => x.System == lastShotRecord.System && x.ProductLineCode == lastShotRecord.ProductLineCode && x.GunCode == lastShotRecord.GunCode).OrderByDescending(x => x.CreateTime).FirstOrDefault();
// //}
// //if (tempLastRecord == null || !tempLastRecord.MixpistOff.Equals(lastShotRecord.MixpistOff))
// //{
// // // 刷新页面
// // RefreshLastShotDataDelegateEvent?.Invoke(lastShotRecord);
// // //保存
// // _lastShotRecordServices.AddAsync(lastShotRecord);
// // tempLastRecord = lastShotRecord;
// //}
// }
//}
#region 字符工具转换方法
/// byte[]转十进制ascii码
@ -259,3 +320,4 @@ namespace Aucma.Core.DoorFoam.Business

@ -12,299 +12,104 @@ namespace Aucma.Core.DoorFoam.Models
{
public partial class FoamMachinesModel
{
#region 料位
/// <summary>
/// POL料位
/// 系统编号;1系统 2系统
/// </summary>
public int Syst1_POLMaterialLevel { get; set; }
public string systemId { get; set; }
/// <summary>
/// ISO料位
/// 开关机信号
/// </summary>
public int Syst1_ISOMaterialLevel { get; set; }
#endregion
public string Machine_Status_0 { get; set; }
#region 温度
/// <summary>
/// Plo温度
///运行状态(自/手动)
/// </summary>
public string Syst1_PolTmperature { get; set; }
/// <summary>
/// ISO温度
/// </summary>
public string Syst1_IsoTmperature { get; set; }
#endregion
#region 压力
/// <summary>
/// Pol压力
/// </summary>
public string Syst1_PolPressure { get; set; }
/// <summary>
/// Iso压力
/// </summary>
public string Syst1_IsoPressure { get; set; }
#endregion
public string Machine_Status_1 { get; set; }
#region 温度
/// <summary>
/// Iso温度
///POL料位
/// </summary>
public string Syst1_PolTemperature { get; set; }
/// <summary>
/// Iso温度
/// </summary>
public string Syst1_IsoTemperature { get; set; }
#endregion
public string POL_Level { get; set; }
#region 输出压力
/// <summary>
/// POL输出压力
///POL温度
/// </summary>
public string Syst1_PolOutputPressure { get; set; }
/// <summary>
/// ISO输出压力
/// </summary>
public string Syst1_IsoOutputPressure { get; set; }
#endregion
public string POL_Temp { get; set; }
#region 流量
/// <summary>
/// POL流量
/// </summary>
public string Syst1_PolFlow { get; set; }
/// <summary>
/// ISO流量
///POL输入压力
/// </summary>
public string Syst1_IsoFlow { get; set; }
#endregion
public string POL_LP { get; set; }
#region 原料用量
/// <summary>
/// POL流量
/// </summary>
public string Syst1_PolMaterialLeve { get; set; }
/// <summary>
/// ISO流量
///POL输出压力
/// </summary>
public string Syst1_IsoMaterialLeve { get; set; }
#endregion
public string POL_HP { get; set; }
#region 液压
/// <summary>
/// 液压压力
/// </summary>
public string Syst1_Pressure { get; set; }
/// <summary>
/// 液压
///POL流量
/// </summary>
public string Syst1_Temperature { get; set; }
#endregion
public string POL_Vol { get; set; }
#region 结束信号
/// <summary>
/// A1结束信号
///POL原料用量
/// </summary>
public string Syst1_A1_End { get; set; }
/// <summary>
/// 结束信号
/// </summary>
public string Syst1_B1_End { get; set; }
#endregion
public string POL_Usage { get; set; }
#region A1-B1 POL注料压力
/// <summary>
/// A1 POL注料压力
///POL变频器转速
/// </summary>
public string Syst1_A1_POLPressure { get; set; }
/// <summary>
/// B1 POL注料压力
/// </summary>
public string Syst1_B1_POLPressure { get; set; }
#endregion
public string POL_Freq_Speed { get; set; }
#region A1-B1 POL注料温度
/// <summary>
/// A1 POL注料温度
/// </summary>
public string Syst1_A1_POLTemperature { get; set; }
/// <summary>
/// B1 POL注料温度
///ISO料位
/// </summary>
public string Syst1_B1_POLTemperature { get; set; }
#endregion
public string ISO_Level { get; set; }
#region A1-B1 ISO注料压力
/// <summary>
/// A1 ISO注料压力
/// </summary>
public string Syst1_A1_ISOPressure { get; set; }
/// <summary>
/// B1 ISO注料压力
///ISO温度
/// </summary>
public string Syst1_B1_ISOPressure { get; set; }
#endregion
public string ISO_Temp { get; set; }
#region A1-B1 ISO注料压力
/// <summary>
/// A1 ISO注料压力
/// </summary>
public string Syst1_A1_ISOTemperature { get; set; }
/// <summary>
/// B1 ISO注料压力
///ISO输入压力
/// </summary>
public string Syst1_B1_ISOTemperature { get; set; }
#endregion
public string ISO_LP { get; set; }
#region 系统2料位
/// <summary>
/// POL料位
///ISO输出压力
/// </summary>
public int Syst2_POLMaterialLevel { get; set; }
public string ISO_HP { get; set; }
/// <summary>
/// ISO料位
///ISO流量
/// </summary>
public int Syst2_ISOMaterialLevel { get; set; }
#endregion
public string ISO_Vol { get; set; }
#region 系统2温度
/// <summary>
/// Plo温度
/// </summary>
public string Syst2_PolTmperature { get; set; }
/// <summary>
/// ISO温度
///ISO原料用量
/// </summary>
public string Syst2_IsoTmperature { get; set; }
public string ISO_Usage { get; set; }
#endregion
#region 系统2压力
/// <summary>
/// Pol压力
///ISO变频器转速
/// </summary>
public string Syst2_PolPressure { get; set; }
public string ISO_Freq_Speed { get; set; }
/// <summary>
/// Iso压力
///液压压力
/// </summary>
public string Syst2_IsoPressure { get; set; }
#endregion
public string Hydr_Press { get; set; }
#region 系统2温度
/// <summary>
/// Iso温度
///液压温度
/// </summary>
public string Syst2_PolTemperature { get; set; }
/// <summary>
/// Iso温度
/// </summary>
public string Syst2_IsoTemperature { get; set; }
#endregion
public string Hydr_Temp { get; set; }
#region 系统2输出压力
/// <summary>
/// POL输出压力
/// </summary>
public string Syst2_PolOutputPressure { get; set; }
/// <summary>
/// ISO输出压力
/// </summary>
public string Syst2_IsoOutputPressure { get; set; }
#endregion
#region 系统2流量
/// <summary>
/// POL流量
/// </summary>
public string Syst2_PolFlow { get; set; }
/// <summary>
/// ISO流量
/// </summary>
public string Syst2_IsoFlow { get; set; }
#endregion
#region 系统2原料用量
/// <summary>
/// POL流量
/// </summary>
public string Syst2_PolMaterialLeve { get; set; }
/// <summary>
/// ISO流量
/// </summary>
public string Syst2_IsoMaterialLeve { get; set; }
#endregion
#region 系统2液压
/// <summary>
/// 液压压力
/// </summary>
public string Syst2_Pressure { get; set; }
/// <summary>
/// 液压
/// </summary>
public string Syst2_Temperature { get; set; }
#endregion
#region 系统2结束信号
/// <summary>
/// A1结束信号
/// </summary>
public string Syst2_A1_End { get; set; }
/// <summary>
/// 结束信号
/// </summary>
public string Syst2_B1_End { get; set; }
#endregion
#region 系统2 A1-B1 POL注料压力
/// <summary>
/// A1 POL注料压力
/// </summary>
public string Syst2_A1_POLPressure { get; set; }
/// <summary>
/// B1 POL注料压力
/// </summary>
public string Syst2_B1_POLPressure { get; set; }
#endregion
#region 系统2 A1-B1 POL注料温度
/// <summary>
/// A1 POL注料温度
/// </summary>
public string Syst2_A1_POLTemperature { get; set; }
/// <summary>
/// B1 POL注料温度
/// </summary>
public string Syst2_B1_POLTemperature { get; set; }
#endregion
#region 系统2 A1-B1 ISO注料压力
/// <summary>
/// A1 ISO注料压力
/// </summary>
public string Syst2_A1_ISOPressure { get; set; }
/// <summary>
/// B1 ISO注料压力
/// </summary>
public string Syst2_B1_ISOPressure { get; set; }
#endregion
#region 系统2 A1-B1 ISO注料压力
/// <summary>
/// A1 ISO注料压力
/// </summary>
public string Syst2_A1_ISOTemperature { get; set; }
/// <summary>
/// B1 ISO注料压力
///采集时间
/// </summary>
public string Syst2_B1_ISOTemperature { get; set; }
#endregion
public DateTime collectTime { get; set; }
}
}

@ -4,6 +4,7 @@ using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using Admin.Core.Service;
using Admin.Core.Tasks;
using Aucma.Core.DoorFoam.Business;
using Aucma.Core.DoorFoam.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using Microsoft.Extensions.DependencyInjection;
@ -22,48 +23,188 @@ namespace Aucma.Core.DoorFoam.ViewModels
public FoamMachinesPageViewModel()
{
Job_BoxFoamLastData_Quartz.RefreshLastShotDataDelegateEvent += RefreshData;
CollectionFoamMachine.RefreshLastShotDataDelegateEvent += RefreshData;
CollectionFoamMachine.RefreshGunDataDelegateEvent += RefreshGunData;
CollectionFoamMachine.RefreshSystemDataDelegateEvent += RefreshSystemData;
_boxLastShotRecordServices = App.ServiceProvider.GetService<IBoxLastShotRecordServices>();
// LoadData();
LoadData();
//Task.WaitAll(LoadData());
}
#region 刷新系统参数---系统1系统2
/// <summary>
/// 系统1系统2数据刷新
/// </summary>
public void RefreshSystemData(Dictionary<string, FoamMachinesModel> keys)
{
foreach (KeyValuePair<string, FoamMachinesModel> kvp in keys)
{
if (kvp.Key.Equals("1"))
{
RefreshSystem1(kvp.Value);
}
else if (kvp.Key.Equals("2"))
{
RefreshSystem2(kvp.Value);
}
}
}
/// <summary>
/// 刷新系统1
/// </summary>
/// <param name="record"></param>
public void RefreshSystem1(FoamMachinesModel record)
{
PolInputPressure1 = record.POL_LP;
IsoInputPressure1 = record.ISO_LP;
PolOutputPressure1 = record.POL_HP;
IsoOutputPressure1 = record.ISO_HP;
PolFlow1 = record.POL_Vol;
IsoFlow1 = record.ISO_Vol;
PoleTmperature1 = record.POL_Temp;
IsoTemperature1 = record.ISO_Temp;
PolMaterialLevel1 = record.POL_Level;
IsoMaterialLevel1 = record.ISO_Level;
Pressure1 = record.Hydr_Press;
Temperature1 = record.Hydr_Temp;
}
/// <summary>
/// 刷新系统2
/// </summary>
/// <param name="record"></param>
public void RefreshSystem2(FoamMachinesModel record)
{
PolInputPressure2 = record.POL_LP;
IsoInputPressure2 = record.ISO_LP;
PolOutputPressure2 = record.POL_HP;
IsoOutputPressure2 = record.ISO_HP;
PolFlow2 = record.POL_Vol;
IsoFlow2 = record.ISO_Vol;
PoleTmperature2 = record.POL_Temp;
IsoTemperature2 = record.ISO_Temp;
PolMaterialLevel2 = record.POL_Level;
IsoMaterialLevel2 = record.ISO_Level;
Pressure2 = record.Hydr_Press;
Temperature2 = record.Hydr_Temp;
}
#endregion
#region 刷新每一枪数据
/// <summary>
/// A1,B1,A2,B2枪数据刷新
/// </summary>
public void RefreshGunData(Dictionary<string, BoxLastShotRecord> keys)
{
foreach (KeyValuePair<string, BoxLastShotRecord> kvp in keys)
{
if (kvp.Key.Equals("A1"))
{
RefreshA1(kvp.Value);
}
else if (kvp.Key.Equals("B1"))
{
RefreshB1(kvp.Value);
}
else if (kvp.Key.Equals("A2"))
{
RefreshA2(kvp.Value);
}
else if (kvp.Key.Equals("B2"))
{
RefreshB2(kvp.Value);
}
}
}
/// <summary>
/// 刷新A1数据
/// </summary>
/// <param name="record"></param>
public void RefreshA1(BoxLastShotRecord record)
{
POLPressure1a = record.PolHp;
POLTemperature1a = record.PolTemp;
ISOPressure1a = record.IsoHp;
ISOTemperature1a = record.IsoTemp;
}
/// <summary>
/// 刷新B1数据
/// </summary>
/// <param name="record"></param>
public void RefreshB1(BoxLastShotRecord record)
{
POLPressure1b = record.PolHp;
POLTemperature1b = record.PolTemp;
ISOPressure1b = record.IsoHp;
ISOTemperature1b = record.IsoTemp;
}
/// <summary>
/// 刷新A2数据
/// </summary>
/// <param name="record"></param>
public void RefreshA2(BoxLastShotRecord record)
{
POLPressure2a = record.PolHp;
POLTemperature2a = record.PolTemp;
ISOPressure2a = record.IsoHp;
ISOTemperature2a = record.IsoTemp;
}
/// <summary>
/// 刷新B2数据
/// </summary>
/// <param name="record"></param>
public void RefreshB2(BoxLastShotRecord record)
{
POLPressure2b = record.PolHp;
POLTemperature2b = record.PolTemp;
ISOPressure2b = record.IsoHp;
ISOTemperature2b = record.IsoTemp;
}
#endregion
/// <summary>
/// datagrid刷新
/// </summary>
/// <param name="record"></param>
public void RefreshData(BoxLastShotRecord record)
{
System.Windows.Application.Current.Dispatcher.Invoke((Action)(async () =>
{
string system = string.Empty;
if (record.System == "1") {
string system = string.Empty;
if (record.System == "1")
{
system = "1系统";
// PolFlow1 = record.POLInjecFlowRate;
// IsoFlow1 = record.ISOInjecFlowRate;
// PoleTmperature1 = record.POLInjecTemperatureOfGunHead;
// IsoTemperature1 = record.ISOInjecTemperatureOfGunHead;
// PolFlow1 = record.POLInjecFlowRate;
// IsoFlow1 = record.ISOInjecFlowRate;
// PoleTmperature1 = record.POLInjecTemperatureOfGunHead;
// IsoTemperature1 = record.ISOInjecTemperatureOfGunHead;
}
if (record.System == "2") { system = "2系统"; }
LastShotRecordDataGrid.Add(new LastShotRecordModel()
{
No = LastShotRecordDataGrid.Count+1,
System = system,
GunHead = record.GunCode,
// StationNumber = record.StationNumber,
PolInjectionpressure = record.PolHp,
IsoInjectionpressure = record.IsoHp,
PolInjectiontemperature = record.PolTemp,
IsoInjectiontemperature = record.IsoTemp,
LastTime = record.CreateTime,
Createtime = record.CreateTime
});
if (record.System == "2") { system = "2系统"; }
LastShotRecordModel model = new LastShotRecordModel();
model.No = LastShotRecordDataGrid.Count + 1;
model.System = system;
model.GunHead = record.GunCode;
// StationNumber = record.StationNumber,
model.IsoInjectionpressure = record.PolHp;
model.IsoInjectionpressure = record.IsoHp;
model.PolInjectiontemperature = record.PolTemp;
model.IsoInjectiontemperature = record.IsoTemp;
model.PolInjectionpressure = record.PolHp;
model.StationNumber = record.PourNu;
model.LastTime = record.CreateTime;
model.Createtime = record.CreateTime;
LastShotRecordDataGrid.Insert(0, model);
}));
}
#region 加载DataGrid数据
private async Task LoadData()
{
@ -74,29 +215,33 @@ namespace Aucma.Core.DoorFoam.ViewModels
int i = 1;
var list = await _boxLastShotRecordServices.QueryAsync();
if (list == null) return;
list.OrderByDescending(d => d.CreateTime);
foreach (var item in list.Take(50))
list.OrderByDescending(d => d.CreateTime).Take(30);
foreach (var item in list)
{
string system = string.Empty;
if (item.System == "1") { system = "1系统"; }
if (item.System == "2") { system = "2系统"; }
LastShotRecordDataGrid.Add(new LastShotRecordModel()
LastShotRecordModel model = new LastShotRecordModel();
if (LastShotRecordDataGrid.Count() == 0)
{
model.No = 1;
}
else
{
No = i,
System = system,
GunHead=item.GunCode,
// StationNumber=item.StationNumber,
PolInjectionpressure = item.PolHp,
IsoInjectionpressure = item.IsoHp,
PolInjectiontemperature = item.PolTemp,
IsoInjectiontemperature = item.IsoTemp,
LastTime = item.CreateTime,
Createtime = item.CreateTime
});
i++;
};
// Datalist.Insert(0, Datalist[Datalist.Count - 1]);
// Datalist.RemoveAt(Datalist.Count - 1);
model.No = LastShotRecordDataGrid.Count() + 1;
}
model.No = i;
model.System = system;
model.GunHead = item.GunCode;
model.PolInjectionpressure = item.PolHp;
model.IsoInjectionpressure = item.IsoHp;
model.PolInjectiontemperature = item.PolTemp;
model.IsoInjectiontemperature = item.IsoTemp;
model.LastTime = item.CreateTime;
model.Createtime = item.CreateTime;
model.StationNumber = item.PourNu;
LastShotRecordDataGrid.Insert(0, model);
}
}));
}
@ -228,79 +373,103 @@ namespace Aucma.Core.DoorFoam.ViewModels
get => _temperature1;
set => SetProperty(ref _temperature1, value);
}
/// <summary>
/// A枪状态
/// </summary>
private string _status1;
public string Status1
//private string _status1a;
//public string Status1a
//{
// get => _status1a;
// set => SetProperty(ref _status1a, value);
//}
/// <summary>
/// pol压力
/// </summary>
private string _POLPressure1a = "0.00";
public string POLPressure1a
{
get => _status1;
set => SetProperty(ref _status1, value);
get => _POLPressure1a;
set => SetProperty(ref _POLPressure1a, value);
}
/// <summary>
/// B枪状态
/// A枪POL温度
/// </summary>
private string _status11;
public string Status11
private string _POLTemperature1a = "0.00";
public string POLTemperature1a
{
get => _status11;
set => SetProperty(ref _status11, value);
get => _POLTemperature1a;
set => SetProperty(ref _POLTemperature1a, value);
}
/// <summary>
/// 压力
/// iso压力
/// </summary>
private string _POLPressure1 = "0.00";
public string POLPressure1
private string _ISOPressure1a = "0.00";
public string ISOPressure1a
{
get => _POLPressure1;
set => SetProperty(ref _POLPressure1, value);
get => _ISOPressure1a;
set => SetProperty(ref _ISOPressure1a, value);
}
/// <summary>
/// A枪POL温度
/// iso温度
/// </summary>
private string _POLTemperature1 = "0.00";
public string POLTemperature1
private string _ISOTemperature1a = "0.0";
public string ISOTemperature1a
{
get => _POLTemperature1;
set => SetProperty(ref _POLTemperature1, value);
get => _ISOTemperature1a;
set => SetProperty(ref _ISOTemperature1a, value);
}
/// <summary>
/// B枪POL温度
/// B枪状态
/// </summary>
private string _POLTemperature11 = "0.0";
public string POLTemperature11
//private string _status1b;
//public string Status1b
//{
// get => _status1b;
// set => SetProperty(ref _status1b, value);
//}
/// <summary>
/// B枪pol压力
/// </summary>
private string _POLPressure1b = "0.00";
public string POLPressure1b
{
get => _POLTemperature11;
set => SetProperty(ref _POLTemperature11, value);
get => _POLPressure1b;
set => SetProperty(ref _POLPressure1b, value);
}
/// <summary>
/// 压力
/// B枪POL温度
/// </summary>
private string _ISOPressure1 = "0.00";
public string ISOPressure1
private string _POLTemperature1b = "0.00";
public string POLTemperature1b
{
get => _ISOPressure1;
set => SetProperty(ref _ISOPressure1, value);
get => _POLTemperature1b;
set => SetProperty(ref _POLTemperature1b, value);
}
/// <summary>
/// 压力
/// B枪iso压力
/// </summary>
private string _ISOPressure11 = "0.00";
public string ISOPressure11
private string _ISOPressure1b = "0.00";
public string ISOPressure1b
{
get => _ISOPressure11;
set => SetProperty(ref _ISOPressure11, value);
get => _ISOPressure1b;
set => SetProperty(ref _ISOPressure1b, value);
}
/// <summary>
/// 温度
/// B枪iso温度
/// </summary>
private string _ISOTemperature11 = "0.0";
public string ISOTemperature11
private string _ISOTemperature1b = "0.0";
public string ISOTemperature1b
{
get => _ISOTemperature11;
set => SetProperty(ref _ISOTemperature11, value);
get => _ISOTemperature1b;
set => SetProperty(ref _ISOTemperature1b, value);
}
#endregion
#region 2系统属性
@ -415,100 +584,92 @@ namespace Aucma.Core.DoorFoam.ViewModels
get => _temperature2;
set => SetProperty(ref _temperature2, value);
}
/// <summary>
/// A枪状态
/// </summary>
private string _status2 = "";
public string Status2
{
get => _status2;
set => SetProperty(ref _status2, value);
}
/// <summary>
/// B枪状态
/// A枪POL压力
/// </summary>
private string _status12 = "";
public string Status12
private string _POLPressure2a = "0.00";
public string POLPressure2a
{
get => _status12;
set => SetProperty(ref _status12, value);
get => _POLPressure2a;
set => SetProperty(ref _POLPressure2a, value);
}
/// <summary>
/// 压力
/// A枪POL温度
/// </summary>
private string _POLPressure2 = "0.00";
public string POLPressure2
private string _POLTemperature2a = "0.00";
public string POLTemperature2a
{
get => _POLPressure2;
set => SetProperty(ref _POLPressure2, value);
get => _POLTemperature2a;
set => SetProperty(ref _POLTemperature2a, value);
}
/// <summary>
/// 温度
/// iso压力
/// </summary>
private string _POLTemperature2 = "0.00";
public string POLTemperature2
private string _ISOPressure2a = "0.00";
public string ISOPressure2a
{
get => _POLTemperature2;
set => SetProperty(ref _POLTemperature2, value);
get => _ISOPressure2a;
set => SetProperty(ref _ISOPressure2a, value);
}
/// <summary>
/// A枪压力
/// iso温度
/// </summary>
private string _ISOPressure2 = "0.00";
public string ISOPressure2
private string _ISOTemperature2a = "0.0";
public string ISOTemperature2a
{
get => _ISOPressure2;
set => SetProperty(ref _ISOPressure2, value);
get => _ISOTemperature2a;
set => SetProperty(ref _ISOTemperature2a, value);
}
/// <summary>
///A枪温度
/// B枪状态
/// </summary>
private string _ISOTemperature22 = "0.0";
public string ISOTemperature22
{
get => _ISOTemperature22;
set => SetProperty(ref _ISOTemperature22, value);
}
//private string _status2b;
//public string Status2b
//{
// get => _status2b;
// set => SetProperty(ref _status2b, value);
//}
/// <summary>
/// B枪温度
/// B枪pol压力
/// </summary>
private string _ISOTemperature222 = "0.0";
public string ISOTemperature222
private string _POLPressure2b = "0.00";
public string POLPressure2b
{
get => _ISOTemperature222;
set => SetProperty(ref _ISOTemperature222, value);
get => _POLPressure2b;
set => SetProperty(ref _POLPressure2b, value);
}
/// <summary>
/// B枪温度
/// B枪POL温度
/// </summary>
private string _POLPressure22 = "0.0";
public string POLPressure22
private string _POLTemperature2b = "0.00";
public string POLTemperature2b
{
get => _POLPressure22;
set => SetProperty(ref _POLPressure22, value);
get => _POLTemperature2b;
set => SetProperty(ref _POLTemperature2b, value);
}
/// <summary>
/// B枪ISO温度
/// B枪iso压力
/// </summary>
private string _POLTemperature22 = "0.0";
public string POLTemperature22
private string _ISOPressure2b = "0.00";
public string ISOPressure2b
{
get => _POLTemperature22;
set => SetProperty(ref _POLTemperature22, value);
get => _ISOPressure2b;
set => SetProperty(ref _ISOPressure2b, value);
}
/// <summary>
/// B枪ISO压力
/// B枪iso温度
/// </summary>
private string _ISOPressure22 = "0.0";
public string ISOPressure22
private string _ISOTemperature2b = "0.0";
public string ISOTemperature2b
{
get => _ISOPressure22;
set => SetProperty(ref _ISOPressure22, value);
get => _ISOTemperature2b;
set => SetProperty(ref _ISOTemperature2b, value);
}
#endregion
}
}

@ -32,6 +32,7 @@ namespace Aucma.Core.DoorFoam.ViewModels
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(IndexPageViewModel));
private DoorCollection doorCollection = new DoorCollection();
private CollectionFoamMachine collectionFoam = new CollectionFoamMachine();
public IndexPageViewModel()
{
doorCollection.RefreshDoorFoamMachineEvent += info =>
@ -41,9 +42,15 @@ namespace Aucma.Core.DoorFoam.ViewModels
Task.Run(() =>
{
Thread.Sleep(30000);
Thread.Sleep(1000*10);
doorCollection.startCollect();
});
Task.Run(() =>
{
Thread.Sleep(1000 * 10);
collectionFoam.startCollect();
});
}
#region 获取今天的数据

@ -44,7 +44,7 @@
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
@ -54,7 +54,7 @@
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
@ -147,7 +147,7 @@
<TextBlock Text="输入压力" FontSize="18" Foreground="White"/>
</StackPanel>
<WrapPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POPressure}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding PolInputPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White" />
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
@ -233,7 +233,7 @@
<TextBlock Text="B枪" FontSize="18" FontWeight="Bold" Foreground="White"/>
</Border>
<WrapPanel Grid.Column="0" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="状态" FontSize="18" Foreground="White"/>
<!--<TextBlock Text="状态" FontSize="18" Foreground="White"/>-->
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="{Binding Status1}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
@ -246,11 +246,11 @@
<TextBlock Text="POL压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLPressure1a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLPressure1b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -258,11 +258,11 @@
<TextBlock Text="POL温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature1}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLTemperature1a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature11}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLTemperature1b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -270,27 +270,27 @@
<TextBlock Text="ISO压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOPressure1a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure11}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOPressure1b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="0" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="ISO温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature11}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOTemperature1a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature11}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOTemperature1b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
</Grid>
</Border>
</Grid>
</Grid>
</Border>
</Grid>
</Border>
@ -429,7 +429,7 @@
<TextBlock Text="B枪" FontSize="18" FontWeight="Bold" Foreground="White"/>
</Border>
<WrapPanel Grid.Column="0" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="状态" FontSize="18" Foreground="White"/>
<!--<TextBlock Text="状态" FontSize="18" Foreground="White"/>-->
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding Status2}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="50"/>
@ -441,16 +441,16 @@
<WrapPanel Grid.Column="0" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="POL压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="0" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="POL压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLPressure2a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure22}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLPressure2b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -458,11 +458,11 @@
<TextBlock Text="POL温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature2}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLTemperature2a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature22}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding POLTemperature2b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -470,11 +470,11 @@
<TextBlock Text="ISO压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOPressure2a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure22}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOPressure2b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -482,11 +482,11 @@
<TextBlock Text="ISO温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature22}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOTemperature2a}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature222}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="{Binding ISOTemperature2b}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="200" VerticalAlignment="Center" Block.TextAlignment="Center"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
</Grid>

@ -199,10 +199,10 @@
"PLCServer": [
{
"Id": 1,
"EquipName": "泡前库Plc",
"EquipName": "FoamPlc",
"PlcType": "Siemens",
"Enabled": false,
"IP": "10.10.93.41",
"Enabled": true,
"IP": "10.10.93.180",
"Port": 102
},
{

Loading…
Cancel
Save