Chapter 9 Blending Moves
© National Instruments Corporation 9-9 NI-Motion User Manual
{
err = csr & NIMC_MODAL_ERROR_MSG;
CheckError;
}
Sleep(50); //Check every 50 ms
}while (!complete && !(axisStatus &
NIMC_FOLLOWING_ERROR_BIT) && !(axisStatus &
NIMC_AXIS_OFF_BIT)); //Exit on move
//complete/following error/axis off
// Load the final straightline segments to position 0, 0
err = flex_load_vs_pos(boardID, vectorSpace, 0, 0, 0,
0xFF);
CheckError;
// Wait for move to complete because this is the final
segment
do
{
axisStatus = 0;
// Check the move complete status
err = flex_check_move_complete_status(boardID,
vectorSpace, 0, &complete);
CheckError;
// Check the following error/axis off status for axis
1
err = flex_read_axis_status_rtn(boardID,
NIMC_AXIS1, &status);
CheckError;
axisStatus |= status;
// Check the following error/axis off status for axis
2
err = flex_read_axis_status_rtn(boardID,
NIMC_AXIS2, &status);
CheckError;
axisStatus |= status;
//Read the communication status register and check
the modal //errors
err = flex_read_csr_rtn(boardID, &csr);
CheckError;
//Check the modal errors
if (csr & NIMC_MODAL_ERROR_MSG)
{
err = csr & NIMC_MODAL_ERROR_MSG;
CheckError;
}
Sleep(50); //Check every 50 ms
}while (!complete && !(axisStatus &
NIMC_FOLLOWING_ERROR_BIT) && !(axisStatus &