From 2baf1d56dc8e0fa41b26cd70e9265c2fd3abdefe Mon Sep 17 00:00:00 2001 From: wenjy Date: Mon, 15 Jan 2024 16:30:16 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E6=B7=BB=E5=8A=A0=E5=8F=91?= =?UTF-8?q?=E6=B3=A1=E6=9C=BA=E7=8A=B6=E6=80=81=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Business/CollectionFoamMachine.cs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Aucma.Core.OldBoxFoam/Business/CollectionFoamMachine.cs b/Aucma.Core.OldBoxFoam/Business/CollectionFoamMachine.cs index a8b822a1..55ce7a8a 100644 --- a/Aucma.Core.OldBoxFoam/Business/CollectionFoamMachine.cs +++ b/Aucma.Core.OldBoxFoam/Business/CollectionFoamMachine.cs @@ -254,12 +254,30 @@ namespace Aucma.Core.OldBoxFoam.Business var temp3 = byteToFloat(tempInfo.Skip(20).Take(4).ToArray()).ToString("0.00"); var temp4 = byteToFloat(tempInfo.Skip(24).Take(4).ToArray()).ToString("0.00"); + bool statusFlag_1 = obj.plc.ReadBool("Q.1"); + bool statusFlag_2 = obj.plc.ReadBool("Q.2"); + bool statusFlag_3 = obj.plc.ReadBool("Q.3"); + + int statusFlag = 0; + if (statusFlag_1) + { + statusFlag = 3; + }else if(statusFlag_2) + { + statusFlag = 1; + }else if(statusFlag_3) + { + statusFlag = 2; + } + + //Console.WriteLine($"{systemCode}#状态:{statusFlag}"); + var shotRecord = new BoxLastShotRecord() { ProductLineCode = "CX_01", StationNumber = "1105", System = systemCode, - SystemStatus = 1, + SystemStatus = statusFlag, PourNu = station.ToString(), GunCode = gunCode, SetWeight = setWeight,