|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using DataBlockHelper.DBHelpers;
|
|
|
|
|
using DataBlockHelper.DbWrite;
|
|
|
|
|
using DevExpress.XtraGauges.Core.Model;
|
|
|
|
|
using DevExpress.XtraRichEdit.API.Layout;
|
|
|
|
|
|
|
|
|
@ -16,22 +18,41 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
|
|
|
|
|
{
|
|
|
|
|
if (view != null)
|
|
|
|
|
{
|
|
|
|
|
var basePlcHelper = GetPlcHelper;
|
|
|
|
|
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V1_LowLimit, view.LowLimit);
|
|
|
|
|
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V1_HighLimit, view.HighLimit);
|
|
|
|
|
// var basePlcHelper = GetPlcHelper;
|
|
|
|
|
// basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V1_LowLimit, view.LowLimit);
|
|
|
|
|
// basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.mainPress_V1_HighLimit, view.HighLimit);
|
|
|
|
|
// basePlcHelper.PlcWriteByDataKey(basePlcHelper.mainPress_V1_Alarm,
|
|
|
|
|
// new object[] { Convert.ToBoolean(view.Alarm) });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PlcWriteUtil plcWriter = new PlcWriteUtil();
|
|
|
|
|
|
|
|
|
|
if (view != null)
|
|
|
|
|
{
|
|
|
|
|
// var basePlcHelper = GetPlcHelper;
|
|
|
|
|
|
|
|
|
|
var ss= plcWriter.Write(PlcDbEnum.Db2107,"16.0",PlcDbType.PlcFloat,view.LowLimit);
|
|
|
|
|
ss= plcWriter.Write(PlcDbEnum.Db2107,"20.0",PlcDbType.PlcFloat,view.HighLimit);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static DB2107Helper _db2107Helper = new DB2107Helper();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static PressureSettingView UpDbw12()
|
|
|
|
|
{
|
|
|
|
|
var basePlcHelper = GetPlcHelper;
|
|
|
|
|
|
|
|
|
|
PressureSettingView view = new PressureSettingView();
|
|
|
|
|
var v1 = _db2107Helper.Pressure.MainPress_V1;
|
|
|
|
|
view.Id = 1;
|
|
|
|
|
view.LowLimit = basePlcHelper.mainPress_V1_LowLimit.NowValue.ToFloat();
|
|
|
|
|
view.HighLimit = basePlcHelper.mainPress_V1_HighLimit.NowValue.ToFloat();
|
|
|
|
|
view.Alarm = basePlcHelper.mainPress_V1_LowLimit.NowValue.ToInt();
|
|
|
|
|
view.LowLimit = v1.LowLimit;
|
|
|
|
|
view.HighLimit = v1.HighLimit;
|
|
|
|
|
return view;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -40,6 +61,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjPressure
|
|
|
|
|
|
|
|
|
|
private static void DownDbw26(PressureSettingView view)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// PlcWriter plcWriter=new PlcWriter();
|
|
|
|
|
|
|
|
|
|
if (view != null)
|
|
|
|
|
{
|
|
|
|
|
var basePlcHelper = GetPlcHelper;
|
|
|
|
|