新增定速运动功能。
This commit is contained in:
@@ -493,6 +493,16 @@ CSO7_Proto::CSO7_Proto()
|
||||
g_machine.s_machine_config.z_axis._neg_working_limit=0;
|
||||
g_machine.s_machine_config.z_axis._pos_working_limit=200;
|
||||
|
||||
g_machine.s_machine_config.x_axis._MoveToSpeed[0]=0.0;
|
||||
g_machine.s_machine_config.x_axis._MoveToSpeed[1]=0.0;
|
||||
g_machine.s_machine_config.x_axis._MotionSpeedScale=1.0;
|
||||
g_machine.s_machine_config.y_axis._MoveToSpeed[0]=0.0;
|
||||
g_machine.s_machine_config.y_axis._MoveToSpeed[1]=0.0;
|
||||
g_machine.s_machine_config.y_axis._MotionSpeedScale=1.0;
|
||||
g_machine.s_machine_config.z_axis._MoveToSpeed[0]=0.0;
|
||||
g_machine.s_machine_config.z_axis._MoveToSpeed[1]=0.0;
|
||||
g_machine.s_machine_config.z_axis._MotionSpeedScale=1.0;
|
||||
|
||||
g_machine.s_machine_config.zm_axis._ComPort=1;
|
||||
g_machine.s_machine_config.zm_axis._StartDegree=0.0;
|
||||
g_machine.s_machine_config.zm_axis._EndDegree=0.0;
|
||||
@@ -504,6 +514,8 @@ CSO7_Proto::CSO7_Proto()
|
||||
g_machine.s_machine_config.zm_axis._SpeedSlow=800;
|
||||
g_machine.s_machine_config.zm_axis._speed._short_=0;
|
||||
|
||||
|
||||
|
||||
g_machine.s_machine_config.motion._EnCloseLoop=FALSE;
|
||||
g_machine.s_machine_config.motion._RetryTimes=5;
|
||||
g_machine.s_machine_config.motion._ShiftPositionX=0.0;
|
||||
@@ -607,6 +619,48 @@ SSI_STATUS_MOTION CSO7_Proto::Save_SevenOcean_Inifile(CString path_and_fileName)
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
|
||||
outBuff="MOVETOSPEED_FAST_X=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.x_axis._MoveToSpeed[0]);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
outBuff="MOVETOSPEED_SLOW_X=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.x_axis._MoveToSpeed[1]);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
outBuff="MOVETOSPEED_SCALE_X=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.x_axis._MotionSpeedScale);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
fprintf(m_pOutFile,"%s", ";\n");
|
||||
|
||||
outBuff="MOVETOSPEED_FAST_Y=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.y_axis._MoveToSpeed[0]);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
outBuff="MOVETOSPEED_SLOW_Y=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.y_axis._MoveToSpeed[1]);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
outBuff="MOVETOSPEED_SCALE_Y=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.y_axis._MotionSpeedScale);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
fprintf(m_pOutFile,"%s", ";\n");
|
||||
|
||||
outBuff="MOVETOSPEED_FAST_Z=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.z_axis._MoveToSpeed[0]);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
outBuff="MOVETOSPEED_SLOW_Z=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.z_axis._MoveToSpeed[1]);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
outBuff="MOVETOSPEED_SCALE_Z=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%9.8f", g_machine.s_machine_config.z_axis._MotionSpeedScale);
|
||||
fprintf(m_pOutFile, "\n");
|
||||
fprintf(m_pOutFile,"%s", ";\n");
|
||||
|
||||
outBuff="SPEED_BASE_X1=";
|
||||
fprintf(m_pOutFile,"%s", outBuff);
|
||||
fprintf(m_pOutFile,"%d", (byte)g_machine.s_machine_config.x_axis._speed_base[0]);
|
||||
@@ -1059,8 +1113,89 @@ SSI_STATUS_MOTION CSO7_Proto::Load_SevenOcean_Inifile(CString cso7IniFile)
|
||||
if((szLine[0]!=';')&&(strlen(szLine)>2))
|
||||
{
|
||||
token = strtok(szLine,seps);
|
||||
if(!_stricmp(token,"MOVETOSPEED_FAST_X"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.x_axis._MoveToSpeed[0]=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_SLOW_X"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.x_axis._MoveToSpeed[1]=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_SCALE_X"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.x_axis._MotionSpeedScale=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_FAST_Y"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.y_axis._MoveToSpeed[0]=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_SLOW_Y"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.y_axis._MoveToSpeed[1]=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_SCALE_Y"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.y_axis._MotionSpeedScale=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_FAST_Z"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.z_axis._MoveToSpeed[0]=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_SLOW_Z"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.z_axis._MoveToSpeed[1]=atof(cTemp);
|
||||
}
|
||||
}
|
||||
else if(!_stricmp(token,"MOVETOSPEED_SCALE_Z"))
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
{
|
||||
strcpy(cTemp,token);
|
||||
g_machine.s_machine_config.z_axis._MotionSpeedScale=atof(cTemp);
|
||||
}
|
||||
}
|
||||
// X1
|
||||
if(!_stricmp(token,"SPEED_BASE_X1"))//SPEED_BASE_X1
|
||||
else if(!_stricmp(token,"SPEED_BASE_X1"))//SPEED_BASE_X1
|
||||
{
|
||||
token = strtok( NULL, seps);
|
||||
if (token)
|
||||
|
||||
Reference in New Issue
Block a user