Modal and Non-Modal Errors

NI-Motion Functions

Modal and Non-Modal Errors

NI-Motion can detect two types of errors—modal and non-modal. Non-modal errors are errors detected at the time of function execution. This includes communications failures, parameter value errors, and bad Board ID error.

Each NI-Motion function returns a status that indicates if the function executed successfully. A non-zero return status indicates that the function failed to execute and the status value returned is the non-modal error code.

Modal errors, on the other hand, are errors that are not detected at the time of function execution. Because functions can be buffered in the onboard FIFO, it is not possible to detect all potential errors at the time of function execution. Furthermore, some functions can be legal at one time and illegal at another, depending on the state or mode of the NI motion controller. All errors of these types are classified as modal errors. This modal error structure also correctly detects errors generated by incorrectly sequenced functions in onboard programs.