From 26c208594fba1cae3a71d2caa9ff744e3ece81de Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 12 六月 2025 11:47:22 +0800
Subject: [PATCH] 1.准备增加机器手臂的选择;
---
SourceCode/Bond/Servo/CMaster.cpp | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index 7b24735..2b509e8 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -284,6 +284,7 @@
// Bonder1和Bonder2需要的G2就过不来了
// 最基本的实现,可以G2和G2轮流搬送,但最好根据Bonder的需求来决定
MaterialsType primaryType, secondaryType;
+ int armNo = 1; // 默认使用手臂2
// 各种机器
@@ -386,7 +387,7 @@
if (pEqLoadPort[s]->isEnable()
&& pEqLoadPort[s]->getPortType() == PortType::Unloading
&& pEqLoadPort[s]->getPortMode() == PortMode::ReadyToUnload) {
- m_pActiveRobotTask = createTransferTask(pMeasurement, pEqLoadPort[s], primaryType, secondaryType);
+ m_pActiveRobotTask = createTransferTask(pMeasurement, pEqLoadPort[s], primaryType, secondaryType, armNo);
if (m_pActiveRobotTask != nullptr) {
goto PORT_PUT;
}
@@ -461,7 +462,7 @@
}
// Aligner -> Bonder
- m_pActiveRobotTask = createTransferTask(pAligner, pBonder1, primaryType, secondaryType);
+ m_pActiveRobotTask = createTransferTask(pAligner, pBonder1, primaryType, secondaryType, armNo);
if (m_pActiveRobotTask != nullptr) {
m_pActiveRobotTask->run();
std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -473,7 +474,7 @@
continue;
}
- m_pActiveRobotTask = createTransferTask(pAligner, pBonder2, primaryType, secondaryType);
+ m_pActiveRobotTask = createTransferTask(pAligner, pBonder2, primaryType, secondaryType, armNo);
if (m_pActiveRobotTask != nullptr) {
m_pActiveRobotTask->run();
std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -488,7 +489,7 @@
// Fliper(G2) -> Aligner
// VacuumBake(G1) -> Aligner
- m_pActiveRobotTask = createTransferTask(pFliper, pAligner, primaryType, secondaryType);
+ m_pActiveRobotTask = createTransferTask(pFliper, pAligner, primaryType, secondaryType, armNo);
if (m_pActiveRobotTask != nullptr) {
m_pActiveRobotTask->run();
std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -500,7 +501,7 @@
continue;
}
- m_pActiveRobotTask = createTransferTask(pVacuumBack, pAligner, primaryType, secondaryType);
+ m_pActiveRobotTask = createTransferTask(pVacuumBack, pAligner, primaryType, secondaryType, armNo);
if (m_pActiveRobotTask != nullptr) {
m_pActiveRobotTask->run();
std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -520,7 +521,7 @@
if (pEqLoadPort[s]->isEnable()
&& pEqLoadPort[s]->getPortType() == PortType::Loading
&& pEqLoadPort[s]->getPortMode() == PortMode::ReadyToLoad) {
- m_pActiveRobotTask = createTransferTask(pEqLoadPort[s], pEqTar[t], primaryType, secondaryType);
+ m_pActiveRobotTask = createTransferTask(pEqLoadPort[s], pEqTar[t], primaryType, secondaryType, armNo);
if (m_pActiveRobotTask != nullptr) {
goto PORT_GET;
}
@@ -1128,7 +1129,8 @@
static int taskSeqNo = 0;
CRobotTask* CMaster::createTransferTask(CEquipment* pSrcEq, CEquipment* pTarEq,
- MaterialsType primaryType/* = MaterialsType::G1*/, MaterialsType secondaryType/* = MaterialsType::G2*/)
+ MaterialsType primaryType/* = MaterialsType::G1*/, MaterialsType secondaryType/* = MaterialsType::G2*/,
+ int armNo/* = 1*/)
{
CRobotTask* pTask = nullptr;
CSlot* pSrcSlot, * pTarSlot;
@@ -1144,7 +1146,7 @@
pTask = new CRobotTask();
pTask->setContext(pSrcSlot->getContext());
pTask->setEFEM((CEFEM*)getEquipment(EQ_ID_EFEM));
- pTask->setRobotTransferParam(++taskSeqNo, 1, pSrcSlot->getPosition(),
+ pTask->setRobotTransferParam(++taskSeqNo, armNo, pSrcSlot->getPosition(),
pTarSlot->getPosition(), pSrcSlot->getNo(), pTarSlot->getNo());
}
--
Gitblit v1.9.3