National Instruments NI-Motion User Manual

Page 279

Advertising
background image

Chapter 16

Rotating Knife

NI-Motion User Manual

16-8

ni.com

err = flex_start(boardID, slaveAxis, 0);

CheckError;

}// For loop

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,&commandID,

&resourceID, &errorCode);

nimcDisplayError(errorCode,commandID,resou

rceID);

//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

}

Advertising