change - 维护DB90 DB1

dep
wangsr 12 months ago
parent 633a70b20d
commit b5a7c0624a

@ -12,81 +12,79 @@ namespace DataBlockHelper.DBHelpers
public DB1Helper() public DB1Helper()
{ {
bytes = PlcConnect.Instance.Read("DB1.0.0", 552).Content; bytes = PlcConnect.Instance.Read("DB1.0.0", 1320).Content;
} }
public ForAoaLogInFC3005Entity PR1DBT01 => new ForAoaLogInFC3005Entity(0, bytes); public ForAnaLogIn PR1DBT01 => new ForAnaLogIn(0, bytes);
public ForAoaLogInFC3005Entity PR1DBT02 => new ForAoaLogInFC3005Entity(8, bytes); public ForAnaLogIn PR1DBT02 => new ForAnaLogIn(20, bytes);
public ForAoaLogInFC3005Entity PR1DBT03 => new ForAoaLogInFC3005Entity(16, bytes); public ForAnaLogIn PR1DBT03 => new ForAnaLogIn(40, bytes);
public ForAoaLogInFC3005Entity PR1DBT04 => new ForAoaLogInFC3005Entity(24, bytes); public ForAnaLogIn PR1DBT04 => new ForAnaLogIn(60, bytes);
public ForAoaLogInFC3005Entity PR2DBT01 => new ForAoaLogInFC3005Entity(32, bytes); public ForAnaLogIn PR2DBT01 => new ForAnaLogIn(80, bytes);
public ForAoaLogInFC3005Entity PR2DBT02 => new ForAoaLogInFC3005Entity(40, bytes); public ForAnaLogIn PR2DBT02 => new ForAnaLogIn(100, bytes);
public ForAoaLogInFC3005Entity PR2DBT03 => new ForAoaLogInFC3005Entity(48, bytes); public ForAnaLogIn PR2DBT03 => new ForAnaLogIn(120, bytes);
public ForAoaLogInFC3005Entity PR2DBT04 => new ForAoaLogInFC3005Entity(56, bytes); public ForAnaLogIn PR2DBT04 => new ForAnaLogIn(140, bytes);
public ForAoaLogInFC3005Entity PR3DBT01 => new ForAoaLogInFC3005Entity(64, bytes); public ForAnaLogIn PR3DBT01 => new ForAnaLogIn(160, bytes);
public ForAoaLogInFC3005Entity PR3DBT02 => new ForAoaLogInFC3005Entity(72, bytes); public ForAnaLogIn PR3DBT02 => new ForAnaLogIn(180, bytes);
public ForAoaLogInFC3005Entity PR3DBT03 => new ForAoaLogInFC3005Entity(80, bytes); public ForAnaLogIn PR3DBT03 => new ForAnaLogIn(200, bytes);
public ForAoaLogInFC3005Entity PR3DBT04 => new ForAoaLogInFC3005Entity(88, bytes); public ForAnaLogIn PR3DBT04 => new ForAnaLogIn(220, bytes);
public ForAoaLogInFC3005Entity PR1ASI01 => new ForAoaLogInFC3005Entity(96, bytes); public ForAnaLogIn PR1ASI01 => new ForAnaLogIn(240, bytes);
public ForAoaLogInFC3005Entity PR1BSI01 => new ForAoaLogInFC3005Entity(104, bytes); public ForAnaLogIn PR1BSI01 => new ForAnaLogIn(260, bytes);
public ForAoaLogInFC3005Entity PR1CSI01 => new ForAoaLogInFC3005Entity(112, bytes); public ForAnaLogIn PR1CSI01 => new ForAnaLogIn(280, bytes);
public ForAoaLogInFC3005Entity PR1DSI01 => new ForAoaLogInFC3005Entity(120, bytes); public ForAnaLogIn PR1DSI01 => new ForAnaLogIn(300, bytes);
public ForAoaLogInFC3005Entity PR1ESI01 => new ForAoaLogInFC3005Entity(128, bytes); public ForAnaLogIn PR1ESI01 => new ForAnaLogIn(320, bytes);
public ForAoaLogInFC3005Entity PR1FSI01 => new ForAoaLogInFC3005Entity(136, bytes); public ForAnaLogIn PR1FSI01 => new ForAnaLogIn(340, bytes);
public ForAoaLogInFC3005Entity PR1GSI01 => new ForAoaLogInFC3005Entity(144, bytes); public ForAnaLogIn PR1GSI01 => new ForAnaLogIn(360, bytes);
public ForAoaLogInFC3005Entity PR1HSI01 => new ForAoaLogInFC3005Entity(152, bytes); public ForAnaLogIn PR1HSI01 => new ForAnaLogIn(380, bytes);
public ForAoaLogInFC3005Entity PR1ISI01 => new ForAoaLogInFC3005Entity(160, bytes); public ForAnaLogIn PR1ISI01 => new ForAnaLogIn(400, bytes);
public ForAoaLogInFC3005Entity PR1JSI01 => new ForAoaLogInFC3005Entity(168, bytes); public ForAnaLogIn PR1JSI01 => new ForAnaLogIn(420, bytes);
public ForAoaLogInFC3005Entity PR1OSI01 => new ForAoaLogInFC3005Entity(176, bytes); public ForAnaLogIn PR1KSI01 => new ForAnaLogIn(440, bytes);
public ForAoaLogInFC3005Entity PR1PCP01 => new ForAoaLogInFC3005Entity(184, bytes); public ForAnaLogIn PR1LSI01 => new ForAnaLogIn(460, bytes);
public ForAoaLogInFC3005Entity PR1PCP02 => new ForAoaLogInFC3005Entity(192, bytes); public ForAnaLogIn PR1MSI01 => new ForAnaLogIn(480, bytes);
public ForAoaLogInFC3005Entity PR1PCP03 => new ForAoaLogInFC3005Entity(200, bytes); public ForAnaLogIn PR1NSI01 => new ForAnaLogIn(500, bytes);
public ForAoaLogInFC3005Entity LS1ASI01 => new ForAoaLogInFC3005Entity(208, bytes); public ForAnaLogIn PR1OSI01 => new ForAnaLogIn(520, bytes);
public ForAoaLogInFC3005Entity LS1BSI01 => new ForAoaLogInFC3005Entity(216, bytes); public ForAnaLogIn PR1PCP01 => new ForAnaLogIn(540, bytes);
public ForAoaLogInFC3005Entity LS1CSI01 => new ForAoaLogInFC3005Entity(224, bytes); public ForAnaLogIn PR1PCP02 => new ForAnaLogIn(560, bytes);
public ForAoaLogInFC3005Entity LS1DSI01 => new ForAoaLogInFC3005Entity(232, bytes); public ForAnaLogIn PR1PCP03 => new ForAnaLogIn(580, bytes);
public ForAoaLogInFC3005Entity LS1ESI01 => new ForAoaLogInFC3005Entity(240, bytes); public ForAnaLogIn LS1ASI01 => new ForAnaLogIn(600, bytes);
public ForAoaLogInFC3005Entity LS1FSI01 => new ForAoaLogInFC3005Entity(248, bytes); public ForAnaLogIn LS1BSI01 => new ForAnaLogIn(620, bytes);
public ForAoaLogInFC3005Entity LS1GSI01 => new ForAoaLogInFC3005Entity(256, bytes); public ForAnaLogIn LS1CSI01 => new ForAnaLogIn(640, bytes);
public ForAoaLogInFC3005Entity LS1HSI01 => new ForAoaLogInFC3005Entity(264, bytes); public ForAnaLogIn LS1DSI01 => new ForAnaLogIn(660, bytes);
public ForAoaLogInFC3005Entity LS1ISI01 => new ForAoaLogInFC3005Entity(272, bytes); public ForAnaLogIn LS1ESI01 => new ForAnaLogIn(680, bytes);
public ForAoaLogInFC3005Entity LS1JSI01 => new ForAoaLogInFC3005Entity(280, bytes); public ForAnaLogIn LS1FSI01 => new ForAnaLogIn(700, bytes);
public ForAoaLogInFC3005Entity LS1OSI01 => new ForAoaLogInFC3005Entity(288, bytes); public ForAnaLogIn LS1GSI01 => new ForAnaLogIn(720, bytes);
public ForAoaLogInFC3005Entity HR1ASI01 => new ForAoaLogInFC3005Entity(296, bytes); public ForAnaLogIn LS1HSI01 => new ForAnaLogIn(740, bytes);
public ForAoaLogInFC3005Entity HR1BSI01 => new ForAoaLogInFC3005Entity(304, bytes); public ForAnaLogIn LS1ISI01 => new ForAnaLogIn(760, bytes);
public ForAoaLogInFC3005Entity HR1CSI01 => new ForAoaLogInFC3005Entity(312, bytes); public ForAnaLogIn LS1JSI01 => new ForAnaLogIn(780, bytes);
public ForAoaLogInFC3005Entity HR1DSI01 => new ForAoaLogInFC3005Entity(320, bytes); public ForAnaLogIn LS1KSI01 => new ForAnaLogIn(800, bytes);
public ForAoaLogInFC3005Entity HR1ESI01 => new ForAoaLogInFC3005Entity(328, bytes); public ForAnaLogIn LS1LSI01 => new ForAnaLogIn(820, bytes);
public ForAoaLogInFC3005Entity HR1FSI01 => new ForAoaLogInFC3005Entity(336, bytes); public ForAnaLogIn LS1MSI01 => new ForAnaLogIn(840, bytes);
public ForAoaLogInFC3005Entity HR1GSI01 => new ForAoaLogInFC3005Entity(344, bytes); public ForAnaLogIn LS1NSI01 => new ForAnaLogIn(860, bytes);
public ForAoaLogInFC3005Entity HR1HSI01 => new ForAoaLogInFC3005Entity(352, bytes); public ForAnaLogIn LS1OSI01 => new ForAnaLogIn(880, bytes);
public ForAoaLogInFC3005Entity HR1ISI01 => new ForAoaLogInFC3005Entity(360, bytes); public ForAnaLogIn HR1ASI01 => new ForAnaLogIn(900, bytes);
public ForAoaLogInFC3005Entity HR1JSI01 => new ForAoaLogInFC3005Entity(368, bytes); public ForAnaLogIn HR1BSI01 => new ForAnaLogIn(920, bytes);
public ForAoaLogInFC3005Entity HR1OSI01 => new ForAoaLogInFC3005Entity(376, bytes); public ForAnaLogIn HR1CSI01 => new ForAnaLogIn(940, bytes);
public ForAnaLogIn HR1DSI01 => new ForAnaLogIn(960, bytes);
public ForAnaLogIn HR1ESI01 => new ForAnaLogIn(980, bytes);
public ForAnaLogIn HR1FSI01 => new ForAnaLogIn(1000, bytes);
public ForAnaLogIn HR1GSI01 => new ForAnaLogIn(1020, bytes);
public ForAnaLogIn HR1HSI01 => new ForAnaLogIn(1040, bytes);
public ForAnaLogIn HR1ISI01 => new ForAnaLogIn(1060, bytes);
public ForAnaLogIn HR1JSI01 => new ForAnaLogIn(1080, bytes);
public ForAnaLogIn HR1KSI01 => new ForAnaLogIn(1100, bytes);
public ForAnaLogIn HR1LSI01 => new ForAnaLogIn(1120, bytes);
public ForAnaLogIn HR1MSI01 => new ForAnaLogIn(1140, bytes);
public ForAnaLogIn HR1NSI01 => new ForAnaLogIn(1160, bytes);
public ForAnaLogIn HR1OSI01 => new ForAnaLogIn(1180, bytes);
public ForAoaLogInFC3006Entity SPV1DBT01 => new ForAoaLogInFC3006Entity(384, bytes);
public ForAoaLogInFC3006Entity SPV1DBT02 => new ForAoaLogInFC3006Entity(392, bytes);
public ForAoaLogInFC3006Entity SPV2DBT01 => new ForAoaLogInFC3006Entity(400, bytes);
public ForAoaLogInFC3006Entity SPV2DBT02 => new ForAoaLogInFC3006Entity(408, bytes);
public ForAoaLogInFC3006Entity SPV3DBT01 => new ForAoaLogInFC3006Entity(416, bytes);
public ForAoaLogInFC3006Entity SPV3DBT02 => new ForAoaLogInFC3006Entity(424, bytes);
public ForAoaLogInFC3005Entity From_SiloA => new ForAoaLogInFC3005Entity(432, bytes);
public ForAoaLogInFC3005Entity From_SiloB => new ForAoaLogInFC3005Entity(440, bytes);
public ForAoaLogInFC3005Entity From_SiloC => new ForAoaLogInFC3005Entity(448, bytes);
public ForAoaLogInFC3005Entity From_SiloD => new ForAoaLogInFC3005Entity(456, bytes);
public ForAoaLogInFC3005Entity From_SiloE => new ForAoaLogInFC3005Entity(464, bytes);
public ForAoaLogInFC3005Entity From_SiloF => new ForAoaLogInFC3005Entity(472, bytes);
public ForAoaLogInFC3005Entity From_SiloG => new ForAoaLogInFC3005Entity(480, bytes);
public ForAoaLogInFC3005Entity From_SiloH => new ForAoaLogInFC3005Entity(488, bytes);
public ForAoaLogInFC3005Entity From_SiloI => new ForAoaLogInFC3005Entity(496, bytes);
public ForAoaLogInFC3005Entity From_SiloJ => new ForAoaLogInFC3005Entity(504, bytes);
public ForAoaLogInFC3005Entity From_SiloK => new ForAoaLogInFC3005Entity(512, bytes);
public ForAoaLogInFC3005Entity From_SiloL => new ForAoaLogInFC3005Entity(520, bytes);
public ForAoaLogInFC3005Entity From_SiloM => new ForAoaLogInFC3005Entity(528, bytes);
public ForAoaLogInFC3005Entity From_SiloN => new ForAoaLogInFC3005Entity(536, bytes);
public ForAoaLogInFC3005Entity From_SiloO => new ForAoaLogInFC3005Entity(544, bytes);
public ForAnaLogOut SPV1DBT01 => new ForAnaLogOut(1200, bytes);
public ForAnaLogOut SPV1DBT02 => new ForAnaLogOut(1220, bytes);
public ForAnaLogOut SPV2DBT01 => new ForAnaLogOut(1240, bytes);
public ForAnaLogOut SPV2DBT02 => new ForAnaLogOut(1260, bytes);
public ForAnaLogOut SPV3DBT01 => new ForAnaLogOut(1280, bytes);
public ForAnaLogOut SPV3DBT02 => new ForAnaLogOut(1300, bytes);
} }
} }

