flex_read_rpm_rtn

NI-Motion Functions

flex_read_rpm_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 Velocity in RPM Return

Usage

status = flex_read_rpm_rtn(u8 boardID, u8 axisOrVectorSpace, f64* RPM);

Purpose

Reads the filtered velocity of an axis or vector space in RPM.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axisOrVectorSpace u8 axis or vector space to read
RPM f64* filtered velocity in RPM

Parameter Discussion

axisOrVectorSpace is the axis or vector space to read. Valid values are NIMC_AXIS1 through NIMC_AXIS30 or NIMC_VECTOR_SPACE1 through NIMC_VECTOR_SPACE15. 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.

RPM is the filtered velocity value in RPM expressed as a double-precision floating point number. For vector spaces, RPM is the filtered vector velocity for the vector move. The sign of RPM indicates direction of motion.

Using This Function

This function returns the axis or vector space filtered velocity in RPM. The filtered velocity is measured based on time elapsed between position changes. To avoid quantization error and jitter in the mechanical system, a filtering algorithm in Load Velocity Filter Parameter is performed with parameters configured.

For vector spaces, this function returns vector velocity, the root-mean-square of the filtered velocities of the individual axes that make up the vector space.

Note  This function requires previously loaded values of either counts per revolution (for servo axes) or steps per revolution (for stepper axes) to operate correctly.
Note  Refer to Function Execution Times for benchmark timing information about your controller.