Chapter 6
Arc Moves
6-12
ni.com
//
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;
//
Check the following error/axis off status for
axis 3
err =
flex_read_axis_status_rtn
(boardID,
NIMC_AXIS3, &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
{