EZReporter 4.0 Modbus Module

The EZReporter 4.0 Modbus Module is an optional module that adds Modbus TCP Slave functionality to any of the EZReporter 4.0 editions. Most numeric results that are calculated and reported in the edition of EZReporter you are running can be assigned to a Modbus register for a Modbus Master to read.

Supports both single-precision Float and Int32 data in addition to standard Discrete/Bit/Boolean and Int16 data. With Modicon register addressing sequential registers are used for Float and Int32 data, and the upper and lower sets of bytes can be swapped.

Additional Resources

Purchasing

The Modbus Module can be added to any EZReporter Edition for $1000 plus any applicable sales tax. You can purchase new licenses by credit card from our web store.

Contact us directly to purchase the software with a purchase order or to get a quote for multi-computer licensing prices. We accept Visa, MasterCard, American Express, Discover, and Purchase Orders from approved companies.

Modbus Details

What is Modbus?

From the Frequently Asked Questions (FAQ) page of the Modbus organization’s web site:

“Modbus Protocol is a messaging structure developed by Modicon in 1979. It is used to establish master-slave/client-server communication between intelligent devices.”

Modbus provides a standard way to transfer data between a data generating device like EZReporter (the Slave) and a data consuming device like a programmable logic controller (PLC), human-machine interface (HMI), supervisory control and data acquisition system (SCADA), or other process control system.

Visit the Modbus organization’s web site using the link above for more information.

About Modbus Registers

With Modbus, a Slave device makes data available to a Master device through a “Register” that exposes numeric data held in an internal data table. Each register in each data table has a unique address so that the Modbus Master knows how to access specific results.

Important: The Modbus standard defines 4 data tables, each with registers that can be addressed individually – two of those data tables hold read-only data, while two hold read/write data. Since the EZReporter Modbus Module is read-only, it combines the two Int16 data tables (containing Holding and Input Registers) and the two Boolean/bit data tables (containing Coils and Input Discretes) to provide two read-only data tables. The Modbus Master can still be configured to read all four types of tables, but the underlying data is the same for each of the two types of data.

Modicon Floating Point and 32-bit Integer Support

The original Modbus standard only supported two types of data: 16-bit integer (Int16) and single-bit (Boolean/Discrete) data. Since signed 16-bit integers must fall in the range of -32,768 to +32,767, this provides a very limited option for exchange of data - particularly since most of the results generated by modern analytical instrumentation are floating-point (for example, 1.23456).

Fortunately, since both single-precision floating-point data and 32-bit integer data can be represented by two 16-bit integers, it is possible to use two sequential Modbus Int16 registers to hold those integers. One complication is that there is no official standard for which register should contain which integer, and different Master devices may handle this “byte order” differently. To address this complication, the EZReporter 4.0 Modbus Module provides an option to swap Int32 and Float bytes.

Important: By default, the EZReporter Modbus Module limits Modicon register addresses for both the Holding/Input table and Coils/Discretes table to a range of 1-2000 in order to simplify management of the Modbus configuration.

Enron Floating Point and 32-bit Integer Support

Some Master devices support an alternative to the standard Modicon approach of using two registers to hold 32-bit Floats and Int32 data. This alternative approach is generally referred to as “Enron” or “Daniel” addressing. In this approach, 32-bit Floats and Integers can be held in single registers. However, the registers are restricted to specific address ranges:

Enron Int32 Address Range: 5000-6999

Enron Float Address Range: 7000-8999

Important: If you have added Float or Int32 results to your Modbus configuration and switch from Modicon-to-Enron or Enron-to-Modicon addressing, the Modbus Module will automatically re-assign the register addresses to the correct range.

Server Settings

Some of the features and configurable settings of the EZReporter Modbus Module are shown below. For more detail, please download and refer to the Modbus Module reference manual.

Modbus Slave Server Settings

The following settings apply to the Modbus Slave Server.

TCP Port

