Example: barber

MTL8000 - Industrial Automation Training

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)..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).

MODBUS COMMUNICATIONS 2 What is Modbus? Modbus is a communication protocol developed by AEG-Modicon, and was devised initially for use with their own Programmable Logic Controllers.

Tags:

  Protocol, Ombud, Mtl8000, Nicodom

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

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)..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).

2 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)..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.

3 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.

4 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?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.

5 Consequently, there is no formal process bywhich a product may be certified to be 'Modbus compatible'. 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. 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.

6 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. 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).

7 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, then it will respond with an error error message, known as an exception response, indicates to the master: the address of the responding slave, the action it was requested to carry out and an indication of why the action could not be the slave identifies an error during receipt of the message, the message will be ignored.

8 Thisensures that a slave does not take action that was really intended for another slave, and doesnot carry out actions other than those it is commanded to. Should, for some reason, themessage be ignored, the master will know that it's query has not been received correctly, as ithas not received a response, and will resend does not define how numerical data shall be encoded within the message. This isdecided by the equipment manufacturer and a wide range of options are ports frequently employ RS232C compatible serial interfaces, though RS422 andRS485 interfaces are also used. The type of interface used defines the connector pin-outs, thecabling and the signal levels; these are not defined in Modbus. Similarly, transmission rates andparity checking are not defined in Modbus and will depend on the serial interface used andthe options made available by the manufacturer of each Modbus will support up to 247 slaves from addresses 1 to 247 (JBUS 1 to 255) - address 0 isreserved for broadcast messages.

9 In practice, the number of slaves that can be used isdetermined by the physical communications link that is chosen. For example, RS485 is limitedto a total of 31 query-response cycleThe query-response cycle forms the basis of all communication on a Modbus network. In allsituations it is the master that initiates the query and the slave that 3 - The query / response cycleMODBUS COMMUNICATIONS4 The queryThe query is made up of four parts: the device address; the function code; eight bit databytes; and an error device address - uniquely identifies a particular slave or indicates that the message is a'broadcast' addressed to all function code - tells the slave what type of action to data - bytes contain any data that the slave will require to carry out the requestedfunction (this may be a register address within the slave, a value to be used by the slave, etc.)

10 The error check - field allows the slave to confirm the integrity of the message receivedfrom the master. If an error is detected, the slave ignores the query and waits for the nextquery to be addressed to that responseA slave will normally be required to provide a response (when a query has been addressed tothat slave specifically, and not broadcast to all slaves), which will have the same overallstructure format as was used for the query: a device address; a function code; eight bit databytes; and an error device address - in the response is that of the addressed slave. This indicates to themaster which slave is replying to it's query, and allows it to confirm that the correct slave function code - in the response is normally an exact copy of the function code in thequery, and will only vary if the slave is unable to carry out the requested function.


Related search queries