LJM_CONSTANTS_FILE is a string-based write-only LJM library configuration which sets the absolute or relative path of an existing file to read Modbus constants and error constants from. It is a shortcut for writing to both LJM_MODBUS_MAP_CONSTANTS_FILE and LJM_ERROR_CONSTANTS_FILE.
The constant LJM_CONSTANTS_FILE can be used interchangeably with the string "LJM_CONSTANTS_FILE".
LJM_MODBUS_MAP_CONSTANTS_FILE and LJM_ERROR_CONSTANTS_FILE
To write LJM_CONSTANTS_FILE, use LJM_WriteLibraryConfigStringS or LJM_LoadConfigurationFile.
Setting LJM_CONSTANTS_FILE may affect the output of the following functions:
[C/C++] Set LJM_CONSTANTS_FILE to "alternate_constants.json"
char ErrorString[LJM_MAX_NAME_SIZE]; int LJMError = LJM_WriteLibraryConfigStringS(LJM_CONSTANTS_FILE, "alternate_constants.json"); if (LJMError != 0) { LJM_ErrorToString(LJMError, ErrorString); printf("LJM_WriteLibraryConfigStringS error: %s\n", ErrorString); }
For more LJM configurations, see Library Configuration Functions.