change - 限制压力曲线图不小于0,限制三位小数

dep_deliver
wangsr 11 months ago
parent 7b814af03e
commit 83267cf4ff

@ -15,6 +15,16 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
{
public class ControlsHelper : ControlsImprot
{
public static double NoNegative(double value)
{
if(value < 0)
{
return 0;
}
else
{
return value;
}
}
}
}

@ -552,15 +552,15 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
ControlsHelper.SetMCLabel(LabelE.PR1PCP02, (float)Math.Round(PlcTemp.PR1PCP02_Set, 2)+ " MPa");
ControlsHelper.SetMCLabel(LabelE.PR1PCP03, (float)Math.Round(PlcTemp.PR1PCP03_Set, 2)+ " MPa");
PressureCurve.PointValue1 = Math.Round(PlcTemp.PR1DBT02_Set, 4);
PressureCurve.PointValue2 = Math.Round(PlcTemp.PR1DBT03_Set, 4);
PressureCurve.PointValue3 = Math.Round(PlcTemp.PR1DBT04_Set, 4);
PressureCurve.PointValue4 = Math.Round(PlcTemp.PR2DBT02_Set, 4);
PressureCurve.PointValue5 = Math.Round(PlcTemp.PR2DBT03_Set, 4);
PressureCurve.PointValue6 = Math.Round(PlcTemp.PR2DBT04_Set, 4);
PressureCurve.PointValue7 = Math.Round(PlcTemp.PR3DBT02_Set, 4);
PressureCurve.PointValue8 = Math.Round(PlcTemp.PR3DBT03_Set, 4);
PressureCurve.PointValue9 = Math.Round(PlcTemp.PR3DBT04_Set, 4);
PressureCurve.PointValue1 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR1DBT02_Set, 3));
PressureCurve.PointValue2 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR1DBT03_Set, 3));
PressureCurve.PointValue3 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR1DBT04_Set, 3));
PressureCurve.PointValue4 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR2DBT02_Set, 3));
PressureCurve.PointValue5 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR2DBT03_Set, 3));
PressureCurve.PointValue6 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR2DBT04_Set, 3));
PressureCurve.PointValue7 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR3DBT02_Set, 3));
PressureCurve.PointValue8 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR3DBT03_Set, 3));
PressureCurve.PointValue9 = ControlsHelper.NoNegative(Math.Round(PlcTemp.PR3DBT04_Set, 3));
ControlsHelper.SetHslBottle(bottleE.Bottle1, PlcTemp.Bottle1_Set);
ControlsHelper.SetHslBottle(bottleE.Bottle2, PlcTemp.Bottle2_Set);

@ -77,7 +77,7 @@
<Property name="MCEnabled">True</Property>
<Property name="Text">MPa</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">713, 498</Property>
<Property name="Location">710, 494</Property>
<Property name="Name">MCLabel1</Property>
<Property name="Size">23, 12</Property>
</Object>

Loading…
Cancel
Save