Support and Documentation
Breadcrumbs

eWriteName [LJM User's Guide]

Write one value, specified by name.

Syntax

LJM_ERROR_RETURN LJM_eWriteName(
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 [in]

The value to send to the device.

Returns

LJM errorcodes or 0 for no error.

Remarks

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

Example

Write a value of 2.5V to the DAC0 analog output

C
int LJMError;

// handle comes from LJM_Open()
LJMError = LJM_eWriteName(handle, "DAC0", 2.5);
if (LJMError != LJME_NOERROR) {
    // Deal with error
}