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/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/RgvPlc/RGVEntity.cs

65 lines
1.3 KiB
C#

using DataBlockHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mesnac.Action.ChemicalWeighing.RgvPlc
{
public class RGVEntity
{
public RGVEntity() { }
public bool Error { get; set; }
}
public class RgvPlcUtil
{
static string Db = "DB2118";
public static List<RGVEntity> GetRGVAllError()
{
List<RGVEntity> ls = new List<RGVEntity>();
//第一台 330.2 倒序
// 330.2 308.2 286.2 264.2 242.2 220.2 198.2 176.2
List<string> strings = new List<string>()
{
"330.2",
"308.2",
"286.2",
"264.2",
"242.2",
"220.2",
"198.2",
"176.2",
};
foreach (string s in strings)
{
ls.Add(new RGVEntity()
{
Error = Read(s)
});
}
return ls;
}
private static bool Read(string dian)
{
return PlcConnect.Instance.ReadBool($"{Db}.{dian}").Content;
}
}
}