National Instruments NI-Motion Home Safety Product User Manual


 
Chapter 8 Reference Moves
NI-Motion User Manual 8-6 ni.com
///////////////////////////////////////////////////////
/////////////
// Error Handling
//
nimcHandleError;
// 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
flex_read_error_msg_rtn(boardID,&commandID,&reso
urceID, &errorCode);
nimcDisplayError(errorCode,commandID,resourceID)
;
//Read the communication status register
flex_read_csr_rtn(boardID,&csr);
}while(csr & NIMC_MODAL_ERROR_MSG);
}
else// Display regular error
nimcDisplayError(err,0,0);
return;// Exit the Application
}