National Instruments NI-Motion Home Safety Product User Manual


 
Chapter 15 Scanning
© National Instruments Corporation 15-13 NI-Motion User Manual
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
flex_read_error_msg_rtn(boardID,&commandI
D,&resourceID, &errorCode);
nimcDisplayError(errorCode,commandID,res
ourceID);
//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
}
User-Defined Scanning Path
You can create a custom path that covers the maximum scan area in the
shortest time using the contoured move feature of the NI motion controller.
This way you bypass the trajectory generator and send exact positions to
the motion controller. The controller then interpolates the distance between
your given points using a cubic spline algorithm. Figure 15-7 shows the
scanning path used in the example that follows the figure.