Milltronics smartlinx User manual

Instruction Manual February 2004
MODBUS RTU
smartlinx interface module

© Siemens MilltronicsProcessInstruments Inc. 2004
Safety Guidelines
Warning notices must be observed to ensure personal safety as well as that of others, and to
protect the product and the connected equipment. These warning notices are accompanied
by a clarification of the level of caution to be observed.
Qualified Personnel
This device/system may only be set up and operated in conjunction with this manual.
Qualified personnel are only authorized to install and operate this equipment in accordance
with established safety practices and standards.
Warning: This product can only function properly and safely if it is correctly transported,
stored, installed, set up, operated, and maintained.
Note: Always use product in accordance with specifications.
Copyright Siemens Milltronics Process
Instruments Inc.2004.AllRights ReservedDisclaimer of Liability
This document is available in bound version and in
electronic version. We encourage users to
purchase authorized bound manuals, or to view
electronic versions as designed and authored by
Siemens Milltronics Process Instruments Inc.
Siemens Milltronics Process Instruments Inc. will
not be responsible for the contents of partial or
whole reproductions of either bound or electronic
versions.
While we have verified the contents of
this manual for agreement with the
instrumentation described, variations
remain possible. Thus we cannot
guarantee full agreement. The
contents of this manual are regularly
reviewed and corrections are included
in subsequent editions. We welcome
all suggestions for improvement.
Technical data subject to change.
MILLTRONICS®is a registered trademark of Siemens Milltronics Process Instruments Inc.
Contact SMPI Technical Publications at the following address:
Technical Publications
Siemens Milltronics Process Instruments Inc.
1954 Technology Drive, P.O. Box 4225
Peterborough, Ontario, Canada, K9J 7B1
Email: techpubs@siemens-milltronics.com
For the libraryof SMPI instruction manuals, visitour Web site: www.siemens-milltronics.com

i
Table of Contents
About this Module .......................................................................................................................................1
Typical Modbus RTU RS-485 System .................................................................................................1
Typical Modbus RTU RS-232 System .................................................................................................2
About this Manual .......................................................................................................................................3
Specifications ...............................................................................................................................................4
Installation ......................................................................................................................................................5
Compatibility .............................................................................................................................................5
Module Outline ........................................................................................................................................5
Termination Switch .................................................................................................................................6
Port Configuration ...................................................................................................................................6
Reserved Switch ......................................................................................................................................6
Cable Connection ....................................................................................................................................7
Operation .........................................................................................................................................................9
Status LEDs ...............................................................................................................................................9
Initialization LED ......................................................................................................................................9
Communications Setup ..........................................................................................................................10
General .....................................................................................................................................................10
Specific Parameters .............................................................................................................................10
Application Layer ......................................................................................................................................12
Parameter Indexes ................................................................................................................................12
How Modbus RTU Works ....................................................................................................................13
Register Mapping ..................................................................................................................................14
Data Access Methods ..........................................................................................................................15
Register Map – Level Products .........................................................................................................17
Data Types ...............................................................................................................................................21
Modbus RTU Error Codes ...................................................................................................................24
Troubleshooting ..........................................................................................................................................25
Generally .................................................................................................................................................25
Specifically ..............................................................................................................................................25
Wiring Guidelines .....................................................................................................................................26

ii

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 1
mmmmm
About this Module
About this Module
The Milltronics SmartLinx®Modbus® RTU Module plugs into a compatible Milltronics
instrument to allow connection to any Modbus RTU master controller.
Modbus RTU is an industry standard protocol that is supported by many different
instruments. A brief description of the protocol and the Milltronics memory map are
outlined in Modbus RTU Protocol section of this manual (see page 20).
Only those instruments which support the SmartLinx Modbus RTU module can use this
card. See Specifications on page 5 for a list of compatible instruments.
Typical Modbus RTU RS-485 System
®. Modbus is a registered trademark of Schneider Electric.
mA
5
9
C
PP
6
0
78
1234

