diff --git a/ProductionSystem/Forms/HomeFormInfo.cs b/ProductionSystem/Forms/HomeFormInfo.cs index f6e0a16..e691867 100644 --- a/ProductionSystem/Forms/HomeFormInfo.cs +++ b/ProductionSystem/Forms/HomeFormInfo.cs @@ -738,14 +738,16 @@ namespace ProductionSystem.Forms Thread.Sleep(Program.ReadPlcRate); - TmTool.SbUx(ModeTypeEnum.BZ1_DB,true); - Thread.Sleep(1000); - TmTool.SbUx(ModeTypeEnum.BZ1_DB); - // TmTool.SiTong(ModeTypeEnum.BZ1_DB, 1); + + TmTool.SiTong(ModeTypeEnum.BZ1_DB, 1); + // Thread.Sleep(1000); + // TmTool.SbUx(ModeTypeEnum.BZ1_DB); + // Thread.Sleep(1000); + // TmTool.WritePlc(TmTool.SiTong1, 1); - - - + TmTool.SbUx(ModeTypeEnum.BZ1_DB); + TmTool.Dzpy(ModeTypeEnum.BZ1_DB, 1); + return; diff --git a/ProductionSystem/Untils/Tool/ExvTool.cs b/ProductionSystem/Untils/Tool/ExvTool.cs index 2dd8bfb..5513212 100644 --- a/ProductionSystem/Untils/Tool/ExvTool.cs +++ b/ProductionSystem/Untils/Tool/ExvTool.cs @@ -12,8 +12,8 @@ namespace ProductionSystem.Untils.Tool { public class ExvTool:IDisposable { - string com; - int mo; + readonly string com; + readonly int mo; /// /// @@ -47,13 +47,9 @@ namespace ProductionSystem.Untils.Tool var by = me.GetByteDat(); var sendMes = by.ToHex(" "); - XTrace.WriteLine($"膨胀阀[{mo}-{com}]发送报文:{sendMes}"); - - - mfSerialInfo = new MfSerialInfo(0x13, 0x23, com, "19200"); - + XTrace.WriteLine($"膨胀阀[{mo}-{com}]发送报文:{sendMes}"); + mfSerialInfo = new MfSerialInfo(0x13, 0x23, com, "19200"); var b = false; - mfSerialInfo.MsgFunc += (x) => { XTrace.WriteLine($"膨胀阀[{mo}-{com}]收到返回报文{x.ToJson()}"); @@ -102,7 +98,7 @@ namespace ProductionSystem.Untils.Tool }; - mfSerialInfo.SendMsg(sendMes, 60, 500); + mfSerialInfo.SendMsg(sendMes, 60, 100); return b; } diff --git a/ProductionSystem/Untils/Tool/TmTool.cs b/ProductionSystem/Untils/Tool/TmTool.cs index d3ea07c..3528395 100644 --- a/ProductionSystem/Untils/Tool/TmTool.cs +++ b/ProductionSystem/Untils/Tool/TmTool.cs @@ -159,6 +159,7 @@ namespace ProductionSystem.Untils.Tool eq = EquipmentEnum.FKSTF2ZT_DB; } int val = stf1.TargetVal.ToDouble().ToInt(); + val = 1; if (reset) { //四通阀回复出场 @@ -283,7 +284,7 @@ namespace ProductionSystem.Untils.Tool UxTool exv = new UxTool(pzf1.Com,val); var exv1 = exv.ToAction(); - exv1.TryDispose(); + exv.TryDispose(); stopwatch.Stop(); step.Id = Guid.NewGuid().ToString("N"); step.ReturnValue = exv.Val;