@ -29,8 +29,29 @@ namespace DataBlockHelper.DBHelpers
return new EnableStatusEntity(bytes); return new EnableStatusEntity(bytes);
} }
//public DryerEntity Dryer_D1 => new DryerEntity(58, bytes);
//public DryerEntity Dryer_D2 => new DryerEntity(218, bytes);
//public DryerEntity Dryer_D3 => new DryerEntity(378, bytes);
//public DryerEntity Dryer_D4 => new DryerEntity(538, bytes);
//public GelatEntity Gelat_G1 => new GelatEntity(698, bytes);
//public GelatEntity Gelat_G2 => new GelatEntity(858, bytes);
//public GelatEntity Gelat_G3 => new GelatEntity(1018, bytes);
//public GelatEntity Gelat_G4 => new GelatEntity(1178, bytes);
//public GelatEntity Gelat_G5 => new GelatEntity(1338, bytes);
//public GelatEntity Gelat_G6 => new GelatEntity(1498, bytes);
//public GelatEntity Gelat_G7 => new GelatEntity(1658, bytes);
//public GelatEntity Gelat_G8 => new GelatEntity(1818, bytes);
//public WeterEntity Weter_M1 => new WeterEntity(1978, bytes);
//public WeterEntity Weter_M2 => new WeterEntity(2178, bytes);
//public WeterEntity Weter_M3 => new WeterEntity(2378, bytes);
//public WeterEntity Weter_M4 => new WeterEntity(2578, bytes);
//public WeterEntity Weter_M5 => new WeterEntity(2778, bytes);
//public WeterEntity Weter_M6 => new WeterEntity(2978, bytes);
//public WeterEntity Weter_M7 => new WeterEntity(3178, bytes);
//public WeterEntity Weter_M8 => new WeterEntity(3378, bytes);
/// <summary> /// <summary>
/// 热水秤A /// 热水秤A

