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

58 lines
1.6 KiB
C#

12 months ago
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;
}
12 months ago
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,
6 months ago
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,
};
12 months ago
return result;
}
}
}