#include "StdAfx.h" #include "CHReviewSetting/Sys_MotorManager.h" CSys_MotorManager::CSys_MotorManager(void) { } CSys_MotorManager::~CSys_MotorManager(void) { } CMotorControlInfo* CSys_MotorManager::GetMotorInfo() { return &m_motorInfo; } const CMotorControlInfo* CSys_MotorManager::GetMotorInfo() const { return &m_motorInfo; } void CSys_MotorManager::SetProfile(CMacroFile& macroFile) { CString strItem = _T(""); // CMotorControlInfo // m_nIndex, m_strName, m_bUseThetaMotor; /////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_INDEX")); macroFile.SetItem(strItem, m_motorInfo.GetIndex()); strItem.Format(_T("SYS_MOTOR_NAME")); macroFile.SetItem(strItem, m_motorInfo.GetName()); strItem.Format(_T("SYS_MOTOR_USE_THETA_MOTOR")); macroFile.SetItem(strItem, m_motorInfo.GetUseThetaMotor()); /////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_TYPE")); macroFile.SetItem(strItem, m_motorInfo.GetControllerType()); strItem.Format(_T("SYS_MOTOR_PORT")); macroFile.SetItem(strItem, m_motorInfo.GetConnectionPort()); strItem.Format(_T("SYS_MOTOR_ORIGIN_DIRECTION")); macroFile.SetItem(strItem, m_motorInfo.GetOriginDirection()); strItem.Format(_T("SYS_MOTOR_AFM_DELAY_TIME")); macroFile.SetItem(strItem, m_motorInfo.GetAfDelayTime()); strItem.Format(_T("SYS_MOTOR_SNAP_DELAY_TIME")); macroFile.SetItem(strItem, m_motorInfo.GetImageDelayTime()); strItem.Format(_T("SYS_MOTOR_WSI_DELAY_TIME")); macroFile.SetItem(strItem, m_motorInfo.GetWsiDelayTime()); strItem.Format(_T("SYS_MOTOR_AXIS_MOVE_COUNT")); macroFile.SetItem(strItem, m_motorInfo.GetMaxAxisMoveCount()); strItem.Format(_T("SYS_MOTOR_START_XPOS")); macroFile.SetItem(strItem, m_motorInfo.GetStartMotorXpos()); strItem.Format(_T("SYS_MOTOR_START_YPOS")); macroFile.SetItem(strItem, m_motorInfo.GetStartMotorYpos()); // motor common addr //m_nAllAutoEnableAddr, m_nAllAutoStopAddr, (WSI, Review, Measure, AllAutoStop)ÀÇ ACK Addr, //////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_AUTO_ENABLE_ADDR")); macroFile.SetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoEnableAddr); strItem.Format(_T("SYS_MOTOR_AUTO_STOP_ADDR")); macroFile.SetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoStopAddr); strItem.Format(_T("SYS_MOTOR_AUTO_STOP_ACK_ADDR")); macroFile.SetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoStopAckAddr); strItem.Format(_T("SYS_MOTOR_AUTO_WSI_GO_ACK_ADDR")); macroFile.SetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoWsiGoAckAddr); strItem.Format(_T("SYS_MOTOR_AUTO_REVIEW_GO_ACK_ADDR")); macroFile.SetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoReviewGoAckAddr); strItem.Format(_T("SYS_MOTOR_AUTO_MEASURE_GO_ACK_ADDR")); macroFile.SetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoMeasureGoAckAddr); //////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_NAME")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_strName); strItem.Format(_T("SYS_MOTOR_ALL_GO_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoReviewGoAddr); strItem.Format(_T("SYS_MOTOR_ALL_MEASURE_GO_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoMeasureGoAddr); strItem.Format(_T("SYS_MOTOR_ALL_WSI_GO_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoWsiGoAddr); strItem.Format(_T("SYS_MOTOR_AFM_DELAY_TIME_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAfDelayTimeAddr); strItem.Format(_T("SYS_MOTOR_SNAP_DELAY_TIME_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nImageDelayTimeAddr); strItem.Format(_T("SYS_MOTOR_WSI_DELAY_TIME_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nWsiDelayTimeAddr); strItem.Format(_T("SYS_MOTOR_USE_THETA_MOTOR_ADDR")); macroFile.SetItem(strItem, m_motorInfo.GetUseThetaMotor()); //strItem.Format(_T("SYS_MOTOR_USE_CHECK_MOTOR_OFFSET")); //macroFile.SetItem(strItem, m_motorInfo..m_bUseCheckMotorOffset); // strItem.Format(_T("SYS_MOTOR_OFFSET_X")); // macroFile.SetItem(strItem, m_motorInfo.m_dOffsetX); // // strItem.Format(_T("SYS_MOTOR_OFFSET_Y")); // macroFile.SetItem(strItem, m_motorInfo.m_dOffsetY); // // strItem.Format(_T("SYS_MOTOR_DIRECTION_X")); // macroFile.SetItem(strItem, m_motorInfo.GetMotorCommonAddr()->); // // strItem.Format(_T("SYS_MOTOR_DIRECTION_Y")); // macroFile.SetItem(strItem, m_motorInfo.m_ndirectionY); CMotorThetaAxisAddr *pThetaMotorAxisAddr = m_motorInfo.GetThetaMotorAxisAddr(); if(pThetaMotorAxisAddr != NULL) { //m_nAxisIdx, m_nGantryIdx, m_lStatus, m_dPosition /////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_MOTOR_INDEX")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nGantryIdx); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_MOTOR_AXIS_INDEX")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nAxisIdx); /////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_THETA_MOTOR_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nManualGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_NAME")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_strName); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_POSITION_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nPositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_STATUS_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nStatusAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MOVE_SPEED_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nMoveSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_ACCEL_TIME_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nAccelTimeAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_JOG_COMMAND_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nJogCommandAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_JOG_SPEED_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nJogSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MAX_JOG_SPEED")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_dMaxJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MIN_JOG_SPEED")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_dMinJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MOVE_POSITION_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_nMovePositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_PLUS_LIMIT_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_dPlusLimitPos); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MINUS_LIMIT_ADDR")); macroFile.SetItem(strItem, pThetaMotorAxisAddr->m_dMinusLimitPos); } // motor gantry addr int nGantryCount = m_motorInfo.GetMotorGantryAddrCount(); strItem.Format(_T("SYS_MOTOR_GANTRY_COUNT")); macroFile.SetItem(strItem, nGantryCount); for(int nGantryIdx = 0; nGantryIdx < nGantryCount; nGantryIdx++) { CMotorGantryAddr *pMotorGantryAddr = m_motorInfo.GetMotorGantryAddr(nGantryIdx); if (pMotorGantryAddr==NULL) continue; // m_nManualGoAckAddr, m_nAutoReviewGoAckAddr, m_nAutoMeasureGoAckAddr, m_nAutoWsiGoAckAddr, m_nGantryIdx /////////////////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_MANUAL_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nManualGoAckAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_AUTO_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nAutoReviewGoAckAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_AUTO_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nAutoMeasureGoAckAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_AUTO_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nAutoWsiGoAckAddr); /////////////////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_INDEX_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nGantryIdx); strItem.Format(_T("SYS_MOTOR_GANTRY_NAME_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_strName); strItem.Format(_T("SYS_MOTOR_GANTRY_MANUAL_GO_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nManualGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_AUTO_GO_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nAutoReviewGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MOVE_COUNT_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nReviewMoveCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_TRIGGER_COUNT_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nReviewTriggerCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_AUTO_GO_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nAutoMeasureGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_MOVE_COUNT_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nMeasureMoveCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_TRIGGER_COUNT_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nMeasureTriggerCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_AUTO_GO_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nAutoWsiGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_MOVE_COUNT_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nWsiMoveCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_TRIGGER_COUNT_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nWsiTriggerCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_SOFTWARE_TRIGGER_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem,pMotorGantryAddr->m_nSoftwareTriggerAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_SOFTWARE_TRIGGER_COMMAND_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem,pMotorGantryAddr->m_nSoftwareTriggerCmdAdr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_IMAGE_SNAP_COMPLETE_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem,pMotorGantryAddr->m_nImageSnapCompleteAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_COLLISION_X_ADDR_%02d"), nGantryIdx); macroFile.SetItem(strItem, pMotorGantryAddr->m_nCollisionXAddr); // motor axis addrf int nAxisCount = pMotorGantryAddr->GetMotorAxisAddrCount(); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_COUNT"), nGantryIdx); macroFile.SetItem(strItem, nAxisCount); for(int nAxisIdx = 0; nAxisIdx < nAxisCount; nAxisIdx++) { CMotorAxisAddr *pMotorAxisAddr = pMotorGantryAddr->GetMotorAxisAddr(nAxisIdx); if (pMotorAxisAddr==NULL) continue; // m_nAxisIdx, m_nGantryIdx, m_dPosition ////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_INDEX_%02d"),nGantryIdx, nAxisIdx); macroFile.SetItem(strItem,pMotorAxisAddr->m_nAxisIdx); strItem.Format( _T("SYS_MOTOR_GANTRY_%02d_GANTRY_INDEX_%02d"),nGantryIdx, nAxisIdx); macroFile.SetItem(strItem,pMotorAxisAddr->m_nGantryIdx); ////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_NAME_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_strName); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_POSITION_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nPositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_STATUS_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nStatusAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MOVE_SPEED_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nMoveSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_ACCEL_TIME_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nAccelTimeAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_JOG_COMMAND_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nJogCommandAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_JOG_SPEED_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nJogSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MAX_JOG_SPEED_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_dMaxJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MIN_JOG_SPEED_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_dMinJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MOVE_POSITION_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nMovePositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MOVE_POSITION_COMMON_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_nMovePositionCommonAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_PLUS_LIMIT_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_dPlusLimitPos); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MINUS_LIMIT_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.SetItem(strItem, pMotorAxisAddr->m_dMinusLimitPos); } } } void CSys_MotorManager::GetProfile(CMacroFile& macroFile) { CString strItem = _T(""); CString strBuffer = _T(""); int nGetItem = 0; BOOL bGetItem = FALSE; /////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_INDEX")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetIndex(nGetItem); strItem.Format(_T("SYS_MOTOR_NAME")); macroFile.GetItem(strItem, strBuffer); m_motorInfo.SetName(strBuffer); strItem.Format(_T("SYS_MOTOR_USE_THETA_MOTOR")); macroFile.GetItem(strItem,bGetItem); m_motorInfo.SetUseThetaMotor(bGetItem); /////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_TYPE")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetControllerType(nGetItem); strItem.Format(_T("SYS_MOTOR_PORT")); macroFile.GetItem(strItem, strBuffer); m_motorInfo.SetConnectionPort(strBuffer); strItem.Format(_T("SYS_MOTOR_ORIGIN_DIRECTION")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetOriginDirection(nGetItem); strItem.Format(_T("SYS_MOTOR_AFM_DELAY_TIME")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetAfDelayTime(nGetItem); strItem.Format(_T("SYS_MOTOR_SNAP_DELAY_TIME")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetImageDelayTime(nGetItem); strItem.Format(_T("SYS_MOTOR_WSI_DELAY_TIME")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetWsiDelayTime(nGetItem); strItem.Format(_T("SYS_MOTOR_AXIS_MOVE_COUNT")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetMaxAxisMoveCount(nGetItem); strItem.Format(_T("SYS_MOTOR_START_XPOS")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetStartMotorXpos(nGetItem); strItem.Format(_T("SYS_MOTOR_START_YPOS")); macroFile.GetItem(strItem, nGetItem); m_motorInfo.SetStartMotorYpos(nGetItem); // motor common addr //////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_AUTO_ENABLE_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoEnableAddr); strItem.Format(_T("SYS_MOTOR_AUTO_STOP_ADDR")); macroFile.GetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoStopAddr); strItem.Format(_T("SYS_MOTOR_AUTO_STOP_ACK_ADDR")); macroFile.GetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoStopAckAddr); strItem.Format(_T("SYS_MOTOR_AUTO_WSI_GO_ACK_ADDR")); macroFile.GetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoWsiGoAckAddr); strItem.Format(_T("SYS_MOTOR_AUTO_REVIEW_GO_ACK_ADDR")); macroFile.GetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoReviewGoAckAddr); strItem.Format(_T("SYS_MOTOR_AUTO_MEASURE_GO_ACK_ADDR")); macroFile.GetItem(strItem,m_motorInfo.GetMotorCommonAddr()->m_nAllAutoMeasureGoAckAddr); //////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_NAME")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_strName); strItem.Format(_T("SYS_MOTOR_ALL_GO_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoReviewGoAddr); strItem.Format(_T("SYS_MOTOR_ALL_MEASURE_GO_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoMeasureGoAddr); strItem.Format(_T("SYS_MOTOR_ALL_WSI_GO_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAllAutoWsiGoAddr); strItem.Format(_T("SYS_MOTOR_AFM_DELAY_TIME_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nAfDelayTimeAddr); strItem.Format(_T("SYS_MOTOR_SNAP_DELAY_TIME_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nImageDelayTimeAddr); strItem.Format(_T("SYS_MOTOR_WSI_DELAY_TIME_ADDR")); macroFile.GetItem(strItem, m_motorInfo.GetMotorCommonAddr()->m_nWsiDelayTimeAddr); strItem.Format(_T("SYS_MOTOR_USE_THETA_MOTOR_ADDR")); macroFile.GetItem(strItem, bGetItem); m_motorInfo.SetUseThetaMotor(bGetItem); // strItem.Format(_T("SYS_MOTOR_USE_CHECK_MOTOR_OFFSET")); // macroFile.GetItem(strItem, m_motorInfo.m_bUseCheckMotorOffset); // // strItem.Format(_T("SYS_MOTOR_OFFSET_X")); // macroFile.GetItem(strItem, m_motorInfo.m_dOffsetX); // // strItem.Format(_T("SYS_MOTOR_OFFSET_Y")); // macroFile.GetItem(strItem, m_motorInfo.m_dOffsetY); // // strItem.Format(_T("SYS_MOTOR_DIRECTION_X")); // macroFile.GetItem(strItem, m_motorInfo.m_ndirectionX); // // strItem.Format(_T("SYS_MOTOR_DIRECTION_Y")); // macroFile.GetItem(strItem, m_motorInfo.m_ndirectionY); // CMotorThetaAxisAddr *pThetaMotorAxisAddr = m_motorInfo.GetThetaMotorAxisAddr(); if(pThetaMotorAxisAddr != NULL) { /////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_MOTOR_INDEX")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nGantryIdx); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_MOTOR_AXIS_INDEX")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nAxisIdx); /////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_THETA_MOTOR_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nManualGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_NAME")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_strName); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_POSITION_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nPositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_STATUS_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nStatusAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MOVE_SPEED_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nMoveSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_ACCEL_TIME_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nAccelTimeAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_JOG_COMMAND_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nJogCommandAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_JOG_SPEED_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nJogSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MAX_JOG_SPEED")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_dMaxJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MIN_JOG_SPEED")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_dMinJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MOVE_POSITION_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_nMovePositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_PLUS_LIMIT_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_dPlusLimitPos); strItem.Format(_T("SYS_MOTOR_GANTRY_THETA_AXIS_MINUS_LIMIT_ADDR")); macroFile.GetItem(strItem, pThetaMotorAxisAddr->m_dMinusLimitPos); } // motor gantry addr int nGantryCount = 0; strItem.Format(_T("SYS_MOTOR_GANTRY_COUNT")); macroFile.GetItem(strItem, nGantryCount); m_motorInfo.SetMotorGantryAddrCount(nGantryCount); for(int nGantryIdx = 0; nGantryIdx < nGantryCount; nGantryIdx++) { CMotorGantryAddr *pMotorGantryAddr = m_motorInfo.GetMotorGantryAddr(nGantryIdx); if (pMotorGantryAddr==NULL) continue; /////////////////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_MANUAL_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nManualGoAckAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_AUTO_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nAutoReviewGoAckAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_AUTO_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nAutoMeasureGoAckAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_AUTO_GO_ACK_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nAutoWsiGoAckAddr); /////////////////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_INDEX_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nGantryIdx); strItem.Format(_T("SYS_MOTOR_GANTRY_NAME_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_strName); strItem.Format(_T("SYS_MOTOR_GANTRY_MANUAL_GO_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nManualGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_AUTO_GO_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nAutoReviewGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MOVE_COUNT_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nReviewMoveCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_TRIGGER_COUNT_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nReviewTriggerCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_AUTO_GO_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nAutoMeasureGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_MOVE_COUNT_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nMeasureMoveCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_MEASURE_TRIGGER_COUNT_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nMeasureTriggerCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_AUTO_GO_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nAutoWsiGoAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_MOVE_COUNT_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nWsiMoveCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_TRIGGER_COUNT_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nWsiTriggerCountAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_SOFTWARE_TRIGGER_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem,pMotorGantryAddr->m_nSoftwareTriggerAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_SOFTWARE_TRIGGER_COMMAND_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem,pMotorGantryAddr->m_nSoftwareTriggerCmdAdr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_IMAGE_SNAP_COMPLETE_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem,pMotorGantryAddr->m_nImageSnapCompleteAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_OTHER_COLLISION_X_ADDR_%02d"), nGantryIdx); macroFile.GetItem(strItem, pMotorGantryAddr->m_nCollisionXAddr); // motor axis addr int nAxisCount = 0; strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_COUNT"), nGantryIdx); macroFile.GetItem(strItem, nAxisCount); pMotorGantryAddr->SetMotorAxisAddrCount(nAxisCount); for(int nAxisIdx = 0; nAxisIdx < nAxisCount; nAxisIdx++) { CMotorAxisAddr *pMotorAxisAddr = pMotorGantryAddr->GetMotorAxisAddr(nAxisIdx); if (pMotorAxisAddr==NULL) continue; ////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_INDEX_%02d"),nGantryIdx, nAxisIdx); macroFile.GetItem(strItem,pMotorAxisAddr->m_nAxisIdx); strItem.Format( _T("SYS_MOTOR_GANTRY_%02d_GANTRY_INDEX_%02d"),nGantryIdx, nAxisIdx); macroFile.GetItem(strItem,pMotorAxisAddr->m_nGantryIdx); ////////////////////////////////////////////////////////////////////////////////////////////// strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_NAME_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_strName); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_POSITION_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nPositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_STATUS_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nStatusAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MOVE_SPEED_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nMoveSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_ACCEL_TIME_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nAccelTimeAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_JOG_COMMAND_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nJogCommandAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_JOG_SPEED_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nJogSpeedAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MAX_JOG_SPEED_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_dMaxJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MIN_JOG_SPEED_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_dMinJogSpeed); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MOVE_POSITION_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nMovePositionAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MOVE_POSITION_COMMON_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_nMovePositionCommonAddr); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_PLUS_LIMIT_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_dPlusLimitPos); strItem.Format(_T("SYS_MOTOR_GANTRY_%02d_AXIS_MINUS_LIMIT_ADDR_%02d"), nGantryIdx, nAxisIdx); macroFile.GetItem(strItem, pMotorAxisAddr->m_dMinusLimitPos); } } }