@ -14,7 +14,7 @@ namespace DataBlockHelper.DBHelpers
public DB90Helper() public DB90Helper()
{ {
bytes = PlcConnect.Instance.Read("DB90.0.0", 154).Content; bytes = PlcConnect.Instance.Read("DB90.0.0", 170).Content;
} }
public ForValveSingleEntity BU3DBT06 => new ForValveSingleEntity(0, bytes); public ForValveSingleEntity BU3DBT06 => new ForValveSingleEntity(0, bytes);
@ -69,34 +69,41 @@ namespace DataBlockHelper.DBHelpers
public ForValveSingleEntity AS1HSI01 => new ForValveSingleEntity(98, bytes); public ForValveSingleEntity AS1HSI01 => new ForValveSingleEntity(98, bytes);
public ForValveSingleEntity AS1ISI01 => new ForValveSingleEntity(100, bytes); public ForValveSingleEntity AS1ISI01 => new ForValveSingleEntity(100, bytes);
public ForValveSingleEntity AS1JSI01 => new ForValveSingleEntity(102, bytes); public ForValveSingleEntity AS1JSI01 => new ForValveSingleEntity(102, bytes);
public ForValveSingleEntity AS1OSI01 => new ForValveSingleEntity(104, bytes); public ForValveSingleEntity AS1KSI01 => new ForValveSingleEntity(104, bytes);
public ForValveSingleEntity SV1DSM01 => new ForValveSingleEntity(106, bytes); public ForValveSingleEntity AS1LSI01 => new ForValveSingleEntity(106, bytes);
public ForValveSingleEntity SV1DSM02 => new ForValveSingleEntity(108, bytes); public ForValveSingleEntity AS1MSI01 => new ForValveSingleEntity(108, bytes);
public ForValveSingleEntity SV2DSM01 => new ForValveSingleEntity(110, bytes); public ForValveSingleEntity AS1NSI01 => new ForValveSingleEntity(110, bytes);
public ForValveSingleEntity SV2DSM02 => new ForValveSingleEntity(112, bytes); public ForValveSingleEntity AS1OSI01 => new ForValveSingleEntity(112, bytes);
public ForValveSingleEntity SV3DSM01 => new ForValveSingleEntity(114, bytes); public ForValveSingleEntity SV1DSM01 => new ForValveSingleEntity(114, bytes);
public ForValveSingleEntity SV3DSM02 => new ForValveSingleEntity(116, bytes); public ForValveSingleEntity SV1DSM02 => new ForValveSingleEntity(116, bytes);
public ForValveSingleEntity PV1GDC01 => new ForValveSingleEntity(118, bytes); public ForValveSingleEntity SV2DSM01 => new ForValveSingleEntity(118, bytes);
public ForValveSingleEntity PV1GDC02 => new ForValveSingleEntity(120, bytes); public ForValveSingleEntity SV2DSM02 => new ForValveSingleEntity(120, bytes);
public ForValveSingleEntity SV3DSM01 => new ForValveSingleEntity(122, bytes);
public ForValveSingleEntity SV3DSM02 => new ForValveSingleEntity(124, bytes);
public ForValveSingleEntity PV1GDC01 => new ForValveSingleEntity(126, bytes);
public ForValveSingleEntity PV1GDC02 => new ForValveSingleEntity(128, bytes);
public ForValveDoubleEntity DV1PCP01 => new ForValveDoubleEntity(122, bytes);
public ForValveDoubleEntity DV1PCP02 => new ForValveDoubleEntity(124, bytes);
public ForValveDoubleEntity DV1PCP03 => new ForValveDoubleEntity(126, bytes);
public ForValveDoubleEntity DV1PCP04 => new ForValveDoubleEntity(128, bytes);
public ForValveDoubleEntity DV1PCP05 => new ForValveDoubleEntity(130, bytes);
public ForValveDoubleEntity DV1PCP06 => new ForValveDoubleEntity(132, bytes);
public ForValveDoubleEntity DV1PCP07 => new ForValveDoubleEntity(134, bytes);
public ForValveDoubleEntity DV1PCP08 => new ForValveDoubleEntity(136, bytes);
public ForValveDoubleEntity DV1PCP09 => new ForValveDoubleEntity(138, bytes);
public ForValveDoubleEntity DV1PCP10 => new ForValveDoubleEntity(140, bytes);
public ForValveDoubleEntity DV1PCP11 => new ForValveDoubleEntity(142, bytes);
public ForValveDoubleEntity DV1PCP12 => new ForValveDoubleEntity(144, bytes);
public ForValveDoubleEntity DV1PCP13 => new ForValveDoubleEntity(146, bytes);
public ForValveDoubleEntity DV1PCP14 => new ForValveDoubleEntity(148, bytes);
public ForValveDoubleEntity DV1PCP15 => new ForValveDoubleEntity(150, bytes);
public ForValveSingleEntity SV1GDS01 => new ForValveSingleEntity(152, bytes); public ForValveDoubleEntity DV1PCP01 => new ForValveDoubleEntity(130, bytes);
public ForValveDoubleEntity DV1PCP02 => new ForValveDoubleEntity(132, bytes);
public ForValveDoubleEntity DV1PCP03 => new ForValveDoubleEntity(134, bytes);
public ForValveDoubleEntity DV1PCP04 => new ForValveDoubleEntity(136, bytes);
public ForValveDoubleEntity DV1PCP05 => new ForValveDoubleEntity(138, bytes);
public ForValveDoubleEntity DV1PCP06 => new ForValveDoubleEntity(140, bytes);
public ForValveDoubleEntity DV1PCP07 => new ForValveDoubleEntity(142, bytes);
public ForValveDoubleEntity DV1PCP08 => new ForValveDoubleEntity(144, bytes);
public ForValveDoubleEntity DV1PCP09 => new ForValveDoubleEntity(146, bytes);
public ForValveDoubleEntity DV1PCP10 => new ForValveDoubleEntity(148, bytes);
public ForValveDoubleEntity DV1PCP11 => new ForValveDoubleEntity(150, bytes);
public ForValveDoubleEntity DV1PCP12 => new ForValveDoubleEntity(152, bytes);
public ForValveDoubleEntity DV1PCP13 => new ForValveDoubleEntity(154, bytes);
public ForValveDoubleEntity DV1PCP14 => new ForValveDoubleEntity(156, bytes);
public ForValveDoubleEntity DV1PCP15 => new ForValveDoubleEntity(158, bytes);
public ForValveDoubleEntity DV1PCP16 => new ForValveDoubleEntity(160, bytes);
public ForValveDoubleEntity DV1PCP17 => new ForValveDoubleEntity(162, bytes);
public ForValveDoubleEntity DV1PCP18 => new ForValveDoubleEntity(164, bytes);
public ForValveDoubleEntity DV1PCP19 => new ForValveDoubleEntity(166, bytes);
public ForValveDoubleEntity DV1PCP20 => new ForValveDoubleEntity(168, bytes);
} }
} }

@ -65,8 +65,8 @@
<Compile Include="DBHelpers\DBHelper.cs" /> <Compile Include="DBHelpers\DBHelper.cs" />
<Compile Include="DbWrite\PlcWriteUtil.cs" /> <Compile Include="DbWrite\PlcWriteUtil.cs" />
<Compile Include="Entity\ClickEntity.cs" /> <Compile Include="Entity\ClickEntity.cs" />
<Compile Include="Entity\DB1Entity\ForAoaLogInFC3005Entity.cs" /> <Compile Include="Entity\DB1Entity\ForAnaLogIn.cs" />
<Compile Include="Entity\DB1Entity\ForAoaLogInFC3006Entity.cs" /> <Compile Include="Entity\DB1Entity\ForAnaLogOut.cs" />
<Compile Include="Entity\DB2102Entity\FOR_VALVE_DoubleEntity.cs" /> <Compile Include="Entity\DB2102Entity\FOR_VALVE_DoubleEntity.cs" />
<Compile Include="Entity\DB2102Entity\FOR_VALVE_SingleEntity.cs" /> <Compile Include="Entity\DB2102Entity\FOR_VALVE_SingleEntity.cs" />
<Compile Include="Entity\DB2103Entity\FOR_MOTOREntity.cs" /> <Compile Include="Entity\DB2103Entity\FOR_MOTOREntity.cs" />

