flex_load_dac

NI-Motion Functions

flex_load_dac

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 DAC

Usage

status = flex_load_dac(u8 boardID, u8 DAC, i16 outputValue, u8 inputVector);

Purpose

Loads an output value to an unmapped DAC resource.

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)
DAC u8 DAC to control
outputValue i16 value sent to the DAC
inputVector u8 source of the data for this function

Parameter Discussion

DAC is the DAC to control. Valid values are NIMC_DAC1 through NIMC_DAC30. On motion controllers that support fewer than thirty axes, configuring non-existent DACs returns error –70006 (NIMC_badResourceIDOrAxisError). Refer to DAC Outputs for DAC resource IDs.

outputValue is the value sent to the DAC. The parameter range is –32,768 to +32,767, corresponding to the full ±10 V output range.

Note  DAC torque limits and offsets do not apply when directly loading a DAC.

inputVector indicates the source of the 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 is used to send a value directly to an unmapped DAC resource. DACs not mapped as servo axis outputs are available for general-purpose analog out applications.

Caution  You must not execute this function on a DAC mapped to an axis. Doing so causes the DAC output to glitch momentarily before returning to axis control.

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 includes considerations you must make when you are using this function with the NI SoftMotion Controller:

If the axis is enabled, the control loop has ownership of the drive command output, and the value that this function sends is ignored.