Reads a string, specified by name.
LJM_ERROR_RETURN LJM_eReadNameString(
int Handle,
const char * Name,
char * String)
LJM errorcodes or 0 for no error.
See also LJM_eWriteNameString. This is a convenience function that uses LJM_eNames. Only for use with Modbus register(s) listed as type LJM_STRING (98).
[C/C++] Read the device name.
int LJMError; // LJM_STRING_ALLOCATION_SIZE is 50 char devName[LJM_STRING_ALLOCATION_SIZE]; // handle comes from LJM_Open() LJMError = LJM_eReadNameString(handle, "DEVICE_NAME_DEFAULT", devName); if (LJMError != LJME_NOERROR) { // Deal with error } printf ("%s \n", devName);