In general, the execution order of a list of requests in a single Go call is unpredictable, except
ersion of the Add function where IOType is a string rather than a
,
ader file (such as “LJ_ioANALOG_INPUT”). The
eclaration for the S version of Add is the same as below except for (…, const char *pIOType,
Type and Channel are strings
nguages that cannot include
the header file, and is generally only et config IOTypes. The strings should
contain the constant name as indicat e (such as “LJ_ioPUT_CONFIG” and
“LJ_chLOCALID”). The declaration for the SS version of Add is the same as below except for
(…, const char *pIOType, const char
eclaration:
that all configuration type requests are executed before acquisition and output type requests.
ddRequestS() is a special v
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
onstant name as indicated in the he
c
d
…).
AddRequestSS() is a special version of the Add function where IO
rather than longs. This is useful for p stants in la
assing string con
used with the put/g
ed in the header fil
*pChannel, …).
D
J_ERROR _stdcall AddRequest ( LJ_HANDLE Handle,
long IOType,
Parameter e
L
long Channel,
double Value,
long x1,
double UserData)
scription:
D
Returns:
Inputs:
tion 4.3.
uest, and returned
should be done when the results are received.
med.
all GetResult() or similar to retrieve any returned data or errors.
LabJack errorcodes or 0 for no error.
• Handle – Handle returned by OpenLabJack().
• IOType – The type of request. See Sec
• Channel – The channel number of the particular IOType.
• Value passed for output channels.
Value –
• x1 – Optional parameter used by some IOTypes.
• UserData – Data that is simply passed along with the req
unmodified by GetFirstResult() or GetNextResult(). Can
be used to store any
sort of information with the request, to allow a generic parser to determine what
Outputs:
• None
4.2.6 Go()
After using AddRequest() to make an internal list of requests to perform, call Go() to actually
perform the requests. This function causes all requests on all open LabJacks to be perfor
fter calling Go(), c
A
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.
52