# Slot 4 Menu 15 − Modbus TCP/IP Setup

Mode: Regeneration

Modbus TCP/IP is one of the most widely supported industrial Ethernet based protocols offering the functionality and simplicity of the Modbus protocol, with the flexibility of Ethernet. The table below shows the supported Modbus function codes.

The implementation of Modbus TCP/IP follows the specification provided by the Modbus organisation. Modbus TCP/IP uses the standard Protocol Data Unit (PDU) but without the CRC bytes and encapsulates it within a Modbus TCP/IP Application Data Unit (ADU) for transmission. This means that the Modbus PDU is the same for both standard and Ethernet based transmission.

Code | Description
3 | Read multiple 16 bit registers
6 | Write single 16 bit register
16 | Write multiple 16 bit registers
23 | Read and write multiple 16 bit registers

Parameter | 4.15.001 Enable
--- | ---
Short description | Set to enable Modbus functionality
Minimum | 0 | Maximum | 1
Default | 1 | Units |
Type | 1 Bit User Save | Update Rate | Background read
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter is used to enable or disable Modbus master and slave functionality.

Parameter | 4.15.002 Reset
--- | ---
Short description | Set to reset the interface
Minimum | 0 | Maximum | 1
Default | 0 | Units |
Type | 1 Bit Volatile | Update Rate | Background read; written to 0 on initialisation
Display Format | Standard | Decimal Places | 0
Coding | RW, NC

This parameter is used to perform a warm reset of the protocol interface. When set and the protocol has reset, the parameter will be reset to zero (Off).

Parameter | 4.15.003 Default
--- | ---
Short description | Set to default the protocol interface
Minimum | 0 | Maximum | 1
Default | 0 | Units |
Type | 1 Bit Volatile | Update Rate | On module reset, protocol interface reset or protocol enable
Display Format | Standard | Decimal Places | 0
Coding | RW, NC

This parameter allows the protocol to be defaulted to factory settings. This includes all of the protocol features, configuration, mappings and stored objects.

Parameter | 4.15.004 Modbus Configuration Error
--- | ---
Short description | Displays the Modbus configuration error
Minimum | 0 | Maximum | 3
Default |  | Units |
Type | 8 Bit Volatile | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RO, TE, ND, NC, PT, BU

Value | Text | Description
0 | No error | No error
1 | Port in use | Specified port is currently in use by another protocol
2 | Timeout event | Timeout trigger event location is not valid
3 | Num Connections | The Max priority connection is greater than the max connections

This parameter will indicate any Modbus configuration errors.

Parameter | 4.15.005 Modbus Listening Port
--- | ---
Short description | Defines the Modbus TCP/IP port
Minimum | 0 | Maximum | 65535
Default | 502 | Units |
Type | 16 Bit User Save | Update Rate | MODBUS_THREAD_TICK_TIME
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter can be changed from its default port of 502, however it is the user's responsibility to ensure that a valid port is set.

Parameter | 4.15.006 Maximum Connections
--- | ---
Short description | Defines the maximum number of connections to the module
Minimum | 0 | Maximum | 4
Default | 2 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter permits the user to specify the total number of connections that one or more clients can open with the module at any one time.

Parameter | 4.15.007 Maximum Priority Connections
--- | ---
Short description | Defines the maximum number of priority connections
Minimum | 0 | Maximum | 5
Default | 0 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter defines the how many of the maximum connections specified in Maximum Connections (4.15.006) can be configured as a priority connection. A connection is accepted into the priority connections pool if the client's IP address matches one of the values stored in parameters Priority Connection 1 (4.15.020), Priority Connection 2 (4.15.021), Priority Connection 3 (4.15.022) or Priority Connection 4 (4.15.023).

The priority connections are permanent and, once made will only be deleted at the request of the client or due to a communications error.

Any connections not in the priority connections pool are kept in the non-priority connections pool. If a client attempts to establish a priority connection and all available non-priority connections are in use, the non-priority connection that has not been used for the longest will be closed to make way for the new priority connection.

Parameter | 4.15.008 Maximum Connections Per Client
--- | ---
Short description | Defines the maximum number of connections per client
Minimum | 1 | Maximum | 4
Default | 2 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter defines the maximum number of connections that any one client can establish. This check is only performed on the connections in the priority connections pool.

Parameter | 4.15.009 Modbus Timeout
--- | ---
Short description | Defines the Modbus timeout value
Minimum | 1 | Maximum | 10000
Default | 100 | Units | ms
Type | 16 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, BU

This parameter defines the time period in which the Modbus server must receive a message before any specified action (as defined in ) is performed. When the timeout occurs, bit 1 in the module's alarm parameter () will be set and the specified action will be performed.

The timeout is enabled when the server receives its first message.

Note:
It is good system design to allow for some message loss by setting the timeout duration to be greater than the transmit period by a factor of 2 or more.