Page 2 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
About this Module
Typical Modbus RTU RS-232 System
mA
5
9
C
PP
6
0
78
1234

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 3
mmmmm
About this Manual
About this Manual
This manual is intended to provide the user with the information required to successfully
install and connect a Milltronics SmartLinx Modbus RTU module and set it up for
communication within a Modbus RTU network.
This manual is targeted to a technical audience in the industrial communications field
with a sound working knowledge of Modbus RTU.
Modbus RTU is an industry standard protocol owned by Schneider Electric and is used
throughout process control industries for communication between instruments, including
those manufactured by Milltronics, and controllers, such as PLCs and PCs.
A brief description of Modbus RTU is given in this manual. For a full description of the
Modbus RTU protocol, contact Schneider Electric or visit their website at
www.modicon.com.
If you have any questions, comments, or suggestions about the manual contents, please
email us at techpubs@siemens-milltronics.com.
For the complete library of Siemens Milltronics manuals,
go to www.siemens-milltronics.com.
Note: Milltronics does not own the Modbus RTU protocol. All information regarding
that protocol is subject to change without notice.

Page 4 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Specifications
Specifications
Application:
• compatible with Modbus RTU masters that use function codes 03, 06, 16
Compatible Instruments:
• AiRanger XPL Plus/SITRANS LU 10
• AiRanger DPL Plus/SITRANS LU 02
• AiRanger SPL/SITRANS LU 01
•CraneRanger
• InterRanger DPS 300
Communication Settings
• baud rate: 1200, 2400, 4800, 9600, 19200, 38400 bps
• parity: none, odd or even
• stop bit: 1 or 2
• data bits: 8
• hardware flow control: none
Connection:
• 6-position screw terminal
Termination:
• RS-485 switch selectable, open or 110 Ωinternal
Cable:
• for RS-232 connection use cable consistent with the RS-232 standard
• for RS-485 connection use cable consistent with the RS-485 standard
(see Wiring Guidelines on page 26 for more suggestions)

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 5
mmmmm
Installation
Installation
The SmartLinx module may have been shipped installed in your unit, or separately for
onsite installation. Refer to the manual for the Milltronics SmartLinx instrument for
details on module location and physical installation.
Compatibility
AiRanger Series
• AiRanger XPL Plus/SITRANS LU 10
• AiRanger DPL Plus/SITRANS LU 02
• AiRanger SPL/SITRANS LU 01
•CraneRanger
• InterRanger DPS 300
Module Outline
module connector (underside) to
Milltronics instrument initialization LED
cable connector
to host
1.6 m
termination switch
status LEDs
reserved
port configuration

Page 6 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Installation
Termination Switch
Termination is generally of concern when communicating at higher baud rates, and when
the Milltronics host instrument is the unique or terminating slave.
If the 110 Ωswitched termination is inappropriate, set the switch to open and connect an
appropriate resistor across terminals 4 and 5.
Port Configuration
Switch one configures the port for either RS-232 or RS-485 transmission.
Reserved Switch
These switches are reserved and must be left in their factory setting.
termination setting
open off
110 Ωon
transmission dip switches
RS-232
RS-485
ON
18
ON
18
ON
16

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 7
mmmmm
Installation
Cable Connection
RS-232 Connection PC Connection
RS-232 Connect to Modem
Note: No hardware flow control is used.
SmartLinx Modbus
RTU
customer instrument
9-pin D-shell 25-pin D-shell
SmartLinx Modbus
RTU
modem
9-pin D-shell 25-pin D-shell
Note: When using a modem, set the value of P758 to 15. See page 18.
253
654321
RX
TX
GND
SHLD
A
B
RS 232
RS 485
273
654321
RX
TX
GND
SHLD
A
B
RS 232
RS 485
253
654321
RX
TX
GND
SHLD
A
B
RS 232
RS 485
273
654321
RX
TX
GND
SHLD
A
B
RS 232
RS 485

