Motion Error HandlerChecks for modal errors on the controller.
| Device Compatibility
|
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller. | |||||||||
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
|
|||||||||
type of dialog (OK msg:1) sets the type of dialog to display.
|
|||||||||
modal error severity (warning) describes how to handle motion control modal errors. | |||||||||
modal error retrieval mode (all) sets how many modal errors to retrieve. | |||||||||
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI. | |||||||||
Error is TRUE if errors exist. | |||||||||
message is the message displayed in the error dialog box. | |||||||||
modal error(s) out is an array of clusters containing modal errors found on the motion controller. | |||||||||
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
|
Using This VI
If the modal error severity input is TRUE (error), modal errors are treated as errors. The first modal error is then passed out through the error out terminal. If this input is FALSE (warning), modal errors are treated as warnings.
When using subVIs that incorporate the error in/error out (or error I/O) structure, place this handler where you want to inform the user of an error, typically at the end of the I/O data path, as the last action of the program. If the error in status is TRUE (a red X), the handler creates a message describing the error and its source.
If the Type of Dialog input is 1 (default), the message is displayed to the user, who can only acknowledge it. If this input is 2, the user can acknowledge the message or abort execution. If the input is 0, no message is displayed; use this value to process the error programmatically.
This VI always checks for modal errors on the controller. If the Modal Error Severity input is TRUE (error), modal errors are treated as errors. The first modal error is then passed out through the error out terminal. If this input is FALSE (warning), modal errors are treated as warnings.
If the Modal Error Retrieval Mode input is TRUE (single), only one modal error is read from the controller's error stack. If this input is FALSE (all), all of the modal errors on the controller are read. Modal errors that are read from the controller are placed into the Modal Error(s) Out output array.