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.

219 lines
7.6 KiB
C#

10 months ago
using NewLife;
namespace WorkerSynReport.Plc;
5 months ago
public class ValveEntity
{
public ValveEntity(byte[] bytes)
{
//OperateResult<byte[]> read = PlcConnect.Instance.Read("DB2107.2048.0", 11);
var content = bytes.Skip(2048).Take(11).ToArray();
byte byt = content[0];
AS1BLT01 = byt.GetBit(0);
AS1BLT02 = byt.GetBit(1);
AS1BLT03 = byt.GetBit(2);
AS1BLT04 = byt.GetBit(3);
AS1BLT05 = byt.GetBit(4);
AS2BLT01 = byt.GetBit(5);
AS2BLT02 = byt.GetBit(6);
AS2BLT03 = byt.GetBit(7);
byt = content[1];
AS2BLT04 = byt.GetBit(0);
AS2BLT05 = byt.GetBit(1);
AS3BLT01 = byt.GetBit(2);
AS3BLT02 = byt.GetBit(3);
AS3BLT03 = byt.GetBit(4);
AS3BLT04 = byt.GetBit(5);
AS3BLT05 = byt.GetBit(6);
AS4BLT01 = byt.GetBit(7);
byt = content[2];
AS4BLT02 = byt.GetBit(0);
AS4BLT03 = byt.GetBit(1);
AS4BLT04 = byt.GetBit(2);
AS4BLT05 = byt.GetBit(3);
AS5BLT01 = byt.GetBit(4);
AS5BLT02 = byt.GetBit(5);
AS5BLT03 = byt.GetBit(6);
AS5BLT04 = byt.GetBit(7);
byt = content[3];
AS5BLT05 = byt.GetBit(0);
AS1OIS01 = byt.GetBit(1);
AS1OIS02 = byt.GetBit(2);
AS1OIS03 = byt.GetBit(3);
AS2OIS01 = byt.GetBit(4);
AS2OIS02 = byt.GetBit(5);
AS2OIS03 = byt.GetBit(6);
AS3OIS01 = byt.GetBit(7);
byt = content[4];
AS3OIS02 = byt.GetBit(0);
AS3OIS03 = byt.GetBit(1);
AS4OIS01 = byt.GetBit(2);
AS4OIS02 = byt.GetBit(3);
AS4OIS03 = byt.GetBit(4);
AS2PCP01 = byt.GetBit(5);
AS2PCP02 = byt.GetBit(6);
AS2PCP03 = byt.GetBit(7);
byt = content[5];
PV1ADB01 = byt.GetBit(0);
PV1BDB01 = byt.GetBit(1);
PV1CDB01 = byt.GetBit(2);
PV1DDB01 = byt.GetBit(3);
PV1EDB01 = byt.GetBit(4);
PV1FDB01 = byt.GetBit(5);
PV1GDB01 = byt.GetBit(6);
PV1HDB01 = byt.GetBit(7);
byt = content[6];
PV1IDB01 = byt.GetBit(0);
PV1JDB01 = byt.GetBit(1);
PV1KDB01 = byt.GetBit(2);
PV1LDB01 = byt.GetBit(3);
PM1ADF01 = byt.GetBit(4);
PM1BDF01 = byt.GetBit(5);
PM1CDF01 = byt.GetBit(6);
PM1DDF01 = byt.GetBit(7);
byt = content[7];
PM1EDF01 = byt.GetBit(0);
PM1FDF01 = byt.GetBit(1);
PM1GDF01 = byt.GetBit(2);
PM1HDF01 = byt.GetBit(3);
PM1IDF01 = byt.GetBit(4);
PM1JDF01 = byt.GetBit(5);
PM1KDF01 = byt.GetBit(6);
PM1LDF01 = byt.GetBit(7);
byt = content[8];
PV2ADB01 = byt.GetBit(0);
PV2BDB01 = byt.GetBit(1);
PV2CDB01 = byt.GetBit(2);
PV2DDB01 = byt.GetBit(3);
AS1GET01 = byt.GetBit(4);
AS1GET02 = byt.GetBit(5);
AS2GET01 = byt.GetBit(6);
AS2GET02 = byt.GetBit(7);
byt = content[9];
AS3GET01 = byt.GetBit(0);
AS3GET02 = byt.GetBit(1);
AS4GET01 = byt.GetBit(2);
AS4GET02 = byt.GetBit(3);
AS5GET01 = byt.GetBit(4);
AS5GET02 = byt.GetBit(5);
AS6GET01 = byt.GetBit(6);
AS6GET02 = byt.GetBit(7);
byt = content[10];
AS7GET01 = byt.GetBit(0);
AS7GET02 = byt.GetBit(1);
AS8GET01 = byt.GetBit(2);
AS8GET02 = byt.GetBit(3);
}
public bool AS1BLT01 { get; private set; }
public bool AS1BLT02 { get; private set; }
public bool AS1BLT03 { get; private set; }
public bool AS1BLT04 { get; private set; }
public bool AS1BLT05 { get; private set; }
public bool AS2BLT01 { get; private set; }
public bool AS2BLT02 { get; private set; }
public bool AS2BLT03 { get; private set; }
public bool AS2BLT04 { get; private set; }
public bool AS2BLT05 { get; private set; }
public bool AS3BLT01 { get; private set; }
public bool AS3BLT02 { get; private set; }
public bool AS3BLT03 { get; private set; }
public bool AS3BLT04 { get; private set; }
public bool AS3BLT05 { get; private set; }
public bool AS4BLT01 { get; private set; }
public bool AS4BLT02 { get; private set; }
public bool AS4BLT03 { get; private set; }
public bool AS4BLT04 { get; private set; }
public bool AS4BLT05 { get; private set; }
public bool AS5BLT01 { get; private set; }
public bool AS5BLT02 { get; private set; }
public bool AS5BLT03 { get; private set; }
public bool AS5BLT04 { get; private set; }
public bool AS5BLT05 { get; private set; }
public bool AS1OIS01 { get; private set; }
public bool AS1OIS02 { get; private set; }
public bool AS1OIS03 { get; private set; }
public bool AS2OIS01 { get; private set; }
public bool AS2OIS02 { get; private set; }
public bool AS2OIS03 { get; private set; }
public bool AS3OIS01 { get; private set; }
public bool AS3OIS02 { get; private set; }
public bool AS3OIS03 { get; private set; }
public bool AS4OIS01 { get; private set; }
public bool AS4OIS02 { get; private set; }
public bool AS4OIS03 { get; private set; }
public bool AS2PCP01 { get; private set; }
public bool AS2PCP02 { get; private set; }
public bool AS2PCP03 { get; private set; }
public bool PV1ADB01 { get; private set; }
public bool PV1BDB01 { get; private set; }
public bool PV1CDB01 { get; private set; }
public bool PV1DDB01 { get; private set; }
public bool PV1EDB01 { get; private set; }
public bool PV1FDB01 { get; private set; }
public bool PV1GDB01 { get; private set; }
public bool PV1HDB01 { get; private set; }
public bool PV1IDB01 { get; private set; }
public bool PV1JDB01 { get; private set; }
public bool PV1KDB01 { get; private set; }
public bool PV1LDB01 { get; private set; }
public bool PM1ADF01 { get; private set; }
public bool PM1BDF01 { get; private set; }
public bool PM1CDF01 { get; private set; }
public bool PM1DDF01 { get; private set; }
public bool PM1EDF01 { get; private set; }
public bool PM1FDF01 { get; private set; }
public bool PM1GDF01 { get; private set; }
public bool PM1HDF01 { get; private set; }
public bool PM1IDF01 { get; private set; }
public bool PM1JDF01 { get; private set; }
public bool PM1KDF01 { get; private set; }
public bool PM1LDF01 { get; private set; }
public bool PV2ADB01 { get; private set; }
public bool PV2BDB01 { get; private set; }
public bool PV2CDB01 { get; private set; }
public bool PV2DDB01 { get; private set; }
public bool AS1GET01 { get; private set; }
public bool AS1GET02 { get; private set; }
public bool AS2GET01 { get; private set; }
public bool AS2GET02 { get; private set; }
public bool AS3GET01 { get; private set; }
public bool AS3GET02 { get; private set; }
public bool AS4GET01 { get; private set; }
public bool AS4GET02 { get; private set; }
public bool AS5GET01 { get; private set; }
public bool AS5GET02 { get; private set; }
public bool AS6GET01 { get; private set; }
public bool AS6GET02 { get; private set; }
public bool AS7GET01 { get; private set; }
public bool AS7GET02 { get; private set; }
public bool AS8GET01 { get; private set; }
public bool AS8GET02 { get; private set; }
}