background image

9

4

MODBUS PROTOCOL

Information.

The DATUM L150/L160 operates as a MODBUS, Remote Terminal Unit
(RTU) slave.

Parity checking – detects transmission errors in individual characters.

Cyclic redundancy checking – detects errors in the master messages and
slave responses.

4.1

Introduction

MODBUS communication uses the master/slave principle to send messages to
one or more slaves. Each slave is given a unique identity address
(between 1 and 99).

A broadcast address (address zero) can be used to write to all slave devices
simultaneously, using one command. In this instance there is no slave
acknowledgment.

Slaves cannot accept new messages until the current message has been
processed and a reply sent to the master (maximum response time 250ms). The
slave monitors the elapsed time between receipt of characters. If the elapsed time
without a new character is

 

3

1

/

2

 character times, the slave assumes the next

character received is the start of a new message.

Note. MODBUS RTU requires 1 start bit, 8 data bits, 1 parity bit

(optional) and 1 or 2 stop bits.

Содержание DATUM L150

Страница 1: ...ABB Instrumentation DATUM L150 160 Operating Guide MODBUS RTU Communications Option DATUM L150 8 8 8 8 8 8 A1 A2 A3 888888 DATUM L160 ...

Страница 2: ...to health the following points must be noted 1 The relevant sections of these instructions must be read carefully before proceeding 2 Warning labels on containers and packages must be observed 3 Installation operation maintenance and servicing must only be carried out by suitably trained personnel and in accordance with the information given 4 Normal safety precautions must be taken to avoid the p...

Страница 3: ...on Parameters 8 3 3 Setting the MODBUS Address 8 4 MODBUS PROTOCOL 9 4 1 Introduction 9 4 2 MODBUS Function Codes 10 5 MODBUS FUNCTIONS 11 5 1 Read Coil Status Function Code 01 11 5 2 Read Holding Register Function Code 03 12 5 3 Force Single Coil Function Code 05 13 5 4 Preset Single Register Function Code 06 14 5 5 Loopback Test Function Code 08 15 5 6 Write Multiple Registers Function Code 16 1...

Страница 4: ...r IM L160 supplied with the instrument Information The MODBUS option provides the following facilities Standard RS422 485 communications MODBUS RTU protocol for master host computer to slave DATUM L150 L160 system 500V d c isolation from external connections to the instrument Two wire or four wire communication 2400 or 9600 baud transmission rate Parity checking odd even or none ...

Страница 5: ...rface has galvanic isolation to protect the computer from lightning damage and increase signal immunity to noise pick up 2 2 OPTO22 Boards for use with Personal Computers Where a personal computer is used as the host computer the following OPTO22 boards are recommended for use with the DATUM L150 L160 Series of instruments Part No Computer Type AC24 AT AT Bus IBM PC compatible AC34 Microchannel IB...

Страница 6: ...rs must be fitted to the RS422 485 interface in the host computer see Figs 2 1 and 2 2 5V 0V 1 8kΩ Pull up Resistor 1 8kΩ Pull down Resistor Host Computer Rx Rx Tx Tx A A B B GND 20 21 22 23 24 Tx Rx Tx Rx GND 5V 0V 1 8kΩ Pull up Resistor 1 8kΩ Pull down Resistor Host Computer Rx Rx Tx Tx A A B B GND Tx Rx Tx Rx GND 11 12 13 Fig 2 1b Two wire Operation L160 Fig 2 1a Two wire Operation L150 ...

Страница 7: ...esistor 0V 5V 0V A B 1 8kΩ Pull down Resistor 1 8kΩ Pull up Resistor Rx Rx Tx Tx GND 20 21 22 23 24 Fig 2 2a Four wire Operation L150 Fig 2 2b Four wire Operation L160 Host Computer 5V 0V A B 1 8kΩ Pull down Resistor 1 8kΩ Pull up Resistor 0V 5V 0V A B 1 8kΩ Pull down Resistor 1 8kΩ Pull up Resistor Rx Rx Tx Tx GND 9 10 11 12 13 ...

Страница 8: ...of slaves can be increased if the driver s serial port permits Connections to the MODBUS serial board must be made as shown in Figs 2 1 2 2 or 2 4 Connections on links with multiple slaves must be made in parallel as shown in Fig 2 3 When connecting cable screens ensure that no ground loops are introduced The maximum serial data transmission line length for both RS422 and RS485 systems is 1200m Th...

Страница 9: ...7 2 ELECTRICAL INSTALLATION 2 6 Serial Connections Figs 2 1 to 2 4 Rx Rx Tx GND Rx Rx Tx Tx GND OPTO22 Adaptor Board Connections Screen Tx 8 9 4 5 3 Fig 2 4 OPTO22 Board Connections ...

Страница 10: ...ing the Serial Transmission Parameters Fig 3 1 Fig 3 1 shows the display readouts and options available when defining the serial transmission rate and bit parity for DATUM L150 L160 instruments Further detail on the procedures required to set each parameter are shown in Section 4 3 of the relevant User Guide 3 3 Setting the MODBUS Address To allow the master to differentiate between more than one ...

Страница 11: ...between 1 and 99 A broadcast address address zero can be used to write to all slave devices simultaneously using one command In this instance there is no slave acknowledgment Slaves cannot accept new messages until the current message has been processed and a reply sent to the master maximum response time 250ms The slave monitors the elapsed time between receipt of characters If the elapsed time w...

