Configure a
Modbus
Slave

Configure up to 10
Modbus®
slaves to operate in the
T8151 Communications Interface
. Allocate these slaves to serial or Ethernet ports.
Since a
Trusted®
system that is
Modbus
slave has no control over the messages received from the master, the system can have longer than expected delays between messages. Allocate more time for communications processing between the
T8151 Communications Interface
and the processor by specifying a sleep period between scans in the
Trusted
system configuration. To set a sleep period between scans, in the
T8110
Trusted
TMR Processor
configuration, set the sleep period to approximately 32 ms longer than the current scan time from the
Toolset Debugger
window. This longer sleep period provides time on most scans for communications tasks and evens out the scan time. It also lengthens the scan time while ensuring that process safety times are not compromised and the maximum scan time and I/O module watchdog times are adjusted proportionately to the change in average scan time.
mdb_slcfg
When configuring a
Modbus
slave, define these properties:
Property
Description
Slave Address
Slave address for communication with the
T8151 Communications Interface
. The address is usually 1 on a point-to-point link in the range 1 to 127.
Communications
The type of connection between the
Modbus
slave and the
Modbus
master:
  • Initiate TCP/IP Connection
    , slave initiates the connection to the
    Modbus
    master.
  • Wait TCP/IP Connection
    , slave waits for an incoming connection with
    Modbus
    master (from the remote end)
  • Serial port
    . A serial port can only be used for
    Modbus
    slave or
    Modbus
    master but not both.
    A slave that appears on an Ethernet port is packaged in Internet Protocol (IP). Establish the IP layer before delivering
    Modbus
    data. The possible TCP/IP connections are either the
    T8151 Communications Interface
    sets up a TCP/IP connection or the
    T8151 Communications Interface
    waits for a call from the remote end. This connection is probably to a terminal server that requires trial and error and a close look at the terminal server configuration to determine whether it expects to set up or wait for connection. The default port used for
    Modbus
    on the
    T8151 Communications Interface
    is 2000; this port only changes if port 2000 is used elsewhere. If the to determine whether it expects to set up or wait for connection. The default port used for
    Modbus
    on the
    T8151 Communications Interface
    initiates the connection, enter the IP address of the remote end.
