Skip to main content
Skip table of contents

4.14 - BitsToVolts [U12 Datasheet]

Converts a 12-bit (0-4095) binary value into a LabJack voltage. No hardware communication is involved.

Volts=((2*Bits*Vmax/4096)-Vmax)/Gain where Vmax=10 for SE, 20 for Diff.


long BitsToVolts ( long chnum,
long chgain,
long bits,
float *volts )

Parameter Description:
Returns: LabJack errorcodes or 0 for no error.

  • chnum – Channel index. 0-7=SE, 8-11=Diff.
  • chgain – Gain index. 0=1, 1=2, …, 7=20.
  • bits – Binary value from 0-4095.


  • *volts – Voltage.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.