LAPTOP-SNT8I5JK\Boounion
2025-06-12 ffd3de44be70cfa45f2ad74b71daa55192296298
1.调整物流传输顺序,将Aligner往前调到Fliper前面
已修改2个文件
106 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CLoadPort.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CLoadPort.cpp
@@ -51,8 +51,7 @@
        // 加入Pin初始化代码
        LOGI("<CLoadPort>initPins");
        addPin(SERVO::PinType::INPUT, _T("In"));
        addPin(SERVO::PinType::OUTPUT, _T("Out1"));
        addPin(SERVO::PinType::OUTPUT, _T("Out2"));
        addPin(SERVO::PinType::OUTPUT, _T("Out"));
    }
    // 必须要实现的虚函数,在此初始化Slot信息
SourceCode/Bond/Servo/CMaster.cpp
@@ -294,7 +294,7 @@
        CLoadPort* pLoadPort3 = (CLoadPort*)getEquipment(EQ_ID_LOADPORT3);
        CLoadPort* pLoadPort4 = (CLoadPort*)getEquipment(EQ_ID_LOADPORT4);
        CFliper* pFliper = (CFliper*)getEquipment(EQ_ID_FLIPER);
        CVacuumBake* pVacuumBack = (CVacuumBake*)getEquipment(EQ_ID_VACUUMBAKE);
        CVacuumBake* pVacuumBake = (CVacuumBake*)getEquipment(EQ_ID_VACUUMBAKE);
        CAligner* pAligner = (CAligner*)getEquipment(EQ_ID_ALIGNER);
        CBonder* pBonder1 = (CBonder*)getEquipment(EQ_ID_Bonder1);
        CBonder* pBonder2 = (CBonder*)getEquipment(EQ_ID_Bonder2);
@@ -307,7 +307,7 @@
        ASSERT(pLoadPort3);
        ASSERT(pLoadPort4);
        ASSERT(pFliper);
        ASSERT(pVacuumBack);
        ASSERT(pVacuumBake);
        ASSERT(pAligner);
        ASSERT(pBonder1);
        ASSERT(pBonder2);
@@ -378,10 +378,10 @@
                // Measurement -> LoadPort
                CLoadPort* pEqLoadPort[] = { pLoadPort1, pLoadPort2, pLoadPort3, pLoadPort4 };
                CEquipment* pEqTar[] = { pVacuumBack, pFliper };
                CEquipment* pEqTar[] = { pVacuumBake, pFliper };
                if (primaryType == MaterialsType::G2) {
                    pEqTar[0] = pFliper;
                    pEqTar[1] = pVacuumBack;
                    pEqTar[1] = pVacuumBake;
                }
                for (int s = 0; s < 4; s++) {
                    if (pEqLoadPort[s]->isEnable()
@@ -461,8 +461,9 @@
                    continue;
                }
                // Aligner -> Bonder
                m_pActiveRobotTask = createTransferTask(pAligner, pBonder1, primaryType, secondaryType, armNo);
                // Fliper(G2) -> Bonder
                // VacuumBake(G1) -> Bonder
                m_pActiveRobotTask = createTransferTask(pFliper, pBonder1, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -474,7 +475,57 @@
                    continue;
                }
                m_pActiveRobotTask = createTransferTask(pAligner, pBonder2, primaryType, secondaryType, armNo);
                m_pActiveRobotTask = createTransferTask(pFliper, pBonder2, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
                }
                m_pActiveRobotTask = createTransferTask(pVacuumBake, pBonder1, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
                }
                m_pActiveRobotTask = createTransferTask(pVacuumBake, pBonder2, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
                }
                // Aligner -> Fliper(G2)
                // Aligner -> VacuumBake(G1)
                m_pActiveRobotTask = createTransferTask(pAligner, pFliper, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
                }
                m_pActiveRobotTask = createTransferTask(pAligner, pVacuumBake, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -487,44 +538,14 @@
                }
                // Fliper(G2) -> Aligner
                // VacuumBake(G1) -> Aligner
                m_pActiveRobotTask = createTransferTask(pFliper, pAligner, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
                }
                m_pActiveRobotTask = createTransferTask(pVacuumBack, pAligner, primaryType, secondaryType, armNo);
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->run();
                    std::string strDescription = m_pActiveRobotTask->getDescription();
                    unlock();
                    if (m_listener.onRobotTaskEvent != nullptr) {
                        m_listener.onRobotTaskEvent(this, m_pActiveRobotTask, ROBOT_EVENT_CREATE);
                    }
                    LOGI("创建新任务<%s>...", strDescription.c_str());
                    continue;
                }
                // LoadPort -> Fliper(G2)
                // LoadPort -> VacuumBake(G1)
                // LoadPort -> Aligner
                for (int s = 0; s < 4; s++) {
                    for (int t = 0; t < 2; t++) {
                        if (pEqLoadPort[s]->isEnable()
                            && pEqLoadPort[s]->getPortType() == PortType::Loading
                            && pEqLoadPort[s]->getPortMode() == PortMode::ReadyToLoad) {
                            m_pActiveRobotTask = createTransferTask(pEqLoadPort[s], pEqTar[t], primaryType, secondaryType, armNo);
                        m_pActiveRobotTask = createTransferTask(pEqLoadPort[s], pAligner, primaryType, secondaryType, armNo);
                            if (m_pActiveRobotTask != nullptr) {
                                goto PORT_GET;
                            }
                        }
                    }
                }
@@ -981,11 +1002,11 @@
        CBakeCooling* pBakeCooling = (CBakeCooling*)getEquipment(EQ_ID_BAKE_COOLING);
        CMeasurement* pMeasurement = (CMeasurement*)getEquipment(EQ_ID_MEASUREMENT);
        nRet = pLoadPort1->getPin("Out1")->connectPin(pAligner->getPin("In1"));
        nRet = pLoadPort1->getPin("Out")->connectPin(pAligner->getPin("In1"));
        if (nRet < 0) {
            LOGE("连接LoadPort1-Fliper失败");
        }
        nRet = pLoadPort2->getPin("Out1")->connectPin(pAligner->getPin("In2"));
        nRet = pLoadPort2->getPin("Out")->connectPin(pAligner->getPin("In2"));
        if (nRet < 0) {
            LOGE("连接LoadPort1-Fliper失败");
        }