From acef76c492be9478915ee7d9ca1dfb146078e343 Mon Sep 17 00:00:00 2001 From: wangsr Date: Mon, 14 Aug 2023 17:12:10 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E7=94=B5=E6=9C=BA=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E3=80=81=E9=80=BB=E8=BE=91=E3=80=81plc?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=EF=BC=88=E5=BE=85=E6=B5=8B=E8=AF=95=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasePlcHelper.cs | 278 ++++++++++++++++++ .../ElectronicMachinery.Designer.cs | 210 +++++++++++++ .../ElectronicMachinery.cs | 203 +++++++++++++ .../ElectronicMachinery.resx | 120 ++++++++ .../Mesnac.Action.ChemicalWeighing.csproj | 9 + .../Test/TestAction.cs | 5 +- .../EventConfig/小料称量/我叫锄头.xml | 11 +- Main/MCEdit/Data/MCProject/nodeForm/Form1.xml | 7 +- Main/MCEdit/MCEdit.csproj | 4 +- 9 files changed, 840 insertions(+), 7 deletions(-) create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.Designer.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.resx diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs index a9bb455..5621638 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/BasePlcHelper.cs @@ -3370,6 +3370,284 @@ namespace Mesnac.Action.ChemicalWeighing public DataKeyValue geler_dos_actToLer { get; set; } + public DataKeyValue DM1GDP01_ManualMode { get; set; } + public DataKeyValue DM1GDP01_AutoMode { get; set; } + public DataKeyValue DM1GDP01_StartManual { get; set; } + public DataKeyValue DM1GDP01_StopManual { get; set; } + public DataKeyValue DM1GDP01_StartAuto { get; set; } + public DataKeyValue DM1GDP01_StopAuto { get; set; } + public DataKeyValue DM1GDP01_AlarmReset { get; set; } + public DataKeyValue DM1GDP01_Running { get; set; } + public DataKeyValue DM1GDP01_Run { get; set; } + public DataKeyValue DM1GDP01_Alarm { get; set; } + public DataKeyValue DM1GDP01_Spare { get; set; } + public DataKeyValue DM1GDP01_Spare1 { get; set; } + public DataKeyValue DM1GDP01_Spare2 { get; set; } + public DataKeyValue DM1GDP01_Spare3 { get; set; } + public DataKeyValue DM1GDP01_p1 { get; set; } + public DataKeyValue DM1GDP01_p2 { get; set; } + public DataKeyValue DM1ASIG01_ManualMode { get; set; } + public DataKeyValue DM1ASIG01_AutoMode { get; set; } + public DataKeyValue DM1ASIG01_StartManual { get; set; } + public DataKeyValue DM1ASIG01_StopManual { get; set; } + public DataKeyValue DM1ASIG01_StartAuto { get; set; } + public DataKeyValue DM1ASIG01_StopAuto { get; set; } + public DataKeyValue DM1ASIG01_AlarmReset { get; set; } + public DataKeyValue DM1ASIG01_Running { get; set; } + public DataKeyValue DM1ASIG01_Run { get; set; } + public DataKeyValue DM1ASIG01_Alarm { get; set; } + public DataKeyValue DM1ASIG01_Spare { get; set; } + public DataKeyValue DM1ASIG01_Spare1 { get; set; } + public DataKeyValue DM1ASIG01_Spare2 { get; set; } + public DataKeyValue DM1ASIG01_Spare3 { get; set; } + public DataKeyValue DM1ASIG01_p1 { get; set; } + public DataKeyValue DM1ASIG01_p2 { get; set; } + public DataKeyValue DM1BSIG01_ManualMode { get; set; } + public DataKeyValue DM1BSIG01_AutoMode { get; set; } + public DataKeyValue DM1BSIG01_StartManual { get; set; } + public DataKeyValue DM1BSIG01_StopManual { get; set; } + public DataKeyValue DM1BSIG01_StartAuto { get; set; } + public DataKeyValue DM1BSIG01_StopAuto { get; set; } + public DataKeyValue DM1BSIG01_AlarmReset { get; set; } + public DataKeyValue DM1BSIG01_Running { get; set; } + public DataKeyValue DM1BSIG01_Run { get; set; } + public DataKeyValue DM1BSIG01_Alarm { get; set; } + public DataKeyValue DM1BSIG01_Spare { get; set; } + public DataKeyValue DM1BSIG01_Spare1 { get; set; } + public DataKeyValue DM1BSIG01_Spare2 { get; set; } + public DataKeyValue DM1BSIG01_Spare3 { get; set; } + public DataKeyValue DM1BSIG01_p1 { get; set; } + public DataKeyValue DM1BSIG01_p2 { get; set; } + public DataKeyValue DM1CSIG01_ManualMode { get; set; } + public DataKeyValue DM1CSIG01_AutoMode { get; set; } + public DataKeyValue DM1CSIG01_StartManual { get; set; } + public DataKeyValue DM1CSIG01_StopManual { get; set; } + public DataKeyValue DM1CSIG01_StartAuto { get; set; } + public DataKeyValue DM1CSIG01_StopAuto { get; set; } + public DataKeyValue DM1CSIG01_AlarmReset { get; set; } + public DataKeyValue DM1CSIG01_Running { get; set; } + public DataKeyValue DM1CSIG01_Run { get; set; } + public DataKeyValue DM1CSIG01_Alarm { get; set; } + public DataKeyValue DM1CSIG01_Spare { get; set; } + public DataKeyValue DM1CSIG01_Spare1 { get; set; } + public DataKeyValue DM1CSIG01_Spare2 { get; set; } + public DataKeyValue DM1CSIG01_Spare3 { get; set; } + public DataKeyValue DM1CSIG01_p1 { get; set; } + public DataKeyValue DM1CSIG01_p2 { get; set; } + public DataKeyValue DM1DSIG01_ManualMode { get; set; } + public DataKeyValue DM1DSIG01_AutoMode { get; set; } + public DataKeyValue DM1DSIG01_StartManual { get; set; } + public DataKeyValue DM1DSIG01_StopManual { get; set; } + public DataKeyValue DM1DSIG01_StartAuto { get; set; } + public DataKeyValue DM1DSIG01_StopAuto { get; set; } + public DataKeyValue DM1DSIG01_AlarmReset { get; set; } + public DataKeyValue DM1DSIG01_Running { get; set; } + public DataKeyValue DM1DSIG01_Run { get; set; } + public DataKeyValue DM1DSIG01_Alarm { get; set; } + public DataKeyValue DM1DSIG01_Spare { get; set; } + public DataKeyValue DM1DSIG01_Spare1 { get; set; } + public DataKeyValue DM1DSIG01_Spare2 { get; set; } + public DataKeyValue DM1DSIG01_Spare3 { get; set; } + public DataKeyValue DM1DSIG01_p1 { get; set; } + public DataKeyValue DM1DSIG01_p2 { get; set; } + public DataKeyValue DM1GDS01_ManualMode { get; set; } + public DataKeyValue DM1GDS01_AutoMode { get; set; } + public DataKeyValue DM1GDS01_StartManual { get; set; } + public DataKeyValue DM1GDS01_StopManual { get; set; } + public DataKeyValue DM1GDS01_StartAuto { get; set; } + public DataKeyValue DM1GDS01_StopAuto { get; set; } + public DataKeyValue DM1GDS01_AlarmReset { get; set; } + public DataKeyValue DM1GDS01_Running { get; set; } + public DataKeyValue DM1GDS01_Run { get; set; } + public DataKeyValue DM1GDS01_Alarm { get; set; } + public DataKeyValue DM1GDS01_Spare { get; set; } + public DataKeyValue DM1GDS01_Spare1 { get; set; } + public DataKeyValue DM1GDS01_Spare2 { get; set; } + public DataKeyValue DM1GDS01_Spare3 { get; set; } + public DataKeyValue DM1GDS01_p1 { get; set; } + public DataKeyValue DM1GDS01_p2 { get; set; } + public DataKeyValue DM1GDS02_ManualMode { get; set; } + public DataKeyValue DM1GDS02_AutoMode { get; set; } + public DataKeyValue DM1GDS02_StartManual { get; set; } + public DataKeyValue DM1GDS02_StopManual { get; set; } + public DataKeyValue DM1GDS02_StartAuto { get; set; } + public DataKeyValue DM1GDS02_StopAuto { get; set; } + public DataKeyValue DM1GDS02_AlarmReset { get; set; } + public DataKeyValue DM1GDS02_Running { get; set; } + public DataKeyValue DM1GDS02_Run { get; set; } + public DataKeyValue DM1GDS02_Alarm { get; set; } + public DataKeyValue DM1GDS02_Spare { get; set; } + public DataKeyValue DM1GDS02_Spare1 { get; set; } + public DataKeyValue DM1GDS02_Spare2 { get; set; } + public DataKeyValue DM1GDS02_Spare3 { get; set; } + public DataKeyValue DM1GDS02_p1 { get; set; } + public DataKeyValue DM1GDS02_p2 { get; set; } + public DataKeyValue DM1GDS03_ManualMode { get; set; } + public DataKeyValue DM1GDS03_AutoMode { get; set; } + public DataKeyValue DM1GDS03_StartManual { get; set; } + public DataKeyValue DM1GDS03_StopManual { get; set; } + public DataKeyValue DM1GDS03_StartAuto { get; set; } + public DataKeyValue DM1GDS03_StopAuto { get; set; } + public DataKeyValue DM1GDS03_AlarmReset { get; set; } + public DataKeyValue DM1GDS03_Running { get; set; } + public DataKeyValue DM1GDS03_Run { get; set; } + public DataKeyValue DM1GDS03_Alarm { get; set; } + public DataKeyValue DM1GDS03_Spare { get; set; } + public DataKeyValue DM1GDS03_Spare1 { get; set; } + public DataKeyValue DM1GDS03_Spare2 { get; set; } + public DataKeyValue DM1GDS03_Spare3 { get; set; } + public DataKeyValue DM1GDS03_p1 { get; set; } + public DataKeyValue DM1GDS03_p2 { get; set; } + public DataKeyValue DM1GDS04_ManualMode { get; set; } + public DataKeyValue DM1GDS04_AutoMode { get; set; } + public DataKeyValue DM1GDS04_StartManual { get; set; } + public DataKeyValue DM1GDS04_StopManual { get; set; } + public DataKeyValue DM1GDS04_StartAuto { get; set; } + public DataKeyValue DM1GDS04_StopAuto { get; set; } + public DataKeyValue DM1GDS04_AlarmReset { get; set; } + public DataKeyValue DM1GDS04_Running { get; set; } + public DataKeyValue DM1GDS04_Run { get; set; } + public DataKeyValue DM1GDS04_Alarm { get; set; } + public DataKeyValue DM1GDS04_Spare { get; set; } + public DataKeyValue DM1GDS04_Spare1 { get; set; } + public DataKeyValue DM1GDS04_Spare2 { get; set; } + public DataKeyValue DM1GDS04_Spare3 { get; set; } + public DataKeyValue DM1GDS04_p1 { get; set; } + public DataKeyValue DM1GDS04_p2 { get; set; } + public DataKeyValue DM1GDS05_ManualMode { get; set; } + public DataKeyValue DM1GDS05_AutoMode { get; set; } + public DataKeyValue DM1GDS05_StartManual { get; set; } + public DataKeyValue DM1GDS05_StopManual { get; set; } + public DataKeyValue DM1GDS05_StartAuto { get; set; } + public DataKeyValue DM1GDS05_StopAuto { get; set; } + public DataKeyValue DM1GDS05_AlarmReset { get; set; } + public DataKeyValue DM1GDS05_Running { get; set; } + public DataKeyValue DM1GDS05_Run { get; set; } + public DataKeyValue DM1GDS05_Alarm { get; set; } + public DataKeyValue DM1GDS05_Spare { get; set; } + public DataKeyValue DM1GDS05_Spare1 { get; set; } + public DataKeyValue DM1GDS05_Spare2 { get; set; } + public DataKeyValue DM1GDS05_Spare3 { get; set; } + public DataKeyValue DM1GDS05_p1 { get; set; } + public DataKeyValue DM1GDS05_p2 { get; set; } + public DataKeyValue DM1GDS06_ManualMode { get; set; } + public DataKeyValue DM1GDS06_AutoMode { get; set; } + public DataKeyValue DM1GDS06_StartManual { get; set; } + public DataKeyValue DM1GDS06_StopManual { get; set; } + public DataKeyValue DM1GDS06_StartAuto { get; set; } + public DataKeyValue DM1GDS06_StopAuto { get; set; } + public DataKeyValue DM1GDS06_AlarmReset { get; set; } + public DataKeyValue DM1GDS06_RunningM { get; set; } + public DataKeyValue DM1GDS06_RunningS { get; set; } + public DataKeyValue DM1GDS06_RunningT { get; set; } + public DataKeyValue DM1GDS06_RunM { get; set; } + public DataKeyValue DM1GDS06_RunS { get; set; } + public DataKeyValue DM1GDS06_RunT { get; set; } + public DataKeyValue DM1GDS06_Alarm { get; set; } + public DataKeyValue DM1GDS06_AlarmM { get; set; } + public DataKeyValue DM1GDS06_AlarmS { get; set; } + public DataKeyValue DM1GDS06_AlarmT { get; set; } + public DataKeyValue DM1GDS06_Spare1 { get; set; } + public DataKeyValue DM1GDS06_Spare2 { get; set; } + public DataKeyValue DM1GDS06_Spare3 { get; set; } + public DataKeyValue DM1GDS06_StopTime { get; set; } + public DataKeyValue DM1GDS07_ManualMode { get; set; } + public DataKeyValue DM1GDS07_AutoMode { get; set; } + public DataKeyValue DM1GDS07_StartManual { get; set; } + public DataKeyValue DM1GDS07_StopManual { get; set; } + public DataKeyValue DM1GDS07_StartAuto { get; set; } + public DataKeyValue DM1GDS07_StopAuto { get; set; } + public DataKeyValue DM1GDS07_AlarmReset { get; set; } + public DataKeyValue DM1GDS07_RunningM { get; set; } + public DataKeyValue DM1GDS07_RunningS { get; set; } + public DataKeyValue DM1GDS07_RunningT { get; set; } + public DataKeyValue DM1GDS07_RunM { get; set; } + public DataKeyValue DM1GDS07_RunS { get; set; } + public DataKeyValue DM1GDS07_RunT { get; set; } + public DataKeyValue DM1GDS07_Alarm { get; set; } + public DataKeyValue DM1GDS07_AlarmM { get; set; } + public DataKeyValue DM1GDS07_AlarmS { get; set; } + public DataKeyValue DM1GDS07_AlarmT { get; set; } + public DataKeyValue DM1GDS07_Spare1 { get; set; } + public DataKeyValue DM1GDS07_Spare2 { get; set; } + public DataKeyValue DM1GDS07_Spare3 { get; set; } + public DataKeyValue DM1GDS07_StopTime { get; set; } + public DataKeyValue DM1DSM01_AutoBt { get; set; } + public DataKeyValue DM1DSM01_ManBt { get; set; } + public DataKeyValue DM1DSM01_StartA { get; set; } + public DataKeyValue DM1DSM01_StopA { get; set; } + public DataKeyValue DM1DSM01_StartM { get; set; } + public DataKeyValue DM1DSM01_StopM { get; set; } + public DataKeyValue DM1DSM01_AlarmReset { get; set; } + public DataKeyValue DM1DSM01_EXTEstop { get; set; } + public DataKeyValue DM1DSM01_AutoMode { get; set; } + public DataKeyValue DM1DSM01_ManMode { get; set; } + public DataKeyValue DM1DSM01_VVVFOK { get; set; } + public DataKeyValue DM1DSM01_Running { get; set; } + public DataKeyValue DM1DSM01_Alarm { get; set; } + public DataKeyValue DM1DSM01_Error { get; set; } + public DataKeyValue DM1DSM01_Enable { get; set; } + public DataKeyValue DM1DSM01_Polarity { get; set; } + public DataKeyValue DM1DSM01_SetSpeedA { get; set; } + public DataKeyValue DM1DSM01_SetSpeedM { get; set; } + public DataKeyValue DM1DSM01_ActSpeed { get; set; } + public DataKeyValue DM2DSM01_AutoBt { get; set; } + public DataKeyValue DM2DSM01_ManBt { get; set; } + public DataKeyValue DM2DSM01_StartA { get; set; } + public DataKeyValue DM2DSM01_StopA { get; set; } + public DataKeyValue DM2DSM01_StartM { get; set; } + public DataKeyValue DM2DSM01_StopM { get; set; } + public DataKeyValue DM2DSM01_AlarmReset { get; set; } + public DataKeyValue DM2DSM01_EXTEstop { get; set; } + public DataKeyValue DM2DSM01_AutoMode { get; set; } + public DataKeyValue DM2DSM01_ManMode { get; set; } + public DataKeyValue DM2DSM01_VVVFOK { get; set; } + public DataKeyValue DM2DSM01_Running { get; set; } + public DataKeyValue DM2DSM01_Alarm { get; set; } + public DataKeyValue DM2DSM01_Error { get; set; } + public DataKeyValue DM2DSM01_Enable { get; set; } + public DataKeyValue DM2DSM01_Polarity { get; set; } + public DataKeyValue DM2DSM01_SetSpeedA { get; set; } + public DataKeyValue DM2DSM01_SetSpeedM { get; set; } + public DataKeyValue DM2DSM01_ActSpeed { get; set; } + public DataKeyValue DM3DSM01_AutoBt { get; set; } + public DataKeyValue DM3DSM01_ManBt { get; set; } + public DataKeyValue DM3DSM01_StartA { get; set; } + public DataKeyValue DM3DSM01_StopA { get; set; } + public DataKeyValue DM3DSM01_StartM { get; set; } + public DataKeyValue DM3DSM01_StopM { get; set; } + public DataKeyValue DM3DSM01_AlarmReset { get; set; } + public DataKeyValue DM3DSM01_EXTEstop { get; set; } + public DataKeyValue DM3DSM01_AutoMode { get; set; } + public DataKeyValue DM3DSM01_ManMode { get; set; } + public DataKeyValue DM3DSM01_VVVFOK { get; set; } + public DataKeyValue DM3DSM01_Running { get; set; } + public DataKeyValue DM3DSM01_Alarm { get; set; } + public DataKeyValue DM3DSM01_Error { get; set; } + public DataKeyValue DM3DSM01_Enable { get; set; } + public DataKeyValue DM3DSM01_Polarity { get; set; } + public DataKeyValue DM3DSM01_SetSpeedA { get; set; } + public DataKeyValue DM3DSM01_SetSpeedM { get; set; } + public DataKeyValue DM3DSM01_ActSpeed { get; set; } + public DataKeyValue DM1GDS12_AutoBt { get; set; } + public DataKeyValue DM1GDS12_ManBt { get; set; } + public DataKeyValue DM1GDS12_StartA { get; set; } + public DataKeyValue DM1GDS12_StopA { get; set; } + public DataKeyValue DM1GDS12_StartM { get; set; } + public DataKeyValue DM1GDS12_StopM { get; set; } + public DataKeyValue DM1GDS12_AlarmReset { get; set; } + public DataKeyValue DM1GDS12_EXTEstop { get; set; } + public DataKeyValue DM1GDS12_AutoMode { get; set; } + public DataKeyValue DM1GDS12_ManMode { get; set; } + public DataKeyValue DM1GDS12_VVVFOK { get; set; } + public DataKeyValue DM1GDS12_Running { get; set; } + public DataKeyValue DM1GDS12_Alarm { get; set; } + public DataKeyValue DM1GDS12_Error { get; set; } + public DataKeyValue DM1GDS12_Enable { get; set; } + public DataKeyValue DM1GDS12_Polarity { get; set; } + public DataKeyValue DM1GDS12_SetSpeedA { get; set; } + public DataKeyValue DM1GDS12_SetSpeedM { get; set; } + public DataKeyValue DM1GDS12_ActSpeed { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.Designer.cs new file mode 100644 index 0000000..f59cdb3 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.Designer.cs @@ -0,0 +1,210 @@ +namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMachinery +{ + partial class ElectronicMachinery + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.ManualMode = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.NowIs = new System.Windows.Forms.Label(); + this.ModeLable = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.OnOffLable = new System.Windows.Forms.Label(); + this.OnOffControl = new System.Windows.Forms.Button(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.Running = new System.Windows.Forms.Button(); + this.AlarmReset = new System.Windows.Forms.Button(); + this.Run = new System.Windows.Forms.Button(); + this.DMChange = new System.Windows.Forms.ListBox(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // ManualMode + // + this.ManualMode.Location = new System.Drawing.Point(6, 20); + this.ManualMode.Name = "ManualMode"; + this.ManualMode.Size = new System.Drawing.Size(114, 38); + this.ManualMode.TabIndex = 0; + this.ManualMode.Text = "切换手动模式"; + this.ManualMode.UseVisualStyleBackColor = true; + this.ManualMode.Click += new System.EventHandler(this.ManualMode_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.NowIs); + this.groupBox1.Controls.Add(this.ModeLable); + this.groupBox1.Controls.Add(this.ManualMode); + this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(186, 70); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "模式切换"; + // + // NowIs + // + this.NowIs.AutoSize = true; + this.NowIs.Location = new System.Drawing.Point(126, 17); + this.NowIs.Name = "NowIs"; + this.NowIs.Size = new System.Drawing.Size(41, 12); + this.NowIs.TabIndex = 3; + this.NowIs.Text = "当前为"; + // + // ModeLable + // + this.ModeLable.AutoSize = true; + this.ModeLable.Location = new System.Drawing.Point(126, 33); + this.ModeLable.Name = "ModeLable"; + this.ModeLable.Size = new System.Drawing.Size(53, 12); + this.ModeLable.TabIndex = 2; + this.ModeLable.Text = "自动模式"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.OnOffLable); + this.groupBox2.Controls.Add(this.OnOffControl); + this.groupBox2.Location = new System.Drawing.Point(12, 88); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(186, 66); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "启停控制"; + // + // OnOffLable + // + this.OnOffLable.AutoSize = true; + this.OnOffLable.Location = new System.Drawing.Point(126, 33); + this.OnOffLable.Name = "OnOffLable"; + this.OnOffLable.Size = new System.Drawing.Size(53, 12); + this.OnOffLable.TabIndex = 1; + this.OnOffLable.Text = "状态:关"; + // + // OnOffControl + // + this.OnOffControl.Location = new System.Drawing.Point(6, 20); + this.OnOffControl.Name = "OnOffControl"; + this.OnOffControl.Size = new System.Drawing.Size(114, 38); + this.OnOffControl.TabIndex = 0; + this.OnOffControl.Text = "启动"; + this.OnOffControl.UseVisualStyleBackColor = true; + this.OnOffControl.Click += new System.EventHandler(this.OnOffControl_Click); + // + // groupBox3 + // + 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.TabIndex = 3; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "其他控制"; + // + // Running + // + this.Running.Location = new System.Drawing.Point(6, 58); + this.Running.Name = "Running"; + this.Running.Size = new System.Drawing.Size(100, 32); + this.Running.TabIndex = 1; + this.Running.Text = "运行检测"; + this.Running.UseVisualStyleBackColor = true; + this.Running.Click += new System.EventHandler(this.Running_Click); + // + // AlarmReset + // + this.AlarmReset.Location = new System.Drawing.Point(6, 20); + this.AlarmReset.Name = "AlarmReset"; + this.AlarmReset.Size = new System.Drawing.Size(100, 32); + this.AlarmReset.TabIndex = 0; + this.AlarmReset.Text = "报警复位"; + this.AlarmReset.UseVisualStyleBackColor = true; + this.AlarmReset.Click += new System.EventHandler(this.AlarmReset_Click); + // + // Run + // + this.Run.Location = new System.Drawing.Point(204, 116); + this.Run.Name = "Run"; + this.Run.Size = new System.Drawing.Size(113, 38); + this.Run.TabIndex = 2; + this.Run.Text = "输出运行"; + this.Run.UseVisualStyleBackColor = true; + this.Run.Click += new System.EventHandler(this.Run_Click); + // + // DMChange + // + this.DMChange.FormattingEnabled = true; + this.DMChange.ItemHeight = 12; + this.DMChange.Location = new System.Drawing.Point(323, 12); + this.DMChange.Name = "DMChange"; + this.DMChange.Size = new System.Drawing.Size(225, 148); + this.DMChange.TabIndex = 4; + this.DMChange.SelectedIndexChanged += new System.EventHandler(this.DMChange_SelectedIndexChanged); + DMChange.Items.AddRange(new string[] {"二级除尘器除尘风机", "大A组除尘风机", "大仓B组除尘风机", "大仓C组除尘风机", "大仓D组除尘风机", + "磨粉分析机电机", "磨粉除尘风机电机", "磨粉罗茨风机电机", "磨粉皮带正转电机", "磨粉皮带反转电机"}); + + //{"DM1GDP01", "DM1ASIG01", "DM1BSIG01", "DM1CSIG01", "DM1DSIG01", + // "DM1GDS01", "DM1GDS02", "DM1GDS03", "DM1GDS04", "DM1GDS05"}); + // + // ElectronicMachinery + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(560, 168); + this.Controls.Add(this.DMChange); + this.Controls.Add(this.Run); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Name = "ElectronicMachinery"; + this.Text = "电机控制"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button ManualMode; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label ModeLable; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Button OnOffControl; + private System.Windows.Forms.Label OnOffLable; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Button Run; + private System.Windows.Forms.Button AlarmReset; + private System.Windows.Forms.Button Running; + private System.Windows.Forms.Label NowIs; + private System.Windows.Forms.ListBox DMChange; + } +} \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.cs new file mode 100644 index 0000000..c79f720 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.cs @@ -0,0 +1,203 @@ +using Mesnac.Action.ChemicalWeighing.Entity; +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; + +namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMachinery +{ + public partial class ElectronicMachinery : Form + { + BasePlcHelper Plc = BasePlcHelper.Instance; + int ManualModeIsOpen; + int ManualModeIsStart; + int AutoModeIsStart; + string DmName; + public ElectronicMachinery() + { + InitializeComponent(); + ManualModeIsOpen = GetDataNameValue("_ManualMode").NowValue.ToInt(); + ManualModeIsStart = GetDataNameValue("_StartManual").NowValue.ToInt(); + AutoModeIsStart = Plc.DM1GDP01_StartAuto.NowValue.ToInt(); + if (ManualModeIsOpen == 0) + { + ManualMode.Text = "切换手动模式"; + ModeLable.Text = "自动模式"; + if(ManualModeIsStart == 0) + { + OnOffControl.Text = "启动"; + OnOffLable.Text = "状态:关"; + } + else + { + OnOffControl.Text = "关闭"; + OnOffLable.Text = "状态:开"; + } + } + else + { + ManualMode.Text = "切换自动模式"; + ModeLable.Text = "手动模式"; + if (AutoModeIsStart == 0) + { + OnOffControl.Text = "启动"; + OnOffLable.Text = "状态:关"; + } + else + { + OnOffControl.Text = "关闭"; + OnOffLable.Text = "状态:开"; + } + } + } + + public DataKeyValue GetDataNameValue(string dmValue) + { + return new DataKeyValue(DmName + dmValue); + } + + private void DMChange_SelectedIndexChanged(object sender, EventArgs e) + { + switch (DMChange.Text) + { + case "二级除尘器除尘风机": + DmName = "DM1GDP01"; + break; + case "大A组除尘风机": + DmName = "DM1ASIG01"; + break; + case "大仓B组除尘风机": + DmName = "DM1BSIG01"; + break; + case "大仓C组除尘风机": + DmName = "DM1CSIG01"; + break; + case "大仓D组除尘风机": + DmName = "DM1DSIG01"; + break; + case "磨粉分析机电机": + DmName = "DM1GDS01"; + break; + case "磨粉除尘风机电机": + DmName = "DM1GDS02"; + break; + case "磨粉罗茨风机电机": + DmName = "DM1GDS03"; + break; + case "磨粉皮带正转电机": + DmName = "DM1GDS04"; + break; + case "磨粉皮带反转电机": + DmName = "DM1GDS05"; + break; + } + } + + private void ManualMode_Click(object sender, EventArgs e) + { + if(ManualModeIsOpen == 0) + { + Plc.PlcWriteByDataKey(GetDataNameValue("_ManualMode"), new Object[] { 1 }); + Plc.PlcWriteByDataKey(GetDataNameValue("_AutoMode"), new Object[] { 0 }); + ManualMode.Text = "切换自动模式"; + ModeLable.Text = "手动模式"; + ManualModeIsOpen = 1; + if (ManualModeIsStart == 0) + { + OnOffControl.Text = "启动"; + OnOffLable.Text = "状态:关"; + } + else + { + OnOffControl.Text = "关闭"; + OnOffLable.Text = "状态:开"; + } + } + else + { + Plc.PlcWriteByDataKey(GetDataNameValue("_ManualMode"), new Object[] { 0 }); + Plc.PlcWriteByDataKey(GetDataNameValue("_AutoMode"), new Object[] { 1 }); + ManualMode.Text = "切换手动模式"; + ModeLable.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) + { + Plc.PlcWriteByDataKey(GetDataNameValue("_StartAuto"), new Object[] { 1 }); + Plc.PlcWriteByDataKey(GetDataNameValue("_StopAuto"), new Object[] { 0 }); + OnOffControl.Text = "关闭"; + OnOffLable.Text = "状态:开"; + AutoModeIsStart = 1; + } + else + { + Plc.PlcWriteByDataKey(GetDataNameValue("_StartAuto"), new Object[] { 0 }); + Plc.PlcWriteByDataKey(GetDataNameValue("_StopAuto"), new Object[] { 1 }); + OnOffControl.Text = "启动"; + OnOffLable.Text = "状态:关"; + AutoModeIsStart = 0; + } + } + else + { + if (ManualModeIsStart == 0) + { + Plc.PlcWriteByDataKey(GetDataNameValue("_StartManual"), new Object[] { 1 }); + Plc.PlcWriteByDataKey(GetDataNameValue("_StopManual"), new Object[] { 0 }); + OnOffControl.Text = "关闭"; + OnOffLable.Text = "状态:开"; + ManualModeIsStart = 1; + } + else + { + Plc.PlcWriteByDataKey(GetDataNameValue("_StartManual"), new Object[] { 0 }); + Plc.PlcWriteByDataKey(GetDataNameValue("_StopManual"), new Object[] { 1 }); + OnOffControl.Text = "启动"; + OnOffLable.Text = "状态:关"; + ManualModeIsStart = 0; + } + } + } + + private void AlarmReset_Click(object sender, EventArgs e) + { + Plc.PlcWriteByDataKey(GetDataNameValue("_AlarmReset"), new Object[] { 1 }); + } + + private void Running_Click(object sender, EventArgs e) + { + Plc.PlcWriteByDataKey(GetDataNameValue("_Running"), new Object[] { 1 }); + } + + private void Run_Click(object sender, EventArgs e) + { + Plc.PlcWriteByDataKey(GetDataNameValue("_Run"), new Object[] { 1 }); + } + + + + /*Plc.PlcWriteByDataKey(GetDataKeyValue(""), new Object[] { 1 }); + GetDataKeyValue("").LastValue*/ + } +} diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.resx b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ElectronicMachinery/ElectronicMachinery.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 923a0a2..335e04b 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -212,6 +212,12 @@ + + Form + + + ElectronicMachinery.cs + @@ -665,6 +671,9 @@ FrmBin.cs + + ElectronicMachinery.cs + FrmDevice.cs diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs index e2fd80e..8f36979 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs @@ -6,6 +6,7 @@ using System.Text; using System.Windows.Forms; using ICSharpCode.Core; using Mesnac.Action.Base; +using Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.ElectronicMachinery; using Mesnac.Action.ChemicalWeighing.Entity; using Mesnac.Action.ChemicalWeighing.LjMetageFormula; using Mesnac.Action.ChemicalWeighing.LjMixFormula; @@ -38,8 +39,8 @@ namespace Mesnac.Action.ChemicalWeighing.Test // dbHelper.CommandText = sql; - FrmMixA frmMetageFormula = new FrmMixA(1); - frmMetageFormula.Show(); + ElectronicMachinery FM = new ElectronicMachinery(); + FM.Show(); diff --git a/Main/MCEdit/Data/EventConfig/小料称量/我叫锄头.xml b/Main/MCEdit/Data/EventConfig/小料称量/我叫锄头.xml index d05a28a..06c3706 100644 --- a/Main/MCEdit/Data/EventConfig/小料称量/我叫锄头.xml +++ b/Main/MCEdit/Data/EventConfig/小料称量/我叫锄头.xml @@ -6,6 +6,10 @@ 窗体初始化 窗体初始化 + + 弹出窗体 + 弹出窗体 + @@ -15,15 +19,16 @@ + + + - - - + \ No newline at end of file diff --git a/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml b/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml index ad40a1c..924a02a 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml @@ -1,6 +1,11 @@ + + 156, 15 + LouDou1 + 65, 99 + @@ -641,7 +646,7 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAGAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDNBRjJGRDJBM0Q4MDQ2RTFBNzRCQUFFRUY4MTA4Q0JGBgYAAAAS5bCP5paZQWN0aW9u5rWL6K+VBgcAAAAS5bCP5paZQWN0aW9u5rWL6K+VCw== + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAKAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIGI0NWRkODA1MzMyMjQwZWE4YWFkNWVmYjM1ZDUyOGJmBgYAAAAM5by55Ye656qX5L2TBgcAAAAM5by55Ye656qX5L2TCw== MCLabel153 diff --git a/Main/MCEdit/MCEdit.csproj b/Main/MCEdit/MCEdit.csproj index 8fb48d6..c2e608d 100644 --- a/Main/MCEdit/MCEdit.csproj +++ b/Main/MCEdit/MCEdit.csproj @@ -219,7 +219,9 @@ Designer PreserveNewest - + + Always + Always