AddressToType [LJM User's Guide]
Retrieves the data type for a given Modbus register address.
Syntax
LJM_ERROR_RETURN LJM_AddressToType(
int Address,
int * Type)
Parameters
Address [in]
A Modbus address.
Type [out]
Output parameter containing the data type of Address
.
Returns
LJM errorcodes or 0
for no error.
Remarks
Convenience function to programmatically discover the type of a Modbus address. Most people can simply look in the Modbus Map.
Examples
Get the type of Modbus address 6, which is AIN3.
C
int LJMError;
int Type;
LJMError = LJM_AddressesToTypes(6, &Type);
printf("%d \n", Type);
// 3 for LJM_FLOAT32