Go() can be called repeatedly to repeat the current list of requests. Go() does not clear the list of requests. Rather, after a call to
Go(), the first subsequent AddRequest() call to a particular device will clear the previous list of requests on that particular device
only.
Note that for a single Go() or GoOne() call, the order of execution of the request list cannot be predicted. Since the driver does
internal optimization, it is quite likely not the same as the order of AddRequest() function calls. One thing that is known, is that
configuration settings like ranges, stream settings, and such, will be done before the actual acquisition or setting of outputs.
Declaration:
LJ_ERROR _stdcall Go()
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
None
Outputs:
None
4.2.7 - GoOne()
After using AddRequest() to make an internal list of requests to perform, call GoOne() to actually perform the requests. This
function causes all requests on one particular LabJack to be performed. After calling GoOne(), call GetResult() or similar to
retrieve any returned data or errors.
GoOne() can be called repeatedly to repeat the current list of requests. GoOne() does not clear the list of requests. Rather, after a
particular device has performed a GoOne(), the first subsequent AddRequest() call to that device will clear the previous list of
requests on that particular device only.
Note that for a single Go() or GoOne() call, the order of execution of the request list cannot be predicted. Since the driver does
internal optimization, it is quite likely not the same as the order of AddRequest() function calls. One thing that is known, is that
configuration settings like ranges, stream settings, and such, will be done before the actual acquisition or setting of outputs.
Declaration:
LJ_ERROR _stdcall GoOne( LJ_HANDLE Handle )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
Handle
– Handle returned by OpenLabJack().
Outputs:
None
4.2.8 - GetResult()
Calling either Go function creates a list of results that matches the list of requests. Use GetResult() to read the result and errorcode
for a particular IOType and Channel. Normally this function is called for each associated AddRequest() item. Even if the request
was an output, the errorcode should be evaluated.
None of the Get functions will clear results from the list. The first AddRequest() call subsequent to a Go call will clear the internal
lists of requests and results for a particular device.
When processing raw in/out or stream data requests, the call to a Get function does not actually cause the data arrays to be filled.
The arrays are filled during the Go call (if data is available), and the Get call is used to find out many elements were placed in the
array.
GetResultS() is a special version of the Get function where IOType is a string rather than a long. This is useful for passing string
constants in languages that cannot include the header file, and is generally used with all IOTypes except put/get config. The string
should contain the constant name as indicated in the header file (such as “LJ_ioANALOG_INPUT”). The declaration for the S
version of Get is the same as below except for (…, const char *pIOType, …).
GetResultSS() is a special version of the Get function where IOType and Channel are strings rather than longs. This is useful for
passing string constants in languages that cannot include the header file, and is generally only used with the put/get config
IOTypes. The strings should contain the constant name as indicated in the header file (such as “LJ_ioPUT_CONFIG” and
“LJ_chLOCALID”). The declaration for the SS version of Get is the same as below except for (…, const char *pIOType, const char
*pChannel, …).
It is acceptable to pass NULL (or 0) for any pointer that is not required.
Declaration:
LJ_ERROR _stdcall GetResult ( LJ_HANDLE Handle,
long IOType,
long Channel,
double *pValue)
34
Summary of Contents for UE9
Page 84: ...84 ...