2.2.2 - eReadName | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver

LabJack is closed November 26 and 27 for the Thanksgiving holiday.

2.2.2 - eReadName

Read one value, specified by name.


                      int Handle,
                      const char * Name,
                      double * Value)


Handle [in]
A device handle. The handle is a connection ID for an active device. Generate a handle with LJM_Open or LJM_OpenS.
Name [in]
The name that specifies the Modbus register(s) to read.  Names can be found throughout the device datasheet or in the Modbus Map.
Value [out]
The value returned from the device.


LJM errorcodes or 0 for no error.


For an alternate function using an address rather than name, see LJM_eReadAddress. More code examples coming soon.


[C/C++] Read the serial number of the device.

int LJMError;
double newValue;

// handle comes from LJM_Open()
LJMError = LJM_eReadName(handle, "SERIAL_NUMBER", &newValue);
if (LJMError != LJME_NOERROR) {
    // Deal with error
printf("SERIAL_NUMBER: %f\n", newValue);