From 045c14a5ed27c38f2c1f86e203f73a12eea4c3d5 Mon Sep 17 00:00:00 2001
From: lhiven <236881222@qq.com>
Date: Mon, 11 Dec 2023 17:18:58 +0900
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=92=E6=96=99=E3=80=81?=
=?UTF-8?q?=E5=91=A8=E8=BD=AC=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Rs.SkyLine/Flow/Camera/VisionManager.cs | 5 +-
Rs.SkyLine/Flow/Camera/VisionResult.cs | 5 +
Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs | 2 +-
Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs | 111 +-------------------
4 files changed, 11 insertions(+), 112 deletions(-)
diff --git a/Rs.SkyLine/Flow/Camera/VisionManager.cs b/Rs.SkyLine/Flow/Camera/VisionManager.cs
index df8ea2d..24bd9b4 100644
--- a/Rs.SkyLine/Flow/Camera/VisionManager.cs
+++ b/Rs.SkyLine/Flow/Camera/VisionManager.cs
@@ -207,8 +207,9 @@ namespace Rs.MotionPlat.Flow.Camera
out HTuple row, out HTuple column, out HTuple angle, out HTuple score);
if (score.Length > 0)
{
- vr.OffsetX = column;
- vr.OffsetY = row;
+ vr.OffsetX = column-upCameraScanBarCodeModel.ModelMatchResult[1] * GlobalVar.UpCameraMmPerPixel;
+ vr.OffsetY = row- upCameraScanBarCodeModel.ModelMatchResult[0] * GlobalVar.UpCameraMmPerPixel;
+ vr.OffsetR = AngleTool.Rad2Deg((angle - upCameraScanBarCodeModel.ModelMatchResult[2]));
vr.SourceImage = image;
vr.SearchModelOK = true;
}
diff --git a/Rs.SkyLine/Flow/Camera/VisionResult.cs b/Rs.SkyLine/Flow/Camera/VisionResult.cs
index 2eb68f1..e00664f 100644
--- a/Rs.SkyLine/Flow/Camera/VisionResult.cs
+++ b/Rs.SkyLine/Flow/Camera/VisionResult.cs
@@ -25,6 +25,11 @@ namespace Rs.MotionPlat.Flow.Camera
/// 偏移量Y
///
public double OffsetY { get; set; } = 0;
+
+ ///
+ /// 偏移量R
+ ///
+ public double OffsetR { get; set; } = 0;
///
/// 扫码是否OK
///
diff --git a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs
index 6e242f4..818cc8c 100644
--- a/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs
+++ b/Rs.SkyLine/Flow/NormalFlow/DischargeFlow.cs
@@ -1287,7 +1287,7 @@ namespace Rs.MotionPlat.Flow
{
if(curNozzle.ToType== TurnoverType.Turnover)
{
- if (LoadAndUnloadTask.Instance.GetUndealedLoadToTurnoverTask().Count == 0)
+ if (LoadAndUnloadTask.Instance.GetUndealedLoadToTurnoverTask().Count == 0 && !GlobalVar.VirtualAxis)
{
//没有需要给周转盘上料的任务后,就开始上相机扫码
//判断周转盘第一行有没有产品,如果有产品则拍第一行
diff --git a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs
index 9f5ee0d..28c3037 100644
--- a/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs
+++ b/Rs.SkyLine/Flow/NormalFlow/TurnoverFlow.cs
@@ -1457,117 +1457,10 @@ namespace Rs.MotionPlat.Flow
public bool UnloadFinished()
{ return unloadOk; }
- public void PressLoad(List taskList)
- {
- slots.Clear();
- foreach(var slot in taskList)
- {
- slots.Add(slot.FromIndex+1);
- }
- pressLoad = true;
- loadOk= false;
- }
-
- ///
- /// 周转盘真空吸检测
- ///
- ///
- public List TurnoverTrayVacCheck()
- {
- List result = new List();
- foreach (var slot in slots)
- {
- if (!Ops.IsOn($"周转盘{slot+8}号穴位真空吸检测"))
- {
- result.Add(slot+8);
- }
- }
- return result;
- }
-
- ///
- /// 测试穴位真空吸检测
- ///
- ///
- public List TestVacCheck()
- {
- List result = new List();
- foreach (var slot in slots)
- {
- if (!Ops.IsOn($"测试{slot}号穴位真空吸检测"))
- {
- result.Add(slot);
- }
- }
- return result;
- }
-
- public void PressUnload(List taskList)
- {
- slots.Clear();
- foreach (var item in taskList)
- {
- slots.Add(item.FromIndex+1);
- }
- pressUnload = true;
- unloadOk= false;
- }
- ///
- /// 吸嘴真空吸检测
- ///
- ///
- List CheckNozzleVac()
- {
- List ngList = new List();
- //周转1号吸嘴真空吸检测
- foreach (var slot in slots)
- {
- if (!Ops.IsOn($"周转{slot}号吸嘴真空吸检测"))
- {
- ngList.Add(slot);
- }
- }
- return ngList;
- }
-
- void OpenNozzleVac()
- {
- foreach (var slot in slots)
- {
- Ops.On($"周转{slot}号吸嘴真空吸");
- }
- }
-
- void CloseNozzleVac()
- {
- foreach (var slot in slots)
- {
- Ops.Off($"周转{slot}号吸嘴真空吸");
- }
- }
-
- void OpenTurnoverTrayVac()
- {
- foreach (var slot in slots)
- {
- Ops.On($"周转盘{slot}号穴位真空吸");
- }
- }
-
- void CloseTurnoverTrayVac()
- {
- foreach (var slot in slots)
- {
- Ops.Off($"周转盘{slot}号穴位真空吸");
- }
- }
- void ClosePressVac()
+ public string GetStep()
{
- //foreach (var slot in slots)
- //{
- // Ops.Off($"测试{slot}号穴位真空吸");
- //}
+ return Step.ToString();
}
}