@ -0,0 +1,34 @@
using HslCommunication;
using System.Linq;
namespace DataBlockHelper.Entity.DB1Entity
{
public class ForAnaLogIn
{
public ForAnaLogIn(ushort startSet, byte[] bytes)
{
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB1." + startSet + ".0", 8);
var content = bytes.Skip(startSet).Take(20).ToArray();
Input_Word = PlcConnect.Instance.ByteTransform.TransUInt16(content, 0);
INPUT_MIN = PlcConnect.Instance.ByteTransform.TransInt16(content, 2);
INPUT_MAX = PlcConnect.Instance.ByteTransform.TransInt16(content, 4);
OUTPUT_MIN = PlcConnect.Instance.ByteTransform.TransSingle(content, 6);
OUTPUT_MAX = PlcConnect.Instance.ByteTransform.TransSingle(content, 10);
ACT_VALUE = PlcConnect.Instance.ByteTransform.TransSingle(content, 14);
byte byt = content[18];
ALARM = byt.GetBit(0);
}
public ushort Input_Word { get; private set; }
public short INPUT_MIN { get; private set; }
public short INPUT_MAX { get; private set; }
public float OUTPUT_MIN { get; private set; }
public float OUTPUT_MAX { get; private set; }
public float ACT_VALUE { get; private set; }
public bool ALARM { get; private set; }
}
}

