« Close

Datasheets and User Guides

App Notes

Software & Driver

 

3.1 Modbus Map

Modbus Map Overview

Modbus - Modbus Map [referenceable]

We distribute a constants file called ljm_constants.json that defines all information about the Modbus register map.  The dynamic filter & search tool below pulls data from that JSON file.

  • Name:  A string name that can be used with the LJM library to access each register.
  • Address:  The starting address of each register.  Valid through LJM or with direct Modbus.
  • Details:  Click to get text pulled from the description field in the JSON.
  • Type:  Specifies the datatype, which also tells you how many registers each value uses.
  • Access:  Read-only, write-only, or read & write.
  • Tags:  Used to associate registers with particular functionality.  Useful for filtering.

For a U3, U6 and UE9, see the deprecated Modbus system called UD Modbus.

Data Type Constants

TypeInteger Value
LJM_UINT16 0
LJM_UINT32 1
LJM_INT32 2
LJM_FLOAT32 3
LJM_BYTE 99
LJM_STRING 98

 

Many registers are sequentially addressed.  The Modbus Map gives you the starting address for the first register, and then depending on whether the data type is 16-bits or 32-bits you increment the address by 1 or 2 to get the next value.

Address = StartingAddress + 1*Channel#    (UINT16)

Address = StartingAddress + 2*Channel#    (UINT32, INT32, FLOAT32)

Note that the term "register" is used 2 different ways throughout documentation.  A "register" is a location that has a value you might want to read or write (e.g. AIN0 or DAC0).  The term "modbus register" is generally referring to the modbus use of the term, which is a 16-bit value pointed to by an address of 0-65535.  So most "registers" consist of 1 or 2 "modbus registers".

For example, the first entry in the Modbus Map has the name AIN#(0:254), which is shorthand notation for 255 registers named AIN0, AIN1, AIN2, ..., AIN254.  The data type is specified as FLOAT32, so each value needs 2 modbus registers, an thus the address for a given analog input is channel*2.

 

Other Versions

The ljm_constants Bitbucket repository contains some up-to-date text versions of the Modbus register map: