Read consecutive values, specified by an address and type.
LJM_ERROR_RETURN LJM_eReadAddressArray(
int Handle,
int Address,
int Type,
int NumValues,
double * aValues,
int * ErrorAddress)
Type | LJM Constant Name | LJM Constant Value |
unsigned 16-bit integer | LJM_UINT16 | 0 |
unsigned 32-bit integer | LJM_UINT32 | 1 |
signed 32-bit integer | LJM_INT32 | 2 |
floating point 32-bit | LJM_FLOAT32 | 3 |
LJM errorcodes or 0 for no error.
The Name version of this function is LJM_eReadNameArray.
If NumValues is large enough, these functions will automatically split reads into multiple packets based on the current device's effective data packet size. Using both non-buffer and buffer registers in one function call is not supported.
[C/C++] Read analog inputs 0 through 7
int LJMError; int errorAddress; double newValues[8]; // handle comes from LJM_Open() LJMError = LJM_eReadAddressArray(handle, 0, LJM_FLOAT32, 8, newValues, &errorAddress); if (LJMError != LJME_NOERROR) { // Deal with error }