Digi W manual Configuring Modbus, Configuring the User-Defined Protocol

Page 63

Chapter 13

Configuring Modbus

C o n f i g u r i n g t h e D i g i D e v i c e f o r I A ( I n d u s t r i a l A u t o m a t i o n )

Modbus is a protocol that defines how devices in an industrial automation (IA) environment communicate. It specifies that a controlling unit, called a master, manages one or more units, called 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 defines two encoding schemes, Modbus ASCII and Modbus RTU. Each Modbus device uses one or the other.

Designed to function over a serial communication cable, Modbus has been extended in recent years to function over an Ethernet network using Modbus/TCP, which defines a method of encapsulating Modbus ASCII or Modbus RTU messages in IP packets for transport over the network.

The extermely flexible Digi implementation includes support for Modbus ASCII, Modbus RTU, Modbus/TCP, and two other methods of transport over a network, TCP socket and UDP socket communication. The implementation enables multiple network-based masters to concurrently initiate communication with serial-based slaves using any of the supported network protocols.

Modbus Configuration Procedure

Use the setia command from the See the Digi One/PortServer TS

Command Reference for information.

Configure the serial port for the serial communication parameters (baud rate, data bits, parity and stop bits) required by the connected IA device.

Choose Modbus ASCII or Modbus RTU as the serial port protocol, depending on the requirements of the IA device connected to the port.

If you configure the port for a slave, you do not have to configure a network-based master. Communication with the master just works. (If the master is connected to a serial port, it must be configured, however.)

If you configure a port for a master and the slaves are located on the network, TCP sockets, UDP sockets, and Modbus/TCP are all sup- ported. Use the protocol required by the master.

Configuring the User-Defined Protocol

Digi One\PortServer TS 2/4 MEI devices support what Digi calls the “user- defined” protocol, which is any IA serial-port protocol with the following attributes:

Chapter 13 Configuring the Digi Device for IA (Industrial Automation)

63

Image 63
Contents Digi TS W Family 9000329B Chapter Introduction Chapter Configuring WirelessConfiguring the IP Address N t e n t sChapter Configuring Autoconnection Setting Up RealPortConfiguring the Serial Ports Chapter Configuring PPPConfiguring Security Features Configuring IP RoutingConfiguring Users Configuring the Digi Device for IAIndustrial AutomationConfiguring DNS Configuring SnmpReference and Certifications Configuring Power Over the Serial PortsContents T r o d u c t i o n Setup OverviewOther Documents in the Library About Entering Commands on the Command LineSupported Devices About This GuideAbout Configuration Methods Configuration Prerequisites N f i g u r i n g W i r e l e s s Configuration ConsiderationsSelect Discover Digi Device from the CD Configuring Wireless Configuring Wireless Configuring Wireless Configuring Wireless N f i g u r i n g t h e I P a d d r e s s Options for Configuring the IP Address and MaskConfiguring the IP Address Using ARP-Ping Configuring the Ethernet Interface from the Command Line Configuring an IP Address using Dhcp and Rarp About RealPort T t i n g U p R e a l P o r tSetting Up RealPort Configuring the Serial Port Settings with the Web Interface Options for Configuring the Serial PortsConfiguring the Serial Port Settings from the Command Line N f i g u r i n g P P P Configuring Inbound PPP ConnectionsConfiguring Outbound PPP Connections Command Line Configuring Inbound PPP Connections ExampleProcedure Sample Use the following table for additional configurations Configuring PPP D e m E m u l a t i o n Modem Emulation Digi One TS and PortServer TS 2/4 MEI onlyCommon User Scenarios Serial Device Digi Device Server Modem Emulation Cable SignalsApplication AT Com Digi Device Server Response Mand Originating, Answering, and Disconnecting CallsServer. P represents a one second pause Code Modem Emulation AT Command Set Function ResultATP Function ResultATXn Accepted but ignored There is no Nvram support currently AT+MS Ascii Registers Function Range Units Saved DefaultRegister Function Range Units Saved Default Register Function Range Units Saved Default 17 11h =XON/XOFF &K4 Result Codes Short Long Form Modem Emulation N f i g u r i n g a u t o c o n n e c t i o n Configuring a Port for Autoconnection Web InterfaceCommands for Configuring Autoconnection by Port or by User Configuring a User for Autoconnection Web InterfaceClick Change Profile Configuring TCP Socket CommunicationConfiguring UDP Multicast Click Serial PortsClick Change Profile and select UDP Socket Configuring Autoconnection N f i g u r i n g I P R o u t i n g Configuring Static RoutesConfiguring Dynamic Routes Using RIP Configuring Proxy ARP Configuring IP Routing Controlling Access to the Configuration Controlling Access to Inbound PortsN f i g u r i n g S e c u r i t y F e a t u r e s Controlling Access to the Command Line Controlling Access to Outbound PortsIssuing User Passwords Configuring SSH Version 2 for Secure CommunicationDevice Required Hardware Firmware Http Controlling Access to ServicesSnmp SSH Configuring Security Features Configuring the User-Defined Protocol Configuring ModbusConfiguring the Digi Device for IA Industrial Automation About the Domain Name System N f i g u r i n g D N SConfiguration Procedures About Snmp and the Device Server Agent N f i g u r i n g S N M PMIB Configuration Procedure Web InterfaceN f i g u r i n g U s e r s About Configuring UsersCommon User Features Feature Description Set user FieldConfiguring a User Web Interface Commands for Configuring a UserClick New User Upgrading the Firmware Copying the Configuration to and from a Remote HostResetting Device Server Configuration to Defaults Commands for Resetting the Configuration to Defaults Managing the OS and Configuration Configuring RI Power Serial Power FeatureConfiguring DTR Power DTR on DTR OFF Serial Power TableConfiguring Power Over the Serial Ports F e r e n c e a n d C e r t i f i c a t i o n s Interpreting the LEDsColor State Indicates RJ-45 Pinouts EIA-232 EIA-422/485 EIA-485 Half Full-Duplex Environmental CertificationsDigi Contact Information Digi Contacts Reference and Certifications