From b54cb6d1d8742e94bd79623d4f410b3ff5abde86 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 26 六月 2025 08:47:12 +0800
Subject: [PATCH] 6.定时轮询比特位,修改为只轮询EFEM, Bonder1, Bonder2, BakeCooling, VacuuumBake, Measurent, 其它只是以上的子单元,共用CC-Link的数据块。 7.修改一处转换机械手的放置目标POS时的错误 问题。 8.增加机械手状态和托盘是否有物料的信息打印,以便于创建搬送任务时观察和调试

---
 SourceCode/Bond/Servo/CMaster.h |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 2288d79..4ff2252 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -16,11 +16,12 @@
 
 
 namespace SERVO {
-    enum MASTERSTATE {
+    enum class MASTERSTATE {
         READY = 0,
         STARTING,
         RUNNING,
-        STOPPING
+        STOPPING,
+        MSERROR
     };
 
     typedef std::function<void(void* pMaster, MASTERSTATE state)> ONMASTERSTATECHANGED;
@@ -55,6 +56,7 @@
         int term();
         int start();
         int stop();
+        void clearError();
         ULONGLONG getRunTime();
         MASTERSTATE getState();
         unsigned DispatchProc();
@@ -64,6 +66,9 @@
         CEquipment* getEquipment(int id);
         void setCacheFilepath(const char* pszFilepath);
         int abortCurrentTask();
+        int restoreCurrentTask();
+        void setPortType(unsigned int index, BOOL enable, int type, int mode,
+            int cassetteType, int transferMode, BOOL autoChangeEnable);
 
     private:
         inline void lock() { EnterCriticalSection(&m_criticalSection); }
@@ -91,7 +96,6 @@
         CRobotTask* createTransferTask_bonder_to_bakecooling(CEquipment* pSrcEq, CEquipment* pTarEq);
         CRobotTask* createTransferTask_bake_to_cooling(CEquipment* pSrcEq);
         CRobotTask* createTransferTask_bakecooling_to_measurement(CEquipment* pSrcEq, CEquipment* pTarEq);
-        void transformPosAndSlot(int srcPos, int srcSlot, int& tarPos, int& tarSlot);
 
     private:
         CRITICAL_SECTION m_criticalSection;
@@ -121,6 +125,10 @@
         // 当前任务和已完成任务列表
         CRobotTask* m_pActiveRobotTask;
         std::list< CRobotTask* > m_listTask;
+
+        // 错误代码
+        int m_nLastError;
+        std::string m_strLastError;
     };
 }
 

--
Gitblit v1.9.3