Transcription of MTL8000 - Industrial Automation Training
1 MTL8000 Process Control for Process I/OModbus Communications ManualApplication NoteCONTENTSiContentsAN8002 1 April 1999 MODBUS IS MODBUS?..2 MODBUS QUERY-RESPONSE TRANSMISSION MESSAGE MESSAGE address function data error check ENCODING AND CONCEPTS AND register and flag organisation and & CONTROL COIL STATUS (FUNCTION 01)..9 READ INPUT STATUS (FUNCTION 02)..10 READ HOLDING REGISTERS (FUNCTION 03)..11 READ INPUT REGISTERS (FUNCTION 04)..12 FORCE SINGLE COIL (FUNCTION 05)..13 PRESET SINGLE REGISTER (FUNCTION 06).
2 13 DIAGNOSTICS (FUNCTION 08)..14 Return Query Data (sub-function 00 00)..14 Restart Comm Option (sub-function 00 01)..15 Return Diagnostic Register (sub-function 00 02)..15 Change Input Delimiter Character (sub-function 00 03)..16 Force Slave to Listen only Mode (sub-function 00 04)..16 FETCH COMMUNICATIONS EVENT COUNTER (FUNCTION 11)..16 FETCH COMMUNICATIONS EVENT LOG (FUNCTION 12)..17 What Event Bytes MULTIPLE COILS (FUNCTION 15)..19 PRESET MULTIPLE REGISTERS (FUNCTION 16)..20 REPORT SLAVE ID (FUNCTION 17)..20 EXCEPTION OF EXCEPTION RESPONSE Function (exception code 01).
3 23 Illegal Data Address (exception code 02)..23 Illegal Data Value (exception code 03)..23 Failure in subsystem (exception code 04)..23 Acknowledge (exception code 05)..24 Slave Device Busy (exception code 06)..24 Negative Acknowledge (exception code 07)..24 CONTENTSiiTHE MODBUS PHYSICAL RS485 serial interface and 4-wire and multi-drop - CALCULATION OF THE CRC IN RTU COMMUNICATIONS1 Modbus CommunicationsIntroductionThis manual provides a background to the modbus protocol and, broadly, how it isimplemented for the MTL8000 Series1 of bus interface equipment for process I/O.
4 It is onlyone of a range of protocols available to interface control systems to the above equipment butit has substantial history in the industry and is a protocol that control engineers have becomefamiliar with and is one into which they can comfortably delve. This manual is designed toassist engineers in their understanding of the protocol and possible development of custominterfaces for controlling the MTL8000 manual is organised as follows: A discussion of how Modbus originated and its basic structure A review of the main Modbus Control Functions and the data involved A look at Exception Responses - when instructions from the master can not be executed Implementing the physical layer of ModbusRelated publicationsInformation specific to the Modbus interfaces in the MTL8000 Series is available in thefollowing MTL publications.
5 INM8505 Instruction Manual, MTL8505 - Modbus BIMINM8800 BUSBUS8800-MB Interface ManualThe MTL8000 Series Bus Interface Module (BIM) has a dedicated software package to enablethe user to configure it and to define parameters such as network address, etc. This softwareis explained in the following MTL publication:INM8450 Instruction Manual, BIM Configuration Software 1 Throughout this manual, references to MTL8000 Series automatically includes the MTL8800L COMMUNICATIONS2 What is Modbus?
6 Modbus is a communication protocol developed by AEG-Modicon, and was devised initiallyfor use with their own Programmable Logic Controllers. It has, subsequently, become widelyaccepted as a communications standard, and many products have now been developed whichuse this protocol specification is maintained by its originators, AEG-Modicon, independently ofany professional body or industry association. Consequently, there is no formal process bywhich a product may be certified to be 'Modbus compatible'.
7 The onus is on the manufacturerof the product to confirm that their products are, and continue to remain, compatible withother modbus protocol defines a message structure and format, and determines how a slave willrecognise messages sent to it by its master, and how it should decode the informationcontained in the message. Standardisation of these elements has meant that Modbus devicesfrom a number of different manufacturers can be interconnected, without the need forspecialised software drivers for each : Modicon have also developed a new protocol called Modbus Plus.
8 This has remainedproprietary and is not widely used; consequently, Modbus Plus is not supported by theMTL8000 bus is a very similar protocol to Modbus and, insofar as the commands provided for theModbus slave coincide with those of JBUS, the JBUS protocol will be supported. However,where there are minor differences in interpretation of the diagnostics sub-functions theModbus version will take TransactionsModbus controllers communicate using a master-slave technique, in which only one device(the master) can initiate a communication : Throughout this manual the term slave can normally be interpreted as referring to anMTL8000 bus interface, unless otherwise indicated.
9 The reason for this is so that topics canbe expressed in general Modbus terms which will then be of more general use to a 1 - Master - slave communicationThe sequence begins with the master issuing a request or command on to the bus (a 'query'),which is received by the slaves respond by: taking appropriate action, supplying requested data to the master or informing the master that the required action could not be carried master can address individual slaves or can transmit a message to be received by all slaves- through a 'broadcast' message (Figure 1).
10 When a slave receives a message addressed specifically to that slave, it will return a messageto the master called a 'response'.The response confirms: that the message was received, understood and acted upon, or it informs the master that the action required could not be carried COMMUNICATIONS3If the 'query' requests data from the slave, this will be returned as part of the 'broadcast' to all slaves do not require 2 - Broadcast communicationModbus slaves will only transmit on to the network when required to do so by the never transmit unsolicited the slave cannot carry out the requested action.