flex_read_reference_status_rtn

NI-Motion Functions

flex_read_reference_status_rtn

Device Compatibility

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

Read Reference Status Return

Usage

status = flex_read_reference_status_rtn(u8 boardID, u8 axisOrVectorSpace, u16 axisOrVSMap, u16 attribute, u16* value);

Purpose

Reads the currently selected reference status for the given set of axes or coordinate (vector) space.

Tip  Refer to the Remarks section for information about how the behavior of this function differs between controllers.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axisOrVectorSpace u8 axis or vector space selector
axisOrVSMap u16 bitmap of axes or vector spaces to start
attribute u16 type of reference to read
value u16* is the output for attribute.

Parameter Discussion

axisOrVectorSpace can select an axis (NIMC_AXIS1 through NIMC_AXIS30), vector space (NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15), multiple axes (NIMC_AXIS_CTRL), or multiple vector spaces (NIMC_VECTOR_SPACE_CTRL). When simultaneously reading multiple axes or vector spaces, the axisOrVSMap parameter indicates which axes or vector spaces are involved. On motion controllers that support fewer than thirty axes, reading non-existent axes or vector spaces returns error –70006 (NIMC_badResourceIDOrAxisError). Refer to Axes and Vector Spaces for axis and vector space resource IDs.

axisOrVSMap is the bitmap of axes or vector spaces to read. It is only required when multiple axes or vector spaces are selected with the axisOrVectorSpace parameter. NI-Motion ignores additional axes and vector spaces if you select non-existent axes.

attribute is the type of reference on which to read the status.

You can choose the following attributes:

Attribute Number Description
NIMC_HOME_FOUND 0x0 returns True if the last Find Home executed successfully
NIMC_INDEX_FOUND 0x1 returns True if the last Find Index executed successfully
NIMC_CENTER_FOUND 0x2 returns True if the last Find Center executed successfully
NIMC_FORWARD_LIMIT_FOUND 0x3 returns True if the last Find Forward Limit executed successfully
NIMC_REVERSE_LIMIT_FOUND 0x4 returns True if the last Find Reverse Limit executed successfully
NIMC_REFERENCE_FOUND 0x5 returns True is the last Find Reference executed successfully
 NIMC_CURRENT_SEQUENCE_PHASE 0x6 returns the current phase of a sequence that is currently executing
NIMC_FINDING_REFERENCE 0x7 returns True if a Find Reference is currently executing

value is the output for attribute

Using This Function

This function reads the currently selected reference status for the given set of axes or coordinate (vector) space.

If multiple axes in a coordinate space are selected using the axis bitmap, all axes must have successfully found their last reference for NIMC_HOME_FOUND, NIMC_INDEX_FOUND, NIMC_CENTER_FOUND, NIMC_FORWARD_LIMIT_FOUND, NIMC_REVERSE_LIMIT_FOUND, and NIMC_REFERENCE_FOUND to be true.

If any of the selected axes are currently executing a Find Reference, NIMC_FINDING_REFERENCE is true.

Remarks

This section includes information about how the behavior of this function differs among the controllers that support it.

NI SoftMotion Controller Considerations

The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:

You cannot execute this function on multiple axes using the NIMC_AXIS_EX_CTRL resource parameter with axes sixteen through thirty.