|
@@ -1,4 +1,5 @@
|
|
|
using Aitex.Core.RT.SCCore;
|
|
|
+using Aitex.Core.Util;
|
|
|
using Caliburn.Micro;
|
|
|
using DocumentFormat.OpenXml.Drawing;
|
|
|
using FurnaceUI.Client.Dialog;
|
|
@@ -9,12 +10,16 @@ using MECF.Framework.UI.Client.CenterViews.Dialogs;
|
|
|
using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
|
|
|
using MECF.Framework.UI.Client.ClientBase;
|
|
|
using OpenSEMI.ClientBase;
|
|
|
+using OxyPlot;
|
|
|
+using OxyPlot.Axes;
|
|
|
+using OxyPlot.Series;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Collections.ObjectModel;
|
|
|
using System.Globalization;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
+using System.Threading;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
@@ -113,6 +118,28 @@ namespace FurnaceUI.Views.Parameter
|
|
|
private string path;
|
|
|
private string currentValue;
|
|
|
private ObservableCollection<PageValue> valueList { get; set; } = new ObservableCollection<PageValue>();
|
|
|
+
|
|
|
+ private PlotModel o2Model;
|
|
|
+
|
|
|
+ public PlotModel O2Model
|
|
|
+ {
|
|
|
+ get { return o2Model; }
|
|
|
+ set { o2Model = value; NotifyOfPropertyChange("O2Model"); }
|
|
|
+ }
|
|
|
+ private PlotModel n2Model;
|
|
|
+
|
|
|
+ public PlotModel N2Model
|
|
|
+ {
|
|
|
+ get { return n2Model; }
|
|
|
+ set { n2Model = value; NotifyOfPropertyChange("N2Model"); }
|
|
|
+ }
|
|
|
+
|
|
|
+ [Subscription("PM1.ConcentrationO2.Value")]
|
|
|
+ public double ConcentrationO2Value { get; set; }
|
|
|
+ [Subscription("PM1.MFC51.Feedback")]
|
|
|
+ public double MFC51Feedback { get; set; }
|
|
|
+ [Subscription("PM1.MFM57.Feedback")]
|
|
|
+ public double MFM57Feedback { get; set; }
|
|
|
protected override void OnInitialize()
|
|
|
{
|
|
|
base.OnInitialize();
|
|
@@ -126,9 +153,84 @@ namespace FurnaceUI.Views.Parameter
|
|
|
{
|
|
|
base.OnActivate();
|
|
|
DefaultUnit = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.APC.PressureUnit");
|
|
|
+ GetO2ModelSpline();
|
|
|
+ GetN2ModelSpline();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void GetO2ModelSpline()
|
|
|
+ {
|
|
|
+ var tmp = new PlotModel { };
|
|
|
+
|
|
|
+ tmp.Axes.Add(new DateTimeAxis()
|
|
|
+ {
|
|
|
+ StringFormat = "HH:mm:ss",
|
|
|
+ IsZoomEnabled = false,
|
|
|
+ IsPanEnabled = false,
|
|
|
+ IntervalType = DateTimeIntervalType.Seconds
|
|
|
+ });
|
|
|
+
|
|
|
+ tmp.Series.Add(new LineSeries
|
|
|
+ {
|
|
|
+ Color = OxyColors.Blue,
|
|
|
+ MarkerType = MarkerType.Circle,
|
|
|
+ InterpolationAlgorithm = InterpolationAlgorithms.CanonicalSpline
|
|
|
+ });
|
|
|
+ this.O2Model = tmp;
|
|
|
+ Task.Run(() =>
|
|
|
+ {
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ var date = DateTime.Now;
|
|
|
+ tmp.Axes[0].Maximum = DateTimeAxis.ToDouble(date.AddSeconds(1));
|
|
|
+ var lineSer = this.O2Model.Series[0] as LineSeries;
|
|
|
+
|
|
|
+ lineSer.Points.Add(new OxyPlot.DataPoint(DateTimeAxis.ToDouble(date), ConcentrationO2Value));
|
|
|
+ if (lineSer.Points.Count > 30)
|
|
|
+ {
|
|
|
+ lineSer.Points.RemoveAt(0);
|
|
|
+ }
|
|
|
+ tmp.InvalidatePlot(true);
|
|
|
+ Thread.Sleep(1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+ public void GetN2ModelSpline()
|
|
|
+ {
|
|
|
+ var tmp = new PlotModel { };
|
|
|
|
|
|
-
|
|
|
+ tmp.Axes.Add(new DateTimeAxis()
|
|
|
+ {
|
|
|
+ StringFormat = "HH:mm:ss",
|
|
|
+ IsZoomEnabled = false,
|
|
|
+ IsPanEnabled = false,
|
|
|
+ IntervalType = DateTimeIntervalType.Seconds
|
|
|
+ });
|
|
|
+
|
|
|
+ tmp.Series.Add(new LineSeries
|
|
|
+ {
|
|
|
+ Color = OxyColors.Blue,
|
|
|
+ MarkerType = MarkerType.Circle,
|
|
|
+ InterpolationAlgorithm = InterpolationAlgorithms.CanonicalSpline
|
|
|
+ });
|
|
|
+ this.N2Model = tmp;
|
|
|
+ Task.Run(() =>
|
|
|
+ {
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ var date = DateTime.Now;
|
|
|
+ tmp.Axes[0].Maximum = DateTimeAxis.ToDouble(date.AddSeconds(1));
|
|
|
+ var lineSer = this.N2Model.Series[0] as LineSeries;
|
|
|
+ var pointValue = MFC51Feedback + MFM57Feedback;
|
|
|
+ lineSer.Points.Add(new OxyPlot.DataPoint(DateTimeAxis.ToDouble(date), pointValue));
|
|
|
+ if (lineSer.Points.Count > 30)
|
|
|
+ {
|
|
|
+ lineSer.Points.RemoveAt(0);
|
|
|
+ }
|
|
|
+ tmp.InvalidatePlot(true);
|
|
|
+ Thread.Sleep(1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
private void InitTree()
|
|
|
{
|
|
|
var node = SystemConfigProvider.Instance.GetConfigTree(SystemName).SubNodes;
|
|
@@ -188,7 +290,7 @@ namespace FurnaceUI.Views.Parameter
|
|
|
}
|
|
|
public void HideAllCanvas()
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
public void TreeViewSelectedItemChanged(object obj)
|
|
|
{
|
|
@@ -201,7 +303,7 @@ namespace FurnaceUI.Views.Parameter
|
|
|
Canvas canvas = null;
|
|
|
LevelOneNode = FindNodeByName(_rootNode, $"{strHeader}.{para.ConfigName}");
|
|
|
LevelTwoNode = LevelOneNode.SubNodes.FirstOrDefault();
|
|
|
-
|
|
|
+
|
|
|
if (canvas == null) return;
|
|
|
canvas.Visibility = Visibility.Visible;
|
|
|
|
|
@@ -501,7 +603,7 @@ namespace FurnaceUI.Views.Parameter
|
|
|
NotifyOfPropertyChange("TransferRoomVisibleBackGround");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|