Modal and Non-Modal Errors

NI-Motion VI

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 VI execution. This includes communications failures, parameter value errors, and bad Board ID error.

If a NI-Motion VI encounters a non-modal error, such as those listed above, communication with the controller is impossible, and the command is never sent to or accepted by the controller. The VI reports this error in the error out cluster. When VIs are wired together through the Error In and Error Out terminals, all VIs downstream of a VI causing a non-modal error do not execute. However, the Stop Motion VI always executes, even if another VI encountered an error earlier.

Modal errors, on the other hand, are errors that are not detected at the time of VI execution, because VIs can be buffered in the onboard FIFO. Furthermore, some VIs can be legal at one time and illegal at another, depending on the state or mode of the NI motion controller. This modal error structure also correctly detects errors generated by incorrectly sequenced VIs in onboard programs. Modal errors are placed in the onboard error stack, and you have to explicitly query the controller to check for errors. The Motion Error Handler VI checks the onboard error stack every time you call it.