| 2025-08-11 | LAPTOP-SNT8I5JK\Boounion | ![]() |
| 2025-08-11 | LAPTOP-SNT8I5JK\Boounion | ![]() |
| 2025-08-11 | LAPTOP-SNT8I5JK\Boounion | ![]() |
SourceCode/Bond/EAPSimulator/CHsmsActive.cpp
@@ -289,6 +289,18 @@ return 0; } int CHsmsActive::hsmsSelectedEquipmentStatusRequest(unsigned int SVID) { IMessage* pMessage = nullptr; int nRet = HSMS_Create1Message(pMessage, m_nSessionId, 1 | REPLY, 3, ++m_nSystemByte); pMessage->getBody()->addU4Item(SVID, "SVID"); m_pActive->sendMessage(pMessage); HSMS_Destroy1Message(pMessage); return 0; } int CHsmsActive::hsmsQueryPPIDList() { IMessage* pMessage = nullptr; SourceCode/Bond/EAPSimulator/CHsmsActive.h
@@ -6,6 +6,10 @@ #include "CCollectionEvent.h" #define SVID_CJobSpace 5001 #define SVID_PJobSpace 5002 typedef std::function<void(void* pFrom, ACTIVESTATE state)> STATECHANGED; typedef struct _ACTIVEListener { @@ -61,6 +65,9 @@ int hsmsTransmitSpooledData(); int hsmsPurgeSpooledData(); // 查询变量 int hsmsSelectedEquipmentStatusRequest(unsigned int SVID); // 查询PPID List int hsmsQueryPPIDList(); SourceCode/Bond/EAPSimulator/EAPSimulator.rcBinary files differ
SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
@@ -90,6 +90,8 @@ ON_BN_CLICKED(IDC_BUTTON_QUERY_PPID_LIST, &CEAPSimulatorDlg::OnBnClickedButtonQueryPpidList) ON_BN_CLICKED(IDC_BUTTON_PROCEED_WITH_CARRIER, &CEAPSimulatorDlg::OnBnClickedButtonProceedWithCarrier) ON_BN_CLICKED(IDC_BUTTON_CARRIER_RELEASE, &CEAPSimulatorDlg::OnBnClickedButtonCarrierRelease) ON_BN_CLICKED(IDC_BUTTON_QUERY_CJ_SPACE, &CEAPSimulatorDlg::OnBnClickedButtonQueryCjSpace) ON_BN_CLICKED(IDC_BUTTON_QUERY_PJ_SPACE, &CEAPSimulatorDlg::OnBnClickedButtonQueryPjSpace) END_MESSAGE_MAP() @@ -279,6 +281,8 @@ GetDlgItem(IDC_BUTTON_QUERY_PPID_LIST)->EnableWindow(enabled); GetDlgItem(IDC_BUTTON_PROCEED_WITH_CARRIER)->EnableWindow(enabled); GetDlgItem(IDC_BUTTON_CARRIER_RELEASE)->EnableWindow(enabled); GetDlgItem(IDC_BUTTON_QUERY_CJ_SPACE)->EnableWindow(enabled); GetDlgItem(IDC_BUTTON_QUERY_PJ_SPACE)->EnableWindow(enabled); } void CEAPSimulatorDlg::OnBnClickedButtonConnect() @@ -376,6 +380,16 @@ theApp.m_model.m_pHsmsActive->hsmsPurgeSpooledData(); } void CEAPSimulatorDlg::OnBnClickedButtonQueryCjSpace() { theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(SVID_CJobSpace); } void CEAPSimulatorDlg::OnBnClickedButtonQueryPjSpace() { theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(SVID_PJobSpace); } void CEAPSimulatorDlg::OnBnClickedButtonQueryPpidList() { theApp.m_model.m_pHsmsActive->hsmsQueryPPIDList(); SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.h
@@ -59,4 +59,6 @@ afx_msg void OnBnClickedButtonQueryPpidList(); afx_msg void OnBnClickedButtonProceedWithCarrier(); afx_msg void OnBnClickedButtonCarrierRelease(); afx_msg void OnBnClickedButtonQueryCjSpace(); afx_msg void OnBnClickedButtonQueryPjSpace(); }; SourceCode/Bond/EAPSimulator/Resource.h
@@ -46,10 +46,11 @@ #define IDC_EDIT_CE_NAME 1031 #define IDC_BUTTON_QUERY_PPID_LIST 1032 #define IDC_EDIT_CE_RPTID 1033 #define IDC_BUTTON_PROCEED_WITH_CARRIER 1033 #define IDC_BUTTON_TRANSMIT_SPOOLED_DATA 1034 #define IDC_BUTTON_PROCEED_WITH_CARRIER2 1035 #define IDC_BUTTON_CARRIER_RELEASE 1035 #define IDC_BUTTON_PROCEED_WITH_CARRIER 1034 #define IDC_BUTTON_TRANSMIT_SPOOLED_DATA 1035 #define IDC_BUTTON_CARRIER_RELEASE 1036 #define IDC_BUTTON_QUERY_CJ_SPACE 1037 #define IDC_BUTTON_QUERY_PJ_SPACE 1038 // Next default values for new objects // @@ -57,7 +58,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 141 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1035 #define _APS_NEXT_CONTROL_VALUE 1039 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif SourceCode/Bond/Servo/CMaster.cpp
@@ -56,7 +56,7 @@ m_bEnableAlarmReport = true; m_bContinuousTransfer = false; m_nContinuousTransferCount = 0; m_nContinuousTransferStep = CTStep_begin; m_nContinuousTransferStep = CTStep_Unknow; InitializeCriticalSection(&m_criticalSection); } @@ -708,13 +708,15 @@ // Measurement -> LoadPort for (int s = 0; s < 4; s++) { PortType pt = pLoadPorts[s]->getPortType(); if (!rmd.armState[0] && pLoadPorts[s]->isEnable() if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_BakeCooling_Measurement) && !rmd.armState[0] && pLoadPorts[s]->isEnable() && (pt == PortType::Unloading || pt == PortType::Both) && pLoadPorts[s]->getPortStatus() == PORT_INUSE) { for (int slot = 0; slot < SLOT_MAX; slot++) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pMeasurement, 0, pLoadPorts[s], slot); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_Measurement_LoadPort; m_nContinuousTransferStep = CTStep_end; goto CT_PORT_PUT; } @@ -727,10 +729,12 @@ // BakeCooling ->Measurement if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_BakeCooling_BakeCooling3) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pBakeCooling, 3, pMeasurement, 0); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_BakeCooling_Measurement; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(BakeCooling -> Measurement)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); @@ -738,86 +742,104 @@ // BakeCooling内部 if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_BakeCooling_BakeCooling2) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pBakeCooling, 2, pBakeCooling, 3); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_BakeCooling_BakeCooling3; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(BakeCooling-2 -> BakeCooling-3)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_BakeCooling_BakeCooling1) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pBakeCooling, 1, pBakeCooling, 2); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_BakeCooling_BakeCooling2; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(BakeCooling-1 -> BakeCooling-2)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_VacuumBake_BakeCooling) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pBakeCooling, 0, pBakeCooling, 1); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_BakeCooling_BakeCooling1; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(BakeCooling-0 -> BakeCooling-1)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } // VacuumBake(G1) -> BakeCooling if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_VacuumBake_VacuumBake) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pVacuumBake, 1, pBakeCooling, 0); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_VacuumBake_BakeCooling; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(VacuumBake(G1) -> BakeCooling)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } // VacuumBake(G1) -> VacuumBake(G1) if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_Bonder2_VacuumBake) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pVacuumBake, 0, pVacuumBake, 1); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_VacuumBake_VacuumBake; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(VacuumBake(G1-0) -> VacuumBake(G1-1))..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } // Bonder2 -> VacuumBake(G1) if (!rmd.armState[0]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_Bonder1_Bonder2) && !rmd.armState[0]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pBonder2, 1, pVacuumBake, 0); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_Bonder2_VacuumBake; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(Bonder2 -> VacuumBake(G1))..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } // Bonder1 -> Bonder2 if (!rmd.armState[0] && !pBonder2->hasBondClass()) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_Fliper_Bonder1) && !rmd.armState[0] && !pBonder2->hasBondClass()) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pBonder1, 1, pBonder2, 1); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_Bonder1_Bonder2; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(Bonder1 -> Bonder2)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } // Fliper(G2) -> Bonder1 if (!rmd.armState[0] && !pBonder1->hasBondClass()) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_Aligner_Fliper) &&!rmd.armState[0] && !pBonder1->hasBondClass()) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pFliper, 0, pBonder1, 1, 2); 0, pBonder1, 1); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_Fliper_Bonder1; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(Fliper(G2) -> Bonder1)..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); } // Aligner -> Fliper(G2) if (!rmd.armState[1]) { if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_LoadPort_Aligner) && !rmd.armState[1]) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pAligner, 0, pFliper, 0); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_Aligner_Fliper; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(Aligner -> Fliper(G2))..."); } CHECK_RUN_ACTIVE_ROBOT_TASK(m_pActiveRobotTask); @@ -826,13 +848,15 @@ // LoadPort -> Aligner for (int s = 0; s < 4; s++) { PortType pt = pLoadPorts[s]->getPortType(); if (!rmd.armState[0] && pLoadPorts[s]->isEnable() if ((m_nContinuousTransferStep == CTStep_Unknow || m_nContinuousTransferStep == CTStep_end) && !rmd.armState[0] && pLoadPorts[s]->isEnable() && (pt == PortType::Loading || pt == PortType::Both) && pLoadPorts[s]->getPortStatus() == PORT_INUSE) { for (int slot = 0; slot < SLOT_MAX; slot++) { m_pActiveRobotTask = createTransferTask_continuous_transfer(pLoadPorts[s], slot, pAligner, 0); if (m_pActiveRobotTask != nullptr) { m_nContinuousTransferStep = CTStep_LoadPort_Aligner; LOGI("<ContinuousTransfer>千传测试,开始搬送任务(LoadPort -> Aligner)..."); pEFEM->setContext(m_pActiveRobotTask->getContext()); goto CT_PORT_GET; SourceCode/Bond/Servo/CMaster.h
@@ -15,8 +15,22 @@ #include "CRobotTask.h" #define CTStep_begin 0 #define CTStep_end 99 #define CTStep_Unknow 0 #define CTStep_LoadPort_Aligner 1 #define CTStep_Aligner_Fliper 2 #define CTStep_Fliper_Bonder1 3 #define CTStep_Bonder1_Bonder2 4 #define CTStep_Bonder2_VacuumBake 5 #define CTStep_VacuumBake_VacuumBake 6 #define CTStep_VacuumBake_BakeCooling 7 #define CTStep_BakeCooling_BakeCooling1 8 #define CTStep_BakeCooling_BakeCooling2 9 #define CTStep_BakeCooling_BakeCooling3 10 #define CTStep_BakeCooling_Measurement 11 #define CTStep_Measurement_LoadPort 12 #define CTStep_begin CTStep_LoadPort_Aligner #define CTStep_end CTStep_Measurement_LoadPort namespace SERVO { enum class MASTERSTATE { SourceCode/Bond/Servo/CVariable.cpp
@@ -125,4 +125,15 @@ return strRet; } __int64 CVariable::getIntValue() { if (m_format == SVFromat::U1 || m_format == SVFromat::U2 || m_format == SVFromat::I2) { return m_nValue; } return 0; } } SourceCode/Bond/Servo/CVariable.h
@@ -29,6 +29,7 @@ void setValue(__int64 value); void setValue(const char* pszValue); std::string getValue(); __int64 getIntValue(); private: unsigned int m_nVarialbeId; SourceCode/Bond/Servo/HsmsPassive.cpp
@@ -103,6 +103,31 @@ } void CHsmsPassive::addVariableValueToItem(ISECS2Item* pParent, SERVO::CVariable* pVariable) { ASSERT(pParent); ASSERT(pVariable); SERVO::SVFromat format = pVariable->getFormat(); switch (format) { case SERVO::SVFromat::U1: pParent->addU1Item((unsigned char)pVariable->getIntValue(), "SV"); break; case SERVO::SVFromat::U2: pParent->addU2Item((unsigned char)pVariable->getIntValue(), "SV"); break; case SERVO::SVFromat::I2: pParent->addI2Item((unsigned char)pVariable->getIntValue(), "SV"); break; case SERVO::SVFromat::A20: case SERVO::SVFromat::A50: pParent->addItem(pVariable->getValue().c_str(), "SV"); default: break; } } void CHsmsPassive::linkEventReport(unsigned int CEID, unsigned int RPTID) { SERVO::CCollectionEvent* pEvent = getEvent(CEID); @@ -536,6 +561,9 @@ // S1F1 replyAreYouThere(pMessage); } else if (nStream == 1 && pHeader->function == 3) { replySelectedEquipmentStatusData(pMessage); } else if (nStream == 1 && pHeader->function == 13) { replyEstablishCommunications(pMessage); } @@ -902,6 +930,45 @@ return 0; } int CHsmsPassive::replySelectedEquipmentStatusData(IMessage* pRecv) { if (m_pPassive == NULL || STATE::SELECTED != m_pPassive->getState()) { return ER_NOTSELECT; } IMessage* pMessage = NULL; HSMS_Create1Message(pMessage, m_nSessionId, 1, 4, pRecv->getHeader()->systemBytes); ASSERT(pMessage); unsigned char SVU1 = 0; unsigned int SVID = 0; ISECS2Item* pBody = pRecv->getBody(); if (pBody == nullptr || pBody->getType() != SITYPE::L) { pMessage->getBody()->addU1Item(SVU1, "SV"); goto MYREPLY; } if (!pBody->getSubItemU4(0, SVID)) { pMessage->getBody()->addU1Item(SVU1, "SV"); goto MYREPLY; } SERVO::CVariable* pVariable = getVariable(SVID); if (pVariable == nullptr) { pMessage->getBody()->addU1Item(SVU1, "SV"); goto MYREPLY; } addVariableValueToItem(pMessage->getBody(), pVariable); MYREPLY: m_pPassive->sendMessage(pMessage); LOGI("<HSMS>[SECS Msg SEND]%s", pMessage->toString()); HSMS_Destroy1Message(pMessage); return 0; } // S2F13 int CHsmsPassive::replyEquipmentConstantRequest(IMessage* pRecv) { SourceCode/Bond/Servo/HsmsPassive.h
@@ -115,6 +115,9 @@ /* 设置软件版本号 最大长度 20 bytes */ void setSoftRev(const char* pszRev); /* 添加变量值到ISECS2Item */ void addVariableValueToItem(ISECS2Item* pParent, SERVO::CVariable* pVariable); // 连接Report void linkEventReport(unsigned int CEID, unsigned int RPTID); @@ -188,6 +191,7 @@ /* reply开头的函数为回复函数 */ int replyAreYouThere(IMessage* pRecv); int replyEstablishCommunications(IMessage* pRecv); int replySelectedEquipmentStatusData(IMessage* pRecv); int replyOnLine(IMessage* pRecv); int replyOffLine(IMessage* pRecv); int replyEquipmentConstantRequest(IMessage* pRecv); SourceCode/Bond/Servo/ServoDlg.cpp
@@ -39,6 +39,8 @@ /* 运行时间定时器 */ #define TIMER_ID_UPDATE_RUMTIME 2 /* Test */ #define TIMER_ID_TEST 3 // 用于应用程序“关于”菜单项的 CAboutDlg 对话框 @@ -332,7 +334,7 @@ // model init theApp.m_model.init(); SetTimer(TIMER_ID_TEST, 1000, nullptr); // 菜单 CMenu menu; @@ -875,6 +877,13 @@ m_pMyStatusbar->setRunTimeText((LPTSTR)(LPCTSTR)strText); } else if(TIMER_ID_TEST == nIDEvent){ static __int64 tttt = 0; tttt++; theApp.m_model.m_hsmsPassive.setVariableValue("CJobSpace", tttt % 10); theApp.m_model.m_hsmsPassive.setVariableValue("PJobSpace", tttt % 5); } CDialogEx::OnTimer(nIDEvent); } SourceCode/Bond/x64/Debug/VariableList.txt
@@ -8,7 +8,6 @@ 701,PreviousProcessState,U1, 800,EFEMPPExecName,A20, 801,EQPPExecName,A20, 1000,CJobSpace,U1, 2000,RbRAxisTorque,I2,机器人R轴扭矩 2001,RbLAxisTorque,l2,机器人L轴扭矩 2002,RbZAxisTorque,l2,机器人Z轴扭矩 @@ -36,3 +35,5 @@ 2024,CCDEnable,U2,"CCD使能:O:开启 1:屏蔽" 2025,FFUParameter,U2,FFU设定值 5000,CarrierID,A20,卡匣ID 5001,CJobSpace,U1,CJ Space 5002,PJobSpace,U1,PJ Space