Download Print this page

Advertisement

Quick Links

Motion Control Products
Application note
Integrated Modbus support
Modbus is an industry standard protocol that allows a
variety of automation devices (such as Programmable
Logic Controllers and Human Machine Interfaces) to
communicate with each other. The Modbus protocol
defines a simple protocol data unit (PDU) that is
independent of the underlying communication layers.
Inclusion of Modbus protocol support as standard
makes integration of ABB products with any other
Modbus RTU/TCP device as simple as possible.
Introduction
Controllers communicate (via RS232/422/485 Serial or Ethernet) using a Client / Server topology, in which only one device (the
Client) can initiate transactions (called 'queries'). The other devices (the Servers) respond by supplying the requested data to
the Client, or by taking the action requested in the query. Typical Client devices include host processors and programming
panels. Typical Servers include programmable controllers.
The Client can address individual Servers, or can initiate a broadcast message to all Servers. Servers return a message (called
a 'response') to queries that are addressed to them individually. Responses are not returned to broadcast queries from the
Client.
The Modbus protocol establishes the format for the Client's query by placing into it the device (or broadcast) address, a function
code defining the requested action, any data to be sent, and an error–checking field. The Server's response message is also
constructed using the Modbus protocol. It contains fields confirming the action taken, any data to be returned, and an error–
checking field. If an error occurred in receipt of the message, or if the Server is unable to perform the requested action, the
Server will construct an error message and send it as its response.
ABB Motion control products
new.abb.com/motion
1
AN00198
Rev E (EN)

Advertisement

loading

Summary of Contents for ABB Modbus AN00198

  • Page 1 (PDU) that is independent of the underlying communication layers. Inclusion of Modbus protocol support as standard makes integration of ABB products with any other Modbus RTU/TCP device as simple as possible. Introduction Controllers communicate (via RS232/422/485 Serial or Ethernet) using a Client / Server topology, in which only one device (the Client) can initiate transactions (called ‘queries’).
  • Page 2 The entire message frame must be transmitted as a continuous stream. If a silent interval of more than 1.5 character times occurs before completion of the frame, the receiving device flushes the incomplete message and assumes that the next byte will be the address field of a new message. ABB Motion control products new.abb.com/motion...
  • Page 3 The error check characters are the result of a Cyclic Redundancy Check (CRC) CHECK calculation that is performed on the message contents. 16 bits Õ ù The CRC characters are appended to the message as the last field. ABB Motion control products new.abb.com/motion...
  • Page 4 23 – Read / write 4x registers Support is provided for the following Modbus Client functions (only MicroFlex e190 and MotiFlex e180): • 03 – Read holding registers • 04 – Read input registers • 16 – Preset multiple registers ABB Motion control products new.abb.com/motion...
  • Page 5 Registers are addressed starting at zero. However Mint Comms locations are addressed from 1 – 99 (see also Application Note AN00110) so care should be taken not to try to read or write register 0 on the Mint controller if using Comms instead of NVLONG. ABB Motion control products new.abb.com/motion...
  • Page 6 Client and Server operation in the drives. The default byte and word orders are configured to match the requirements for communication with other ABB Motion, PLC and HMI products. Some third party Modbus products tend to use little endian word order so when using a third party Client it may be necessary to adjust this setting in the drive.
  • Page 7 The table below shows the physical connection possibilities for MicroFlex e1x0 and MotiFlex e180 drive products supporting integrated Modbus protocols. Connection Type MicroFlex e100 MicroFlex e150 MicroFlex e190 MotiFlex e180 RS232 2 wire RS485 Yes (OPT-SIO-1) 4 wire RS422 Yes (OPT-SIO-1) Ethernet ABB Motion control products new.abb.com/motion...
  • Page 8 Application note Integrated Modbus support AN00198 Example 1: Connect MotiFlex e180 (Modbus TCP Client) to MicroFlex e190 (Modbus TCP Server) via Switch or via crossover cable ABB Motion control products new.abb.com/motion...
  • Page 9 Connect MicroFlex e190 equipped with OPT-SIO-1 option card (Modbus RTU Server) to an external PLC (e.g. AC500 COM2) Please refer to the OPT-SIO-1 Option Card of MicroFlex e190 Servo Drive Quick installation guide for more information about how to install the option card. AC500 COM2 e190 OPT-SIO-1 ABB Motion control products new.abb.com/motion...
  • Page 10 Application note Integrated Modbus support AN00198 Example 3: Connect MicroFlex e150 (Modbus RTU Server) to an external PLC (e.g. AC500-eco) AC500-eco COM2 e150 X6 ABB Motion control products new.abb.com/motion...
  • Page 11 Check boxes are provided to enable/disable Server operation (enabled by default) and to configure the byte and word order of the Modbus data (set to Big Endian by default for compatibility with other ABB products supporting Modbus TCP operation). The standard Modbus port number is 502, but this can be changed if required to suit third party products using a custom port number.
  • Page 12 MODBUSTCPxx Mint keywords to read/write data on the Server device (so for example, if Server ID 0 relates to 192.168.0.2 as shown above, we would use MODBUSTCP32(0,0) to access Netdata 0 on a MicroFlex e190 or MotiFlex e180 configured with IP address 192.168.0.2 and connected to the Client drive). ABB Motion control products new.abb.com/motion...
  • Page 13 Click on ‘Serial’ to configure the drive’s RS422/485 serial port settings. (Modbus RTU must be activated by selecting “Modbus RTU” as Protocol) Adjust all settings according to the Client settings. ABB Motion control products new.abb.com/motion...
  • Page 14 Check boxes are provided to configure the byte and word order of the Modbus data (set to Big Endian by default for compatibility with other ABB products supporting Modbus RTU operation). Note: Support is included for broadcast write functions (i.e. to node ID 0) so node ID 0 should be avoided unless broadcast functions are intended.
  • Page 15 The Server diagnostics page displays the current configuration and counters showing the number of successful and unsuccessful Modbus TCP/RTU transactions (and also shows how many transactions of each Modbus function code type have been actioned). ABB Motion control products new.abb.com/motion...
  • Page 16 The Client diagnostics page lets the user initiate a ‘Read holding registers’ Modbus TCP function (function code 03). Diagnostics about the transaction are displayed after clicking the ‘Send’ button. This allows the user to test basic Modbus TCP operation without the need to write any Mint code… ABB Motion control products new.abb.com/motion...
  • Page 17 ‘Data Out of Range’ error. The default byte and word orders are configured to match the requirements for communication with other ABB Motion, PLC and HMI products. Some third party Modbus products tend to use little endian word order so when using a third party Client it may be necessary to include…ModbusParameter (bus, _mpWORD_ORDER) = 1…in the Mint Startup block code.
  • Page 18 ModbusParameter (bus, _mpENABLE) = 1 (where bus = _busETHERNET for Modbus TCP or _busSERIAL1 for Modbus RTU). Enabling Modbus RTU Server operation automatically disables both Host Comms Protocol (HCP1/2) and ABB Binary Protocol (BBP) functionality on the serial port. Enabling Modbus RTU also prevents the controller from directing data from Mint PRINT statements to the serial port to avoid corruption of Modbus data packets.
  • Page 19 Data (hex): 02 00 00 CRC (hex): 44 fc Contact us For more information please contact your © Copyright 2016 ABB. All rights reserved. local ABB representative or one of the following: Specifications subject to change without notice. new.abb.com/motion new.abb.com/drives new.abb.com/drivespartners new.abb.com/PLC...