NOJA-508-02 Modbus Protocol Implementation

NOJA-508-02 MODBUS Protocol Implementation www.nojapower.com.au NOJA-508-02 Revision History Rev Author Date Comm

Views 181 Downloads 7 File size 145KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

NOJA-508-02

MODBUS Protocol Implementation

www.nojapower.com.au

NOJA-508-02 Revision History Rev

Author

Date

Comment

First Release

BOS

26-05-04

First Release

Rev 1

BOS

16-Nov-04

Added I/O points.

Rev 2

OS

05-Jan-10

-

-

1

User Manual

Document template changed Mapping changed - New points added and point numbering changed. The following new points added: Input Coils: 10003, 10006 – 10009, 10149, 10150. Page 13, Note 1. Frequency multiplication factor documentation error corrected. Old Value: 0.01 when should be 0.001

Modbus Protocol Implementation

NOJA-508-02

Contents 1 INTRODUCTION .......................................................................................................................................... 3 2 MPM FIRMWARE......................................................................................................................................... 3 3 IMPLEMENTATION ..................................................................................................................................... 3 4 TRANSMISSION MODE .............................................................................................................................. 3 5 SUPPORTED FUNCTION CODES.............................................................................................................. 4 5.1 Function 01 Read Coil Status .......................................................................................................... 5 5.2 Function 02 Read Input Status ........................................................................................................ 6 5.3 Function 03 Read Holding Registers............................................................................................ 10 5.4 Function 04 Read Input Registers ................................................................................................ 11 5.5 Function 05 Force Single Coil ....................................................................................................... 16 5.6 Function 06 Preset Single Register .............................................................................................. 16 5.7 Function 15 (0F Hex) Force Multiple Coils ................................................................................... 16 5.8 Function 16 (10 Hex) Preset Multiple Registers .......................................................................... 16 6 MODBUS EXCEPTION RESPONSES ...................................................................................................... 17

NOJA Power® is a registered trademark of NOJA Power Switchgear Pty Ltd. This document is copyright © 2010 NOJA Power Switchgear Pty Ltd. It contains confidential intellectual property that belongs to NOJA Power Switchgear Pty Ltd. It does NOT invest any rights to that intellectual property in the recipient. It is provided solely for limited use by the recipient, who is NOT permitted in any way to copy or to disclose to any other party, any part of the contents of this document directly or indirectly without the express written permission of NOJA Power Switchgear Pty Ltd. NOJA Power Switchgear applies a policy of ongoing development and reserves the right to change product without notice. NOJA Power Switchgear does not accept any responsibility for loss or damage incurred as a result of acting or refraining from action based on information in this Document.

© NOJA Power Switchgear Pty Ltd 2010 www.nojapower.com.au

Modbus Protocol Implementation

User Manual

2

NOJA-508-02 1

INTRODUCTION

The MODBUS Protocol is a messaging structure developed by Modicon in 1979, used to establish masterslave/client-server communication between intelligent devices. It is a de facto standard, truly open and the most widely used network protocol in the industrial manufacturing environment. The purpose of this document is to describe the specific implementation of the Modicon Modbus protocol on the Recloser Control Cubicle RC-01E(S). This document, in conjunction with the Modicon Modbus Protocol Reference Guide (PI-MBUS-300) and the MODBUS Application Protocol Specification V1.1, published by Modicon, Inc., provides complete information on how to communicate with the RC-01ES via Modbus

2

MPM FIRMWARE

This document describes the Modbus points list available in firmware versions S02.03.04-6802 and above.

3

IMPLEMENTATION

The RC-01ES supports the Modbus protocol. Modbus can be assigned to either the RS485 or RS232 port and supports transmit/receive data rates of 300, 600, 1200, 2400, 4800, 9600, 14400 and 19200 baud. Half-duplex or full-duplex connections can be used on the RS-485 port. RC-01ES is always slave and supports only RTU (binary) mode. Valid slave device addresses are in the range of 0 – 247 decimal. The individual slave devices are assigned addresses in the range of 1 – 247. A master addresses a slave by placing the slave address in the address field of the message. When the slave sends its response, it places its own address in this address field of the response to let the master know which slave is responding. This Modbus implementation supports broadcast message receiving on address 0.

4

TRANSMISSION MODE

THE RC-01ES supports communication on a Modbus network using RTU (Remote Terminal Unit) mode, each 8–bit byte in a message contains two 4–bit hexadecimal characters. The main advantage of this mode is that its greater character density allows better data throughput than ASCII for the same baud rate. Each message must be transmitted in a continuous stream. Supports format for each byte in RTU mode is: Coding System: 8–bit binary, hexadecimal 0–9, A–F Two hexadecimal characters contained in each 8–bit field of the message Bits per Byte: 1 start bit 8 data bits, least significant bit sent first 1 stop bit Error Check Field: Cyclical Redundancy Check (CRC)

Start

1

2

3

4

5

6

7

8

Stop

Fig. 4.1 – Transfer in RTU mode 3

User Manual

Modbus Protocol Implementation

NOJA-508-02 5

SUPPORTED FUNCTION CODES

