long channelsPacked,
long gainsPacked,
long disableCal,
long FAR* overVoltage,
float FAR* voltageA,
float FAR* voltageB,
float FAR* voltageC,
float FAR* voltageD )
4.7 - 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 rapidly while
transferring data to the PC, and turn on when done.
The execution time of this function, in milliseconds, depends on transfermode and can be estimated with the below formulas. The
actual number of samples collected and transferred by the LabJack is the smallest power of 2 from 64 to 4096 which is at least as
big as numScans*numChannels. This is represented below as numSamplesActual.
Normal => 30+(1000*numSamplesActual/sampleRate)+(2.5*numSamplesActual)
Turbo => 30+(1000*numSamplesActual/sampleRate)+(0.4*numSamplesActual)
Declaration:
long AIBurst ( long *idnum,
long demo,
long stateIOin,
long updateIO,
long ledOn,
long numChannels,
long *channels,
long *gains,
float *scanRate,
long disableCal,
long triggerIO,
long triggerState,
long numScans,
long timeout,
float (*voltages)[4],
long *stateIOout,
long *overVoltage,
long transferMode )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
*idnum – Local ID, serial number, or -1 for first found.
demo – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack.
stateIOin – Output states for IO0-IO3. Has no effect if IO are configured as inputs, so a different function must be used to
configure as output.
updateIO – If >0, state values will be written. Otherwise, just a read is performed.
ledOn – If >0, the LabJack LED is turned on.
numChannels – Number of analog input channels to read (1,2, or 4).
*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.
*scanRate – Scans acquired per second. A scan is a reading from every channel (1,2, or 4). The sample rate (scanRate *
numChannels) must be between 400 and 8192.
disableCal – If >0, voltages returned will be raw readings that are not corrected using calibration constants.
triggerIO – The IO port to trigger on (0=none, 1=IO0, or 2=IO1).
triggerState – If >0, the acquisition will be triggered when the selected IO port reads high.
numScans – Number of scans which will be returned. Minimum is 1. Maximum numSamples is 4096, where numSamples
is numScans * numChannels.
timeout – This function will return immediately with a timeout error if it does not receive a scan within this number of
seconds. Timeouts of 3 seconds or less are generally recommended to keep the U12 in turbo transfer mode.
*voltages – Pointer to a 4096 by 4 array where voltage readings are returned. Send filled with zeros.