Get Error Description

NI-Motion VI

Get Error Description

Gets an error, command, and/or resource description string.

Details

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
Y
NI SoftMotion Controller for CANopen—Xenus
Y
Description Type (Combined) is the selector for the type of description string to return, as follows:

Value Description
0 Error Only
1 Command Name Only
2 Resource Name Only
3 Combined Description
Resource ID is the resource ID of an axis, vector space, encoder, ADC, DAC, or other resource.
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:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
Error Code is an error code returned from the Read Error Message VI.
Command ID is the command ID of a VI.
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 Description is the output string holding the description requested.
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.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

The Get Error Description VI returns a string description of an error. You can use this VI to generate a string for displaying a VI's name, a resource's name, an error code description, or a complete error description string in response to an error code returned from calling the Read Error Message VI.

Not all input parameters are required for each description type. The following parameters are required to return an accurate description string.

Description Type Error Code   Command ID   Resource ID
Error only required not required not required
VI name only not required required not required
Resource name only not required required required
Combined description   required required required

Because resource IDs are not unique (for example, axis 1 and program 1 both are resource 1), the Command ID is required to set the context and allow this VI to generate the proper resource name string.