To add more registers, the user would select the "Add" button when selecting a register map on the left side menu.
The user will be prompted with the below pop up once selected.
The user can then configure the below fields:
name (required) - name of register. It must be unique and must start with a lower case letter a-z and a-z,A-Z,0-9, and underscores are allowed. No spaces or other special characters.
addr (required) - this would be the address of the register that follows the modbus convention.
0xxxx - Coil (00001-065536)
1xxxx - Discrete Input (10001-165536)
3xxxx - Input Register (30001-365536)
4xxxx - Holding Register (40001-465536)
data (required) - this defines the data type of the register.
Types:
bit - Bool
u1 - Unsigned 8-bit Int
u2 - Unsigned 16-bit Int
u4 - Unsigned 32-bit Int
s1 - Signed 8-bit Int
s2 - Signed 16-bit Int
s4 - Signed 32-bit Int
s8 - Signed 64-bit Int
f4 - 32-bit Float
f8 - 64-bit Float
Note: Unsigned 64-bit Int is not supported, but this can be accomplished by creating two points. Here is an article that explains how to accomplish this.
Bit Mask Types - supports a position notation for cases where bits are packed into input or holding registers:
format - name, addr, data, rw
do0, 40101, bit:0, rw
do1, 40101, bit:1, rw
do2, 40101, bit:2, rw
Word and Byte Order - if register data not stored in network byte order, you can specify the order using suffix:
u2le Unsigned 16-bit Int - Little endian byte and word order
u2leb Unsigned 16-bit Int - Little endian byte order only
u2lew Unsigned 16-bit Int - Little endian word order only
Examples assume 32 bit registers (Typical Big Endian word and byte order A B C D):
“Little Endian”: (Little Endian Word and Byte Order) D C B A = “le” suffix on data
“Little Endian Byte Swap”: (Little Endian Word Order ONLY) C D A B = “lew” suffix on data
“Big Endian Byte Swap”: (Little Endian Byte Order ONLY) B A D C = “leb” suffix on data
rw (required) - this would determine the read/write permissions
rw - Register may be read and written
r - Register is read-only
w - Register is write-only
scale (optional) - this allows the user to apply a scale factor to the registers. The format is [operator] [number] where the factor is a numeric constant.
Examples:
add: +1.5
minus: -0.25
mult: *10
div: /1000
dis (optional) - this is an optional tag that the user can specify a pretty display name for the register
unit (optional) - this would define the unit to use for the register
tags (optional) - this would be the tags to apply to the point when learned into the database
folderPath (optional) - if the user wants to organize the points, they can do so by applying a folderPath
Example of one of our points. We decided to include a unit and couple tags. The tags are "current" and "phase". The phase tag is a string with the value "A" in it.