Connection Timeout
The time delay to allow Ethernet-based slaves to recover after a lost connection. This property should remain at the default value to disconnect after 300 seconds. This time delay is appropriate for communications where cable breaks are not normally expected, for example, not involving a modem or other link likely to disconnect.
The TCP/IP stack does not detect the loss of
Modbus
communications caused by a pulled connection or cable break. The TCP/IP stack does not detect a broken connection and retains it as a valid connection. When the broken connection is recovered, the
Modbus
Master may resume communications using the existing connection but is more likely to establish a new connection. Each re-connection consumes one of the available connections. If re-connections occur on a regular basis, all available connections are consumed and connections are no longer possible. On early communications interfaces that do not recognize the connection timeout setting, removing and reinserting the communications interface and rebooting recovers the available connections.
SOE Over
Modbus
The protocol that allows buffered transfer of events via a
T8151 Communications Interface
Modbus
slave. This protocol provides access to the SOE buffer events, not Process Historian, over a
Modbus
data link where the default OPC server/SOE collector protocols prove too slow. However, the
SOE Over
Modbus
protocol requires an application in the
Modbus
master remote end to read, interact with and interpret the buffer, and assign event data to variables.
For more information on events and their configuration, see Product Description PD-8013,
Trusted
SOE and Process Historian Package. For more information on the
SOE Over
Modbus
protocol and data block format, see Product Description PD-T8151B,
Trusted
Communication Interface.
SOE Over
Modbus
is implemented as a service running on a
T8151 Communications Interface
. When enabled, the service manages a window of
Modbus
addresses that implement the protocol which is automatically available on all ports of that module that are configured as
Modbus
slaves.
The settings in the
Modbus
Slave Configuration
window define a block of register addresses that provide a window for accessing events.
SOE Over
Modbus
Requirements:
  • Configure and activate at least one
    Modbus
    slave.
  • Configure variables for SOE logging. Set the
    Enable SOE Logging
    extended attribute for these variables or connect these variables to an SOE board and have a valid
    Modbus
    address.
  • Configure the
    SOE Over
    Modbus
    service. Configure each communications module that supports the service. Define redundant configurations with the same information.
  • Resolve
    Modbus
    address conflicts. The
    Modbus
    addresses specified by the address window must be unique and not defined by the application except for certain addresses in redundant configurations.
  • Define
    Modbus
    addresses for redundant configurations. For redundant configurations across communication modules, the first four addresses in the SOE address window should be defined by the application but not used elsewhere.
  • Configure the
    Modbus
    master. Ensure the
    Modbus
    master is configured with the appropriate addresses and has the
    SOE Over
    Modbus
    protocol implemented.
    SOE Over
    Modbus
    Redundant Configurations:
    The
    SOE Over
    Modbus
    service runs independently on each
    T8151 Communications Interface
    module where it is configured. While the service on each module provides the same event data, the presentation of that data to a
    Modbus
    master is not normally synchronized. Use the service in a redundant, fail-over configuration with these steps:
  • Configure each
    T8151 Communications Interface
    module that is part of the redundant configuration for
    SOE Over
    Modbus
    using the same values for
    Base Address
    and
    Block Count
    .
  • Define four integer variables in the dictionary and assign a
    Modbus
    address that corresponds to the first four addresses in the SOE address window, starting at the address in
    Base Address
    . The
    SOE Over
    Modbus
    services use these variables on each communication module to synchronize the presentation of event data.
    The
    SOE Over
    Modbus
    service has these properties:
  • Base Address
    , the starting address of the window used by the protocol. The base address can be located at any valid
    Modbus
    holding register address. For example,
    Modbus
    addresses in the 40,000 to 49,984 range.
    End Address
    is updated as
    Base Address
    is modified.
  • Block Count
    , the number of events that the
    Modbus
    master can read in a single
    Modbus
    read. Each event block requires four
    Modbus
    holding register addresses.
    End Address
    is updated as
    Block Count
    is modified.
    Block Count
    must indicate at least two event blocks.
  • End Address
    , the last address of the
    Modbus
    address window for the
    SOE Over
    Modbus
    protocol. Calculate this value as:
    start address specified in
    Base Address
    + 7 (for protocol overhead)
    + (the number of blocks in Block Count * 4)
    The
    Modbus
    address window indicated for
    Base Address
    and
    End Address
    should be reserved exclusively for use by the
    SOE Over
    Modbus
    service. Defining a variable with a conflicting
    Modbus
    address may lead to loss of events, corrupted event data, or protocol errors that prevent the continued operation of the
    SOE Over
    Modbus
    service.
To configure a
Modbus
slave
  1. In the
    T8151 Communications Interface
    , click
    Configure
    Modbus
    Slave
    .
  2. In the
    Modbus
    Slave Configuration
    window, select the slave number and define the properties.
  3. Select the
    Use this Slave
    check box and indicate the slave address.
  4. Select the connection method for the slave:
    • Initiate TCP/IP Connection
      . Indicate the TCP/IP address and port of the
      Modbus
      master.
    • Wait TCP/IP Connection
      . Indicate the port of the incoming connection.
    • Serial port
      . Indicate one of four possible serial ports.
  5. Select a connection timeout:
    • Never
      , where the Ethernet connection never times out
    • Disconnect after
      , where the Ethernet connection times out after the indicated number of seconds. This property should remain at the default value to disconnect after 300 seconds.
  6. Use the
    SOE over
    Modbus
    service:
    1. Select the
      Enable
      check box.
    2. Indicate these properties:
      • Base Address
        , starting address of the window used by the protocol
      • End Address
        , last address of the
        Modbus
        address window used by the protocol
      • Block Count
        , number of events that the
        Modbus
        master can read in a single
        Modbus
        read
  7. Click
    OK
    .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal