设备管理

master
nodyang 2 years ago
parent 021aae2686
commit 0c97c41f7c

@ -989,14 +989,205 @@ namespace Mesnac.Action.ChemicalWeighing
public DataKeyValue FirstWord { get; set; }
public DataKeyValue Spare4 { get; set; }
// public DataKeyValue FirstWord { get; set; }
// public DataKeyValue Spare4 { get; set; }
//
// public DataKeyValue RecipePause { get; set; }
//
// public DataKeyValue recipeName0 { get; set; }
// public DataKeyValue Dryer0_speed { get; set; }
public DataKeyValue RecipePause { get; set; }
/// <summary>
/// 压送秤A气源压力 dbw12
/// </summary>
public DataKeyValue mainPress_V1_LowLimit { get; set; }
public DataKeyValue mainPress_V1_HighLimit { get; set; }
public DataKeyValue mainPress_V1_Alarm { get; set; }
//压送秤A顶部压力 dbw26
public DataKeyValue topPres_V1_LowLimit { get; set; }
public DataKeyValue topPres_V1_HighLimit { get; set; }
public DataKeyValue topPres_V1_Alarm { get; set; }
//压送秤A底部压力 dbw40
public DataKeyValue linePres_V1_LowLimit { get; set; }
public DataKeyValue linePres_V1_HighLimit { get; set; }
public DataKeyValue linePres_V1_Alarm { get; set; }
//压送秤B气源压力 dbw54
public DataKeyValue mainPress_V2_LowLimit { get; set; }
public DataKeyValue mainPress_V2_HighLimit { get; set; }
public DataKeyValue mainPress_V2_Alarm { get; set; }
//压送秤B顶部压力 dbw68
public DataKeyValue topPres_V2_LowLimit { get; set; }
public DataKeyValue topPres_V2_HighLimit { get; set; }
public DataKeyValue topPres_V2_Alarm { get; set; }
//压送秤B底部压力 dbw82
public DataKeyValue linePres_V2_LowLimit { get; set; }
public DataKeyValue linePres_V2_HighLimit { get; set; }
public DataKeyValue linePres_V2_Alarm { get; set; }
//压送秤C气源压力 dbw96
public DataKeyValue mainPress_V3_LowLimit { get; set; }
public DataKeyValue mainPress_V3_HighLimit { get; set; }
public DataKeyValue mainPress_V3_Alarm { get; set; }
//压送秤C顶部压力 dbw110
public DataKeyValue topPres_V3_LowLimit { get; set; }
public DataKeyValue topPres_V3_HighLimit { get; set; }
public DataKeyValue topPres_V3_Alarm { get; set; }
//压送秤C底部压力 dbw124
public DataKeyValue linePres_V3_LowLimit { get; set; }
public DataKeyValue linePres_V3_HighLimit { get; set; }
public DataKeyValue linePres_V3_Alarm { get; set; }
//压送秤C气源压力 dbw138
public DataKeyValue mainPress_V4_LowLimit { get; set; }
public DataKeyValue mainPress_V4_HighLimit { get; set; }
public DataKeyValue mainPress_V4_Alarm { get; set; }
//压送秤C顶部压力 dbw154
public DataKeyValue topPres_V4_LowLimit { get; set; }
public DataKeyValue topPres_V4_HighLimit { get; set; }
public DataKeyValue topPres_V4_Alarm { get; set; }
//压送秤C底部压力 dbw166
public DataKeyValue linePres_V4_LowLimit { get; set; }
public DataKeyValue linePres_V4_HighLimit { get; set; }
public DataKeyValue linePres_V4_Alarm { get; set; }
public DataKeyValue recipeName0 { get; set; }
public DataKeyValue Dryer0_speed { get; set; }
//压送秤C气源压力 dbw180
public DataKeyValue mainPress_V5_LowLimit { get; set; }
public DataKeyValue mainPress_V5_HighLimit { get; set; }
public DataKeyValue mainPress_V5_Alarm { get; set; }
//压送秤C顶部压力 dbw194
public DataKeyValue topPres_V5_LowLimit { get; set; }
public DataKeyValue topPres_V5_HighLimit { get; set; }
public DataKeyValue topPres_V5_Alarm { get; set; }
//压送秤C底部压力 dbw208
public DataKeyValue linePres_V5_LowLimit { get; set; }
public DataKeyValue linePres_V5_HighLimit { get; set; }
public DataKeyValue linePres_V5_Alarm { get; set; }
//日罐压力B1 dbw222
public DataKeyValue presDay_B1_ActualValue { get; set; }
public DataKeyValue presDay_B1_LowLimit { get; set; }
public DataKeyValue presDay_B1_HighLimit { get; set; }
public DataKeyValue presDay_B1_Alarm { get; set; }
//日罐压力B2 dbw236
public DataKeyValue presDay_B2_ActualValue { get; set; }
public DataKeyValue presDay_B2_LowLimit { get; set; }
public DataKeyValue presDay_B2_HighLimit { get; set; }
public DataKeyValue presDay_B2_Alarm { get; set; }
//日罐压力B3 dbw250
public DataKeyValue presDay_B3_ActualValue { get; set; }
public DataKeyValue presDay_B3_LowLimit { get; set; }
public DataKeyValue presDay_B3_HighLimit { get; set; }
public DataKeyValue presDay_B3_Alarm { get; set; }
//日罐压力B4 dbw264
public DataKeyValue presDay_B4_ActualValue { get; set; }
public DataKeyValue presDay_B4_LowLimit { get; set; }
public DataKeyValue presDay_B4_HighLimit { get; set; }
public DataKeyValue presDay_B4_Alarm { get; set; }
//日罐压力B5 dbw278
public DataKeyValue presDay_B5_ActualValue { get; set; }
public DataKeyValue presDay_B5_LowLimit { get; set; }
public DataKeyValue presDay_B5_HighLimit { get; set; }
public DataKeyValue presDay_B5_Alarm { get; set; }
//日罐压力B6 dbw292
public DataKeyValue presDay_B6_ActualValue { get; set; }
public DataKeyValue presDay_B6_LowLimit { get; set; }
public DataKeyValue presDay_B6_HighLimit { get; set; }
public DataKeyValue presDay_B6_Alarm { get; set; }
//日罐压力B7 dbw306
public DataKeyValue presDay_B7_ActualValue { get; set; }
public DataKeyValue presDay_B7_LowLimit { get; set; }
public DataKeyValue presDay_B7_HighLimit { get; set; }
public DataKeyValue presDay_B7_Alarm { get; set; }
//日罐压力B8 dbw320
public DataKeyValue presDay_B8_ActualValue { get; set; }
public DataKeyValue presDay_B8_LowLimit { get; set; }
public DataKeyValue presDay_B8_HighLimit { get; set; }
public DataKeyValue presDay_B8_Alarm { get; set; }
//日罐压力B9 dbw334
public DataKeyValue presDay_B9_ActualValue { get; set; }
public DataKeyValue presDay_B9_LowLimit { get; set; }
public DataKeyValue presDay_B9_HighLimit { get; set; }
public DataKeyValue presDay_B9_Alarm { get; set; }
//日罐压力B10 dbw348
public DataKeyValue presDay_B10_ActualValue { get; set; }
public DataKeyValue presDay_B10_LowLimit { get; set; }
public DataKeyValue presDay_B10_HighLimit { get; set; }
public DataKeyValue presDay_B10_Alarm { get; set; }
//日罐压力B11 dbw362
public DataKeyValue presDay_B11_ActualValue { get; set; }
public DataKeyValue presDay_B11_LowLimit { get; set; }
public DataKeyValue presDay_B11_HighLimit { get; set; }
public DataKeyValue presDay_B11_Alarm { get; set; }
//日罐压力B12 dbw376
public DataKeyValue presDay_B12_ActualValue { get; set; }
public DataKeyValue presDay_B12_LowLimit { get; set; }
public DataKeyValue presDay_B12_HighLimit { get; set; }
public DataKeyValue presDay_B12_Alarm { get; set; }
//管道压力传感器1 dbw390
public DataKeyValue PR2PCP01_B12_ActualValue { get; set; }
public DataKeyValue PR2PCP01_B12_LowLimit { get; set; }
public DataKeyValue PR2PCP01_B12_HighLimit { get; set; }
public DataKeyValue PR2PCP01_B12_Alarm { get; set; }
//管道压力传感器2 dbw404
public DataKeyValue PR2PCP02_B12_ActualValue { get; set; }
public DataKeyValue PR2PCP02_B12_LowLimit { get; set; }
public DataKeyValue PR2PCP02_B12_HighLimit { get; set; }
public DataKeyValue PR2PCP02_B12_Alarm { get; set; }
//管道压力传感器3 dbw418
public DataKeyValue PR2PCP03_B12_ActualValue { get; set; }
public DataKeyValue PR2PCP03_B12_LowLimit { get; set; }
public DataKeyValue PR2PCP03_B12_HighLimit { get; set; }
public DataKeyValue PR2PCP03_B12_Alarm { get; set; }
}
}

