From a22d1c12eda74fe1a34b33ff0cc964f55b1cbbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 16 Apr 2024 19:57:15 +0800 Subject: [PATCH 1/6] Over --- ProductionSystem/Forms/HomeFormInfo.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index 26fa0b8..b509f94 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -650,6 +650,7 @@ namespace ProductionSystem.Forms //步骤1水泵1空载 if (d1300Value.ToDouble().ToInt() == 1 ) { + Over = false; XTrace.WriteLine("开始步骤1"); ToCache(Step1); } @@ -718,10 +719,11 @@ namespace ProductionSystem.Forms var d1314 = GetPlcValue("D1314"); // d1314 = "1"; - if (d1314.ToDouble().ToInt() == 1) + if (d1314.ToDouble().ToInt() == 1 && !Over) { XTrace.WriteLine("开始步骤8"); ToCache(Step8); + Over = true; } } @@ -730,8 +732,9 @@ namespace ProductionSystem.Forms } } - - + public bool Over { get; set; } = false; + + public void ToCache(Action action) { string name = GetCode() +":"+ action.Method.Name; @@ -1042,6 +1045,7 @@ namespace ProductionSystem.Forms + private void Step8() { //sitongfa 2 3 From 6cd899b4c37f24fc4733e9e7eee83ac0eb8ff17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 16 Apr 2024 20:05:46 +0800 Subject: [PATCH 2/6] Step8 --- ProductionSystem/Forms/HomeFormInfo.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index b509f94..c61cc40 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -722,7 +722,7 @@ namespace ProductionSystem.Forms if (d1314.ToDouble().ToInt() == 1 && !Over) { XTrace.WriteLine("开始步骤8"); - ToCache(Step8); + Step8(); Over = true; } @@ -1065,7 +1065,8 @@ namespace ProductionSystem.Forms } if (D1004) - { TmTool.Dzpy(ModeTypeEnum.BZ8_DB,1, true); + { + TmTool.Dzpy(ModeTypeEnum.BZ8_DB,1, true); TmTool.WritePlc(TmTool.PengZhang1, 0); } From c643034225b6eea65803b656b76a2489bb334daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 16 Apr 2024 20:26:15 +0800 Subject: [PATCH 3/6] D1400 --- ProductionSystem/Forms/HomeFormInfo.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index c61cc40..e3c6dec 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -1051,6 +1051,7 @@ namespace ProductionSystem.Forms //sitongfa 2 3 //膨胀阀0 + XTrace.WriteLine("第八部"+D1004); if (D1004) { TmTool.SiTong(ModeTypeEnum.BZ8_DB, 1,true); From 908988b399cd4c8c8f999c07aaeec8d7308de16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 16 Apr 2024 21:16:02 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=9B=9B=E9=80=9A=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionSystem/Forms/HomeFormInfo.cs | 9 +++++++++ ProductionSystem/Untils/Tool/TmTool.cs | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index e3c6dec..ba2285e 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -984,6 +984,8 @@ namespace ProductionSystem.Forms private void Step7() { + TmTool.CleanSt(); + Thread.Sleep(1000); if (D1004) { TmTool.SiTong(ModeTypeEnum.BZ7_DB, 1); @@ -1003,6 +1005,10 @@ namespace ProductionSystem.Forms private void Step5() { + + TmTool.CleanSt(); + Thread.Sleep(1000); + var ba = ModeTypeEnum.BZ5_DB; //上位机将四通阀1运行到模式1,四通阀2运行到模式1,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) if (D1004) @@ -1025,6 +1031,8 @@ namespace ProductionSystem.Forms private void Step6() { + TmTool.CleanSt(); + Thread.Sleep(1000); //上位机将四通阀1运行到模式6,四通阀2运行到模式6,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) var ba = ModeTypeEnum.BZ6_DB; //上位机将四通阀1运行到模式1,四通阀2运行到模式1,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) @@ -1048,6 +1056,7 @@ namespace ProductionSystem.Forms private void Step8() { + //sitongfa 2 3 //膨胀阀0 diff --git a/ProductionSystem/Untils/Tool/TmTool.cs b/ProductionSystem/Untils/Tool/TmTool.cs index 62c53f7..4620c1f 100644 --- a/ProductionSystem/Untils/Tool/TmTool.cs +++ b/ProductionSystem/Untils/Tool/TmTool.cs @@ -19,13 +19,17 @@ namespace ProductionSystem.Untils.Tool public class TmTool { - - public static void CleanStatus() + public static void CleanSt() { - WritePlc(SiTong1, 0); WritePlc(SiTong2, 0); WritePlc(PengZhang1, 0); + } + + public static void CleanStatus() + { + CleanSt(); + WritePlc(ShuiBeng1,0); WritePlc(ShuiBeng2,0); WritePlc(ShuiBeng3,0); From 6c7172b17d3cb43fe264371e7945e4fa2e91e539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 16 Apr 2024 21:28:50 +0800 Subject: [PATCH 5/6] 23 --- ProductionSystem/Forms/HomeFormInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index ba2285e..ac597c5 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -985,7 +985,7 @@ namespace ProductionSystem.Forms private void Step7() { TmTool.CleanSt(); - Thread.Sleep(1000); + Thread.Sleep(300); if (D1004) { TmTool.SiTong(ModeTypeEnum.BZ7_DB, 1); @@ -1007,7 +1007,7 @@ namespace ProductionSystem.Forms { TmTool.CleanSt(); - Thread.Sleep(1000); + Thread.Sleep(300); var ba = ModeTypeEnum.BZ5_DB; //上位机将四通阀1运行到模式1,四通阀2运行到模式1,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) @@ -1032,7 +1032,7 @@ namespace ProductionSystem.Forms { TmTool.CleanSt(); - Thread.Sleep(1000); + Thread.Sleep(300); //上位机将四通阀1运行到模式6,四通阀2运行到模式6,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) var ba = ModeTypeEnum.BZ6_DB; //上位机将四通阀1运行到模式1,四通阀2运行到模式1,;反馈模式与设定模式相同时,反馈PLC=1或2(可以/不可以测试) From ff54d57ebd6e9b044511d75b60a3a71722e05111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Tue, 16 Apr 2024 21:52:15 +0800 Subject: [PATCH 6/6] Tome --- ProductionSystem/Untils/Tool/TmTool.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ProductionSystem/Untils/Tool/TmTool.cs b/ProductionSystem/Untils/Tool/TmTool.cs index 4620c1f..d79ba31 100644 --- a/ProductionSystem/Untils/Tool/TmTool.cs +++ b/ProductionSystem/Untils/Tool/TmTool.cs @@ -165,11 +165,12 @@ namespace ProductionSystem.Untils.Tool eq = EquipmentEnum.FKSTF2ZT_DB; } int val = stf1.TargetVal.ToDouble().ToInt(); - val = 1; + if (reset) { //四通阀回复出场 val = 3; + } SitongTool sitongTool = new SitongTool(stf1.Com, val);