新增导出函数,完善INI文件。
This commit is contained in:
@@ -535,6 +535,7 @@ CSO7_Proto::CSO7_Proto()
|
|||||||
g_machine.s_machine_config.zm_axis._SpeedFast=2000;
|
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._SpeedSlow=800;
|
||||||
g_machine.s_machine_config.zm_axis._speed._short_=0;
|
g_machine.s_machine_config.zm_axis._speed._short_=0;
|
||||||
|
g_machine.MotionType=-1;
|
||||||
|
|
||||||
g_machine.s_status._bIsZMMotionFinished=0;
|
g_machine.s_status._bIsZMMotionFinished=0;
|
||||||
g_machine.x._scale_pos._long_ = 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_MachineType=MACHINE_SO7_CONTROLLER;
|
||||||
g_machine.s_machine_config.motion.m_VideoCardType=0;
|
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;
|
return SSI_STATUS_MOTION_NORMAL;
|
||||||
}
|
}
|
||||||
SSI_STATUS_MOTION CSO7_Proto::so7_motion_reset_controller_parameter()
|
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);
|
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========================
|
//=================VideoCard========================
|
||||||
else if (!_stricmp(token,"SDK3000_SLEEP_COUNT"))
|
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;
|
bPlus=false;
|
||||||
}
|
}
|
||||||
int iRetryCnts(0);
|
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)
|
if (fabs(dR)-fabs(2.0*g_machine.s_machine_config.motion.m_RotaryCirclePulse)>100)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ struct struct_so7_machine
|
|||||||
char _bIsZMMotionFinished;
|
char _bIsZMMotionFinished;
|
||||||
bool _bZMHoming;
|
bool _bZMHoming;
|
||||||
bool _bXYZZMIdle;
|
bool _bXYZZMIdle;
|
||||||
bool _bRMovins;
|
bool _bRMoving;
|
||||||
} s_status;
|
} s_status;
|
||||||
union {
|
union {
|
||||||
struct s_lights_value
|
struct s_lights_value
|
||||||
|
|||||||
+34
-1
@@ -162,6 +162,23 @@ extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_SetPositionR(double dAbsolute
|
|||||||
return SSI_STATUS_MOTION_NORMAL;
|
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)
|
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)
|
if (!g_bOfflineOnly)
|
||||||
{
|
{
|
||||||
@@ -210,3 +227,19 @@ extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_MoveR(char cSpeedGear)
|
|||||||
return SSI_STATUS_MOTION_NORMAL;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+4
-1
@@ -26,9 +26,12 @@ extern "C"
|
|||||||
//Units:Rad
|
//Units:Rad
|
||||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_GetPositionR(double& dPos);
|
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_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_IsHomed(bool &bHomed);
|
||||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsFinished(bool &bFinished);
|
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsFinished(bool &bFinished);
|
||||||
//SpeedGear:1,2,3,4(Faster)
|
//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();
|
||||||
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user