Chapter 6
Arc Moves
6-6
ni.com
err =
flex_check_move_complete_status
(boardID,
vectorSpace, 0, &moveComplete);
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;
}
}
while
(!moveComplete && !(axisStatus &
NIMC_FOLLOWING_ERROR_BIT) && !(axisStatus &
NIMC_AXIS_OFF_BIT));
//
Exit on move complete/following error/axis off
return
;//
Exit the Application
//////////////////////
//
Error Handling
//
nimcHandleError; //
NIMCCATCHTHIS:
//
Check to see if there were any Modal Errors
if
(csr & NIMC_MODAL_ERROR_MSG){
do
{
//
Get the command ID, resource ID and the
error code of the
//
modal error from the
error stack on the device