Chapter 15 Scanning
NI-Motion User Manual 15-12 ni.com
CheckError;
}else{
// Check the blend complete status
err =
flex_check_blend_complete_status(b
oardID, 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(10); //Check every 10 ms
}while (!complete && !(axisStatus &
NIMC_FOLLOWING_ERROR_BIT) && !(axisStatus &
NIMC_AXIS_OFF_BIT));
//Exit on move complete/following error/axis off
if( (axisStatus & NIMC_FOLLOWING_ERROR_BIT) ||
(axisStatus & NIMC_AXIS_OFF_BIT) ){
break;//Break out of the for loop because
an axis was killed
}
}