WEBfactory 2010

Modbus Connector Overview and Configuration

The Modbus Connector is integrated in WEBfactory 2010 and is installed by default when along with WEBfactory 2010. It has no special system requirements other than the WEBfactory 2010 System Requirements.

The Modbus Connector requires a valid runtime license to operate. The license can be obtained using a hardware dongle or by activating the corresponding software license.

A single Modbus Connector can be attached to the system. A secondary instance of the connector will not be accepted.

The Modbus Connector must run on the same system as the WEBfactory Server. Therefore, the Remote Host of the Modbus Connector must be either "." or the name of the PC.

Capture2251.jpg

The configuration of the Modbus Connector is done in WEBfactoryStudio. For more information on the Modbus interface in WEBfactoryStudio, follow the link below:

Adding the Modbus Connector to WEBfactoryStudio

To enable WEBfactory Server to access a Modbus device, the Modbus Connector must be added in Studio.

  • Right-click on the Server and select New Connector > Modbus Connector.

    Capture2252.jpg

    Modbus Connector

Once the Modbus Connector is added, the Connector Configuration panel will be available. All the required configuration will be done here.

Capture2253.jpg

Modbus connector configuration panel

Creating a Modbus communication link

In order to communicate using the Modbus protocol, a communication link must be defined. The communication link defines the communication type which will be used to reach the Modbus gateway.

  1. Create a new communication link using the New button from the Connector Configuration panel while the Modbus Connector is selected or right-click on the Modbus Connector from the Connector Configuration and select New.

    Capture2254.jpg

    New communication link

  2. A dialog will ask you to select one of the two available communication protocols: TCP (Ethernet) or RTU (Serial).

  3. For using the Modbus TCP protocol, enter the IP Address and Port of the Modbus gateway machine. The default port number is 502.

    Capture2255.jpg

    Modbus connector

  4. For using the Modbus RTU protocol, provide the parameters of the serial interface of the Modbus gateway.

    Capture2256.jpg

    Serial interface parameters of the Modbus gateway

    The Port parameter represents the COM port on the PC running the WEBfactory Modbus Connector.

Setting up the connected Modbus gateway

After creating the communication link for the Modbus gateway, besides the parameters of the used protocol, the following parameters are available in the Connector Configuration panel.

Capture2257.jpg

Modbus Connector Configurator

Parameter

Description

Type

The type of connection for the device. Can be TCP or RTU.

Prefix

The prefix of the device.

Diag Signal

Diagnose signal

Max Digital

The maximum number of bit-sized digital data bits that would be placed in one packet. The highest value should be 2000.

Max Registers

The maximum number 16-bit register data that would be placed in one packet. The highest value should be 125.

Concurrent Transactions

The number of parallel gateway accesses made by the Modbus protocol. The gateway hosts several devices accessed by Modbus, devices that are distinguished based on their unitID's.

TCP Address

The address for the TCP connection.

TCP Port

The port for the TCP connection.

RTU Port

The port for the RTU serial connection.

RTU Baud

The rate of symbols changed per second.

RTU Parity

Parity bit used in detecting errors in transmission.

RTU Data Bits

The number of data bits in each character.

RTU Stop Bits

The bits sent at the end of every character in order to allow the hardware to detect the end of a character.

RTU Handshake

The flow control interaction.

Connecting the Modbus devices

After setting up the Modbus gateway, the devices must be created and connected to the gateway.

  1. Create a new Modbus device using the New button while the Modbus gateway is selected or using the New button from the gateway's contextual menu.

    Capture2259.jpg

    New Modbus device

  2. The new Modbus device will be connected to the gateway. The following parameters are available for the Modbus device:

    Capture4443.jpg

    Parameter

    Description

    Prefix

    The prefix of the substation. It can be used as a prefix for Signal Names in visualization projects.

    Unit ID

    The ID of the Modbus device inside the Modbus network (substation).

    xlateByteOrderDINT

    The parameter used to set the bytes order for integer 32 bits values.

    The Modbus connector accepts four possible byte order values for 4 bytes data types:

    • 0123

    • 1032

    • 2301

    • 3210

    The default byte order value is 2301.

    xlateByteOrderQINT

    The parameter used to set the bytes order for integer 64 bits values.

    The Modbus connector accepts four possible byte order values for 8 bytes data types:

    • 01234567

    • 10325476

    • 67453201

    • 76543210

    The default byte order value is 67452301.

    xlateByteOrderREAL

    The parameter used to set the bytes order for floating point 32 bits values.

    The Modbus connector accepts four possible byte order values for 4 bytes data types:

    • 0123

    • 1032

    • 2301

    • 3210

    The default byte order value is 2301.

    xlateByteOrderDREAL

    The parameter used to set the bytes order for floating point 64 bits values.

    The Modbus connector accepts four possible byte order values for 8 bytes data types:

    • 01234567

    • 10325476

    • 67453201

    • 76543210

    The default byte order value is 67452301.

Defining the Modbus device signals

The signals are defined by data stored in Coils, Discrete Inputs, Holding Registers and Input Registers. Each type of data can be defined as a signal.

Capture2261.jpg

List of Modbus Signals

Data

Description

Coils

On/off discrete values that can be read and written Bitwise (bit by bit)

Discrete Inputs

On/off discrete values that can be only read Bitwise (bit by bit)

Holding Registers

Numerical values that can be read and written Wordwise (word by word).

Input Registers

Numerical values that can be only read Wordwise (word by word).

The Coils and Discrete Inputs signals must be defined using the Name and Address parameters, while the Input and Holding Registers signals have two additional parameters:

Parameter

Description

Name

The name of the signal

Address

The Modbus address

Type

The type of data. The data type can be scalar or array.

Scalar data types:

  • INT - 16 bits signed integer

  • UINT - 16 bits unsigned integer

  • DINT - 32 bits signed integer

  • DUINT - 32 bits unsigned integer

  • QINT - 64 bits signed integer

  • QUINT - 64 bits unsigned integer

  • REAL - 32 bits float

  • DREAL - 64 bits float

Array data types, each one corresponding to the scalar data types:

  • INTARRAY

  • UINTARRAY

  • DINTARRAY

  • DUINTARRAY

  • QINTARRAY

  • QUINTARRAY

  • REALARRAY

  • DREALARRAY

Array Item Size

The size of the array, if the array data types are selected.

To create a new signal, simply select the type (Coil, Discrete Inputs, Holding Registers, Input Registers) press the New button and enter the required parameters.

Capture2262.jpg

New SIgnal

Accessing the Modbus signals in WEBfactoryStudio

The configured Modbus signals can be imported to the items od a connected OPC server using the Studio's signal browser.

  1. To import the signals, create a Signal Group for the Modbus connector.

    Capture2263.jpg

    New Group

  2. Using the contextual menu of the new Modbus Signal Group, use the Browse Connector functionality to look up the Modbus signals.

    Capture2264.jpg

    Browse Connector Signals

  3. In the Browse Connector window, select the signals and add them to the WEBfactoryStudio.

    Capture2265.jpg

    Modbus Signals

The selected signals will be processed by WEBfactory Server via the Modbus Connector.

Validating the Modbus signals

WEBfactoryStudio provides a validation function which helps in determining whether invalid signals have been configured for a specific connector or symbols provided by the connector are not used.

  1. From the Modbus Connector's contextual menu, select the Validate Signals option.

    Capture2266.jpg

    Validate Signals

  2. The Validate Signals will list the invalid signals or unused symbols if they exist.

    Capture2267.jpg

    Validate Signals panel