From 7a60f2a3404220dcbc05e2e06fd7f3a6e51d5a4a Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 19 六月 2025 15:37:20 +0800
Subject: [PATCH] 1.对Panel Data Request的响应;
---
SourceCode/Bond/Servo/CEquipment.cpp | 84 +++++++++++++++++++++++++++++++++---------
SourceCode/Bond/Servo/CEFEM.cpp | 1
SourceCode/Bond/Servo/CEquipment.h | 6 +-
3 files changed, 70 insertions(+), 21 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index a331c96..8b5ec2a 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -708,6 +708,7 @@
pStep->setName(STEP_EFEM_PANEL_DATA_REQUEST);
pStep->setProp("Port", (void*)1);
pStep->setWriteSignalDev(0x15d);
+ pStep->setReturnDev(0x73a);
if (addStep(STEP_ID_PANEL_DATA_REQUEST, pStep) != 0) {
delete pStep;
}
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 165199a..05a6458 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -875,6 +875,61 @@
return nullptr;
}
+ CGlass* CEquipment::getGlassFromSlot(int slotNo)
+ {
+ CSlot* pSlot = nullptr;
+ for (int i = 0; i < SLOT_MAX; i++) {
+ if (!m_slot[i].isEnable()) continue;
+ if (m_slot[i].getNo() != slotNo) continue;
+ pSlot = &m_slot[i];
+ break;
+ }
+
+ if (pSlot != nullptr) {
+ return (CGlass*)pSlot->getContext();
+ }
+
+ return nullptr;
+ }
+
+ CGlass* CEquipment::getGlassWithCassette(int cassetteSequenceNo, int jobSequenceNo)
+ {
+ CSlot* pSlot = nullptr;
+ for (int i = 0; i < SLOT_MAX; i++) {
+ if (!m_slot[i].isEnable()) continue;
+ CGlass* pGlass = (CGlass*)m_slot[i].getContext();
+ if (pGlass == nullptr) continue;
+ CJobDataS* pJobDataS = pGlass->getJobDataS();
+ ASSERT(pJobDataS);
+ if (pJobDataS->getCassetteSequenceNo() == cassetteSequenceNo
+ && pJobDataS->getJobSequenceNo() == jobSequenceNo) {
+ return pGlass;
+ }
+ }
+
+
+ return nullptr;
+ }
+
+ CJobDataS* CEquipment::getJobDataSWithCassette(int cassetteSequenceNo, int jobSequenceNo)
+ {
+ CSlot* pSlot = nullptr;
+ for (int i = 0; i < SLOT_MAX; i++) {
+ if (!m_slot[i].isEnable()) continue;
+ CGlass* pGlass = (CGlass*)m_slot[i].getContext();
+ if (pGlass == nullptr) continue;
+ CJobDataS* pJobDataS = pGlass->getJobDataS();
+ ASSERT(pJobDataS);
+ if (pJobDataS->getCassetteSequenceNo() == cassetteSequenceNo
+ && pJobDataS->getJobSequenceNo() == jobSequenceNo) {
+ return pJobDataS;
+ }
+ }
+
+
+ return nullptr;
+ }
+
bool CEquipment::isAlarmStep(SERVO::CStep* pStep)
{
return CToolUnits::startsWith(pStep->getName(), STEP_ALARM_START);
@@ -1219,23 +1274,6 @@
return &m_slot[index];
}
- CGlass* CEquipment::getGlassFromSlot(int slotNo)
- {
- CSlot* pSlot = nullptr;
- for (int i = 0; i < SLOT_MAX; i++) {
- if (!m_slot[i].isEnable()) continue;
- if (m_slot[i].getNo() != slotNo) continue;
- pSlot = &m_slot[i];
- break;
- }
-
- if (pSlot != nullptr) {
- return (CGlass*)pSlot->getContext();
- }
-
- return nullptr;
- }
-
CGlass* CEquipment::getAnyGlass()
{
CSlot* pSlot = nullptr;
@@ -1558,8 +1596,18 @@
// Cassette Sequence No 1W
// Job Sequence No 1W
// Job DataS 256W
+ char szBuffer[1024];
+ index = 0;
+ memcpy(&szBuffer[index], &cassetteSequenceNo, sizeof(short));
+ index += sizeof(short);
+ memcpy(&szBuffer[index], &jobSequenceNo, sizeof(short));
+ index += sizeof(short);
-
+ CJobDataS* pJobDataS = getJobDataSWithCassette(cassetteSequenceNo, jobSequenceNo);
+ if (pJobDataS != nullptr) {
+ index += pJobDataS->serialize(&szBuffer[index], 1024 - sizeof(short) - sizeof(short));
+ ((CEqReadStep*)pStep)->setReturnData(szBuffer, index);
+ }
// 缓存Attribute,用于调试时显示信息
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index 3752e2f..8e45d80 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -176,16 +176,16 @@
// 获取玻璃物料
CGlass* getGlassFromSlot(int slotNo);
+ CGlass* getGlassWithCassette(int cassetteSequenceNo, int jobSequenceNo);
CGlass* getAnyGlass();
+ CGlass* getGlass(const char* pszGlassId);
+ CJobDataS* getJobDataSWithCassette(int cassetteSequenceNo, int jobSequenceNo);
// 验证玻璃和槽是否匹配
BOOL ValidateGlassSlotMatch();
// 是否有玻璃
BOOL hasGlass();
-
- // 获取指定ID的glass
- CGlass * getGlass(const char* pszGlassId);
// 指定槽位是否可以放置玻璃
BOOL canPlaceGlassInSlot(const short slotIndex);
--
Gitblit v1.9.3