flex_enable_camming

NI-Motion Functions

flex_enable_camming

Device Compatibility

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

Enable Camming

Usage

i32 status = flex_enable_camming(i32 boardID, u32 arraySize, NIMC_CAMMING_ENABLE_DATA* dataArray);

Purpose

Enables camming operation for multiple axes.

Parameters

NameTypeDescription
boardID i32 assigned by Measurement & Automation Explorer (MAX)
arraySize u32 number of axes to enable camming on
dataArray NIMC_CAMMING_ENABLE_DATA* array of structures that indicates the axes that are enabled for camming

Parameter Discussion

arraySize is the number of axes, or elements in the dataArray parameter, to enable/disable camming on.

dataArray contains the information to enable/disable for the axes:

  • Set axisIndex to the axis ID to start or stop camming.
  • Set enable to True (1) to enable camming or False (0) to disable camming.
  • Set position to the master position, in user units, where the enable/disable is going to take effect.

The dataArray structure is defined as follows:

struct{
   i32 axisIndex;
   u8 enable;
   f64 position;
} NIMC_CAMMING_ENABLE_DATA;

The valid range of values for the position element of dataArray is –1 or 0 through (master cycle – 1).

Using This Function

Use this function to simultaneously enable or disable a camming operation on multiple axes. The default value for the position element of the Enable Data array is –1, which starts camming immediately. To start camming at a specific master position, set this parameter to a value between 0 and (master cycle – 1).

Refer to the Camming section of the NI-Motion Help for more information about camming operations.