Skip to main content
Skip table of contents

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
JavaScript errors detected

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

If this problem persists, please contact our support.