add - 阀门控制调试

master
wangsr 1 year ago
parent 33807824bd
commit da6ba6e358

@ -118,11 +118,12 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.Alarm);
this.groupBox3.Controls.Add(this.Running);
this.groupBox3.Controls.Add(this.AlarmReset);
this.groupBox3.Location = new System.Drawing.Point(204, 12);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(113, 98);
this.groupBox3.Size = new System.Drawing.Size(113, 142);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "其他控制";
@ -149,7 +150,7 @@
//
// Run
//
this.Run.Location = new System.Drawing.Point(204, 116);
this.Run.Location = new System.Drawing.Point(204, 160);
this.Run.Name = "Run";
this.Run.Size = new System.Drawing.Size(113, 38);
this.Run.TabIndex = 2;
@ -174,15 +175,15 @@
"磨粉皮带反转电机"});
this.DMChange.Location = new System.Drawing.Point(12, 160);
this.DMChange.Name = "DMChange";
this.DMChange.Size = new System.Drawing.Size(225, 148);
this.DMChange.Size = new System.Drawing.Size(186, 148);
this.DMChange.TabIndex = 4;
this.DMChange.SelectedIndexChanged += new System.EventHandler(this.DMChange_SelectedIndexChanged);
//
// Alarm
//
this.Alarm.Location = new System.Drawing.Point(243, 160);
this.Alarm.Location = new System.Drawing.Point(6, 96);
this.Alarm.Name = "Alarm";
this.Alarm.Size = new System.Drawing.Size(74, 39);
this.Alarm.Size = new System.Drawing.Size(100, 40);
this.Alarm.TabIndex = 5;
this.Alarm.Text = "报警";
this.Alarm.UseVisualStyleBackColor = true;
@ -193,7 +194,6 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(330, 317);
this.Controls.Add(this.Alarm);
this.Controls.Add(this.DMChange);
this.Controls.Add(this.Run);
this.Controls.Add(this.groupBox3);

@ -33,6 +33,9 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
}
/// <summary>
/// 状态监测类
/// </summary>
private void StateMonitor()
{
ManualModeIsOpen = GetDataToInt("_ManualMode");
@ -70,21 +73,41 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
}
}
/// <summary>
/// 根据属性名和现在选择的数据块名得到PLC数据块的具体引用
/// </summary>
/// <param name="dmValue">数据块属性名</param>
/// <returns></returns>
private DataKeyValue GetDataNameValue(string dmValue)
{
return new DataKeyValue(DmName + dmValue);
}
/// <summary>
/// 从PLC中读取值
/// </summary>
/// <param name="dmValue">要读取的属性</param>
/// <returns></returns>
private int GetDataToInt(String dmValue)
{
return GetDataNameValue(dmValue).NowValue.ToInt();
}
/// <summary>
/// 向PLC中写入值
/// </summary>
/// <param name="dmValue">要写入的属性</param>
/// <param name="value">写入的值</param>
private void SetDataValue(String dmValue, int value)
{
Plc.PlcWriteByDataKey(GetDataNameValue(dmValue), new Object[] { value });
}
/// <summary>
/// 列表框,选择设备对应数据块
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DMChange_SelectedIndexChanged(object sender, EventArgs e)
{
switch (DMChange.Text)
@ -124,6 +147,11 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
ICSharpCode.Core.LoggingService<ElectronicMachinery>.Debug(DMChange.Text + "电机切换成功!");
}
/// <summary>
/// 模式切换
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ManualMode_Click(object sender, EventArgs e)
{
if(ManualModeIsOpen == 0)
@ -164,6 +192,11 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
}
}
/// <summary>
/// 模式开关切换
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnOffControl_Click(object sender, EventArgs e)
{
if (ManualModeIsOpen == 0)
@ -206,6 +239,11 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
}
}
/// <summary>
/// 报警灯重置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void AlarmReset_Click(object sender, EventArgs e)
{
SetDataValue("_Alarm", 0);
@ -213,16 +251,31 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Red, DoUtils.enumInfo.DOOnOff.Off);
}
/// <summary>
/// 运行监测
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Running_Click(object sender, EventArgs e)
{
SetDataValue("_Running", 1);
}
/// <summary>
/// 运行
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Run_Click(object sender, EventArgs e)
{
SetDataValue("_Run", 1);
}
/// <summary>
/// 报警
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Alarm_Click(object sender, EventArgs e)
{
SetDataValue("_Alarm", 1);
@ -230,6 +283,11 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMach
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Green, DoUtils.enumInfo.DOOnOff.Off);
}
/// <summary>
/// 窗口关闭 重置报警灯
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ElectronicMachinery_FormClosing(object sender, FormClosingEventArgs e)
{
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Green, DoUtils.enumInfo.DOOnOff.Off);

@ -0,0 +1,284 @@
namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ValveStateControl
{
partial class ValveStateControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.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.modeCutGroup = new System.Windows.Forms.GroupBox();
this.ControlMode = new System.Windows.Forms.Button();
this.NowIs = new System.Windows.Forms.Label();
this.ModeStateLable = new System.Windows.Forms.Label();
this.onOffControlGroup = new System.Windows.Forms.GroupBox();
this.OnOffLable = new System.Windows.Forms.Label();
this.OnOffControl = new System.Windows.Forms.Button();
this.otherGroup = new System.Windows.Forms.GroupBox();
this.Alarm = new System.Windows.Forms.Button();
this.AlarmSet = new System.Windows.Forms.Button();
this.Set = new System.Windows.Forms.Button();
this.DmChange = new System.Windows.Forms.ListBox();
this.modeCutGroup.SuspendLayout();
this.onOffControlGroup.SuspendLayout();
this.otherGroup.SuspendLayout();
this.SuspendLayout();
//
// modeCutGroup
//
this.modeCutGroup.Controls.Add(this.ControlMode);
this.modeCutGroup.Controls.Add(this.NowIs);
this.modeCutGroup.Controls.Add(this.ModeStateLable);
this.modeCutGroup.Location = new System.Drawing.Point(12, 12);
this.modeCutGroup.Name = "modeCutGroup";
this.modeCutGroup.Size = new System.Drawing.Size(234, 70);
this.modeCutGroup.TabIndex = 0;
this.modeCutGroup.TabStop = false;
this.modeCutGroup.Text = "模式切换";
//
// ControlMode
//
this.ControlMode.Location = new System.Drawing.Point(6, 20);
this.ControlMode.Name = "ControlMode";
this.ControlMode.Size = new System.Drawing.Size(99, 44);
this.ControlMode.TabIndex = 4;
this.ControlMode.Text = "切换自动模式";
this.ControlMode.UseVisualStyleBackColor = true;
this.ControlMode.Click += new System.EventHandler(this.ControlMode_Click);
//
// NowIs
//
this.NowIs.AutoSize = true;
this.NowIs.Location = new System.Drawing.Point(111, 17);
this.NowIs.Name = "NowIs";
this.NowIs.Size = new System.Drawing.Size(41, 12);
this.NowIs.TabIndex = 6;
this.NowIs.Text = "现在为";
//
// ModeStateLable
//
this.ModeStateLable.AutoSize = true;
this.ModeStateLable.Location = new System.Drawing.Point(111, 36);
this.ModeStateLable.Name = "ModeStateLable";
this.ModeStateLable.Size = new System.Drawing.Size(53, 12);
this.ModeStateLable.TabIndex = 7;
this.ModeStateLable.Text = "手动模式";
//
// onOffControlGroup
//
this.onOffControlGroup.Controls.Add(this.OnOffLable);
this.onOffControlGroup.Controls.Add(this.OnOffControl);
this.onOffControlGroup.Location = new System.Drawing.Point(12, 88);
this.onOffControlGroup.Name = "onOffControlGroup";
this.onOffControlGroup.Size = new System.Drawing.Size(234, 70);
this.onOffControlGroup.TabIndex = 1;
this.onOffControlGroup.TabStop = false;
this.onOffControlGroup.Text = "启停控制";
//
// OnOffLable
//
this.OnOffLable.AutoSize = true;
this.OnOffLable.Location = new System.Drawing.Point(111, 36);
this.OnOffLable.Name = "OnOffLable";
this.OnOffLable.Size = new System.Drawing.Size(53, 12);
this.OnOffLable.TabIndex = 8;
this.OnOffLable.Text = "状态:关";
//
// OnOffControl
//
this.OnOffControl.Location = new System.Drawing.Point(6, 20);
this.OnOffControl.Name = "OnOffControl";
this.OnOffControl.Size = new System.Drawing.Size(99, 44);
this.OnOffControl.TabIndex = 5;
this.OnOffControl.Text = "启动";
this.OnOffControl.UseVisualStyleBackColor = true;
this.OnOffControl.Click += new System.EventHandler(this.OnOffControl_Click);
//
// otherGroup
//
this.otherGroup.Controls.Add(this.Alarm);
this.otherGroup.Controls.Add(this.AlarmSet);
this.otherGroup.Controls.Add(this.Set);
this.otherGroup.Location = new System.Drawing.Point(252, 12);
this.otherGroup.Name = "otherGroup";
this.otherGroup.Size = new System.Drawing.Size(118, 166);
this.otherGroup.TabIndex = 2;
this.otherGroup.TabStop = false;
this.otherGroup.Text = "其他控制";
//
// Alarm
//
this.Alarm.Location = new System.Drawing.Point(6, 20);
this.Alarm.Name = "Alarm";
this.Alarm.Size = new System.Drawing.Size(106, 42);
this.Alarm.TabIndex = 2;
this.Alarm.Text = "故障指示";
this.Alarm.UseVisualStyleBackColor = true;
this.Alarm.Click += new System.EventHandler(this.Alarm_Click);
//
// AlarmSet
//
this.AlarmSet.Location = new System.Drawing.Point(6, 68);
this.AlarmSet.Name = "AlarmSet";
this.AlarmSet.Size = new System.Drawing.Size(106, 42);
this.AlarmSet.TabIndex = 0;
this.AlarmSet.Text = "报警复位";
this.AlarmSet.UseVisualStyleBackColor = true;
this.AlarmSet.Click += new System.EventHandler(this.AlarmSet_Click);
//
// Set
//
this.Set.Location = new System.Drawing.Point(6, 116);
this.Set.Name = "Set";
this.Set.Size = new System.Drawing.Size(106, 42);
this.Set.TabIndex = 1;
this.Set.Text = "输出指令";
this.Set.UseVisualStyleBackColor = true;
this.Set.Click += new System.EventHandler(this.Set_Click);
//
// DmChange
//
this.DmChange.FormattingEnabled = true;
this.DmChange.ItemHeight = 12;
this.DmChange.Items.AddRange(new object[] {
"输送线C1号压送罐出料蝶阀电磁阀",
"输送线C2号压送罐出料蝶阀电磁阀",
"输送线A1号压送罐进料蝶阀电磁阀",
"输送线A1号压送罐返气蝶阀电磁阀",
"输送线A2号压送罐进料蝶阀电磁阀",
"输送线A2号压送罐返气蝶阀电磁阀",
"输送线B1号压送罐进料蝶阀电磁阀",
"输送线B1号压送罐返气蝶阀电磁阀",
"输送线B2号压送罐进料蝶阀电磁阀",
"输送线B2号压送罐返气蝶阀电磁阀",
"输送线C1号压送罐进料蝶阀电磁阀",
"输送线C1号压送罐返气蝶阀电磁阀",
"输送线C2号压送罐进料蝶阀电磁阀",
"输送线C2号压送罐返气蝶阀电磁阀",
"输送线A1号压送罐出料蝶阀电磁阀",
"输送线A2号压送罐出料蝶阀电磁阀",
"输送线B1号压送罐出料蝶阀电磁阀",
"输送线B2号压送罐出料蝶阀电磁阀",
"输送线A1号压送罐充气角座阀",
"输送线A2号压送罐充气角座阀",
"输送线A清扫角座阀",
"输送线A1号压送罐流态化角座阀",
"输送线A2号压送罐流态化角座阀",
"输送线A压送罐出料主管角座阀",
"输送线A压送罐出料辅管角座阀",
"输送线B1号压送罐充气角座阀",
"输送线B2号压送罐充气角座阀",
"输送线B清扫角座阀",
"输送线B1号压送罐流态化角座阀",
"输送线B2号压送罐流态化角座阀",
"输送线B压送罐出料主管角座阀",
"输送线B压送罐出料辅管角座阀",
"输送线C1号压送罐充气角座阀",
"输送线C2号压送罐充气角座阀",
"输送线C清扫角座阀",
"输送线C1号压送罐流态化角座阀",
"输送线C2号压送罐流态化角座阀",
"输送线C压送罐出料主管角座阀",
"输送线C压送罐出料辅管角座阀",
"输送线A辅管角座阀",
"输送线B辅管角座阀",
"输送线C辅管角座阀",
"大仓A外喷淋阀门",
"大仓B外喷淋阀门",
"大仓C外喷淋阀门",
"大仓D外喷淋阀门",
"大仓E外喷淋阀门",
"大仓F外喷淋阀门",
"大仓G外喷淋阀门",
"大仓H外喷淋阀门",
"大仓I外喷淋阀门",
"大仓J外喷淋阀门",
"大仓O外喷淋阀门",
"输送线A滚筒筛分机侧吹阀",
"输送线A滚筒筛分机振动阀",
"输送线B滚筒筛分机侧吹阀",
"输送线B滚筒筛分机振动阀",
"输送线C滚筒筛分机侧吹阀",
"输送线C滚筒筛分机振动阀",
"二级除尘器侧吹脉冲阀1",
"二级除尘器侧吹脉冲阀2",
"分配阀1直通电磁阀",
"分配阀2直通电磁阀",
"分配阀3直通电磁阀",
"分配阀4直通电磁阀",
"分配阀5直通电磁阀",
"分配阀6直通电磁阀",
"分配阀7直通电磁阀",
"分配阀8直通电磁阀",
"分配阀9直通电磁阀",
"分配阀10直通电磁阀",
"分配阀11直通电磁阀",
"分配阀12直通电磁阀",
"分配阀13直通电磁阀",
"分配阀14直通电磁阀",
"分配阀15直通电磁阀",
"磨粉系统旋转阀气密封电磁阀"});
this.DmChange.Location = new System.Drawing.Point(12, 164);
this.DmChange.Name = "DmChange";
this.DmChange.Size = new System.Drawing.Size(234, 172);
this.DmChange.TabIndex = 3;
this.DmChange.SelectedIndexChanged += new System.EventHandler(this.DmChange_SelectedIndexChanged);
//
// ValveStateControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(382, 348);
this.Controls.Add(this.DmChange);
this.Controls.Add(this.otherGroup);
this.Controls.Add(this.onOffControlGroup);
this.Controls.Add(this.modeCutGroup);
this.Name = "ValveStateControl";
this.Text = "阀门控制";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ValveStateControl_FormClosing);
this.modeCutGroup.ResumeLayout(false);
this.modeCutGroup.PerformLayout();
this.onOffControlGroup.ResumeLayout(false);
this.onOffControlGroup.PerformLayout();
this.otherGroup.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox modeCutGroup;
private System.Windows.Forms.GroupBox onOffControlGroup;
private System.Windows.Forms.GroupBox otherGroup;
private System.Windows.Forms.ListBox DmChange;
private System.Windows.Forms.Button ControlMode;
private System.Windows.Forms.Button OnOffControl;
private System.Windows.Forms.Label NowIs;
private System.Windows.Forms.Label ModeStateLable;
private System.Windows.Forms.Label OnOffLable;
private System.Windows.Forms.Button Alarm;
private System.Windows.Forms.Button Set;
private System.Windows.Forms.Button AlarmSet;
}
}

