杨威 4 months ago
parent 4779128fd2
commit 84b34d9994

@ -1,6 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using DataBlockHelper;
using DataBlockHelper.DBHelpers; using DataBlockHelper.DBHelpers;
using DataBlockHelper.DbWrite; using DataBlockHelper.DbWrite;
using DataBlockHelper.Entity.DB2107Entity; using DataBlockHelper.Entity.DB2107Entity;
@ -806,6 +808,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
case 30: case 30:
DownDBW418(pressureSettingView); DownDBW418(pressureSettingView);
break; break;
case 31:
DownDBW500(pressureSettingView);
break;
} }
} }
} }
@ -850,7 +855,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
UpDbw376(), UpDbw376(),
UpDbw390(), UpDbw390(),
UpDbw404(), UpDbw404(),
UpDbw418() UpDbw418(),
UpDbw500()
}; };
@ -955,10 +961,36 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
case 30: case 30:
view= UpDbw418(); view= UpDbw418();
break; break;
case 31:
view = UpDbw500();
break;
} }
return view; return view;
} }
private static void DownDBW500(PressureSettingView view)
{
if (view != null)
{
var plc = PlcConnect.Instance;
plc.Write("DB2108.54.0", view.LowLimit);
plc.Write("DB2108.58.0", view.HighLimit);
}
}
private static PressureSettingView UpDbw500()
{
PressureSettingView view = new PressureSettingView();
view.Id = 32;
var plc = PlcConnect.Instance;
view.ActualValue = plc.ReadFloat("DB2108.50.0").Content;
view.LowLimit = plc.ReadFloat("DB2108.54.0").Content;
view.HighLimit = plc.ReadFloat("DB2108.58.0").Content;
view.Alarm = plc.ReadBool("DB2108.62.0").Content ? 1 : 0;
return view;
}
} }
} }
Loading…
Cancel
Save