This is the TCP port on which the Modbus Slave Server will listen for connections from a Modbus Master. The default port for Modbus TCP is port 502.

Timeout

This Timeout value is used by the Modbus Slave Server to determine if a Modbus Master is connected to the Server. If the timeout period expires without a message being transmitted from a Master, then the Slave assumes there are no Master devices connected.

Slave ID

Each Modbus Slave device can be addressed by a unique ID number in the range 1-247. Make sure that the Modbus Master is using the correct Slave ID when connecting to the Modbus Slave. The default Slave ID is 1.

Host Name

The host computer name. This is a read-only value that cannot be changed.

Host IP Address

The IP address of the host computer. This is a read-only value that cannot be changed.

Note: The IP address displayed is for the primary network adapter, which is the first adapter in the binding order.

Data Ready Reset Interval

The Modbus Module provides a “Modbus Data Ready” result that the Modbus Master can use to detect when new results are available. The value of this Boolean result changes to “True” (1) after all of the Modbus registers have been updated when processing results. The value then changes back to “False” (0) after the Data Ready Reset Interval has expired. This setting is entered in milliseconds and should be long enough for the Modbus Master to detect, but shorter than the interval between runs and updating of results. The default value is 1000 milliseconds.

Automatically start Modbus Server on program startup

Check this box if you want the Modbus Slave Server to start automatically whenever you start EZReporter 4.0.

Modbus Register Settings

Modicon Addressing

This option specifies the standard Modbus “Modicon” addressing protocol. 32-bit floating point and integer values are represented by two 16-bit integers placed in sequential registers. To accommodate Master devices with different expectations for which integer should be placed in which register, the Modbus module provides an option to swap the “byte order” for Float and Int32 data.

Enron/Daniel Addressing

This option specifies the alternative Enron/Daniel addressing protocol. If you choose this option, the Int32 and Float results will be restricted to the following specific register address ranges.

Enron Int32 Address Range: 5000-6999

Enron Float Address Range: 7000-8999

Important: If you have added Float or Int32 results to your Modbus configuration and switch from Modicon-to-Enron or Enron-to-Modicon addressing, the Modbus Module will automatically re-assign the register addresses to the correct range.

Register Configuration

Edit Modbus Register

You can select from a list of supported EZReporter results by first clicking the result type (Sample Information, Component, Total/Summary, Extended Fraction, Modbus, etc.) and then selecting the specific result from the list. A description of each result is also displayed when it is selected. Note that some results require an additional parameter to be selected: for example, if you select a Component result, you must also select the specific component. If an additional parameter is required, a drop-down list box is displayed allowing you to select from a list of items. After selecting the result for this register, you must next select the register address that the Modbus Master will use to access this specific result

Add Component Registers

Choose from the list of components defined in the configuration file that is currently loaded – the components that are checked will each be assigned to an individual register. You can click “Select All” button to check all of the components or “Select None” to uncheck all of the components. Next, choose the specific component result you want to assign to these registers from the list.

The registers will be assigned sequential addresses starting with the address specified as the “Starting Register Address”. The address list box is pre-filled with available starting addresses. Note that if the selected result is a Float or Int32 and you have specified Modicon addressing, then each result will occupy two sequential addresses.

Modbus Control Panel

The Modbus Register Table

The Modbus Registers table contains the list of registers that are currently defined:

The Register Table includes the following columns:

#:

The ID/Index number for the register.

Register:

The address of the register that the Modbus Master will use to access this specific result.

The Modbus table where the data for this result is stored. The Modbus Module stores results in two types of data tables: “inputRegister” (for Holding and Input registers) and “discreteInput” (for Coils and Input Discretes). The register type used is determined by the data type of the result.

The configuration file that was used to create the register. The register will only be updated when results are processed with this configuration file loaded.

Value:

The current value of the register.

Modbus Server Control and Status

The current status of the Modbus Slave Server is displayed on a color coded panel on the main Modbus Module Panel. You can start and stop the server, edit the server settings, and print the current Modbus configuration: