diff --git a/TBF/BenchControl/Dummy/RegulValve/RegulValve.cs b/TBF/BenchControl/Dummy/RegulValve/RegulValve.cs index faac39dfd..d708a2f23 100644 --- a/TBF/BenchControl/Dummy/RegulValve/RegulValve.cs +++ b/TBF/BenchControl/Dummy/RegulValve/RegulValve.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2017 Sensus Metering Systems +/// Copyright (c) 2017-2019 Sensus Slovensko a.s. /// using System.Collections.Generic; using log4net; @@ -58,9 +58,9 @@ namespace TBF.BenchControl.Dummy.RegulValve /// Timeout in [s] /// SetFlowOp instance public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow, int timeout) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout) { - return new SetFlowOp(this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout); + return new SetFlowOp(this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, timeout); } /// @@ -74,9 +74,9 @@ namespace TBF.BenchControl.Dummy.RegulValve /// Timeout in [s] /// SetFlowOp instance public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow, int timeout, float filterConstant) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout, float filterConstant) { - return new SetFlowOp(this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout, true); + return new SetFlowOp(this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, timeout, true); } /// diff --git a/TBF/BenchControl/Dummy/RegulValve/SetFlowOp.cs b/TBF/BenchControl/Dummy/RegulValve/SetFlowOp.cs index 495f9d0cc..bc5df35bd 100644 --- a/TBF/BenchControl/Dummy/RegulValve/SetFlowOp.cs +++ b/TBF/BenchControl/Dummy/RegulValve/SetFlowOp.cs @@ -48,7 +48,7 @@ namespace TBF.BenchControl.Dummy.RegulValve /// true = Leave the measurement running after op. stop /// Only Elde.Valve flow are used, other flow on the lists are ignored public SetFlowOp(IRegulValve regulValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow, int timeout, bool leaveMeasurementRunning) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout, bool leaveMeasurementRunning) { this.regulValve = regulValve as RegulValve; if (this.regulValve == null) throw new ArgumentNullException("regValve is null or not Dummy.RegulValve"); @@ -73,8 +73,8 @@ namespace TBF.BenchControl.Dummy.RegulValve /// Events: FlowSet /// public SetFlowOp(IRegulValve regValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow, int timeout) - : this(regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout, false) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout) + : this(regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, timeout, false) { } @@ -83,8 +83,8 @@ namespace TBF.BenchControl.Dummy.RegulValve /// Events: FlowSet /// public SetFlowOp(IRegulValve regValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow) - : this(regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, int.MaxValue, false) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow) + : this(regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, int.MaxValue, false) { } diff --git a/TBF/BenchControl/Elde/RegulValve/RegulValve.cs b/TBF/BenchControl/Elde/RegulValve/RegulValve.cs index 991a14e95..a3261ecd6 100644 --- a/TBF/BenchControl/Elde/RegulValve/RegulValve.cs +++ b/TBF/BenchControl/Elde/RegulValve/RegulValve.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2018 Sensus Slovensko a.s. +/// Copyright (c) 2013-2019 Sensus Slovensko a.s. /// using System; using System.Collections.Generic; @@ -154,9 +154,10 @@ namespace TBF.BenchControl.Elde.RegulValve /// Measured flow [m3/h] /// Timeout in [s] /// SetFlowOp instance - public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, int timeout) + public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, + DoubleBox measuredFlow, int timeout) { - return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, RegulValveCfg.ReTryCommands, timeout); + return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, RegulValveCfg.ReTryCommands, timeout); } /// @@ -169,9 +170,10 @@ namespace TBF.BenchControl.Elde.RegulValve /// Measured flow [m3/h] /// Timeout in [s] /// SetFlowOp instance - public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, int timeout, float filterConstant) + public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, + DoubleBox measuredFlow, int timeout, float filterConstant) { - return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, RegulValveCfg.ReTryCommands, timeout, true); + return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, RegulValveCfg.ReTryCommands, timeout, true); } /// diff --git a/TBF/BenchControl/Elde/RegulValve/SetFlowOp.cs b/TBF/BenchControl/Elde/RegulValve/SetFlowOp.cs index 9b3380d91..940f95b0d 100644 --- a/TBF/BenchControl/Elde/RegulValve/SetFlowOp.cs +++ b/TBF/BenchControl/Elde/RegulValve/SetFlowOp.cs @@ -26,7 +26,9 @@ namespace TBF.BenchControl.Elde.RegulValve readonly double requiredFlowHi; readonly double reqFlowAve; readonly float pidCoef; - readonly int timeout; + readonly int[] filters; + readonly int shortPulses; + readonly int timeout; readonly bool leaveMeasurementRunning; readonly bool reTryCommands; @@ -78,9 +80,8 @@ namespace TBF.BenchControl.Elde.RegulValve /// Timeout for the flow setting in [s] /// true = Leave the measurement running after op. stop /// Only Elde.Valve flow are used, other flow on the lists are ignored - public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regulValve, IFlowMeter flowMeter, - double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox flowBox, - bool reTryCmds, int timeout, bool leaveMeasurementRunning) + public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regulValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox flowBox, bool reTryCmds, int timeout, bool leaveMeasurementRunning) { if (controlBoard == null) throw new ArgumentNullException("ctrlBoard"); this.controlBoard = controlBoard; @@ -99,6 +100,8 @@ namespace TBF.BenchControl.Elde.RegulValve this.requiredFlowLo = (0.7 * requiredFlowLo) + (0.3 * this.reqFlowAve); /// Move the lower limit 15% of the range up this.requiredFlowHi = (0.7 * requiredFlowHi) + (0.3 * this.reqFlowAve); /// Move the upper limit 15% of the range down this.pidCoef = pidCoef; + this.filters = filters; + this.shortPulses = shortPulses; if (flowBox == null) throw new ArgumentNullException("flowBox"); this.flowBox = flowBox; @@ -116,9 +119,9 @@ namespace TBF.BenchControl.Elde.RegulValve /// Set required water flow - Do not leave the measurement running. /// Events: FlowSet /// - public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, - double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox flowbox, bool reTryCmds, int timeout) - : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, flowbox, reTryCmds, timeout, false) + public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox flowbox, bool reTryCmds, int timeout) + : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, flowbox, reTryCmds, timeout, false) { } @@ -126,9 +129,9 @@ namespace TBF.BenchControl.Elde.RegulValve /// Set required water flow - No timeout. /// Events: FlowSet /// - public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, - double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox flowbox, bool reTryCmds) - : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, flowbox, reTryCmds, int.MaxValue, false) + public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox flowbox, bool reTryCmds) + : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, flowbox, reTryCmds, int.MaxValue, false) { } @@ -205,8 +208,7 @@ namespace TBF.BenchControl.Elde.RegulValve StopDevs sd = 0; // '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef' controlBoard.SendCommand(Command.Start, flowMeter.Idx1, controlBoard.Route, - int.MaxValue, int.MaxValue, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + int.MaxValue, int.MaxValue, tm, filters, (int)pidCoef, shortPulses, sd); } /// Run this operation @@ -254,8 +256,7 @@ namespace TBF.BenchControl.Elde.RegulValve StopDevs sd = 0; // '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef' controlBoard.SendCommand(Command.Start, flowMeter.Idx1, controlBoard.Route, - int.MaxValue, int.MaxValue, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + int.MaxValue, int.MaxValue, tm, filters, (int)pidCoef, shortPulses, sd); return Event.None; } else if (opState == OpState.ValveMoveToPosition1) @@ -456,8 +457,7 @@ namespace TBF.BenchControl.Elde.RegulValve TestMethods tm = 0; StopDevs sd = StopDevs.RegValveRegulation; controlBoard.SendCommand(Command.Stop, flowMeter.Idx1, controlBoard.Route, - 50000, 50000, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + 50000, 50000, tm, filters, (int)pidCoef, shortPulses, sd); } } } diff --git a/TBF/BenchControl/Elde/RegulValveCoax/RegulValve.cs b/TBF/BenchControl/Elde/RegulValveCoax/RegulValve.cs index 2865fca1c..1744090e2 100644 --- a/TBF/BenchControl/Elde/RegulValveCoax/RegulValve.cs +++ b/TBF/BenchControl/Elde/RegulValveCoax/RegulValve.cs @@ -60,9 +60,10 @@ namespace TBF.BenchControl.Elde.RegulValveCoax /// Measured flow [m3/h] /// Timeout in [s] /// SetFlowOp instance - public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, int timeout) + public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout) { - return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, RegulValveCfg.ReTryCommands, timeout); + return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, RegulValveCfg.ReTryCommands, timeout); } /// @@ -75,9 +76,10 @@ namespace TBF.BenchControl.Elde.RegulValveCoax /// Measured flow [m3/h] /// Timeout in [s] /// SetFlowOp instance - public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, int timeout, float filterConstant) + public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout, float filterConstant) { - return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, RegulValveCfg.ReTryCommands, timeout, true); + return new SetFlowOp(ControlBoard, this, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, RegulValveCfg.ReTryCommands, timeout, true); } /// diff --git a/TBF/BenchControl/Elde/RegulValveCoax/SetFlowOp.cs b/TBF/BenchControl/Elde/RegulValveCoax/SetFlowOp.cs index b85e3dad1..8076f2256 100644 --- a/TBF/BenchControl/Elde/RegulValveCoax/SetFlowOp.cs +++ b/TBF/BenchControl/Elde/RegulValveCoax/SetFlowOp.cs @@ -26,6 +26,8 @@ namespace TBF.BenchControl.Elde.RegulValveCoax readonly double finalReqFlowHi; readonly double reqFlowAve; readonly float pidCoef; + readonly int[] filters; + readonly int shortPulses; readonly int timeout; readonly bool leaveMeasurementRunning; readonly bool reTryCommands; @@ -78,7 +80,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax /// true = Leave the measurement running after op. stop /// Only Elde.Valve flow are used, other flow on the lists are ignored public SetFlowOp(ControlBoardDev controlBoard, IRegulValve _regulValve, IFlowMeter flowMeter, - double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, + double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, bool reTryCmds, int timeout, bool leaveMeasurementRunning) { if (controlBoard == null) throw new ArgumentNullException("ctrlBoard"); @@ -108,6 +110,8 @@ namespace TBF.BenchControl.Elde.RegulValveCoax this.finalReqFlowLo = (0.7 * requiredFlowLo) + (0.3 * this.reqFlowAve); /// Move the lower limit 15% of the range up this.finalReqFlowHi = (0.7 * requiredFlowHi) + (0.3 * this.reqFlowAve); /// Move the upper limit 15% of the range down this.pidCoef = pidCoef; + this.filters = filters; + this.shortPulses = shortPulses; this.measuredFlow = measuredFlow; this.reTryCommands = reTryCmds; @@ -122,9 +126,9 @@ namespace TBF.BenchControl.Elde.RegulValveCoax /// Set required water flow - Do not leave the measurement running. /// Events: FlowSet /// - public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, - double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, bool reTryCmds, int timeout) - : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, reTryCmds, timeout, false) + public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, bool reTryCmds, int timeout) + : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, reTryCmds, timeout, false) { } @@ -132,9 +136,9 @@ namespace TBF.BenchControl.Elde.RegulValveCoax /// Set required water flow - No timeout. /// Events: FlowSet /// - public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, - double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, bool reTryCmds) - : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, reTryCmds, int.MaxValue, false) + public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, bool reTryCmds) + : this(controlBoard, regValve, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, reTryCmds, int.MaxValue, false) { } @@ -215,8 +219,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax StopDevs sd = 0; // '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef' controlBoard.SendCommand(Command.Start, flowMeterNr, controlBoard.Route, - int.MaxValue, int.MaxValue, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + int.MaxValue, int.MaxValue, tm, filters, (int)pidCoef, shortPulses, sd); } /// Run this operation @@ -266,8 +269,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax StopDevs sd = 0; // '_regulValve.RegulValveCfg.PidCoef' replaced by a casted operation parameter 'pidCoef' controlBoard.SendCommand(Command.Start, flowMeterNr, controlBoard.Route, - int.MaxValue, int.MaxValue, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + int.MaxValue, int.MaxValue, tm, filters, (int)pidCoef, shortPulses, sd); log.DebugFormat(" return Event.None"); return Event.None; } @@ -484,8 +486,7 @@ namespace TBF.BenchControl.Elde.RegulValveCoax TestMethods tm = 0; StopDevs sd = StopDevs.RegValveRegulation; controlBoard.SendCommand(Command.Stop, flowMeterNr, controlBoard.Route, - 50000, 50000, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + 50000, 50000, tm, filters, (int)pidCoef, shortPulses, sd); log.WarnFormat("Stop() SendCommand(Stop, {0}, ...)", flowMeterNr); } diff --git a/TBF/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs b/TBF/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs index d3ceeeb3d..23b28566d 100644 --- a/TBF/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs +++ b/TBF/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs @@ -73,10 +73,10 @@ namespace TBF.BenchControl.Elde.RegulValveTandem /// Timeout in [s] /// SetFlowOp instance public IOperation SetFlowOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow, int timeout) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout) { return new SetFlowOp(controlBoard, regulValve, fixedRV, fixedPctLo, fixedPctHi, - flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout); + flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, timeout); } /// @@ -90,10 +90,10 @@ namespace TBF.BenchControl.Elde.RegulValveTandem /// Timeout in [s] /// SetFlowOp instance public IOperation SetFlowAndMeasureOp(GenericDevices.IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, - float pidCoef, DoubleBox measuredFlow, int timeout, float filterConstant) + float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout, float filterConstant) { return new SetFlowOp(controlBoard, regulValve, fixedRV, fixedPctLo, fixedPctHi, - flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout, true); + flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, timeout, true); } /// diff --git a/TBF/BenchControl/Elde/RegulValveTandem/SetFlowOp.cs b/TBF/BenchControl/Elde/RegulValveTandem/SetFlowOp.cs index 8ca011973..e9f70232d 100644 --- a/TBF/BenchControl/Elde/RegulValveTandem/SetFlowOp.cs +++ b/TBF/BenchControl/Elde/RegulValveTandem/SetFlowOp.cs @@ -30,6 +30,8 @@ namespace TBF.BenchControl.Elde.RegulValveTandem readonly double finalReqFlowHi; readonly double reqFlowAve; readonly float pidCoef; + readonly int[] filters; + readonly int shortPulses; readonly int timeout; readonly bool leaveMeasurementRunning; @@ -77,7 +79,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem /// true = Leave the measurement running after op. stop /// Only Elde.Valve flow are used, other flow on the lists are ignored public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regV, IRegulValve fxdRV, float fxdPctLo, float fxdPctHi, - IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, + IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout, bool leaveMeasurementRunning) { if (controlBoard == null) throw new ArgumentNullException("ctrlBoard"); @@ -114,6 +116,8 @@ namespace TBF.BenchControl.Elde.RegulValveTandem this.finalReqFlowLo = (0.7 * requiredFlowLo) + (0.3 * this.reqFlowAve); /// Move the lower limit 15% of the range up this.finalReqFlowHi = (0.7 * requiredFlowHi) + (0.3 * this.reqFlowAve); /// Move the upper limit 15% of the range down this.pidCoef = pidCoef; + this.filters = filters; + this.shortPulses = shortPulses; this.measuredFlow = measuredFlow; this.timeout = timeout; @@ -128,8 +132,8 @@ namespace TBF.BenchControl.Elde.RegulValveTandem /// Events: FlowSet /// public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IRegulValve fixedRV, float fixedPctLo, float fixedPctHi, - IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow, int timeout) - : this(controlBoard, regValve, fixedRV, fixedPctLo, fixedPctHi, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, timeout, false) + IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout) + : this(controlBoard, regValve, fixedRV, fixedPctLo, fixedPctHi, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, timeout, false) { } @@ -138,8 +142,8 @@ namespace TBF.BenchControl.Elde.RegulValveTandem /// Events: FlowSet /// public SetFlowOp(ControlBoardDev controlBoard, IRegulValve regValve, IRegulValve fixedRV, float fixedPctLo, float fixedPctHi, - IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, DoubleBox measuredFlow) - : this(controlBoard, regValve, fixedRV, fixedPctLo, fixedPctHi, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, measuredFlow, int.MaxValue, false) + IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow) + : this(controlBoard, regValve, fixedRV, fixedPctLo, fixedPctHi, flowMeter, requiredFlowLo, requiredFlowHi, pidCoef, filters, shortPulses, measuredFlow, int.MaxValue, false) { } @@ -220,8 +224,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem StopDevs sd = 0; // '_regulValve.RegulValveTandemCfg.PidCoef' replaced by a casted operation parameter 'pidCoef' controlBoard.SendCommand(Command.Start, flowMeterNr, controlBoard.Route, - int.MaxValue, int.MaxValue, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, (int)pidCoef, 0, sd); + int.MaxValue, int.MaxValue, tm, filters, (int)pidCoef, shortPulses, sd); } /// Run this operation @@ -375,8 +378,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem TestMethods tm = 0; StopDevs sd = StopDevs.RegValveRegulation; controlBoard.SendCommand(Command.Stop, flowMeterNr, controlBoard.Route, - 50000, 50000, tm, - new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }, 20, 0, sd); + 50000, 50000, tm, filters, (int)pidCoef, shortPulses, sd); } } } diff --git a/TBF/BenchControl/GenericDevices/IRegulValve.cs b/TBF/BenchControl/GenericDevices/IRegulValve.cs index 2a996e5b3..1f446b8ec 100644 --- a/TBF/BenchControl/GenericDevices/IRegulValve.cs +++ b/TBF/BenchControl/GenericDevices/IRegulValve.cs @@ -40,7 +40,7 @@ namespace TBF.BenchControl.GenericDevices /// Measured flow [m3/h] /// Timeout in [s] /// SetFlowOp instance - IOperation SetFlowOp(IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, + IOperation SetFlowOp(IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout); /// @@ -54,7 +54,7 @@ namespace TBF.BenchControl.GenericDevices /// Timeout in [s] /// Passed to SendCommand() as argument filterContant /// SetFlowOp instance - IOperation SetFlowAndMeasureOp(IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, + IOperation SetFlowAndMeasureOp(IFlowMeter flowMeter, double requiredFlowLo, double requiredFlowHi, float pidCoef, int[] filters, int shortPulses, DoubleBox measuredFlow, int timeout, float filter); /// diff --git a/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 00e019a71..b7ee7fa4a 100644 --- a/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TBF/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -57,9 +57,6 @@ namespace TBF.BenchControl.TestMethods.Adjustment { float simulatedError = 4.5f; /// % - IList e; /// Events from currently running operations - Event retVal = Event.Done; - int rangeIx = 0; /// Default range, used for non-Elde flowmeters if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter) { @@ -81,10 +78,27 @@ namespace TBF.BenchControl.TestMethods.Adjustment } } + + IList e; /// Events from currently running operations + Event retVal = Event.Done; Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -204,7 +218,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -266,22 +280,15 @@ namespace TBF.BenchControl.TestMethods.Adjustment /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index 02ea08f5e..45bf2c0fd 100644 --- a/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TBF/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -31,6 +31,19 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection IList e = new List(); /// Events from currently running operations + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IScale scale = outPath.Scale as IScale; if (scale == null) { @@ -178,22 +191,15 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); @@ -237,7 +243,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperations(measureOperations) - .AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec, (float)test.TolerRed)) + .AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec, (float)test.TolerRed)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -442,7 +448,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperations(measureOperations) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -464,7 +470,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperations(measureOperations) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, qfrom_detected, qto_detected, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, qfrom_detected, qto_detected, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) //.AddOp(pOut.RegulValve.SetPositionOp(35.0f, 38.0f, uint.MaxValue)) .EnterState(); do { diff --git a/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index 854dc4ba4..ac6c6cbf2 100644 --- a/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TBF/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -51,10 +51,27 @@ namespace TBF.BenchControl.TestMethods.Endurance } } + + IList e; /// Events from currently running operations + Event retVal = Event.Done; Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -87,9 +104,6 @@ namespace TBF.BenchControl.TestMethods.Endurance LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h] int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f); - Event retVal = Event.Done; - IList e; /// Events from currently running operations - //==================================== loop: /// Read pressure and temperature once before calling Bridge.OnTestSelected(...) @@ -139,7 +153,7 @@ namespace TBF.BenchControl.TestMethods.Endurance State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -205,22 +219,15 @@ namespace TBF.BenchControl.TestMethods.Endurance /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs b/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs index 1be25f12b..76e65065d 100644 --- a/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStart/FixedStartSeq.cs @@ -31,27 +31,11 @@ namespace TBF.BenchControl.TestMethods.FixedStart HeatMeters.TestParams heatMetersTestParams, Config.Entities.DebugMode debugLevel) { - IList e = new List(); /// Events from currently running operations - - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; - if (sensPath != null && sensPath.RegisterReaders != null) - { - foreach (var rr in sensPath.RegisterReaders) - { - TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (eldeRR != null && eldeRR.Position >= 1 && eldeRR.Position <= 8) - { - filters[eldeRR.Position - 1] = eldeRR.Filter; - } - } - } - IScale scale = outPath.Scale as IScale; if (scale == null) { Bridge.OnError(this, Strings.Missing_a_scale); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; + new List { Event.ConfigurationError }; /// or Event.UiCmdStop } int rangeIx = 0; /// Default range, used for non-Elde flowmeters @@ -71,16 +55,30 @@ namespace TBF.BenchControl.TestMethods.FixedStart if (rangeIx == -1) { Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + new List { Event.ConfigurationError }; /// or Event.UiCmdStop + } } - - Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; - checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state - processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null); + IList e; /// Events from currently running operations + Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; + checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state + processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null); + + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -321,7 +319,7 @@ namespace TBF.BenchControl.TestMethods.FixedStart State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperation(heatMetersPromptOp) .EnterState(); do { diff --git a/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index 93126e079..38a307cea 100644 --- a/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -66,6 +66,20 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -210,7 +224,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced State.Create("FixedStartAdvanced : Setting the flow") .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -256,22 +270,15 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs b/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs index fcee443bf..641cbd25f 100644 --- a/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs @@ -350,7 +350,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperation(heatMetersPromptOp) .EnterState(); do { diff --git a/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index eee1c1647..87ec885b8 100644 --- a/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -331,7 +331,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperation(heatMetersPromptOp) .EnterState(); do { diff --git a/TBF/BenchControl/TestMethods/FixedStartTankCollection/FixedStartTankCollectionSeq.cs b/TBF/BenchControl/TestMethods/FixedStartTankCollection/FixedStartTankCollectionSeq.cs index 26eecbb1e..76b881cb8 100644 --- a/TBF/BenchControl/TestMethods/FixedStartTankCollection/FixedStartTankCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FixedStartTankCollection/FixedStartTankCollectionSeq.cs @@ -272,7 +272,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartTankCollection State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); diff --git a/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 536d3579a..3295576f7 100644 --- a/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -36,7 +36,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStart return Simulate(test, repetitionNr, isLastRepetition, compoundTestParams, heatMetersTestParams, debugLevel); } - IList e; /// Events from currently running operations int rangeIx = 0; /// Default range, used for non-Elde flowmeters if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter) @@ -55,15 +54,31 @@ namespace TBF.BenchControl.TestMethods.FlyingStart if (rangeIx == -1) { Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions); - return new List { Event.ConfigurationError }; /// or Event.UiCmdStop ??? + return new List { Event.ConfigurationError }; } } - Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; + IList e; /// Events from currently running operations + Event retVal = Event.Done; + Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -76,8 +91,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStart if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1)); if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2)); - Event retVal = Event.Done; - LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h] int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f); @@ -199,7 +212,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperation(heatMetersPromptOp) .EnterState(); do { @@ -300,22 +313,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStart /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs index 1b0f1d7cb..196400dd5 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs @@ -39,15 +39,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl } - IList e = new List(); /// Events from currently running operations - IScale scale = outPath.Scale as IScale; if (scale == null) { Bridge.OnError(this, Strings.Missing_a_scale); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + new List { Event.ConfigurationError }; + } int rangeIx = 0; /// Default range, used for non-Elde flowmeters if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter) @@ -66,23 +63,37 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl if (rangeIx == -1) { Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + new List { Event.ConfigurationError }; + } } if (test.Volume > scale.Capacity * Constants.TankFullFactor) { Bridge.OnError(this, Strings.Test_volume_exceeds_the_scale_capacity); - e.Add(Event.UiCmdStop); - return e; - } + new List { Event.ConfigurationError }; + } - Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; + IList e; /// Events from currently running operations + Event retVal = Event.Done; + Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -95,8 +106,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1)); if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2)); - Event retVal = Event.Done; - float nextTestVolume = (singleTestParams != null) ? singleTestParams.NextTestVolume : ((compoundTestParams != null) ? compoundTestParams.NextTestVolume : heatMetersTestParams.NextTestVolume); @@ -289,7 +298,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperation(heatMetersPromptOp) .EnterState(); do { @@ -389,22 +398,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartFirstRepetWithMassColl /// /// Find successfully detected ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs index 6a6e74ce0..09e0237e7 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs @@ -33,15 +33,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative HeatMeters.TestParams heatMetersTestParams, Config.Entities.DebugMode debugLevel) { - IList e = new List(); /// Events from currently running operations - IScale scale = outPath.Scale as IScale; if (scale == null) { Bridge.OnError(this, Strings.Missing_a_scale); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + return new List { Event.ConfigurationError }; + } int rangeIx = 0; /// Default range, used for non-Elde flowmeters if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter) @@ -60,17 +57,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative if (rangeIx == -1) { Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + return new List { Event.ConfigurationError }; + } } if (test.Volume > scale.Capacity * Constants.TankFullFactor) { Bridge.OnError(this, Strings.Test_volume_exceeds_the_scale_capacity); - e.Add(Event.UiCmdStop); - return e; - } + return new List { Event.ConfigurationError }; + } string vlvName = (singleTestParams != null) ? singleTestParams.ValveName @@ -80,8 +75,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative if (compareValve == null) { Bridge.OnError(this, Strings.Missing_a_valve_for_comparative_method); - e.Add(Event.UiCmdStop); - return e; + return new List { Event.ConfigurationError }; } int stabTime = (singleTestParams != null) ? singleTestParams.StabTime @@ -93,10 +87,26 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative DoubleBox measuredRefMass = new DoubleBox(); - Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; + IList e; /// Events from currently running operations + Event retVal = Event.Done; + Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -109,8 +119,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1)); if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2)); - Event retVal = Event.Done; - FloatBox switchTimeStart = new FloatBox(0.001f); /// in seconds, initial value is 1 ms FloatBox switchTimeEnd = new FloatBox(0.001f); /// in seconds, initial value is 1 ms @@ -295,7 +303,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperation(heatMetersPromptOp) .EnterState(); do { @@ -396,22 +404,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollComparative /// /// Find successfully detected ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; - IList rois = new List(); + IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs index 307262111..386263881 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs @@ -40,15 +40,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged } - IList e = new List(); /// Events from currently running operations - IScale scale = outPath.Scale as IScale; if (scale == null) { Bridge.OnError(this, Strings.Missing_a_scale); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + new List { Event.ConfigurationError }; + } int rangeIx = 0; /// Default range, used for non-Elde flowmeters if (outPath.FlowMeter is Elde.FlowMeter.FlowMeter) @@ -67,9 +64,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged if (rangeIx == -1) { Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + new List { Event.ConfigurationError }; + } } float volumeToTank = (singleTestParams != null) ? singleTestParams.VolumeToTank @@ -77,20 +73,33 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged if (volumeToTank > scale.Capacity * Constants.TankFullFactor) { Bridge.OnError(this, Strings.Volume_to_tank_exceeds_the_scale_capacity); - e.Add(Event.UiCmdStop); - return e; + new List { Event.ConfigurationError }; } if (volumeToTank > test.Volume) { Bridge.OnError(this, Strings.Volume_to_tank_is_larger_then_the_test_volume); - e.Add(Event.UiCmdStop); - return e; + new List { Event.ConfigurationError }; } - Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; + IList e = new List(); /// Events from currently running operations + Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, heatMetersTestParams != null); + + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); @@ -291,7 +300,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged //------------------------------------------------ State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperations(readTempPressOps) .AddOperation(heatMetersPromptOp) .EnterState(); @@ -393,22 +402,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged /// /// Find successfully detected ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 22ec2ffae..dd7d2f2c8 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -75,6 +75,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection return new List { Event.UiCmdStop }; } + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } IList e; /// Events from currently running operations Event retVal = Event.Done; @@ -278,7 +290,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection //------------------------------------------------ State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .AddOperations(readTempPressOps) .AddOperation(heatMetersPromptOp) .EnterState(); @@ -380,21 +392,14 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection /// /// Find successfully detected ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } } /// Find cameras diff --git a/TBF/BenchControl/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs b/TBF/BenchControl/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs index 893a0c0c7..5037d6dd1 100644 --- a/TBF/BenchControl/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs +++ b/TBF/BenchControl/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs @@ -35,13 +35,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection return Simulate(test, repetitionNr, isLastRepetition, singleTestParams, compoundTestParams); } - IList e = new List(); /// Events from currently running operations if ((outPath.Scale == null) || !(outPath.Scale is IVolumeMeter)) { Bridge.OnError(this, Strings.Missing_a_tank_with_volume_measurement); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; + return new List { Event.ConfigurationError }; } IVolumeMeter tank = outPath.Scale as IVolumeMeter; @@ -64,23 +62,37 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection if (rangeIx == -1) { Bridge.OnError(this, Strings.Flow_meter_temperature_range_does_not_fit_this_test_conditions); - e.Add(Event.ConfigurationError); /// or Event.UiCmdStop - return e; - } + return new List { Event.ConfigurationError }; + } } if (test.Volume > outPath.Scale.Capacity * Constants.TankFullFactor) { Bridge.OnError(this, Strings.Test_volume_exceeds_the_scale_capacity); - e.Add(Event.UiCmdStop); - return e; - } + return new List { Event.ConfigurationError }; + } - Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; + IList e; /// Events from currently running operations + Event retVal = Event.Done; + Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -93,8 +105,6 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold1.ReadTempOp(ref TempRefLo1)); if (heatMetersPath != null) readTempPressOps.Add(heatMetersPath.TMeterRefCold2.ReadTempOp(ref TempRefLo2)); - Event retVal = Event.Done; - FloatBox switchTimeStart = new FloatBox(0.001f); /// in seconds, initial value is 1 ms FloatBox switchTimeEnd = new FloatBox(0.001f); /// in seconds, initial value is 1 ms @@ -222,7 +232,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -277,22 +287,15 @@ namespace TBF.BenchControl.TestMethods.FlyingStartTankCollection /// /// Find successfully detected ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; - IList rois = new List(); + IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/PulsesTest/PulsesTestSeq.cs b/TBF/BenchControl/TestMethods/PulsesTest/PulsesTestSeq.cs index b71f402be..195eacb12 100644 --- a/TBF/BenchControl/TestMethods/PulsesTest/PulsesTestSeq.cs +++ b/TBF/BenchControl/TestMethods/PulsesTest/PulsesTestSeq.cs @@ -84,6 +84,20 @@ namespace TBF.BenchControl.TestMethods.PulsesTest checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -202,7 +216,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTest State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -264,22 +278,15 @@ namespace TBF.BenchControl.TestMethods.PulsesTest /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/PulsesTestManual/PulsesTestManualSeq.cs b/TBF/BenchControl/TestMethods/PulsesTestManual/PulsesTestManualSeq.cs index f5e2bee29..ce4609a2d 100644 --- a/TBF/BenchControl/TestMethods/PulsesTestManual/PulsesTestManualSeq.cs +++ b/TBF/BenchControl/TestMethods/PulsesTestManual/PulsesTestManualSeq.cs @@ -85,6 +85,20 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false); + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -204,7 +218,7 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); @@ -266,22 +280,15 @@ namespace TBF.BenchControl.TestMethods.PulsesTestManual /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); diff --git a/TBF/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs b/TBF/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs index 63cc81103..6c18eaae7 100644 --- a/TBF/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs +++ b/TBF/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs @@ -25,6 +25,20 @@ namespace TBF.BenchControl.TestMethods.RoiDetection checkUiOp = new Operations.CheckUIOp(true); processDataLoggingOp = null; + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -129,7 +143,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection State.Create(string.Format("{0}({1}) : Setting the flow", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperations(readTempPressOps) - .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec)) + .AddOperation(outPath.RegulValve.SetFlowOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); diff --git a/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs b/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs index 58f8194cb..2617e6268 100644 --- a/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs +++ b/TBF/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs @@ -37,10 +37,25 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest return new List { Event.Done }; } + IList e; /// Events from currently running operations Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state + + int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; + if (sensPath != null && sensPath.RegisterReaders != null) + { + foreach (var rr in sensPath.RegisterReaders) + { + TBF.BenchControl.Elde.RegisterReader.RegisterReader eldeRR = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; + if ((eldeRR != null) && (eldeRR.Position >= 1) && (eldeRR.Position <= 8)) + { + filters[eldeRR.Position - 1] = eldeRR.Filter; + } + } + } + IList readTempPressOps = new List(); if (benchPath.TempMtrUp != null) readTempPressOps.Add(benchPath.TempMtrUp.ReadTempOp(ref TempUp)); if (benchPath.TempMtrDown != null) readTempPressOps.Add(benchPath.TempMtrDown.ReadTempOp(ref TempDown)); @@ -100,22 +115,15 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest /// /// Find ROI-s - int[] filters = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; IList rois = new List(); foreach (var rr in sensPath.RegisterReaders) { - TBF.BenchControl.Elde.RegisterReader.RegisterReader regr = rr as TBF.BenchControl.Elde.RegisterReader.RegisterReader; - if (regr != null) + GenericDevices.IRoi cameraRoI = rr as GenericDevices.IRoi; + if ((cameraRoI != null) && cameraRoI.Detected) { - if (regr.Position >= 1 && regr.Position <= 8) { filters[regr.Position - 1] = regr.Filter; } + rois.Add(cameraRoI); } - - GenericDevices.IRoi roi = rr as GenericDevices.IRoi; - if (roi != null && roi.Detected) - { - rois.Add(roi); - } - } + } /// Find cameras IList cameras = new List(); @@ -163,7 +171,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest .AddOperation(checkUiOp) .AddOperations(readTempPressOps) .AddOperations(measureOperations) - .AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, RefFlow, FlowSettingTimeoutSec, (float)test.TolerRed)) + .AddOperation(outPath.RegulValve.SetFlowAndMeasureOp(outPath.FlowMeter, test.Qfrom, test.Qto, outPath.PidCoef, filters, (test.TolerRed == 0) ? 0 : 1, RefFlow, FlowSettingTimeoutSec, (float)test.TolerRed)) .EnterState(); do { e = StateMachine.WaitRunDevsRunOps(); diff --git a/TBF/Forms/PreviousResultCtrl.cs b/TBF/Forms/PreviousResultCtrl.cs index 931a9ff5e..9ec9afdc5 100644 --- a/TBF/Forms/PreviousResultCtrl.cs +++ b/TBF/Forms/PreviousResultCtrl.cs @@ -52,28 +52,27 @@ namespace TBF.Forms passedCountLabel.Text = string.Format("{0}: {1}", Strings.Passed, PassedCount); failedCountLabel.Text = string.Format("{0}: {1}", Strings.Failed, FailedCount); -#if MUNICH - sentCheckBox.Text = Strings.Printed; - sentCheckBox.Checked = Sent; - sendReloadButton.Enabled = true; /// 'Print again' function always available - sendReloadButton.Text = reloadEn ? Strings.Restore : Strings.Print_again; -#elif ORACLE_DB - sentCheckBox.Text = Strings.Sent; - sentCheckBox.Checked = Sent; - sendReloadButton.Enabled = (mode != PreviousResultsMode.Show) || !Sent; switch (mode) { case PreviousResultsMode.Show: sendReloadButton.Text = Strings.Save_again; break; case PreviousResultsMode.Reload: sendReloadButton.Text = Strings.Restore; break; case PreviousResultsMode.Fix: sendReloadButton.Text = Strings.Fix; break; } + showButton.Text = Strings.Show; +#if MUNICH + if (mode == PreviousResultsMode.Show) sendReloadButton.Text = Strings.Print_again; + sentCheckBox.Text = Strings.Printed; + sentCheckBox.Checked = Sent; + sendReloadButton.Enabled = true; /// 'Print again' function always available +#elif ORACLE_DB + sentCheckBox.Text = Strings.Sent; + sentCheckBox.Checked = Sent; + sendReloadButton.Enabled = (mode != PreviousResultsMode.Show) || !Sent; #else sentCheckBox.Visible = false; - sendReloadButton.Enabled = reloadEn; - sendReloadButton.Visible = reloadEn; - sendReloadButton.Text = Strings.Restore; + sendReloadButton.Enabled = (mode != PreviousResultsMode.Show); + sendReloadButton.Visible = (mode != PreviousResultsMode.Show); #endif - showButton.Text = Strings.Show; } public void UpdateSentState(bool sent) @@ -103,6 +102,7 @@ namespace TBF.Forms { parent.OnReload(this, new PreviousResultIdEventArgs(BatchNr)); } +#if TURA_IPERL || TURA_SPECIAL else if (mode == PreviousResultsMode.Fix) { /// Access only to thise who manage production tracing @@ -115,6 +115,7 @@ namespace TBF.Forms parent.OnReloadAndFix(this, new PreviousResultIdEventArgs(BatchNr)); } +#endif } } } diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index c4d013305..b6a94d658 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.1205.0")] -[assembly: AssemblyFileVersion("2.18.1205.0")] +[assembly: AssemblyVersion("2.18.1206.0")] +[assembly: AssemblyFileVersion("2.18.1206.0")] diff --git a/Users/Grp.cs b/Users/Grp.cs index e7d97622f..4c4ece3e2 100644 --- a/Users/Grp.cs +++ b/Users/Grp.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2017 Sensus Metering Systems +/// Copyright (c) 2013-2019 Sensus Slovensko a.s. /// using System; using System.Collections.Generic; @@ -31,7 +31,7 @@ namespace Users Metrologists, CalibrationSpecialists, Administrators, // application / network / database administrator -#if TURA_IPERL +#if TURA_IPERL || TURA_SPECIAL TraceabilityManagement, #endif NrOfGroups, // Number of groups (this is not a GroupID) @@ -55,7 +55,7 @@ namespace Users case GID.Metrologists: return Strings.metrologist; case GID.CalibrationSpecialists: return Strings.calibration_specialist; case GID.Administrators: return Strings.administrator; -#if TURA_IPERL +#if TURA_IPERL || TURA_SPECIAL case GID.TraceabilityManagement: return "správca sledovania vyroby"; #endif default: return Strings.invalid;