
4.5 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.
Declaration:
long __cdecl AIStreamClear ( long localID )
Parameter Description:
Returns:
LabJack errorcodes or 0 for no error.
Input:
•
localID –
Send the local ID from AIStreamStart/Read.
4.6 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.
Declaration:
long __cdecl AOUpdate (
long *idnum,
long
demo,
long
trisD,
long
trisIO,
long
*stateD,
long
*stateIO,
long
updateDigital,
long
resetCounter,
unsigned
long
*count,
float
analogOut0,
float
analogOut1)
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.
•
trisD –
Directions for D0-D15. 0=Input, 1=Output.
•
trisIO –
Directions for IO0-IO3. 0=Input, 1=Output.
•
*stateD –
Output states for D0-D15.
•
*stateIO –
Output states for IO0-IO3.
•
updateDigital –
If >0, tris and state values will be written. Otherwise, just a read
is performed.
•
resetCounter –
If >0, the counter is reset to zero after being read.
•
analogOut0 –
Voltage from 0.0 to 5.0 for AO0.
•
analogOut1 –
Voltage from 0.0 to 5.0 for AO1.
Outputs:
•
*idnum –
Returns the local ID or –1 if no LabJack is found.
•
*stateD –
States of D0-D15.
•
*stateIO –
States of IO0-IO3.
•
*count –
Current value of the 32-bit counter (CNT). This value is read before the
counter is reset.