| | |
| | | // CPageRobotCmd 对话框 |
| | | |
| | | std::map<CString, int> g_deviceSlotCount = { |
| | | {_T("PORT 1"), 1}, |
| | | {_T("PORT 2"), 1}, |
| | | {_T("PORT 3"), 1}, |
| | | {_T("PORT 4"), 1}, |
| | | {_T("PORT 1"), 8}, |
| | | {_T("PORT 2"), 8}, |
| | | {_T("PORT 3"), 8}, |
| | | {_T("PORT 4"), 8}, |
| | | {_T("RB1"), 1}, |
| | | {_T("RB2"), 1}, |
| | | {_T("ALIGN"), 1}, |
| | | {_T("FLIP"), 1}, |
| | | {_T("VAC BAKE"), 2}, |
| | | {_T("VAC BAKE"), 4}, |
| | | {_T("BONDER1"), 2}, |
| | | {_T("BONDER2"), 2}, |
| | | {_T("POST BAKE(COOLING)"), 4}, |
| | | {_T("POST BAKE(COOLING)"), 2}, |
| | | {_T("MEASUREMENT"), 1} |
| | | }; |
| | | |
| | |
| | | { SERVO::RCMD::Get, { true, true, false, true, false, false } }, |
| | | { SERVO::RCMD::Put, { true, false, true, false, true, false } }, |
| | | { SERVO::RCMD::One_Action_Exchange, { true, true, true, true, true, false } }, |
| | | { SERVO::RCMD::Two_Action_Exchange, { true, true, true, true, true, false } }, |
| | | { SERVO::RCMD::Command_Clear, { false, false, false, false, false, false } }, |
| | | { SERVO::RCMD::Batch_get, { false, true, false, true, false, false } }, |
| | | { SERVO::RCMD::Batch_put, { false, false, true, false, true, false } } |
| | | }; |
| | | |
| | | IMPLEMENT_DYNAMIC(CPageRobotCmd, CDialogEx) |
| | |
| | | } |
| | | |
| | | const RCMDFieldMask& mask = it->second; |
| | | if (mask.useArm) param.armNo = static_cast<short>(m_nArmNo); |
| | | if (mask.useArm) param.armNo = static_cast<short>(m_nArmNo + 1); |
| | | if (mask.useGetPos) param.getPosition = static_cast<short>(m_nGetPosition + 1); |
| | | if (mask.usePutPos) param.putPosition = static_cast<short>(m_nPutPosition + 1); |
| | | if (mask.useGetSlot) param.getSlotNo = static_cast<short>(m_nGetSlotNo + 1); |
| | | if (mask.usePutSlot) param.putSlotNo = static_cast<short>(m_nPutSlotNo + 1); |
| | | if (mask.useSubCmd) param.subCmd = static_cast<short>(m_nSubCmd + 1); |
| | | |
| | | if (param.rcmd == static_cast<short>(SERVO::RCMD::Move)) { |
| | | // 特殊命令处理 |
| | | const auto enRcmd = static_cast<SERVO::RCMD>(m_nRcmd + 1); |
| | | if (SERVO::RCMD::Move == enRcmd) { |
| | | if (m_nSubCmd == 0) { |
| | | param.putPosition = 0; |
| | | param.putSlotNo = 0; |
| | |
| | | param.getPosition = 0; |
| | | param.getSlotNo = 0; |
| | | } |
| | | } |
| | | else if (SERVO::RCMD::Batch_get == enRcmd || SERVO::RCMD::Batch_put == enRcmd) { |
| | | param.armNo = ARM_ALL; |
| | | } |
| | | |
| | | return param; |
| | |
| | | |
| | | void CPageRobotCmd::UpdateSlotList(CComboBox* pComboDevice, CComboBox* pComboSlot) |
| | | { |
| | | if (pComboDevice == nullptr || pComboSlot == nullptr) return; |
| | | if (pComboDevice == nullptr || pComboSlot == nullptr) { |
| | | return; |
| | | } |
| | | |
| | | int nSelIndex = pComboDevice->GetCurSel(); |
| | | if (nSelIndex < 0) return; |
| | | if (nSelIndex < 0) { |
| | | return; |
| | | } |
| | | |
| | | CString strDeviceName; |
| | | pComboDevice->GetLBText(nSelIndex, strDeviceName); |