diff --git a/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.cpp b/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.cpp index 1be3f1a..af2b58c 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.cpp +++ b/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.cpp @@ -535,6 +535,7 @@ CSO7_Proto::CSO7_Proto() g_machine.s_machine_config.zm_axis._SpeedFast=2000; g_machine.s_machine_config.zm_axis._SpeedSlow=800; g_machine.s_machine_config.zm_axis._speed._short_=0; + g_machine.MotionType=-1; g_machine.s_status._bIsZMMotionFinished=0; g_machine.x._scale_pos._long_ = 0; @@ -614,6 +615,11 @@ SSI_STATUS_MOTION CSO7_Proto::so7_config_para_set_default() g_machine.s_machine_config.motion.m_MachineType=MACHINE_SO7_CONTROLLER; g_machine.s_machine_config.motion.m_VideoCardType=0; + g_machine.s_machine_config.motion.m_RotaryCircleDis=7.2; + g_machine.s_machine_config.motion.m_RotaryCirclePulse=14400; + g_machine.s_machine_config.motion.m_RotaryAxisNO=MACHINE_AXIS_Y; + + return SSI_STATUS_MOTION_NORMAL; } SSI_STATUS_MOTION CSO7_Proto::so7_motion_reset_controller_parameter() @@ -2562,6 +2568,27 @@ SSI_STATUS_MOTION CSO7_Proto::Load_So7_Config() g_machine.s_machine_config.motion.m_DebugOutputEnable=atoi(cTemp); } } + + //=================Rotary======================== + else if (!_stricmp(token,"ROTARY_AXIS_NUMBER")) + { + token = strtok( NULL, seps); + if (token) + { + strcpy(cTemp,token); + g_machine.s_machine_config.motion.m_RotaryAxisNO=atoi(cTemp); + } + } + else if (!_stricmp(token,"ROTARY_CIR_DIS")) + { + token = strtok( NULL, seps); + if (token) + { + strcpy(cTemp,token); + g_machine.s_machine_config.motion.m_RotaryCircleDis=atof(cTemp); + g_machine.s_machine_config.motion.m_RotaryCirclePulse=g_machine.s_machine_config.motion.m_RotaryCircleDis/ROTARY_MMtoScale_RESOLUTION; + } + } //=================VideoCard======================== else if (!_stricmp(token,"SDK3000_SLEEP_COUNT")) { @@ -3368,7 +3395,6 @@ SSI_STATUS_MOTION CSO7_Proto::so7_motion_get_position_R(double & dRad) bPlus=false; } int iRetryCnts(0); - g_machine.s_machine_config.motion.m_RotaryCirclePulse=g_machine.s_machine_config.motion.m_RotaryCircleDis/ROTARY_MMtoScale_RESOLUTION; if (fabs(dR)-fabs(2.0*g_machine.s_machine_config.motion.m_RotaryCirclePulse)>100) { do diff --git a/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.h b/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.h index d79c50a..f8ace27 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.h +++ b/PcDmis/Base/Interfac/Msi/Hsi/SevenOcean/SO7_Proto.h @@ -233,7 +233,7 @@ struct struct_so7_machine char _bIsZMMotionFinished; bool _bZMHoming; bool _bXYZZMIdle; - bool _bRMovins; + bool _bRMoving; } s_status; union { struct s_lights_value diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.cpp b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.cpp index 0f76621..b1ff369 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.cpp +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.cpp @@ -162,6 +162,23 @@ extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_SetPositionR(double dAbsolute return SSI_STATUS_MOTION_NORMAL; } } +//================================================================== +extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_DCCHome() +{ + if (!g_bOfflineOnly) + { + if (!m_pSO7_Proto) + { + m_pSO7_Proto=new CSO7_Proto(); + } + return m_pSO7_Proto->so7_motion_Dcc_Home_R(); + } + else + { + return SSI_STATUS_MOTION_NORMAL; + } +} + //================================================================== extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsHomed(bool &bHomed) { @@ -195,7 +212,7 @@ extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsFinished(bool &bFinished) } } //================================================================== -extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_MoveR(char cSpeedGear) +extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_JogR(char cSpeedGear) { if (!g_bOfflineOnly) { @@ -210,3 +227,19 @@ extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_MoveR(char cSpeedGear) return SSI_STATUS_MOTION_NORMAL; } } +//================================================================== +extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_StopR() +{ + if (!g_bOfflineOnly) + { + if (!m_pSO7_Proto) + { + m_pSO7_Proto=new CSO7_Proto(); + } + return m_pSO7_Proto->_send_cmd_SO7_CMD_STOP_MOVE_XYZ(); + } + else + { + return SSI_STATUS_MOTION_NORMAL; + } +} diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.h b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.h index 88cd9be..e95c4e4 100644 --- a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.h +++ b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/MachineInterfaceDll/MachineInterfaceDll.h @@ -26,9 +26,12 @@ extern "C" //Units:Rad EXP_IMP SSI_STATUS_MOTION WINAPI Motion_GetPositionR(double& dPos); EXP_IMP SSI_STATUS_MOTION WINAPI Motion_SetPositionR(double dAbsolutePos,bool bWait); + + EXP_IMP SSI_STATUS_MOTION WINAPI Motion_DCCHome(); EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsHomed(bool &bHomed); EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsFinished(bool &bFinished); //SpeedGear:1,2,3,4(Faster) - EXP_IMP SSI_STATUS_MOTION WINAPI Motion_MoveR(char cSpeedGear); + EXP_IMP SSI_STATUS_MOTION WINAPI Motion_JogR(char cSpeedGear); + EXP_IMP SSI_STATUS_MOTION WINAPI Motion_StopR(); } \ No newline at end of file diff --git a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo index c9d908b..648196c 100644 Binary files a/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo and b/PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil_VS2010.suo differ