oee相关修改

This commit is contained in:
gf zhou committed 2025-04-17 18:37:22 +08:00
1 parent 9c5ef7bb31
commit 4419a4de3c
9 files changed
+422 -121

No files matched your search

+4 -2
View File
@@ -689,7 +689,9 @@ namespace WindowsFormsApp1.server
#region 读取报警
private BllResult ReadOneDB(List<t_oeeaddress> address)
{
address = address.OrderBy(a => a.dbaddress).ToList();
address = address.OrderBy(a => a.dbaddress)
.ThenBy(x => x.addressoffset)
.ToList();
OperateResult<byte[]> read;
if (address.Count == 1)
{
@@ -700,7 +702,7 @@ namespace WindowsFormsApp1.server
{
double admax = address.Select(a => a.addressoffset).Max();
double admin = address.Select(a => a.addressoffset).Min();
ushort length = (ushort)(Math.Floor(admax - admin) + (ushort)address[0].addressdecimal);
ushort length = (ushort)(Math.Floor(admax - admin) + address.Last().addresstypelegth);
string startaddress = address[0].dbaddress + "." + admin.ToString();
read = siemensS7Net.Read(startaddress, length);
}