Skip to main content
Skip table of contents

eReadName [LJM User's Guide]

Read one device register value, specified by name.

Syntax

LJM_ERROR_RETURN LJM_eReadName(

int Handle,

const char * Name,

double * Value)

Parameters

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 write. Names can be found throughout the device datasheet or in the Modbus Map.

Value [out]

The value returned from the device.

Returns

LJM errorcodes or 0 for no error.

Remarks

For an alternate function using an address rather than name, see LJM_eReadAddress.

Example

Read the serial number of the device.

C
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);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.