@ -12,6 +12,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
public class DownAction:ChemicalWeighingAction, IAction
{
public static event EventHandler OnHandler;
private DbMCControl _materialGridControl = null; //物料列表控件
private RuntimeParameter _runtime;
public void Run(RuntimeParameter runtime)
@ -30,10 +33,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
};
}
private void DoWord()
{
@ -55,6 +54,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
lsView.Add(view);
}
PressurePLC.DownToPlc(lsView);
}
}
}

@ -0,0 +1,159 @@
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
partial class FrmPressureUpdate
{
/// <summary>
/// Required designer variable.
/// </summary>
private IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.HighLimit = new System.Windows.Forms.TextBox();
this.LowLimit = new System.Windows.Forms.TextBox();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.Alarm = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// HighLimit
//
this.HighLimit.Enabled = false;
this.HighLimit.Location = new System.Drawing.Point(194, 176);
this.HighLimit.Margin = new System.Windows.Forms.Padding(5);
this.HighLimit.Name = "HighLimit";
this.HighLimit.Size = new System.Drawing.Size(129, 21);
this.HighLimit.TabIndex = 47;
//
// LowLimit
//
this.LowLimit.Enabled = false;
this.LowLimit.Location = new System.Drawing.Point(194, 125);
this.LowLimit.Margin = new System.Windows.Forms.Padding(5);
this.LowLimit.Name = "LowLimit";
this.LowLimit.Size = new System.Drawing.Size(129, 21);
this.LowLimit.TabIndex = 48;
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(288, 452);
this.btnCancel.Margin = new System.Windows.Forms.Padding(5);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(98, 45);
this.btnCancel.TabIndex = 46;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(115, 452);
this.btnOK.Margin = new System.Windows.Forms.Padding(5);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(98, 45);
this.btnOK.TabIndex = 45;
this.btnOK.Text = "确认";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(113, 176);
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(71, 12);
this.label4.TabIndex = 42;
this.label4.Text = "高压设定值:\r\n";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(113, 125);
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(71, 12);
this.label3.TabIndex = 44;
this.label3.Text = "低压设定值:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(113, 220);
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 12);
this.label1.TabIndex = 43;
this.label1.Text = "超压报警:";
//
// Alarm
//
this.Alarm.FormattingEnabled = true;
this.Alarm.Location = new System.Drawing.Point(194, 217);
this.Alarm.Name = "Alarm";
this.Alarm.Size = new System.Drawing.Size(121, 20);
this.Alarm.TabIndex = 51;
this.Alarm.SelectedIndexChanged += new System.EventHandler(this.Alarm_SelectedIndexChanged);
//
// FrmPressureUpdate
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(498, 571);
this.Controls.Add(this.Alarm);
this.Controls.Add(this.HighLimit);
this.Controls.Add(this.LowLimit);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Name = "FrmPressureUpdate";
this.Text = "需改压力参数";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ComboBox Alarm;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TextBox HighLimit;
private System.Windows.Forms.TextBox LowLimit;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
#endregion
}
}

