新增光栅尺、限位位置设置。
This commit is contained in:
+1
-92
@@ -215,99 +215,8 @@ EXP_IMP SSI_STATUS_MOTION Motion_Jog(EMACHINE_AXIS cAxis,char cSpeedGear)
|
||||
{
|
||||
if (m_pSO7_Proto)
|
||||
{
|
||||
if (abs(cSpeedGear)>4)
|
||||
{
|
||||
if (cSpeedGear>0)
|
||||
{
|
||||
cSpeedGear=4;
|
||||
}
|
||||
else
|
||||
{
|
||||
cSpeedGear=-4;
|
||||
}
|
||||
}
|
||||
if (abs(cSpeedGear)<1)
|
||||
{
|
||||
cSpeedGear=1;
|
||||
}
|
||||
ActiveAxis=cAxis;
|
||||
switch (cAxis)
|
||||
{
|
||||
case MACHINE_AXIS_X:
|
||||
{
|
||||
return m_pSO7_Proto->_send_cmd_SO7_CMD_MOVE_X(cSpeedGear);
|
||||
break;
|
||||
}
|
||||
case MACHINE_AXIS_Y:
|
||||
{
|
||||
return m_pSO7_Proto->_send_cmd_SO7_CMD_MOVE_Y(cSpeedGear);
|
||||
break;
|
||||
}
|
||||
case MACHINE_AXIS_Z:
|
||||
{
|
||||
return m_pSO7_Proto->_send_cmd_SO7_CMD_MOVE_Z(cSpeedGear);
|
||||
break;
|
||||
}
|
||||
case MACHINE_AXIS_ZOOM:
|
||||
{
|
||||
if (abs(cSpeedGear)==4)
|
||||
{
|
||||
if (cSpeedGear>0)
|
||||
{
|
||||
cSpeedGear=5;
|
||||
}
|
||||
else
|
||||
{
|
||||
cSpeedGear=-5;
|
||||
}
|
||||
}
|
||||
else if (abs(cSpeedGear)==3)
|
||||
{
|
||||
if (cSpeedGear>0)
|
||||
{
|
||||
cSpeedGear=5;
|
||||
}
|
||||
else
|
||||
{
|
||||
cSpeedGear=-5;
|
||||
}
|
||||
}
|
||||
else if (abs(cSpeedGear)==2)
|
||||
{
|
||||
if (cSpeedGear>0)
|
||||
{
|
||||
cSpeedGear=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cSpeedGear=-1;
|
||||
}
|
||||
}
|
||||
else if (abs(cSpeedGear)==1)
|
||||
{
|
||||
if (cSpeedGear>0)
|
||||
{
|
||||
cSpeedGear=2;
|
||||
}
|
||||
else
|
||||
{
|
||||
cSpeedGear=-2;
|
||||
}
|
||||
}
|
||||
return m_pSO7_Proto->_send_cmd_SO7_CMD_MOVE_ZM(cSpeedGear);
|
||||
break;
|
||||
}
|
||||
case MACHINE_AXIS_R:
|
||||
{
|
||||
return m_pSO7_Proto->so7_motion_move_R(cSpeedGear);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return SSI_STATUS_MOTION_INVALID_PARAMETERS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return m_pSO7_Proto->so7_motion_jog(cAxis,cSpeedGear);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user