From 7ee4c2a4e0866611976596a8d4b086c64bd81599 Mon Sep 17 00:00:00 2001
From: electron <937431539@qq.com>
Date: Tue, 5 Dec 2023 01:16:01 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8DRTR05=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
KorbeRTR/Config.cs | 4 +-
KorbeRTR/FormMainWindow.cs | 36 ++++++-----
KorbeRTR/Models/OmronData.cs | 114 ++++++++++++++++++++---------------
3 files changed, 90 insertions(+), 64 deletions(-)
diff --git a/KorbeRTR/Config.cs b/KorbeRTR/Config.cs
index c4d3641..fe4cad7 100644
--- a/KorbeRTR/Config.cs
+++ b/KorbeRTR/Config.cs
@@ -18,12 +18,12 @@ namespace KorbeRTR
///
/// 镀铜槽个数
///
- public const int 镀铜槽数 = 6;
+ public const int 镀铜槽数 = 8;
///
/// 每一段内的铜槽,共用一个参数
///
- public const int 镀铜段数 = 6;
+ public const int 镀铜段数 = 8;
///
/// 槽选择个数
diff --git a/KorbeRTR/FormMainWindow.cs b/KorbeRTR/FormMainWindow.cs
index ef578b6..67d987b 100644
--- a/KorbeRTR/FormMainWindow.cs
+++ b/KorbeRTR/FormMainWindow.cs
@@ -1110,26 +1110,32 @@ namespace KorbeRTR
new 产线TextType(){ lh = OmronPLC.LH料号.水洗8料号, rectangle = new Rectangle(1689,200,75,JTH) },
new 产线TextType(){ lh = OmronPLC.LH料号.酸浸9料号, rectangle = new Rectangle(1891,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.导电1, rectangle = new Rectangle(2122,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽1A, rectangle = new Rectangle(2346,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽1B, rectangle = new Rectangle(2483,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽2A, rectangle = new Rectangle(2696,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽2B, rectangle = new Rectangle(2834,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电1, rectangle = new Rectangle(2122,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽1, rectangle = new Rectangle(2346,200,75,JTH) },
new 产线TextType(){ lh = OmronPLC.LH料号.导电2, rectangle = new Rectangle(3049,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽3A, rectangle = new Rectangle(3274,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽3B, rectangle = new Rectangle(3410,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽4A, rectangle = new Rectangle(3623,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽4B, rectangle = new Rectangle(3762,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽2, rectangle = new Rectangle(2696,200,75,JTH) },
new 产线TextType(){ lh = OmronPLC.LH料号.导电3, rectangle = new Rectangle(3978,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽5A, rectangle = new Rectangle(4202,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽5B, rectangle = new Rectangle(4339,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽6A, rectangle = new Rectangle(4551,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.铜槽6B, rectangle = new Rectangle(4689,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽3, rectangle = new Rectangle(3274,200,75,JTH) },
+
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电4, rectangle = new Rectangle(3978,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽4, rectangle = new Rectangle(3623,200,75,JTH) },
+
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电5, rectangle = new Rectangle(3978,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽5, rectangle = new Rectangle(4202,200,75,JTH) },
+
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电6, rectangle = new Rectangle(3978,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽6, rectangle = new Rectangle(4551,200,75,JTH) },
+
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电7, rectangle = new Rectangle(3978,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽7, rectangle = new Rectangle(4689,200,75,JTH) },
+
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电8, rectangle = new Rectangle(3978,200,75,JTH) },
+ new 产线TextType(){ lh = OmronPLC.LH料号.铜槽8, rectangle = new Rectangle(4689,200,75,JTH) },
+
+ new 产线TextType(){ lh = OmronPLC.LH料号.导电9, rectangle = new Rectangle(4905,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.导电4, rectangle = new Rectangle(4905,200,75,JTH) },
- new 产线TextType(){ lh = OmronPLC.LH料号.水洗10料号, rectangle = new Rectangle(5107,200,75,JTH) },
new 产线TextType(){ lh = OmronPLC.LH料号.水洗11料号, rectangle = new Rectangle(5292,200,75,JTH) },
new 产线TextType(){ lh = OmronPLC.LH料号.酸洗12, rectangle = new Rectangle(5498,200,75,JTH) },
new 产线TextType(){ lh = OmronPLC.LH料号.水洗13料号, rectangle = new Rectangle(5707,200,75,JTH) },
diff --git a/KorbeRTR/Models/OmronData.cs b/KorbeRTR/Models/OmronData.cs
index d5d09e2..82140af 100644
--- a/KorbeRTR/Models/OmronData.cs
+++ b/KorbeRTR/Models/OmronData.cs
@@ -26,7 +26,19 @@ namespace KorbeRTR.Models
{
var group = new VariableGroupAttribute("D", 4100);
- int BaseAddr = 4131 + 3*(slot - 1);
+ int BaseAddr = 4131;
+ if (slot < 4)
+ {
+ BaseAddr = 4131 + 3 * (slot - 1);
+ }
+ else if (slot < 7)
+ {
+ BaseAddr = 4141 + 3 * (slot - 4);
+ }
+ else
+ {
+ BaseAddr = 4151 + 3 * (slot - 7);
+ }
Slot = slot;
this.C面电流 = new CurrentVariable("D", BaseAddr + 0, string.Format("铜{0}C面电流", Slot), group);
@@ -173,25 +185,18 @@ namespace KorbeRTR.Models
var GroupD4500 = new VariableGroupAttribute("D", 4500);
var GroupC400 = new VariableGroupAttribute("C", 400);
- this.C面设定电流 = new CurrentVariable[3];
- this.C面设定电流[0] = new CurrentVariable("D", 4401 + 6 * index, string.Format("铜{0}-1C面设定电流", Slot), GroupD4400);
- this.C面设定电流[1] = new CurrentVariable("D", 4403 + 6 * index, string.Format("铜{0}-2C面设定电流", Slot), GroupD4400);
- this.C面设定电流[2] = new CurrentVariable("D", 4405 + 6 * index, string.Format("铜{0}-3C面设定电流", Slot), GroupD4400);
+ this.C面设定电流 = new CurrentVariable[1];
+ this.C面设定电流[0] = new CurrentVariable("D", 4401 + 2 * index, string.Format("铜{0}-1C面设定电流", Slot), GroupD4400);
+
+ this.S面设定电流 = new CurrentVariable[1];
+ this.S面设定电流[0] = new CurrentVariable("D", 4402 + 2 * index, string.Format("铜{0}-1S面设定电流", Slot), GroupD4400);
- this.S面设定电流 = new CurrentVariable[3];
- this.S面设定电流[0] = new CurrentVariable("D", 4402 + 6 * index, string.Format("铜{0}-1S面设定电流", Slot), GroupD4400);
- this.S面设定电流[1] = new CurrentVariable("D", 4404 + 6 * index, string.Format("铜{0}-2S面设定电流", Slot), GroupD4400);
- this.S面设定电流[2] = new CurrentVariable("D", 4406 + 6 * index, string.Format("铜{0}-3S面设定电流", Slot), GroupD4400);
+ this.C面实际电流 = new CurrentVariable[1];
+ this.C面实际电流[0] = new CurrentVariable("D", 4451 + 2 * index, string.Format("铜{0}-1C面实际电流", Slot), GroupD4400);
- this.C面实际电流 = new CurrentVariable[3];
- this.C面实际电流[0] = new CurrentVariable("D", 4451 + 6 * index, string.Format("铜{0}-1C面实际电流", Slot), GroupD4400);
- this.C面实际电流[1] = new CurrentVariable("D", 4453 + 6 * index, string.Format("铜{0}-2C面实际电流", Slot), GroupD4400);
- this.C面实际电流[2] = new CurrentVariable("D", 4455 + 6 * index, string.Format("铜{0}-3C面实际电流", Slot), GroupD4400);
+ this.S面实际电流 = new CurrentVariable[1];
+ this.S面实际电流[0] = new CurrentVariable("D", 4452 + 2 * index, string.Format("铜{0}-1S面实际电流", Slot), GroupD4400);
- this.S面实际电流 = new CurrentVariable[3];
- this.S面实际电流[0] = new CurrentVariable("D", 4452 + 6 * index, string.Format("铜{0}-1S面实际电流", Slot), GroupD4400);
- this.S面实际电流[1] = new CurrentVariable("D", 4454 + 6 * index, string.Format("铜{0}-2S面实际电流", Slot), GroupD4400);
- this.S面实际电流[2] = new CurrentVariable("D", 4456 + 6 * index, string.Format("铜{0}-3S面实际电流", Slot), GroupD4400);
this.设定频率 = new BCDF1Uint16[2];
this.设定频率[0] = new BCDF1Uint16("D", 4501 + 2 * index, string.Format("铜{0}-设定频率1", Slot), GroupD4500);
@@ -507,43 +512,52 @@ namespace KorbeRTR.Models
public readonly Variable 导电1;
[Variable]
- public readonly Variable 铜槽1A;
+ public readonly Variable 铜槽1;
+
[Variable]
- public readonly Variable 铜槽1B;
+ public readonly Variable 导电2;
+
[Variable]
- public readonly Variable 铜槽2A;
+ public readonly Variable 铜槽2;
+
[Variable]
- public readonly Variable 铜槽2B;
+ public readonly Variable 导电3;
[Variable]
- public readonly Variable 导电2;
+ public readonly Variable 铜槽3;
[Variable]
- public readonly Variable 铜槽3A;
+ public readonly Variable 导电4;
+
[Variable]
- public readonly Variable 铜槽3B;
+ public readonly Variable 铜槽4;
+
[Variable]
- public readonly Variable 铜槽4A;
+ public readonly Variable 导电5;
+
[Variable]
- public readonly Variable 铜槽4B;
+ public readonly Variable 铜槽5;
[Variable]
- public readonly Variable 导电3;
+ public readonly Variable 导电6;
[Variable]
- public readonly Variable 铜槽5A;
+ public readonly Variable 铜槽6;
+
[Variable]
- public readonly Variable 铜槽5B;
+ public readonly Variable 导电7;
+
[Variable]
- public readonly Variable 铜槽6A;
+ public readonly Variable 铜槽7;
+
[Variable]
- public readonly Variable 铜槽6B;
+ public readonly Variable 导电8;
[Variable]
- public readonly Variable 导电4;
+ public readonly Variable 铜槽8;
[Variable]
- public readonly Variable 水洗10料号;
+ public readonly Variable 导电9;
[Variable]
public readonly Variable 水洗11料号;
@@ -588,26 +602,32 @@ namespace KorbeRTR.Models
酸浸9料号 = new Variable("D", tmp++, "酸浸9料号", group);
导电1 = new Variable("D", tmp++, "导电1", group);
- 铜槽1A = new Variable("D", tmp++, "铜槽1A", group);
- 铜槽1B = new Variable("D", tmp++, "铜槽1B", group);
- 铜槽2A = new Variable("D", tmp++, "铜槽2A", group);
- 铜槽2B = new Variable("D", tmp++, "铜槽2B", group);
+ 铜槽1 = new Variable("D", tmp++, "铜槽1", group);
导电2 = new Variable("D", tmp++, "导电2", group);
- 铜槽3A = new Variable("D", tmp++, "铜槽3A", group);
- 铜槽3B = new Variable("D", tmp++, "铜槽3B", group);
- 铜槽4A = new Variable("D", tmp++, "铜槽4A", group);
- 铜槽4B = new Variable("D", tmp++, "铜槽4B", group);
+ 铜槽2 = new Variable("D", tmp++, "铜槽2", group);
导电3 = new Variable("D", tmp++, "导电3", group);
- 铜槽5A = new Variable("D", tmp++, "铜槽5A", group);
- 铜槽5B = new Variable("D", tmp++, "铜槽5B", group);
- 铜槽6A = new Variable("D", tmp++, "铜槽6A", group);
- 铜槽6B = new Variable("D", tmp++, "铜槽6B", group);
+ 铜槽3 = new Variable("D", tmp++, "铜槽3", group);
导电4 = new Variable("D", tmp++, "导电4", group);
+ 铜槽4 = new Variable("D", tmp++, "铜槽4", group);
+
+ 导电5 = new Variable("D", tmp++, "导电5", group);
+ 铜槽5 = new Variable("D", tmp++, "铜槽5", group);
+
+ 导电6 = new Variable("D", tmp++, "导电6", group);
+ 铜槽6 = new Variable("D", tmp++, "铜槽6", group);
+
+ 导电7 = new Variable("D", tmp++, "导电7", group);
+ 铜槽7 = new Variable("D", tmp++, "铜槽7", group);
+
+ 导电8 = new Variable("D", tmp++, "导电8", group);
+ 铜槽8 = new Variable("D", tmp++, "铜槽8", group);
+
+ 导电9 = new Variable("D", tmp++, "导电9", group);
+
- 水洗10料号 = new Variable("D", tmp++, "水洗10料号", group);
水洗11料号 = new Variable("D", tmp++, "水洗11料号", group);
酸洗12 = new Variable("D", tmp++, "酸洗12", group);
水洗13料号 = new Variable("D", tmp++, "水洗13料号", group);
@@ -803,7 +823,7 @@ namespace KorbeRTR.Models
public Type报警()
{
int start = 850;
- int end = 897;
+ int end = 905;
int N = (end - start) * 16;
AlarmSet = new Variable[N];
--
Gitee