- many process tab page improvements

- program start and state changes logging improved
- IDC100 measurement related changes: reference pulses in RegisterReader
- etc
This commit is contained in:
Milan Hanajik 2014-10-02 20:56:24 +02:00
parent b6bbad66e7
commit 930db8c379
13 changed files with 92 additions and 67 deletions

View File

@ -1035,16 +1035,25 @@ namespace TBF.BenchControl.Cameras.IdcCamera
{
// do nothing
}
else if (angle == (int)MARK.FALLING)
{
wm_nrBegin = measurements.Count;
wm_timestampBegin = time;
//m_pWnd->PostMessage(WM_USER, EVENT_DATA_READY+m_cameraNr, ID_BEGIN); <------- TODO
else if (angle == (int)MARK.FALLING)
{
if (wm_nrBegin == 0)
{
wm_nrBegin = measurements.Count;
wm_timestampBegin = time;
//m_pWnd->PostMessage(WM_USER, EVENT_DATA_READY+m_cameraNr, ID_BEGIN); <------- TODO
}
else
{
wm_nrEnd = measurements.Count;
wm_timestampEnd = time;
//m_pWnd->PostMessage(WM_USER, EVENT_DATA_READY+m_cameraNr, ID_END); <------- TODO
}
}
else if (angle == (int)MARK.RISING)
{
wm_nrEnd = measurements.Count;
wm_timestampEnd = time;
wm_timestampEnd = time;
//m_pWnd->PostMessage(WM_USER, EVENT_DATA_READY+m_cameraNr, ID_END); <------- TODO
}
else

View File

@ -97,6 +97,7 @@
CameraBusy,
CameraOpCompleted,
CameraOpFailed,
DetectionFailed,
/// Generic
Error, /// Many ops.: Fatal error occurred

View File

@ -599,27 +599,20 @@ namespace TBF.BenchControl.Sequences
/// </summary>
/// <param name="test">Current 'Test' entity</param>
/// <param name="tstRslt">Current 'TestResult' entity</param>
/// <param name="currentRefPulses">Current number of reference pulses</param>
/// <param name="freq">Curent reference frequency in [Hz]</param>
/// <param name="cBrd">Control board component reference</param>
/// <param name="time">Current test time in [s]</param>
/// <param name="progress">Current progress 0 .. 1.0f</param>
/// <returns>Data for the UI</returns>
protected TestProgressEventArgs GetTestProgressData(Entities.Test test, Entities.TestResult tstRslt, Elde.ControlBoardDev cBrd, float time, float progress)
protected TestProgressEventArgs GetTestProgressData(Entities.Test test, Entities.TestResult tstRslt, bool testRunning, Elde.ControlBoardDev cBrd, float time, float progress)
{
TestProgressEventArgs data = new TestProgressEventArgs();
data.TestResult = tstRslt;
//float ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
float refPulsesPerLtr = 1.0f / outPath.FlowMeter.LtrPerPulseCorrected(refFlow.Val); /// [pulse/ltr]
data.RefPulses = cBrd.EtPulses(0);
refFreq.Val = cBrd.ReferenceFreq;
data.FlowMtrFreq = refFreq;
data.Flow = refFlow;
data.Volume = new FloatBox() { Name = "Volume", Format = "F1", Val = Formulas.VolumeFromPulses(data.RefPulses, refPulsesPerLtr) };
data.Time = time;
data.StartMass = startMass;
data.Mass = mass;
@ -637,17 +630,29 @@ namespace TBF.BenchControl.Sequences
data.AmbientTemp = airTemperature;
data.AmbientPressure = airPressure;
data.AmbientHumidity = airHumidity;
for (int i = 0; i < Program.WMsCount; i++)
{
if (sensPath.RegisterReaders[i] != null)
if (testRunning)
{
/// Only when test is running
data.RefPulses = cBrd.EtPulses(0);
float refPulsesPerLtr = 1.0f / outPath.FlowMeter.LtrPerPulseCorrected(refFlow.Val); /// [pulse/ltr]
data.Volume = new FloatBox() { Name = "Volume", Format = "F1", Val = Formulas.VolumeFromPulses(data.RefPulses, refPulsesPerLtr) };
for (int i = 0; i < Program.WMsCount; i++)
{
data.WmPulses[i] = WMPulses[i];
data.WmRefPulses[i] = WMRefPulses[i];
data.WmVolume[i] = Formulas.VolumeFromPulses(WMPulses[i], sensPath.RegisterReaders[i].PulsesPerLtr);
if (data.Volume.Valid) { data.WmErrPct[i] = Formulas.ErrorFromVolumes(data.WmVolume[i], data.Volume.Val); }
}
}
if (sensPath.RegisterReaders[i] != null)
{
data.WmPulses[i] = WMPulses[i];
data.WmRefPulses[i] = WMRefPulses[i];
data.WmVolume[i] = Formulas.VolumeFromPulses(WMPulses[i], sensPath.RegisterReaders[i].PulsesPerLtr);
data.WmErrPct[i] = Formulas.ErrorFromVolumes(data.WmVolume[i], data.Volume.Val);
}
}
}
else
{
data.Volume = new FloatBox() { Name = "Volume", Format = "F1", Val = 0 };
}
return data;
}

View File

@ -238,7 +238,7 @@ namespace TBF.BenchControl
}
}
log.WarnFormat("ChangeState( {0} -> {1} )", previousState.ToString(), newState.ToString());
log.WarnFormat("---------------( {0} )---------------", newState.ToString());
/// Start() the operations that are in the current (new) state, but aren't in the previous state.
foreach (IOperation operation in newState.Operations)

View File

@ -93,7 +93,11 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection
do
{
e = StateMachine.WaitRunDevsRunOps();
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
if (e.Contains(Event.Error))
{
retVal = Event.Error;
goto stopTest;
}
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
}
while (e.Contains(Event.CameraBusy));

View File

@ -40,7 +40,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
/// float timeSec = 3600.0f * timeHr;
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
int totalPulses = (int)(test.Volume / ltrPerRefPulse + 0.5f);
ltrPerRefPulse = outPath.FlowMeter.NominalFlow / 7200.0f; /// [ltr/pulse]
///
@ -116,7 +116,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
}
@ -133,7 +133,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
@ -244,7 +244,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
log.Info(logstr);
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, cBrd, cBrd.TTime, progress);
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
data.WmVolume[2] = data.WmVolume[0] + data.WmVolume[1];
if (data.Volume.Valid) { data.WmErrPct[2] = Formulas.ErrorFromVolumes(data.WmVolume[2], data.Volume.Val); }
Bridge.OnTestProgress(this, data);

View File

@ -45,7 +45,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
/// float timeSec = 3600.0f * timeHr;
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
int totalPulses = (int)(test.Volume / ltrPerRefPulse + 0.5f);
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
@ -128,7 +128,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
}
@ -146,7 +146,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.RegulValveTimeOut)) goto error;
@ -198,7 +198,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
}
@ -331,7 +331,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
if (e.Contains(Event.RegulValveTimeOut)) goto error;
@ -353,7 +353,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) goto stop;
//if (e.Contains(Event.FlowTimeOut)) goto do_detection;
@ -449,7 +449,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, cBrd, cBrd.TTime, progress);
TestProgressEventArgs data = GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress);
data.WmVolume[2] = data.WmVolume[0] + data.WmVolume[1];
if (data.Volume.Valid) { data.WmErrPct[2] = Formulas.ErrorFromVolumes(data.WmVolume[2], data.Volume.Val); }
Bridge.OnTestProgress(this, data);

View File

@ -37,7 +37,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
/// float timeSec = 3600.0f * timeHr;
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
int totalPulses = (int)(test.Volume / ltrPerRefPulse + 0.5f);
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
@ -114,7 +114,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
}
@ -131,7 +131,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
@ -315,7 +315,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, cBrd.TTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
}
while (cBrd.EtPulses(0) < totalPulses);
/// Measurement loop - end

View File

