1.LoadPort状态变为InUse的时候不自动弹出LoadPort配置对话框;
2.修改调度逻辑,G2和G1分别进入Bonder的间隔不要太长,防止G2先进入Bonder,等待烘烤中的G1太久,在高温Bonder下出问题;
已修改5个文件
108 ■■■■ 文件已修改
SourceCode/Bond/Servo/CBonder.cpp 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CBonder.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/PortConfigurationDlg.cpp 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ServoDlg.cpp 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CBonder.cpp
@@ -464,6 +464,12 @@
        return pBuddy != nullptr;
    }
    BOOL CBonder::hasG2Class()
    {
        CGlass* pGlass = (CGlass*)m_slot[0].getContext();
        return (pGlass != nullptr);
    }
    int CBonder::onProcessData(CProcessData* pProcessData)
    {
        CEquipment::onProcessData(pProcessData);
SourceCode/Bond/Servo/CBonder.h
@@ -29,6 +29,7 @@
        void setIndex(unsigned int index);
        unsigned int getIndex();
        BOOL hasBondClass();
        BOOL hasG2Class();
    private:
        unsigned int m_nIndex;
SourceCode/Bond/Servo/CMaster.cpp
@@ -660,8 +660,10 @@
                // Fliper(G2) -> Bonder
                // VacuumBake(G1) -> Bonder
                SERVO::CRobotTask* tempTask[2] = {nullptr, nullptr};
                if (!rmd.armState[1] && !pBonder1->hasBondClass()) {
                    m_pActiveRobotTask = createTransferTask(pFliper, pBonder1, primaryType, secondaryType, 2);
                    tempTask[0] = createTransferTask(pFliper, pBonder1, primaryType, secondaryType, 2);
                    /*
                    if (m_pActiveRobotTask != nullptr) {
                        m_pActiveRobotTask->pick();
                        std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -672,24 +674,12 @@
                        LOGI("创建新任务<%s>...", strDescription.c_str());
                        continue;
                    }
                }
                if (!rmd.armState[1] && !pBonder2->hasBondClass()) {
                    m_pActiveRobotTask = createTransferTask(pFliper, pBonder2, primaryType, secondaryType, 2);
                    if (m_pActiveRobotTask != nullptr) {
                        m_pActiveRobotTask->pick();
                        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;
                    }
                    */
                }
                if (!rmd.armState[0] && !pBonder1->hasBondClass()) {
                    m_pActiveRobotTask = createTransferTask(pVacuumBake, pBonder1, primaryType, secondaryType);
                    tempTask[1] = createTransferTask(pVacuumBake, pBonder1, primaryType, secondaryType);
                    /*
                    if (m_pActiveRobotTask != nullptr) {
                        m_pActiveRobotTask->pick();
                        std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -700,10 +690,51 @@
                        LOGI("创建新任务<%s>...", strDescription.c_str());
                        continue;
                    }
                    */
                }
                if (tempTask[1] != nullptr && pBonder1->hasG2Class()) {
                    m_pActiveRobotTask = tempTask[1];
                    if(tempTask[0] != nullptr) delete tempTask[0];
                }
                else if (tempTask[0] != nullptr && tempTask[1] != nullptr) {
                    m_pActiveRobotTask = tempTask[0];
                    delete tempTask[1];
                }
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->pick();
                    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;
                }
                if (tempTask[0] != nullptr) delete tempTask[0];
                if (tempTask[1] != nullptr) delete tempTask[1];
                tempTask[0] = nullptr;
                tempTask[1] = nullptr;
                if (!rmd.armState[1] && !pBonder2->hasBondClass()) {
                    tempTask[0] = createTransferTask(pFliper, pBonder2, primaryType, secondaryType, 2);
                    /*
                    if (m_pActiveRobotTask != nullptr) {
                        m_pActiveRobotTask->pick();
                        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;
                    }
                    */
                }
                if (!rmd.armState[0] && !pBonder2->hasBondClass()) {
                    m_pActiveRobotTask = createTransferTask(pVacuumBake, pBonder2, primaryType, secondaryType);
                    tempTask[1] = createTransferTask(pVacuumBake, pBonder2, primaryType, secondaryType);
                    /*
                    if (m_pActiveRobotTask != nullptr) {
                        m_pActiveRobotTask->pick();
                        std::string strDescription = m_pActiveRobotTask->getDescription();
@@ -714,8 +745,31 @@
                        LOGI("创建新任务<%s>...", strDescription.c_str());
                        continue;
                    }
                    */
                }
                if (tempTask[1] != nullptr && pBonder1->hasG2Class()) {
                    m_pActiveRobotTask = tempTask[1];
                    if (tempTask[0] != nullptr) delete tempTask[0];
                }
                else if (tempTask[0] != nullptr && tempTask[1] != nullptr) {
                    m_pActiveRobotTask = tempTask[0];
                    delete tempTask[1];
                }
                if (m_pActiveRobotTask != nullptr) {
                    m_pActiveRobotTask->pick();
                    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;
                }
                if (tempTask[0] != nullptr) delete tempTask[0];
                if (tempTask[1] != nullptr) delete tempTask[1];
                tempTask[0] = nullptr;
                tempTask[1] = nullptr;
                // Aligner -> Fliper(G2)
                // Aligner -> VacuumBake(G1)
SourceCode/Bond/Servo/PortConfigurationDlg.cpp
@@ -240,7 +240,6 @@
    GetDlgItem(IDC_BUTTON_PROCESS_START)->EnableWindow(FALSE);
    GetDlgItem(IDC_BUTTON_PROCESS_CANCEL)->EnableWindow(FALSE);
    return TRUE;  // return TRUE unless you set the focus to a control
    // 异常: OCX 属性页应返回 FALSE
}
@@ -254,6 +253,12 @@
    }
    // 加载选中端口的配置到 UI
    for (int i = 1; i <= 8; i++) {
        m_wndGrid.SetItemText(i, 0, "");
        m_wndGrid.SetItemText(i, 1, "");
        m_wndGrid.SetCellType(i, 1, RUNTIME_CLASS(CGridCellNumeric));
    }
    m_wndGrid.Invalidate();
    LoadPortConfigToUI(m_pPort[selPort]);
}
SourceCode/Bond/Servo/ServoDlg.cpp
@@ -244,9 +244,9 @@
            else if (RX_CODE_LOADPORT_INUSE == code) {
                SERVO::CLoadPort* pLoadPort = nullptr;
                if (pAny->getPtrValue("ptr", (void*&)pLoadPort)) {
                    CPortConfigurationDlg dlg;
                    dlg.setCurSelPort(pLoadPort->getIndex());
                    dlg.DoModal();
                    //CPortConfigurationDlg dlg;
                    //dlg.setCurSelPort(pLoadPort->getIndex());
                    //dlg.DoModal();
                }
            }