« Close

Datasheets and User Guides

App Notes

Software & Driver

 

4.38 - BuildOptionBits (ActiveX only)

This function is only in the OCX, and is used to build the optionBits parameter for
AIBurst and AIStreamStart.

The parameter optionBits is made up of the following bits and can often just be set to 2 (normal operation with the LED on):

bit 0     => demo
bit 1     => ledOn
bit 2     => disableCal
bits 3, 4 => transferMode
bit 5     => updateIO
bit 6     => stateIOin(0)
bit 7     => stateIOin(1)
bit 8     => stateIOin(2)
bit 9     => stateIOin(3)

Declaration:

long BuildOptionBits (    long demo,
                          long ledOn,
                          long disableCal,
                          long transferMode,
                          long updateIO,
                          long stateIOin )

Parameter Description:
Returns: optionBits
Inputs:

  • demo – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
  • ledOn – If >0, the LabJack LED is turned on.
  • disableCal – If >0, voltages returned will be raw readings that are not corrected using calibration constants.
  • transferMode – Set to 0 (automatic).
  • updateIO – If >0, state values will be written. Otherwise, just a read is performed.
  • *stateIOin – Output states for IO0-IO3.