@ -37,7 +37,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
/// float timeSec = 3600.0f * timeHr;
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
int totalPulses = (int)(test.Volume / ltrPerRefPulse + 0.5f);
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
@ -111,7 +111,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
}
@ -128,7 +128,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
@ -222,7 +222,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, cBrd.TTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
}
/// Measurement loop - end
@ -251,14 +251,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
tstRslt.ConstMaster = outPath.FlowMeter.LtrPerPulseCorrected(tstRslt.FlowVolume / 1000.0f); /// Convert the flow to [m3/h]
tstRslt.VolumeCTV = tstRslt.ConstMaster * tstRslt.PulsesMaster; /// [l] 1000.0f is because density is in [kg/m3]
/// Corrected master pulses per liter
if (tstRslt.VolumeCTV <= float.Epsilon)
{
tstRslt.ErrorMaster = 0.1f;
}
else
{
tstRslt.ErrorMaster = 100 * (tstRslt.VolumeMaster - tstRslt.VolumeCTV) / tstRslt.VolumeCTV;
}
tstRslt.ErrorMaster = 0.0f; /// Cannot be determined without the collected water mass measurement
tstRslt.TimeDivStart0 = 0;
tstRslt.TimeDivStart1 = 0;
tstRslt.TimeDivStart2 = 0;

View File

@ -37,7 +37,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
/// float timeSec = 3600.0f * timeHr;
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
int totalPulses = (int)(test.Volume / ltrPerRefPulse + 0.5f);
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
@ -111,7 +111,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
}
@ -128,7 +128,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
@ -253,7 +253,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, cBrd.TTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
}
/// Measurement loop - end
@ -314,7 +314,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
/// Corrected master pulses per liter
if (tstRslt.VolumeCTV <= float.Epsilon)
{
tstRslt.ErrorMaster = 0.1f;
tstRslt.ErrorMaster = 0.0f;
}
else
{

View File

@ -37,7 +37,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
/// float timeSec = 3600.0f * timeHr;
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / ltrPerRefPulse);
int totalPulses = (int)(test.Volume / ltrPerRefPulse + 0.5f);
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this);
@ -111,7 +111,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
}
@ -128,7 +128,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
int flowSetTime = StateMachine.Time - flowSetTime0;
float progress = Formulas.TestProgress(flowSetTime, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, flowSetTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, false, cBrd, flowSetTime, progress));
if (e.Contains(Event.OpArgumentError)) { retVal = Event.OpArgumentError; goto stopTest; }
if (e.Contains(Event.UiCmdStop)) { retVal = Event.UiCmdStop; goto stopTest; }
@ -239,7 +239,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
float progress = Formulas.TestProgress(cBrd.EtPulses(0), totalPulses, estFlowSetTime, test.TstTime);
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, cBrd, cBrd.TTime, progress));
Bridge.OnTestProgress(this, GetTestProgressData(test, tstRslt, true, cBrd, cBrd.TTime, progress));
}
/// Measurement loop - end

View File

