User`s manual
http://www.adtechcn.com 89
//************ two-axis interpolation***********//
if(m_bX && m_bY && !m_bZ && !m_bA) // interpolation of axis X
and Y
{
g_CtrlCard.Setup_Speed(1, Startv[0], Speed[0], Add[0]);
g_CtrlCard.Interp_Move2(1, 2, Pulse[0], Pulse[1]);
}
else if(m_bX && !m_bY && m_bZ && !m_bA) // interpolation of axis X
and Z
{
g_CtrlCard.Setup_Speed(1, Startv[0], Speed[0], Add[0]);
g_CtrlCard.Interp_Move2(1, 3, Pulse[0], Pulse[2]);
}
else if(m_bX && !m_bY && !m_bZ && m_bA) // interpolation of axis X and W
{
g_CtrlCard.Setup_Speed(1, Startv[0], Speed[0], Add[0]);
g_CtrlCard.Interp_Move2(1, 4, Pulse[0], Pulse[3]);
}
else if(!m_bX && m_bY && m_bZ && !m_bA) // interpolation of axis Y and Z
{
g_CtrlCard.Setup_Speed(2, Startv[1], Speed[1], Add[1]);
g_CtrlCard.Interp_Move2(2, 3, Pulse[1], Pulse[2]);
}
else if(!m_bX && m_bY && !m_bZ && m_bA) // interpolation of axis Y and W
{
g_CtrlCard.Setup_Speed(2, Startv[1], Speed[1], Add[1]);
g_CtrlCard.Interp_Move2(2, 4, Pulse[1], Pulse[3]);
}
else if(!m_bX && !m_bY && m_bZ && m_bA) // interpolation of axis Z and W
{
g_CtrlCard.Setup_Speed(3, Startv[2], Speed[2], Add[2]);
g_CtrlCard.Interp_Move2(3, 4, Pulse[2], Pulse[3]);
}
//************* three-axis interpolation**************//
else if(m_bX && m_bY && m_bZ && !m_bA) // interpolation of axis X, Y and Z
{
g_CtrlCard.Setup_Speed(1, Startv[0], Speed[0], Add[0]);
g_CtrlCard.Interp_Move3(1, 2, 3, Pulse[0], Pulse[1], Pulse[2]);
}