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

57 lines
1.6 KiB
C#

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