Страница 12: ...s zeros for points which do not contain defined data and NAKs any request for point numbers greater than 90 Write one discrete Boolean point The DATUM L150 L160 NAKs this if the point is not currently writeable Write one register This code also applies any existing limits to the register before storage in the instrument The DATUM L150 L160 NAKs if the register is not currently writeable Echo the m...

Страница 13: ...ress must be set to 05 05H Example read 16 coils from slave 01 starting at coil 6 alarm state 1 Address Function Coil Start Coil Start No of No of Error Check CRC 16 Offset High Offset Low Coils High Coils Low Field 01 01 00 05 00 10 2D C7 5 1 2 Read Coil Status Response The data is packed one bit for each coil 1 ON 0 OFF The response includes the slave address function code quantity of data chara...

Страница 14: ...o Error Address Function Start Start of Registers of Registers Check CRC 16 Offset High Offset Low High Low Field 01 03 00 00 00 03 05 CB 5 2 2 Read Holding Register Response The addressed slave responds with its address and function code followed by the information field The information field contains one byte describing the quantity of data bytes to be returned Two bytes are used to return each ...

Страница 15: ...oil 30 the coil address 29 1CH is transmitted The use of slave address zero broadcast mode forces all attached slaves to modify the desired coil Example switch ON coil address 30 auto manual state in slave 01 Coil Coil Data Data Error Address Function Offset Offset Value Value Check CRC 16 High Low High Low Field 01 05 00 1D FF 00 80 FF 5 3 2 Force Single Coil Response The response is confirmation...

Страница 16: ...egister its offset address one less than the register number must be used e g to write to register 25 the offset address 24 18H is transmitted Register Register Data Data Error Address Function Offset Offset Value Value Check CRC 16 High Low High Low Field 01 06 00 18 01 F4 09 DA 5 4 2 Preset Single Register Response The response to a Preset Single Register Response requests is to retransmit the q...

Страница 17: ... followed by two bytes to designate the action to be taken Example Data Data Error Address Function Diagnostic Diagnostic Data Data Check CRC 16 Code High Code Low Field 01 08 00 00 A5 37 DA 8D These are considered to be the information fields for the diagnostic mode 5 5 2 Loopback Test Response The Loopback Test Response always echoes the query only diagnostic code 0 bytes 3 and 4 can be used Exa...

Страница 18: ...500 to the register address 25 proportional band 1 heat and the value 100 to the register address 26 integral action time in slave 01 Register Register Number of Byte Address Function Start Start Registers Count Offset High Offset Low 01 10 00 18 00 02 04 Holding Holding Holding Holding Error Check Register 24 Register 24 Register 25 Register 25 Field CRC16 High Low High Low 01 F4 00 64 B2 E0 5 6 ...

Страница 19: ...se Codes The exception response codes sent by the slave are shown in Table 6 1 When a slave detects one of these errors it sends a response message to the master consisting of slave address function code error code and error check fields Exception Response Code Exception Response Name Exception Response Definition Illegal Function Illegal Data Address Illegal Data Value Negative Acknowledgement Me...

Страница 20: ...R 1 On 14 Digital Input State R 1 On 15 Digital Output State R 1 On 16 Relay 1 State R 1 On 17 Relay 2 State R 1 On 21 Global Maths Reset W 1 Reset 22 Maximum Values Reset W 1 Reset 23 Minimum Values Reset W 1 Reset 24 Average Values Reset W 1 Reset 7 2 Registers 7 2 1 Analog Inputs Register Variable Label Read Write Limits Values 1 2 Process Variable Input R 9999 to 99999 3 PV Decimal Places R 0 ...

Страница 21: ...99 0 None 57 Alarm Type 1 R 1 High Process 58 Alarm Type 2 R 2 Low Process 59 Alarm Type 3 R 3 High Latch 4 Low Latch 60 Alarm 1 hysteresis RW 61 Alarm 2 hysteresis RW 9999 to 99999 62 Alarm 3 hysteresis RW 7 2 3 Maths Functions Register Variable Label Read Write Limits Values 85 86 Process Variable Maximum R 9999 to 99999 87 88 Process Variable Minimum R 9999 to 99999 89 90 Process Variable Avera...

Страница 22: ...20 NOTES ...

Страница 23: ...00 Fax 1 215 674 7183 Italy ABB Kent Taylor SpA Tel 39 0 344 58111 Fax 39 0 344 58278 Client Warranty Prior to installation the equipment referred to in this manual must be stored in a clean dry environment in accordance with the Company s published specification Periodic checks must be made on the equipment s condition In the event of a failure under warranty the following documentation must be p...

Страница 24: ...1999 Printed in UK 10 99 IM L150 MOD Issue 1 ABB Automation Inc Instrumentation Division 125 E County Line Road Warminster PA 18974 USA Tel 1 215 674 6000 Fax 1 215 674 7183 ABB Kent Taylor SpA 22016 Lenno Como Italy Tel 39 0 344 58111 Fax 39 0 344 58278 ABB Instrumentation Ltd St Neots Cambs England PE19 3EU Tel 44 0 1480 475321 Fax 44 0 1480 217948 ...

Отзывы: