41 Modbus Gateway. Westermo RFI-219-F4G-T7G, Viper-212A-T5G-P8-HV, RFI-219-F4G-T7G-F8, RFI-211-F4G-T7G, L106-F2G, Viper-212A, L205-S1, Viper-112A-T5G, L110-F2G, Viper-112A-T3G
Add to my manuals
1088 Pages
advertisement
Westermo OS Management Guide
Version 4.22.0-0
Chapter 41
Modbus Gateway
This chapter describes the Modbus Gateway application available on WeOS products equipped with a serial port. The Modbus Gateway is used for interconnecting a Modbus/TCP network with a Modbus/RTU or a Modbus/ASCII network.
The Modbus Gateway has two operational modes, server and client:
Allowing one or many Modbus/TCP masters to connect to one or many serial Modbus slaves. In this mode the gateway acts as Modbus/TCP slave on the TCP/IP side and a Modbus Master on the serial side. All incoming
Modbus/TCP requests are converted into either Modbus/RTU or Modbus/ASCII requests on the serial side.
1
In server mode, the Modbus Gateway acts as a server on the TCP/IP side (TCP Server).
1014 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
Allowing one serial Modbus Master to connect to one or many Modbus/TCP slaves. In this mode the Gateway acts as a Modbus Master on the
TCP/IP side and a Modbus Slave on the serial side. All Modbus/RTU requests
(or Modbus/ASCII requests) on the serial side are converted into Modbus/TCP requests on the TCP/IP side.
2
In client mode, the Modbus Gateway acts as a client on the TCP/IP side (TCP Client).
© 2017 Westermo Teleindustri AB 1015
Westermo OS Management Guide
Version 4.22.0-0
41.1
Managing Modbus Gateway via the web interface
The Web interface provides configuration of all Modbus Gateway Settings.
41.1.1
Modbus Gateway Overview
Menu path: Configuration ⇒ Serial ⇒ Modbus
If no Modbus Gateway is configured, click the New button to create a Modbus
Gateway and you will be presented to the edit page described in
Otherwise, the Modbus Gateway will be presented in a short overview.
1016 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
41.1.2
Edit Modbus Gateway Settings
Menu path: Configuration ⇒ Serial ⇒ Modbus ⇒ New
Menu path: Configuration ⇒ Serial ⇒ Modbus ⇒
Configuration of Modbus Gateway in Server Mode
Modbus settings common to Client and Server Modes
Gateway Mode
Serial Port
Configures the Modbus Gateway mode: (TCP) Server or (TCP) Client
Selects the Serial Port
Serial Protocol
RTU Interval
Configures Serial protocol (RTU or ASCII)
Configures the RTU-interval if RTU is selected as serial protocol.
ASCII Timeout Configures the ASCII timeout if ASCII is selected as serial protocol.
Response Timeout Configures the Response timeout
Error Check Enables or disables CRC/LRC error check
Continued on next page
© 2017 Westermo Teleindustri AB 1017
Westermo OS Management Guide
Version 4.22.0-0
Exceptions
Continued from previous page
Configures Modbus Exceptions. With Modbus Exceptions enabled, the Modbus Gateway will react upon and respond to certain error conditions, e.g., if a Gateway in client mode receives a (serial) Modbus message addressed to Modbus unit not found in its Map table. If exception handling is desired, except for this particular situation, the gateway can be configured to ignore exceptions for unknown units.
Modbus Server specific settings
Listen interface
Poll Interval
Inactivity Timeout
Broadcast Delay
Redirect
Redirect Broadcast
Request Queue
Configures the listen Interface and port.
Configures the Poll Interval
Configures the Inactivity timer
Configures the Broadcast delay
Configures the Modbus Address redirection
Enables/Disables redirect of Modbus broadcasts
Enables/Disables the Request Queue
Configuration of Modbus Gateway in Client Mode
Modbus Client specific settings
Map table Configures the mapping of Modbus unit number to IP address and TCP port number of Modbus/TCP slaves.
1018 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
41.1.3
Modbus Gateway Status Page
Menu path: Status ⇒ Serial ⇒ Modbus
Gateway Mode Current operation mode of the gateway,
Server or Client.
Serial Port
Serial Protocol
The serial port in use.
Serial protocol, RTU or ASCII.
Listen Interface Listen interface and port (only in server mode).
Active connections This list shows active and open sessions. The gateway can only handle 16 open TCP sessions; if a new connection is needed, the oldest session will be closed.
Auto Refresh Click on a value to make the page reload with updated statistics automatically every 5, 15,
30 or 60 seconds. Click Off to turn off auto refresh.
Refresh Click on this button to reload with updated statistics.
© 2017 Westermo Teleindustri AB 1019
Westermo OS Management Guide
Version 4.22.0-0
41.2
Managing Modbus Gateway via the CLI interface
The table below shows Modbus Gateway management features available via the
CLI.
Command Default Section
Configure Modbus Gateway settings
[no] modbus
[no] enable
[no] mode <server|client>
[no] port <SERIAL-PORT>
Enabled
server
Disabled
[no] serial-protocol <rtu|ascii> rtu
[no] listen iface <IFNAME|any> [port <PORT>] Any:502
[no] ascii-timeout <MILLISECONDS>
[no] rtu-interval <MILLISECONDS>
[no] poll-interval <MILLISECONDS>
[no] error-check
1000
50
50
Enabled
[no] inactivity-timeout <SECONDS>
[no] response-timeout <MILLISECONDS>
[no] broadcast-delay <MILLISECONDS>
[no] redirect <MODBUS-ADDR>
[no] redirect-broadcast
[no] request-queue
[no] exceptions [ignore-unknown]
[no] map unit <MODBUS-ADDR> address <IPADDRESS>[:<PORT>]
Disabled
500
100
Disabled
Disabled
Enabled
Enabled
N/A
Show Modbus Gateway Status show modbus
41.2.1
Managing Modbus Gateway settings
Syntax [no] modbus
Context
context
1020 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
Usage Enter the
context (this context). A gateway instance will be created, unless it already exists. As of WeOS v4.22.0 a single Modbus Gateway instance is supported.
Use ”no modbus” to remove your Gateway instance(s).
Use ”show modbus” (from
context) to list summary information for configured Modbus Gateway instance(s). Use ”show” (within the
context) to list detailed information on a specific Modbus Gateway instance.
Default values Not applicable.
41.2.2
Setting Enable
Syntax [no] enable
Context
context
Usage Use ”enable” to enable and ”no enable” to disable a Modbus Gateway instance. (Other gateway settings are preserved.)
Use ”show enable” to show whether this gateway instance is enabled or disabled.
Default values Enabled
41.2.3
Setting Mode (Client or Server)
Syntax [no] mode <server|client>
Context
context
Usage Use ”mode server” or ”mode client” to configure the Modbus Gateway in server and client mode respectively.
Use ”no mode” to reset the mode to default (server).
Use ”show mode” to show the Modbus Gateway mode setting.
Default values Server (”mode server”)
© 2017 Westermo Teleindustri AB 1021
Westermo OS Management Guide
Version 4.22.0-0
41.2.4
Setting Serial Port
Syntax [no] port <SERIAL-PORT>
Context
context
Usage Set serial port, e.g., use ”port 1” to select serial port 1 on a single slot unit, or ”port 1/1” to select serial port 1 in slot 1 of a slotted WeOS unit.
You can use the ”show serial” command in Admin Exec (see
mode to list information about your serial ports, including the serial port numbers.
Use ”no port” to deselect the defined serial port.
Note
The Modbus Gateway will not be activated if no serial port is defined.
Use ”show port” to show the Modbus Gateway port setting.
Default values Disabled (”no port”)
41.2.5
Setting Serial Protocol
Syntax [no] serial-protocol <rtu|ascii>
Context
context
Usage Use ”serial-protocol rtu” or ”serial-protocol ascii” to specify use of RTU or ASCII as serial protocol respectively.
Use ”no serial-protocol” to reset the serial protocol to default (RTU).
Use ”show serial-protocol” to show the serial protocol setting.
Default values RTU (”serial-protocol rtu”)
41.2.6
Setting listen interface and port
Syntax [no] listen iface <IFNAME|any> [port <PORT>]
Context
context (server mode only)
1022 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
Usage Setting local interface and TCP port to listen to.
Acceptable port range is in range <1-65335> (default port 502). Omitting the ”port” argument leaves the port number unchanged.
Use ”no listen” to reset the setting to default (listen on any interface, port
502)
Use ”show listen” to show the current listen setting.
The setting is only applicable when configuring the Modbus Gateway in
”server” mode (see
Default values Any interface, port 502 (”listen iface any port 502”)
41.2.7
Setting ASCII Timeout
Syntax [no] ascii-timeout <MILLISECONDS>
Context
context
Usage Set ASCII Timeout, i.e., the maximum time between two frames in ASCII mode. Allowed range is <10-7050> (milliseconds).
Use ”no ascii-timeout” to reset the timeout to the default value (1000 milliseconds).
Use ”show ascii-timeout” to show the current timeout setting.
The ”ascii-timeout” command is only applicable when configuring the
Modbus Gateway to use ”ascii” as serial protocol (see
Default values 1000
41.2.8
Setting RTU Interval
Syntax [no] rtu-interval <MILLISECONDS>
Context
context
Usage Set RTU Interval, i.e., the minimum time between two frames in RTU mode. Allowed range is <10-7050> (milliseconds).
Use ”no rtu-interval” to reset the interval to the default value (50 milliseconds).
© 2017 Westermo Teleindustri AB 1023
Westermo OS Management Guide
Version 4.22.0-0
Use ”show rtu-interval” to show the current interval setting.
The ”rtu-interval” command is only applicable when configuring the Modbus Gateway to use ”rtu” as serial protocol (see
Default values 50
41.2.9
Setting Poll Interval
Syntax [no] poll-interval <MILLISECONDS>
Context
context (server mode only)
Usage Set Poll Interval. Allowed values are in range <10-65535> (milliseconds).
Use ”no poll-interval” to reset the interval to the default value (50 milliseconds).
Use ”show poll-interval” to show the current interval setting.
Only applicable when configuring the Modbus Gateway in ”server” mode
(see
Default values 50
41.2.10
Setting Serial Error Check
Syntax [no] error-check
Context
context
Usage Use ”error-check” to enable and ”no error-check” to disable serial error check.
Use ”show error-check” to show the current error check setting.
Default values Enabled
41.2.11
Setting Inactivity Timeout
Syntax [no] inactivity-timeout <SECONDS>
Context
context (server mode only)
1024 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
Usage Set Inactivity Timeout, i.e., the time to keep an idle session open. Allowed values are in range <10-65535> (seconds).
Use ”no inactivity-timeout” to disable the inactivity timeout.
Use ”show inactivity-timeout” to show the current timeout setting.
Only applicable when configuring the Modbus Gateway in ”server” mode
(see
Default values Disabled
41.2.12
Setting Response Timeout
Syntax [no] response-timeout <MILLISECONDS>
Context
context
Usage Set Response Timeout. Allowed values are in range <1-65535> (milliseconds).
Use ”no response-timeout” to reset the response timeout to default (500 milliseconds).
Use ”show response-timeout” to show the current timeout setting.
Default values 500
41.2.13
Setting Broadcast Delay
Syntax [no] broadcast-delay <MILLISECONDS>
Context
context (server mode only)
Usage Set Broadcast Delay, i.e., time to wait after transmitting an broadcast.
Allowed values are in range <0-65535> (milliseconds).
Use ”no broadcast-delay” to reset the broadcast delay to default (100 milliseconds).
Use ”show broadcast-delay” to show the current delay setting.
Only applicable when configuring the Modbus Gateway in ”server” mode
(see
Default values 100
© 2017 Westermo Teleindustri AB 1025
Westermo OS Management Guide
Version 4.22.0-0
41.2.14
Setting Redirect
Syntax [no] redirect <MODBUS-ADDR>
Context
context (server mode only)
Usage Set redirect, i.e., redirect all Modbus addresses to this address. Allowed values are in range <1-255> (seconds)
Use ”no redirect” to disable the redirect setting.
Use ”show redirect” to show the current redirect setting.
Only applicable when configuring the Modbus Gateway in ”server” mode
(see
Default values Disabled
41.2.15
Setting Redirect Broadcast
Syntax [no] redirect-broadcast (server mode only)
Context
context
Usage Set redirect broadcast, i.e., redirect all Modbus broadcasts to Modbus address 1.
Use ”no redirect-broadcast” to disable the redirect broadcast setting.
Use ”show redirect-broadcast” to show the current redirect broadcast setting.
Only applicable when configuring the Modbus Gateway in ”server” mode
(see
Default values Disabled
41.2.16
Setting Request Queue
Syntax [no] request-queue
Context
context (server mode only)
1026 © 2017 Westermo Teleindustri AB
Westermo OS Management Guide
Version 4.22.0-0
Usage Enabled/disables Request Queue.
Use ”request-queue” to enable and ”no request-queue” to disable the request queue.
Use ”show request-queue” to show the current setting.
Only applicable when configuring the Modbus Gateway in ”server” mode
(see
Default values Enabled
41.2.17
Setting Exceptions
Syntax [no] exceptions [ignore-unknown]
Context
context
Usage Enable/disables handling of Modbus exceptions. With Modbus Exceptions enabled, the Modbus Gateway will react upon and respond to certain error conditions, e.g., if a Gateway in client mode receives a (serial) Modbus message addressed to Modbus unit not found in its Map table. If exception handling is desired, except for this particular situation, the gateway can be configured to ignore exceptions for unknown units (”exceptions
ignore-unknown”).
Use ”no exceptions” to disable exception handling.
Use ”show exceptions” to show the current exception setting.
Default values Enabled (all exceptions enabled)
41.2.18
Managing Mapping of Modbus units to IP hosts
Syntax [no] map unit <MODBUS-ADDR> address <ADDRESS>[:<PORT>]
Context
context (client mode only)
Usage Setup Modbus IP map.
Use e.g., ”map unit 33 address 192.168.5.11” to map Modbus unit 33 to IP host 192.168.5.11 and (default) port 502.
Use ”no map” to remove all mappings, or ”no map unit <MODBUS-ADDR>” to remove an individual mapping.
© 2017 Westermo Teleindustri AB 1027
Westermo OS Management Guide
Version 4.22.0-0
Use ”show map” to show the current mappings.
Only applicable when configuring the Modbus Gateway in ”client” mode
(see
Default values N/A
41.2.19
Show Modbus Gateway status
Syntax show modbus
Context
context.
Usage Show Modbus Gateway status information
Default values Not applicable.
Example
Example
example:/#> show modbus
Modbus Gateway Enabled
Mode
Serial port
Serial protocol
: Yes, running as PID 542
: client
: 1
: rtu
Remote IP addr Modbus Addr Exception
=====================================================
192.168.2.5 : 502 example:/#>
10
1028 © 2017 Westermo Teleindustri AB
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 2 Legal information
- 3 Table of Contents
- 10 I Introduction to WeOS and its Management Methods
- 11 1 Introduction
- 11 1.1 Westermo and its WeOS products
- 11 1.2 Getting Started
- 12 1.3 Introduction to WeOS
- 12 1.4 How to read this document
- 14 1.5 Westermo products running WeOS
- 17 2 Quick Start
- 17 2.1 Starting the Switch for the First Time
- 18 2.2 Modifying the IP Setting
- 30 3 Overview of Management Methods
- 31 3.1 When to use the WeConfig tool
- 31 3.2 When to use the Web
- 32 3.3 When to use the CLI
- 34 4 Management via Web Interface
- 35 4.1 Document Conventions
- 36 4.2 Logging in
- 38 4.3 Navigation
- 41 4.4 System Overview
- 48 5 Management via CLI
- 48 5.1 Overview of the WeOS CLI hierarchy
- 50 5.2 Accessing the CLI
- 54 5.3 Using the CLI
- 60 5.4 General CLI commands
- 64 6 WeOS SNMP Support
- 64 6.1 Introduction and feature overview
- 77 6.2 Managing SNMP via the web interface
- 81 6.3 Manage SNMP Settings via the CLI
- 86 II Common Switch Services
- 87 7 General Switch Maintenance
- 87 7.1 Overview
- 123 7.2 Maintenance via the Web Interface
- 138 7.3 Maintenance via the CLI
- 169 8 General System Settings
- 169 8.1 Overview of General System Features
- 172 8.2 Managing System Settings via Web
- 177 8.3 Managing System Settings via CLI
- 191 9 Authentication, Authorisation and Accounting
- 192 9.1 Overview over AAA
- 201 9.2 Managing AAA via the web
- 221 9.3 Managing AAA via the CLI
- 241 9.4 Feature Parameters
- 242 10 Ethernet Port Management
- 242 10.1 Overview of Ethernet Port Management
- 257 10.2 Managing port settings via the web interface
- 261 10.3 Managing port settings via the CLI
- 271 11 Ethernet Statistics
- 271 11.1 Ethernet Statistics Overview
- 278 11.2 Statistics via the web interface
- 283 11.3 Statistics via the CLI
- 286 12 SHDSL Port Management
- 286 12.1 Overview of SHDSL Port Management
- 292 12.2 Managing SHDSL ports via the web interface
- 300 12.3 Managing SHDSL ports via the CLI
- 306 13 ADSL/VDSL Port Management
- 306 13.1 Overview of ADSL/VDSL Port Management
- 320 13.2 Managing ADSL/VDSL ports via the web interface
- 332 13.3 Managing ADSL/VDSL ports via the CLI
- 337 14 Power Over Ethernet (PoE)
- 337 14.1 Overview of Power over Ethernet (PoE)
- 341 14.2 Managing PoE via the web interface
- 345 14.3 Managing PoE via the CLI interface
- 348 15 Virtual LAN
- 348 15.1 VLAN Properties and Management Features
- 359 15.2 Port-based network access control
- 364 15.3 Managing VLAN settings via the web interface
- 374 15.4 Managing VLAN settings via the CLI
- 386 16 FRNT
- 386 16.1 Overview of the FRNT protocol and its features
- 390 16.2 FRNT and RSTP coexistence
- 392 16.3 Managing FRNT settings via the web interface
- 397 16.4 Managing FRNT settings via the CLI
- 400 17 Ring Coupling and Dual Homing
- 401 17.1 Overview
- 415 17.2 Managing via the Web
- 419 17.3 Managing via CLI
- 429 17.4 Feature Parameters
- 430 18 Spanning Tree Protocol - RSTP and STP
- 430 18.1 Overview of RSTP/STP features
- 436 18.2 Managing RSTP via the web interface
- 440 18.3 Managing RSTP via the CLI
- 445 19 Media Redundancy Protocol
- 445 19.1 Overview of the MRP protocol and its features
- 449 19.2 Managing MRP settings via the web interface
- 452 19.3 Managing MRP settings via the CLI
- 456 20 Link Aggregation
- 456 20.1 Link Aggregation Support in WeOS
- 467 20.2 Managing Link Aggregation via the Web
- 471 20.3 Managing Link Aggregation via CLI
- 476 21 Multicast in Switched Networks
- 476 21.1 Overview
- 482 21.2 Managing IGMP in the Web Interface
- 484 21.3 Managing IGMP in the CLI
- 488 22 General Network Settings
- 488 22.1 Overview
- 489 22.2 Network interfaces
- 505 22.3 General IP settings
- 508 22.4 Managing network interfaces via the web
- 515 22.5 Managing general IP settings via the web
- 521 22.6 Managing network interfaces via the CLI
- 532 22.7 Managing general IP settings via the CLI
- 548 22.8 Feature Parameters
- 549 23 DHCP Server
- 550 23.1 Overview of DHCP Server Support in WeOS
- 564 23.2 Configuring DHCP Server Settings via the Web
- 571 23.3 Configuring DHCP Server Settings via the CLI
- 583 23.4 Feature Parameters
- 584 24 DHCP Relay Agent
- 585 24.1 Overview of DHCP Relay Agent Support
- 596 24.2 Configuring DHCP Relay Agent via the Web
- 599 24.3 Configuring DHCP Relay Agent via the CLI
- 606 25 Alarm handling, LEDs and Digital I/O
- 606 25.1 Alarm handling features
- 619 25.2 Managing Alarms via the Web
- 625 25.3 Managing Alarms via the CLI
- 652 25.4 Digital I/O
- 654 25.5 LEDs
- 657 26 Logging Support
- 658 26.1 Logging Support in the web interface
- 659 26.2 Managing Logging Support via the CLI
- 661 III Router/Gateway Services
- 662 27 IP Routing in WeOS
- 662 27.1 Summary of WeOS Routing and Router Features
- 670 27.2 Static unicast routes via Web
- 673 27.3 Enabling Routing, Managing Static Routing, etc., via CLI
- 675 28 Dynamic Routing with OSPF
- 675 28.1 Overview of OSPF features
- 689 28.2 OSPF Web
- 693 28.3 Managing OSPF via the CLI
- 705 29 Dynamic Routing with RIP
- 705 29.1 Overview of RIP Features
- 711 29.2 RIP Web
- 714 29.3 Managing RIP via the CLI
- 723 30 IP Multicast Routing
- 723 30.1 Summary of WeOS Multicast Routing Features
- 727 30.2 Managing Multicast Routing via Web Interface
- 732 30.3 Managing Multicast Routing via CLI
- 736 31 Virtual Router Redundancy (VRRP)
- 737 31.1 Introduction to WeOS VRRP support
- 744 31.2 Managing VRRP via the web interface
- 749 31.3 Managing VRRP via the CLI
- 757 32 Firewall Management
- 758 32.1 Overview
- 785 32.2 Firewall Management via the Web Interface
- 809 32.3 Firewall Management via the CLI
- 823 IV Virtual Private Networks and Tunnels
- 824 33 Overview of WeOS VPN and Tunnel support
- 824 33.1 WeOS support for VPNs
- 825 33.2 Tunneling using PPP
- 825 33.3 Tunneling using GRE
- 826 34 PPP Connections
- 827 34.1 Overview of PPP Properties and Features
- 837 34.2 Managing PPP settings via the web interface
- 843 34.3 Managing PPP settings via the CLI
- 854 35 GRE tunnels
- 854 35.1 Overview of GRE tunnel Properties and Management Features
- 858 35.2 Managing GRE settings via the web interface
- 860 35.3 Managing GRE settings via the CLI
- 864 36 IPsec VPNs
- 865 36.1 Overview of IPsec VPN Management Features
- 886 36.2 Managing VPN settings via the web interface
- 896 36.3 Managing VPN settings via the CLI
- 913 36.4 Feature Parameters
- 914 37 SSL VPN
- 914 37.1 Overview of SSL VPN Management Features
- 933 37.2 Managing SSL VPN settings via the web interface
- 939 37.3 Managing SSL VPN settings via the CLI
- 954 37.4 Feature Parameters
- 955 38 WeConnect
- 957 38.1 Installing WeConnect via the Web
- 959 38.2 Installing WeConnect via the CLI
- 961 38.3 Troubleshooting
- 965 V Serial Port Management and Applications
- 966 39 Serial Port Management
- 967 39.1 Overview of Serial Port Management
- 970 39.2 Managing serial ports via the web interface
- 973 39.3 Managing serial ports via the CLI interface
- 979 40 Serial Over IP
- 979 40.1 Overview of Serial Over IP
- 991 40.2 Managing Serial Over IP via the web interface
- 998 40.3 Managing Serial Over IP via the CLI interface
- 1014 41 Modbus Gateway
- 1016 41.1 Managing Modbus Gateway via the web interface
- 1020 41.2 Managing Modbus Gateway via the CLI interface
- 1029 42 MicroLok II Gateway
- 1029 42.1 Overview of MicroLok Gateway Properties and Management Features
- 1034 42.2 Managing MicroLok Gateway via the web interface
- 1038 42.3 Managing MicroLok Gateway via the CLI interface
- 1045 VI Train Specific Protocols
- 1046 43 TTDP
- 1046 43.1 Overview of TTDP Management Features
- 1065 43.2 Managing TTDP settings via the CLI
- 1072 VII Appendixes
- 1073 Acronyms and abbreviations
- 1076 References
- 1081 Index