Escolar Documentos
Profissional Documentos
Cultura Documentos
PACiS SPP MODBUS
Gateway and C264
SPP/EN MODBUS/D10
PACiS V5
Slave Protocol Profile
MODBUS
Issue A1
Slave Protocol Profile Documentation SPP/EN MODBUS/D10- Issue A1
CONTENTS
1. INTRODUCTION 3
1.1 Scope of the document 3
1.2 Glossary 3
2. INTEROPERABILITY 4
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
Slave Protocol Profile Documentation SPP/EN MODBUS/D10- Issue A1
1. INTRODUCTION
1.1 Scope of the document
This document is a chapter of PACiS MiCOM C264 and the PACiS gateway documentation
binders. It describes the MODBUS slave protocols (communication with SCADA systems)
implemented on PACiS MiCOM C264 and PACiS GATEWAY.
Slave MODBUS protocol implemented on PACiS MiCOM C264:
2. INTEROPERABILITY
2.1 Network configuration (Network-specific parameter)
S S Point-to-point
N N Multiple point-to-point
S S Multipoint-party line
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
N N Multipoint-star
NOTES:
1. The format for each byte in RTU mode is:
In RTU mode, messages start and end with a silent interval of at least 3.5 character
times (shown as T1–T2–T3–T4 in the figure below).
When the first field (the address field) is received, each device decodes it to find out if it
is the addressed device.
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.
Similarly, if a new message begins earlier than 3.5 character times following a previous
message, the receiving device will consider it a continuation of the previous message.
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
This will set an error, as the value in the final CRC field will not be valid for the combined
messages.
PDU is identical for both serial and TCP. First field of ADU, "Additional address", is "MBAP
Header" and "Error check" disappear (TCP/IP control).
Slave Protocol Profile Documentation SPP/EN MODBUS/D10- Issue A1
MBAP (ModBus Application Protocol header) is a seven bytes header filed as follow:
Length
Fields Description SCADA GTW
(bytes)
2 Identification of a Initialized by Recopied by the GTW from
Transaction MODBUS the SCADA the received request. No
Identifier Request/Response check.
transaction
2 0 = MODBUS protocol Initialized by Recopied by the GTW from
Protocol
the SCADA the received request. No
Identifier
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
check.
2 Number of following Initialized by Initialized by the GTW
Length bytes the SCADA (response)
(request)
1 Identification of a Initialized by Recopied by the GTW from
Unit remote slave the SCADA the received request. No
Identifier connected on a serial check.
line or on other buses.
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
03 ]
S S 05 FORCE SINGLE COIL
N N 09 PROGRAM 484
N N 10 POLL 484
N N 13 PROGRAM CONTROLLER
N N 14 POLL CONTROLLER
N N 18 PROGRAM 884/M84
N N 23 READ/WRITE 4X REGISTERS
The Query:
The function code in the query tells the addressed slave device what kind of action to
perform. The data bytes contain any additional information that the slave will need to perform
the function. The error check field provides a method for the slave to validate the integrity of
the message contents.
The Response:
If the slave makes a normal response, the function code in the response is an echo of the
function code in the query. The data bytes contain the data collected by the slave, such as
register values or status.
If an error occurs, the function code is modified to indicate that the response is an error
(exception) response, and the data bytes contain a code that describes the error. The error
check field allows the master to confirm that the message contents are valid.
In an exception response, the slave sets the MSB of the function code to 1. This makes the
function code value in an exception response exactly 80 hexadecimal higher than the value
would be for a normal response.
Response behavior:
− If the slave device receives the query without a communication error, and can handle
the query normally, it returns a normal response.
− If the slave does not receive the query due to a communication error, no response is
returned. The master program will eventually process a timeout condition for the
query.
− If the slave receives the query, but detects a communication error (parity, LRC, or
CRC), no response is returned. The master program will eventually process a timeout
condition for the query.
− If the slave receives the query without a communication error, but cannot handle it (for
example, if the request is to read a non–existent coil or register), the slave will return
an exception response informing the master of the nature of the error.
SPP/EN MODBUS/D10- Issue A1 Slave Protocol Profile Documentation
Exception
C264 GTW Meaning Description
code
S S 01 ILLEGAL The function code received in the query is not an
FUNCTION allowable action for the slave.
S S 02 ILLEGAL The data address received in the query is not an
DATA allowable address for the slave.
ADDRESS
S S 03 ILLEGAL A value contained in the query data field is not an
DATA VALUE allowable value for the slave.
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
N N 04 SLAVE An unrecoverable error occurred while the slave was
DEVICE attempting to perform the requested action.
FAILURE
N N 05 ACKNOWLED The slave has accepted the request and is
GE processing it, but a long duration of time will be
required to do so.
S N 06 SLAVE The slave is engaged in processing a long–duration
DEVICE BUSY program command. The master should retransmit the
message later when the slave is free.
S N 07 NEGATIVE The slave cannot perform the program function
ACKNOWLED received in the query.
GE
N N 08 MEMORY The slave attempted to read extended memory, but
PARITY detected a parity error in the memory. The master
ERROR can retry the request, but service may be required on
the slave device.
− An unsupported sub-function code for Diagnostic request is received (different from 0).
Exception code 02 (ILLEGAL DATA ADDRESS)
PACiS GATEWAY:
For the PACiS GATEWAY, the exception 02 (ILLEGAL DATA ADDRESS) will be sent if:
C264 Computer:
For the C264 Computer, the exception 02 (ILLEGAL DATA ADDRESS) will be sent if:
configuration, is received.
If the starting address is in configuration and/or if there is some “holes” (addresses not in
configuration), an error with code 02 (Illegal Data Address) is transmit."
Exception code 03 (ILLEGAL DATA VALUE)
Exception code 03 will be sent if:
− An illegal value is received in force coils request (so value different from FF00h and
0000h).
− An illegal count value for multiple preset registers is received. For example, if the
function 16 has a count number greater than 1.
− An illegal count value for multiple forced coils is received. For example, if the function
15 has a count number greater than 1.
Exception code 07 (NEGATIVE ACKNOWLEDGE)
Exception code 07 will be sent if:
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
S S Precision [8..16] 8 bits or 16 bits
S S NATURAL No transformation: on 8 or 16 bits
Unsigned Normalized: unsigned scaled on 8
S S UNORMALIZED
or 16 bits
Signed Normalized: signed scaled on 8 or 16
S S SNORMALIZED
bits
Float IEEE754 ‘Little
S N Endian’
Float value on 32 bits ‘Little Endian’.
FFFFh. calculus is linear for the coding between the min and max values.
NOTE:
For this mode, the gateway may now code the value on 8 to 16 bits [low part of the register
will be used]. But, 16 bits is normally the standard to use the full scale conversion.
Global formula is:
SCVal: Scaled value to be sent to SCADA
Val: Received value to be transmitted.
Vmax: Received value corresponding to MAX value.
Vmin: Received value corresponding to MIN value.
Natural coding:
The natural coding is used to encode data without any calculation. That’s means that
integer value will be send.
Example: if the gateway receives the value 10.xxxx, the value 0Ah will be set in the
appropriate register. The gateway receives the value –10. xxxx the value FFF6h will be
coded.
In the last example, the SCADA needs to know that FFF6h is value –10, and not 65525
decimal, by checking analogue min and max value for example.
2.5.2 Tap Position
MODBUS function 3 and 4 can be used to poll tap position.
Tap position are managed like Analogue inputs, see §2.5.1 “Analogue Inputs“for details.
SPP/EN MODBUS/D10- Issue A1 Slave Protocol Profile Documentation
2.5.3 Counters
MODBUS function 3 or 4 can be used to poll the counters (CT).
The counters are represented on the MODBUS mapping by one word (2 bytes) or two words
(4 bytes).
One or more counters can be polled at a time.
Four counters formats are available:
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
S S NATURAL Natural: Unsigned value on 16 bits (between
0 and + 65535)
S S UNORMALIZED Unsigned Normalized: values on 16 bits from
0 to (2 exp Accuracy)
S N Float IEEE754 ‘Little Float value on 32 bits ‘Little Endian’.
Endian’
S N Float IEEE754 ‘Big Float value on 32 bits ‘Big Endian’.
Endian’
− The Digital Inputs are represented on the MODBUS mapping by one bit for single DI.
− The Digital Inputs are represented on the MODBUS mapping by 1 or 2 bits for double
DI.
S N 2 bits
− If SCADA uses function 6, only one Setpoint (Signed value on 16 bits) can be sent at
a time.
− If SCADA uses function 16, a restriction allowed presetting only one Setpoint at the
same time.
Refer to §2.4.2 “Error Management” for exception management details.
Supported setpoints formats:
− Network attributes
− DI attributes
− AI attributes
− DO attributes
− AO attributes
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
2.8.1 Network attributes
Parameter
C264 GTW Parameter Values
Choice
S S Comm. Serial port Port number
interface
N S parity none/odd/even
N S Comm. MODBUS
interface TCP/IP
N S TCP/IP X.X.X.X
address
N S IP port 502 [1..65535]
number
S S link address 1 [1..255]
S N inter frame 3 [1..50] ms
duration If a response consists of several
frames, the second frame should
be received or transmitted within
this time (in mini-seconds).
Parameter
C264 GTW Parameter Values
Choice
S N Double Yes / No
address
usage
S S Mono Object address 1 [0..65535]
addressing - register
S N Double Open state 1 [0..65535]
addressing address -
register
S N Double Closed state 1 [0..65535]
addressing address -
register
Slave Protocol Profile Documentation SPP/EN MODBUS/D10- Issue A1
SPS attributes:
Parameter
C264 GTW Parameter Values
Choice
S S Object 1 [0..65535]
address -
register
N S Inversion Object address No / Yes
- register
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
MPS attributes:
Parameter
C264 GTW Parameter Values
Choice
N S State_0 to 1 [0..65535]
State_15
register
address
Parameter
C264 GTW Parameter Values
Choice
S S Object 1 [0..65535]
address -
register
S S Format Natural
S S Format Unsigned
normalized
S S Format Signed
normalized
S N Format Real IEEE754 -
little endian
S N Format Real IEEE754 -
big endian
S S Precision [8..16]
N S minimum
value
N S maximum
value
SPP/EN MODBUS/D10- Issue A1 Slave Protocol Profile Documentation
CT:
Parameter
C264 GTW Parameter Values
Choice
S S Object 1 [0..65535]
address -
register
S S Format Natural
S S Format Unsigned
All rights reserved. Schneider Electric. Passing on and copying of this document, use and communication of its contents are not permitted without prior written authorization.
normalized
S N Format Real IEEE754 -
little endian
S N Format Real IEEE754 -
big endian
Parameter
C264 GTW Parameter Values
Choice
S S Object 1 [0..65535]
address -
register
Parameter
C264 GTW Parameter Values
Choice
S N Object 1 [0..65535]
address -
register
S N Format Signed 16 bits
S N Format Real IEEE754 -
little endian
S N Format Real IEEE754 -
big endian
Customer Care Centre
http://www.schneider‐electric.com/CCC
Schneider Electric
35 rue Joseph Monier
92506 Rueil-Malmaison
FRANCE
Phone: +33 (0) 1 41 29 70 00
Fax: +33 (0) 1 41 29 71 00
www.schneider-electric.com Publishing: Schneider Electric
Publication: SPP/EN MODBUS/D10 06/2013