DAC - Analog outputs

The DAC block, or its equivalent C++ routines, is used to apply a given value to one of the Digital-to-Analog Converter (DAC) channels of the B-Box controllers. The table below summarizes the hardware specifications, including location, channel count, update rate, resolution, and output voltage range. While these parameters establish the system’s operational capabilities, detailed information regarding DAC outputs is available in the associated product datasheet.

Comparative information about imperix’s programmable controllers is also given in PN250.

Param.B-Box 4B-Box 3B-Box microB-Board 3 PRO
Location and count– 24x RJ45 ports– 4x SMA connectorUnavailableUnavailable
Update rate– Up to 500 ksps– 50 kspsN/AN/A
Resolution– 12 bits– 16 bitsN/AN/A
Voltage range– ±10 V– ±5 VN/AN/A
Product datasheetB-Box 4B-Box 3B-Box microB-Board 3 PRO

Signal specification

The input signal sets the analog output voltage. The signal saturates at hardware limits: ±5V for B-Box RCP 3.0 and ±10V for B-Box 4.

Standard parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • Analog output channel(s) (vectorizable) selects a physical analog output channel.

PLECS block

Signal specification

The input signal sets the analog output voltage. The signal saturates at hardware limits: ±5V for B-Box RCP 3.0 and ±10V for B-Box 4.

Analog output PLECS block

Standard parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • Analog output channel(s) (vectorizable) selects a physical analog output channel(s).

C++ functions

void Dac_SetVoltage(unsigned int output, float voltage, unsigned int device=0);Code language: C++ (cpp)

Sets the value of an analog output in volts.

Parameters

  • output: the analog output channel (0 to 3)
  • voltage: the value to output in volts (-5V to 5V, saturated if over- / under-voltage)
  • device: the id of the B-Box/B-Board to address (optional, used in multi-device configuration only)
void Dac_SetValue(unsigned int output, unsigned int value, unsigned int device=0);Code language: C++ (cpp)

Sets the value of an analog output using a raw 16-bit value.

value=0 → output = -5V, value=65535 → output = 5V

Parameters

  • output: the analog output channel (0 to 3)
  • value: the raw 16-bit value, saturated if overflow
  • device: the id of the B-Box/B-Board to address (optional, used in multi-device configuration only)