Digi TS 4, TS 2/4 manual About Modbus

Page 60

About Modbus

What Is Modbus

Modbus is a protocol that defines a method for devices in an industrial automation environment to communicate. It allows a single controlling unit, called a protocol master, to manage one or more units, called protocol slaves. The protocol specifies that only the master may initiate communication. Slaves may only respond.

The protocol defines the structure of Modbus messages, determines how the master requests information from the slave or specifies an action for the slave to take, defines how the slave is to respond, specifies addressing conventions, and deals with many of the other details required for communication to occur.

Modbus and Modbus TCP

There are two forms of the protocol. Modbus, the older of the two, was designed to run over serial connections, such as RS-232 links, and designed to use one of two encoding schemes, ASCII or RTU.

Modbus TCP is simply an adaptation of Modbus that provides for Modbus message encapsulation within IP datagrams, enabling Modbus messages to run over TCP/IP networks.

Digi’s Support for Modbus and Modbus TCP

Digi provides an extremely flexible implementation, offering support for Modbus TCP, Modbus with RTU encoding, and Modbus with ACSII encoding. The implementation allows any combination of these transport mechanisms.

Here are some examples of the configurations supported:

A master (or multiple masters) using Modbus TCP communicates through the Digi device with a port-attached slave or group of slaves using Modbus RTU. A similar configuration allows the master to use Modbus TCP to communicate with a port-attached slave using Modbus ASCII.

A port-connected master using Modbus RTU communicates with multiple network-connected slaves, each using Modbus TCP.

Configuration Methods

Modbus can be configured using the web interface or the command line. The web interface is extremely easy to use and works for many configurations. More complex configurations may require the flexibility provided by the command line interface.

Key Modbus Configuration Considerations

A key to ensuring that your Modbus configuration works as intended is matching masters with the slaves they control. So, here are some things to keep in mind:

The default configuration allows any Modbus TCP master to communicate with any port- attached slave using RTU encoding. Consequently, if there are no security considerations, that is, if you are not concerned about restricting access to slaves to particular masters, and the slaves use RTU encoding, no Modbus configuration is required. (There are still, however, some non- Modbus configuration tasks that must be completed, such as assigning the Digi device an IP address and configuring ports.)

If you use the command line, you must match masters to slaves in the following way:

The set modbus slave command has a range field that requires you to assign an index number to identify the slave.

The set modbus master command has a slave field that requires you to list the index numbers of slaves that are to be controlled by that master. The examples that follow will clarify this relationship.

11-2

About Modbus

