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