LAPTOP-SNT8I5JK\Boounion
2025-06-12 92c468d386d33f5e74916a7afd290e50ce0d5d6f
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;
                     }
@@ -980,42 +981,40 @@
      CBakeCooling* pBakeCooling = (CBakeCooling*)getEquipment(EQ_ID_BAKE_COOLING);
      CMeasurement* pMeasurement = (CMeasurement*)getEquipment(EQ_ID_MEASUREMENT);
      nRet = pLoadPort1->getPin("Out1")->connectPin(pFliper->getPin("In1"));
      nRet = pLoadPort1->getPin("Out1")->connectPin(pAligner->getPin("In1"));
      if (nRet < 0) {
         LOGE("连接LoadPort1-Fliper失败");
      }
      nRet = pLoadPort2->getPin("Out1")->connectPin(pFliper->getPin("In2"));
      nRet = pLoadPort2->getPin("Out1")->connectPin(pAligner->getPin("In2"));
      if (nRet < 0) {
         LOGE("连接LoadPort1-Fliper失败");
      }
      nRet = pLoadPort1->getPin("Out2")->connectPin(pVacuumBake->getPin("In1"));
      nRet = pAligner->getPin("Out1")->connectPin(pFliper->getPin("In"));
      if (nRet < 0) {
         LOGE("连接LoadPort1-VacuumBake失败");
         LOGE("连接Aligner-Fliper失败");
      }
      nRet = pLoadPort2->getPin("Out2")->connectPin(pVacuumBake->getPin("In2"));
      nRet = pAligner->getPin("Out2")->connectPin(pVacuumBake->getPin("In"));
      if (nRet < 0) {
         LOGE("连接LoadPort1-VacuumBake失败");
         LOGE("连接Aligner-VacuumBake失败");
      }
      nRet = pFliper->getPin("Out")->connectPin(pAligner->getPin("In1"));
      nRet = pFliper->getPin("Out1")->connectPin(pBonder1->getPin("In1"));
      if (nRet < 0) {
         LOGE("连接Fliper-Aligner失败");
         LOGE("连接Fliper-Bonder1失败");
      }
      nRet = pFliper->getPin("Out2")->connectPin(pBonder2->getPin("In1"));
      if (nRet < 0) {
         LOGE("连接Fliper-Bonder2失败");
      }
      nRet = pVacuumBake->getPin("Out")->connectPin(pAligner->getPin("In2"));
      nRet = pVacuumBake->getPin("Out1")->connectPin(pBonder1->getPin("In2"));
      if (nRet < 0) {
         LOGE("连接VacuumBake-Aligner失败");
         LOGE("连接VacuumBake-Bonder1失败");
      }
      nRet = pAligner->getPin("Out1")->connectPin(pBonder1->getPin("In"));
      nRet = pVacuumBake->getPin("Out2")->connectPin(pBonder2->getPin("In2"));
      if (nRet < 0) {
         LOGE("连接Aligner-Bondere1失败");
      }
      nRet = pAligner->getPin("Out2")->connectPin(pBonder2->getPin("In"));
      if (nRet < 0) {
         LOGE("连接Aligner-Bondere2失败");
         LOGE("连接VacuumBake-Bonder2失败");
      }
      nRet = pBonder1->getPin("Out")->connectPin(pBakeCooling->getPin("In1"));
@@ -1128,7 +1127,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 +1144,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());
      }