
•
*channels –
Pointer to an array of channel commands with at least
numChannels elements. Each channel command is 0-7 for single-ended, or 8-11
for differential.
•
*gains –
Pointer to an array of gain commands with at least numChannels
elements. Gain commands are 0=1, 1=2, …, 7=20. This amplification is only
available for differential channels.
•
disableCal –
If >0, voltages returned will be raw readings that are not corrected
using calibration constants.
•
*voltages –
Pointer to an array where voltage readings are returned. Send a 4-
element array of zeros.
Outputs:
•
*idnum –
Returns the local ID or –1 if no LabJack is found.
•
*overVoltage –
If >0, an overvoltage has been detected on one of the selected
analog inputs.
•
*voltages –
Pointer to an array where numChannels voltage readings are
returned.
ActiveX Function Differences:
The “channels” and “gains” arrays are replaced with “channelsPacked” and “gainsPacked”. The
OCX has a function “FourPack” which will convert 4 elements to a packed value. The packed
value is determined as: element[0] + (element[1] * 2^8) + (element[2] * 2^16) + (element[3] *
2^24).
The “voltages” array is replaced with 4 individual parameters.
Declaration (ActiveX):
long AISampleX (
long FAR* idnum,
long demo,
long FAR* stateIO,
long updateIO,
long ledOn,
long numChannels,
long channelsPacked,
long gainsPacked,
long disableCal,
long FAR* overVoltage,
float FAR* voltageA,
float FAR* voltageB,
float FAR* voltageC,
float FAR* voltageD )
4.2 AIBurst
Reads a specified number of scans (up to 4096) at a specified scan rate (up to 8192 Hz) from
1,2, or 4 analog inputs. First, data is acquired and stored in the LabJack’s 4096 sample RAM
buffer. Then, the data is transferred to the PC.
If the LED is enabled (ledOn>0), it will blink at about 4 Hz while waiting for a trigger, turn off
during acquisition, blink at about 8 Hz while transferring data to the PC, and turn on when done.
Declaration:
long __cdecl AIBurst (
long *idnum,
long
demo,
long
stateIOin,