« Close

Datasheets and User Guides

App Notes

Software & Driver

 

4.2.4 - eAddGoGet()

This function passes multiple requests via arrays, then executes a GoOne() and returns all the results via the same arrays.

The parameters that start with “*a” are arrays, and all must be initialized with at least a number of elements equal to NumRequests.

Declaration:

LJ_ERROR _stdcall eAddGoGet (  LJ_HANDLE Handle,
                               long NumRequests,
                               long *aIOTypes,
                               long *aChannels,
                               double *aValues,
                               long *ax1s,
                               long *aRequestErrors,
                               long *GoError,
                               long *aResultErrors)

Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:

  • Handle – Handle returned by OpenLabJack().
  • NumRequests – This is the number of requests that will be made, and thus the number of results that will be returned. All the arrays must be initialized with at least this many elements.
  • aIOTypes – An array which is the list of IOTypes.
  • aChannels – An array which is the list of Channels.
  • aValues – An array which is the list of Values to write.
  • ax1s – An array which is the list of x1s.

Outputs:

  • aValues – An array which is the list of Values read.
  • aRequestErrors – An array which is the list of errorcodes from each AddRequest().
  • GoError – The errorcode returned by the GoOne() call.
  • aResultErrors – An array which is the list of errorcodes from each GetResult().

2 comments

How is aValues listed as both an input and output for this function?

Say you had 2 requests in your list.  1 with iotype LJ_ioGET_AIN and 1 with iotype LJ_ioPUT_DAC.  For the former Value is output from the call and for the latter Value is an input to the call.