Bug fix in Uni.RegValve.SetFlowOp : flowMeter.NominalFreq instead of 2000, ver. 3.1.1903

This commit is contained in:
Milan Hanajik 2022-05-05 10:39:40 +02:00
parent 56d68f0b63
commit 5d23bcade3
7 changed files with 9 additions and 9 deletions

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.1.1902.0")]
[assembly: AssemblyFileVersion("3.1.1902.0")]
[assembly: AssemblyVersion("3.1.1903.0")]
[assembly: AssemblyFileVersion("3.1.1903.0")]

View File

@ -331,7 +331,7 @@ namespace TBF.Rig.TestMethods.CombinedWithDetection
case Event.UiCmdStop: goto stopTest;
}
flowsForDetection[0] = cBrd.RefFrequency * outPath.FlowMeter.NominalFlow / 2000.0;
flowsForDetection[0] = cBrd.RefFrequency * outPath.FlowMeter.NominalFlow / outPath.FlowMeter.NominalFreq;
double diff = RegisterReaders[Math.Max(0, test.Part - 1) * 2 + 1].WMPulses - lastWMPulses[Math.Max(0, test.Part - 1) * 2 + 1];
pulseFreqsForDetection[0] = diff / (double)(StateMachine.Time - lastTime);
lastTime = StateMachine.Time;

View File

@ -274,7 +274,7 @@ namespace TBF.Rig.TestMethods.SensitivityTest
}
/// TODO: !!! The following can only be done for compound meters
flowsForDetection[0] = cBrd.RefFrequency * outPath.FlowMeter.NominalFlow / 2000.0f;
flowsForDetection[0] = cBrd.RefFrequency * outPath.FlowMeter.NominalFlow / outPath.FlowMeter.NominalFreq;
for (int i = 0; i < Data.WMsCount; i++)
{
double diff = (RegisterReaders[i] != null) ? (RegisterReaders[i].WMPulses - lastWMPulses[i]) : 0;

View File

@ -30,7 +30,7 @@ namespace TBF.Rig.Uni.FlowMeter
///
public int Idx1; /// 0 /// 1..7, (DEWA300 : I1+I2=48, I1+I3=80, I2_I3=96, I1+I2+I3=112)
public double NominalFlow; /// 1 /// Nominal flow in m3/h at nominal output frequency (typ. 2000 Hz)
public double NominalFreq; /// 2 /// Nominal flow in m3/h at nominal output frequency (typ. 2000 Hz)
public double NominalFreq; /// 2 /// Nominal frequency in Hz (typ. 2000 Hz)
public string MsrdFormat { get; set; } /// 3
public Unit MsrdUnit { get; set; } /// 4
public Unit TempUnit; /// 5

View File

@ -228,8 +228,8 @@ namespace TBF.Rig.Uni.RegValve
if (StateMachine.Time > setFlowTime)
{
uniCB.SetFlow(false, regV.Idx1, 2000 * currentReqFlowLo / flowMeter.NominalFlow,
2000 * currentReqFlowHi / flowMeter.NominalFlow);
uniCB.SetFlow(false, regV.Idx1, flowMeter.NominalFreq * currentReqFlowLo / flowMeter.NominalFlow,
flowMeter.NominalFreq * currentReqFlowHi / flowMeter.NominalFlow);
log.InfoFormat("Run(): rv#={0} TARGET: flowLo={1} flowHi={2}", regV.Idx1, currentReqFlowLo, currentReqFlowHi);

View File

@ -169,7 +169,7 @@ namespace TBF.Rig.Uni.RegValveAnalog
///
if (flowMtrFreq != 0)
{
double flow = flowMtrFreq * nominalFlow / 2000.0;
double flow = flowMtrFreq * nominalFlow / 2000.0; /// TODO: ???
if (measuredFlow != null) measuredFlow.Val = flow;
if (flow >= reqFlowAve) currentReqFlowLo = finalReqFlowLo;
if (flow <= reqFlowAve) currentReqFlowHi = finalReqFlowHi;

View File

@ -173,7 +173,7 @@ namespace TBF.Rig.Uni.RegValveTandem
///
if (flowMtrFreq != 0)
{
double flow = flowMtrFreq * nominalFlow / 2000.0;
double flow = flowMtrFreq * nominalFlow / 2000.0; /// TODO: ???
if (measuredFlow != null) measuredFlow.Val = flow;
if (flow >= reqFlowAve) currentReqFlowLo = finalReqFlowLo;
if (flow <= reqFlowAve) currentReqFlowHi = finalReqFlowHi;