Modbus Server Setup

Adding a Modbus Server

Acquire™ can pass information from the flowcomputers to other Modbus devices using a Modbus server.

To setup a Modbus server:

  • Select 'Modbus Servers' from the 'Config' menu.

This will bring up the list of configured Modbus servers:

To add a new Modbus server

  • Click the 'Add' button

This will display the settings screen for the Modbus server:

Specify the fields as follows:

Field Description
Server Name This is the name used to identify the Modbus server.
Protocol The Modbus server can be set to run either using Modbus TCP or Modbus Serial. The protocol selected will affect some of the other parameters that appear on this screen.
IP Address (TCP only) This is the IP address that the Modbus server will respond on. The IP address entered must be one of the server's own allocated IP addresses. Alternatively if there is only one Modbus server on the system you can use the local host address 127.0.0.1
TCP Address (TCP port only) This is the TCP port that the Modbus server will use. The default port is 502.
No of Connections (TCP only) This is the number of external machines that can connect to this Modbus server.
Comm Port (Serial only) This is the serial port that the Modbus server is connected to
Baud Rate (Serial only) This is the baud rate the connection will use.
Data Bits (Serial only) This is the data bits that the connection will use. The default value is 8.
Stop Bits (Serial only) This is the stop bits that the connection will use. The default value is 1.
Parity (Serial only) This is the parity that the connection will use. The default value is None.
Stop Bits (Serial only) This is the stop bits that the connection will use. The default value is 1.
Mode (Serial only) The mode selects between using Modbus RTU or Modbus ASCII. Acquire™ always uses Modbus TCP for Ethernet connections..
Slave Address This is the slave address that the Modbus server will use.
Timeout This is the time in seconds that Acquire™ will wait for an incoming request. If a request does not occur in this time, the server will disconnect the connection.
Skip Blanks A standard Modbus poll scans consecutive addresses. Select 'Skip Blanks' to allow a Modbus poll to request values over non-consecutive Modbus addresses.
Pass Through This checkbox passes through the flowcomputer connection straight through to the Modbus server. Once this option has been selected choose the flowcomputer to pass through. When using pass through, there is no need to define the Modbus map as it uses the connected flowcomputers Modbus map. eg polling for Modbus address 7000 on the Modbus server will retrieve the value for address 7000 in the flowcomputer.

Once the communication details have been set up, the Modbus map must be created.

To add the Modbus map:

  • Click the 'Modbus Map' button in the black bar.

This will display the Modbus map editor page.

When the Modbus server receives a request from the external device for a given remote Modbus address, it will find out which field it will need to poll from which flowcomputer. The data is then requested from the flowcomputer and then passed through to the external device. Any field type conversions are handled automatically. Data can also be written into the flowcomputer from the external device in exactly the same way.

A searchable list of fields for the selected flowcomputer are shown on the left hand side of the screen. The fields that the Modbus server is serving are shown on the right hand side.

In keeping with the Modbus specification there are four different Modbus maps available for the four different types of data (coils, inputs, holding registers and holding inputs). Each Modbus table requires a different type of Modbus request to gather the data from it. The Modbus server can have duplicate Modbus addresses in each of the maps.

The fields in the Modbus server map are as follows:

Field Description
Server Address This is the Modbus address of the field as used by the Modbus server.
Flowcomputer Address This is the Modbus address of the field in the flowcomputer.
Field Name This is the name of the field in the flowcomputer
Data Type This is the type of data that the Modbus server will send out. Acquire™ will automatically translate the data format in the flowcomputer into this data type.
Flowcomputer This is the name of the flowcomputer that the field belongs to.

Importing the Modbus Map

The Modbus server map can also be imported from a tab delimited ASCII file.

To import a Modbus map:

  • Select 'Import Modbus…' from the 'File' menu.
  • Choose your file and click 'Open'

The format of this file is:

  • Modbus Server Address [tab]
  • Flowcomputer Modbus Address [tab]
  • Data Type [tab]
  • Flowcomputer name [tab]
  • Data Map [return]

Note: The first line is reserved for the column headings and is omitted from the import.

Tip: If after importing a file some fields are omitted from the list then missing fields may be missing from the flowcomputer setup. Check the name of the fields in the flowcomputer screen and fix them in the Modbus map.

Check that the data types used match one of the supported field type names otherwise Acquire will use the flowcomputer field's data type. Supported field types are Float, Double, 16 Bit Int, 32 Bit Int, Boolean, 16 Char ASCII, and 8 Char ASCII.

Modbus Server Messages

The Modbus server will handle the following Modbus requests with the following function codes:

1, 2 read multiple booleans 3-4 read multiple registers 15 write multiple booleans 16 write multiple registers.

Unknown function codes will return an exception code.

All unknown messages or badly constructed messages will also return a corresponding exception code.






Acquire™ Editor Manual