|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace DataBlockHelper.DBHelpers
|
|
|
|
|
{
|
|
|
|
|
public class MReadHelp
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<bool> Read()
|
|
|
|
|
{
|
|
|
|
|
var p= PlcConnect.Instance;
|
|
|
|
|
List<bool> result = new List<bool>
|
|
|
|
|
{
|
|
|
|
|
p.ReadBool("M1003.4").Content,
|
|
|
|
|
p.ReadBool("M1004.4").Content,
|
|
|
|
|
p.ReadBool("M1006.4").Content,
|
|
|
|
|
p.ReadBool("M1007.4").Content,
|
|
|
|
|
p.ReadBool("M1009.4").Content,
|
|
|
|
|
p.ReadBool("M1010.4").Content,
|
|
|
|
|
};
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static List<bool> ReadCabinet()
|
|
|
|
|
{
|
|
|
|
|
var p = PlcConnect.Instance;
|
|
|
|
|
List<bool> result = new List<bool>
|
|
|
|
|
{
|
|
|
|
|
p.ReadBool("M2017.0").Content,
|
|
|
|
|
p.ReadBool("M2017.1").Content,
|
|
|
|
|
p.ReadBool("M2017.2").Content,
|
|
|
|
|
p.ReadBool("M2017.3").Content,
|
|
|
|
|
p.ReadBool("M2017.4").Content,
|
|
|
|
|
p.ReadBool("M2017.5").Content,
|
|
|
|
|
p.ReadBool("M2017.6").Content,
|
|
|
|
|
p.ReadBool("M2017.7").Content,
|
|
|
|
|
p.ReadBool("M2018.0").Content,
|
|
|
|
|
p.ReadBool("M2018.1").Content,
|
|
|
|
|
|
|
|
|
|
p.ReadBool("M2201.4").Content,
|
|
|
|
|
p.ReadBool("M2201.5").Content,
|
|
|
|
|
p.ReadBool("M2201.6").Content,
|
|
|
|
|
p.ReadBool("M2201.7").Content,
|
|
|
|
|
p.ReadBool("M2018.2").Content,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|