Image 60
Contents 92000307B Page Contents Configuring DNS Configuration Examples Page Introduction This ChapterSetup Overview About Entering Commands on the Command Line About This GuideSupported Devices Access Resource CD Card Other Documents in the LibraryAbout Configuration Methods Downloading a Configuration FileConfiguration Prerequisites Logging On As Root from the Command LineAccessing the Command Line from a Telnet Session Accessing the Configuration from the Web InterfaceConfiguring the IP Address Options for Configuring the IP Address and Mask OptionsConfiguring the Ethernet Interface with DPA-Remote ProcedureStarting Point Configuring the IP Address Using Ping-ARP Configuring the Ethernet Interface from the Command Line Configuring an IP Address using Dhcp and RarpManual Configuration Procedure Manual Configuration ExampleConfiguring an IP Address using Dhcp and Rarp Configuring Ports for RealPort What is RealPort? Configuring the RealPort SoftwareConfiguration Options About RealPortConfiguring Ports Web Interface Configuring Ports for RealPort Command Line ExampleConfiguring Ports for Printers Configuration Considerations Configuring Ports for Printers Web Interface Configuring Printer Connections Command LineTips for telnet and rsh Printing Related InformationConfiguring Printer Connections Command Line Configuring a Port for Direct-Access Printing Configuring a Port for Direct-Access Printing Configuring Ports for Modems Tips on Configuring a Modem Configuring Ports for Modems Web Interface Before You Begin Configuring Ports for Terminals Configuring Ports for Terminals Web Interface Configuring Ports for Terminals Command LinePort Defaults Configuring Typical PC Connections About Computer ConnectionsAbout Computer Connections Configuring Autoconnection Configuring a Port for Autoconnection Web Interface Configuring Autoconnection By Port Command LineAbout Autoconnection Configuring a User for Autoconnection Web Interface Configuring a User for Autoconnection Command LineConfiguring a User for Autoconnection Command Line Configuring PPP Configuring PPP Connections Web Interface Configuring Inbound PPP Connections Command Line Configuring Inbound PPP Connections Example Configuring Outbound PPP Connections Command Line Set user name=name n1=telephone-number Configuring IP Routing What is Routing Introduction to RoutingTypes of Routing About RIP Routing Updates Digi One/PortServer TS 2/4 Participation in RIP Updates Configuring Static Routes Example Route Using the Ethernet InterfaceExample Route Using a PPP Link Configuring Dynamic Routes Using RIP Example Dynamic RoutesConfiguring Proxy ARP Configuring Proxy ARP Configuring Console Management Configuring Console Management Web Interface Configuring Console Management Command LineAbout Console Management Example SSH2 and Menu Access Example Alternate IP Addresses10-4 Configuring About Modbus Configuring Modbus Using the Web Interface Configuring Modbus from the Command Line 11-5 Configuring Network-Connected Masters Configuring a Port-Connected MasterExamples Configuring Security Features Controlling Access to Inbound Ports Default Access RestrictionsOptions for Removing Access Restriction Procedure for Changing a Port’s Access RequirementsControlling Access to Outbound Ports Default AccessRestricting Access to Outbound Ports Method 1 AutoconnectionIssuing User Passwords Configuring SSH Version 2 for Secure Communication Password ProtectionUsing a Public Key 12-6 Configuring DNS About the Domain Name System Configuration Procedures Procedure for Using a Name ServerProcedure for Using a Host File 13-4 Configuring Snmp About Snmp and the Digi One/PortServer TS 2/4 Agent Configuration Procedure Web Interface Configuration Procedure Command LineConfiguration Example 14-4 Configuring Users About Configuring Users Common User FeaturesConfiguring a User Web Interface Configuring a User Command Line Examples Managing the OS and Configuration Upgrading the OS Firmware Web Interface Upgrading the OS Firmware Command Line Prerequisite TaskConfiguring Digi One/PortServer TS 2/4 from a Remote Host When To Use Remote ConfigurationRules for Editing a Configuration file Copying the Configuration File to a HostCpconf fromhost=199.250.121.12cnfg-fle Resetting the Configuration to Defaults Configuration Examples Terminal Server Configuration Without RealPort ConfigurationConfiguration Notes IllustrationTerminal Server Configuration Using Autoconnection Terminal Server Configuration Using RealPort Digi One/PortServer TS 2/4 Troubleshooting Symptom Digi One/PortServer TS 2/4 Does Not Boot ProceduresSymptom Cannot Telnet to the Digi One/PortServer TS 2/4 AssumptionsSymptom Trouble Accessing a Port Running Digi One/PortServer TS 2/4 Customer DiagnosticsTroubleshooting Tftp Problems Key to Interpreting Digi One/PortServer TS 2/4 LEDsVerifying Tftp on a Unix System Kill -1inetdPID Verifying the Digi One/PortServer TS 2/4 IP Address Checking for Duplicate IP AddressesPinging an IP Address Verifying the Network Cabling Verifying the RealPort Process AIX Verifying the RealPort ProcessHP-UX Verifying the RealPort Process Linux Verifying the RealPort ProcessWindows NT Verifying the RealPort Service Windows 2000 Verifying the RealPort ServiceSolaris Verifying the RealPort Process Digi Contact Information Digi International Bren Road East Minnetonka, MN18-12