timeout – Function timeout value in seconds. 1 is usually a good value.
*voltages – Pointer to a 4096 by 4 array where voltage readings are returned. Send filled with zeros.
*stateIOout – Pointer to a 4096 element array where IO states are returned. Send filled with zeros.
Outputs:
*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.
*reserved – Reserved for future use. Send a pointer to a 0.
*ljScanBacklog – Returns the scan backlog of the LabJack RAM buffer. This is the number of scans remaining in the U12
buffer after this read. If this value is growing from read to read, data is not being read fast enough and the buffer will
eventually overflow. In normal operation this will return 0 almost all the time. The size of the buffer in terms of scans is
4096/numChannels.
*overVoltage – If >0, an overvoltage has been detected on at least one sample of one of the selected analog inputs.
ActiveX Function Differences:
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
AIStreamReadX.
Declaration (ActiveX):
long AIStreamReadX ( long localID,
long numScans,
long timeout,
BSTR FAR* voltages,
BSTR FAR* stateIOout,
long FAR* ljScanBacklog,
long FAR* overVoltage)
4.10 - AIStreamClear
This function stops the continuous acquisition. It should be called once when finished with the stream. The sequence of calls for a
typical stream operation is: AIStreamStart, AIStreamRead, AIStreamRead, AIStreamRead, …, AIStreamClear.
Note that you must pass the actual localID to this function, not the idnum parameter used for most functions. Usually you simply
pass the value returned by the idnum parameter in AIStreamStart.
Declaration:
long AIStreamClear ( long localID )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Input:
localID – Send the local ID from AIStreamStart/Read.
4.11 - AOUpdate
Sets the voltages of the analog outputs. Also controls/reads all 20 digital I/O and the counter.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
If either passed voltage is less than zero, the DLL uses the last set voltage. This provides a way to update 1 output without
changing the other. Note that when the DLL is first loaded, it does not know if the analog outputs have been set, and assumes they
are both the default of 0.0 volts. Similarly, there are situations where the LabJack could reset without the knowledge of the DLL,
and thus the DLL could think the analog outputs are set to a non-zero voltage when in fact they have been reinitialized to 0.0 volts.
Declaration:
long AOUpdate ( long *idnum,
long demo,
long trisD,
long trisIO,
long *stateD,
long *stateIO,