Parameter | 4.15.010 Modbus Timeout Action
--- | ---
Short description | Defines the action to perform on a Modbus timeout
Minimum | 0 | Maximum | 1
Default | 1 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, TE, BU

Value | Text | Description
0 | Trip | Trip drive and raise error
1 | No action | No action

Defines the action when no message is received within the time period specified in Modbus Timeout (4.15.009). Note: if a Trip is enabled, this will be triggered by Unidrive M Connect scanning the network since Unidrive M Connect sends a Modbus function code 64. Similar Acyclic Read/Write PC Tools can cause a Timeout Trip for the same reason.

Parameter | 4.15.011 Modbus Timeout Event Destination
--- | ---
Short description | Defines the destination for the Modbus timeout event
Minimum | 0 | Maximum | 4
Default | 0 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, TE, BU

Value | Text | Description
0 | This slot | Trigger event in this slot
1 | Slot 1 | Trigger event in slot 1
2 | Slot 2 | Trigger event in slot 2
3 | Slot 3 | Trigger event in slot 3
4 | Slot 4 | Trigger event in slot 4

Defines the destination slot to trigger the event (defined by Modbus Timeout Event Type (4.15.012)) when a timeout occurs.

<< This feature is not currently supported >>

Parameter | 4.15.012 Modbus Timeout Event Type
--- | ---
Short description | Defines the event type to trigger
Minimum | 0 | Maximum | 5
Default | 0 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, TE, BU

Value | Text | Description
0 | No event | No event
1 | Trigger Event | Trigger module Event
2 | Trigger Event 1 | Trigger module Event 1
3 | Trigger Event 2 | Trigger module Event 2
4 | Trigger Event 3 | Trigger module Event 3
5 | Trigger Event 4 | Trigger module Event 4

Defines the event to trigger when a timeout occurs. Modbus Timeout Event Destination (4.15.011) must specify an appropriate consumer (slot option) of the event.

Parameter | 4.15.013 Modbus Register Addressing Mode
--- | ---
Short description | Defines the Modbus register addressing mode
Minimum | 0 | Maximum | 1
Default | 0 | Units |
Type | 8 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | Standard | Decimal Places | 0
Coding | RW, TE, BU

Value | Text | Description
0 | Standard | (mm x 100) + ppp - mm<=162 and ppp<=99
1 | Modified | (mm x 256) + ppp - mm<=63 and ppp<=255

Specifies the Modbus register addressing mode.

Parameter | 4.15.020 Priority Connection 1
--- | ---
Short description | Specifies the IP address for the connection
Minimum | 0 (Display: 0.0.0.0) | Maximum | 4294967295 (Display: 255.255.255.255)
Default | 0 (Display: 0.0.0.0) | Units |
Type | 32 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | IP Address | Decimal Places | 0
Coding | RW, BU

This parameter specifies an IP address for a priority connection.

Note: parameters 20 through 23 must be filled in the order starting from the Priority_Connection_1 thruogh Priority_Connection_4. If a higher numbered Priority Connection is specified without the lower ones being filled, then it will be ignored.

Parameter | 4.15.021 Priority Connection 2
--- | ---
Short description | Specifies the IP address for the connection
Minimum | 0 (Display: 0.0.0.0) | Maximum | 4294967295 (Display: 255.255.255.255)
Default | 0 (Display: 0.0.0.0) | Units |
Type | 32 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | IP Address | Decimal Places | 0
Coding | RW, BU

This parameter specifies an IP address for a priority connection.

Note: parameters 20 through 23 must be filled in the order starting from the Priority_Connection_1 thruogh Priority_Connection_4. If a higher numbered Priority Connection is specified without the lower ones being filled, then it will be ignored.

Parameter | 4.15.022 Priority Connection 3
--- | ---
Short description | Specifies the IP address for the connection
Minimum | 0 (Display: 0.0.0.0) | Maximum | 4294967295 (Display: 255.255.255.255)
Default | 0 (Display: 0.0.0.0) | Units |
Type | 32 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | IP Address | Decimal Places | 0
Coding | RW, BU

This parameter specifies an IP address for a priority connection.

Note: parameters 20 through 23 must be filled in the order starting from the Priority_Connection_1 thruogh Priority_Connection_4. If a higher numbered Priority Connection is specified without the lower ones being filled, then it will be ignored.

Parameter | 4.15.023 Priority Connection 4
--- | ---
Short description | Specifies the IP address for the connection
Minimum | 0 (Display: 0.0.0.0) | Maximum | 4294967295 (Display: 255.255.255.255)
Default | 0 (Display: 0.0.0.0) | Units |
Type | 32 Bit User Save | Update Rate | Module reset, Modbus interface reset or Modbus interface enable
Display Format | IP Address | Decimal Places | 0
Coding | RW, BU

This parameter specifies an IP address for a priority connection.

Note: fill parameters 20 through 23 from the Priority_Connection_1. If a higher numbered Priority Connection is specified without the lower ones being filled, then it will be ignored.