RS 485 Modbus
RS 485 Modbus
nx frequency converters
rs-485 (multiprotocol)
option board
INDEX Document code: UD00972C
Date 04.12.2006
1. GENERAL ........................................................................................................................... 3
2. RS-485 OPTION BOARD TECHNICAL DATA ........................................................................ 4
2.1 General ............................................................................................................................................ 4
3. RS-485 FIELDBUS BOARD LAYOUT AND CONNECTIONS ................................................... 5
3.1 RS-485 OPT-C2 option board .......................................................................................................... 5
3.2 RS-485 OPT-C8 option board .......................................................................................................... 6
3.3 Grounding ........................................................................................................................................ 7
3.3.1 Grounding by clamping the cable to the converter frame................................................. 7
3.3.2 Grounding only one point on the net .................................................................................. 9
3.3.3 Grounding jumper X1 ........................................................................................................ 10
3.4 Bus terminal resistors .................................................................................................................. 11
3.5 Bus Biasing.................................................................................................................................... 12
3.6 LED indications.............................................................................................................................. 13
4. INSTALLATION OF VACON NX RS-485 BOARD ................................................................. 14
5. COMMISSIONING.............................................................................................................. 16
5.1 Fieldbus board parameters .......................................................................................................... 16
6. MODBUS........................................................................................................................... 19
6.1 Modbus RTU protocol, introduction.............................................................................................. 19
6.1.1 Supported functions.......................................................................................................... 21
6.1.2 Exception responses......................................................................................................... 23
6.2 Modbus interface........................................................................................................................... 25
6.2.1 Modbus registers .............................................................................................................. 25
6.2.2 Process data...................................................................................................................... 25
6.2.3 Process data in.................................................................................................................. 26
6.2.4 Process data out ............................................................................................................... 27
6.2.5 Parameters ....................................................................................................................... 30
6.2.6 Actual values ..................................................................................................................... 30
6.2.7 Example messages ........................................................................................................... 31
6.3 Start-up test .................................................................................................................................. 33
7. METASYS N2..................................................................................................................... 34
7.1 Metasys N2 Protocol Introduction ................................................................................................ 34
7.2 Metasys N2 interface..................................................................................................................... 34
7.2.1 Analogue Input (AI)............................................................................................................ 34
7.2.2 Binary Input (BI) ................................................................................................................ 34
7.2.3 Analogue Output (AO)........................................................................................................ 35
7.2.4 Binary Output (BO) ............................................................................................................ 35
7.2.5 Internal Integer (ADI) ........................................................................................................ 35
7.3 N2 POINT MAP............................................................................................................................... 36
7.3.1 Analogue Inputs (AI).......................................................................................................... 36
7.3.2 Binary Inputs (BI) .............................................................................................................. 37
7.3.3 Analogue Outputs (AO)...................................................................................................... 37
7.3.4 Binary Outputs (BO) .......................................................................................................... 38
7.3.5 Internal Integers (ADI) ...................................................................................................... 38
8. FAULT TRACKING............................................................................................................. 39
APPENDIX 1 ............................................................................................................................................... 40
general vacon • 3
1. GENERAL
Instead of sending and receiving information to and from frequency converters through I/O, you can
connect them to a fieldbus.
Vacon NX frequency converters can be connected to the RS-485 bus using a fieldbus board. The con-
verter can then be controlled, monitored and programmed from the host system.
If you purchase your RS-485 Option Board separately, please note that it shall be installed in slot E on
the control board of the frequency converter.
Internal components and circuit boards are at high potential when the frequency
converter is connected to the power source. This voltage is extremely dangerous
and may cause death or severe injury if you come into contact with it.
WARNING!
1
2
3 X4
4
5
X1
Bus connector Jumpers Interface board connector
Grounding plate
Figure 1. Vacon RS-485 option board OPT-C2
5 4 3 2 1
9 8 7 6
X4
X1
3.3 Grounding
3.3.1 Grounding by clamping the cable to the converter frame
This manner of grounding is the most effective and especially recommended when the distances be-
tween the devices are relatively short or if the device is the last device on the net.
Note: Normally, the option board has already been installed in slot D or slot E of the control board. It
is not necessary to detach the whole board for the grounding of the bus cable shield. Just detach the
terminal block.
1 Strip about 5 cm of the cable and cut off the grey cable shield.
Remember to do this for both bus cables (except for the last device). See pictures below.
2 Leave no more than 1 cm of the cable outside the terminal block and strip the data cables at
about 0.5 cm to fit in the terminals. See pictures below.
Note: Do this for both bus cables.
Figure 3.
1 2 3 4 5
A B
Figure 4.
3 Insert the data cables of both cables into terminals #3 (Line B) and #4 (Line A).
4 Strip the cable at such a distance from the terminal that you can fix it to the frame with the
grounding clamp. See
Figure 5.
1 Strip about 5 cm of the cable and cut off the grey cable shield. Remember to do this for both
bus cables (except for the last device).
2 Leave no more than 1 cm of the cable outside the terminal block and strip the data cables at
about 0.5 cm to fit in the terminals. See Figure 6.
Note: Do this for both bus cables.
1 2 3 4 5
Shield A B
Figure 6.
3 Fix both the cables on the frame with the clamp. See Figure 7.
Figure 7.
5 4 3 2 1
9 8 7 6
ON
OFF X4
X1
5 4 3 2 1
9 8 7 6
ON
OFF X4
X1
Figure 9. Using jumper X4 to set the bus termination.
1
2
A DATA- 3
B DATA+ 4
5
5
Matters related to this are discussed in the application note Failsafe Biasing of Differential Buses (an-
847.pdf) published by National Semiconductor (www.national.com).
Yellow
Green
1
2
3 X4
4
5
X1
Figure 10. LED indications on the RS-485 board
D Install RS-485 option board in slot E on the control board of the frequency con-
verter. Make sure that the grounding plate (see below) fits tightly in the clamp.
1
2
3 X4
4
5
X1
5. COMMISSIONING
READ FIRST CHAPTER 8 'COMMISSIONING' IN VACON NX USER'S MANUAL (Document nr. ud00701,
please visit http://www.vacon.com/925.html).
Note! You must select Fieldbus as the active control place, if you wish to control the frequency con-
verter through fieldbus. See Vacon NX User’s Manual, Chapter 7.3.3.1.
RS-485 parameters
To commission the RS-485 board, enter the level P7.5.1.# from the Parameters group (G7.5.1). Give
desired values to all RS-485 parameters (see Figure 11 and Table 5).
The parameters of every device must be set before connecting to the bus. Especially the parameters
Communication Protocol, Slave Address and Baud Rate must be the same as in the master configura-
tion.
Communication timeout
The RS-485 board initiates a communication error if communication is broken for as long as defined
by the Communication Timeout. Communication Timeout is disabled when given the value 0.
Communication status
To see the present status of the RS-485 fieldbus, enter the Comm.Status page from Monitor menu
(G7.5.2). See Figure 12 and Table 6 below.
READY READY
I/Oterm I/Oterm
Good messages
0…999 Number of messages received without
communication errors
Error messages
0…64 Number of messages received with
CRC or parity errors
Table 6. RS-485 message indications
6. MODBUS
6.1 Modbus RTU protocol, introduction
The MODBUS protocol is an industrial communications and distributed control system to integrate
PLCs, computers, terminals, and other monitoring, sensing, and control devices. MODBUS is a Mas-
ter-Slave communications protocol. The Master controls all serial activity by selectively polling one or
more slave devices. The protocol provides for one master device and up to 247 slave devices on a
common line. Each device is assigned an address to distinguish it from all other connected devices.
The MODBUS protocol uses the master-slave technique, in which only one device (the master) can
initiate a transaction. The other devices (the slaves) respond by supplying the request data to the
master, or by taking the action requested in the query. The master can address individual slaves or
initiate a broadcast message to all slaves. Slaves return a message (‘response’) to queries that are
addressed to them individually. Responses are not returned to broadcast queries from the master.
A transaction comprises a single query and single response frame or a single broadcast frame. The
transaction frames are defined below.
Master's Slave
message response
START START
ADDRESS ADDRESS
FUNCTION FUNCTION
DATA DATA
CRC CRC
END END
Valid slave device addresses are in the range of 0 ... 247 decimal. The individual slave devices are as-
signed 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.
The function code field of a message frame contains two characters (ASCII) or eight bits (RTU). Valid
codes are in the range of 1 ... 255 decimal. When a message is sent from a master to a slave device
the function code field tells the slave what kind of action to perform. Examples are to read the ON /
OFF states of a group of discrete coils or inputs; to read the data contents of a group of registers; to
read the diagnostic status of the slave; to write to designated coils or registers; or to allow loading,
recording, or verifying the program within the slave.
When the slave responds to the master, it uses the function code field to indicate either a normal (er-
ror-free) response or that some kind of error occurred (called an exception response). For a normal
response, the slave simply echoes the original function code. For an exception response, the slave
returns a code that is equivalent to the original function code with its most significant bit set to a logic
1.
The data field is constructed using sets of two hexadecimal digits, in the range of 00 to FF hexadeci-
mal. These can be made from a pair of ASCII characters, or from one RTU character, according to the
network's serial transmission mode.
The data field of messages sent from a master to slave devices contains additional information which
the slave must use to take the action defined by the function code. This can include items like discrete
and register addresses, the quantity of items to be handled, and the count of actual data bytes in the
field.
If no error occurs, the data field of a response from a slave to a master contains the data requested. If
an error occurs, the field contains an exception code that the master application can use to determine
the next action to be taken.
Two kinds of checksum are used for standard Modbus networks. The error checking field contents
depend upon the transmission method that is being used.
Example of a request to preset two registers starting at 42001 to 0001hex and 0010hex in Slave device
1:
Message frame:
01 04 17 70 00 05 34 66
Exception response.
Reply frame:
01 14 02 AE C1
All values can be read with function codes 3 and 4 (all registers are 3X and 4X reference). Modbus
registers are mapped to drive ID’s as follows:
The use of process data depends on the application. In a typical situation, the device is started and
stopped with the ControlWord (CW) written by the Master and the Rotating speed is set with Refer-
ence (REF). With PD1…PD8 the device can be given other reference values (e.g. Torque reference).
With the StatusWord (SW) read by the Master, the status of the device can be seen. Actual Value (ACT)
and PD1…PD8 show the other actual values.
In Vacon applications, the three first bits of the control word are used to control the frequency con-
verter. However, you can customise the content of the control word for your own applications because
the control word is sent to the frequency converter as such.
Bit Description
Value = 0 Value = 1
0 Stop Run
1 Clockwise Counterclockwise
2 Rising edge of this bit will reset active fault
3….15 Not in use Not in use
Table 13. Control word bit descriptions
This is the Reference 1 to the frequency converter. Used normally as Speed reference.
The allowed scaling is –10000...10000. In the application, the value is scaled in percentage of the fre-
quency area between the set minimum and maximum frequencies.
Information about the status of the device and messages is indicated in the Status word. The Status
word is composed of 16 bits that have the following meanings:
Bit Description
Value = 0 Value = 1
0 Not Ready Ready
1 STOP RUN
2 Clockwise Counterclockwise
3 - Faulted
4 - Warning
5 Ref. frequency not reached Ref. Frequency reached
6 - Motor is running at zero speed
7 Flux Not Ready Flux Ready
8 TC Speed Limit Active TC Speed Limit Not Active
9 Detected Encoder Direction Clockwise Encoder Direction Counterclockwise
10 UV Fast Stop Active UV Fast Stop Not Active
11...15 Not In use Not In use
Table 15. Status word bit descriptions
Bit Description
0...12 Not in use
13 Fieldbus control, (1 = FB control active)
14 Panel control, (1 = Panel control active)
15 I/O Control, (1 = I/O control active)
Table 16. General status word bit descriptions
This is the reference 1 to the frequency converter. Used normally as Speed reference.
The allowed scaling is –10000...10000. In the application, the value is scaled in percentage of the fre-
quency area between set minimum and maximum frequency.
6.2.5 Parameters
The parameter addresses are determined in the application. Every parameter has been given an ID
number in the application. The ID numbering of the parameter as well as the parameter ranges and
steps can be found in the application manual in question. The parameter value shall be given without
decimals. The following functions can be activated with parameters:
Write the process data 42001…42003 with command 16 (Preset Multiple Registers).
Message frame:
01 10 07 D0 00 03 06 00 01 00 00 13 88 C8 CB
The reply to Preset Multiple Registers message is the echo of 6 first bytes.
Reply frame:
01 10 07 D0 00 03 F1 01
Example 2
Read the Process Data 42103…42104 with command 4 (Read Input Registers).
Message frame:
01 04 08 36 00 02 93 A5
The reply to the Read Input Registers message contains the values of the read registers.
Reply frame:
01 04 02 13 88 09 C4 F0 E9
Master software
1. Set FB Control Word (MBaddr 42001) value to 1hex.
4. The Actual value is 5000 and the frequency converter output frequency is 25,00 Hz.
7. METASYS N2
7.1 Metasys N2 Protocol Introduction
The N2 communications protocol is used by Johnson Controls and others to connect terminal unit
controllers to supervisory controllers. It is open to any manufacturer and based upon a simple ASCII
protocol widely used in the process control industry.
The physical characteristics of the N2 bus are three wire RS-485 with a maximum of 100 devices over
a 4,000 foot distance running at 9,600 bps. Logically, the N2 is a master-slave protocol, the supervi-
sory controller normally being the master. Data is partitioned into common HVAC control objects,
such as analogue input, analogue output, binary input and binary output. N2 messaging supports the
reading, writing and overriding of these points. Additionally, there are messages defined to perform
uploads and downloads of devices as well as direct memory reads and writes.
Overriding is supported from the standpoint that the “Override Active” bit will be set and the value re-
ported to the N2 network will be the overridden value. However, the value in the drive remains un-
changed. Therefore, the N2 system should be set up to disallow overriding BI points or have an alarm
condition activated when a BI point is overridden.
Note:
On some N2 systems, the system will not poll the AO point when it is being overridden. In this case,
the N2 system will not notice a change in value if the change is made with the keypad. To avoid this,
set the point up as a ”local control” type and release it once it has been overridden. In this way, the N2
system will monitor the value when not being overridden.
8. FAULT TRACKING
The table below presents the faults related to the RS-485 option board. For more information, see
also Vacon NX User's Manual, Chapter 9.
The RS-485 option board status LEDs have been described in more detail in Chapter 3.6.
You can define with parameters how the frequency converter shall react to certain faults:
APPENDIX 1
The Fieldbus Master can read the frequency converter’s actual values using process data variables.
Basic, Standard, Local/Remote Control, Multi-Step Speed Control, PID control and Pump and fan con-
trol applications use process data as follows:
The Multipurpose Control application has a selector parameter for every Process Data. The monitor-
ing values and drive parameters can be selected using the ID number (see NX All in One Application
Manual, Tables for monitoring values and parameters). Default selections are as in the table above.
Vacon distributor: