From c9a55ecd6fe98038ad082d6edb28ba3b9f4e2fef Mon Sep 17 00:00:00 2001 From: "GukSang.Jin" Date: Tue, 6 Jan 2026 17:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WindowsFormsApp6/MainForm.Designer.cs | 2 +- WindowsFormsApp6/MainForm.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WindowsFormsApp6/MainForm.Designer.cs b/WindowsFormsApp6/MainForm.Designer.cs index e86a8a1..cd1e6a7 100644 --- a/WindowsFormsApp6/MainForm.Designer.cs +++ b/WindowsFormsApp6/MainForm.Designer.cs @@ -379,7 +379,7 @@ namespace WindowsFormsApp6 this.button5.TabIndex = 3; this.button5.Text = "🎲 模拟数据"; this.button5.UseVisualStyleBackColor = false; - this.button5.Visible = true; + this.button5.Visible = false; this.button5.Click += new System.EventHandler(this.Button5_Click); // // buttonExport diff --git a/WindowsFormsApp6/MainForm.cs b/WindowsFormsApp6/MainForm.cs index 9ad9445..25914a9 100644 --- a/WindowsFormsApp6/MainForm.cs +++ b/WindowsFormsApp6/MainForm.cs @@ -520,7 +520,7 @@ namespace WindowsFormsApp6 int hangTime = ConvertSingleRegisterToInt(hangTimeReg[0]); // 读取运行速度(D410,1个寄存器,整数,单位:mm/min) - ushort[] runSpeedReg = _modbusMaster.ReadHoldingRegisters(slaveId, 410, 5); + ushort[] runSpeedReg = _modbusMaster.ReadHoldingRegisters(slaveId, 410, 1); int runSpeed = ConvertSingleRegisterToInt(runSpeedReg[0]); // 使用反射获取Form2的私有字段