From bbb5b314a8f3760c2b700ab36b3b1dfa5d19f075 Mon Sep 17 00:00:00 2001
From: NXX <447201003@qq>
Date: Thu, 5 Jan 2023 10:45:06 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=82=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
BPASmartClient.Modbus/ModbusTcp.cs | 16 ++++++++-
BPASmartClient.MorkF/Control_MorkF.cs | 50 ++++++++++++++++++---------
BPASmartClient.MorkF/ML_MorkF.cs | 4 +++
3 files changed, 53 insertions(+), 17 deletions(-)
diff --git a/BPASmartClient.Modbus/ModbusTcp.cs b/BPASmartClient.Modbus/ModbusTcp.cs
index 711c303c..132808f6 100644
--- a/BPASmartClient.Modbus/ModbusTcp.cs
+++ b/BPASmartClient.Modbus/ModbusTcp.cs
@@ -140,7 +140,21 @@ namespace BPASmartClient.Modbus
}
}
}
-
+
+ else if (address.ToUpper().Contains("I") && address.Length >= 2)
+ {
+ var res = address.Substring(1).Split('.');
+ if (res != null && res.Length == 2)
+ {
+ if (int.TryParse(res[0], out int firstAddress) && int.TryParse(res[1], out int ExitAddress))
+ {
+ if (ExitAddress >= 0 && ExitAddress <= 7)
+ {
+ return (firstAddress * 8) + ExitAddress;
+ }
+ }
+ }
+ }
else if (address.ToUpper().Contains("GI") && address.Length >= 3)
{
var res = address.Remove(0, 2);
diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs
index 6093e261..2d687cdf 100644
--- a/BPASmartClient.MorkF/Control_MorkF.cs
+++ b/BPASmartClient.MorkF/Control_MorkF.cs
@@ -161,7 +161,7 @@ namespace BPASmartClient.MorkF
///
/// 是否为本地炒菜模式,默认为联网的
///
- private bool isLocalFryingMode { get; set; } = false;
+ private bool isLocalFryingMode { get; set; } = true;
///
/// 入口
@@ -201,7 +201,7 @@ namespace BPASmartClient.MorkF
MaterialCoordinate.GetInstance().frying2 = materialCoordinate.frying2;
MaterialCoordinate.GetInstance().materialHeight = materialCoordinate.materialHeight;
MaterialCoordinate.GetInstance().MaterialOneX = materialCoordinate.MaterialOneX;
- MaterialCoordinate.GetInstance().MaterialTwoX = materialCoordinate.MaterialTwoX;
+ MaterialCoordinate.GetInstance().MaterialTwoX = materialCoordinate.MaterialTwoX;
MaterialCoordinate.GetInstance().MaterialThreeX = materialCoordinate.MaterialThreeX;
}
////菜品库编号与坐标系对象存储
@@ -371,6 +371,17 @@ namespace BPASmartClient.MorkF
}
}), 2);
+ //抓手初始化完成
+ GetStatus("I0.1", new Action