From bc7f1c4e028e69be51079b59dae4ae5c4d43f5bb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期六, 31 一月 2026 21:54:56 +0800
Subject: [PATCH] 1.状态指示图,目前灰色表示掉线,绿色表示在线。增加Slot的小点表示有没有料,及加工状态 。 2.增加图示
---
SourceCode/Bond/Servo/ServoCommo.h | 75 +++++++++++++++++++++++++++++++++++++
1 files changed, 74 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoCommo.h b/SourceCode/Bond/Servo/ServoCommo.h
index 0b58600..8c4c7ea 100644
--- a/SourceCode/Bond/Servo/ServoCommo.h
+++ b/SourceCode/Bond/Servo/ServoCommo.h
@@ -1,5 +1,36 @@
#pragma once
+#include <string>
+#include <vector>
+
+#define CHECK_READ_STEP_SIGNAL(addr, data, size) { \
+ BOOL bFlag = isBitOn(data, size, addr); \
+ SERVO::CStep* pStep = getStep(addr); \
+ if (pStep != nullptr) { \
+ ((CReadStep*)pStep)->onReadSignal(bFlag ? addr : 0); \
+ } \
+}
+
+#define CHECK_WRITE_STEP_SIGNAL(addr, data, size) { \
+ BOOL bFlag = isBitOn(data, size, addr); \
+ SERVO::CStep* pStep = getStep(addr); \
+ if (pStep != nullptr) { \
+ ((CWriteStep*)pStep)->onRecvSignal(bFlag ? addr : 0); \
+ } \
+}
+
+#define CHECK_RUN_ACTIVE_ROBOT_TASK(art) { \
+ if (art != nullptr) { \
+ art->pick(); \
+ std::string strDescription = art->getDescription(); \
+ unlock(); \
+ if (m_listener.onRobotTaskEvent != nullptr) { \
+ m_listener.onRobotTaskEvent(this, art, ROBOT_EVENT_CREATE); \
+ } \
+ LOGI("创建新任务<%s>...", strDescription.c_str()); \
+ continue; \
+ } \
+}
namespace SERVO {
#define BLOCK_BUFFER_MAX 1024
@@ -13,7 +44,14 @@
OK = 1,
NG,
};
- typedef RET JobDataRequestAck;
+ using JobDataRequestAck = RET;
+
+ enum class InspResult
+ {
+ NotInspected = 0, // 初始化状态,尚未检测
+ Pass, // 检测合格
+ Fail // 检测不合格
+ };
enum class PortType {
Loading = 1,
@@ -35,6 +73,7 @@
};
enum class MaterialsType {
+ G0 = 0,
G1 = 1,
G2 = 2,
G1G2 = 3
@@ -117,10 +156,12 @@
Ready = 0,
Running,
Picking,
+ Picked,
Placing,
Restoring,
Error,
Abort,
+ Restored,
Completed
};
@@ -163,8 +204,40 @@
Error
};
+ /* Port Status */
+ struct SlotConfig {
+ int nSlotID = 0;
+ bool isEnabled = false;
+ };
+
+ struct PortConfig {
+ int nMaterialType; // 物料类型,1: G1, 2: G2, 3: G1+G2
+ std::string strPortName; // 例如 "Port 1"
+ std::string strRecipe; // 例如 "P1001"
+ std::string strLotID;
+ std::string strProductID;
+ std::string strOperationID;
+ std::vector<SlotConfig> vecSlot;
+ };
+
/* EQ Data changed code */
#define EDCC_FETCHOUT_JOB 1000 /* 取片 */
#define EDCC_STORED_JOB 1001 /* 放片 */
+
+
+ /* Cassette Ctrl CMD */
+#define CCC_MAP_DOWNLOAD 1
+#define CCC_CLAMP 2
+#define CCC_UNCLAMP 3
+#define CCC_RECLAMP 4
+#define CCC_PROCESS_START 5
+#define CCC_PROCESS_START_BY_COUNT 6
+#define CCC_PROCESS_PAUSE 7
+#define CCC_PROCESS_RESUME 8
+#define CCC_PROCESS_ABORT 9
+#define CCC_PROCESS_CANCEL 10
+#define CCC_PROCESS_END 11
+#define CCC_ID_UPDATE 12
+#define CCC_MAP_UPDATE 13
}
--
Gitblit v1.9.3