User Tools

Site Tools


Working with registers

General information

In the world of industrial automation, Registers are understood as units of data that are attributes of automation equipment. They can describe some external parameters of technological processes (the value of temperature, pressure, flow, state of actuators, etc.) or internal states of the devices themselves (parameters of regulators, filters, alarms etc.).

Registers in the WEBHMI project correspond to similar concepts in automation systems - 'tag', 'variable' and indicate what data from the respective devices we are going to work on (read / write), in addition, they have additional attributes controlling how they will be displayed and processed by the system settings of these registers. The registers can be of two types -

  • internal (from internal WebHMI memory, see the options)
  • external (containing data from connected devices).

Register settings in WebHMI arranged in 6 tabs, which will be explained later in details:

  • Basic info tab - specifies key addtibutes like name of the register, its connection, memory address etc.
  • Value - specifies data type (bit, byte, word, etc.), format (integer, with floating point, signed, etc.), units, possible limits, scaling etc
  • Log - set up how to record the register data in the log and charts
  • Resources - explicitly sets a special attribute, if the register contains data of a resource meter (heat, electricity etc.). Then the user can use ready tools for analytics in Level2 based on this data.
  • States - set alarm status (colorising) for registers - off, normal, warning, alert. In this case, visual elements (text, icons) and data in the log change color according to the register's state.
  • Cross reference - to quickly find places of usage of a register

Creating a register

To create a register, go to the SetupRegisters menu and click the Add New Register button (or '+' sign in the connection name end).

Basic tab

  • Connection the registers belongs to
  • Title register's name
  • Address The address in the address space of this connection. While entering value, the address validation is being made. Address assignment format depends upon protocol type and usually comprised of a 'letter + digit' sequence. The letter indicates memory address space and the digit is an offset in this memory. See supported_protocols.
  • Description - description field for the register

As of 4.1 fw version, the description is also shown right on the register tree when hovering mouse pointer over the registers' title

  • Category - the name of the group to which the register will be included.

As of 4.1 fw version, there is inline category renaming option

The ability to set categories for objects has existed in WebHMI for a long time and is a convenient tool for structuring a project. As a rule, if you enter the correct name for a category right away, it remains unchanged. However, it turned out that renaming categories is not a very simple matter, especially when you need to do a lot of renaming – for this you had to create another category and transfer the necessary objects to it. (in this case, the project was also reinitialized). Now this can be done by simply clicking on the edit icon in the category name.

  • Priority - polling priority. This option is used in conjunction with the Strict scan function. Registers with high priority will be polled first, registers with priority normal in the second turn. If part of the registers with normal priority does not fit during the scan, this part is polled in the next scan, etc. Registers from internal connections are polled last (after registers on external connections) regardless of this setting, since they are read quickly on the local bus of the WebHMI device. If you do not need read current register in normal operation mode you can select “Read on demand” priority. In this case register will be read only when operator will request it manually.
  • Script alias - This name can be used in lua scripts.
  • Disable checkbox - disables polling this register.
  • Communication interval override - Override the default polling time for this register (Setup / Settings menu). Adjustable in steps of 500 ms. Up to 1 hour.
  • Send real time data to WebHMI cloud checknox - Specifies whether to send data to the cloud-based level2 system.

Starting from 4.1 fw there are extra functions:

Read/Write mode settings

There is now a convenient function for assigning register access mode – “read / write”, “read-only”, “write-only”. There are devices for some registers of which only writing is possible, for example, the control word of some frequency converters, refrigeration controllers, etc. For these devices a custom protocol. Read-only mode is also useful for distributed systems with shared data. For example, this situation can arise when using the MQTT protocol, when the user can inadvertently override the data of another device.

Save and Apply

When editing a project, it is often necessary to make several edits in different places in the project. Before, each small change was accompanied by re-initialization of the system, which in turn caused a heavy load on the processor in large projects. Now, there is a tool that allows you to make many edits and then apply them in one go, which ultimately speeds up the time to complete these operations.

Value tab settings

Value tab of the register edit page is used to set the type and format of register data. These settings affect how the read binary data from the registers of the connected device are interpreted for display or recording.

Data type

The possible options are:

  • Bit - for reading bits of discrete inputs, outputs, single memory bit etc. However, for internal WebHMI registers bit register will occupy byte.
  • Word - reading in words
  • Double word - reading in double words. For double words there is an option to change normal word order to reverse:

  • Unix time - format used in PHP, is set as Y-m-d H:i:s, e.g., to display the date as day - month - year (DD-MM-YYYY), you set format string like this d-m-Y.
  • String - the system will treat data in the register as string data. Intended mainly to use with internal Sxx registers.

Value format

Specifies the format of the read data. Possible options are:

  • Unsigned integer
  • Signed interger
  • Fixed point float without sign (range of 0..+1)
  • Fixed point float with sign (range of -1..+1)
  • without sign (0…1) (signed / unsigned)
  • Two's complement
  • Signed floating point, according to IEEE754 - 32 bit
  • Singned Floating Point 24 bit(such format is used in OWEN devices e.g.)

Bit mask

Bit mask allows to conviniently check the state of individual bits in a source register. When setting the bitmask to the register, the value from the register will be compared with the sum of corresponding weights 2^p (p - bit position, starting from 0) of the selected bits.

In the above picture 2 highest bits are selected, so when there is a value greater or equal to 128 (2^7) + 64 (2^6) = 192 in the source register, WebHMI's copy of this register will have 3. Usually this feature is used to check only one bit, so WebHMI register has either 0 or 1 value clearly indicating if certain bit in the source register is reset or set.

But sometimes it is neccessary to write a defined mask (group of bits) to the end device. In this case remember how the number in WebHMI register is obtain. E.g. to set 7th and 6th bit (started from 0) in the source register, 3 value has to be written in WebHMI register. Or if 7th and zero bits were checked in the mask, 129 would have to be written to set these bits.

Delta format

Allows you to convert register data into increment or derivative.

In the first case (delta value), the register will be equal to the difference of the current subtracted value and the previous one. In the second (Delta value / Delta time) - delta value, divided by the time between polls, i.e. Derivative with respect to time.

Display as time duration

Show the number in seconds in the format of the length of the time interval (hours, days, etc.). The format is useful, for example, when displaying the duration of events.


Contains the enumeration of pairs 'value, text word(s)', when you select a dictionary for the register, the values ​​read from the device are compared with the data of the dictionary and, if the word matches, the word corresponding to the value will be found. If there is a mismatch, the register will contain the value itself. The dictionaries are created and edited in the menu Setup → Dictionary.

If third element in a row is set (e.g. 1, ON, client:dashboards.divider.on), Level2 cloud system can interpret it like a tag and use its own dictionary with multilanguage support.

Units of measurement

Indication of engineering units for the register data. The string specified in the field will be displayed after the text string with the register value on dashboards.

Value Calculations

Show the result of the formula: result = value_read х multiplier + shift value Scaling value with offset in the register to convert raw value from ADC to engineering units. The result is shown with the set precision.

Min/Max Allowed Value For Operator

These fields allow you to limit the min. and max. possible value for the register, which can be changed by the user from the dashboard.

Min/Max Reasonable Value

These fields allow to designate a zone of unreliable values ​​of the register, thus it is possible to judge the sensor failure. When reading the value outside the zone, a nil will be written to the register, which in turn can be defined as a 'failed state'.

Log tab settings

Contains settings affecting how register values are saved in a database.

Graph data setup

Simplest way is to set up register write at regular intervals of time and view them on graphs. Then it is enough to enable this option, select color and choose time intervals:

This method suitable for slowly changing parameters like temperature, pressure, humidity etc. which are the most typical parameters in a system monitored with WebHMI. But sometimes there is a need to track values more precisely, e.g. to view signal transitions, rising or falling edges of the discrete signals etc. Then there is an option to use log data.

Writing registers to the log

In this section 'Log' means a separate part of a database which saves register values and:

  • it can be a source of data for graphs
  • has special analytic tool to view when and how register changed. After selecting the option 'Enable Log', you can track register changes in the menu item Analytics / Registers Log.

Adjusting logging intensity

  • Change tolerance -'Tolerance' (absolute value or %) is the difference between new and previous register value, , if exceeded, its value will be written to the log. If the field is left blank, the record will occur upon any change. The recording frequency will be determined by the settings of the following items.
  • Min log interval - serves as a filter for data, limiting recording frequency to this interval, so that time between two records will not exceed this interval
  • Max log interval - If the register did not change its value, or the changes were within the 'tolerance', then this setting nevertheless allows writing the register to the log after the interval specified in the input field has expired in seconds.
  • Max graph interval - Log data can be a source for historical graphs (see register settings for recording on the graph below), then if there was no data within the specified interval, the graph will have a corresponding gap.

WARNING! Leaving 'Change tolerance' field empty will cause register write at ANY change. There is always some noise in ADC signal, so every WebHMI scan there will be writes to database. If there are many such registers this will affect system perfomance. Use log settings carefully and adequate to register type

Send log data to Level2 system - allows sending log and graph data to level2

Register's Log analytics tool

After you set up log options for the register, a special tool will be available. Plese refer to the following article.

