From 0ac6ae25833b16d25e5380176f66d35aa947f85c Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 05 六月 2025 17:17:05 +0800
Subject: [PATCH] 1.EFEM更新信号到LoadPort, Robot, Aligner, Fliper 2.搬送条件,增加Upstream Inline、Upstream Trouble、Interlock、Send Able信号的检测。
---
SourceCode/Bond/Servo/CEquipment.cpp | 13 +++++++++++++
SourceCode/Bond/Servo/CEFEM.cpp | 10 ++++++++++
SourceCode/Bond/Servo/CEquipment.h | 6 ++++--
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index 6cbb23b..326a19f 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -663,6 +663,16 @@
m_pPort[i]->onReceiveLBData(pszData, size);
}
}
+
+ // 更新信号到LoadPort, Robot, Aligner, Fliper
+ m_pPort[0]->setLinkSignalBlock(0, &m_bLinkSignal[0][0]);
+ m_pPort[1]->setLinkSignalBlock(0, &m_bLinkSignal[1][0]);
+ m_pPort[2]->setLinkSignalBlock(0, &m_bLinkSignal[2][0]);
+ m_pPort[3]->setLinkSignalBlock(0, &m_bLinkSignal[3][0]);
+ m_pArmTray[0]->setLinkSignalBlock(0, &m_bLinkSignal[4][0]);
+ m_pArmTray[1]->setLinkSignalBlock(0, &m_bLinkSignal[5][0]);
+ m_pAligner->setLinkSignalBlock(0, &m_bLinkSignal[6][0]);
+ m_pFliper->setLinkSignalBlock(0, &m_bLinkSignal[7][0]);
}
int CEFEM::onReceivedJob(int port, CJobDataS* pJobDataS)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 43067d2..ad72643 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -370,6 +370,7 @@
for (int i = 0; i < 8; i++) {
m_bLinkSignal[i][SIGNAL_UPSTREAM_INLINE] = isBitOn(pszData, size, index + 0);
m_bLinkSignal[i][SIGNAL_UPSTREAM_TROUBLE] = isBitOn(pszData, size, index + 1);
+ m_bLinkSignal[i][SIGNAL_INTERLOCK] = isBitOn(pszData, size, index + 2);
m_bLinkSignal[i][SIGNAL_SEND_ABLE] = isBitOn(pszData, size, index + 3);
index += 0x40;
}
@@ -605,6 +606,14 @@
if (path >= PATH_MAX) return;
if (signal >= SIGNAL_MAX) return;
m_bLinkSignal[path][signal] = bOn;
+ }
+
+ void CEquipment::setLinkSignalBlock(unsigned int path, BOOL* pSignal)
+ {
+ if (path >= PATH_MAX) return;
+ for (int i = 0; i < SIGNAL_MAX; i++) {
+ m_bLinkSignal[path][i] = pSignal[i];
+ }
}
int CEquipment::onStepEvent(CStep* pStep, int code)
@@ -1139,6 +1148,10 @@
if (m_slot[i].isLock()) continue;
CGlass* pGlass = (CGlass*)m_slot[i].getContext();
if (pGlass == nullptr) continue;
+ if(!m_bLinkSignal[i][SIGNAL_UPSTREAM_INLINE]
+ || m_bLinkSignal[i][SIGNAL_UPSTREAM_TROUBLE]
+ || !m_bLinkSignal[i][SIGNAL_INTERLOCK]
+ || !m_bLinkSignal[i][SIGNAL_SEND_ABLE] ) continue;
MaterialsType glassType = pGlass->getType();
if (glassType == MaterialsType::G1 && putSlotType == MaterialsType::G2) continue;
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 7b2b24e..cb1a615 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -38,10 +38,11 @@
namespace SERVO {
-#define SLOT_MAX 12
+#define SLOT_MAX PATH_MAX
#define SIGNAL_UPSTREAM_INLINE 0
#define SIGNAL_UPSTREAM_TROUBLE 1
-#define SIGNAL_SEND_ABLE 2
+#define SIGNAL_INTERLOCK 2
+#define SIGNAL_SEND_ABLE 3
typedef std::function<void(void* pEiuipment, BOOL bAlive)> ONALIVE;
typedef std::function<void(void* pEiuipment, int code)> ONDATACHANGED;
@@ -194,6 +195,7 @@
// 只在模拟测试时使用的函数,用于模拟信号
void setLinkSignal(unsigned int path, unsigned int signal, BOOL bOn);
+ void setLinkSignalBlock(unsigned int path, BOOL* pSignal);
protected:
inline void Lock() { EnterCriticalSection(&m_criticalSection); }
--
Gitblit v1.9.3