Przeglądaj źródła

50L反应釜数据反馈显示添加

reconfiguration
ZhaoGang 2 miesięcy temu
rodzic
commit
3bc33b3b46
10 zmienionych plików z 1098 dodań i 862 usunięć
  1. +6
    -0
      BPASmartClient.Academy/50L/DeviceStatus.cs
  2. +2
    -1
      BPASmartClient.Academy/50L/PlcControl.cs
  3. +2
    -0
      BPASmartClient.Academy/50L/SqliteOperate.cs
  4. +1
    -0
      BPASmartClient.Academy/App.xaml
  5. +16
    -4
      BPASmartClient.Academy/App.xaml.cs
  6. +30
    -0
      BPASmartClient.Academy/Converter/BoolToColorConverter.cs
  7. +8
    -0
      BPASmartClient.Academy/Model/DataFeedback.cs
  8. +1
    -1
      BPASmartClient.Academy/View/DeviceChart50LView.xaml
  9. +1028
    -852
      BPASmartClient.Academy/View/ReactionKettle50LView.xaml
  10. +4
    -4
      BPASmartClient.Academy/View/ReactionKettle50LView.xaml.cs

+ 6
- 0
BPASmartClient.Academy/50L/DeviceStatus.cs Wyświetl plik

@@ -108,6 +108,12 @@ namespace BPASmartClient.Academy._50L
public bool ColdWaterTankVacuumValve { get { return _coldWaterTankVacuumValve; } set { _coldWaterTankVacuumValve = value; OnPropertyChanged(); } }
private bool _coldWaterTankVacuumValve;

/// <summary>
/// 空压机启动反馈 V2002.1
/// </summary>
public bool CompressorRunning { get { return _compressorRunning; } set { _compressorRunning = value; OnPropertyChanged(); } }
private bool _compressorRunning;

/// <summary>
/// 心跳反馈 V2003.7
/// </summary>


+ 2
- 1
BPASmartClient.Academy/50L/PlcControl.cs Wyświetl plik

