*stateIOout – Pointer to a 4096 element array where IO states are returned. Send filled with zeros.
transferMode – 0=auto,1=normal, 2=turbo. If auto, turbo mode is used unless timeout is >= 4, or numScans/scanRate >=4.
Outputs:
*idnum – Returns the local ID or –1 if no LabJack is found.
*scanRate – Returns the actual scan rate, which due to clock resolution is not always exactly the same as the desired scan
rate.
*voltages – Pointer to a 4096 by 4 array where voltage readings are returned. Unused locations are filled with 9999.0.
*stateIOout – Pointer to a 4096 element array where IO states are returned. Unused locations are filled with 9999.0.
*overVoltage – If >0, an overvoltage has been detected on at least one sample of one of the selected analog inputs.
ActiveX Function Differences:
The “channels” and “gains” arrays are replaced with “channelsPacked” and “gainsPacked”. The OCX has a function “FourPack”
(4.39) 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 parameters “demo”, “ledOn”, “disableCal”, “transferMode”, “updateIO”, and “stateIOin”, are replaced by an “optionBits”
parameter. Call the OCX function “BuildOptionBits” (4.38) to determine this parameter.
The “voltages” and “stateIOout” arrays are represented as strings. Floating point data is returned as 13 characters per number
(XXXX.XXXXXXXX) and integers are returned as 10 characters per number (XXXXXXXXXX). Zeros are used for padding where
necessary. The total number of bytes in the “voltages” string is 13*numSamples. The total number of bytes in the “stateIOout” string
is 10*numScans. Note that to avoid a memory leak, these strings should be emptied (set to “”) after each call to AIBurstX.
Declaration (ActiveX):
long AIBurstX ( long FAR* idnum,
long numChannels,
long channelsPacked,
long gainsPacked,
float FAR* scanRate,
long triggerIO,
long triggerState,
long numScans,
long timeout,
BSTR FAR* voltages,
BSTR FAR* stateIOout,
long FAR* overVoltage,
long optionBits)
4.8 - AIStreamStart
Starts a hardware timed continuous acquisition where data is sampled and stored in the LabJack RAM buffer, and can be
simultaneously transferred out of the RAM buffer to the PC application. A call to this function should be followed by periodic calls to
AIStreamRead, and eventually a call to AIStreamClear. Note that while streaming the LabJack U12 is too busy to do anything else.
If any function besides AIStreamRead is called while a stream is in progress, the stream will be stopped.
Execution time for this function is 30 milliseconds or less (typically 24 milliseconds in Windows).
If the LED is enabled (ledOn>0), it will toggle every 40 samples during acquisition and turn on when the stream operation stops.
Declaration:
long AIStreamStart ( long *idnum,
long demo,
long stateIOin,
long updateIO,
long ledOn,
long numChannels,
long *channels,
long *gains,
float *scanRate,
long disableCal,
long reserved1,
long readCount )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs: