While every precaution has been taken in the preparation of this document, Schneider
Electric SA assumes no liability for any omissions or errors it may contain, nor for any
damages resulting from the application or use of the information herein.
The products described in this document may be changed or modified at any time,
either in appearance or in their operation. Their description can in no way be
considered contractual.
Presentation ________________________________________________________________________________________________ 3
Connection to RS485 bus ______________________________________________________________________________________ 4
Modbus protocol _____________________________________________________________________________________________ 8
Appendix: Non-standard RS485 schematics_______________________________________________________________________ 13
21624597 11/2009
Page 3
Presentation
The Modbus socket on the Altivar 31 can be used for the following functions:
• Configuration
• Settings
• Control
• Monitoring
The ATV31 drive supports:
• The 2-wire RS485 physical layer
• The RTU transmission mode
This guide contains information on installation and describes the Modbus services available. The "communication variables" guide
describes the operating modes, as well as the Altivar 31 variables and parameters which can be accessed via the communication bus.
1624597 11/20093
Page 4
Connection to RS485 bus
8........................1
Connection to ATV31
Connection accessories should be ordered separately (please consult our catalogues).
Connect the RJ45 cable connector to the ATV31 connector.
Pin out of the ATV31 RJ45 Connector
View from underneath
PinSignal
1CAN_H
2CAN_L
3CAN_GND
4D1 (1)
5D0 (1)
6Not connected
7VP (2)
8Common (1)
(1) Modbus signals
(2) Supply for RS232 / RS485 converter or
a remote terminal
Protection against interference
• Use the Schneider-Electric cable with 2 pairs of shielded twisted conductors (reference: TSXCSA100, TSXCSA200, TSXCSA500).
• Keep the Modbus cable from the power cables (30 cm minimum).
• Make any crossovers of the Modbus cable and the power cables at right-angles, if necessary.
• Connect the cable shielding to the ground of each device.
For more information, please refer to the TSX DG KBL E guide: "Electromagnetic compatibility of industrial networks and fieldbuses".
RS485 bus schematic
The RS485 standard allows variants of different characteristics:
• polarisation
• line terminator
• distribution of a reference potential
• number of slaves
• length of bus
The new Modbus specification published on the Modbus.org site in 2002 contains precise details of all these characteristics. They are also
summarised in the next paragraph (Standard schematic). The new Schneider-Electric devices conform to this specification.
Some devices comply with earlier specifications. The two most widespread are described in the appendices:
• "Uni-Telway schematic" page 13
• "Jbus schematic" page 14
Requirements enabling different types of protocol to coexist are given in the appendix:
• "Mixed schematic" page 15
41624597 11/2009
Page 5
Connection to RS485 bus
1n F
650 Ω
650 Ω
120 Ω
1n F
120 Ω
5 V
0 V
T
R
T
R
T
R
D1
Common
D0
Master
Standard schematic
The standard schematic corresponds to the Modbus specification published on the Modbus.org site in 2002
(Modbus_over_serial_line_V1.pdf, Nov 2002) and in particular to the schematic of the 2-wire multidrop serial bus.
The ATV31 drive conforms to this specification.
Schematic diagram:
Slave 1
Type of trunk cable
Maximum length of bus
Maximum number of stations (without repeater)
Maximum length of tap links
Bus polarisation
Line terminator
Common polarity
Slave n
Shielded cable with 1 twisted pair and at least a 3rd conductor
1000 m at 19200 bps with the Schneider-Electric TSX CSAppp cable
32 stations, ie. 31 slaves
• 20 m for one tap link
• 40 m divided by the number of tap links on a multiple junction box
• One 450 to 650 Ω pulldown resistor at 5 V (650 Ω recommended)
• One 450 to 650
Ω pulldown resistor at the Common (650 Ω recommended)
This polarisation is recommended for the master.
One 120 Ω 0.25 W resistor in series with a 1nF 10 V capacitor
Yes (Common), connected to the protective ground at one or more points on the bus
1624597 11/20095
Page 6
Connection to RS485 bus
5
44
7
4
1
2
43466 5
A TV 31
####################
Connection via RJ45 wiring system
1 Master (PLC, PC or communication module)
2 Modbus cable depending on the type of master (see table)
For RJ45 connectorR = 120 Ω, C = 1 nFVW3 A8 306 RC
R = 150 Ω (specific to "Jbus schematic" page 14)VW3 A8 306 R
Connecting cables
DescriptionLength
Cables for
Modbus bus
RS 485 double
shielded twisted pair
cables
Type of master Master interfaceModbus connection accessories for RJ45 wiring system
Twido PLC
TSX Micro PLCMini-DIN RS485 connector
TSX Premium PLCTSX SCY 11601 or
Ethernet bridge
(174 CEV 300 10)
Profibus DP gateway
(LA9P307)
Fipio (LUFP1) or
Profibus DP (LUFP7) or
DeviceNet (LUFP9)
gateway
Serial port PCMale SUB-D 9 RS232 serial
61624597 11/2009
m
31 RJ45 connector and 1 stripped endVW3 A8 306 D30
0.32 RJ45 connectorsVW3 A8 306 R03
12 RJ45 connectorsVW3 A8 306 R10
32 RJ45 connectorsVW3 A8 306 R30
100Supplied without connectorTSX CSA 100
200Supplied without connectorTSX CSA 200
500Supplied without connectorTSX CSA 500
Adaptor or mini-DIN RS485
interface module
Adaptor or screw terminal
RS485 interface module
port
PCMCIA card (TSX SCP114)
TSX SCY 21601 module
(SUB-D 25 socket)
PCMCIA card (TSX SCP114)
Screw terminal RS4853 m cable fitted with an RJ45 connector and stripped at the
RJ45 RS4851 m cable fitted with 2 RJ45 connectorsVW3 P07 306 R10
RJ45 RS4850.3 m cable fitted with 2 RJ45 connectors or
port PC
ConnectorsReference
DescriptionReference
3 m cable fitted with a mini-DIN connector and an RJ45
connector
3 m cable fitted with an RJ45 connector and stripped at the
other end
3 m cable fitted with a mini-DIN connector and an RJ45
connector
Stripped cableTSX SCP CM 4030
Cable fitted with a SUB-D 25 connector and stripped at the
other end (for connection to the screw terminals of the
LU9GC3 splitter block)
Stripped cableTSX SCP CM 4030
other end
1 m cable fitted with 2 RJ45 connectors or
3 m cable fitted with 2 RJ45 connectors
RS232/RS485 converter and
3 m cable fitted with an RJ45 connector and stripped at the
other end (for connection to the screw terminals of the
LU9GC3 splitter block)
TWD XCA RJ030
VW3 A8 306 D30
TWD XCA RJ030
TSX SCY CM 6030
VW3 A8 306 D30
VW3 A8 306 R03 or
VW3 A8 306 R10 or
VW3 A8 306 R30
TSX SCA 72 and
VW3 A8 306 D30
Page 7
Connection to RS485 bus
32
6
1
7
45
A TV 31
############
Connection via junction boxes
1 Master (PLC, PC or communication module)
2 Modbus cable depending on the type of master
3 Modbus cable TSX CSAp00
4 Junction box TSX SCA 50
5 Subscriber sockets TSX SCA 62
6 Modbus drop cables VW3A8306
7 Modbus drop cable VW3 A8 306 D30
Connection accessories
DescriptionReference
Junction box
3 screw terminals and an RC line terminator, to be connected using cable VW3 A8 306 D30
Subscriber socket
2 female 15-way SUB-D connectors, 2 screw terminals, and RC line terminator, to be connected using cable
VW3 A8 306 or VW3 A8 306 D30
TSX SCA 50
TSX SCA 62
Connecting cables
DescriptionLengthmConnectorsReference
Cables for Modbus bus31 RJ45 connector and one stripped endVW3 A8 306 D30
51 RJ45 connector and 1 male 15-way SUB-D connector for TSX SCA 62 VW3 A8 306
RS 485 double shielded twisted
pair cables
Type of master Master interfaceModbus connection accessories for junction boxes using screw
Twido PLCAdaptor or screw terminal RS485
TSX Micro PLCMini-DIN RS485 connector port Junction boxTSX P ACC 01
TSX Premium PLCTSX SCY 11601 or
Ethernet bridge
(174 CEV 300 10)
Profibus DP gateway
(LA9P307)
Fipio (LUFP1) or
Profibus DP (LUFP7) or
DeviceNet (LUFP9) gateway
Serial port PCMale 9-way SUB-D RS232 serial
100Supplied without connectorTSX CSA 100
200Supplied without connectorTSX CSA 200
500Supplied without connectorTSX CSA 500
terminals
DescriptionReference
interface module
PCMCIA card (TSX SCP114)Cable fitted with a special connector and stripped
TSX SCY 21601 module
(SUB-D 25 socket)
PCMCIA card (TSX SCP114)Cable fitted with a special connector and stripped
Screw terminal RS485Modbus cableTSX CSA100 or
RJ45 RS4853 m cable fitted with an RJ45 connector and
RJ45 RS4853 m cable fitted with an RJ45 connector and
port PC
Modbus cableTSX CSA100 or
at the other end
Cable fitted with a SUB-D 25 connector and
stripped at the other end
at the other end
stripped at the other end
stripped at the other end
RS232/RS485 converter and
Modbus cable
TSX CSA200 or
TSX CSA500
TSX SCP CU 4030
TSX SCY CM 6030
TSX SCP CU 4030
TSX CSA200 or
TSX CSA500
VW3 A8 306 D30
VW3 A8 306 D30
TSX SCA 72 and
TSX CSA100 or
TSX CSA200 or
TSX CSA500
1624597 11/20097
Page 8
Modbus protocol
COM-
Add
tbr
tFO
Only one device can transmit on the line at any time.
The master manages the exchanges and only it can take the initiative.
It interrogates each of the slaves in succession.
No slave can send a message unless it is invited to do so.
The master repeats the question when there is an incorrect exchange, and declares the interrogated slave
absent if no response is received within a given time period.
If a slave does not understand a message, it sends an exception response to the master. The master may or
may not repeat the request.
Master
Slave i
Slave k
Slave j
Configuration of the serial link
Configuration of the serial link parameters can be accessed from the Communication menu
ParametersPossible valuesTerminal displayDefault value
Address1 to 247001 to 2471
Speed4800 bps
9600 bps
19200 bps (1)
Format8 data bits, odd parity, 1 stop bit
8 data bits, even parity, 1 stop bit (1)
8 data bits, no parity, 1 stop bit
8 data bits, no parity, 2 stop bits
(1) The display terminal will only work with these values.
4.8
9.6
19.2
8O1
8E1
8n1
8n2
RTU mode
The transmission mode used is RTU mode. The frame contains no message header byte, nor end of message bytes.
It is defined as follows:
Slave
address
The data is transmitted in binary code.
CRC16: cyclical redundancy check.
The end of the frame is detected on a silence greater than or equal to 3 characters.
Request codeDataCRC16
Principle
The Modbus protocol is a master-slave protocol.
19200 bps
8E1
Direct slave-to-slave communications are not possible.
For slave-to-slave communication, the application software must therefore be designed to interrogate a slave and send back data received
to the other slave.
Two types of dialogue are possible between master and slaves:
• the master sends a request to a slave and waits for its response
• the master sends a request to all slaves without waiting for a response (broadcasting principle)
Addresses
• The drive Modbus address can be configured from 1 to 247.
• Address 0 coded in a request sent by the master is reserved for broadcasting. ATV 31 drives take account of the request, but do not
respond to it.
81624597 11/2009
Page 9
Modbus protocol
Modbus functions
The following table indicates which Modbus functions are managed by the Altivar 31, and specifies their limits.
The “read” and “write” functions are defined from the point of view of the master.
Code
(decimal)
3Read N output wordsNO29 words max.Read Holding Registers
6Write one output wordYES–Preset Single Register
16Write N output wordsYES27 words max.Preset Multiple Regs
43IdentificationNO–Read Device Identification
Function nameBroadcastingMax. value of NModbus standard name
Read N output words: function 3
Note:
Hi = high order byte, Lo = low order byte.
This function can be used to read all ATV 31 words, both input words and output words.
Request
Slave
no.
1 byte1 byte2 bytes2 bytes2 bytes
Response
Slave
no.
1 byte1 byte1 byte2 bytes2 bytes2 bytes
Example: read 4 words W3102 to W3105 (16#0C1E to 16#0C21) in slave 2, using function 3, where:
• Object no. 3: Device version, in “MMmm” format where “MM” represents the determinant and “mm” the subdeterminant (4-byte ASCII
Note: The response to function 43 may be negative; in this case, the response located at the top of the next page is sent by the Altivar 31
rather than the response described above.
string; for example: “0201” for version 2.1).
101624597 11/2009
Page 11
Modbus protocol
Negative response
Slave
no.
1 byte1 byte1 byte1 byte1 byte1 byte
Error code:• 16#00 = No error
Example: Following the request from the Modbus master, slave 2 identifies itself as follows:
• Manufacturer name = “Schneider-Electric” (13 bytes)
• 16#01 = The “Request code” (16#2B), the “Type of MEI” (16#0E) or the “ReadDeviceId” (16#01) contained in the
• 16#02 = The “Object Id” (16#00) contained in the request is incorrect
Type of MEI
0E
request is incorrect
Error code
00 to 02
CRC16
LoHi
-------020430 32 30 31A80F
Write N output words: function 16 (16#10)
Request
No.
slave
1 byte1 byte2 bytes2 bytes1 byte2 bytes2 bytes
Response
Slave
no.
1 byte1 byte2 bytes2 bytes2 bytes
Example: write values 20 and 30 in words W4043 and W4044 in slave 2
(ACC = 20 s and DEC = 30 s)
Request02100FCB0002040014001E30F4
Response02100FCB00023311
10No. of first wordNumber of
HiLoHiLoLoHi
10No. of first wordNumber of wordsCRC16
HiLoHiLoLoHi
words
Number of
bytes
Value of first word-------CRC16
1624597 11/200911
Page 12
Modbus protocol
Exception responses
An exception response is returned by a slave when it is unable to perform the request which is addressed to it.
Format of an exception response:
Slave
no.
1 byte1 byte1 byte2 bytes
Response code: request function code + 16#80.
Error code:
1 = The function requested is not recognized by the slave
2 = The bit or word addresses indicated in the request do not exist in the slave
3 = The bit or word values indicated in the request are not permissible in the slave
4 = The slave has started to execute the request but cannot continue to process it completely
Response
code
Error
code
CRC16
LoHi
CRC16 calculation
The CRC16 is calculated on all the message bytes by applying the following method:
Initialize the CRC (16-bit register) to 16#FFFF.
Enter the first to the last byte of the message:
CRCXOR<byte> —> CRC
Enter8 times
Move the CRC one bit to the right
If the output bit = 1, enter CRC XOR 16#A001—> CRC
End enter
End enter
The CRC obtained will be transmitted with the low order bytes sent first, followed by the high order ones (unlike the other data contained in
Modbus frames).
XOR = exclusive OR.
121624597 11/2009
Page 13
Appendix: Non-standard RS485 schematics
1 nF
4.7 kΩ
4.7 kΩ
4.7 kΩ
4.7 kΩ
120 Ω
1 nF
120 Ω
5 V
0 V0 V
4.7 kΩ
R
T
R
T
4.7 kΩ
5 V
5 V
0 V
R
T
D(B)
0VL
D(A)
Slave 1
Slave n
Master
Uni-Telway schematic
The Uni-Telway bus schematic has been used by Schneider-Electric for its drives and soft starters (ATV58, ATV28, etc).
Schematic diagram:
Type of trunk cableCable with 2 twisted pairs shielded in pairs
Maximum length of bus1000 m at 19200 bps
Maximum number of stations (without
repeater)
29 stations, ie. 28 slaves
Maximum length of tap links• 20 m
• 40 m divided by the number of tap links on a multiple junction box
Bus polarisationFor the master and each slave:
• One 4.7 kΩ pulldown resistor at 5 V
• One 4.7 kΩ pulldown resistor at 0 VL
Line terminatorOne 120 Ω 0.25 W resistor in series with a 1 nF 10 V capacitor
Common polarityYes (0 VL) and high impedance placed between 0 VL and the ground in each station
1624597 11/200913
Page 14
Appendix: Non-standard RS485 schematics
470 Ω
470 Ω
150 Ω150 Ω
5 V
0 V
T
R
T
R
T
R
L- (B/B')
L+ (A/A')
Slave 1Slave n
Master
Jbus schematic
Schematic diagram:
Type of trunk cableCable with 1 shielded twisted pair
Maximum length of bus1300 m at 19200 bps
Maximum number of stations (without
32 stations, ie. 31 slaves
repeater)
Maximum length of tap links3 m
Bus polarisationOne 470 Ω pulldown resistor at 5 V
One 470 Ω pulldown resistor at 0 V
This polarisation is often provided in the master.
Line terminatorOne 150 Ω resistor
Common polarityNo
141624597 11/2009
Page 15
Appendix: Non-standard RS485 schematics
1 nF
4.7 kΩ
Rp
Rp
120 Ω
5 V
0 V
5 V
0 V
D1
Common
D0
R
T
T
R
T
R
4.7 kΩ
1 nF
120 Ω
Slave 1
Slave n
Master
Mixed schematic
Slaves with 4.7 kΩ polarisation can be integrated into a standard schematic. Suitable polarisation (Rp) must be calculated.
Schematic diagram:
Type of trunk cableShielded cable with 1 twisted pair and at least a 3rd conductor
Maximum length of bus1000 m at 19200 bps
Maximum number of stations
At most 32 stations ie. 31 slaves (depending on Rp and the number of 4.7 kΩ resistors)
(without repeater)
Maximum length of tap links• 20 m for a single tap link
• 40 m divided by the number of tap links on a multiple junction box
Bus polarisation• One pulldown resistor at 5 V (Rp)
• One pulldown resistor at the Common (Rp)
This polarisation can be provided in the master.
The value of Rp should be validated (or determined) by calculating the equivalent polarisation (Re)
according to the polarisation of the master and slave stations.
The value of Re must be between 162 Ω and 650 Ω (recommended value: 650 Ω).
Line terminatorOne 120 Ω 0.25 W resistor in series with a 1 nF 10 V capacitor
Common polarityYes (Common)
• To calculate the polarisation (Rp), all station polarisations must be deemed to be connected in parallel.
Example:
If the bus Rp polarisation is 470 Ω (installed in the master) and 2 slaves have 4700 Ω polarisation, the equivalent polarisation is:
1/Re = 1/470 + 1/4700 + 1/4700
ie. Re = 1/ (1/470 + 1/4700 + 1/4700)
and therefore Re = 390 Ω.
390 Ω is greater than 162 Ω, and the schematic is correct.
For an ideal equivalent polarisation (650 Ω), Rp bus polarisation can be installed so that:
1/650 = 1/Rp + 1/4700 + 1/4700
ie. Rp = 1/(1/650 - 1/4700 - 1/4700)
and therefore Rp = 587 Ω.
• If the master is fitted with a 470 Ω polarisation, it is possible to connect a maximum of 18 slaves with 4.7 kΩ polarisation.
1624597 11/200915
Page 16
Appendix: Non-standard RS485 schematics
Recommendations for setting up a Modbus network using non-standard devices
1. Identify polarities D0 and D1.
They are labeled in a variety of ways according to the specification used:
ModbusD0D1Common
EIA/TIA-485A / A’B / B’C / C’
UNI-TELWAYD(A)D(B)0VL
Jbus
However, certain RS485 electronic components are labeled in the opposite way to the EIA/TIA-485 standard.
It may be necessary to perform a test by connecting a master to a slave, then reversing the connection in the event of failure.
2. Check polarizations.
Study the documentation supplied with the devices to determine the polarization resistance.
If there is one, check that the value is correct (see Mixed schematic page 15
Polarization is not always possible. For example, in the event of the 5 V not being available in the master.
RD + / TD +
L +
RD - / TD -
L -
)
3. Select a line terminator.
In the case of polarization, select an RC line terminator (R = 120 Ω, C = 1 nF).
If polarization is not possible, select an R line terminator (R = 150 Ω).
161624597 11/2009
Page 17
ATV31_modbus_manual_EN_1624597_03
1624597 11/2009
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.