FM2014TestApp: - enabled pulse counter and time measurements for REF and/or DUT
This commit is contained in:
parent
7e7b826c98
commit
feb5739fbe
@ -148,7 +148,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core
|
||||
/// <summary>
|
||||
/// FM2014 minimal pulses for REF and DUT time measurement.
|
||||
/// </summary>
|
||||
public const UInt16 PULSES_TIME_MEASUREMENT_INPUT_MIN = 1;
|
||||
public const UInt16 PULSES_TIME_MEASUREMENT_INPUT_MIN = 0;
|
||||
|
||||
/// <summary>
|
||||
/// FM2014 maximal pulses for REF and DUT time measurement.
|
||||
|
||||
@ -14,17 +14,14 @@
|
||||
<Menu DockPanel.Dock="Top" Visibility="Visible" Height="30" Background="#FFF0F0F0" HorizontalAlignment="Stretch">
|
||||
|
||||
<!-- Menu -->
|
||||
<MenuItem x:Name="optMenu" HorizontalAlignment="Left" Height="26" Width="80" Header="_Options" >
|
||||
<!--MenuItem x:Name="optMenu" HorizontalAlignment="Left" Height="26" Width="80" Header="_Options" >
|
||||
<MenuItem x:Name="optMenuLogin" Header="_Login" HorizontalAlignment="Left"/>
|
||||
<!--Click="OnLogin_Click"/-->
|
||||
<MenuItem x:Name="optMenuLogout" Header="L_ogout" HorizontalAlignment="Left"/>
|
||||
<!-- Click="OnLogout_Click"/-->
|
||||
<MenuItem x:Name="optMenuChangePassword" Header="Change Password" HorizontalAlignment="Left"/>
|
||||
<!--Click="OnChangePassword_Click"/-->
|
||||
</MenuItem>
|
||||
</MenuItem-->
|
||||
<Label x:Name="portMenu" Content="Serial Port:" Margin="2,2,2,2"/>
|
||||
<ComboBox x:Name="cbxProgramComPort" Margin="2,2,2,2" SelectionChanged="cbxProgramComPort_SelectedValueChanged"/>
|
||||
<MenuItem x:Name="hlpMenu" HorizontalAlignment="Right" Height="26" Width="40" FontSize="12" Header="Help" Click="HlpMenu_Click" />
|
||||
<!--MenuItem x:Name="hlpMenu" HorizontalAlignment="Right" Height="26" Width="40" FontSize="12" Header="Help" Click="HlpMenu_Click" /-->
|
||||
<!--Special approval / requirement-->
|
||||
</Menu>
|
||||
|
||||
@ -382,17 +379,20 @@
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label x:Name="lblRefPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="1" Grid.Column="17" Grid.ColumnSpan="6" Content="REF Required Pulses:" />
|
||||
<Label x:Name="lblDutPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="2" Grid.Column="17" Grid.ColumnSpan="6" Content="DUT Required Pulses:" />
|
||||
<Label x:Name="lblDoublePulseDeadtime" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="3" Grid.Column="17" Grid.ColumnSpan="6" Content="Double Pulse Deadtime [ms]:" />
|
||||
<Label x:Name="lblDutToRefTolMax" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="4" Grid.Column="17" Grid.ColumnSpan="6" Content="DUT/REF Tolerance max [%]" />
|
||||
<Label x:Name="lblDutToRefTolMin" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="5" Grid.Column="17" Grid.ColumnSpan="6" Content="DUT/REF Tolerance min [%]:" />
|
||||
<TextBox x:Name="tbxRefPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="1" Grid.Column="23" Grid.ColumnSpan="2" Text="500" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="111" KeyDown="tbxRefPulsesRequired_KeyDown" LostFocus="tbxRefPulsesRequired_LostFocus" TextChanged="tbxRefPulsesRequired_TextChanged" />
|
||||
<TextBox x:Name="tbxDutPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="2" Grid.Column="23" Grid.ColumnSpan="2" Text="50" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="112" KeyDown="tbxDutPulsesRequired_KeyDown" LostFocus="tbxDutPulsesRequired_LostFocus" TextChanged="tbxDutPulsesRequired_TextChanged"/>
|
||||
<TextBox x:Name="tbxDoublePulseDeadtime" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="3" Grid.Column="23" Grid.ColumnSpan="2" Text="5" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="113" KeyDown="tbxDoublePulseDeadtime_KeyDown" LostFocus="tbxDoublePulseDeadtime_LostFocus" TextChanged="tbxDoublePulseDeadtime_TextChanged"/>
|
||||
<TextBox x:Name="tbxDutToRefTolMax" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="4" Grid.Column="23" Grid.ColumnSpan="2" Text="1.1" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="114" KeyDown="tbxDutToRefToleranceMax_KeyDown" LostFocus="tbxDutToRefToleranceMax_LostFocus" TextChanged="tbxDutToRefToleranceMax_TextChanged"/>
|
||||
<TextBox x:Name="tbxDutToRefTolMin" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="5" Grid.Column="23" Grid.ColumnSpan="2" Text="-0.5" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="115" KeyDown="tbxDutToRefToleranceMin_KeyDown" LostFocus="tbxDutToRefToleranceMin_LostFocus" TextChanged="tbxDutToRefToleranceMin_TextChanged"/>
|
||||
<Button x:Name="btnDutToRefCalibration" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="4" Content="Start Calibration" TabIndex="110" Click="btnDutToRefCalibration_Click" />
|
||||
<Label x:Name="lblRefPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="1" Grid.Column="17" Grid.ColumnSpan="6" Content="REF Required Pulses:" />
|
||||
<Label x:Name="lblDutPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="2" Grid.Column="17" Grid.ColumnSpan="6" Content="DUT Required Pulses:" />
|
||||
<Label x:Name="lblDoublePulseDeadtime" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="3" Grid.Column="17" Grid.ColumnSpan="6" Content="Double Pulse Deadtime [ms]:" />
|
||||
<Label x:Name="lblDutToRefTolMax" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="4" Grid.Column="17" Grid.ColumnSpan="6" Content="DUT/REF Tolerance max [%]" />
|
||||
<Label x:Name="lblDutToRefTolMin" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="5" Grid.Column="17" Grid.ColumnSpan="6" Content="DUT/REF Tolerance min [%]:" />
|
||||
<TextBox x:Name="tbxRefPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="1" Grid.Column="23" Grid.ColumnSpan="2" Text="500" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="114" KeyDown="tbxRefPulsesRequired_KeyDown" LostFocus="tbxRefPulsesRequired_LostFocus" TextChanged="tbxRefPulsesRequired_TextChanged" />
|
||||
<TextBox x:Name="tbxDutPulsesRequired" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="2" Grid.Column="23" Grid.ColumnSpan="2" Text="50" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="115" KeyDown="tbxDutPulsesRequired_KeyDown" LostFocus="tbxDutPulsesRequired_LostFocus" TextChanged="tbxDutPulsesRequired_TextChanged"/>
|
||||
<TextBox x:Name="tbxDoublePulseDeadtime" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="3" Grid.Column="23" Grid.ColumnSpan="2" Text="5" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="116" KeyDown="tbxDoublePulseDeadtime_KeyDown" LostFocus="tbxDoublePulseDeadtime_LostFocus" TextChanged="tbxDoublePulseDeadtime_TextChanged"/>
|
||||
<TextBox x:Name="tbxDutToRefTolMax" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="4" Grid.Column="23" Grid.ColumnSpan="2" Text="1.1" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="117" KeyDown="tbxDutToRefToleranceMax_KeyDown" LostFocus="tbxDutToRefToleranceMax_LostFocus" TextChanged="tbxDutToRefToleranceMax_TextChanged"/>
|
||||
<TextBox x:Name="tbxDutToRefTolMin" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="5" Grid.Column="23" Grid.ColumnSpan="2" Text="-0.5" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="118" KeyDown="tbxDutToRefToleranceMin_KeyDown" LostFocus="tbxDutToRefToleranceMin_LostFocus" TextChanged="tbxDutToRefToleranceMin_TextChanged"/>
|
||||
<RadioButton Name="rbtRefTimeMeasurement" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="8" Content="REF Pulse Time Measurement" TabIndex="111"/>
|
||||
<RadioButton Name="rbtDutTimeMeasurement" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="8" Content="DUT Pulse Time Measurement" TabIndex="112"/>
|
||||
<RadioButton Name="rbtDutToRefCalibration" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="8" Content="DUT to REF Calibration" TabIndex="113"/>
|
||||
<Button x:Name="btnDutToRefCalibration" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="4" Content="Start Calibration" TabIndex="110" Click="btnDutToRefCalibration_Click" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
@ -436,13 +436,13 @@
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label x:Name="lblRefPulsesMeasured" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="1" Grid.Column="17" Grid.ColumnSpan="6" Content="Measured REF Pulses:" />
|
||||
<CheckBox x:Name="chkDutPulsesMeasured" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4,1,1,1" Grid.Row="2" Grid.Column="17" Grid.ColumnSpan="6" Content="Measured DUT Pulses:" TabIndex="121" Click="chkDutPulseMeasurement_CheckChanged" />
|
||||
<CheckBox x:Name="chkRefPulsesMeasured" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4,1,1,1" Grid.Row="1" Grid.Column="17" Grid.ColumnSpan="6" Content="Measured REF Pulses:" TabIndex="121" Click="chkRefPulseMeasurement_CheckChanged" />
|
||||
<CheckBox x:Name="chkDutPulsesMeasured" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="4,1,1,1" Grid.Row="2" Grid.Column="17" Grid.ColumnSpan="6" Content="Measured DUT Pulses:" TabIndex="122" Click="chkDutPulseMeasurement_CheckChanged" />
|
||||
<Label x:Name="lblVolumeMeasuredLiters" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="3" Grid.Column="17" Grid.ColumnSpan="6" Content="Measured Volume [liters]:" />
|
||||
<Label x:Name="lblRefPulsesPerCmScale" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Grid.Row="4" Grid.Column="17" Grid.ColumnSpan="6" Content="REF Pulse Ratio [pulses/m³]:" />
|
||||
<TextBox x:Name="tbxRefPulsesMeasured" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="1" Grid.Column="23" Grid.ColumnSpan="2" Text="500" MaxLines="1" HorizontalContentAlignment="Right" />
|
||||
<TextBox x:Name="tbxDutPulsesMeasured" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="2" Grid.Column="23" Grid.ColumnSpan="2" Text="50" MaxLines="1" HorizontalContentAlignment="Right" />
|
||||
<TextBox x:Name="tbxVolumeMeasuredLiters" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="3" Grid.Column="23" Grid.ColumnSpan="2" Text="500" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="122" KeyDown="tbxVolumeMeasuredLiters_KeyDown" LostFocus="tbxVolumeMeasuredLiters_LostFocus" TextChanged="tbxVolumeMeasuredLiters_TextChanged"/>
|
||||
<TextBox x:Name="tbxVolumeMeasuredLiters" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="3" Grid.Column="23" Grid.ColumnSpan="2" Text="500" MaxLines="1" HorizontalContentAlignment="Right" TabIndex="123" KeyDown="tbxVolumeMeasuredLiters_KeyDown" LostFocus="tbxVolumeMeasuredLiters_LostFocus" TextChanged="tbxVolumeMeasuredLiters_TextChanged"/>
|
||||
<TextBox x:Name="tbxRefPulsesPerCmCalib" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="4" Grid.Column="23" Grid.ColumnSpan="2" Text="1000" MaxLines="1" HorizontalContentAlignment="Right" />
|
||||
<Button x:Name="btnRefToVolumeCalibration" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="4" Content="Start Calibration" TabIndex="120" Click="btnRefToVolumeCalibration_Click" />
|
||||
</Grid>
|
||||
|
||||
@ -585,11 +585,11 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
tabRefToScaleCalibration.Header = Properties.Resources.StrGbxManualRefCalibration;
|
||||
|
||||
// Menu setup
|
||||
hlpMenu.Header = Properties.Resources.StrLblHelp;
|
||||
optMenu.Header = Properties.Resources.StrLblOptions;
|
||||
optMenuLogin.Header = Properties.Resources.StrLblOptionsLogin;
|
||||
optMenuLogout.Header = Properties.Resources.StrLblOptionsLogout;
|
||||
optMenuChangePassword.Header = Properties.Resources.StrLblOptionsChangePassword;
|
||||
//hlpMenu.Header = Properties.Resources.StrLblHelp;
|
||||
//optMenu.Header = Properties.Resources.StrLblOptions;
|
||||
//optMenuLogin.Header = Properties.Resources.StrLblOptionsLogin;
|
||||
//optMenuLogout.Header = Properties.Resources.StrLblOptionsLogout;
|
||||
//optMenuChangePassword.Header = Properties.Resources.StrLblOptionsChangePassword;
|
||||
portMenu.Content = Properties.Resources.StrLblComPort;
|
||||
|
||||
// Static labels for all devices
|
||||
@ -597,7 +597,7 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
lblLifeTimeText.Content = Properties.Resources.StrLblLifetime;
|
||||
lblSlotSelection.Content = Properties.Resources.StrLblSlotSelection;
|
||||
|
||||
// DUT to REF Regulation Setup
|
||||
// DUT to REF Regulation
|
||||
lblRefPulsesPerCm.Content = Properties.Resources.StrLblRefPulsesPerCmRatio;
|
||||
lblDutPulsesPerCm.Content = Properties.Resources.StrLblDutPulsesPerCmRatio;
|
||||
lblScaleRefToDut.Content = Properties.Resources.StrLblRefToDutScale;
|
||||
@ -610,18 +610,24 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
chkUseDampedTolerance.Content = Properties.Resources.StrChkUseDampedTolerance;
|
||||
btnDutToRefRegulation.Content = Properties.Resources.StrBtnStartRegulation;
|
||||
|
||||
// DUT to REF Calibration
|
||||
// Time measurement / DUT to REF Calibration
|
||||
rbtRefTimeMeasurement.Content = Properties.Resources.StrSelectRefTimeMeasurement;
|
||||
rbtDutTimeMeasurement.Content = Properties.Resources.StrSelectDutTimeMeasurement;
|
||||
rbtDutToRefCalibration.Content = Properties.Resources.StrSelectDutToRefCalibration;
|
||||
rbtDutToRefCalibration.IsChecked = true;
|
||||
lblRefPulsesRequired.Content = Properties.Resources.StrLblRefPulsesRequired;
|
||||
lblDutPulsesRequired.Content = Properties.Resources.StrLblDutPulsesRequired;
|
||||
lblDoublePulseDeadtime.Content = Properties.Resources.StrLblDoublePulseDeadTime;
|
||||
lblDutToRefTolMax.Content = Properties.Resources.StrLblDutToRefToleranceMax;
|
||||
lblDutToRefTolMin.Content = Properties.Resources.StrLblDutToRefToleranceMin;
|
||||
|
||||
// Manual REF to Volume Calibration
|
||||
lblRefPulsesMeasured.Content = Properties.Resources.StrLblRefPulsesMeasured;
|
||||
// Pulse counter measurement / Manual REF to Volume Calibration
|
||||
chkRefPulsesMeasured.Content = Properties.Resources.StrLblRefPulsesMeasured;
|
||||
chkRefPulsesMeasured.IsChecked = true;
|
||||
tbxRefPulsesMeasured.Text = "";
|
||||
tbxRefPulsesMeasured.IsReadOnly = true;
|
||||
chkDutPulsesMeasured.Content = Properties.Resources.StrLblDutPulsesMeasured;
|
||||
chkDutPulsesMeasured.IsChecked = false;
|
||||
tbxDutPulsesMeasured.Text = "";
|
||||
tbxDutPulsesMeasured.IsReadOnly = true;
|
||||
lblVolumeMeasuredLiters.Content = Properties.Resources.StrLblVolumeMeasured;
|
||||
@ -1039,26 +1045,38 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
tbxRefPulsesPerCm.IsReadOnly = true;
|
||||
tbxDutPulsesPerCm.IsReadOnly = true;
|
||||
});
|
||||
|
||||
// Program settings
|
||||
UiElmEnable(cbxToleranceDisplayRange, false);
|
||||
UiElmEnable(cbxProgramComPort, false);
|
||||
foreach (var slotSelector in SlotSelections)
|
||||
{
|
||||
UiElmEnable(slotSelector, false);
|
||||
}
|
||||
|
||||
// Time measurement / DUT to REF calibration
|
||||
UiElmEnable(tbxRefPulsesRequired, false);
|
||||
UiElmEnable(tbxDutPulsesRequired, false);
|
||||
UiElmEnable(tbxDoublePulseDeadtime, false);
|
||||
UiElmEnable(tbxDutToRefTolMax, false);
|
||||
UiElmEnable(tbxDutToRefTolMin, false);
|
||||
UiElmEnable(rbtDutToRefCalibration, false);
|
||||
UiElmEnable(rbtRefTimeMeasurement, false);
|
||||
UiElmEnable(rbtDutTimeMeasurement, false);
|
||||
|
||||
// Regulation measurement
|
||||
UiElmEnable(tbxRefPulsesPerCm, false);
|
||||
UiElmEnable(tbxDutPulsesPerCm, false);
|
||||
UiElmEnable(tbxScaleRefToDut, false); // Is permanent read only
|
||||
UiElmEnable(cbxToleranceDisplayAttenuation, false);
|
||||
UiElmEnable(cbxToleranceDisplayRange, false);
|
||||
UiElmEnable(cbxProgramComPort, false);
|
||||
|
||||
// Pulse counter measurement / manual REF to Volume calibration
|
||||
UiElmEnable(tbxRefPulsesMeasured, false); // Is permanent read only
|
||||
UiElmEnable(chkDutPulsesMeasured, false);
|
||||
UiElmEnable(tbxDutPulsesMeasured, false); // Is permanent read only
|
||||
UiElmEnable(chkRefPulsesMeasured, false);
|
||||
UiElmEnable(chkDutPulsesMeasured, false);
|
||||
UiElmEnable(tbxVolumeMeasuredLiters, false);
|
||||
UiElmEnable(tbxRefPulsesPerCmCalib, false); // Is permanent read only
|
||||
foreach (var slotSelector in SlotSelections)
|
||||
{
|
||||
UiElmEnable(slotSelector, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1079,9 +1097,12 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
UpdateContentControl(btnDutToRefRegulation, Properties.Resources.StrBtnStartRegulation);
|
||||
|
||||
var dutPulseMeasurementIsActive = false;
|
||||
var refPulseMeasurementIsActive = true;
|
||||
// Enable manual input
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (chkRefPulsesMeasured.IsChecked != null)
|
||||
refPulseMeasurementIsActive = (Boolean)chkRefPulsesMeasured.IsChecked;
|
||||
if (chkDutPulsesMeasured.IsChecked != null)
|
||||
dutPulseMeasurementIsActive = (Boolean)chkDutPulsesMeasured.IsChecked;
|
||||
tbxVolumeMeasuredLiters.IsReadOnly = false;
|
||||
@ -1089,28 +1110,37 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
tbxDutPulsesPerCm.IsReadOnly = false;
|
||||
});
|
||||
|
||||
//// Enable setting selections
|
||||
// Program settings
|
||||
UiElmEnable(cbxToleranceDisplayRange, true);
|
||||
UiElmEnable(cbxProgramComPort, true);
|
||||
foreach (var slotSelector in SlotSelections)
|
||||
{
|
||||
UiElmEnable(slotSelector, true);
|
||||
}
|
||||
|
||||
// Time measurement / DUT to REF calibration
|
||||
UiElmEnable(tbxRefPulsesRequired, true);
|
||||
UiElmEnable(tbxDutPulsesRequired, true);
|
||||
UiElmEnable(tbxDoublePulseDeadtime, true);
|
||||
UiElmEnable(tbxDutToRefTolMax, true);
|
||||
UiElmEnable(tbxDutToRefTolMin, true);
|
||||
UiElmEnable(rbtDutToRefCalibration, true);
|
||||
UiElmEnable(rbtRefTimeMeasurement, true);
|
||||
UiElmEnable(rbtDutTimeMeasurement, true);
|
||||
|
||||
// Regulation measurement
|
||||
UiElmEnable(tbxRefPulsesPerCm, true);
|
||||
UiElmEnable(tbxDutPulsesPerCm, true);
|
||||
UiElmEnable(tbxScaleRefToDut, true); // Is permanent read only
|
||||
UiElmEnable(cbxToleranceDisplayAttenuation, true);
|
||||
UiElmEnable(cbxToleranceDisplayRange, true);
|
||||
UiElmEnable(cbxProgramComPort, true);
|
||||
UiElmEnable(tbxRefPulsesMeasured, true); // Is permanent read only
|
||||
|
||||
// Pulse counter measurement / manual REF to Volume calibration
|
||||
UiElmEnable(chkRefPulsesMeasured, true);
|
||||
UiElmEnable(chkDutPulsesMeasured, true);
|
||||
UiElmEnable(tbxRefPulsesMeasured, refPulseMeasurementIsActive); // Is permanent read only
|
||||
UiElmEnable(tbxDutPulsesMeasured, dutPulseMeasurementIsActive); // Is permanent read only
|
||||
UiElmEnable(tbxVolumeMeasuredLiters, true);
|
||||
UiElmEnable(tbxRefPulsesPerCmCalib, true); // Is permanent read only
|
||||
|
||||
foreach (var slotSelector in SlotSelections)
|
||||
{
|
||||
UiElmEnable(slotSelector, true);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion ---------------------------------------- ActivationControls ----------------------------------------
|
||||
@ -1325,14 +1355,50 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
foreach (var measLbl in MeasurementLabels)
|
||||
UiElmEnable(measLbl, false, false);
|
||||
|
||||
UInt16? refPulsesRequired = null;
|
||||
UInt16? dutPulsesRequired = null;
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if ((rbtDutToRefCalibration.IsChecked != null && (Boolean)rbtDutToRefCalibration.IsChecked) ||
|
||||
(rbtRefTimeMeasurement.IsChecked != null && (Boolean)rbtRefTimeMeasurement.IsChecked))
|
||||
{
|
||||
refPulsesRequired = (UInt16)_fm2014Common.RefPulsesRequired;
|
||||
}
|
||||
|
||||
if ((rbtDutToRefCalibration.IsChecked != null && (Boolean)rbtDutToRefCalibration.IsChecked) ||
|
||||
(rbtDutTimeMeasurement.IsChecked != null && (Boolean)rbtDutTimeMeasurement.IsChecked))
|
||||
{
|
||||
dutPulsesRequired = (UInt16)_fm2014Common.DutPulsesRequired;
|
||||
}
|
||||
});
|
||||
|
||||
// Set the measurement labels
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_REF_REQ_PLS], Properties.Resources.StrLblRefPulsesRequired);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_REF_RMN_PLS], Properties.Resources.StrLblRefPulsesRemaining);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_REQ_PLS], Properties.Resources.StrLblDutPulsesRequired);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_RMN_PLS], Properties.Resources.StrLblDutPulsesRemaining);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_REF_MEAS_TMR], Properties.Resources.StrLblRefTimeMeasured);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_MEAS_TMR], Properties.Resources.StrLblDutTimeMeasured);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_TO_REF_TOL], Properties.Resources.StrLblDutToRefToleranceMeasured);
|
||||
if (refPulsesRequired != null)
|
||||
{
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_REF_REQ_PLS],
|
||||
Properties.Resources.StrLblRefPulsesRequired);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_REF_RMN_PLS],
|
||||
Properties.Resources.StrLblRefPulsesRemaining);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_REF_MEAS_TMR], Properties.Resources.StrLblRefTimeMeasured);
|
||||
}
|
||||
|
||||
if (dutPulsesRequired != null)
|
||||
{
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_REQ_PLS],
|
||||
Properties.Resources.StrLblDutPulsesRequired);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_RMN_PLS],
|
||||
Properties.Resources.StrLblDutPulsesRemaining);
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_MEAS_TMR], Properties.Resources.StrLblDutTimeMeasured);
|
||||
}
|
||||
|
||||
if (refPulsesRequired != null && dutPulsesRequired != null)
|
||||
{
|
||||
|
||||
UpdateContentControl(MeasurementLabels[CAL_LBL_IDX_DUT_TO_REF_TOL],
|
||||
Properties.Resources.StrLblDutToRefToleranceMeasured);
|
||||
}
|
||||
|
||||
UiElmEnable(MeasurementLabels[CAL_LBL_IDX_REF_REQ_PLS], true);
|
||||
UiElmEnable(MeasurementLabels[CAL_LBL_IDX_REF_RMN_PLS], true);
|
||||
UiElmEnable(MeasurementLabels[CAL_LBL_IDX_DUT_REQ_PLS], true);
|
||||
@ -1352,8 +1418,10 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
ucFM2014.EnableMeasurements(CAL_MEASURE_COUNT);
|
||||
|
||||
// Set initial required pulses as those are static upon the entire measurement
|
||||
ucFM2014.SetValue(CAL_LBL_IDX_REF_REQ_PLS, $"{_fm2014Common.RefPulsesRequired:D}");
|
||||
ucFM2014.SetValue(CAL_LBL_IDX_DUT_REQ_PLS, $"{_fm2014Common.DutPulsesRequired:D}");
|
||||
if (refPulsesRequired != null)
|
||||
ucFM2014.SetValue(CAL_LBL_IDX_REF_REQ_PLS, $"{_fm2014Common.RefPulsesRequired:D}");
|
||||
if (dutPulsesRequired != null)
|
||||
ucFM2014.SetValue(CAL_LBL_IDX_DUT_REQ_PLS, $"{_fm2014Common.DutPulsesRequired:D}");
|
||||
|
||||
// Set thresholds for tolerance verification
|
||||
fm2014.DutToRefCalibrationToleranceMax_percent = _fm2014Common.DutToRefCalibrationToleranceMax_percent;
|
||||
@ -1364,9 +1432,7 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
if (_programConfigurationSetupHasChanged)
|
||||
StoreProgramConfiguration();
|
||||
|
||||
if (FM2014.PulseTimeMeasurement((UInt16)_fm2014Common.RefPulsesRequired,
|
||||
(UInt16)_fm2014Common.DutPulsesRequired,
|
||||
_fm2014Common.DoublePulseDeadtime_ms))
|
||||
if (FM2014.PulseTimeMeasurement(refPulsesRequired, dutPulsesRequired, _fm2014Common.DoublePulseDeadtime_ms))
|
||||
{
|
||||
_autoProgressBar = false;
|
||||
ActionControl(true);
|
||||
@ -1442,7 +1508,7 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
/// <summary>
|
||||
/// Start and stop the manual REF calibration measurement.
|
||||
/// </summary>
|
||||
/// <remarks date="2026-Jan-04..Feb-11" author="Thomas Wiedebusch">
|
||||
/// <remarks date="2026-Jan-04..Feb-19" author="Thomas Wiedebusch">
|
||||
/// - Initial.
|
||||
/// </remarks>
|
||||
private void btnRefToVolumeCalibration_Click(Object sender, EventArgs e)
|
||||
@ -1469,7 +1535,12 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
return;
|
||||
|
||||
var measureDutPulses = false;
|
||||
Dispatcher.Invoke(() => measureDutPulses = chkDutPulsesMeasured.IsChecked ?? false);
|
||||
var measureRefPulses = false;
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
measureDutPulses = chkDutPulsesMeasured.IsChecked ?? false;
|
||||
measureRefPulses = chkRefPulsesMeasured.IsChecked ?? false;
|
||||
});
|
||||
|
||||
// Adjust the user control
|
||||
foreach (var fm2014 in FM2014.RegisteredFm2014s.Where(x => x.IsLoggedOn))
|
||||
@ -1483,7 +1554,7 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
if (_programConfigurationSetupHasChanged || _programConfigurationSetupHasChanged)
|
||||
StoreProgramConfiguration();
|
||||
|
||||
if (FM2014.PulseCounterMeasurement(true, measureDutPulses))
|
||||
if (FM2014.PulseCounterMeasurement(measureRefPulses, measureDutPulses))
|
||||
{
|
||||
_autoProgressBar = true;
|
||||
ActionControl(true);
|
||||
@ -1641,6 +1712,22 @@ namespace Sensus.Ui.FM2014TestBench
|
||||
}));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/Disable input
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void chkRefPulseMeasurement_CheckChanged(Object sender, EventArgs e)
|
||||
{
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
var isChecked = false;
|
||||
if (chkRefPulsesMeasured.IsChecked != null)
|
||||
isChecked = (Boolean)chkRefPulsesMeasured.IsChecked;
|
||||
UiElmEnable(tbxRefPulsesMeasured, isChecked);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/Disable input
|
||||
/// </summary>
|
||||
|
||||
@ -178,7 +178,7 @@ namespace Sensus.Ui.Fm2014TestBench.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DUT to REF Calibration.
|
||||
/// Looks up a localized string similar to DUT to REF Calibration/Tome Measurement.
|
||||
/// </summary>
|
||||
internal static string StrGbxDutToRefCalibration {
|
||||
get {
|
||||
@ -196,7 +196,7 @@ namespace Sensus.Ui.Fm2014TestBench.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to REF to Volume Calibration.
|
||||
/// Looks up a localized string similar to REF to Volume Calibration / Pulse Counter.
|
||||
/// </summary>
|
||||
internal static string StrGbxManualRefCalibration {
|
||||
get {
|
||||
@ -563,5 +563,32 @@ namespace Sensus.Ui.Fm2014TestBench.Properties {
|
||||
return ResourceManager.GetString("StrMsgPcDateTime", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DUT Pulse Time Measurement.
|
||||
/// </summary>
|
||||
internal static string StrSelectDutTimeMeasurement {
|
||||
get {
|
||||
return ResourceManager.GetString("StrSelectDutTimeMeasurement", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DUT to REF Calibration.
|
||||
/// </summary>
|
||||
internal static string StrSelectDutToRefCalibration {
|
||||
get {
|
||||
return ResourceManager.GetString("StrSelectDutToRefCalibration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to REF Time Measurement.
|
||||
/// </summary>
|
||||
internal static string StrSelectRefTimeMeasurement {
|
||||
get {
|
||||
return ResourceManager.GetString("StrSelectRefTimeMeasurement", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@
|
||||
<value>In FM2014 speichern</value>
|
||||
</data>
|
||||
<data name="StrGbxManualRefCalibration" xml:space="preserve">
|
||||
<value>REF zu Volumen Kalibrierung</value>
|
||||
<value>REF zu Volumen Kalibrierung / Impulszähler</value>
|
||||
</data>
|
||||
<data name="StrLblRefPulsesMeasured" xml:space="preserve">
|
||||
<value>REF Erfaßte Imulse:</value>
|
||||
@ -226,7 +226,7 @@
|
||||
<value>DUT Erfaßte Impulse:</value>
|
||||
</data>
|
||||
<data name="StrGbxDutToRefCalibration" xml:space="preserve">
|
||||
<value>DUT zu REF Kalibrierung</value>
|
||||
<value>DUT zu REF Kalibrierung / Zeitmessung</value>
|
||||
</data>
|
||||
<data name="StrLblOptions" xml:space="preserve">
|
||||
<value>_Optionen</value>
|
||||
@ -285,4 +285,13 @@
|
||||
<data name="StrBtnTakeCalibrationSetup" xml:space="preserve">
|
||||
<value>Anwenden</value>
|
||||
</data>
|
||||
<data name="StrSelectDutToRefCalibration" xml:space="preserve">
|
||||
<value>DUT zu REF Kalibrierung</value>
|
||||
</data>
|
||||
<data name="StrSelectRefTimeMeasurement" xml:space="preserve">
|
||||
<value>REF Impulszeitmessung</value>
|
||||
</data>
|
||||
<data name="StrSelectDutTimeMeasurement" xml:space="preserve">
|
||||
<value>DUT Impulszeitmessung</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -187,7 +187,7 @@
|
||||
<value>Save to FM2014</value>
|
||||
</data>
|
||||
<data name="StrGbxManualRefCalibration" xml:space="preserve">
|
||||
<value>REF to Volume Calibration</value>
|
||||
<value>REF to Volume Calibration / Pulse Counter</value>
|
||||
</data>
|
||||
<data name="StrLblRefPulsesMeasured" xml:space="preserve">
|
||||
<value>REF Captured Pulses:</value>
|
||||
@ -226,7 +226,7 @@
|
||||
<value>DUT Captured Pulses: </value>
|
||||
</data>
|
||||
<data name="StrGbxDutToRefCalibration" xml:space="preserve">
|
||||
<value>DUT to REF Calibration</value>
|
||||
<value>DUT to REF Calibration/Tome Measurement</value>
|
||||
</data>
|
||||
<data name="StrLblOptions" xml:space="preserve">
|
||||
<value>_Options</value>
|
||||
@ -285,4 +285,13 @@
|
||||
<data name="StrBtnTakeCalibrationSetup" xml:space="preserve">
|
||||
<value>Use Settings</value>
|
||||
</data>
|
||||
<data name="StrSelectDutToRefCalibration" xml:space="preserve">
|
||||
<value>DUT to REF Calibration</value>
|
||||
</data>
|
||||
<data name="StrSelectRefTimeMeasurement" xml:space="preserve">
|
||||
<value>REF Time Measurement</value>
|
||||
</data>
|
||||
<data name="StrSelectDutTimeMeasurement" xml:space="preserve">
|
||||
<value>DUT Pulse Time Measurement</value>
|
||||
</data>
|
||||
</root>
|
||||
Loading…
Reference in New Issue
Block a user