The listing below shows the function codes supported by this Modbus implementation. Codes are listed in decimal. ‘Yes’ indicates that the function is supported. ‘No’ indicates that it is not supported. Table 5.1 – Supported function codes Code 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Name Read Coil Status Read Input Status Read Holding Registers Read Input Registers Force Single Coil Preset Single Register Read Exception Status Diagnostics Program 484 Poll 484 Fetch Comm. Event Ctr. Fetch Comm. Event Log Program Controller Poll Controller Force Multiple Coils Preset Multiple Registers Report Slave ID Program 884/M84 Reset Comm. Link Read General Reference Write General Reference Mask Write 4X Register Read/Write 4X Registers Read FIFO Queue

Modbus Protocol Implementation

Supported Yes Yes Yes Yes Yes Yes No No No No No No No No Yes Yes No No No No No No No No

User Manual

4

NOJA-508-02

5.1

Function 01 Read Coil Status

5.1.1 Description Reads the ON/OFF status of discrete outputs (0X references, coils) in the slave. Broadcast is not supported. The query message specifies the starting coil and quantity of coils to be read. Coils are addressed starting at zero: coils 1–16 are addressed as 0–15. Table 5.2 - 0X references, output coils Address 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 0002500030 0003100036 00037 … 00048

Settings Trip Close On (Grp1) On (Grp2) On (Grp3) On (Grp4) On (Prot) Off (Prot) On (EF) Off (EF) On (SEF) Off (SEF) On (AR) Off (AR) On (LL) Off (LL) On (CLP) Off (CLP) On (UV) Off (UV) On (UF) Off (UF) On (ABR) Off (ABR) On/Off (IO1, Outputs 1-6) On/Off (IO2, Outputs 1-6) Reserved … Reserved

Description Trip (Note: A Trip operation is also possible when the control mode is set to local) Close Switch Group1 On Switch Group2 On Switch Group3 On Switch Group4 On Switch protection On Switch protection Off Switch earth fault overcurrent element On Switch earth fault overcurrent element Off Switch sensitive earth fault element On Switch sensitive earth fault element Off Switch autoreclosing element On Switch autoreclosing element Off Switch live line element On Switch live line element Off Switch cold load pickup element On Switch cold load pickup element Off Switch undervoltage element On Switch undervoltage element Off Switch underfrequency load shed element On Switch underfrequency load shed element Off Switch ABR element On Switch ABR element Off Switch IO1 Module (Outputs 1-6) On/Off Switch IO2 Module (Outputs 1-6) On/Off …

NOTE: Reserved – This coil is always 0. The coil status in the response message is packed as one coil per bit of the data field. Status is indicated as: 1 = ON; 0 = OFF.

5

User Manual

Modbus Protocol Implementation

NOJA-508-02

5.2

Function 02 Read Input Status

5.2.1 Description Reads the ON/OFF status of discrete inputs (1X references) in the slave. Broadcast is not supported. The query message specifies the starting coil and quantity of coils to be read. Coils are addressed starting at zero: coils 1–16 are addressed as 0–15. Table 5.3 - 1X references, input coils Address

Settings

Description

10001 10002

Lockout Remote Off

GENERAL All AR OCEF, AR SEF, AR SEF, ABR elements are set in O1 state Control mode is set Local

10003

Local Control

Control mode is set Local

10004

AR initiated

10005 10006 10007 10008 10009

Prot initiated Group 1 Trip Group 2 Trip Group 3 Trip Group 4 Trip

Any of AR OCEF, AR SEF, AR UV or ABR elements set in one of O2, O3 or O4 states Logical OR of AR initiated and Pickup signals Group 1 was active during ANY of protection trips Group 2 was active during ANY of protection trips Group 3 was active during ANY of protection trips Group 4 was active during ANY of protection trips

10010

Pickup

10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030

P(OC1+) P(OC2+) P(OC3+) P(OC1-) P(OC2-) P(OC3-) P(OCLL) P(EF1+) P(EF2+) P(EF3+) P(EF1-) P(EF2-) P(EF3-) P(EFLL) P(SEF+) P(SEF-) P(UV1) P(UV2) P(UV3) P(UF)

PICKUP Pickup output of any of OC1+, OC2+, OC3+, OC1-, OC2-, OC3-, EF1+, EF2+, EF3+, EF1-, EF2-, EF3-, SEF+, SEF-, EFLL, OCLL, UF, UV1, UV2, UV3 elements activated Pickup output of OC1+ activated Pickup output of OC2+ activated Pickup output of OC3+ activated Pickup output of OC1- activated Pickup output of OC2- activated Pickup output of OC3- activated Pickup output of OCLL activated Pickup output of EF1+ activated Pickup output of EF2+ activated Pickup output of EF3+ activated Pickup output of EF1- activated Pickup output of EF2- activated Pickup output of EF3- activated Pickup output of EFLL activated Pickup output of SEF+ activated Pickup output of SEF- activated Pickup output of UV1 activated Pickup output of UV2 activated Pickup output of UV3 activated Pickup output of UF activated

10031

P(Uabc>)

Pickup output of Uabc> activated

10032

P(Urst>)

Pickup output of Urst> activated

10033

P(Uabc