Page 8 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Installation
RS-485 Connection
Use a quality dual twisted pair shielded cable, such as Belden 9842, (120 Ohms and less
than 17 pf per foot). Sometimes A is marked "-" and B is marked "+". Do not connect A to B
(or - to +) on an RS-485 link or it will not work. (This is a common error.) SG refers to signal
ground; the cable shield must be kept separate and be connected to earth at one end
only.
SmartLinx Modbus
RTU
Customer instrument
Connect ground as required.
Refer to page 12 for termination.
Note: For multidrop applications, pin 6 can be used to continue the shield. This
terminal is not connected internally to anything.
6543
B
2
A
1
RX
TX
GND
SHLD
A
B
RS 232
RS 485
SG

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 9
mmmmm
Operation
Operation
Communication on the Modbus RTU network is indicated by four SmartLinx LEDs. Three
of the LEDs are grouped together at the bottom centre of the module and the other is
located on the upper right of the module.
Status LEDs
Initialization LED
Green LED
• blinks as the module is initialized
• remains ON to indicate module is ready
Green LED
• blinks as the module is initialized
• turns ON when the first Modbus RTU
command is received
• flickers as additional Modbus RTU
commands are received
Red LED
• blinks as the module is initialized
• indicates module failure (replace
module):
• flashes 4 times per second to
indicate a DPRAM fault
• flashes 2 times per second to
indicate a ROM fault
• flashes once per second to indicate
a RAM fault
LED
• blinks orange as the module is initialized
• flashes green during normal operation

Page 10 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Communications Setup
Communications Setup
General
The following parameters must be defined in the Milltronics instrument to establish
successful communication. Instructions on how to set these parameters are found in the
associated instrument manual.
Specific Parameters
P751 Baud Rate
Sets the baud rate according to the table:
P752 Parity Mode
Sets the parity mode according to the table:
P753 Slave Address
Sets the slave address. Valid address range is 1 to 247 (factory setting is 1).
Notes:
•
f
denotes factory setting.
• The SmartLinx module only supports 8 data bits, and no hardware flow control.
• For odd or even parity, use 1 stop bit. For no parity, use two stop bits (as per
Modbus RTU specification).
0=1200bps
1=2400bps
2=4800bps
3=9600bps
4 = 19200 bps
f
5 = 38400 bps
0=noparity
f
1=oddparity
2=evenparity

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 11
mmmmm
Communications Setup
P758 Interframe Spacing
The silent time expected, in milliseconds, between two adjacent data packets.
A value of zero “0” selects the traditional 3 and half characters (recommended) as the
time interval that separates one command from the next.
Any value from 1 to 32 specifies the time in milliseconds. A value of 33 specifies the
highest possible value of 32.678 ms.
Values:
0 to 33
Preset: 0
Note: When a modem is being used, set this parameter to a value of 15. See page 13
for more information on configuring a modem.

Page 12 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Application Layer
Application Layer
Modbus RTU is an industry standard protocol owned by Schneider Electric and is used
throughout process control industries for communication between instruments. Modbus
RTU is a master-slave type protocol. An instrument with a SmartLinx Modbus RTU is a
slave unit.
SmartLinx Modbus RTU only supports the RTU mode of Modbus, and
not
ASCII.
A brief description of Modbus RTU is given in this manual. For a full description of the
Modbus RTU protocol, contact Schneider Electric or visit their website at
www.modicon.com
Parameter Indexes
Most parameters used on Milltronics SmartLinx instruments are indexed. Indexing allows
a parameter to relate to more than one input or output. For example, some parameters
are indexed by measurement point while others are indexed by relay or discrete input.
An index that relates to an input or output is called a Primary Index.
Example of a primary index:
P111[3] = 50 (Relay Control Function for relay 3 = 50, pump control)
Sometimes a parameter requires a second index to allow for multiple values on an
indexed input or output. For example a measurement point which calculates a reading on
volume can require characterization breakpoints.
These breakpoints are given on a secondary index (the primary index relates to the
transducer input).
An index that relates to a previously indexed parameter is called a secondary index.
P111
[1] [2] [3] [4] [5]

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 13
mmmmm
Application Layer
Examples of secondary indexes are:
P054[1,5] = P054 (Breakpoint Levels) for breakpoint 5 on transducer 1 = 1.6 m
The way that indexes are handled in the memory map depends on the data access
method used.
How Modbus RTU Works
As mentioned previously, Modbus RTU is a master-slave type protocol. Sometimes this is
referred to as a query-response protocol. These terms mean is that on the network, there
is one master which requests information from the slave instruments. This is done using
a “function code” which indicates the information or the action being requested. The
slave instruments are not permitted to talk unless they have been asked for information.
When responding, the slave will either give the information that the master has
requested or send back an error code which would either say why it cannot give the
information or that it did not understand the request.
Modbus RTU was designed for communication between PLCs and sensing instruments.
Therefore the protocol makes reference to inputs, outputs, coils, registers, and forcing.
For our purposes, everything has been mapped into holding registers so that Modbus
RTU function code 03 can read them and Modbus RTU function codes 06 and 16 can write
to them.
P054
[1] [2] [3] [4] [5]
[1]
[2]
[3]
[4]
[5]
[6]
1.6 m

Page 14 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Application Layer
To give you a better idea of how a Modbus RTU message works, a master on network
would send a message in a format similar to this:
Where:
Slave Address
the network address (P753) of the slave you are talking to.
Function Code
number that represents a Modbus RTU command. As described above,
SmartLinx supports function codes 03, 06, and 16.
Information
register data, depending on the function code.
Error Check
cyclical redundancy check (CRC).
There is more to the frame than is described above; this is shown to give the user a
general idea of what is going on. For a full description, please refer to the Modbus RTU
specifications.
Register Mapping
SmartLinx Modbus RTU only works with the compatible Milltronics SmartLinx
instruments (see page 5). These instruments range from one to 10 points of
measurement. As such, this manual covers the maximum 10 point measurement
capability. If your instrument has fewer than 10 points, ignore data in registers associated
to non-existing points of measurement. These registers are present but they contain
undefined values.
Slave
Address
Function
Code Information Error
Check
Note: Parameter P999 (Master Reset) is not accessible via the SmartLinx interface.

7ML19981BF01 SmartLinx Modbus RTU – INSTRUCTION MANUAL Page 15
mmmmm
Application Layer
Data Access Methods
Modbus master units may be PLCs, PCs or DCS controllers. By issuing appropriate
commands, a controller can access data in three different ways.
Direct Access
Common values are mapped directly into registers.
Multiple Parameter Access (MPA)
This is a hand-shaking method where the Modbus RTU master requests the parameter
number, secondary index, decimal place, and format, and then the SmartLinx module
writes all 10 primary indexes of that parameter into the mapped registers. The PLC can
then read these values. (Recall that in Milltronics products, the memory is arranged as
parameter number, primary index, secondary index).
Using Multiple Parameter Access (MPA)
Words 40032 through 40035 are used for MPA, allowing continuous monitoring in words
40022 through 40031 of selected parameters for points 1 to 10. Using these words does
not allow the changing of parameter values.
1. Write the values into words 40032 through 40035 that define the requested
information.
2. Monitor the address variables. When the values returned match those that were
written, go to step 3.
3. Read the requested values in words 40022 through 40031. These values are
continuously updated. Continue reading from these words until new values are
required. At that time, go back to step 1.
Single Parameter Access (SPA).
This is a hand-shaking method where the PLC requests the parameter number, primary
index, secondary index, decimal place, format, read/write flag, and value, and then the
SmartLinx module either reads or writes the value. With this method any value in the
Milltronics product can be read or written.
Using Single Parameter Access (SPA)
Words 40036 through 40043 are used for SPA, allowing continuous monitoring or demand
programming of a parameter for a given indexed measurement point, individually
selected for each point.
Note: The design of the SmartLinx module requires that a maximum delay of 0.1
seconds between the time that the master writes a value to the time that it can read
the response. Ensure that the master device takes this delay into account.
Note: MPA values are only updated in Run mode.

Page 16 SmartLinx Modbus RTU – INSTRUCTION MANUAL 7ML19981BF01
mmmmm
Application Layer
Reading a Parameter
1. After setting word 40043 to 0 (read) write the required parameter information to
words 40038 through 40042.
2. Monitor the address variables that are reflected back. When the values returned
match those that were written, go to step 3.
3. Read the requested value from word 40036. This value is continuously updated.
Continue reading from this word until a new value is required. At that time, go back
to step 1.
Writing a Parameter
1. Write the required parameter information to words 40038 through 40042, the new
value in word 40037 and set word 40043 to 1 (write).
2. Monitor the address variables. When the values returned match those that were
written, your write is proceeding.
3. Read the value in word 40036 to confirm that the correct value has been written.
4. Set word 40043 back to 0 (read).
Note: Parameters should only be written in Program mode. Ensure word 40044 = 1.
Other manuals for smartlinx
1
Table of contents
Other Milltronics Recording Equipment manuals