Resources tab

Selection allows to send register value as a resource meter. There are special tools in WebHMI & Level2 cloud system to generatate resource consumption reports.

States tab

Allows you to set 4 color alarm states for the corresponding specific values ​​read from the register:

  • Disabled state - 'Off', the data in the register indicate that the mechanism is off, the sensor is off (or an open circuit, for example, for a signal of 4..20mA is less than 4mA), there is no working pressure, etc. The default alarm color is gray
  • Normal state - 'Norm', the value corresponding to normal operation. The default alarm color is green
  • Warning state- 'Warning', the parameter approaches the dangerous boundary. The default alarm color is yellow
  • Alert state - 'Emergency' - the alarm status of the parameter. The default alarm color is red.

With states defined, the dashboard elements having colorize opion set, will relfect register value with corresponding color.

When no states are defined or the value is outside of the defined ranges for states, it will be displayed in black (and dashboard element linked with this register too).

The value range can be defined in two ways -

  • With static (default) setting, the range of register state values ​​is determined by the formula:' 'Min ⇐ (register value)
  • With dynamic setting Min. and Max. are also parameters specified in the form of other registers, and thus, for example, depending on the recipe of the produced product, the warning and emergency zones will change.

Here an example of static settings, min. and max. are constants:

With dynamic state settings end points of range are floating (Delta values are constants which are added or subtracted to dynamic margins):

All states have identical settings.

Cross reference

To overview places where the register is used.

Managing register list

The list of registers is multi-level, when you minimize the list with the > signs, only the list of connections and categories is displayed.

Format of the register list:

  • ID - A unique register number in the project.
  • Title - Name of the connection / register or the category.

  • Interval - polling interval for the register
  • Address -Address of the register according to the protocol used (for connection - network address)
  • Alias - Variable name for use in Lua scripts
  • Type - Register data type (for connection - protocol type)
  • State - The poll of this register (connection) by the driver is enabled or disabled. By clicking on this icon, you can enable or disable polling for this connection or register. To the left of the status sign is the priority of the poll (dash - normal, up arrow - high, R - read on demand). In the screenshot above, the elements has following states:
    • connection #3 - switched to Virtual Port Mode
    • register #1 - Read On Demad (to read the value click the (R) icon)
    • register #56 - polling enabled and high polling priority is set
    • register #57 - polling enabled and normal priority is set
    • connection #2 - is disabled
  • Value - Displaying the current state of the register, a convenient function for debugging - you can immediately see the correctness of the setting and the presence of a connection
  • Edit, Delete, Clone buttons - corresponds to editing, deleting or cloning register(connection).

Group operations

Working with selections

When the cursor hovers over the connection name, a checkbox appears to the right of it for selecting or deselecting registers in this connection. Only the visible register will be selected, which are not folded in the categories. To select all register you have to expand all categories inside the connection.

There are some group operations inside Tools sub-menu for selected register - see below.

  • Import registers - import registers from an external *.csv file
  • Export registers - export selected register in a *.csv file to have a template or make some bulk modification using convenient spreadsheet editor
  • Import registers values - updated the values of the registers from the external file or stored on the device
  • Export registers values - stores the values of the selected registers in the external file
  • Store on device - stores the values of the selected registers on the local storage

Add device entry is for adding a built-in device profile. Please refer to this.

Importing registers

Import registers makes reverse to export operation with csv - file containing prepared list of register.

  • Move to connection - Allows you to use the connection ID (ID) from the csv file OR put registers in an existing connection.

  • Overwrite existent registers - If the option is selected, if there are already registers with the given ID when importing the list in the project, they will be overwritten, otherwise registers with matching IDs from the list will receive new IDs.

Bulk operations

These operations are also made on selections sets.


With this you can edit same properties over the register selection set.

Disable, Enable, Delete

Makes respective action over the selected set of registers.

Change connection

Move selected register to another connection or category.

Other tools

Changing order of reading connections

The order of reading connections can differ from the order in which they are shown in Connection / Register list. Some serial devices may not “like” co-existing with certain devices in adjacent polls. With this tool you can sort the devices in the polling list.

The communication will work from the list's top to the bottom.

Internal register map

With this tool you can make a overview of current memory map of the internal WebHMI registers.

Sometimes after intensive work with bulk import and export operation due to errors made during edition some register might be placed into wrong addresses and cause overlapping. (shown red in the above picture)

Another possible use for map is to quickly find some internal register in a list, using browser hotkey F3 or Crtl-F. And quickly follow the link to view register's settings.

Custom protocols

Please refer to this article.

registers.txt · Last modified: 2024/04/11 08:13 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki