Add detailed logging for Genesis operations in FlyingStartMassCollectionSeq and FlyingStartSeq.
- Introduce debug and info logs for Genesis initialization, calibration, measurement, and data storage. - Ensure proper logging during Genesis operations' start and stop phases.
This commit is contained in:
@@ -140,6 +140,7 @@ namespace TBF.Rig.TestMethods.FlyingStart
|
|||||||
TestStartTime = DateTime.Now;
|
TestStartTime = DateTime.Now;
|
||||||
// Genesis switch
|
// Genesis switch
|
||||||
bool atleastOneGenesis = GenesisHeadBatch.Start(sensPath.RegisterReaders, Program.LocalSettings.LastSNTexts);
|
bool atleastOneGenesis = GenesisHeadBatch.Start(sensPath.RegisterReaders, Program.LocalSettings.LastSNTexts);
|
||||||
|
log.Info($"Genesis - atleastOneGenesis = {atleastOneGenesis}");
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test
|
/// Optionally display prompt to emerge temperature meters to appropriate baths for heat meters test
|
||||||
@@ -331,13 +332,16 @@ namespace TBF.Rig.TestMethods.FlyingStart
|
|||||||
//TODO genesis - check with genesis switch
|
//TODO genesis - check with genesis switch
|
||||||
if (atleastOneGenesis)
|
if (atleastOneGenesis)
|
||||||
{
|
{
|
||||||
|
log.Info($"Genesis - Starting... Test Name:{test.Name.ToLower()}.");
|
||||||
if (test.Name.ToLower().Contains("calib"))
|
if (test.Name.ToLower().Contains("calib"))
|
||||||
{
|
{
|
||||||
|
log.Info("Genesis - Calibration starting.");
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersInitCalibration();
|
GenesisHeadBatch.BatchHolder.Value.MetersInitCalibration();
|
||||||
|
|
||||||
} else if (test.Name.ToLower().Contains("Init"))
|
} else if (test.Name.ToLower().Contains("init"))
|
||||||
{
|
{
|
||||||
|
log.Info("Genesis - Init measurement starting.");
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersInitMeasurement();
|
GenesisHeadBatch.BatchHolder.Value.MetersInitMeasurement();
|
||||||
}
|
}
|
||||||
@@ -456,10 +460,12 @@ namespace TBF.Rig.TestMethods.FlyingStart
|
|||||||
{
|
{
|
||||||
if (test.Name.ToLower().Contains("calib"))
|
if (test.Name.ToLower().Contains("calib"))
|
||||||
{
|
{
|
||||||
|
log.Info("Genesis - Calibration stopped.");
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersStopCalibration();
|
GenesisHeadBatch.BatchHolder.Value.MetersStopCalibration();
|
||||||
}
|
}
|
||||||
else if (test.Name.ToLower().Contains("Init"))
|
else if (test.Name.ToLower().Contains("Init"))
|
||||||
{
|
{
|
||||||
|
log.Info("Genesis - Init measurement stopped.");
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersStopMeasurement();
|
GenesisHeadBatch.BatchHolder.Value.MetersStopMeasurement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
|||||||
|
|
||||||
bool atleastOneGenesis = false;
|
bool atleastOneGenesis = false;
|
||||||
atleastOneGenesis = GenesisHeadBatch.Start(sensPath.RegisterReaders, Program.LocalSettings.LastSNTexts);
|
atleastOneGenesis = GenesisHeadBatch.Start(sensPath.RegisterReaders, Program.LocalSettings.LastSNTexts);
|
||||||
|
log.Info($"Genesis - atleastOneGenesis = {atleastOneGenesis}");
|
||||||
|
|
||||||
//------------------------------------------------
|
//------------------------------------------------
|
||||||
Bridge.OnActivity(this, Strings.Checking_tank_capacity);
|
Bridge.OnActivity(this, Strings.Checking_tank_capacity);
|
||||||
@@ -460,14 +461,17 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
|||||||
|
|
||||||
if (atleastOneGenesis)
|
if (atleastOneGenesis)
|
||||||
{
|
{
|
||||||
|
log.Info($"Genesis - Starting... Test Name:{test.Name.ToLower()}.");
|
||||||
if (test.Name.ToLower().Contains("calib"))
|
if (test.Name.ToLower().Contains("calib"))
|
||||||
{
|
{
|
||||||
|
log.Info("Genesis - Calibration starting.");
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersInitCalibration();
|
GenesisHeadBatch.BatchHolder.Value.MetersInitCalibration();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (test.Name.ToLower().Contains("Init"))
|
if (test.Name.ToLower().Contains("init"))
|
||||||
{
|
{
|
||||||
|
log.Info("Genesis - init starting.");
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
GenesisHeadBatch.BatchHolder.Value.MetersLogin();
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersInitMeasurement();
|
GenesisHeadBatch.BatchHolder.Value.MetersInitMeasurement();
|
||||||
}
|
}
|
||||||
@@ -617,13 +621,18 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
|||||||
/// Measurement loop end
|
/// Measurement loop end
|
||||||
StopRecordingStatistics();
|
StopRecordingStatistics();
|
||||||
|
|
||||||
if (test.Name.ToLower().Contains("calib"))
|
if (atleastOneGenesis)
|
||||||
{
|
{
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersStopCalibration();
|
if (test.Name.ToLower().Contains("calib"))
|
||||||
}
|
{
|
||||||
else
|
log.Info("Genesis - Calibration stopped.");
|
||||||
{
|
GenesisHeadBatch.BatchHolder.Value.MetersStopCalibration();
|
||||||
GenesisHeadBatch.BatchHolder.Value.MetersStopMeasurement();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.Info("Genesis - Init measurement stopped.");
|
||||||
|
GenesisHeadBatch.BatchHolder.Value.MetersStopMeasurement();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@@ -976,6 +985,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
|||||||
//Genesis grab data to results
|
//Genesis grab data to results
|
||||||
if (Genesis != null)
|
if (Genesis != null)
|
||||||
{
|
{
|
||||||
|
log.Debug("Genesis - store data on end!");
|
||||||
meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses); // missing in geenral genesis
|
meterRslt.PulsesMaster = Convert.ToDouble(regReader.WMRefPulses); // missing in geenral genesis
|
||||||
Genesis.Stop(tstRslt.TestTime, tstRslt.VolumeCTV);
|
Genesis.Stop(tstRslt.TestTime, tstRslt.VolumeCTV);
|
||||||
meterRslt.TimestampStart = Genesis.TimestampSecStart;
|
meterRslt.TimestampStart = Genesis.TimestampSecStart;
|
||||||
|
|||||||
@@ -436,6 +436,7 @@ namespace TBF.Rig.TestMethods.GenesisCommunication.GenesisHead
|
|||||||
|
|
||||||
public void Log(string text)
|
public void Log(string text)
|
||||||
{
|
{
|
||||||
|
log.Debug(text);
|
||||||
if (DebugLevel == DebugMode.Normal)
|
if (DebugLevel == DebugMode.Normal)
|
||||||
{
|
{
|
||||||
if (myGenesis != null)
|
if (myGenesis != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user