@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
public partial class FrmPressureUpdate : Form
{
public FrmPressureUpdate()
{
InitializeComponent();
}
private int _id;
public FrmPressureUpdate(int id) : this()
{
_id = id;
IList<MyNameValue> ls = new List<MyNameValue>();
ls.Add(new MyNameValue()
{
Id = 1,Name = "超压",
});
ls.Add(new MyNameValue()
{
Id = 0,Name = "正常",
});
this.Alarm.DataSource = ls;
Alarm.ValueMember = "Id";
Alarm.DisplayMember = "Name";
var pressureSettingViews = PressurePLC.UpdateFromPlc(id);
if (pressureSettingViews.Count == 1)
{
var v = pressureSettingViews.First();
this.LowLimit.Text = v.LowLimit.ToString();
this.HighLimit.Text = v.HighLimit.ToString();
foreach (MyNameValue combo in Alarm.Items)
{
if (combo.Id == v.Alarm)
{
Alarm.SelectedItem = combo;
break;
}
}
}
else
{
MessageBox.Show("获取PLC 异常请联系管理员");
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void Alarm_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void btnOK_Click(object sender, EventArgs e)
{
if (!float.TryParse(LowLimit.Text.Trim(), out float a))
{
LowLimit.Focus();
MessageBox.Show("请输入正确的数值");
return;
}
if (!float.TryParse(HighLimit.Text.Trim(), out float b))
{
HighLimit.Focus();
MessageBox.Show("请输入正确的数值");
return;
}
PressureSettingView view = new PressureSettingView()
{
HighLimit = b,
LowLimit = a,
Alarm = Convert.ToInt16(Alarm.SelectedValue)
};
PressurePLC.DownToPlc(new List<PressureSettingView>()
{
view
});
this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -15,6 +15,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
base.RunIni(runtime); //必须调用
this._runtime = runtime;
UpAction.OnHandler -= Process_Event;
UpAction.OnHandler += Process_Event;
UpdateAction.OnUpdate -= Process_Event;
UpdateAction.OnUpdate += Process_Event;
DbMCControl materialGridControl =
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "pressureSetting")
.FirstOrDefault(); //获取物料数据控件

@ -1,7 +1,917 @@
namespace Mesnac.Action.ChemicalWeighing.LjPressure
using System;
using System.Collections.Generic;
using System.Linq;
using DevExpress.XtraGauges.Core.Model;
using DevExpress.XtraRichEdit.API.Layout;
namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
public class PressurePLC
{
private static BasePlcHelper GetPlcHelper => BasePlcHelper.Instance;
#region 压送秤A气源压力 DBW12 数组Id=1
private static void DownDbw12(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V1_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V1_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.mainPress_V1_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw12()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.mainPress_V1_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.mainPress_V1_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.mainPress_V1_LowLimit.NowValue.ToInt();
return view;
}
#endregion
private static void DownDbw26(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V1_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V1_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.topPres_V1_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw26()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.topPres_V1_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.topPres_V1_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.topPres_V1_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw40(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V1_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V1_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.linePres_V1_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw40()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.linePres_V1_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.linePres_V1_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.linePres_V1_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw54(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V2_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V2_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.mainPress_V2_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw54()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.mainPress_V2_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.mainPress_V2_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.mainPress_V2_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw68(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V2_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V2_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.topPres_V2_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw68()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.topPres_V2_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.topPres_V2_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.topPres_V2_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw82(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V2_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V2_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.linePres_V2_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw82()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.linePres_V2_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.linePres_V2_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.linePres_V2_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw96(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V3_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V3_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.mainPress_V3_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw96()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.mainPress_V3_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.mainPress_V3_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.mainPress_V3_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw110(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V3_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V3_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.topPres_V3_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw110()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView();
view.LowLimit = basePlcHelper.topPres_V3_LowLimit.NowValue.ToFloat();
view.HighLimit = basePlcHelper.topPres_V3_HighLimit.NowValue.ToFloat();
view.Alarm = basePlcHelper.topPres_V3_Alarm.NowValue.ToInt();
return view;
}
private static void DownDbw124(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V3_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V3_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.linePres_V3_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw124()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.linePres_V3_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.linePres_V3_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.linePres_V3_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDbw138(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V4_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V4_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.mainPress_V4_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw138()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.mainPress_V4_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.mainPress_V4_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.mainPress_V4_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDbw152(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V4_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V4_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.topPres_V4_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw152()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.topPres_V4_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.topPres_V4_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.topPres_V4_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDbw166(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V4_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V4_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.linePres_V4_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw166()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.linePres_V4_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.linePres_V4_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.linePres_V4_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDbw180(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V5_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V5_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.mainPress_V5_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw180()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.mainPress_V5_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.mainPress_V5_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.mainPress_V5_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDbw194(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V5_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.topPres_V5_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.topPres_V5_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw194()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.topPres_V5_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.topPres_V5_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.topPres_V5_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDbw208(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V5_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.linePres_V5_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.linePres_V5_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw208()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.linePres_V5_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.linePres_V5_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.linePres_V5_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW222(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B1_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B1_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B1_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw222()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B1_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B1_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B1_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW236(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B2_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B2_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B2_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw236()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B2_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B2_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B2_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW250(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B3_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B3_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B3_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw250()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B3_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B3_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B3_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW264(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B4_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B4_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B4_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw264()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B4_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B4_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B4_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW278(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B5_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B5_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B5_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw278()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B5_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B5_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B5_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW292(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B6_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B6_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B6_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw292()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B6_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B6_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B6_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW306(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B7_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B7_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B7_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw306()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B7_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B7_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B7_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW320(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B8_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B8_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B8_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw320()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B8_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B8_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B8_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW334(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B9_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B9_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B9_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw334()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B9_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B9_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B9_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW348(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B10_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B10_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B10_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw348()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B10_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B10_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B10_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW362(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B11_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B11_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B11_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw362()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B11_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B11_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B11_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW376(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B12_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.presDay_B12_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.presDay_B12_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw376()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.presDay_B12_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.presDay_B12_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.presDay_B12_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW390(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.PR2PCP01_B12_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.PR2PCP01_B12_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.PR2PCP01_B12_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw390()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.PR2PCP01_B12_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.PR2PCP01_B12_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.PR2PCP01_B12_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW404(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.PR2PCP02_B12_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.PR2PCP02_B12_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.PR2PCP02_B12_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw404()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.PR2PCP02_B12_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.PR2PCP02_B12_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.PR2PCP02_B12_Alarm.NowValue.ToInt()
};
return view;
}
private static void DownDBW418(PressureSettingView view)
{
if (view != null)
{
var basePlcHelper = GetPlcHelper;
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.PR2PCP03_B12_LowLimit, view.LowLimit);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.PR2PCP03_B12_HighLimit, view.HighLimit);
basePlcHelper.PlcWriteByDataKey(basePlcHelper.PR2PCP03_B12_Alarm,
new object[] { Convert.ToBoolean(view.Alarm) });
}
}
private static PressureSettingView UpDbw418()
{
var basePlcHelper = GetPlcHelper;
PressureSettingView view = new PressureSettingView
{
LowLimit = basePlcHelper.PR2PCP03_B12_LowLimit.NowValue.ToFloat(),
HighLimit = basePlcHelper.PR2PCP03_B12_HighLimit.NowValue.ToFloat(),
Alarm = basePlcHelper.PR2PCP03_B12_Alarm.NowValue.ToInt()
};
return view;
}
/// <summary>
/// 下发到plc
/// </summary>
/// <param name="ls"></param>
public static void DownToPlc(List<PressureSettingView> ls)
{
foreach (var pressureSettingView in ls)
{
int id = pressureSettingView.Id;
switch (id)
{
case 1:
DownDbw12(pressureSettingView);
break;
case 2:
DownDbw26(pressureSettingView);
break;
case 3:
DownDbw40(pressureSettingView);
break;
case 4:
DownDbw54(pressureSettingView);
break;
case 5:
DownDbw68(pressureSettingView);
break;
case 6:
DownDbw82(pressureSettingView);
break;
case 7:
DownDbw96(pressureSettingView);
break;
case 8:
DownDbw110(pressureSettingView);
break;
case 9:
DownDbw124(pressureSettingView);
break;
case 10:
DownDbw138(pressureSettingView);
break;
case 11:
DownDbw152(pressureSettingView);
break;
case 12:
DownDbw166(pressureSettingView);
break;
case 13:
DownDbw180(pressureSettingView);
break;
case 14:
DownDbw194(pressureSettingView);
break;
case 15:
DownDbw208(pressureSettingView);
break;
case 16:
DownDBW222(pressureSettingView);
break;
case 17:
DownDBW236(pressureSettingView);
break;
case 18:
DownDBW250(pressureSettingView);
break;
case 19:
DownDBW264(pressureSettingView);
break;
case 20:
DownDBW278(pressureSettingView);
break;
case 21:
DownDBW292(pressureSettingView);
break;
case 22:
DownDBW306(pressureSettingView);
break;
case 23:
DownDBW320(pressureSettingView);
break;
case 24:
DownDBW334(pressureSettingView);
break;
case 25:
DownDBW348(pressureSettingView);
break;
case 26:
DownDBW362(pressureSettingView);
break;
case 27:
DownDBW376(pressureSettingView);
break;
case 28:
DownDBW390(pressureSettingView);
break;
case 29:
DownDBW404(pressureSettingView);
break;
case 30:
DownDBW418(pressureSettingView);
break;
}
}
}
/// <summary>
/// 下发到plc
/// </summary>
/// <param name="ls"></param>
public static List<PressureSettingView> UpdateFromPlc(int id=0)
{
List<PressureSettingView> ls = new List<PressureSettingView>
{
UpDbw12(),
UpDbw26(),
UpDbw40(),
UpDbw54(),
UpDbw68(),
UpDbw82(),
UpDbw96(),
UpDbw110(),
UpDbw124(),
UpDbw138(),
UpDbw152(),
UpDbw166(),
UpDbw180(),
UpDbw194(),
UpDbw208(),
UpDbw222(),
UpDbw236(),
UpDbw250(),
UpDbw264(),
UpDbw278(),
UpDbw292(),
UpDbw306(),
UpDbw320(),
UpDbw334(),
UpDbw348(),
UpDbw362(),
UpDbw376(),
UpDbw390(),
UpDbw404(),
UpDbw418()
};
//如果影响效率 单独去一个
if (id > 0)
{
var pressureSettingView = ls.FirstOrDefault(x => x.Id == id);
return new List<PressureSettingView>() { pressureSettingView };
}
return ls;
}
}
}

@ -1,5 +1,8 @@
using System.Linq;
using System;
using System.Linq;
using System.Windows.Forms;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
@ -7,6 +10,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
private DbMCControl _materialGridControl = null; //物料列表控件
private RuntimeParameter _runtime;
public static event EventHandler OnHandler;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须调用
@ -15,8 +20,30 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "pressureSetting")
.FirstOrDefault(); //获取物料数据控件
this._materialGridControl = materialGridControl;
if (MessageBox.Show("确定上传到数据库?","提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information) == DialogResult.OK)
{
DoWord();
};
}
private void DoWord()
{
var pressureSettingViews = PressurePLC.UpdateFromPlc();
foreach (var v in pressureSettingViews)
{
string sql =
$"update PressureSetting set LowLimit={v.LowLimit},HighLimit={v.LowLimit} where Id={v.Id}";
DBHelp.ExecuteNonQuery(sql);
}
if (OnHandler != null)
{
OnHandler(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty);
}
}
}
}

@ -1,4 +1,6 @@
using System.Linq;
using System;
using System.Linq;
using System.Windows.Forms;
using Mesnac.Action.Base;
namespace Mesnac.Action.ChemicalWeighing.LjPressure
@ -7,6 +9,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
private DbMCControl _materialGridControl = null; //物料列表控件
private RuntimeParameter _runtime;
public static event EventHandler OnUpdate;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须调用
@ -15,6 +21,42 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "pressureSetting")
.FirstOrDefault(); //获取物料数据控件
this._materialGridControl = materialGridControl;
DataGridView clientGridView = this._materialGridControl.BaseControl as DataGridView;
//验证是否选中某物料
if (clientGridView.SelectedRows.Count != 1)
{
MessageBox.Show("请选择要修改的数据", Mesnac.Basic.LanguageHelper.Caption,
MessageBoxButtons.OK, MessageBoxIcon.Information);
this._runtime.IsReturn = true;
return;
}
var dataGridViewRow = clientGridView.SelectedRows[0];
var id = Convert.ToInt32(dataGridViewRow.Cells["Id"]);
FrmPressureUpdate frm = new FrmPressureUpdate(id);
DialogResult result = frm.ShowDialog();
this._runtime.BaseControl.MCEnabled = false;
if (result == DialogResult.OK)
{
if (OnUpdate != null)
{
OnUpdate(this._runtime.BaseControl.MCRoot, System.EventArgs.Empty);
}
frm.Dispose();
}
this._runtime.BaseControl.MCEnabled = true;
}
}
}

@ -238,6 +238,12 @@
<Compile Include="LjMaterial\MaterialInfoTypeHelp.cs" />
<Compile Include="LjMaterial\UpdateAction.cs" />
<Compile Include="LjPressure\DownAction.cs" />
<Compile Include="LjPressure\FrmPressureUpdate.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="LjPressure\FrmPressureUpdate.Designer.cs">
<DependentUpon>FrmPressureUpdate.cs</DependentUpon>
</Compile>
<Compile Include="LjPressure\InitDbAction.cs" />
<Compile Include="LjPressure\PressurePLC.cs" />
<Compile Include="LjPressure\PressureSettingView.cs" />
@ -496,6 +502,9 @@
<EmbeddedResource Include="LjMaterial\FrmMaterial.resx">
<DependentUpon>FrmMaterial.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LjPressure\FrmPressureUpdate.resx">
<DependentUpon>FrmPressureUpdate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LjStock\FrmStock.resx">
<DependentUpon>FrmStock.cs</DependentUpon>
</EmbeddedResource>

@ -40,16 +40,16 @@ namespace Mesnac.Action.ChemicalWeighing.Test
//badc1el26587193265870
var instanceDryer0Speed = BasePlcHelper.Instance.Dryer0_speed;
var plcWriteFloatByDataKey = BasePlcHelper.Instance.PlcWriteFloatByDataKey(BasePlcHelper.Instance.Dryer0_speed, 14.55f);
var instanceDryer0Speeds = BasePlcHelper.Instance.Dryer0_speed;
var instanceRecipeName0 = BasePlcHelper.Instance.recipeName0;
//badc1e 2
var read = BasePlcHelper.Instance.PlcRead(instanceRecipeName0, out int[] ss);
// var instanceDryer0Speed = BasePlcHelper.Instance.Dryer0_speed;
//
// var plcWriteFloatByDataKey = BasePlcHelper.Instance.PlcWriteFloatByDataKey(BasePlcHelper.Instance.Dryer0_speed, 14.55f);
//
// var instanceDryer0Speeds = BasePlcHelper.Instance.Dryer0_speed;
//
// var instanceRecipeName0 = BasePlcHelper.Instance.recipeName0;
//
// //badc1e 2
// var read = BasePlcHelper.Instance.PlcRead(instanceRecipeName0, out int[] ss);
// var firstWordNowValue = BasePlcHelper.Instance.FirstWord.NowValue.ToInt();
@ -79,9 +79,9 @@ namespace Mesnac.Action.ChemicalWeighing.Test
//Mesnac.Basic.DataProcessor.ToSiemen sInt32();
var i = BasePlcHelper.Instance.Spare4.NowValue.ToInt();
bool Spare4 = BasePlcHelper.Instance.PlcRead(BasePlcHelper.Instance.Spare4, out int[] spare4s);
// var i = BasePlcHelper.Instance.Spare4.NowValue.ToInt();
// bool Spare4 = BasePlcHelper.Instance.PlcRead(BasePlcHelper.Instance.Spare4, out int[] spare4s);
//
//256 default-bit(11

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save