徐孝锋 8 bulan lalu
induk
melakukan
046c045653

+ 2 - 2
TeamAAS-VM/Core/Management.cs

@@ -1494,9 +1494,9 @@ namespace TeamAAS_VP.Core
                 // 螺丝供料器螺丝递减
                 // 螺丝供料器螺丝递减
                 else if (addressConfig.In_PickINC.Address.Contains(tuple.nodeId))
                 else if (addressConfig.In_PickINC.Address.Contains(tuple.nodeId))
                 {
                 {
-                    if (tuple.value is bool state)
+                    if (tuple.value is Int16 state)
                     {
                     {
-                        if (state)
+                        if (state!=0)
                         {
                         {
                             SendTaskMessage($"螺丝供料器...", MessageLevel.Info);
                             SendTaskMessage($"螺丝供料器...", MessageLevel.Info);
                             await plc.WriteNodeAsync(addressConfig.In_PickINC.Address, false);
                             await plc.WriteNodeAsync(addressConfig.In_PickINC.Address, false);

+ 1 - 1
TeamAAS-VM/Models/PLC/PlcAddressConfig.cs

@@ -886,7 +886,7 @@ namespace TeamAAS_VP.Models.PLC
 
 
             In_PickINC = Ensure(In_PickINC);
             In_PickINC = Ensure(In_PickINC);
             In_PickINC.Address = "ns=4;s=DB_Communication|ToPC.PickINC";
             In_PickINC.Address = "ns=4;s=DB_Communication|ToPC.PickINC";
-            In_PickINC.DataType = "bool";
+            In_PickINC.DataType = "int16";
             In_PickINC.Description = "取一颗螺丝触发信号";
             In_PickINC.Description = "取一颗螺丝触发信号";
 
 
             // 说明:若项目中 PlcAddress 的实际属性名或类型与此不同(例如使用枚举、不同字段名),
             // 说明:若项目中 PlcAddress 的实际属性名或类型与此不同(例如使用枚举、不同字段名),

+ 4 - 1
TeamAAS-VM/Views/Product/PlcPointParams.xaml.cs

@@ -52,7 +52,8 @@ namespace TeamAAS_VP.Views.Product
                     line2.Run();
                     line2.Run();
                     graphic.Add(line1.GetOutputLine());
                     graphic.Add(line1.GetOutputLine());
                     graphic.Add(line2.GetOutputLine());
                     graphic.Add(line2.GetOutputLine());
-
+                    this.display.StaticGraphics.Clear();
+                    this.display.StaticGraphics.AddList(graphic, "");
                 }
                 }
                 else
                 else
                 {
                 {
@@ -77,6 +78,8 @@ namespace TeamAAS_VP.Views.Product
                         line2.Run();
                         line2.Run();
                         graphic.Add(line1.GetOutputLine());
                         graphic.Add(line1.GetOutputLine());
                         graphic.Add(line2.GetOutputLine());
                         graphic.Add(line2.GetOutputLine());
+                        this.display.StaticGraphics.Clear();
+                        this.display.StaticGraphics.AddList(graphic, "");
                     }
                     }
 
 
                 }
                 }