flex_load_torque_lim

NI-Motion Functions

flex_load_torque_lim

Device Compatibility

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

Load Torque Limit

Usage

status = flex_load_torque_lim(u8 boardID, u8 axis, i16 primaryPositiveLimit, i16 primaryNegativeLimit, i16 secondaryPositiveLimit, i16 secondaryNegativeLimit, u8 inputVector);

Purpose

Loads primary and secondary DAC torque limits for an axis.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axis u8 axis to control
primaryPositiveLimit i16 positive limit for primary DAC
primaryNegativeLimit i16 negative limit for primary DAC
secondaryPositiveLimit i16 positive limit for optional secondary DAC
secondaryNegativeLimit i16 negative limit for optional secondary DAC
inputVector u8 source of the data for this function

Parameter Discussion

axis is the axis to control. Valid values are NIMC_AXIS1 through NIMC_AXIS30. On motion controllers that support fewer than thirty axes, configuring non-existent axes returns error –70006 (NIMC_badResourceIDOrAxisError). Refer to Axes for axis resource IDs.

primaryPositiveLimit is the primary DAC positive torque (or velocity) limit. The range is –32,768 to + 32,767 (–10 V to +10 V) with a default value of 32,767 (+10 V).

primaryNegativeLimit is the primary DAC negative torque (or velocity) limit. The range is –32,768 to + 32,767 (–10 V to +10 V) with a default value of –32,768 (-10 V).

Note  The positive limit cannot be less than the negative limit.

secondaryPositiveLimit is the optional secondary DAC positive torque (or velocity) limit. The range is –32,768 to + 32,767 (–10 V to +10 V) with a default value of 32,767 (+10 V).

secondaryNegativeLimit is the optional secondary DAC negative torque (or velocity) limit. The range is –32,768 to + 32,767 (–10 V to +10 V) with a default value of –32,768 (–10 V).

Note  The positive limit cannot be less than the negative limit.

inputVector contains the primary positive, primary negative, secondary positive, and secondary negative parameters that are the source of data for this function.

Available input vectors include immediate (0xFF), variable (0x01 through 0x78), or indirect variable (0x81 through 0xF8). Refer to Input and Return Vectors for more detailed information.

Using This Function

This function allows you to limit the output range of the DAC output(s) on the selected servo axis. This function has no effect on stepper axes or independent DAC outputs that are not mapped to an axis.

By limiting the output range of a DAC, it is possible to control the maximum torque (when connected to a torque block servo amplifier) or velocity (when connected to a velocity block servo amplifier). This function is also helpful when interfacing to amplifiers that do not support the standard ±10 V command range.

Primary and secondary DACs can have different limits, and the positive and negative limits can be both positive or both negative to limit the DAC output to a unipolar range. The only restriction is that a positive DAC limit cannot be less than the negative DAC limit.

You also can set a torque offset on the primary and secondary DAC outputs. Refer to the Load Torque Offset function for more information.

Example

Calling the Load Torque Limit function with the following parameters limits the output ranges of the primary and secondary DACs mapped to the axis, as shown in the following figure.

   primaryPositiveLimit = 16,383
   primaryNegativeLimit = –16,384
   secondaryPositiveLimit = 8,191
   secondaryNegativeLimit = –32,768

The result of this function call is to limit the primary DAC to only half its range in either direction, or ±5 V. The secondary DAC can only travel over a quarter of its positive range but has its full negative range.