@ -63,7 +63,9 @@ namespace TBF
[STAThread]
static void Main()
{
/// Local program configuration directory including the trailing backslash
log.Fatal("--------------------------------------------------------------------------------");
/// Local program configuration directory including the trailing backslash
string locAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
Path.DirectorySeparatorChar + "TestBenchFramework" + Path.DirectorySeparatorChar;

View File

@ -2,6 +2,7 @@
using System.Windows.Forms;
using log4net;
using TBF.UiBridge;
using TBF.Resources;
namespace TBF.Screens
{
@ -314,6 +315,7 @@ namespace TBF.Screens
refPulses1Label.Text = tRes.Meters[0].PulsesMaster.ToString("F0");
volume1Label.Text = tRes.Meters[0].VolumeMeter.ToString("F2");
error1Label.Text = tRes.Meters[0].VolumeErrorPct.ToString("F2");
passed1Label.Text = tRes.Meters[0].Passed ? Strings.Passed : Strings.Failed;
if (Program.WMsCount >= 2)
{
@ -321,6 +323,7 @@ namespace TBF.Screens
refPulses2Label.Text = tRes.Meters[1].PulsesMaster.ToString("F0");
volume2Label.Text = tRes.Meters[1].VolumeMeter.ToString("F2");
error2Label.Text = tRes.Meters[1].VolumeErrorPct.ToString("F2");
passed2Label.Text = tRes.Meters[1].Passed ? Strings.Passed : Strings.Failed;
}
if (Program.WMsCount >= 3)
@ -329,6 +332,7 @@ namespace TBF.Screens
refPulses3Label.Text = tRes.Meters[2].PulsesMaster.ToString("F0");
volume3Label.Text = tRes.Meters[2].VolumeMeter.ToString("F2");
error3Label.Text = tRes.Meters[2].VolumeErrorPct.ToString("F2");
passed3Label.Text = tRes.Meters[2].Passed ? Strings.Passed : Strings.Failed;
}
if (Program.WMsCount >= 4)
@ -337,6 +341,7 @@ namespace TBF.Screens
refPulses4Label.Text = tRes.Meters[3].PulsesMaster.ToString("F0");
volume4Label.Text = tRes.Meters[3].VolumeMeter.ToString("F2");
error4Label.Text = tRes.Meters[3].VolumeErrorPct.ToString("F2");
passed4Label.Text = tRes.Meters[3].Passed ? Strings.Passed : Strings.Failed;
}
if (Program.WMsCount >= 5)
@ -345,6 +350,7 @@ namespace TBF.Screens
refPulses5Label.Text = tRes.Meters[4].PulsesMaster.ToString("F0");
volume5Label.Text = tRes.Meters[4].VolumeMeter.ToString("F2");
error5Label.Text = tRes.Meters[4].VolumeErrorPct.ToString("F2");
passed5Label.Text = tRes.Meters[4].Passed ? Strings.Passed : Strings.Failed;
}
if (Program.WMsCount >= 6)
@ -353,6 +359,7 @@ namespace TBF.Screens
refPulses6Label.Text = tRes.Meters[5].PulsesMaster.ToString("F0");
volume6Label.Text = tRes.Meters[5].VolumeMeter.ToString("F2");
error6Label.Text = tRes.Meters[5].VolumeErrorPct.ToString("F2");
passed6Label.Text = tRes.Meters[5].Passed ? Strings.Passed : Strings.Failed;
}
tInLabel.Text = tRes.TempInAvrg.ToString("F2");
@ -372,7 +379,7 @@ namespace TBF.Screens
//massLabel.Text = tstRslt.
volumeCtvLabel.Text = args.TestResult.VolumeCTV.ToString("F1");
refErrorLabel.Text = "---"; // TODO
refErrorLabel.Text = (tRes.ErrorMaster == 0) ? "---" : tRes.ErrorMaster.ToString("F2");
}
else if (tRes.MetersKind == Entities.MetersKind.Combined)
{
@ -390,6 +397,10 @@ namespace TBF.Screens
error1Label.Text = tRes.Meters[0].VolumeErrorPct.ToString("F2");
error2Label.Text = tRes.Meters[1].VolumeErrorPct.ToString("F2");
error3Label.Text = tRes.CombinedMeters[0].VolumeErrorPct.ToString("F2");
passed1Label.Text = tRes.Meters[0].Passed ? Strings.Passed : Strings.Failed;
passed2Label.Text = tRes.Meters[1].Passed ? Strings.Passed : Strings.Failed;
passed3Label.Text = tRes.CombinedMeters[0].Passed ? Strings.Passed : Strings.Failed;
tInLabel.Text = tRes.TempInAvrg.ToString("F2");
tOutLabel.Text = tRes.TempOutAvrg.ToString("F2");
tDivLabel.Text = tRes.TempDivAvrg.ToString("F2");
@ -407,8 +418,8 @@ namespace TBF.Screens
//massLabel.Text = tstRslt.
volumeCtvLabel.Text = args.TestResult.VolumeCTV.ToString("F1");
refErrorLabel.Text = "---"; // TODO
}
refErrorLabel.Text = (tRes.ErrorMaster == 0) ? "---" : tRes.ErrorMaster.ToString("F2");
}
}
void OnProcedureCompleted(object sender, ProcedureCompletedEventArgs args)