1.增加Job模式,如果不是Job模式,沿用原来的调度方式,否则为批处理模式;
| | |
| | | return nullptr; |
| | | } |
| | | |
| | | CSlot* CEquipment::getProcessedSlot(MaterialsType putSlotType) |
| | | CSlot* CEquipment::getProcessedSlot(MaterialsType putSlotType, BOOL bJobMode/* = FALSE*/) |
| | | { |
| | | for (int i = 0; i < SLOT_MAX; i++) { |
| | | if (!m_slot[i].isEnable()) continue; |
| | |
| | | if (!isSlotProcessed(i)) continue; |
| | | if (pGlass == nullptr) continue; |
| | | if (!pGlass->isScheduledForProcessing()) continue; |
| | | if (bJobMode && pGlass->getProcessJob() == nullptr) continue; |
| | | if(pGlass->getInspResult(m_nID, 0) == InspResult::Fail) continue; |
| | | int lsPath = m_slot[i].getLinkSignalPath(); |
| | | if(!m_bLinkSignalToUpstream[lsPath][SIGNAL_UPSTREAM_INLINE] |
| | |
| | | CSlot* getNonEmptySlot(MaterialsType type); |
| | | |
| | | // 获取一个指定物料类型(G1,G2,G1&G2)的且已经加工处理的槽位 |
| | | CSlot* getProcessedSlot(MaterialsType putSlotType); |
| | | CSlot* getProcessedSlot(MaterialsType putSlotType, BOOL bJobMode = FALSE); |
| | | CSlot* getProcessedSlot2(MaterialsType putSlotType, const std::vector<int>& candidates); |
| | | CSlot* getInspFailSlot(); |
| | | CSlot* getProcessedSlotCt(unsigned int slot); |
| | |
| | | m_pActiveRobotTask = nullptr; |
| | | m_nLastError = 0; |
| | | m_isCompareMapsBeforeProceeding = FALSE; |
| | | m_bJobMode = FALSE; |
| | | m_bEnableEventReport = true; |
| | | m_bEnableAlarmReport = true; |
| | | m_bContinuousTransfer = false; |
| | |
| | | if (!rmd.armState[0] && pLoadPorts[s]->isEnable() |
| | | && (pt == PortType::Loading || pt == PortType::Both) |
| | | && pLoadPorts[s]->getPortStatus() == PORT_INUSE) { |
| | | m_pActiveRobotTask = createTransferTask(pLoadPorts[s], pAligner, primaryType, secondaryType); |
| | | m_pActiveRobotTask = createTransferTask(pLoadPorts[s], pAligner, primaryType, secondaryType, m_bJobMode); |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | pEFEM->setContext(m_pActiveRobotTask->getContext()); |
| | | goto PORT_GET; |
| | |
| | | static int taskSeqNo = 0; |
| | | CRobotTask* CMaster::createTransferTask(CEquipment* pSrcEq, CEquipment* pTarEq, |
| | | MaterialsType primaryType/* = MaterialsType::G1*/, MaterialsType secondaryType/* = MaterialsType::G2*/, |
| | | int armNo/* = 1*/) |
| | | int armNo/* = 1*/, BOOL bJobMode/* = FALSE*/) |
| | | { |
| | | if (!pSrcEq->IsEnabled()) { |
| | | return nullptr; |
| | |
| | | CRobotTask* pTask = nullptr; |
| | | CSlot* pSrcSlot, * pTarSlot; |
| | | pTarSlot = pTarEq->getAvailableSlotForGlass(primaryType); |
| | | pSrcSlot = pSrcEq->getProcessedSlot(primaryType); |
| | | pSrcSlot = pSrcEq->getProcessedSlot(primaryType, bJobMode); |
| | | if (pSrcSlot == nullptr || nullptr == pTarSlot) { |
| | | pTarSlot = pTarEq->getAvailableSlotForGlass(secondaryType); |
| | | pSrcSlot = pSrcEq->getProcessedSlot(secondaryType); |
| | | pSrcSlot = pSrcEq->getProcessedSlot(secondaryType, bJobMode); |
| | | } |
| | | |
| | | |
| | |
| | | m_isCompareMapsBeforeProceeding = bCompare; |
| | | } |
| | | |
| | | void CMaster::setJobMode(BOOL bJobMode) |
| | | { |
| | | m_bJobMode = bJobMode; |
| | | } |
| | | |
| | | void CMaster::datetimeSync(SYSTEMTIME& time) |
| | | { |
| | | for (auto item : m_listEquipment) { |
| | |
| | | void setPortCassetteType(unsigned int index, SERVO::CassetteType type); |
| | | void setPortEnable(unsigned int index, BOOL bEnable); |
| | | void setCompareMapsBeforeProceeding(BOOL bCompare); |
| | | void setJobMode(BOOL bJobMode); |
| | | void datetimeSync(SYSTEMTIME& time); |
| | | void enableEventReport(bool bEnable); |
| | | void enableAlarmReport(bool bEnable); |
| | |
| | | void setState(MASTERSTATE state); |
| | | CRobotTask* createTransferTask(CEquipment* pSrcEq, CEquipment* pTarEq, |
| | | MaterialsType primaryType = MaterialsType::G1, MaterialsType secondaryType = MaterialsType::G2, |
| | | int armNo = 1); |
| | | int armNo = 1, BOOL bJobMode = FALSE); |
| | | CRobotTask* createTransferTask_bonder_to_bakecooling(CEquipment* pSrcEq, CEquipment* pTarEq); |
| | | CRobotTask* createTransferTask_bake_to_cooling(CEquipment* pSrcEq); |
| | | CRobotTask* createTransferTask_bakecooling_to_measurement(CEquipment* pSrcEq, CEquipment* pTarEq); |
| | |
| | | |
| | | // 在开始工艺前是否先需要先比较map |
| | | BOOL m_isCompareMapsBeforeProceeding; |
| | | BOOL m_bJobMode; |
| | | |
| | | |
| | | // 千传圈数计数 |
| | | int m_nContinuousTransferCount; |
| | |
| | | return GetPrivateProfileInt(_T("Master"), _T("CompareMapsBeforeProceeding"), 0, m_strFilepath); |
| | | } |
| | | |
| | | BOOL CConfiguration::isJobMode() |
| | | { |
| | | return GetPrivateProfileInt(_T("Master"), _T("JobMode"), 0, m_strFilepath); |
| | | } |
| | | |
| | | void CConfiguration::setContinuousTransferCount(int round) |
| | | { |
| | | WritePrivateProfileString(_T("Master"), _T("CTRound"), |
| | |
| | | BOOL setPortCassetteType(unsigned int index, int cassetteType); |
| | | BOOL setPortEnable(unsigned int index, BOOL bEnable); |
| | | BOOL isCompareMapsBeforeProceeding(); |
| | | BOOL isJobMode(); |
| | | void setContinuousTransferCount(int round); |
| | | int getContinuousTransferCount(); |
| | | |
| | |
| | | strMasterDataFile.Format(_T("%s\\Master.dat"), (LPTSTR)(LPCTSTR)m_strWorkDir); |
| | | m_master.setCacheFilepath((LPTSTR)(LPCTSTR)strMasterDataFile); |
| | | m_master.setCompareMapsBeforeProceeding(m_configuration.isCompareMapsBeforeProceeding()); |
| | | m_master.setJobMode(m_configuration.isJobMode()); |
| | | |
| | | // 加截Job |
| | | strMasterDataFile.Format(_T("%s\\MasterState.dat"), (LPTSTR)(LPCTSTR)m_strWorkDir); |