@ -0,0 +1,321 @@
using Mesnac.Action.ChemicalWeighing.Entity;
using Mesnac.PlcUtils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesnac.DoUtils;
namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ValveStateControl
{
public partial class ValveStateControl : Form
{
BasePlcHelper Plc = BasePlcHelper.Instance;
string DmName = "BU3DBT06";
int ManualModeIsOpen;
int ManualModeIsStart;
int AutoModeIsStart;
public ValveStateControl()
{
InitializeComponent();
DoControl AlarmLight = DoControl.Instance;
DoControl.Instance.ComOn();
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Green, DoUtils.enumInfo.DOOnOff.On);
StateMonitor();
}
/// <summary>
/// 状态监测类
/// </summary>
private void StateMonitor()
{
ManualModeIsOpen = GetDataToInt("_ManualMode");
ManualModeIsStart = GetDataToInt("_SetManual");
AutoModeIsStart = GetDataToInt("_SetAuto");
if (ManualModeIsOpen == 0)
{
ControlMode.Text = "切换手动模式";
ModeStateLable.Text = "自动模式";
if (AutoModeIsStart == 0)
{
OnOffControl.Text = "启动";
OnOffLable.Text = "状态:关";
}
else
{
OnOffControl.Text = "关闭";
OnOffLable.Text = "状态:开";
}
}
else
{
ControlMode.Text = "切换自动模式";
ModeStateLable.Text = "手动模式";
if (ManualModeIsStart == 0)
{
OnOffControl.Text = "启动";
OnOffLable.Text = "状态:关";
}
else
{
OnOffControl.Text = "关闭";
OnOffLable.Text = "状态:开";
}
}
}
/// <summary>
/// 根据属性名和现在选择的数据块名得到PLC数据块的具体引用
/// </summary>
/// <param name="dmValue">数据块属性名</param>
/// <returns></returns>
private DataKeyValue GetDataNameValue(string dmValue)
{
return new DataKeyValue(DmName + dmValue);
}
/// <summary>
/// 从PLC中读取值
/// </summary>
/// <param name="dmValue">要读取的属性</param>
/// <returns></returns>
private int GetDataToInt(String dmValue)
{
return GetDataNameValue(dmValue).NowValue.ToInt();
}
/// <summary>
/// 向PLC中写入值
/// </summary>
/// <param name="dmValue">要写入的属性</param>
/// <param name="value">写入的值</param>
private void SetDataValue(String dmValue, int value)
{
Plc.PlcWriteByDataKey(GetDataNameValue(dmValue), new Object[] { value });
}
/// <summary>
/// 列表框,选择设备对应数据块
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DmChange_SelectedIndexChanged(object sender, EventArgs e)
{
DmName = dmNameValue[DmChange.Text];
StateMonitor();
}
private void ControlMode_Click(object sender, EventArgs e)
{
if (ManualModeIsOpen == 0)
{
SetDataValue("_ManualMode", 1);
SetDataValue("_AutoMode", 0);
ControlMode.Text = "切换自动模式";
ModeStateLable.Text = "手动模式";
ManualModeIsOpen = 1;
if (ManualModeIsStart == 0)
{
OnOffControl.Text = "启动";
OnOffLable.Text = "状态:关";
}
else
{
OnOffControl.Text = "关闭";
OnOffLable.Text = "状态:开";
}
}
else
{
SetDataValue("_ManualMode", 0);
SetDataValue("_AutoMode", 1);
ControlMode.Text = "切换手动模式";
ModeStateLable.Text = "自动模式";
ManualModeIsOpen = 0;
if (AutoModeIsStart == 0)
{
OnOffControl.Text = "启动";
OnOffLable.Text = "状态:关";
}
else
{
OnOffControl.Text = "关闭";
OnOffLable.Text = "状态:开";
}
}
}
private void OnOffControl_Click(object sender, EventArgs e)
{
if (ManualModeIsOpen == 0)
{
if (AutoModeIsStart == 0)
{
SetDataValue("_SetAuto", 1);
OnOffControl.Text = "关闭";
OnOffLable.Text = "状态:开";
AutoModeIsStart = 1;
}
else
{
SetDataValue("_SetAuto", 0);
OnOffControl.Text = "启动";
OnOffLable.Text = "状态:关";
AutoModeIsStart = 0;
}
}
else
{
if (ManualModeIsStart == 0)
{
SetDataValue("_SetManual", 1);
OnOffControl.Text = "关闭";
OnOffLable.Text = "状态:开";
ManualModeIsStart = 1;
}
else
{
SetDataValue("_SetManual", 0);
OnOffControl.Text = "启动";
OnOffLable.Text = "状态:关";
ManualModeIsStart = 0;
}
}
}
/// <summary>
/// 报警
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Alarm_Click(object sender, EventArgs e)
{
SetDataValue("_Alarm", 1);
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Red, DoUtils.enumInfo.DOOnOff.On);
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Green, DoUtils.enumInfo.DOOnOff.Off);
}
/// <summary>
/// 报警灯重置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void AlarmSet_Click(object sender, EventArgs e)
{
SetDataValue("_Alarm", 0);
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Green, DoUtils.enumInfo.DOOnOff.On);
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Red, DoUtils.enumInfo.DOOnOff.Off);
}
/// <summary>
/// 输出指令
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Set_Click(object sender, EventArgs e)
{
SetDataValue("_Set", 1);
}
/// <summary>
/// 窗口关闭 重置报警灯
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ValveStateControl_FormClosing(object sender, FormClosingEventArgs e)
{
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Green, DoUtils.enumInfo.DOOnOff.Off);
DoControl.Instance.DOControl(DoUtils.enumInfo.DOName.Red, DoUtils.enumInfo.DOOnOff.Off);
DoControl.Instance.ComOff();
}
private IDictionary<string, string> dmNameValue = new Dictionary<string, string>()
{
["输送线C1号压送罐出料蝶阀电磁阀"] = "BU3DBT06",
["输送线C2号压送罐出料蝶阀电磁阀"] = "BU3DBT07",
["输送线A1号压送罐进料蝶阀电磁阀"] = "BU1DBT01",
["输送线A1号压送罐返气蝶阀电磁阀"] = "BU1DBT03",
["输送线A2号压送罐进料蝶阀电磁阀"] = "BU1DBT02",
["输送线A2号压送罐返气蝶阀电磁阀"] = "BU1DBT04",
["输送线B1号压送罐进料蝶阀电磁阀"] = "BU2DBT01",
["输送线B1号压送罐返气蝶阀电磁阀"] = "BU2DBT03",
["输送线B2号压送罐进料蝶阀电磁阀"] = "BU2DBT02",
["输送线B2号压送罐返气蝶阀电磁阀"] = "BU2DBT04",
["输送线C1号压送罐进料蝶阀电磁阀"] = "BU3DBT01",
["输送线C1号压送罐返气蝶阀电磁阀"] = "BU3DBT03",
["输送线C2号压送罐进料蝶阀电磁阀"] = "BU3DBT02",
["输送线C2号压送罐返气蝶阀电磁阀"] = "BU3DBT04",
["输送线A1号压送罐出料蝶阀电磁阀"] = "BU1DBT06",
["输送线A2号压送罐出料蝶阀电磁阀"] = "BU1DBT07",
["输送线B1号压送罐出料蝶阀电磁阀"] = "BU2DBT06",
["输送线B2号压送罐出料蝶阀电磁阀"] = "BU2DBT07",
["输送线A1号压送罐充气角座阀"] = "AS1DBT01",
["输送线A2号压送罐充气角座阀"] = "AS1DBT02",
["输送线A清扫角座阀"] = "AS1DBT03",
["输送线A1号压送罐流态化角座阀"] = "AS1DBT04",
["输送线A2号压送罐流态化角座阀"] = "AS1DBT05",
["输送线A压送罐出料主管角座阀"] = "AS1DBT06",
["输送线A压送罐出料辅管角座阀"] = "AS1DBT07",
["输送线B1号压送罐充气角座阀"] = "AS2DBT01",
["输送线B2号压送罐充气角座阀"] = "AS2DBT02",
["输送线B清扫角座阀"] = "AS2DBT03",
["输送线B1号压送罐流态化角座阀"] = "AS2DBT04",
["输送线B2号压送罐流态化角座阀"] = "AS2DBT05",
["输送线B压送罐出料主管角座阀"] = "AS2DBT06",
["输送线B压送罐出料辅管角座阀"] = "AS2DBT07",
["输送线C1号压送罐充气角座阀"] = "AS3DBT01",
["输送线C2号压送罐充气角座阀"] = "AS3DBT02",
["输送线C清扫角座阀"] = "AS3DBT03",
["输送线C1号压送罐流态化角座阀"] = "AS3DBT04",
["输送线C2号压送罐流态化角座阀"] = "AS3DBT05",
["输送线C压送罐出料主管角座阀"] = "AS3DBT06",
["输送线C压送罐出料辅管角座阀"] = "AS3DBT07",
["输送线A辅管角座阀"] = "AS1PCP01",
["输送线B辅管角座阀"] = "AS1PCP02",
["输送线C辅管角座阀"] = "AS1PCP03",
["大仓A外喷淋阀门"] = "AS1ASI01",
["大仓B外喷淋阀门"] = "AS1BSI01",
["大仓C外喷淋阀门"] = "AS1CSI01",
["大仓D外喷淋阀门"] = "AS1DSI01",
["大仓E外喷淋阀门"] = "AS1ESI01",
["大仓F外喷淋阀门"] = "AS1FSI01",
["大仓G外喷淋阀门"] = "AS1GSI01",
["大仓H外喷淋阀门"] = "AS1HSI01",
["大仓I外喷淋阀门"] = "AS1ISI01",
["大仓J外喷淋阀门"] = "AS1JSI01",
["大仓O外喷淋阀门"] = "AS1OSI01",
["输送线A滚筒筛分机侧吹阀"] = "SV1DSM01",
["输送线A滚筒筛分机振动阀"] = "SV1DSM02",
["输送线B滚筒筛分机侧吹阀"] = "SV2DSM01",
["输送线B滚筒筛分机振动阀"] = "SV2DSM02",
["输送线C滚筒筛分机侧吹阀"] = "SV3DSM01",
["输送线C滚筒筛分机振动阀"] = "SV3DSM02",
["二级除尘器侧吹脉冲阀1"] = "PV1GDC01",
["二级除尘器侧吹脉冲阀2"] = "PV1GDC02",
["分配阀1直通电磁阀"] = "DV1PCP01",
["分配阀2直通电磁阀"] = "DV1PCP02",
["分配阀3直通电磁阀"] = "DV1PCP03",
["分配阀4直通电磁阀"] = "DV1PCP04",
["分配阀5直通电磁阀"] = "DV1PCP05",
["分配阀6直通电磁阀"] = "DV1PCP06",
["分配阀7直通电磁阀"] = "DV1PCP07",
["分配阀8直通电磁阀"] = "DV1PCP08",
["分配阀9直通电磁阀"] = "DV1PCP09",
["分配阀10直通电磁阀"] = "DV1PCP10",
["分配阀11直通电磁阀"] = "DV1PCP11",
["分配阀12直通电磁阀"] = "DV1PCP12",
["分配阀13直通电磁阀"] = "DV1PCP13",
["分配阀14直通电磁阀"] = "DV1PCP14",
["分配阀15直通电磁阀"] = "DV1PCP15",
["磨粉系统旋转阀气密封电磁阀"] = "SV1GDS01"
};
}
}

