You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.3 KiB
C#
93 lines
2.3 KiB
C#
using DataBlockHelper.Entity.DB2107Entity;
|
|
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using HslCommunication;
|
|
|
|
namespace DataBlockHelper.DBHelpers
|
|
{
|
|
public class DB2107Helper : DBHelper
|
|
{
|
|
|
|
public DB2107Helper()
|
|
{
|
|
bytes = PlcConnect.Instance.Read("DB2107.0.0", 2064).Content;
|
|
}
|
|
|
|
// public OperateResult<byte[]> GetAll=>PlcConnect.Instance.Read("DB2107.0.0", 2057);
|
|
|
|
public NormalStatusEntity NormalStatus => NormalS(bytes);
|
|
|
|
private NormalStatusEntity NormalS(byte[] bytes)
|
|
{
|
|
return new NormalStatusEntity(bytes);
|
|
}
|
|
|
|
public ControlSignEntity ControlSign => ControlS(bytes);
|
|
|
|
|
|
private ControlSignEntity ControlS(byte[] bytes)
|
|
{
|
|
return new ControlSignEntity(bytes);
|
|
}
|
|
|
|
public PressureEntity Pressure => Press(bytes);
|
|
|
|
private PressureEntity Press(byte[] bytes)
|
|
{
|
|
return new PressureEntity(bytes);
|
|
}
|
|
|
|
public PIDEntity PID => Pid(bytes);
|
|
|
|
private PIDEntity Pid(byte[] bytes)
|
|
{
|
|
return new PIDEntity(bytes);
|
|
}
|
|
|
|
public WeightEntity Weight => Weigh(bytes);
|
|
|
|
private WeightEntity Weigh(byte[] bytes)
|
|
{
|
|
return new WeightEntity(bytes);
|
|
}
|
|
|
|
public WeightPraEntity WeightPra => WeightP(bytes);
|
|
|
|
private WeightPraEntity WeightP(byte[] bytes)
|
|
{
|
|
return new WeightPraEntity(bytes);
|
|
}
|
|
|
|
public SpeedEntity Speed => Spee(bytes);
|
|
|
|
private SpeedEntity Spee(byte[] bytes)
|
|
{
|
|
return new SpeedEntity(bytes);
|
|
}
|
|
|
|
public List<UntiStatusHMIArrayEntity> Dryer => new UntiStatusHMIArrayManager(4, 1408, 32, bytes).GetList();
|
|
public List<UntiStatusHMIArrayEntity> Gelater => new UntiStatusHMIArrayManager(8, 1536, 32, bytes).GetList();
|
|
public List<UntiStatusHMIArrayEntity> Weter => new UntiStatusHMIArrayManager(8, 1792, 32, bytes).GetList();
|
|
|
|
public ValveEntity Valve => Val(bytes);
|
|
|
|
private ValveEntity Val(byte[] bytes)
|
|
{
|
|
return new ValveEntity(bytes);
|
|
}
|
|
|
|
public LevelEntity Level => Lev(bytes);
|
|
|
|
private LevelEntity Lev(byte[] bytes)
|
|
{
|
|
return new LevelEntity(bytes);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|