MiniPrf: - debug output

This commit is contained in:
Thomas Wiedebusch 2026-01-20 13:45:07 +01:00
parent 123e4a119a
commit e98bd03b03
7 changed files with 523 additions and 130 deletions

View File

@ -218,19 +218,35 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Co
/// </summary>
CMD_GET_REF_FREQU,
/// <summary>
///
/// Calculate frequency from REF period
/// </summary>
CMD_CAL_FLOW_RATE,
CMD_CAL_FREQU_REF_PERIOD,
/// <summary>
///
/// Calculate frequency from DUT period
/// </summary>
CMD_CAL_FREQU_DUT_PERIOD,
/// <summary>
/// Calculated flow rate from REF frequency
/// </summary>
CMD_CAL_FLOW_REF_FREQU,
/// <summary>
/// Calculated flow rate from REF period
/// </summary>
CMD_CAL_FLOW_REF_PERIOD,
/// <summary>
/// Calculated flow rate from DUT period
/// </summary>
CMD_CAL_FLOW_DUT_PERIOD,
/// <summary>
/// Command to force a current offset correction (takes about 4 s)
/// </summary>
CMD_COR_CURRENT,
/// <summary>
///
/// Set current to max value (20 mA)
/// </summary>
CMD_SET_XTR_MAX,
/// <summary>
///
/// Set current to min value (-20 mA)
/// </summary>
CMD_SET_XTR_MIN,
/// <summary>
@ -409,7 +425,11 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Co
new Cmd(CmdName.CMD_GET_REF_PERIOD, UNICODE_DLE, CmdType.INDIVIDUAL_WA, Resources.StrCmdMsgGetRefPeriod),
new Cmd(CmdName.CMD_GET_DUT_PERIOD, UNICODE_DC1, CmdType.INDIVIDUAL_WA, Resources.StrCmdMsgGetDutPeriod),
new Cmd(CmdName.CMD_GET_REF_FREQU, UNICODE_DC2, CmdType.INDIVIDUAL_WA, Resources.StrCmdMsgGetRefFrequ),
new Cmd(CmdName.CMD_CAL_FLOW_RATE, "", CmdType.INDIVIDUAL_WA, Resources.StrCalFlowRate),
new Cmd(CmdName.CMD_CAL_FREQU_REF_PERIOD, "", CmdType.INDIVIDUAL_WA, Resources.StrCalRefFrequFromRefPeriod),
new Cmd(CmdName.CMD_CAL_FREQU_DUT_PERIOD, "", CmdType.INDIVIDUAL_WA, Resources.StrCalDutFrequFromDutPeriod),
new Cmd(CmdName.CMD_CAL_FLOW_REF_FREQU, "", CmdType.INDIVIDUAL_WA, Resources.StrCalRefFlowRateFromRefFrequ),
new Cmd(CmdName.CMD_CAL_FLOW_REF_PERIOD, "", CmdType.INDIVIDUAL_WA, Resources.StrCalRefFlowRateFromRefPeriod),
new Cmd(CmdName.CMD_CAL_FLOW_DUT_PERIOD, "", CmdType.INDIVIDUAL_WA, Resources.StrCalDutFlowRateFromDutPeriod),
// Adjustment, place here Ids which may represent digital numbers from A to F
new Cmd(CmdName.CMD_COR_CURRENT, "C", CmdType.BROADCAST, Resources.StrCmdMsgCorCurrent),
new Cmd(CmdName.CMD_SET_XTR_MAX, "+", CmdType.BROADCAST, Resources.StrCmdMsgSetXtrMax),

View File

@ -271,6 +271,15 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
private set;
}
/// <summary>
/// Request debug information
/// </summary>
public Boolean RequestDebugInformation
{
get;
set;
}
/// <summary>
/// Number of processing steps for this actual process progress
/// </summary>
@ -406,7 +415,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
try
{
cmdName = CmdName.CMD_REF_GET_PLS_CTR;
if (refCtrOn && Write(cmdName))
if (CyclicReceiveTaskLoopIsActive && refCtrOn && Write(cmdName))
{
var refPulseStr = SerialPort.ReadTo(END_OF_STR);
@ -420,7 +429,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
}
cmdName = CmdName.CMD_DUT_GET_PLS_CTR;
if (dutCtrOn && Write(cmdName))
if (CyclicReceiveTaskLoopIsActive && dutCtrOn && Write(cmdName))
{
var dutPulseStr = SerialPort.ReadTo(END_OF_STR);
@ -469,7 +478,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
/// - Set <see cref="CyclicReceiveTaskLoopIsActive"/> to false.
/// </summary>
/// <returns></returns>
/// <remarks date="2026-Jan-14..17" author="Thomas Wiedebusch">
/// <remarks date="2026-Jan-14..20" author="Thomas Wiedebusch">
/// - Initial.
/// </remarks>
public Boolean RegulationMeasurement()
@ -519,10 +528,12 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
{
try
{
// Read out the damped/undamped tolerance and convert the raw value (0, +/-1..255 digits) to the
// tolerance in percent depending on the setup to 3 % (3.3) of 5 % (5.5)
String responseStr;
cmdName = UseDampedTolerance ? CmdName.CMD_GET_DTLC : CmdName.CMD_GET_UDTLC;
var info = GetCmdInfo(cmdName);
if (Write(cmdName))
if (CyclicReceiveTaskLoopIsActive && Write(cmdName))
{
responseStr = SerialPort.ReadTo(END_OF_STR);
// The response contains a sign!
@ -539,59 +550,104 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
}
}
//cmdName = CmdName.CMD_GET_REF_PERIOD;
//info = GetCmdInfo(cmdName);
//if (Write(cmdName))
//{
// responseStr = SerialPort.ReadTo(END_OF_STR);
// if (int.TryParse(responseStr, NumberStyles.HexNumber, new CultureInfo("en"), out var refPeriod))
// {
// // Convert to m³/h (3600 s/h) and save the value
// RefFlowRate_cm_per_h = 3600.0f / (refPeriod * TMR_RESOLUTION_s) / Ref_pulse_per_cm;
// Read the REF period and calculate the frequency [Hz] and flow rate [m³/h] based on this period
cmdName = CmdName.CMD_GET_REF_PERIOD;
info = GetCmdInfo(cmdName);
if (RequestDebugInformation && CyclicReceiveTaskLoopIsActive && Write(cmdName))
{
responseStr = SerialPort.ReadTo(END_OF_STR);
if (int.TryParse(responseStr, NumberStyles.HexNumber, new CultureInfo("en"), out var period))
{
// Publish the period [ms]
var response = new CmdResponse(cmdName, info,
doubleValue: TMR_RESOLUTION_s * 1000.0f * period,
siUnit: "m" + SiUnits.GetInfo(SiUnits.SiUnitName.TIME));
OnRawRecordReceived?.Invoke(this,
new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
// //var response = new CmdResponse(cmdName, info,
// // doubleValue: TMR_RESOLUTION_s * 1000.0f * refPeriod,
// // siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.TIME));
// //OnRawRecordReceived?.Invoke(this,
// // new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
// // specificInfoObj: response));
// Publish the frequency in [Hz]
cmdName = CmdName.CMD_CAL_FREQU_REF_PERIOD;
info = GetCmdInfo(cmdName);
response = new CmdResponse(cmdName, info,
doubleValue: 1.0f / (TMR_RESOLUTION_s * period),
siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FREQUENCY));
OnRawRecordReceived?.Invoke(this,
new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
// cmdName = CmdName.CMD_GET_REF_FREQU;
// var response = new CmdResponse(cmdName, info,
// doubleValue: 1.0f /(TMR_RESOLUTION_s * refPeriod),
// siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FREQUENCY));
// OnRawRecordReceived?.Invoke(this,
// new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
// specificInfoObj: response));
// Convert to m³/h (3600 s/h) based on REF pulse rate
var flowRate_cm_per_h = 3600.0f / (period * TMR_RESOLUTION_s) / Ref_pulse_per_cm;
// Publish the calculated flow rate [m³/h]
cmdName = CmdName.CMD_CAL_FLOW_REF_PERIOD;
info = GetCmdInfo(cmdName);
response = new CmdResponse(cmdName, info, doubleValue: flowRate_cm_per_h,
siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FLOW_RATE_NON_SI));
OnRawRecordReceived?.Invoke(this,
new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
}
}
// // Transmit additionally the calculated flow rate
// cmdName = CmdName.CMD_CAL_FLOW_RATE;
// info = GetCmdInfo(cmdName);
// response = new CmdResponse(cmdName, info, doubleValue: RefFlowRate_cm_per_h,
// siUnit: "m" + SiUnits.GetInfo(SiUnits.SiUnitName.FLOW_RATE_NON_SI));
// OnRawRecordReceived?.Invoke(this,
// new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
// specificInfoObj: response));
// }
//}
// Read the DUT period and calculate the frequency [Hz] and flow rate [m³/h] based on this period
cmdName = CmdName.CMD_GET_DUT_PERIOD;
info = GetCmdInfo(cmdName);
if (RequestDebugInformation && CyclicReceiveTaskLoopIsActive && Write(cmdName))
{
responseStr = SerialPort.ReadTo(END_OF_STR);
if (int.TryParse(responseStr, NumberStyles.HexNumber, new CultureInfo("en"), out var period))
{
// Publish the period [ms]
var response = new CmdResponse(cmdName, info,
doubleValue: TMR_RESOLUTION_s * 1000.0f * period,
siUnit: "m" + SiUnits.GetInfo(SiUnits.SiUnitName.TIME));
OnRawRecordReceived?.Invoke(this,
new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
// Publish the frequency in [Hz]
cmdName = CmdName.CMD_CAL_FREQU_DUT_PERIOD;
info = GetCmdInfo(cmdName);
response = new CmdResponse(cmdName, info,
doubleValue: 1.0f / (TMR_RESOLUTION_s * period),
siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FREQUENCY));
OnRawRecordReceived?.Invoke(this,
new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
// Convert to m³/h (3600 s/h) based on DUT pulse rate
var flowRate_cm_per_h = 3600.0f / (period * TMR_RESOLUTION_s) / Dut_pulse_per_cm;
// Publish the calculated flow rate [m³/h]
cmdName = CmdName.CMD_CAL_FLOW_DUT_PERIOD;
info = GetCmdInfo(cmdName);
response = new CmdResponse(cmdName, info, doubleValue: flowRate_cm_per_h,
siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FLOW_RATE_NON_SI));
OnRawRecordReceived?.Invoke(this,
new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
}
}
// Read the REF frequency [Hz] directly and calculate the flow rate [m³/h] based on this frequency
cmdName = CmdName.CMD_GET_REF_FREQU;
info = GetCmdInfo(cmdName);
if (Write(cmdName))
if (CyclicReceiveTaskLoopIsActive && Write(cmdName))
{
responseStr = SerialPort.ReadTo(END_OF_STR);
if (int.TryParse(responseStr, NumberStyles.HexNumber, new CultureInfo("en"), out var refFrequency))
{
// Convert to m³/h (3600 s/h) and save the value
RefFlowRate_cm_per_h = 3600.0f * refFrequency / Ref_pulse_per_cm;
// Publish the frequency in [Hz]
var response = new CmdResponse(cmdName, info, refFrequency,
siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FREQUENCY));
OnRawRecordReceived?.Invoke(this, new ProcessExecEventArgs("", actualProcessMessage: measurementInfo,
specificInfoObj: response));
// Transmit additionally the calculated flow rate
cmdName = CmdName.CMD_CAL_FLOW_RATE;
// Convert to m³/h (3600 s/h) and save the value
RefFlowRate_cm_per_h = 3600.0f * refFrequency / Ref_pulse_per_cm;
// Publish the calculated flow rate [m³/h]
cmdName = CmdName.CMD_CAL_FLOW_REF_FREQU;
info = GetCmdInfo(cmdName);
response = new CmdResponse(cmdName, info, doubleValue: RefFlowRate_cm_per_h,
siUnit: SiUnits.GetInfo(SiUnits.SiUnitName.FLOW_RATE_NON_SI));
@ -600,6 +656,8 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
specificInfoObj: response));
}
}
Thread.Sleep(500);
}
catch (Exception e)
{

View File

@ -62,11 +62,47 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Flow rate.
/// Looks up a localized string similar to DUT flow rate f(DUT period).
/// </summary>
internal static string StrCalFlowRate {
internal static string StrCalDutFlowRateFromDutPeriod {
get {
return ResourceManager.GetString("StrCalFlowRate", resourceCulture);
return ResourceManager.GetString("StrCalDutFlowRateFromDutPeriod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to DUT frequency f(DUT period).
/// </summary>
internal static string StrCalDutFrequFromDutPeriod {
get {
return ResourceManager.GetString("StrCalDutFrequFromDutPeriod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to REF flow rate f(REF frequency).
/// </summary>
internal static string StrCalRefFlowRateFromRefFrequ {
get {
return ResourceManager.GetString("StrCalRefFlowRateFromRefFrequ", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to REF flow rate f(REF period).
/// </summary>
internal static string StrCalRefFlowRateFromRefPeriod {
get {
return ResourceManager.GetString("StrCalRefFlowRateFromRefPeriod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to REF frequency f(REF period).
/// </summary>
internal static string StrCalRefFrequFromRefPeriod {
get {
return ResourceManager.GetString("StrCalRefFrequFromRefPeriod", resourceCulture);
}
}
@ -170,7 +206,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Counted DUT timer ticks (334 us).
/// Looks up a localized string similar to Counted DUT timer ticks.
/// </summary>
internal static string StrCmdMsgDutGetTmr {
get {
@ -179,7 +215,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to DUT pulses per m³.
/// Looks up a localized string similar to DUT pulses ratio.
/// </summary>
internal static string StrCmdMsgDutLppScale {
get {
@ -215,7 +251,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Measured damped tolerance DUT to REF in percent.
/// Looks up a localized string similar to Damped tolerance DUT to REF.
/// </summary>
internal static string StrCmdMsgGetDtlc {
get {
@ -224,7 +260,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Measured DUT period in ticks (334 us).
/// Looks up a localized string similar to DUT period.
/// </summary>
internal static string StrCmdMsgGetDutPeriod {
get {
@ -233,7 +269,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Measured REF frequency in Hz.
/// Looks up a localized string similar to REF frequency.
/// </summary>
internal static string StrCmdMsgGetRefFrequ {
get {
@ -242,7 +278,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Measured REF period in ticks (334 us).
/// Looks up a localized string similar to REF period.
/// </summary>
internal static string StrCmdMsgGetRefPeriod {
get {
@ -260,7 +296,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Measured undamped tolerance DUT to REF in percent.
/// Looks up a localized string similar to Undamped tolerance DUT to REF.
/// </summary>
internal static string StrCmdMsgGetUdtlc {
get {
@ -305,7 +341,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Readout lifetime in hours.
/// Looks up a localized string similar to Lifetime counter.
/// </summary>
internal static string StrCmdMsgPrintStatistics {
get {
@ -368,7 +404,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Get REF timer ticks (334 us).
/// Looks up a localized string similar to REF timer ticks.
/// </summary>
internal static string StrCmdMsgRefGetTmr {
get {
@ -377,7 +413,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to REF pulses per m³.
/// Looks up a localized string similar to REF pulses ratio.
/// </summary>
internal static string StrCmdMsgRefLppScale {
get {
@ -413,7 +449,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core.Pr
}
/// <summary>
/// Looks up a localized string similar to Measurement STOP &amp; RESET.
/// Looks up a localized string similar to Measurement stop and reset.
/// </summary>
internal static string StrCmdMsgRstMeas {
get {

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="StrCmdMsgRefSetPls" xml:space="preserve">
<value>Einstellung zu zählende REF Impulse</value>
<value>Geforderte REF Impulse</value>
</data>
<data name="StrCmdMsgRefStrPlsCtr" xml:space="preserve">
<value>Start REF Impulszähler</value>
@ -157,7 +157,7 @@
<value>Zwischengespeicherte DUT Impulse</value>
</data>
<data name="StrCmdMsgRstMeas" xml:space="preserve">
<value>Messung STOPP &amp; RESET</value>
<value>Messung beenden und zurücksetzen</value>
</data>
<data name="StrCmdMsgRefSetScale" xml:space="preserve">
<value>REF zu DUT Impulsverhältnis</value>
@ -172,10 +172,10 @@
<value>REF zu DUT Dämpfung</value>
</data>
<data name="StrCmdMsgDutLppScale" xml:space="preserve">
<value>DUT Impulse pro m³</value>
<value>DUT Impulswertigkeit</value>
</data>
<data name="StrCmdMsgRefLppScale" xml:space="preserve">
<value>REF Impulse pro m³</value>
<value>REF Impulswertigkeit</value>
</data>
<data name="StrCmdRespErrorParamOutOfRange" xml:space="preserve">
<value>Parameterbereichsüberschreitung</value>
@ -196,25 +196,25 @@
<value>Kommando nicht unterstützt</value>
</data>
<data name="StrCmdMsgDutGetTmr" xml:space="preserve">
<value>Gezählte DUT Zeitticks (334 us)</value>
<value>Gezählte DUT Zeitimpulse</value>
</data>
<data name="StrCmdMsgRefGetTmr" xml:space="preserve">
<value>Gezählte REF Zeitticks (334 us)</value>
<value>REF Zeiteinheiten</value>
</data>
<data name="StrCmdMsgGetUdtlc" xml:space="preserve">
<value>Gemessene ungedämpfte Toleranz DUT zu REF in Prozent</value>
<value>Ungedämpfte Toleranz DUT zu REF</value>
</data>
<data name="StrCmdMsgGetDtlc" xml:space="preserve">
<value>Gemessene gedämpfte Toleranz DUT zu REF in Prozent</value>
<value>Gedämpfte Toleranz DUT zu REF</value>
</data>
<data name="StrCmdMsgGetRefPeriod" xml:space="preserve">
<value>Gemessene REF Periodendauer in Ticks (334 us)</value>
<value>REF Periodendauer</value>
</data>
<data name="StrCmdMsgGetDutPeriod" xml:space="preserve">
<value>Gemessene DUT Periode in Ticks (334 us)</value>
<value>DUT Periodendauer</value>
</data>
<data name="StrCmdMsgGetRefFrequ" xml:space="preserve">
<value>Gemessene REF Frequenz in Hz</value>
<value>REF Frequenz</value>
</data>
<data name="StrCmdMsgCorCurrent" xml:space="preserve">
<value>Starte Stromnullpunktkalibrierung</value>
@ -223,7 +223,7 @@
<value>Toleranzanzeige auf Maximum stellen</value>
</data>
<data name="StrCmdMsgSetXtrMin" xml:space="preserve">
<value>Toleranzanzeige auf Miniimum stellen</value>
<value>Toleranzanzeige auf Minimum stellen</value>
</data>
<data name="StrCmdMsgUnlock" xml:space="preserve">
<value>Löschverriegelung aufheben</value>
@ -253,7 +253,7 @@
<value>Virtuelle EEPROM Adresse schreiben</value>
</data>
<data name="StrCmdMsgPrintStatistics" xml:space="preserve">
<value>Ermittelte Laufzeit in Stunden</value>
<value>Betriebsstundenzähler</value>
</data>
<data name="StrError" xml:space="preserve">
<value>FEHLER</value>
@ -303,7 +303,19 @@
<data name="StrCommDirectionRequest" xml:space="preserve">
<value>Abfrage</value>
</data>
<data name="StrCalFlowRate" xml:space="preserve">
<value>Durchflußrate</value>
<data name="StrCalRefFrequFromRefPeriod" xml:space="preserve">
<value>REF Frequenz f(REF Periodendauer)</value>
</data>
<data name="StrCalDutFrequFromDutPeriod" xml:space="preserve">
<value>DUT Frequenz f(DUT Periodendauer)</value>
</data>
<data name="StrCalRefFlowRateFromRefFrequ" xml:space="preserve">
<value>REF Durchflußrate f(REF Frequenz)</value>
</data>
<data name="StrCalRefFlowRateFromRefPeriod" xml:space="preserve">
<value>REF Durchflußrate f(REF Periodendauer)</value>
</data>
<data name="StrCalDutFlowRateFromDutPeriod" xml:space="preserve">
<value>DUT Durchflußrate f(DUT Periodendauer)</value>
</data>
</root>

View File

@ -157,7 +157,7 @@
<value>Backup counted DUT pulses</value>
</data>
<data name="StrCmdMsgRstMeas" xml:space="preserve">
<value>Measurement STOP &amp; RESET</value>
<value>Measurement stop and reset</value>
</data>
<data name="StrCmdMsgRefSetScale" xml:space="preserve">
<value>REF to DUT pulse ratio</value>
@ -172,10 +172,10 @@
<value>REF to DUT attenuation</value>
</data>
<data name="StrCmdMsgDutLppScale" xml:space="preserve">
<value>DUT pulses per m³</value>
<value>DUT pulses ratio</value>
</data>
<data name="StrCmdMsgRefLppScale" xml:space="preserve">
<value>REF pulses per m³</value>
<value>REF pulses ratio</value>
</data>
<data name="StrCmdRespErrorParamOutOfRange" xml:space="preserve">
<value>Parameter is out of range</value>
@ -196,25 +196,25 @@
<value>Command not supported</value>
</data>
<data name="StrCmdMsgDutGetTmr" xml:space="preserve">
<value>Counted DUT timer ticks (334 us)</value>
<value>Counted DUT timer ticks</value>
</data>
<data name="StrCmdMsgRefGetTmr" xml:space="preserve">
<value>Get REF timer ticks (334 us)</value>
<value>REF timer ticks</value>
</data>
<data name="StrCmdMsgGetUdtlc" xml:space="preserve">
<value>Measured undamped tolerance DUT to REF in percent</value>
<value>Undamped tolerance DUT to REF</value>
</data>
<data name="StrCmdMsgGetDtlc" xml:space="preserve">
<value>Measured damped tolerance DUT to REF in percent</value>
<value>Damped tolerance DUT to REF</value>
</data>
<data name="StrCmdMsgGetRefPeriod" xml:space="preserve">
<value>Measured REF period in ticks (334 us)</value>
<value>REF period</value>
</data>
<data name="StrCmdMsgGetDutPeriod" xml:space="preserve">
<value>Measured DUT period in ticks (334 us)</value>
<value>DUT period</value>
</data>
<data name="StrCmdMsgGetRefFrequ" xml:space="preserve">
<value>Measured REF frequency in Hz</value>
<value>REF frequency</value>
</data>
<data name="StrCmdMsgCorCurrent" xml:space="preserve">
<value>Start current offset correction</value>
@ -253,7 +253,7 @@
<value>Set virtual EEPROM address</value>
</data>
<data name="StrCmdMsgPrintStatistics" xml:space="preserve">
<value>Readout lifetime in hours</value>
<value>Lifetime counter</value>
</data>
<data name="StrError" xml:space="preserve">
<value>ERROR</value>
@ -303,7 +303,19 @@
<data name="StrCommDirectionRequest" xml:space="preserve">
<value>Request</value>
</data>
<data name="StrCalFlowRate" xml:space="preserve">
<value>Flow rate</value>
<data name="StrCalRefFrequFromRefPeriod" xml:space="preserve">
<value>REF frequency f(REF period)</value>
</data>
<data name="StrCalDutFrequFromDutPeriod" xml:space="preserve">
<value>DUT frequency f(DUT period)</value>
</data>
<data name="StrCalRefFlowRateFromRefFrequ" xml:space="preserve">
<value>REF flow rate f(REF frequency)</value>
</data>
<data name="StrCalRefFlowRateFromRefPeriod" xml:space="preserve">
<value>REF flow rate f(REF period)</value>
</data>
<data name="StrCalDutFlowRateFromDutPeriod" xml:space="preserve">
<value>DUT flow rate f(DUT period)</value>
</data>
</root>

View File

@ -80,12 +80,29 @@
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.picFM2014 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.tbxRefFrequencyFromRefPeriodHz = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbxRefFlowRateFromRefPeriodCmPerH = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tbxRefPeriodMs = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.tbxDutPeriodMs = new System.Windows.Forms.TextBox();
this.tbxDutFrequencyFromDutPeriodHz = new System.Windows.Forms.TextBox();
this.tbxDutFlowRateFromDutPeriodCmPerH = new System.Windows.Forms.TextBox();
this.grpBoxDebug = new System.Windows.Forms.GroupBox();
this.label7 = new System.Windows.Forms.Label();
this.tbxRefFlowRateFromRefFrequencyCmPerH = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.tbxRefFrequencyDirectHz = new System.Windows.Forms.TextBox();
this.gbxFM2014Setup.SuspendLayout();
this.gbxRegulationSetup.SuspendLayout();
this.gbxManualRefCalibration.SuspendLayout();
this.gbxDutToRefRegulation.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picFM2014)).BeginInit();
this.grpBoxDebug.SuspendLayout();
this.SuspendLayout();
//
// gbxFM2014Setup
@ -263,7 +280,7 @@
this.gbxRegulationSetup.Controls.Add(this.tbxRefPulsePerCm);
this.gbxRegulationSetup.Controls.Add(this.tbxDutPulsePerCm);
this.gbxRegulationSetup.Controls.Add(this.tbxScaleRefToDut);
this.gbxRegulationSetup.Location = new System.Drawing.Point(77, 243);
this.gbxRegulationSetup.Location = new System.Drawing.Point(78, 242);
this.gbxRegulationSetup.Name = "gbxRegulationSetup";
this.gbxRegulationSetup.Size = new System.Drawing.Size(260, 161);
this.gbxRegulationSetup.TabIndex = 82;
@ -368,7 +385,7 @@
// lblUpdateTimeValue
//
this.lblUpdateTimeValue.AutoSize = true;
this.lblUpdateTimeValue.Location = new System.Drawing.Point(331, 413);
this.lblUpdateTimeValue.Location = new System.Drawing.Point(331, 416);
this.lblUpdateTimeValue.Name = "lblUpdateTimeValue";
this.lblUpdateTimeValue.Size = new System.Drawing.Size(28, 13);
this.lblUpdateTimeValue.TabIndex = 81;
@ -382,7 +399,7 @@
// lblTimeText
//
this.lblTimeText.AutoSize = true;
this.lblTimeText.Location = new System.Drawing.Point(259, 413);
this.lblTimeText.Location = new System.Drawing.Point(259, 416);
this.lblTimeText.Name = "lblTimeText";
this.lblTimeText.Size = new System.Drawing.Size(66, 13);
this.lblTimeText.TabIndex = 79;
@ -392,7 +409,7 @@
//
this.lblWaitingForMeterResponse.AutoSize = true;
this.lblWaitingForMeterResponse.ForeColor = System.Drawing.Color.Red;
this.lblWaitingForMeterResponse.Location = new System.Drawing.Point(421, 413);
this.lblWaitingForMeterResponse.Location = new System.Drawing.Point(421, 416);
this.lblWaitingForMeterResponse.Name = "lblWaitingForMeterResponse";
this.lblWaitingForMeterResponse.Size = new System.Drawing.Size(183, 13);
this.lblWaitingForMeterResponse.TabIndex = 76;
@ -400,7 +417,7 @@
//
// barSingleProgressUpdate
//
this.barSingleProgressUpdate.Location = new System.Drawing.Point(7, 429);
this.barSingleProgressUpdate.Location = new System.Drawing.Point(7, 432);
this.barSingleProgressUpdate.Name = "barSingleProgressUpdate";
this.barSingleProgressUpdate.Size = new System.Drawing.Size(597, 18);
this.barSingleProgressUpdate.TabIndex = 75;
@ -409,7 +426,7 @@
// lblActualProcess
//
this.lblActualProcess.AutoSize = true;
this.lblActualProcess.Location = new System.Drawing.Point(5, 413);
this.lblActualProcess.Location = new System.Drawing.Point(5, 416);
this.lblActualProcess.Name = "lblActualProcess";
this.lblActualProcess.Size = new System.Drawing.Size(76, 13);
this.lblActualProcess.TabIndex = 74;
@ -516,9 +533,9 @@
this.gbxDutToRefRegulation.Controls.Add(this.lblActualFlowRateCmPerHour);
this.gbxDutToRefRegulation.Controls.Add(this.tbxActualFlowRateCmPerHour);
this.gbxDutToRefRegulation.Controls.Add(this.btnDutToRefRegulation);
this.gbxDutToRefRegulation.Location = new System.Drawing.Point(344, 244);
this.gbxDutToRefRegulation.Location = new System.Drawing.Point(344, 243);
this.gbxDutToRefRegulation.Name = "gbxDutToRefRegulation";
this.gbxDutToRefRegulation.Size = new System.Drawing.Size(260, 161);
this.gbxDutToRefRegulation.Size = new System.Drawing.Size(260, 160);
this.gbxDutToRefRegulation.TabIndex = 84;
this.gbxDutToRefRegulation.TabStop = false;
this.gbxDutToRefRegulation.Text = "DUT to REF Regulation";
@ -526,7 +543,7 @@
// lblRefFrequencyHz
//
this.lblRefFrequencyHz.AutoSize = true;
this.lblRefFrequencyHz.Location = new System.Drawing.Point(10, 76);
this.lblRefFrequencyHz.Location = new System.Drawing.Point(10, 52);
this.lblRefFrequencyHz.Name = "lblRefFrequencyHz";
this.lblRefFrequencyHz.Size = new System.Drawing.Size(106, 13);
this.lblRefFrequencyHz.TabIndex = 79;
@ -535,7 +552,7 @@
// tbxRefFrequencyHz
//
this.tbxRefFrequencyHz.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxRefFrequencyHz.Location = new System.Drawing.Point(150, 74);
this.tbxRefFrequencyHz.Location = new System.Drawing.Point(150, 50);
this.tbxRefFrequencyHz.Name = "tbxRefFrequencyHz";
this.tbxRefFrequencyHz.ReadOnly = true;
this.tbxRefFrequencyHz.Size = new System.Drawing.Size(100, 20);
@ -544,7 +561,7 @@
// chkUseDampedTolerance
//
this.chkUseDampedTolerance.AutoSize = true;
this.chkUseDampedTolerance.Location = new System.Drawing.Point(9, 100);
this.chkUseDampedTolerance.Location = new System.Drawing.Point(10, 106);
this.chkUseDampedTolerance.Name = "chkUseDampedTolerance";
this.chkUseDampedTolerance.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.chkUseDampedTolerance.Size = new System.Drawing.Size(134, 17);
@ -556,7 +573,7 @@
// lblActualMeasuredTolerance
//
this.lblActualMeasuredTolerance.AutoSize = true;
this.lblActualMeasuredTolerance.Location = new System.Drawing.Point(10, 53);
this.lblActualMeasuredTolerance.Location = new System.Drawing.Point(10, 27);
this.lblActualMeasuredTolerance.Name = "lblActualMeasuredTolerance";
this.lblActualMeasuredTolerance.Size = new System.Drawing.Size(75, 13);
this.lblActualMeasuredTolerance.TabIndex = 76;
@ -565,7 +582,7 @@
// tbxActualMeasuredToleranceDutToRef
//
this.tbxActualMeasuredToleranceDutToRef.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxActualMeasuredToleranceDutToRef.Location = new System.Drawing.Point(150, 50);
this.tbxActualMeasuredToleranceDutToRef.Location = new System.Drawing.Point(150, 24);
this.tbxActualMeasuredToleranceDutToRef.Name = "tbxActualMeasuredToleranceDutToRef";
this.tbxActualMeasuredToleranceDutToRef.ReadOnly = true;
this.tbxActualMeasuredToleranceDutToRef.Size = new System.Drawing.Size(100, 20);
@ -574,7 +591,7 @@
// lblActualFlowRateCmPerHour
//
this.lblActualFlowRateCmPerHour.AutoSize = true;
this.lblActualFlowRateCmPerHour.Location = new System.Drawing.Point(10, 28);
this.lblActualFlowRateCmPerHour.Location = new System.Drawing.Point(10, 79);
this.lblActualFlowRateCmPerHour.Name = "lblActualFlowRateCmPerHour";
this.lblActualFlowRateCmPerHour.Size = new System.Drawing.Size(89, 13);
this.lblActualFlowRateCmPerHour.TabIndex = 74;
@ -583,7 +600,7 @@
// tbxActualFlowRateCmPerHour
//
this.tbxActualFlowRateCmPerHour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxActualFlowRateCmPerHour.Location = new System.Drawing.Point(150, 25);
this.tbxActualFlowRateCmPerHour.Location = new System.Drawing.Point(150, 76);
this.tbxActualFlowRateCmPerHour.Name = "tbxActualFlowRateCmPerHour";
this.tbxActualFlowRateCmPerHour.ReadOnly = true;
this.tbxActualFlowRateCmPerHour.Size = new System.Drawing.Size(100, 20);
@ -616,29 +633,190 @@
this.picFM2014.Size = new System.Drawing.Size(60, 176);
this.picFM2014.TabIndex = 87;
this.picFM2014.TabStop = false;
this.picFM2014.Click += new System.EventHandler(this.picFM2014_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(18, 27);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(123, 13);
this.label1.TabIndex = 83;
this.label1.Text = "Frequency f(period) [Hz]:";
//
// tbxRefFrequencyFromRefPeriodHz
//
this.tbxRefFrequencyFromRefPeriodHz.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxRefFrequencyFromRefPeriodHz.Location = new System.Drawing.Point(158, 25);
this.tbxRefFrequencyFromRefPeriodHz.Name = "tbxRefFrequencyFromRefPeriodHz";
this.tbxRefFrequencyFromRefPeriodHz.ReadOnly = true;
this.tbxRefFrequencyFromRefPeriodHz.Size = new System.Drawing.Size(100, 20);
this.tbxRefFrequencyFromRefPeriodHz.TabIndex = 82;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(18, 77);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(130, 13);
this.label2.TabIndex = 80;
this.label2.Text = "Flow Rate f(period) [m³/h]:";
//
// tbxRefFlowRateFromRefPeriodCmPerH
//
this.tbxRefFlowRateFromRefPeriodCmPerH.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxRefFlowRateFromRefPeriodCmPerH.Location = new System.Drawing.Point(158, 74);
this.tbxRefFlowRateFromRefPeriodCmPerH.Name = "tbxRefFlowRateFromRefPeriodCmPerH";
this.tbxRefFlowRateFromRefPeriodCmPerH.ReadOnly = true;
this.tbxRefFlowRateFromRefPeriodCmPerH.Size = new System.Drawing.Size(100, 20);
this.tbxRefFlowRateFromRefPeriodCmPerH.TabIndex = 81;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 125);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(62, 13);
this.label3.TabIndex = 84;
this.label3.Text = "Period [ms]:";
//
// tbxRefPeriodMs
//
this.tbxRefPeriodMs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxRefPeriodMs.Location = new System.Drawing.Point(158, 123);
this.tbxRefPeriodMs.Name = "tbxRefPeriodMs";
this.tbxRefPeriodMs.ReadOnly = true;
this.tbxRefPeriodMs.Size = new System.Drawing.Size(100, 20);
this.tbxRefPeriodMs.TabIndex = 85;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(190, 9);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(28, 13);
this.label4.TabIndex = 88;
this.label4.Text = "REF";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(313, 9);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(30, 13);
this.label5.TabIndex = 89;
this.label5.Text = "DUT";
//
// tbxDutPeriodMs
//
this.tbxDutPeriodMs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxDutPeriodMs.Location = new System.Drawing.Point(285, 123);
this.tbxDutPeriodMs.Name = "tbxDutPeriodMs";
this.tbxDutPeriodMs.ReadOnly = true;
this.tbxDutPeriodMs.Size = new System.Drawing.Size(100, 20);
this.tbxDutPeriodMs.TabIndex = 92;
//
// tbxDutFrequencyFromDutPeriodHz
//
this.tbxDutFrequencyFromDutPeriodHz.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxDutFrequencyFromDutPeriodHz.Location = new System.Drawing.Point(285, 25);
this.tbxDutFrequencyFromDutPeriodHz.Name = "tbxDutFrequencyFromDutPeriodHz";
this.tbxDutFrequencyFromDutPeriodHz.ReadOnly = true;
this.tbxDutFrequencyFromDutPeriodHz.Size = new System.Drawing.Size(100, 20);
this.tbxDutFrequencyFromDutPeriodHz.TabIndex = 91;
//
// tbxDutFlowRateFromDutPeriodCmPerH
//
this.tbxDutFlowRateFromDutPeriodCmPerH.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxDutFlowRateFromDutPeriodCmPerH.Location = new System.Drawing.Point(285, 74);
this.tbxDutFlowRateFromDutPeriodCmPerH.Name = "tbxDutFlowRateFromDutPeriodCmPerH";
this.tbxDutFlowRateFromDutPeriodCmPerH.ReadOnly = true;
this.tbxDutFlowRateFromDutPeriodCmPerH.Size = new System.Drawing.Size(100, 20);
this.tbxDutFlowRateFromDutPeriodCmPerH.TabIndex = 90;
//
// grpBoxDebug
//
this.grpBoxDebug.Controls.Add(this.label7);
this.grpBoxDebug.Controls.Add(this.tbxRefFlowRateFromRefFrequencyCmPerH);
this.grpBoxDebug.Controls.Add(this.label6);
this.grpBoxDebug.Controls.Add(this.tbxRefFrequencyDirectHz);
this.grpBoxDebug.Controls.Add(this.label1);
this.grpBoxDebug.Controls.Add(this.tbxDutPeriodMs);
this.grpBoxDebug.Controls.Add(this.tbxRefFlowRateFromRefPeriodCmPerH);
this.grpBoxDebug.Controls.Add(this.tbxDutFrequencyFromDutPeriodHz);
this.grpBoxDebug.Controls.Add(this.label2);
this.grpBoxDebug.Controls.Add(this.tbxDutFlowRateFromDutPeriodCmPerH);
this.grpBoxDebug.Controls.Add(this.tbxRefFrequencyFromRefPeriodHz);
this.grpBoxDebug.Controls.Add(this.label5);
this.grpBoxDebug.Controls.Add(this.tbxRefPeriodMs);
this.grpBoxDebug.Controls.Add(this.label4);
this.grpBoxDebug.Controls.Add(this.label3);
this.grpBoxDebug.Location = new System.Drawing.Point(78, 246);
this.grpBoxDebug.Name = "grpBoxDebug";
this.grpBoxDebug.Size = new System.Drawing.Size(526, 158);
this.grpBoxDebug.TabIndex = 83;
this.grpBoxDebug.TabStop = false;
this.grpBoxDebug.Text = "Debug";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(18, 101);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(128, 13);
this.label7.TabIndex = 96;
this.label7.Text = "Flow Rate f(frequ.) [m³/h]:";
//
// tbxRefFlowRateFromRefFrequencyCmPerH
//
this.tbxRefFlowRateFromRefFrequencyCmPerH.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxRefFlowRateFromRefFrequencyCmPerH.Location = new System.Drawing.Point(158, 99);
this.tbxRefFlowRateFromRefFrequencyCmPerH.Name = "tbxRefFlowRateFromRefFrequencyCmPerH";
this.tbxRefFlowRateFromRefFrequencyCmPerH.ReadOnly = true;
this.tbxRefFlowRateFromRefFrequencyCmPerH.Size = new System.Drawing.Size(100, 20);
this.tbxRefFlowRateFromRefFrequencyCmPerH.TabIndex = 95;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(18, 52);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(117, 13);
this.label6.TabIndex = 94;
this.label6.Text = "Frequency (direct) [Hz]:";
//
// tbxRefFrequencyDirectHz
//
this.tbxRefFrequencyDirectHz.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbxRefFrequencyDirectHz.Location = new System.Drawing.Point(158, 50);
this.tbxRefFrequencyDirectHz.Name = "tbxRefFrequencyDirectHz";
this.tbxRefFrequencyDirectHz.ReadOnly = true;
this.tbxRefFrequencyDirectHz.Size = new System.Drawing.Size(100, 20);
this.tbxRefFrequencyDirectHz.TabIndex = 93;
//
// FrmMainMiniPrf
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(610, 464);
this.ClientSize = new System.Drawing.Size(610, 462);
this.Controls.Add(this.gbxDutToRefRegulation);
this.Controls.Add(this.gbxRegulationSetup);
this.Controls.Add(this.picFM2014);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.gbxDutToRefRegulation);
this.Controls.Add(this.gbxFM2014Setup);
this.Controls.Add(this.gbxRegulationSetup);
this.Controls.Add(this.lblUpdateTimeValue);
this.Controls.Add(this.gbxManualRefCalibration);
this.Controls.Add(this.lblTimeText);
this.Controls.Add(this.lblWaitingForMeterResponse);
this.Controls.Add(this.barSingleProgressUpdate);
this.Controls.Add(this.grpBoxDebug);
this.Controls.Add(this.lblActualProcess);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MaximumSize = new System.Drawing.Size(626, 503);
this.MinimumSize = new System.Drawing.Size(626, 503);
this.Name = "FrmMainMiniPrf";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MiniPrf";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmMainMiniPrf_FormClosed);
this.Load += new System.EventHandler(this.FrmMainMiniPrf_Load);
@ -652,6 +830,8 @@
this.gbxDutToRefRegulation.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picFM2014)).EndInit();
this.grpBoxDebug.ResumeLayout(false);
this.grpBoxDebug.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -709,6 +889,22 @@
private System.Windows.Forms.PictureBox picFM2014;
private System.Windows.Forms.TextBox tbxRefFrequencyHz;
private System.Windows.Forms.Label lblRefFrequencyHz;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tbxRefPeriodMs;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbxRefFrequencyFromRefPeriodHz;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbxRefFlowRateFromRefPeriodCmPerH;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tbxDutPeriodMs;
private System.Windows.Forms.TextBox tbxDutFrequencyFromDutPeriodHz;
private System.Windows.Forms.TextBox tbxDutFlowRateFromDutPeriodCmPerH;
private System.Windows.Forms.GroupBox grpBoxDebug;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox tbxRefFrequencyDirectHz;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox tbxRefFlowRateFromRefFrequencyCmPerH;
}
}

View File

@ -142,6 +142,9 @@ namespace Sensus.MiniPrf.Ui
ViewProcessControl(false);
_autoProgressBar = false;
_regulationSetupHasChanged = false;
grpBoxDebug.Visible = false;
gbxDutToRefRegulation.Visible = true;
gbxRegulationSetup.Visible = true;
// Load the configuration from the local file stored in AppData\FM2014
_fm2014Config.ReadFM2014Config();
@ -553,6 +556,19 @@ namespace Sensus.MiniPrf.Ui
barSingleProgressUpdate.Update();
Update();
}
/// <summary>
/// Common method to prepare for changed setup.
/// </summary>
private void SetupHasChanged()
{
_regulationSetupHasChanged = true;
btnSaveRegulationSetup.Enabled = true;
tbxActualFlowRateCmPerHour.Text = "";
tbxActualMeasuredToleranceDutToRef.Text = "";
tbxRefFrequencyHz.Text = "";
}
#endregion ProcessControls
@ -823,18 +839,6 @@ namespace Sensus.MiniPrf.Ui
}
}
/// <summary>
/// Common method to prepare for changed setup.
/// </summary>
private void SetupHasChanged()
{
_regulationSetupHasChanged = true;
btnSaveRegulationSetup.Enabled = true;
tbxActualFlowRateCmPerHour.Text = "";
tbxActualMeasuredToleranceDutToRef.Text = "";
tbxRefFrequencyHz.Text = "";
}
/// <summary>
/// After manual input of the REF pulses per cubic meter the scale REF to DUT has to be recalculated
/// </summary>
@ -991,6 +995,23 @@ namespace Sensus.MiniPrf.Ui
}
}
}
/// <summary>
/// Switch between DEBUG and regular operation
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picFM2014_Click(Object sender, EventArgs e)
{
grpBoxDebug.Visible = !grpBoxDebug.Visible;
if (Fm2014 != null)
Fm2014.RequestDebugInformation = grpBoxDebug.Visible;
gbxDutToRefRegulation.Visible = !grpBoxDebug.Visible;
gbxRegulationSetup.Visible = !grpBoxDebug.Visible;
}
#endregion Buttons and Controls
#region Event handler
@ -1006,7 +1027,8 @@ namespace Sensus.MiniPrf.Ui
Invoke(new Action(() =>
{
// Process info
lblActualProcess.Text = e.ActualProcessMessage;
if (e.ActualProcessMessage != null)
lblActualProcess.Text = e.ActualProcessMessage;
lblActualProcess.Update();
SetTimeDisplay();
lblUpdateTimeValue.Update();
@ -1039,6 +1061,18 @@ namespace Sensus.MiniPrf.Ui
break;
case FM2014CmdDef.CmdName.CMD_GET_REF_FREQU:
tbxRefFrequencyHz.Text = $@"{resp.IntValue:D}";
// DEBUG
tbxRefFrequencyDirectHz.Text = $@"{resp.IntValue:D}";
if (resp.IntValue < 1 || resp.IntValue > 254)
{
tbxRefFrequencyHz.BackColor = Color.Red;
tbxActualFlowRateCmPerHour.BackColor = Color.Red;
}
else
{
tbxRefFrequencyHz.BackColor = gbxDutToRefRegulation.BackColor;
tbxActualFlowRateCmPerHour.BackColor = gbxDutToRefRegulation.BackColor;
}
break;
}
}
@ -1050,16 +1084,42 @@ namespace Sensus.MiniPrf.Ui
case FM2014CmdDef.CmdName.CMD_GET_UDTLC:
case FM2014CmdDef.CmdName.CMD_GET_DTLC:
tbxActualMeasuredToleranceDutToRef.Text = $@"{resp.DoubleValue:F2}";
break;
case FM2014CmdDef.CmdName.CMD_CAL_FLOW_RATE:
tbxActualFlowRateCmPerHour.Text = $@"{resp.DoubleValue:F3}";
break;
if (resp.DoubleValue < -Fm2014.Tolerance_percent ||
resp.DoubleValue > Fm2014.Tolerance_percent)
{
tbxActualMeasuredToleranceDutToRef.BackColor = Color.Red;
}
else
{
tbxActualMeasuredToleranceDutToRef.BackColor = gbxDutToRefRegulation.BackColor;
}
break;
case FM2014CmdDef.CmdName.CMD_REF_SET_SCALE:
tbxScaleRefToDut.Text = $@"{resp.DoubleValue:F2}";
break;
// DEBUG
case FM2014CmdDef.CmdName.CMD_GET_REF_PERIOD:
case FM2014CmdDef.CmdName.CMD_GET_REF_FREQU:
tbxRefFrequencyHz.Text = $@"{resp.DoubleValue:F6}";
tbxRefPeriodMs.Text = $@"{resp.DoubleValue:F3}";
break;
case FM2014CmdDef.CmdName.CMD_GET_DUT_PERIOD:
tbxDutPeriodMs.Text = $@"{resp.DoubleValue:F3}";
break;
case FM2014CmdDef.CmdName.CMD_CAL_FREQU_REF_PERIOD:
tbxRefFrequencyFromRefPeriodHz.Text = $@"{resp.DoubleValue:F3}";
break;
case FM2014CmdDef.CmdName.CMD_CAL_FREQU_DUT_PERIOD:
tbxDutFrequencyFromDutPeriodHz.Text = $@"{resp.DoubleValue:F3}";
break;
case FM2014CmdDef.CmdName.CMD_CAL_FLOW_REF_FREQU:
tbxRefFlowRateFromRefFrequencyCmPerH.Text = $@"{resp.DoubleValue:F3}";
// TODO THW Check if the actual flow shall be taken based on 'REF Frequency'
tbxActualFlowRateCmPerHour.Text = $@"{resp.DoubleValue:F3}";
break;
case FM2014CmdDef.CmdName.CMD_CAL_FLOW_REF_PERIOD:
tbxRefFlowRateFromRefPeriodCmPerH.Text = $@"{resp.DoubleValue:F3}";
break;
case FM2014CmdDef.CmdName.CMD_CAL_FLOW_DUT_PERIOD:
tbxDutFlowRateFromDutPeriodCmPerH.Text = $@"{resp.DoubleValue:F3}";
break;
}
@ -1070,6 +1130,5 @@ namespace Sensus.MiniPrf.Ui
}
#endregion
}
}