You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
2.8 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include "JelRobotExportManage.h"
JelRobotExportManage::JelRobotExportManage()
{
}
JelRobotExportManage::~JelRobotExportManage()
{
}
bool JelRobotExportManage::Initjel(int serialPort, int baudRate)
{
return m_jelExcecuteObj.InitJelRobot(serialPort, baudRate);
}
bool JelRobotExportManage::MappingCass(int inLoadportId, std::vector<char>& outMappingData)
{
//bool isSuccess = false;
//CRobotCmdInfo cmdInfo;
//cmdInfo.m_RobotCmdType = _RobotCmd_RunToCassMappingPoint;
//cmdInfo.LoadportId = inLoadportId;
//isSuccess = m_jelExcecuteObj.SendRobotCmd(cmdInfo);
//if (!isSuccess)
//{
// return false;
//}
//Sleep(500);
//CRobotCmdInfo cmdInfo;
//cmdInfo.m_RobotCmdType = _RobotCmd_Mapping;
//cmdInfo.LoadportId = inLoadportId;
//m_jelExcecuteObj.SendRobotCmd(cmdInfo);
//if (!isSuccess)
//{
// return false;
//}
//Sleep(1000);
//CRobotCmdInfo cmdInfo;
//cmdInfo.m_RobotCmdType = _RobotCmd_ReadMappingData;
//cmdInfo.LoadportId = inLoadportId;
//isSuccess = m_jelExcecuteObj.SendRobotCmd(cmdInfo);
//if (!isSuccess)
//{
// return false;
//}
////TODO:ÐèÒªÖØÐ¶ÁÈ¡Êý¾Ý
//std::string recvStr = cmdInfo.m_RevStr;
outMappingData = { 1,0,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 0,1,1,1,1 };
return true;
}
bool JelRobotExportManage::SwitchBank(int bankIndex)
{
bool isSuccess = false;
CRobotCmdInfo cmdInfo;
cmdInfo.m_bankIndex = bankIndex;
cmdInfo.m_RobotCmdType = _RObotCmd_Switch_bank;
return m_jelExcecuteObj.SendRobotCmd(cmdInfo);
}
bool JelRobotExportManage::CheckFinderExistWafer()
{
CRobotCmdInfo RobotCmd;
RobotCmd.m_RobotCmdType = _RobotCmd_Check_ARM_EXIST_WAFER;
RobotCmd.m_RobotCmdSendType = _RobotCmdSendType_ImmediateReadFeedback;
RobotCmd.m_armPos = "down";
m_jelExcecuteObj.SendRobotCmd(RobotCmd);
return m_jelExcecuteObj.m_armIsExistWafer;
}
bool JelRobotExportManage::TakeWafer(JudgeCassMappingType cassType, int cassIndex, int slotIndex, eDealWaferType dealWaferType)
{
if (!(cassType == CASS_MAPPING_TYPE_RING || cassType == CASS_MAPPING_TYPE_WAFER))
{
return false;
}
//Çл»bank
SwitchBank(cassType);
//Ñ¡ÔñÁϺÐ
{
CRobotCmdInfo cmdInfo;
cmdInfo.m_cassIndex = cassIndex;
cmdInfo.m_RobotCmdType = _RobotCmd_SelectCass;
return m_jelExcecuteObj.SendRobotCmd(cmdInfo);
}
//Ñ¡Ôñ²ãÊý
{
CRobotCmdInfo cmdInfo;
cmdInfo.m_Slot = slotIndex;
cmdInfo.m_RobotCmdType = _RobotCmd_SelectSlot;
return m_jelExcecuteObj.SendRobotCmd(cmdInfo);
}
//ÒÆ¶¯XÖáµ½µÈ´ýλ
{
CRobotCmdInfo cmdInfo;
cmdInfo.m_bankIndex = cassType;
cmdInfo.m_cassIndex = cassIndex;
cmdInfo.m_dealWaferType = dealWaferType;
cmdInfo.m_RobotCmdType = _RobotCmd_X_Move;
return m_jelExcecuteObj.SendRobotCmd(cmdInfo);
}
//ȡƬ»òÕß·ÅÆ¬
{
CRobotCmdInfo cmdInfo;
cmdInfo.m_bankIndex = cassType;
cmdInfo.m_dealWaferType = dealWaferType;
cmdInfo.m_RobotCmdType = _RobotCmd_TakeWafer;
return m_jelExcecuteObj.SendRobotCmd(cmdInfo);
}
}