@ -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>

@ -218,6 +218,12 @@
<Compile Include="EngineeringDebuggingMode\ElectronicMachinery\ElectronicMachinery.Designer.cs">
<DependentUpon>ElectronicMachinery.cs</DependentUpon>
</Compile>
<Compile Include="EngineeringDebuggingMode\ValveStateControl\ValveStateControl.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="EngineeringDebuggingMode\ValveStateControl\ValveStateControl.Designer.cs">
<DependentUpon>ValveStateControl.cs</DependentUpon>
</Compile>
<Compile Include="Entity\RecordSaveDataInfo.cs" />
<Compile Include="Entity\Report\LR_BarcodeLog.cs" />
<Compile Include="Entity\Report\Report_GelDoser.cs" />
@ -674,6 +680,9 @@
<EmbeddedResource Include="EngineeringDebuggingMode\ElectronicMachinery\ElectronicMachinery.resx">
<DependentUpon>ElectronicMachinery.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="EngineeringDebuggingMode\ValveStateControl\ValveStateControl.resx">
<DependentUpon>ValveStateControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LjDevice\FrmDevice.resx">
<DependentUpon>FrmDevice.cs</DependentUpon>
</EmbeddedResource>

@ -7,6 +7,7 @@ using System.Windows.Forms;
using ICSharpCode.Core;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMachinery;
using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ValveStateControl;
using Mesnac.Action.ChemicalWeighing.Entity;
using Mesnac.Action.ChemicalWeighing.LjMetageFormula;
using Mesnac.Action.ChemicalWeighing.LjMixFormula;
@ -39,8 +40,8 @@ namespace Mesnac.Action.ChemicalWeighing.Test
// dbHelper.CommandText = sql;
ElectronicMachinery FM = new ElectronicMachinery();
FM.Show();
ValveStateControl Form = new ValveStateControl();
Form.Show();

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