@ -0,0 +1,34 @@
using HslCommunication;
using System.Linq;
namespace DataBlockHelper.Entity.DB1Entity
{
public class ForAnaLogOut
{
public ForAnaLogOut(ushort startSet, byte[] bytes)
{
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB1." + startSet + ".0", 8);
var content = bytes.Skip(startSet).Take(20).ToArray();
ACT_VALUE = PlcConnect.Instance.ByteTransform.TransSingle(content, 0);
INPUT_MIN = PlcConnect.Instance.ByteTransform.TransSingle(content, 4);
INPUT_MAX = PlcConnect.Instance.ByteTransform.TransSingle(content, 8);
OUTPUT_MIN = PlcConnect.Instance.ByteTransform.TransInt16(content, 12);
OUTPUT_MAX = PlcConnect.Instance.ByteTransform.TransInt16(content, 14);
Output_Word = PlcConnect.Instance.ByteTransform.TransUInt16(content, 16);
byte byt = content[18];
ALARM = byt.GetBit(0);
}
public float ACT_VALUE { get; private set; }
public float INPUT_MIN { get; private set; }
public float INPUT_MAX { get; private set; }
public short OUTPUT_MIN { get; private set; }
public short OUTPUT_MAX { get; private set; }
public ushort Output_Word { get; private set; }
public bool ALARM { get; private set; }
}
}

