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.
lj_plc/DataBlockHelper/DBHelpers/MReadHelp.cs

60 lines
1.6 KiB
C#

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.0").Content,
p.ReadBool("M2201.1").Content,
p.ReadBool("M2201.2").Content,
p.ReadBool("M2201.3").Content,
//0
p.ReadBool("M2018.2").Content,
};
return result;
}
}
}