nimcReadCoordinateStatus

NI-Motion Functions

nimcReadCoordinateStatus

Device Compatibility

Device Compatibility
7330
N
7340
N
7344
N
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Read Coordinate Status

Usage

status = nimcReadCoordinateStatus(TnimcDeviceHandle deviceHandle, TnimcCoordinateHandle coordinateHandle, TnimcCoordinateStatus attribute, TnimcData* data);

Purpose

Reads the specified execution status information of a coordinate.

Parameters

Name Type Description
deviceHandle TnimcDeviceHandle assigned by Measurement & Automation Explorer (MAX)
coordinateHandle TnimcCoordinateHandle coordinate to read
attribute TnimcCoordinateStatus attribute to read
data TnimcData* the value for the attribute you are reading

Parameter Discussion

coordinateHandle is the coordinate to read with this function. Valid values are coordinates 1 through 15. On motion controllers that support fewer than thirty axes, reading non-existent coordinates returns error –70006 (NIMC_badResourceIDOrAxisError).

attribute is the attribute to read. The following are valid attributes:

  • TnimcCoordinateStatusMoveComplete
  • TnimcCoordinateStatusProfileComplete
  • TnimcCoordinateStatusBlendComplete
  • TnimcCoordinateStatusFollowingErrorExceeded

data is the value for the attribute you are reading in the following structure:

struct{
   i32 longData;
   u8 boolData;
   f64 doubleData;
} TnimcData;

Based on the attribute, the correct member of TnimcData will be returned by the motion controller. The values of the other elements in the structure are undefined.

Read boolData in the TnimcData structure to retrieve the coordinate execution status.

Using This Function

Use this function to read the specified execution status information of a coordinate.

Caution  If this function uses reflective memory, it should not be used for event checking. In this case, only use the information returned by this function for display purposes. Refer to Reflective Memory Functions for more information.

For TnimcCoordinateStatusMoveComplete , TnimcCoordinateStatusProfileComplete, and TnimcCoordinateStatusBlendComplete, TnimcTrue indicates that the move, profile, or blend is complete and TnimcFalse indicates that the move, profile, or blend is incomplete.

For TnimcCoordinateStatusFollowingErrorExceeded, TnimcTrue indicates that one or more of the axes in the coordinate exceeded the programmed following error limit and TnimcFalse indicates that all of the axes in the coordinate have following error below the programmed following error limit.

Note  If you are running a contoured move or slave axis move with a stepper axis, it is possible that the contour velocity or the slave axis geared velocity exceeds the maximum step rate of the controller. In this case, the controller kills the axis and sets the following error status to true. Refer to the Specifications section of your controller user manual for the maximum step rate of your controller.