@ -1,27 +0,0 @@
using HslCommunication;
using System.Linq;
namespace DataBlockHelper.Entity.DB1Entity
{
public class ForAoaLogInFC3005Entity
{
public ForAoaLogInFC3005Entity(ushort startSet, byte[] bytes)
{
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB1." + startSet + ".0", 8);
var content = bytes.Skip(startSet).Take(8).ToArray();
byte byt = content[6];
Min = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Max = PlcConnect.Instance.ByteTransform.TransInt16(content, 2);
Value = PlcConnect.Instance.ByteTransform.TransInt16(content, 4);
Alarm = byt.GetBit(0);
}
public short Min { get; private set; }
public short Max { get; private set; }
public short Value { get; private set; }
public bool Alarm { get; private set; }
}
}

@ -1,27 +0,0 @@
using HslCommunication;
using System.Linq;
namespace DataBlockHelper.Entity.DB1Entity
{
public class ForAoaLogInFC3006Entity
{
public ForAoaLogInFC3006Entity(ushort startSet, byte[] bytes)
{
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB1." + startSet + ".0", 8);
var content = bytes.Skip(startSet).Take(8).ToArray();
byte byt = content[6];
Min = PlcConnect.Instance.ByteTransform.TransInt16(content, 0);
Max = PlcConnect.Instance.ByteTransform.TransInt16(content, 2);
SetValue = PlcConnect.Instance.ByteTransform.TransInt16(content, 4);
Alarm = byt.GetBit(0);
}
public short Min { get; private set; }
public short Max { get; private set; }
public short SetValue { get; private set; }
public bool Alarm { get; private set; }
}
}
Loading…
Cancel
Save