EasyManua.ls Logo

LabJack U12 - 4.14 - BitsToVolts; 4.15 - VoltsToBits; 4.16 - Counter

LabJack U12
61 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
long FAR* data5 )
4.14 - BitsToVolts
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.
Declaration:
long BitsToVolts ( long chnum,
long chgain,
long bits,
float *volts )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
chnumChannel index. 0-7=SE, 8-11=Diff.
chgain – Gain index. 0=1, 1=2, , 7=20.
bits Binary value from 0-4095.
Outputs:
*volts Voltage.
4.15 - VoltsToBits
Converts a voltage to it’s 12-bit (0-4095) binary representation. No hardware communication is involved.
Bits=(4096*((Volts*Gain)+Vmax))/(2*Vmax) where Vmax=10 for SE, 20 for Diff.
Declaration:
long VoltsToBits ( long chnum,
long chgain,
float volts,
long *bits )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
chnumChannel index. 0-7=SE, 8-11=Diff.
chgain – Gain index. 0=1, 1=2, , 7=20.
voltsVoltage.
Outputs:
*bitsBinary value from 0-4095.
4.16 - Counter
Controls and reads the counter. The counter is disabled if the watchdog timer is enabled.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
Declaration:
long Counter ( long *idnum,
long demo,
long *stateD,
long *stateIO,
long resetCounter,
long enableSTB,
unsigned long *count )
29

Other manuals for LabJack U12