@@ -42,7 +42,7 @@ namespace BPASmartClient.Academy._50L
TaskManage.GetInstance.StartLong(() =>
{
_readFailureCount = 0;
comm.Read<bool[]>("DB1.DBX2000.0", 17).OnSuccess(s =>
comm.Read<bool[]>("DB1.DBX2000.0", 31).OnSuccess(s =>
{
//Data[FeedbackData.旋转电机启停反馈] = s.Content[0];
//Data[FeedbackData.负压风机启动反馈] = s.Content[1];
@@ -79,6 +79,7 @@ namespace BPASmartClient.Academy._50L

#region V2002
DeviceStatus.ColdWaterTankVacuumValve = s.Content[16];
DeviceStatus.CompressorRunning = s.Content[17];
#endregion
}).OnFailure((s) => { _readFailureCount++; });



+ 2
- 0
BPASmartClient.Academy/50L/SqliteOperate.cs Wyświetl plik

@@ -58,7 +58,9 @@ namespace BPASmartClient.Academy._50L
DataView(DataFeedBacks.CondensateWaterHumidity, new DataValue() { DateTime = time, Value = sampling.CondensateWaterHumidity });
DataView(DataFeedBacks.NegativePressureFlowRate, new DataValue() { DateTime = time, Value = sampling.NegativePressureFlowRate });
DataView(DataFeedBacks.WeighingWaterTankWeight, new DataValue() { DateTime = time, Value = sampling.WeighingWaterTankWeight });
DataView(DataFeedBacks.ReactEncoderValue, new DataValue() { DateTime = time, Value = sampling.ReactEncoderValue });
DataView(DataFeedBacks.ProportionalValveOpening, new DataValue() { DateTime = time, Value = sampling.ProportionalValveOpening });
DataView(DataFeedBacks.BrineTankWeight, new DataValue() { DateTime = time, Value = sampling.BrineTankWeight });
}
private void DataView<T>(ChartValues<T> values, T value)
{


+ 1
- 0
BPASmartClient.Academy/App.xaml Wyświetl plik

@@ -40,6 +40,7 @@
</ResourceDictionary>
<ResourceDictionary>
<convert:DeviceCtrlConvert x:Key="deviceConvert" />
<convert:BoolToColorConverter x:Key="BoolToColorConverter" TrueColor="Green" FalseColor="Red"/>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>



+ 16
- 4
BPASmartClient.Academy/App.xaml.cs Wyświetl plik

@@ -100,12 +100,24 @@ namespace BPASmartClient.Academy
Json<LocaMaterial>.Save();
BPASmartClient.CustomResource.Pages.Model.MessageNotify.GetInstance.LogSave();
TaskManage.GetInstance.Dispose();
if (Simens_PLC.GetInstance.IsConnected)
switch (Json<DevicePar>.Data.ProjectTypeName)
{
Simens_PLC.GetInstance.id = "";
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1002.0", false);
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1002.1", false);
case "HKYF20240916":
if (PlcControl.GetInstance.IsConnect)
{
PlcControl.GetInstance.Write(BoolAddEnum.系统启动, false);
}
break;
default:
if (Simens_PLC.GetInstance.IsConnected)
{
Simens_PLC.GetInstance.id = "";
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1002.0", false);
Simens_PLC.GetInstance.siemens.Write<bool>("DB1.DBX1002.1", false);
}
break;
}
App.Current.Shutdown();
Environment.Exit(0);
//Process.GetCurrentProcess().Kill();


+ 30
- 0
BPASmartClient.Academy/Converter/BoolToColorConverter.cs Wyświetl plik

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace BPASmartClient.Academy.Converter
{
public class BoolToColorConverter:IValueConverter
{
public Brush? TrueColor { get; set; }
public Brush? FalseColor { get; set; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value != null && value is bool tempBool)
{
return tempBool ? TrueColor : FalseColor;
}
return FalseColor;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

+ 8
- 0
BPASmartClient.Academy/Model/DataFeedback.cs Wyświetl plik

@@ -121,8 +121,16 @@ namespace BPASmartClient.Academy.Model
/// </summary>
public ChartValues<DataValue> WeighingWaterTankWeight { get; set; } = new ChartValues<DataValue>();
/// <summary>
/// 反应釜编码器值
/// </summary>
public ChartValues<DataValue> ReactEncoderValue { get; set; } = new ChartValues<DataValue>();
/// <summary>
/// 蒸汽比例阀实际开度
/// </summary>
public ChartValues<DataValue> ProportionalValveOpening { get; set; } = new ChartValues<DataValue>();
/// <summary>
/// 卤水配制罐重量
/// </summary>
public ChartValues<DataValue> BrineTankWeight { get; set; } = new ChartValues<DataValue>();
}
}

+ 1
- 1
BPASmartClient.Academy/View/DeviceChart50LView.xaml Wyświetl plik

@@ -45,7 +45,7 @@
PointGeometry="{x:Null}"
Stroke="Blue"
StrokeThickness="2"
Values="{Binding DataFeedback.TempMaterial}" />
Values="{Binding DataFeedback.Temperature}" />
<lvc:LineSeries
Fill="Transparent"
LineSmoothness="1"


+ 1028
- 852
BPASmartClient.Academy/View/ReactionKettle50LView.xaml
Plik diff jest za duży
Wyświetl plik


+ 4
- 4
BPASmartClient.Academy/View/ReactionKettle50LView.xaml.cs Wyświetl plik

@@ -38,15 +38,15 @@ namespace BPASmartClient.Academy.View
{
if (o)
{
//ooo.Opacity = 1;
//ooo.IsHitTestVisible = true;
ooo.Opacity = 1;
ooo.IsHitTestVisible = true;
state.Visibility = Visibility.Collapsed;
}
else
{

//ooo.Opacity = 0.5;
//ooo.IsHitTestVisible = false;
ooo.Opacity = 0.5;
ooo.IsHitTestVisible = false;
state.Text = "设 备 未 连 接";
//MessageNotify.GetInstance.ShowRunLog("设备未连接");
state.Visibility = Visibility.Visible;


Ładowanie…
Anuluj
Zapisz