From c672a491462ec56ac13beca47908e196a99f31d8 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Wed, 21 Dec 2016 15:56:52 +0100 Subject: [PATCH] Genesis (UInt128) bug fix, ver. 2.12.429 --- .../BenchControl/Elde/ControlComWrap.cs | 36 ++++++++++--------- TestBenchFramework/Properties/AssemblyInfo.cs | 4 +-- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs index 82b1315bb..3615d5bb6 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlComWrap.cs @@ -44,7 +44,7 @@ namespace TBF.BenchControl.Elde public float Temperature(int tmpNr0) { return ctrlBrdComponent.temperature[tmpNr0]; } public RegulValveState RegulValveState(int rvNr1) { return (RegulValveState)ctrlBrdComponent.rValveStatus[rvNr1 - 1]; } #if GENESIS || BERLIN - public UInt128 RRoute { get { return ((UInt128)ctrlBrdComponent.rRoute << 64) | (UInt128)ctrlBrdComponent.rRoute; } } + public UInt128 RRoute { get { return ((UInt128)ctrlBrdComponent.rRouteH << 64) | (UInt128)ctrlBrdComponent.rRoute; } } #else public UInt128 RRoute { get { return ctrlBrdComponent.rRoute; } } #endif @@ -292,20 +292,22 @@ namespace TBF.BenchControl.Elde if (bit39) route = route | 0x0000008000000000; log.DebugFormat("SendCommand route = {0}", Utils.ShowRoute(route)); #endif - log.InfoFormat("SendCommand(Cmd={0},Ref#={1},Route={2} {3} {4} {5},TotalPls={6},MassPls={7},TstM={8},filt={9},FM=[{10}{11}{12}{13}{14}{15}],Reg={16},ShrtImp={17},Stop={18})", - cmd, refFlowMeterNr, /// 0, 1 - ((route >> 48) & 0xFFFF).ToString("X4"), /// 2 - ((route >> 32) & 0xFFFF).ToString("X4"), /// 3 - ((route >> 16) & 0xFFFF).ToString("X4"), /// 4 - (route & 0xFFFF).ToString("X4"), /// 5 - totalRefPulses, massRefPulses, testMethods, filterConstant, /// 6, 7, 8, 9 - fmFreq[0].ToString(), /// 10 - (fmFreq.Length > 1) ? ("," + fmFreq[1].ToString()) : "", /// 11 - (fmFreq.Length > 2) ? ("," + fmFreq[2].ToString()) : "", /// 12 - (fmFreq.Length > 3) ? ("," + fmFreq[3].ToString()) : "", /// 13 - (fmFreq.Length > 4) ? ("," + fmFreq[4].ToString()) : "", /// 14 - (fmFreq.Length > 5) ? ("," + fmFreq[5].ToString()) : "", /// 15 - regConst, shortImp, stopDevs); /// 16, 17, 18 + log.InfoFormat("SendCommand(Cmd={0},Ref#={1},Route={2} {3} {4} {5} {6},TotalPls={7},MassPls={8},TstM={9},filt={10},FM=[{11}{12}{13}{14}{15}{16}],Reg={17},ShrtImp={18},Stop={19})", + cmd, /// 0 + refFlowMeterNr, /// 1 + ((route >> 64) & 0xFFFF).ToString("X4"), /// 2 + ((route >> 48) & 0xFFFF).ToString("X4"), /// 3 + ((route >> 32) & 0xFFFF).ToString("X4"), /// 4 + ((route >> 16) & 0xFFFF).ToString("X4"), /// 5 + (route & 0xFFFF).ToString("X4"), /// 6 + totalRefPulses, massRefPulses, testMethods, filterConstant, /// 7, 8, 9, 10 + fmFreq[0].ToString(), /// 11 + (fmFreq.Length > 1) ? ("," + fmFreq[1].ToString()) : "", /// 12 + (fmFreq.Length > 2) ? ("," + fmFreq[2].ToString()) : "", /// 13 + (fmFreq.Length > 3) ? ("," + fmFreq[3].ToString()) : "", /// 14 + (fmFreq.Length > 4) ? ("," + fmFreq[4].ToString()) : "", /// 15 + (fmFreq.Length > 5) ? ("," + fmFreq[5].ToString()) : "", /// 16 + regConst, shortImp, stopDevs); /// 17, 18, 19 #if DN100 || MUNICH ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, (uint)totalRefPulses, (uint)testMethods, @@ -314,7 +316,7 @@ namespace TBF.BenchControl.Elde ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)route, (uint)totalRefPulses, (uint)testMethods, filterConstant, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs); #elif GENESIS || BERLIN - uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses }; + uint[] pulsesArr = new uint[] { (uint)totalRefPulses, (uint)massRefPulses }; ctrlBrdComponent.SendCommand((uint)cmd, (byte)refFlowMeterNr, (ulong)(route & (UInt128)0xFFFFFFFFFFFFFFFF), (ulong)(route >> 64), pulsesArr, (uint)testMethods, filterConstant, fmFreq, (uint)regConst, (uint)shortImp, (uint)stopDevs); #else /// if IPERLST || IPERLST_SPECIAL || MALTA_WSD25 || SLM_50 || SLM_END || WARSAW_END @@ -326,7 +328,7 @@ namespace TBF.BenchControl.Elde UInt128 bufferedRoute = route; if (lastRoute != bufferedRoute) { - string routeStr = bufferedRoute.ToString("x16"); + string routeStr = bufferedRoute.ToString("x24"); log.InfoFormat("DoSendCommand() Route = {0}", routeStr); Program.MainWnd.UpdateRoute(routeStr); lastRoute = bufferedRoute; diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 54bceb82f..edbdf3172 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.12.426.1")] -[assembly: AssemblyFileVersion("2.12.426.1")] +[assembly: AssemblyVersion("2.12.429.1")] +[assembly: AssemblyFileVersion("2.12.429.1")]