Leuze electronic MA 204i Technical Description

MA 204i
Modular interfacing unit for Leuze Ident and RS 232 devices on PROFIBUS DP
en 02-2011/12 50113029
TECHNICAL DESCRIPTION
Condelectric S.A. Tel. Int. + 54 1148 361053 Fax Int. + 54 1148 361053
Tel. Int. + 43 732 7646-0 Fax Int. + 43 732 7646-785
Balluff-Leuze Pty. Ltd. Tel. Int. + 61 3 9720 4100 Fax Int. + 61 3 9738 2677
Leuze electronic nv/ sa Tel. Int. + 32 2253 16-00 Fax Int. + 32 2253 15-36
ATICS Tel. Int. + 359 2 847 6244 Fax Int. + 359 2 847 6244
Leuze electronic Ltda. Tel. Int. + 55 11 5180-6130 Fax Int. + 55 11 5180-6141
Leuze electronic AG Tel. Int. + 41 41 784 5656 Fax Int. + 41 41 784 5657
Imp. Tec. Vignola S.A.I.C. Tel. Int. + 56 3235 11-11 Fax Int. + 56 3235 11-28
Leuze electronic Trading (Shenzhen) Co. Ltd. Tel. Int. + 86 755 862 64909 Fax Int. + 86 755 862 64901
Componentes Electronicas Ltda. Tel. Int. + 57 4 3511049 Fax Int. + 57 4 3511019
Schmachtl CZ s.r.o. Tel. Int. + 420 244 0015-00 Fax Int. + 420 244 9107-00
Leuze electronic Scandinavia ApS Tel. Int. + 45 48 173200
SKS-automaatio Oy Tel. Int. + 358 20 764-61 Fax Int. + 358 20 764-6820
Leuze electronic Sarl. Tel. Int. + 33 160 0512-20 Fax Int. + 33 160 0503-65
Leuze electronic Ltd. Tel. Int. + 44 14 8040 85-00 Fax Int. + 44 14 8040 38-08
UTECO A.B.E.E. Tel. Int. + 30 211 1206 900 Fax Int. + 30 211 1206 999
ALL IMPEX 2001 Tel. Int. + 7 495 9213012 Fax Int. + 7 495 6462092
Leuze electronic Scandinavia ApS
Ingermark (M) SDN.BHD Tel. Int. + 60 360 3427-88 Fax Int. + 60 360 3421-88
Movitren S.A. Tel. Int. + 52 81 8371 8616 Fax Int. + 52 81 8371 8588
Leuze electronic BV Tel. Int. + 31 418 65 35-44 Fax Int. + 31 418 65 38-08
LA2P, Lda. Tel. Int. + 351 21 4 447070 Fax Int. + 351 21 4 447075
Balluff Sp. z o. o. Tel. Int. + 48 71 338 49 29 Fax Int. + 48 71 338 49 30
O`BOYLE s.r.l Tel. Int. + 40 2 56201346 Fax Int. + 40 2 56221036
Elteco A/S Tel. Int. + 47 35 56 20-70 Fax Int. + 47 35 56 20-99
Great Cofue Technology Co., Ltd. Tel. Int. + 886 2 2983 80-77 Fax Int. + 886 2 2985 33-73
Countapulse Controls (PTY.) Ltd.
11/2011
Tel. Int. + 27 116 1575-56 Fax Int. + 27 116 1575-13
Schmachtl SK s.r.o. Tel. Int. + 421 2 58275600 Fax Int. + 421 2 58275601
Tipteh d.o.o. Tel. Int. + 386 1200 51-50 Fax Int. + 386 1200 51-51
Industrial Elect
rical Co. Ltd.
Tel .
Int. + 66 2 642 6700
Fax Int. + 66 2 642 4250
Leuze electronic San.ve Tic.Ltd.Sti. Tel. Int. + 90 216 456 6704 Fax Int. + 90 216 456 3650
Balluff Asia Pte Ltd Tel. Int. + 65 6252 43-84 Fax Int. + 65 6252 90-60
Leuze electronic, Inc. Tel. Int. + 1 248 486-4466 Fax Int. + 1 248 486-6699
SV Altera OOO Tel. Int. + 38 044 4961888 Fax Int. + 38 044 4961818
C. Illies & Co., Ltd. Tel. Int. + 81 3 3443 4143 Fax Int. + 81 3 3443 4118
Profa-Tech Ltd. Tel. Int. + 254 20 828095/6 Fax Int. + 254 20 828129
Leuze electronic Co., Ltd. Tel. Int. + 82 31 382822
8 Tel. Int. +46 380-490951
Fax Int. + 82 31 3828522
Leuze electronic S.A. Tel. Int. + 34 93 4097900 Fax Int. + 34 93 49035820
Schmachtl GmbH
SABROW HI-TECH E. & A. LTD. Tel. Int. + 234 80333 86366 Fax Int. + 234 80333 84463518
Tipteh d.o.o. Beograd Tel. Int. + 381 11 3131 057 Fax Int. + 381 11 3018 326
Tipteh d.o.o. Skopje Tel. Int. + 389 70 399 474 Fax Int. + 389 23 174 197
Leuze electronic S.r.l. Tel. Int. + 39 02 26 1106-43 Fax Int. + 39 02 26 1106-40
Kvalix Automatika Kft. Tel. Int. + 36 1 272 2242 Fax Int. + 36 1 272 2244
P.T. Yabestindo Mitra Utama Tel. Int. + 62 21 92861859 Fax Int. + 62 21 6451044
Galoz electronics Ltd. Tel. Int. + 972 3 9023456 Fax Int. + 972 3 9021990
M + V Marketing Sales Pvt Ltd. Tel. Int. + 91 124 4121623 Fax Int. + 91 124 434233
Sensortech Company Tel. Int. + 852 26510188 Fax Int. + 852 26510388
Tipteh Zagreb d.o.o. Tel. Int. + 385 1 381 6574 Fax Int. + 385 1 381 6577
Leuze electronic GmbH + Co. KG P.O. Box 1111, D- 73277 Owen Tel. +49(0) 7021/ 57 3-0, Fax +49(0 )7021 / 573-199
info@leuze.de฀฀฀฀w.leuze.com
Sales Region East
Phone 035027/629-106 Fax 035027/629-107
Postal code areas 01000-19999 39000-39999 98000-99999
Sales Region North
Phone 07021/573-306 Fax 07021/9850950
Postal code areas 20000-38999 40000-65999 97000-97999
Sales Region South
Phone 07021/573-307 Fax 07021/9850911
Postal code areas 66000-96999
Sales and Service
Worldwide
AT (Austria)
AR (Argentina)
AU + NZ (Australia + New Zealand)
BE (Belgium)
BG (Bulgaria)
BR (Brasil)
CH (Switzerland)
CO (Colombia)
CZ (Czech Republic)
CL (Chile)
CN (China)
DK (Denmark)
FI (Finland)
GB (United Kingdom)
GR (Greece)
FR (France)
RU (Russian Federation)
SE (Sweden)
MY (Malaysia)
MX (Mexico)
NL (Netherlands)
PT (Portugal)
PL (Poland)
RO (Romania)
NO (Norway)
TW (Taiwan)
ZA (South Africa)
SK (Slowakia)
SI (Slovenia)
TH (Thailand)
TR (Turkey)
SG + PH (Singapore + Philippines)
US + CA (United States + Canada)
UA (Ukraine)
JP (Japan)
KR (South Korea)
ES (Spain)
Germany
KE (Kenia)
NG (Nigeria)
RS (Republic of Serbia)
MK (Macedonia)
IT (Italy)
HU (Hungary)
ID (Indonesia)
IL (Israel)
IN (India)
HK (Hong Kong)
HR (Croatia)
© All rights reserved, especially the right of reproduction, distribution and translation. Copying or
reproductions in any form require the written consent of the manufacturer. Product names are used without guarantee of free usability. Changes reflecting technical improvements may be made.
Table of contents
1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1 Explanation of symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Declaration of conformity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Description of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Definition of Terms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Safety notices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 General safety notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Safety standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Intended use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Working safely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Fast commissioning / operating principle . . . . . . . . . . . . . . . . . . . 11
3.1 Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Device arrangement and selection of the mounting location . . . . . . . . . . . . . . . . . . . . 11
3.3 Electrical connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.1 Connecting the Leuze device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3.2 Setting the PROFIBUS device address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3.3 Connecting the power supply and the bus cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Starting the device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Commissioning the MA 204i on the PROFIBUS DP. . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.1 Preparing the control system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5.2 Installation of the GSD file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5.4 Configuration of the modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.5.5 Transmission of the configuration to the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 Device description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1 General Information to the connector units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 Characteristics of the connector units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Device construction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.4 Operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.5 Fieldbus systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.5.1 PROFIBUS DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Leuze electronic MA 204i 1
Table of contents
5 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.1 General specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2 Dimensioned drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.3 Type overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Installation and mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.1 Storage, transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.2 Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3 Device arrangement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.3.1 Selecting a mounting location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.4 Cleaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7 Electrical connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.1 Safety notices for the electrical connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2 Electrical connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
7.2.1 PWR IN – voltage supply / switching input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.2.2 PWR OUT switching input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.3 BUS IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.4 BUS OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.4.1 PROFIBUS termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.5 Device interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.5.1 RS 232 device interface (accessible after opening the device, internal) . . . . . . . . . . . . . . 32
7.5.2 Service interface (internal) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8 Status displays and operational controls . . . . . . . . . . . . . . . . . . . . 34
8.1 LED status indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.1.1 LED indicators on the circuit board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.1.2 LED indicators on the housing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.2 Internal interfaces and operational controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
8.2.1 Overview of operational controls of the. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.2.2 Connector X30 … connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.2.3 RS 232 service interface – X33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.2.4 S10 service switch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.2.5 Rotary switch S4 for device selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2.6 Switch for address selection in the fieldbus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2 MA 204i Leuze electronic
Table of contents
9 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9.1 Connecting the service interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
9.2 Reading out information in service mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
10 Telegram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
10.1 Structure of the fieldbus telegram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
10.2 Description of the input bytes (status bytes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
10.2.1 Structure and meaning of the input bytes (status bytes) . . . . . . . . . . . . . . . . . . . . . . . . . 45
10.2.2 Detailed description of the bits (input byte 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.2.3 Detailed description of the bits (input byte 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.3 Description of the output bytes (control bytes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
10.3.1 Structure and meaning of the output bytes (control bytes) . . . . . . . . . . . . . . . . . . . . . . . 48
10.3.2 Detailed description of the bits (output byte 0). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
10.3.3 Detailed description of the bits (output byte 1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
10.4 Delete RESET function / memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
11 Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11.1 Functionality of the data exchange. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
11.1.1 Reading slave data in Collective mode (gateway -> PLC) . . . . . . . . . . . . . . . . . . . . . . . . 52
11.1.2 W-ACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
11.1.3 Command mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
12 Commissioning and configuration. . . . . . . . . . . . . . . . . . . . . . . . . 59
12.1 Measures to be performed prior to the initial commissioning. . . . . . . . . . . . . . . . . . . . 59
12.2 Starting the device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.3 Configuration steps for a Siemens Simatic S7 control . . . . . . . . . . . . . . . . . . . . . . . . . 60
12.3.1 Step 1 – Preparing the control system (S7 PLC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
12.3.2 Step 2 – Installation of the GSD file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
12.3.3 Step 3 – Hardware configuration of the S7 PLC: Configuration . . . . . . . . . . . . . . . . . . . . 62
12.3.4 Step 4 – Configuration of the modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
12.3.5 Step 5 – Transmission of the configuration to the controller (S7 PLC). . . . . . . . . . . . . . . 64
12.4 Commissioning via the PROFIBUS DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12.5 General information on the PROFIBUS implementation of the MA 204i. . . . . . . . . . . . 64
12.5.1 Communication profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12.5.2 Bus-access protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
12.5.3 Device types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
12.5.4 Automatic baud rate detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
12.5.5 Modular structure of the parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
12.5.6 Permanently defined parameters/device parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Leuze electronic MA 204i 3
Table of contents
12.5.7 Overview of the project modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
12.5.8 Preparing the control system for consistent data transmission . . . . . . . . . . . . . . . . . . . .69
12.6 Variable configuration of the communication data width . . . . . . . . . . . . . . . . . . . . . . . . 69
12.7 Setting the read parameters on the Leuze device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
12.7.1 Specific feature for the use of hand-held scanners (bar code and 2D devices,
12.7.2 Specific features in the operation of an RFM/RFI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
13 Diagnostics and troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . 73
13.1 General causes of errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
13.2 Interface errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
14 Type overview and accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
14.1 Type key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
14.2 Type overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
14.3 Accessory terminating resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
14.4 Accessory connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
14.5 Accessory ready-made cables for voltage supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
14.5.1 Contact assignment of PWR connection cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
14.5.2 Specifications of the cables for voltage supply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
14.5.3 Order codes of the cables for voltage supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
14.6 Accessory ready-made cables for bus connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
14.6.1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
14.6.2 Contact assignment of M 12-PROFIBUS connection cable KB PB… . . . . . . . . . . . . . . . . 77
14.6.3 Specifications of M 12-PROFIBUS connection cable KB PB…. . . . . . . . . . . . . . . . . . . . .78
14.6.4 Order codes of M 12-PROFIBUS connection cable KB PB… . . . . . . . . . . . . . . . . . . . . . . 78
14.7 Accessory ready-made cables for connecting Leuze ident devices . . . . . . . . . . . . . . . 79
14.7.1 Order codes for the device connection cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
14.7.2 Contact assignment for the device connection cables . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
combi devices with RFID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
15 Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
15.1 General maintenance information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
15.2 Repairs, servicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
15.3 Disassembling, packing, disposing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
16 Specifications for Leuze end devices . . . . . . . . . . . . . . . . . . . . . . 81
16.1 Standard setting, KONTURflex (S4 switch position 0) . . . . . . . . . . . . . . . . . . . . . . . . . . 81
16.2 Bar code reader BCL 8 (S4 switch position 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4 MA 204i Leuze electronic
Table of contents
16.3 Bar code reader BCL 22 (S4 switch position 2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
16.4 Bar code reader BCL 32 (S4 switch position 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
16.5 Bar code reader BCL 300i, BCL 500i (S4 switch position 4) . . . . . . . . . . . . . . . . . . . . . 86
16.6 Bar code reader BCL 90 (S4 switch position 5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
16.7 LSIS 122 (S4 switch position 6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
16.8 LSIS 4x2i (S4 switch position 7) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
16.9 Hand-held scanner (S4 switch position 8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
16.10 RFI, RFM, RFU RFID readers (S4 switch position 9) . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
16.11 BPS 8 bar code positioning system (S4 switch position A) . . . . . . . . . . . . . . . . . . . . . . 92
16.12 AMS distance measurement device, ODSL xx optical distance sensors with RS 232
interface (S4 switch position B). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
16.13 Modular interfacing unit MA 3x (S4 switch position C) . . . . . . . . . . . . . . . . . . . . . . . . . 95
17 Appendix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
17.1 ASCII table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Leuze electronic MA 204i 5
General information

1 General information

1.1 Explanation of symbols

The symbols used in this operating manual are explained below.
Attention!
This symbol precedes text messages which must stri this information results in injuries to personnel or damage to the equipment.
Notice!
This symbol indicates text passages containing importan

1.2 Declaration of conformity

The MA 204i modular interfacing units have been designed and manufactured in accordance with applicable European directives and standards.
Notice!
The Declaration of Conformity for these devices can be requ
ctly be observed. Failure to comply with
t information.
ested from the manufacturer.
The manufacturer of the product, Leuze electronic GmbH + Co. KG in D-73277 Owen, possesses a certified quality assurance system in accordance with ISO 9001.
6MA 204i Leuze electronic

1.3 Description of functions

The MA 204i modular interfacing unit is used to connect Leuze devices directly to the fieldbus.
Bar code reader: BCL 8, 22, 32, 300i, 500i, 90
2D code reader: LSIS 122, LSIS 4x2i
Hand-held scanner ITxxxx, HFU/HFM
RFID read-write devices: RFM 12, 32, 62 & RFI 32, RFU 61, 81
Bar code positioning system: BPS 8
Distance measurement device: AMS 200
Optical distance sensors: ODSL 9, ODSL 30, ODSL 96B
Measuring light curtain: KONTURflex to Quattro-RSX/M12
MultiNet master connection box: MA 3x
Additional RS 232 devices: Scales, third-party devices
This is accomplished by transmitting the data from the DEV via an RS 232 (V.24) interface to the MA 204 on the RS 232 interface corresponds to the Leuze standard data format (9600 bd, 8N1 and STX, data, CR, LF).
The integration of the GSD file in the hardware manager of the PLC is necessary to ensure the correct function of the MA 204
The corresponding Leuze devices are selected using a rotary code switch on the circuit board of the connector unit. Many additional RS 232 devices can be connected through a universal position.
i where a module converts it into the PROFIBUS DP format. The data format
General information
i.
Leuze electronic MA 204i 7
TNT 35/7-24V
General information

1.4 Definition of Terms

For better understanding of the explanations provided in this document, a definition of terms follows below:
Bit designation:
The 1st bit or byte begins with count number "0" and means bit/byte 2
Data length: Size of a valid, continuous data packet in bytes.
EDS file (electronic data sheet): Description of the device for the control.
Consistent: Data which belongs together with regard to content and which must not be separated is referred to as consistent data. When identifying objects, it must be ensured that the data is transmitted completely and in the correct order, otherwise the result is falsified.
Leuze device (DEV): Leuze devices, e.g., bar code readers, RFID readers, VisionReader…
Online command: These commands refer to the respective, connected ident device and may be differ­ent depending on the device. These commands are not interpreted by the MA 204 but are instead transmitted transparently (see description of ident device).
CR: Cross reference.
Perspective of I/O data in the description: Output data is data which is sent by the control to the MA. Input data is data which is sent by the MA to the control.
Toggle bits:
Status toggle bit
Each change of state indicates that an action was performed, e.g., bit ND (New Data): each change of state indicates that new received data was transmitted to the PLC.
Control toggle bit
An action is performed on each change of state, e.g., bit SDO: on each change of state, the registered data is sent by the PLC to the MA 204
i.
0
.
i,
8 MA 204i Leuze electronic

2 Safety notices

2.1 General safety notices

Documentation
All entries in this technical description must be heeded, in particular those in section "Safety notices". Keep this technical description in a safe place. It should be available at all times.
Safety regulations
Observe the locally applicable legal regulations and the rules of the employer's liability insurance association.
Repair
Repairs must only be carried out by the manufacturer or an authorized representative.

2.2 Safety standards

The devices of the series MA 2xx with the applicable safety standards. They correspond to the state of the art.

2.3 Intended use

Attention!
The protection of personnel and the device is guaranteed only if the device is operated in a manner corresponding to its intended use.
Safety notices
i were developed, manufactured and tested in accordance
Areas of application
The MA 204 code- or 2D code readers, hand-held scanners, RFID read-write devices, etc. directly to the fieldbus. A detailed list can be found in "Description of functions" on page 7.
Leuze electronic MA 204i 9
i modular interfacing unit is used for connecting Leuze devices such as bar
TNT 35/7-24V
Safety notices

2.4 Working safely

Attention!
Access to or changes on the device, except where expressly described in this operating manual, are not authorized.
Safety regulations
Observe the locally applicable legal regulations and the rules of the employer's liability insurance association.
Qualified personnel
Mounting, commissioning and maintenance of the device must only be carried out by qualified personnel. Electrical work must be carried out by a certified electrician.
10 MA 204i Leuze electronic
Fast commissioning / operating principle
PWR OUT
VOUT
123
4
SWIO_2
GND
FE
5
PWR IN
SWIO_1
SWIO_2
321
4
5
GND VIN
FE
LEUZE Device
HOST / BUS IN
GND
485
321
4
FE
A (N)
B (P)
N.C.
5
BUS OUT
VP
123
4
A (N)
B (P)
GND
485
FE
5
SWIO_1
M 12 connector
(A-coded)
M 12 socket
(A-coded)
M 12 connector
(B-coded)
M 12 socket
(B-coded)

3 Fast commissioning / operating principle

Notice!
Below you will find a short description for the initial commissioning of the PROFIBUS gateway MA 204 handbook.

3.1 Mounting

The gateway mounting plate MA 204
• using four threaded holes (M 6) or
• using two M8x6 screws on the two lateral grooves.

3.2 Device arrangement and selection of the mounting location

Ideally, the MA 204 in order to ensure good operability, e.g., for configuring the connected device.
Detailed information can be found in chapter 6.3.1.

3.3 Electrical connection

The devices from the MA 2xx differently depending on the interface.
The voltage supply (PWR IN) as well as the switching inputs/outputs (PWR OUT or PWR IN) are connected there. The number and function of the switching inputs/outputs is dependent on the connected end device.
An internal RS 232 interface is used for connecting the respective Leuze device. Another internal RS 232 interface functions as a service interface for configuring the connected device via a serial null modem cable.
i. Detailed explanations for the listed points can be found throughout the
i can be mounted in two different ways:
i should be mounted so that it is easily accessible near the ident device
i family feature four M 12 connectors/sockets which are coded
Figure 3.1: MA 204
i connections
Detailed information can be found in chapter 7.
Leuze electronic MA 204i 11
TNT 35/7-24V
Fast commissioning / operating principle
OnesTensHundreds

3.3.1 Connecting the Leuze device

To connect the Leuze device to the internal RS 232 device interface, open the housing
of the MA 204 for BCL 32) through the middle threaded opening.
Connect the cable to the internal device interface (X30, X31 or X32, see chapter 7.5.1).
Use rotary switch S4 (see chapter 8.2.5) to select the connected device.
Now screw the PG cable gland into the threaded opening to provide strain relief and
ensure protection class IP 65.

3.3.2 Setting the PROFIBUS device address

Set the station address of the gateway via the rotary switch S1 - S3 (ones, tens and
hundreds digits).
Notice!
The PROFIBUS permits an address range from 0 to 126. Address 126 must not be used for data communication. It may only be used temporarily for commissioning. Make certain that you assign each PROFIBUS participant a different PROFIBUS address.
i and guide the corresponding device cable (see chapter 14.7, e.g., KB 031
Figure 3.2: Rotary switch for setting the address
Finally, close the housing of the MA 204
Attention!
Only then may the supply voltage be applied. Upon startup of the MA 204i, the device selection switch and the address settings are queried and the gateway automatically sets itself to the Leuze device.
Connecting functional earth FE
Ensure that the functional earth (FE) is connected correctly.
12 MA 204i Leuze electronic
i.
Fast commissioning / operating principle
Unimpaired operation is only guaranteed when the functional earth is connected properly. All electrical disturbances (EMC couplings) are discharged via the functional earth connection.

3.3.3 Connecting the power supply and the bus cable

Ideally, use the ready-made cables listed in chapter 14.5.3 to connect the gateway to the
power supply via the PWR IN connection.
For the connection of the gateway to the fieldbus via the HOST / BUS IN connection,
the ready-made cables listed in are preferred.
If applicable, use the BUS OUT connection if you would like to construct a network with
linear topology.

3.4 Starting the device

Apply the supply voltage +18 … 30 V DC (+24 V DC model).
The MA 204
i starts up; the PWR LED displays that it is ready for operation.
3.5 Commissioning the MA 204
Complete the necessary steps for commissioning a Siemens-S7 control as described
below.
Further information regarding the individual commissioning steps is provided in see chapter
12.3 "Configuration steps for a Siemens Simatic S7 control".

3.5.1 Preparing the control system

In the first step, prepare the control for consistent data transmission.
During programming the control system must be prepared for consistent data transmission. This varies from control system to control system. The following possibilities are available for the Siemens control systems.
S7
The specific function blocks SFC 14 for input data and SFC 15 for output data must be integrated in the program. These are standard function blocks and are used to facilitate consistent data transmission.
Notice!
If an S7 control is used, you need to ensure that Simatic-Manager Version 5.4 + service pack 5 (V5.4+SP5) or higher is used.
i on the PROFIBUS DP
TNT 35/7-24V
Leuze electronic MA 204i 13
Fast commissioning / operating principle

3.5.2 Installation of the GSD file

For the subsequent configuration of the PROFIBUS devices, e.g., MA 204 corresponding GSD file must be loaded first. All data in modules required for operating the device is described in this file. These are input and output data and device parameters for the functioning of the device and the definition of the control and status bits.
Install the GSD file associated with the device in the PROFIBUS Manager of your control.

3.5.3 Configuration

Configure the PROFIBUS system using the HW Config of the SIMATIC Manager by
inserting the MA 204
Notice!
Ensure that the address is the same as the address configured in the device.
i into your project and assigning it a unique address (0 … 125).
i, the
Figure 3.3: Assignment of the device address
14 MA 204i Leuze electronic
Fast commissioning / operating principle

3.5.4 Configuration of the modules

Now select a corresponding data module for the input and output area.
A number of combinable modules are available with various data lengths (4, 8, 12, 16, 20, 32 … 128 bytes). In total, a maximum of 244 bytes are possible for both the input bytes and for the output bytes.
Notice!
Because the data module contains 2 bytes for the control and status bytes, the actual user data length is always 2 bytes smaller than the selected data module. E.g., when using the data module with 12 bytes, there are effectively 10 bytes available for user data on the Leuze device after subtracting the 2 bytes for status and control bytes.
Recommendation
In most cases, the 4-byte module is sufficient for the output module.
A larger module is needed, for example, if a BCL bar code scanner is to be configured by means of PT-sequences, or an RFID transponder is to be described. In these cases, larger data modules are usually sensible.
Notice!
Examples for selecting the correct data module length can be found in chapter 12.3.4, section "Examples of sensible settings for corresponding Leuze devices" on page 63.

3.5.5 Transmission of the configuration to the controller

Transmit PROFIBUS configuration to the controller (S7 PLC).
After correct transmission to the controller (S7 PLC), the PLC automatically carries out the following activities:
• Establishment of a connection between the controller and configured PROFIBUS devices
• Cyclical data exchange
TNT 35/7-24V
Leuze electronic MA 204i 15
Device description

4 Device description

4.1 General Information to the connector units

The modular interfacing unit of the MA 2xx RS 232 devices (e.g., BCL 22 bar code readers, RFID devices, RFM 32, AMS 200) in the respective fieldbus. The MA 2xx with a high protection class. Various device versions are available for the conventional fieldbuses. With a stored parameter structure for the connectable RS 232 devices, commissioning could hardly be simpler.
i gateways are intended for use in industrial environments

4.2 Characteristics of the connector units

A special characteristic of the MA 204
1. Transparent mode In this function mode, the MA 204 communication from and to the PLC. Absolutely no special programming by the user is necessary for this purpose. The data is not buffered or stored temporarily, however. Instead, it is "passed on".
The programmer must make certain to retrieve the data from the input memory of the PLC at the right time, as it is otherwise overwritten by new data.
2. Collective mode In this operating mode, data and telegram parts are temporarily stored in the memory (buffer) of the MA and sent to the RS 232 interface or to the PLC in a telegram by means of bit activation. In this mode, however, all communication control must be programmed on the PLC.
This function mode is helpful, for example, for very long telegrams or when one or more codes with long code lengths are read.
i family is a versatile gateway for integrating Leuze
i device family are three function modes:
i functions as a pure gateway with automatic
3. Command mode
With this special operating mode, it is possible to use the first bytes of the data range
to transmit predefined commands to the connected device by means of bit activation. For this purpose, device-dependent commands (so-called online commands) are predefined via the device selection switch, see chapter 16 "Specifications for Leuze end devices".
16 MA 204i Leuze electronic

4.3 Device construction

Fieldbus
Fieldbus
MA 204
i
Leuze device
Either network or other devices with RS 232
RS 232 (V.24)
The MA 204i modular interfacing unit is used for interconnecting Leuze devices, such as the BCL 8, BCL 22, etc., directly to the fieldbus. This is accomplished by transmitting the data from the Leuze device via an RS 232 (V.24) interface to the MA 204 converts it into the fieldbus format. The data format of the RS 232 interface corresponds to the standard Leuze data format.
Device description
i where a module
Figure 4.1: Connection of a Leuze devices (BCL, RFI, RFM, VR) to the fieldbus
The cable of the respective Leuze device is guided through cable bushings with PG cable glands into the MA 204
The MA 204i is intended as a gateway for any RS 232 devices, e.g., BCL 90 with MA 90, hand-held scanners, scales or for coupling a multiNet network.
The RS 232 cables are internally connectable using JST plug connectors. The cable can be connected to the device using a stable PG cable gland which provide strain relief and protection against contamination.
With the help of adapter cables with Sub-D 9 or open cable end, other RS 232 devices can also be connected.
i and connected there with the PCB connectors.
Leuze electronic MA 204i 17
TNT 35/7-24V
Device description

4.4 Operating modes

For fast commissioning, the MA 204i offers an additional operating mode, the "Service mode", in addition to the "Standard mode". In this operating mode, the Leuze device can, for example, be configured on the MA 204 fieldbus. To do this, you need a PC/laptop with a suitable terminal program, as BCL-Config from Leuze or similar.
Service switch
Select between "operation" and "service" modes with the service switch. You have the following options:
Pos. RUN:
Operation
The Leuze device is connected to the fieldbus and communicates with the PLC.
Pos. DEV:
Service Leuze device
The connection between the Leuze device and the fieldbus is interrupted. With this switch position, you can communicate directly with the Leuze device at the fieldbus gateway via RS 232. You can send online commands via the service interface, configure the Leuze device using the corresponding BCL- BPS-, …-Config configuration software and have the read data of the Leuze device output.
Pos. MA:
Service fieldbus gateway
With this switch setting, your PC/terminal is connected with the fieldbus gateway. In doing so, the current setting values of the MA (e.g. address, RS 232 parameters) can be called up via a command.
i and the communication can be tested on the
Figure 4.2: Service-switch switch positions
Notice!
If the service switch is on one of the service settings, the PWR LED flashes on the front side of the device, see chapter 8.1.2 "LED indicators on the housing".
Furthermore, on the control, the SMA service bit of the status bytes signals that the MA is in service mode.
18 MA 204i Leuze electronic
Service interface
5 GND
3 TxD
2 RxD
GND 5
TxD 3
RxD 2
1
1
PC/terminal
COM interface
MA 204i
Service interface
The service interface can be accessed once the MA 204 and features a 9-pin Sub-D connector (male). A crossed RS 232 connection cable is required to make the RxD, TxD and GND connections.
Figure 4.3: Connecting the service interface to a PC/terminal
Attention!
For the service PC to function, the RS 232 parameters must be the same as those of the MA. The Leuze standard setting of the interface is 9600 bd, 8N1 and STX, data, CR, LF.

4.5 Fieldbus systems

Various product variants of the MA 2xx fieldbus systems such as PROFIBUS DP, PROFINET-IO, DeviceNet and Ethernet.
Device description
i housing cover has been removed
i series are available for connecting to different

4.5.1 PROFIBUS DP

The MA 204 a baud rate of max. 12 MBd. The functionality of the device is defined via parameter sets which are clustered in modules. These modules are contained in a GSD file.
The MA 204 features multiple M 12 connectors / sockets for the electrical connection of the supply voltage, the interface and the switching inputs and outputs. Additional information on the electrical connection can be found in chapter 7.2.
Leuze electronic MA 204i 19
i is designed as a PROFIBUS device (PROFIBUS DP-V0 acc. to IEC 61158) with
i gateways can be operated as network devices on the PROFIBUS. The MA 204i
TNT 35/7-24V
Device description
MA 204i MA 204i MA 204i
Terminating resistor on the last participant
PROFIBUS
The MA 204i supports:
• PROFIBUS-DP slave functionality
• Modular structure of the IO data
• Automatic baud rate detection up to 12 Mbit/s
• SYNC/FREEZE
• FailSafe Mode
• Device-specific diagnostic data
•I&M
• No changing of the slave address via the PROFIBUS
For further details, see chapter 12!
Figure 4.4: PROFIBUS DP
20 MA 204i Leuze electronic

5 Specifications

5.1 General specifications

Electrical data
Interface type 1 PROFIBUS DP,
Protocols PROFIBUS DP-V0
Baud rate 9.6 kBd … 12 MBd
Interface type 2 RS 232
Baud rate 300 bit/s … 115200 bit/s, default: 9600
Service interface RS 232, 9-pin Sub-D connector, Leuze standard
Data format data bit: 8, parity: None, stop bit: 1
Switching input/output 1 switching input/1 switching output
Operating voltage 18 … 30 V DC Power consumption max. 5VA (without DEV, current consumption
Max stress on the connector (PWR IN/OUT)
Indicators
COM LED green Bus state ok
red Bus error
PWR LED green Power
red Collection error
Mechanical data
Protection class IP 65 (with screwed-on M12 and connected Leuze device) Weight 700 g Dimensions (W x H x D) 130 x 90 x 41 mm / with plate: 180 x 108 x 41 mm Housing diecast aluminum Connection 2 x M 12: BUS IN / BUS OUT PROFIBUS DP
Environmental data
Operating temperature range 0 °C … +55 °C Storage temperature range -20 °C … +60 °C Air humidity max. 90 % rel. humidity, non-condensing
Specifications
BUS: 1x M 12 connector (B-coded),
1x M 12 socket (B-coded)
PWR/IO: 1x M 12 connector (A-coded),
1x M 12 socket (A-coded)
device-dependent voltage
max. 300 mA) 3 A
TNT 35/7-24V
1 connector: RS 232 1 x M12: Power IN/GND and switching input/output 1 x M12: Power OUT/GND and switching input/output
Leuze electronic MA 204i 21
Specifications
Vibration IEC 60068-2-6, test FC Shock IEC 60068-2-27, test Ea Electromagnetic compatibility EN 61000-6-3:2007 (interference emissions for

5.2 Dimensioned drawings

residential, commercial and light-industrial environments) EN 61000-6-2:2005 (interference rejection for industrial sectors)
Figure 5.1: Dimensioned drawing MA 204
22 MA 204i Leuze electronic
i

5.3 Type overview

The following versions of the MA 2xxi gateway family are available for facilitating the integration of Leuze RS 232 devices in the various fieldbus types.
Fieldbus Device type Part no.
Specifications
PROFIBUS DP V0 MA 204 EtherNet TCP/IP MA 208 PROFINET-IO RT MA 248i 50112891 DeviceNet MA 255 CANopen MA 235 EtherCAT MA 238 EtherNet/IP MA 258
Table 5.1: Type overview MA 2xx
i 50112893 i 50112892
i 50114156 i 50114154 i 50114155 i 50114157
i
TNT 35/7-24V
Leuze electronic MA 204i 23
Installation and mounting

6 Installation and mounting

6.1 Storage, transportation

Attention!
When transporting or storing, package the device so that it is protected against collision and humidity. Optimum protection is achieved when using the original packaging. Heed the required environmental conditions specified in the technical data.
Unpacking
Check the packaging for any damage. If damage is found, notify the post office or shipping
agent as well as the supplier.
Check the delivery contents using your order and the delivery papers:
• Delivered quantity
• Device type and model as indicated on the nameplate
• Brief manual
The name plate provides information as to what MA 2xx information, please refer to the package insert or chapter 14.2.
Name plate of the connector unit
i type your device is. For specific
Figure 6.1: Device name plate MA 204i
Save the original packaging for later storage or shipping.
If you have any questions concerning your shipment, please contact your supplier or your local Leuze electronic sales office.
Observe the applicable local regulations when disposing of the packaging materials.
24 MA 204i Leuze electronic

6.2 Mounting

Fastening options
The gateway mounting plate MA 204i can be mounted in two different ways:
• using four threaded holes (M 6) or
•Using two M 8 screws on the two lateral grooves.
Fastening by means of four M 6 or two M 8 screws
Installation and mounting
Figure 6.2: Fastening options
TNT 35/7-24V
Leuze electronic MA 204i 25
Installation and mounting

6.3 Device arrangement

Ideally, the MA 204i should be mounted so that it is easily accessible near the ident device in order to ensure good operability, e.g., for configuring the connected device.

6.3.1 Selecting a mounting location

In order to select the right mounting location, several factors must be considered:
• The permissible cable lengths between the MA 204 on which interface is used.
• The housing cover should be easily accessible, so that the internal interfaces (device interface for connecting the Leuze device via PCB connectors, service interface) and other operational controls are easy to reach.
• Maintaining the required environmental conditions (temperature, humidity).
• Lowest possible chance of damage to the MA 204 parts.

6.4 Cleaning

Clean the housing of the MA 204i with a soft cloth after mounting. Remove all packaging
remains, e.g., carton fibers or Styrofoam balls.
Attention!
Do not use aggressive cleaning agents such as thinner or acetone for cleaning the device.
i and the host system depending
i by mechanical collision or jammed
26 MA 204i Leuze electronic

7 Electrical connection

PWR IN
PWR OUT BUS IN
BUS OUT
The fieldbus gateways MA 2xxi are connected using coded M 12 connectors.
An RS 232 device interface allows the respective devices to be connected with system connectors. The device cables are equipped with a prefabricated PG cable gland.
Coding varies and the design is implemented as either socket or connector depending on the HOST (fieldbus) interface and function. For the exact design, refer to the corresponding description of the MA 2xx
Notice!
The corresponding mating connectors and ready-made cables are available as accessories for all cables. For further information, see chapter 14 "Type overview and accessories".
Figure 7.1: Location of the electrical connections

7.1 Safety notices for the electrical connection

Attention!
Before connecting the device, be sure that the supply voltage agrees with the value printed on the name plate. Connection of the device and cleaning must only be carried out by a qualified electrician. Ensure that the functional earth (FE) is connected correctly. Unimpaired operation is only guaranteed when the functional earth is connected properly. If faults cannot be corrected, the device should be removed from operation and protected against possible use.
Attention!
For UL applications, use is permitted exclusively in Class 2 circuits according to NEC (National Electric Code).
i device type.
Electrical connection
TNT 35/7-24V
The fieldbus gateways are designed in accordance with safety class III for supply by PELV (protective extra-low voltage with reliable disconnection).
Notice!
Protection class IP 65 is achieved only if the connectors and caps are screwed into place!
Leuze electronic MA 204i 27
Electrical connection
PWR OUT
VOUT
123
4
SWIO_2
GND
FE
5
PWR IN
SWIO_1
SWIO_2
321
4
5
GND VIN
FE
LEUZE Device
HOST / BUS IN
GND
485
321
4
FE
A (N)
B (P)
N.C.
5
BUS OUT
VP
123
4
A (N)
B (P)
GND
485
FE
5
SWIO_1
M 12 connector
(A-coded)
M 12 socket
(A-coded)
M 12 connector
(B-coded)
M 12 socket
(B-coded)
PWR IN
SWIO_1
SWIO_2
3
2
1
4
5
GND VIN
FE
M 12 connector
(A-coded)

7.2 Electrical connection

The MA 204i features two M 12 connectors/sockets for voltage supply; each is A-coded.
The voltage supply (PWR IN) as well as the switching inputs/outputs (PWR OUT or PWR IN) are connected there. The number and function of the switching inputs/outputs is dependent on the connected end device. Two additional M 12 connectors/sockets are used for connec­tion to the fieldbus. Both of these connections are B-coded.
An internal RS 232 interface is used for connecting the respective Leuze device. Another internal RS 232 interface functions as a service interface for configuring the connected device via a serial null modem cable.
Figure 7.2: Connections of the MA 204
i, view: laying on mounting plate
Described in detail in the following are the individual connections and pin assignments.

7.2.1 PWR IN – voltage supply / switching input/output

PWR IN (5-pin connector, A-coded)
Pin Name Remark
1 VIN Positive supply voltage +18 … +30 V DC
2 SWIO_2 Switching input/switching output 2
3 GND Negative supply voltage 0 V DC
4 SWIO_1 Switching input/switching output 1
5 FE Functional earth
Thread FE Functional earth (housing)
Table 7.1: Pin assignment PWR IN
Notice!
The designation and function of the SWIO depends on the connected device. Please observe the following table!
28 MA 204i Leuze electronic
Electrical connection
Device PIN 2 PIN 4
BCL 22/BCL 32 SWOUT_1 SWIN_1 BCL 8 SW_0 SW_I Hand-held scanner/BCL 90 n.c. n.c. RFM/RFU/RFI SWOUT_1 SWIN_1 LSIS 122 SWOUT SWIN LSIS 4x2/BCL 500 configurable
IO 1 / SWIO 3
IO 2 / SWIO 4 KONTURflex n.c. n.c. ODSL 9, ODSL 96B Q1 n.c. ODSL 30 Q1 active/reference
Table 7.1: Device-specific function of the SWIOs
Supply voltage
Attention!
For UL applications, use is permitted exclusively in Class 2 circuits according to NEC (National Electric Code).
The fieldbus gateways are designed in accordance with safety class III for supply by PELV (protective extra-low voltage with reliable disconnection).
configurable
(on SWIN_1, PWRIN)
Connecting functional earth FE
Notice!
Ensure that the functional earth (FE) is connected correctly. Unimpaired operation is only guaranteed when the functional earth is connected properly. All electrical disturbances (EMC couplings) are discharged via the functional earth connection.
Switching input/output
The MA 204 located on the PWR IN M 12 connector and on the PWR OUT M 12 connector. The connec­tion of the switching inputs/outputs from PWR IN to PWR OUT can be interrupted by means of a jumper. In this case, only the switching input and output on PWR IN are active.
The function of the switching inputs and outputs is dependent on the connected Leuze device. Detailed information on this topic can be found in the respective operating instruc­tions.
Leuze electronic MA 204i 29
i is equipped with the SWIO_1 and SWIO_2 switching input/output. This is
TNT 35/7-24V
Electrical connection
PWR OUT
VOUT
1
2
3
4
SWIO_2
SWIO_1
GND
FE
5
M 12 socket
(A-coded)
HOST / BUS IN
GND 485
3
2
1
4
FE
A (N)
B (P)
N.C.
5
M 12 connector
(B-coded)

7.2.2 PWR OUT switching input/output

PWR OUT (5-pin socket, A-coded)
Pin Name Remark
1 VOUT
2 SWIO_2 Switching input/switching output 2
3 GND GND
4 SWIO_1 Switching input/switching output 1
5 FE Functional earth
Thread FE Functional earth (housing)
Table 7.2: Pin assignment PWR OUT
Notice!
The maximum admissible current of the PWR OUT and IN connectors is maximum 3 A. To be subtracted from this is the current consumption of both the MA and of the connected end device.
The function of the switching inputs and outputs is dependent on the connected Leuze device. Detailed information on this topic can be found in the respective operating instructions.
On delivery, the SWIO 1/2 are connected in parallel on PWR IN/OUT. This connection can be separated with a jumper.
Voltage supply for additional devices
(VOUT identical to VIN at PWR IN)

7.3 BUS IN

The MA 204
Table 7.3: Pin assignments for PROFIBUS DP BUS IN
30MA 204i Leuze electronic
For the host connection of the MA 204
preferred, "Bus connection cable for the MA 204i" on page 78.
i provides a PROFIBUS DP interface as a HOST interface.
BUS IN (5-pin plug, B-coded)
Pin Name Remark
1 N.C. Not used
2 A (N) Receive/transmit data A-line (N)
3 GND 485
4 B (P) Receive/transmit data B-line (P)
5 FE Functional earth / shield
Thread FE Functional earth (housing)
i, the ready-made KB PB-xxxxx-Bx cables are
RS 485 ground reference for bus
termination

7.4 BUS OUT

BUS OUT
VCC
1
2
3
4
A (N)
B (P)
GND 485
FE
5
M 12 socket
(B-coded)
Table 7.4: Pin assignments for PROFIBUS DP BUS OUT
For the host connection of the MA 204i, the ready-made KB PB-xxxxx-Sx cables are
preferred, "Bus connection cable for the MA 204i" on page 78.
Notice!
Ensure adequate shielding. For the devices and ready-made cables offered by Leuze electronic, the shield is on PIN 1.

7.4.1 PROFIBUS termination

The last physical PROFIBUS participant must be terminated with a terminating resistor (see "Accessory terminating resistor" on page 75) on the BUS OUT socket.
Electrical connection
BUS OUT (5-pin socket, B-coded)
Pin Name Remark
1 VCC +5 V DC for bus termination (termination)
2 A (N) Receive/transmit data A-line (N)
3 GND 485
4 B (P) Receive/transmit data B-line (P)
5 FE Functional earth / shield
Thread FE Functional earth (housing)
RS 485 ground reference for bus
termination
Leuze electronic MA 204i 31
TNT 35/7-24V
Electrical connection

7.5 Device interfaces

Figure 7.3: Open MA 204i

7.5.1 RS 232 device interface (accessible after opening the device, internal)

The device interface is prepared for the system plugs (PCB connectors) for Leuze devices RFI xx, RFM xx, BCL 22 as well as BCL 32, VR with KB 031.
Figure 7.4: RS 232 device interface
The standard devices are connected with 6- or 10-pin connector piece to X31 or X32, respectively. For hand-held scanners, BCL 8 and BPS 8 with 5 V DC supply (voltage supply from the MA) on pin 9, the 12-pin X30 PCB connection is available as well.
By using an additional cable (cf. "Type overview and accessories" on page 75), the system connection can be established on M 12 or 9-pin Sub-D, e.g., for hand-held scanners.
32MA 204i Leuze electronic

7.5.2 Service interface (internal)

5 GND
3 TxD
2 RxD
GND 5
TxD 3
RxD 2
1
1
PC/terminal
COM interface
MA 204i
Service interface
Figure 7.5: RS 232 service switch and service interface
Following activation, this interface enables access via the RS 232 to the connected Leuze device and the MA for configuration using the 9-pin Sub-D. The connection between the fieldbus interface and the device interface is switched off during access. The fieldbus itself is, however, not interrupted as a result.
The service interface can be accessed once the MA 204 and features a 9-pin Sub-D connector (male). A crossed RS 232 connection cable is required to make the RxD, TxD and GND connections. A hardware handshake via RTS. CTS is not supported at the service interface.
Electrical connection
i housing cover has been removed
Figure 7.6: Connecting the service interface to a PC/terminal
Attention!
For the service PC to function, the RS 232 parameters must be the same as those of the MA. The Leuze standard setting of the interface is 9600Bd, 8N1 and STX, data, CR, LF.
Notice!
To configure the devices connected to the external interface, e.g., BCL 8 (JST plug connector "X30"), a cable specially configured for this purpose is necessary. The service switch must be in the "DEV" or "MA" position (Service Leuze device/MA).
Leuze electronic MA 204i 33
TNT 35/7-24V
Status displays and operational controls

8 Status displays and operational controls

Figure 8.1: LED indicators on the MA 204i

8.1 LED status indicators

8.1.1 LED indicators on the circuit board

LED (Status)
off Device OFF
- no operating voltage or device defect
continuous green light Device ok
- readiness for operation
continuous orange light Device error/ firmware available
flashing green-orange Device in boot mode
-no firmware
34MA 204i Leuze electronic

8.1.2 LED indicators on the housing

COM
COM PWR
PWR
COM LED
Status displays and operational controls
COM
COM
COM
PWR LED
continuous green light Bus operation ok
-network mode ok
- connection and communication to the host established
flashing green Device ok
- no connection to HOST
-no termination
red continuous light Network error
- interference on PROFIBUS
- no connection established
- no communication possible
flashing red Time exceeded during establishment of
connection
flashing red/green/off Self-test after switching on
off Device OFF
- no operating voltage or device error
continuous green light Device ok
- self test successfully finished
-ready
TNT 35/7-24V
PWR
PWR
flashing green Device ok, device in service mode
red, flashing Configuration error
- baud rate or address incorrect
Leuze electronic MA 204i 35
Status displays and operational controls
CB
A
D
E
G
F
= Standard settings
A Switches S1 and S2 for address selection B Rotary switch S4 for device selection C Service switch D RS 232
Sub-D service interface
E Jumper for bridging, separating switching input/output PWR IN/OUT F 3 JST plug connectors: connection of the Leuze devices G Switch S3 for address selection 10²

8.2 Internal interfaces and operational controls

8.2.1 Overview of operational controls of the

The operational controls of the MA 204 the MA 204
i with opened housing cover.
i are described in the following. The figure shows
Figure 8.2: Front view: operational controls of the MA 204
i
36MA 204i Leuze electronic
Status displays and operational controls
Circuit board element designation
X1 Operating voltage
X2 Output voltage
X4 HOST interface
X5 HOST interface
X30 Leuze device
X31 Leuze device
X32 Leuze device
X33 RS 232 service interface
S4 Rotary switch
S10 DIP switch
J1, J2 Jumper
S1 Rotary switch
S2 Rotary switch
S3 Rotary switch
Function
PWR IN M 12 connector for operating voltage (18 … 30 V DC) MA 204 Leuze device xx
PWR OUT M 12 connector for other devices (MA, BCL, sensor, …) VOUT = VIN max. 3 A
BUS IN HOST interface for connecting to the fieldbus
BUS OUT Second BUS interface for creating a network with other participants in a linear topology
JST plug connector with 12 pins Connection of the Leuze devices with 5 V / 1 A (BCL 8, BPS 8 and hand-held scanner)
JST plug connector with 10 pins Connection of the Leuze devices (BCL, RFI, RFM,…) Pin VINBCL with default setting = V+ (18 - 30 V)
JST plug connector with 6 pins Connection of the Leuze devices (BCL, RFI, RFM,…) Pin VINBCL with default setting = V+ (18 - 30 V)
9-pin SUB-D connector RS 232 interface for service/setup operation. Enables the connection of a PC via serial null modem cable for configuring the Leuze device and the MA 204
Rotary switch (0 … F) for device selection Default setting = 0
Service switch Switch between service Leuze device (DEV), service fieldbus gateway (MA) and operation (RUN). Standard setting = operation.
Bridging, separating switching input/output (interruption of connection between the two PWR M12 connectors of the SWIO 1/SWIO 2)
Rotary switch (0 … 9) for address selection 10^0 Default setting: position 0
Rotary switch (0 … 9) for address selection 10^1 Default setting: position 0
Switch for address selection – switch between address range 0…99 or 100…127; default setting: address range = 0…99
i and connected
i.
TNT 35/7-24V
Leuze electronic MA 204i 37
Status displays and operational controls

8.2.2 Connector X30 … connectors

PCB connectors X30 … X32 are available in the MA 204 Leuze devices via RS 232.
Figure 8.3: Connections for Leuze devices
Attention!
Several Leuze devices may not be connected to the MA 204 RS 232 interface can be operated.

8.2.3 RS 232 service interface – X33

The X33 RS 232 interface facilitates the configuration of the Leuze device and the MA 204 via PC, which is connected by means of a serial null modem cable.
X33 pin assignment – service connector
SERVICE (9-pin SUB-D connector)
Pin Name Remark
2 RXD Receive Data
3 TXD Tran sm it Da ta
i for connecting the respective
i simultaneously, as only one
i
5 GND Functional earth
Table 8.1: SERVICE pin assignment

8.2.4 S10 service switch

The S10 DIP switch can be used to select between the "operation" and "service" modes, i.e. you switch between the following options here:
• Operation (RUN) = default setting
• Service Leuze device (DEV) and
• Service fieldbus gateway (MA)
Figure 8.4: DIP switch service - operation
38 MA 204i Leuze electronic
Status displays and operational controls
For further information on the corresponding options, see chapter 4.4 "Operating modes".

8.2.5 Rotary switch S4 for device selection

The S4 rotary switch is used to select the Leuze end device.
Figure 8.5: Rotary switch for device selection
The following switch positions are assigned to the Leuze devices:
Leuze device Switch position Leuze device Switch position
Standard setting Other RS 232 devices such as KONTURflex QUATTRO BCL 8 1 Hand scanner 8
BCL 22 2
BCL 32 3 BPS 8 A
BCL 300i, BCL 500i 4
BCL 90 5 MA 3x C LSIS 122 6
The gateway is set via the switch position on the Leuze device. If the switch position is changed, the device must be restarted, since the switch position is only queried after switching off completely and then restarting the device.
0 LSIS 4x2i 7
RFID (RFI xx, RFM xx, RFU xx)
AMS, ODS 9, ODSL 30, ODSL 96B
9
B
TNT 35/7-24V
Note!
In switch position "0", a distance of >20 ms must be maintained between two telegrams so they can be distinguished from one another.
The parameters of the Leuze end devices are described in chapter 16.
Additional parameters such as the baud rate and data mode can be configured via the GSD file with the "USE GSD settings" enable function. The data frame and, if necessary, the length are specified via the switch position.
Leuze electronic MA 204i 39
Status displays and operational controls
OnesTensHundreds

8.2.6 Switch for address selection in the fieldbus

The gateway features the S1, S2 and S3 switches (ones, tens and hundreds digits) for setting the station address.
Figure 8.6: Rotary switch for setting the address
Further information on the respective address ranges and the addressing procedure can be found in chapter 12.1.
40 MA 204i Leuze electronic

9 Configuration

The MA 204i is configured using the GSD file via the device manager of the control. The connected device is normally configured via the service interface of the MA with the help of a suitable configuration program.
The respective configuration programs – e.g. for bar code readers the BCL-Config, for RFID devices the RF-Config etc. – and the associated documentation is provided on the Leuze home page in the Download area:
www.leuze.de \ download \ identify
Notice!
In order to display the help texts, a PDF viewer program (not included in the delivery contents) must also be installed. For important information on configuring and on the configurable functions, please refer to the description of the respective device.

9.1 Connecting the service interface

The RS 232 service interface is connected after opening the device cover of the MA 204 via the 9-pin Sub-D and a cross-wired null modem cable (RxD/TXD/GND). For connection, see chapter "Service interface (internal)" on page 33.
The service interface is activated with the help of the service switch and establishes a direct connection to the connected device with the "DEV" (Leuze device) or "MA" (gateway) setting.
Configuration
i

9.2 Reading out information in service mode

After starting up in the "RUN" switch position, set the service switch of the MA to the
"MA" position.
Now start one of the following terminal programs: e.g., BCL, RF, BPS Config.
Alternatively, you can also use the Windows tool "Hyperterminal".
Start the program.
Select the correct COM port (e.g., COM1) and set the interface as follows:
Leuze electronic MA 204i 41
TNT 35/7-24V
Configuration
Figure 9.1: COM port settings
Notice!
Observe that STX, data, CR, LF framing must be set on the PC terminal program so that communication is possible with the connected Leuze device.
Commands
You can now call up information on the MA 204
i by sending the following commands.
v General service information.
s Enable memory mode for the last frames.
l The memory mode shows the last RX and TX frames for ASCII and fieldbus.
Table 9.1: Available commands
Information
Version Version information.
Firmware date Firmware date.
Table 9.2: General firmware information
42 MA 204i Leuze electronic
Configuration
Selected scanner Currently selected Leuze device (selected via switch S4).
Gateway mode Transparent or Collective mode.
Ring buffer fill level Current fill level of the ring memory in Collective mode (ASCII->Fieldbus).
Received ASCII Frames Number of received ASCII frames.
ASCII Framing Error (GW) Number of received framing errors.
Number of Received CTB's Number of CTB commands.
Number of Received SFB's Number of SFB commands.
Command-Buffer fill level Current fill level of the ring memory in Command mode (fieldbus->ASCII).
Number of received transparent frames Number of received fieldbus frames without CTB/SFB.
Number of send fieldbus frames Number of frames sent via the fieldbus.
Number of invalid commands Number of invalid commands.
Number of ASCII stack send errors Number of frames that the ASCII memory could not send.
Number of good ASCII send frames Number of frames that the ASCII memory sent successfully.
Table 9.3: General gateway information
ND Current status of ND bit.
W-Ack Current status of W-Ack bit.
R-Ack Current status R-Ack bit.
Data loss Current status of data loss bit.
Ring buffer overflow Current status of ring buffer overflow bit.
DEX Current status of DEX bit.
BLR Current status of BLR bit.
Table 9.4: Current states of the status and control bits
1024 bytes max.
1024 bytes max.
ASCII start byte Currently configured start byte
ASCII end byte1 Currently configured stop byte 1
ASCII end byte2 Currently configured stop byte 2
ASCII warm start status Indicates whether the ASCII memory has detected and accepted a valid
ASCII baud rate Currently configured baud rate
(dependent on switch position S4).
(dependent on switch position S4).
(dependent on switch position S4).
configuration.
(dependent on switch position S4).
Table 9.5: ASCII configuration
DPS reconfiguration request Number of Profibus slave reconfigurations.
DPS input data length Currently configured PROFIBUS input frame length in slot 1.
DPS output data length Currently configured PROFIBUS output frame length in slot 2.
DPS address Set Profibus address.
DPS identification number Identification number of the Profibus slave.
Table 9.6: PROFIBUS configuration (only for MA 204
i devices)
Leuze electronic MA 204i 43
TNT 35/7-24V
Telegram

10 Telegram

10.1 Structure of the fieldbus telegram

All operations are performed by control and status bits. Two bytes of control information and two bytes of status information are available for this purpose. The control bits are a part of the output module and the status bits are a part of the input bytes. The data starts with the third byte.
If the actual data length is longer than the data length configured in the gateway, only part of the data is transmitted; the remaining data is lost. In this case, the DL (data loss) bit is set.
The following telegram structure is used between PLC -> fieldbus gateway:
7 6 5 4 3 2 1 0
ND Address 4 Address 3 Address 2 Address 1 Address 0 Broadcast Command
CTB SFB R-ACK Control byte 1
Data byte / parameter byte 0 Data Data byte / parameter byte 1
This telegram structure is used between fieldbus gateway -> PLC:
7 6 5 4 3 2 1 0
ND BO DL BLR DEX SMA W-ACK Status byte 0
mode
Control byte 0
DLC7 DLC6 DLC5 DLC4 DLC3 DLC2 DLC1 DLC0 Status byte 1
Data byte / parameter byte 0
Data byte / parameter byte 1
Data
Only the data part with the corresponding frame (e.g., STX, CR & LF) is then transmitted between the fieldbus gateway and the Leuze end device. The two control bytes are processed by the fieldbus gateway.
The corresponding control and status bits and their meaning are specified in section 10.2 and section 10.3.
Further information on the broadcast control bytes and address bits 0 … 4 can be found in chapter "Modular interfacing unit MA 3x (S4 switch position C)" on page 95.
44 MA 204i Leuze electronic

10.2 Description of the input bytes (status bytes)

10.2.1 Structure and meaning of the input bytes (status bytes)

7 6 5 4 3 2 1 0
ND BO DL BLR DEX SMA W-ACK Status byte 0
DLC7 DLC6 DLC5 DLC4 DLC3 DLC2 DLC1 DLC0 Status byte 1
Telegram
Data byte / parameter byte 0
Data byte / parameter byte 1
Data
Table 10.1: Structure of the input bytes (status bytes)
Bits of the input byte (status byte) 0
Bit no. Designation Meaning
0 W-ACK Write-Acknowledge (write confirmation when using buffer)
2 SMA Service mode active(service mode activated)
3 DEX Data exist (data in transmit buffer)
4 BLR Next block ready (new block ready)
5 DL Data loss
6 BO Buffer overflow
7 ND New data only in Transparent mode
Bits of the input byte (status byte) 1
Bit no. Designation Meaning
0 … 7 DLC0 … DLC7 Data Length Code (length of the following user data)
Notice!
T-bit means toggle bit, i.e. this bit changes its state on each event ("0" "1" or "1" "0").
TNT 35/7-24V
Leuze electronic MA 204i 45
Telegram

10.2.2 Detailed description of the bits (input byte 0)

Bit 0: Write-Acknowledge: W-ACK
This bit is only relevant for writing slave data in blocks, see chapter (buffer data on RS 232). It toggles when data from the PLC are sent to the MA with CTB or SFB.
Input data Description Addr. Data
Write-Acknowledge
(write confirmation) Write handshake Indicates that the data was successfully sent by the PLC to
W-ACK
the gateway. Write-Acknowledge is indicated via this bit. The W-ACK bit is toggled by the fieldbus gateway whenever a transmit com­mand has been successfully executed. This applies both for the transmission of data to the transmit buffer with the CTB command and for sending the transmit buffer contents with the SFB command.
0.0 Bit
Value range Default
type
0->1: Successfully written 1->0: Successfully written
0
Bit 2: Service mode active: SMA
Input data Description Addr. Data
Service mode active (SMA)
The SMA bit is set if the service switch is set to "MA" or
SMA
"DEV", i.e. if the device is in either fieldbus gateway or Leuze device service mode. This is also indicated by a flashing PWR LED on the front side of the device. Upon changing to the nor­mal operating mode "RUN", the bit is reset.
0.2 Bit
Value range Default
type
0: Device in operat­ing mode 1: Device in service mode
0h
Bit 3: Data exist: DEX
This bit is only relevant for reading slave data in Collective mode relevant, see chapter 11.1.1.
Input data Description Addr. Data
Data exist
(data in transmit buffer)
DEX
Indicates that further data is stored in the transmit buffer which is ready for transmission to the control. This flag bit is always set to high ("1") by the fieldbus gateway as long as data is in the buffer.
0.3 Bit
Value range Default
type
0: No data in the transmit buffer 1: Further data in the transmit buffer
0h
46 MA 204i Leuze electronic
Telegram
Bit 4: Next block ready to transmit: BLR
This bit is only relevant for reading slave data in Collective mode relevant, see chapter 11.1.1.
Input data Description Addr. Data
Next block ready to transmit (new block ready) The Block Ready toggle bit changes its state whenever the
BLR
fieldbus gateway has removed received data from the receive buffer and registered it in the corresponding receive­data bytes. This signals to the master that the quantity of data indicated in the DLC bits to be present in the input data bytes originated in the data buffer and is current.
0.4 Bit
Value range Default
type
0->1: Data transmitted 1->0: Data transmitted
0
Bit 5: Data loss: DL
This bit is important for monitoring data transmission in Transparent and Collective mode.
Input data Description Addr. Data
Data loss
(Data transmission monitoring) This bit is set until the device is reset (bit pattern see chapter
10.4 "Delete RESET function / memory") in case gateway
DL
data was not able to be sent to the PLC and was lost. Fur­thermore, this bit is set in case the configured data frame, e.g. 8 bit, should be smaller than the data to be transmitted to the PLC, e.g. bar code with 20 digits. In this case, the first 8 digits are transmitted to the PLC, the rest are truncated and are lost. In this process, the Data loss bit is also set.
0.6 Bit
Value range Default
type
0->1: Data loss
0
Bit 6: Buffer overflow: BO
Input data Description Addr. Data
Buffer overflow (buffer overflow) This flag bit is set to high ("1") when the buffer overflows.
BO
The bit is automatically reset when the buffer again has memory space available. While the BO bit is set, the RTS signal of the serial interface is deactivated. The memory size of the gateway for the data of both the PLC and the Leuze end device is 1 kByte.
0.6 Bit
Value range Default
type
0->1: Buffer over­flow 1->0: Buffer o.k.
0
TNT 35/7-24V
Leuze electronic MA 204i 47
Telegram
Bit 7: New data: ND
This bit is only relevant in Transparent mode.
Input data Description Addr. Data
New data
ND
(new data) This bit is toggled on each data set that is sent from the gate­way to the PLC. This can be used to differentiate between multiple, identical data sets that are sent to the PLC.
0.7 Bit
Value range Default
type
0->1; 1->0: On each status change for new data

10.2.3 Detailed description of the bits (input byte 1)

Bit 0 … 7: Data length code: DLC0 … DLC7
Input data Description Addr. Data
Data length code
DLC0 … DLC7
(number of user data in bytes) Stored in these bits is the number of user data bytes transmitted to the PLC which follow.
1.0 …
1.7
Value range Default
type
1h (00001b) …
Bit
FFh (00255b)

10.3 Description of the output bytes (control bytes)

10.3.1 Structure and meaning of the output bytes (control bytes)

7 6 5 4 3 2 1 0
ND Address 4 Address 3 Address 2 Address 1 Address 0 Broadcast
CTB SFB R-ACK Control byte 1
Data byte 1
Table 10.2: Structure of the output bytes (control bytes)
Command
mode
0
0h (00000b)
Control byte 0
DataData byte 2
Bits of the output byte (control byte) 0
Bit no. Designation Meaning
0 Command mode Command mode
1 Broadcast Broadcast
(only relevant with a connected MA 3x)
2 … 6 Address 0 .. 4 Address bits 0 .. 4
(only relevant with a connected MA 3x)
7 ND New data
48 MA 204i Leuze electronic
Bits of the output byte (control byte) 1
Bit no. Designation Meaning
0 R-ACK Read-Acknowledge
2 SFB Send data from transmit buffer
3 CTB Copy to transmit-buffer

10.3.2 Detailed description of the bits (output byte 0)

Bit 0: Command mode: Command mode
Telegram
Output data Description Addr. Data
Command mode This bit is used to activate Command mode. In Command
Command mode
mode, no data is sent by the PLC to the Leuze end device via the gateway. In Command mode, various bits that execute corresponding commands depending on the selected Leuze device can be set in the data- or parameter field. For further information, see chapter 11.1.3 "Command mode".
0.0 Bit
Value range Default
type
0: Default, transparent data transmission 1: Command mode
0
The following two control bits ("Bit 1: Broadcast: Broadcast" on page 49 and "Bit 2 … 6: address bits 0 .. 4: address 0 .. 4" on page 49) are only relevant with a connected MA 3x. With other devices, these fields are ignored.
Bit 1: Broadcast: Broadcast
Output data Description Addr. Data
Broadcast
Broadcast
A broadcast only functions with a multiNet network con­nected via the MA 3x. If this bit is activated, the gateway automatically adds the broadcast command "00B" before the data. This is directed at all participants in the multiNet.
0.1 Bit
Value range Default
type
0: No broadcast 1: Broadcast
0
Bit 2 … 6: address bits 0 .. 4: address 0 .. 4
Output data Description Addr. Data
Address bits 0 .. 4
Address 0 .. 4
As with the broadcast command, individual devices in the multiNet can also be addressed via the MA 3x . In this case, the corresponding address of the device precedes the data field.telegram.
0.2 …
0.6
Value range Default
type
00000: Addr. 0 00001: Addr. 1
Bit
00010: Addr. 2 00011: Addr. 3 …
0
Bit 7: New data: ND
TNT 35/7-24V
Output data Description Addr. Data
ND
New data This bit is needed if several identical pieces of data are to be sent in sequence.
0.7 Bit
Value range Default
type
0->1; 1->0: On each status change for new data
0
Leuze electronic MA 204i 49
Telegram

10.3.3 Detailed description of the bits (output byte 1)

Bit 0: Read-Acknowledge: R-ACK
This bit is only relevant for writing slave data in blocks (Collective mode), see chapter .
Output data Description Addr. Data
Read-Acknowledge
(read confirmation) Toggle bit: Indicates to the fieldbus gateway that the "old" data has been processed and that new data can be received. At the end of a read cycle, this bit must be toggled
R-ACK
in order to be able to receive the next data set. This toggle bit is switched by the master after valid received data has been read out of the input bytes and the next datablock can be requested. If the gateway detects a signal change in the R-ACK bit, the next bytes are automatically written from the receive buffer to the input data words and the BLR bit tog­gled. Further toggling erases the memory (to 00h).
1.0 Bit
Value range Default
type
0->1 or 1->0: Successfully written & ready for the next transmission
0
Bit 2: Send data from buffer: SFB
This bit is only relevant for writing slave data in blocks (Collective mode), see chapter .
Output data Description Addr. Data
Send data from buffer
(send data from the gateway transmit buffer to the RS 232)
SFB
Toggle bit: changing this bit causes all data which was copied to the transmit buffer of the fieldbus gateway via the CTB bit to be transmitted to the RS 232 interface or the connected Leuze device.
1.2 Bit
Value range Default
type
0->1: Data to RS 232 1->0: Data to RS 232
0
50 MA 204i Leuze electronic
Telegram
Bit 3: Copy to transmit buffer: CTB
This bit is only relevant for writing slave data in blocks (Collective mode), see chapter .
Output data Description Addr. Data
Copy to transmit buffer
(transmission data to transmit buffer) Toggle bit: Changing this bit writes the data from the PLC to
CTB
the transmit buffer of the fieldbus gateway. This is used, for example, for long command strings which must be transmitted to the connected ident device. The CTB toggle bit is switched whenever transmit data is not to be sent directly via the serial interface, but instead transferred to the transmit buffer.
Notice!
The state change of the CTB bit signals the MA that the data is going into the buffer; therefore, it's essential to observe the order! When the CTB is not used, the telegram (which fits in one cycle) is transmitted directly to the RS 232 interface. Please make sure it is complete!

10.4 Delete RESET function / memory

For many applications, it is helpful to be able to reset the MA buffer (in Collective mode) or status bits.
The following bit pattern can be transmitted from the PLC for this purpose (if >20 ms is pending):
Control byte 0: 10101010 (AAh) Control byte 1: 10101010 (AAh) OUT data byte 0/parameter byte 0: AAh OUT data byte 1/parameter byte 1: AAh
1.3 Bit
Value range Default
type
0->1: Data in buffer 1->0: Data in buffer
0
This sets the memory or status/control bits to 00h.
Please observe that the data image may need to be updated by toggling in Collective mode.
Leuze electronic MA 204i 51
TNT 35/7-24V
Modes

11 Modes

11.1 Functionality of the data exchange

The fieldbus gateway has two different modes that can be selected via the PLC:
• Transparent mode (default setting) In Transparent mode, all data are sent 1:1 and directly by the serial end device to the PLC. It is not necessary to use status and control bits here. However, only data bytes possible for one transmission cycle are transmitted - all others are lost. The distance between two successive telegrams (without frame) must be more than 20 ms, since there is otherwise no clear separation between them. ASCII characters are typically expected as data content; under certain circumstances, the MA therefore detects different control characters as invalid characters in the data range and truncates them. At 00 because unnecessary bytes are also filled with 00h .
• Collective mode In Collective mode, the data of the serial end device is stored temporarily in the fieldbus gateway by toggling the CTB bit and is not sent to the PLC in blocks until prompted to do so by the PLC. On the PLC, a status bit (DEX) then signals that new data is ready for retrieval. This data is then read out from the fieldbus gateway in blocks (toggle bit). In order to distinguish between the individual telegrams on the PLC, in Collective mode the serial frame is sent to the PLC in addition to the data.
The size of the buffer is 1 kByte.
in the data range, the MA cuts the telegram off
h
Notice!
In Collective mode, the CTB and SFB bits are needed for communication handling via the buffer. Telegrams that can also be completely transmitted in one cycle in Collective mode (including data frame) go directly through. If PLC data is provided and transferred without a state change of the CTB bit, it goes directly to the RS 232 interface with the set telegram data length. Incomplete (incl. data frame) or faulty telegrams can cause error messages in the connected device!
Combination with the Command mode is possible.
Data exchange in blocks must be programmed on the PLC.

11.1.1 Reading slave data in Collective mode (gateway -> PLC)

If the Leuze device transmits data to the fieldbus gateway, the data is stored temporarily in a buffer. The PLC is signaled via the "DEX" bit that data is ready for retrieval in the memory. Data is not automatically transmitted.
If no further user data is present in the MA 2xx toggled once as read confirmation to release data transmission for the next read cycle.
52 MA 204i Leuze electronic
i ("DEX" bit = "0"), the "R-ACK" bit must be
Modes
If the buffer still contains more data ("DEX bit = 1), the next remaining user data present in the buffer is transmitted by toggling the "R-ACK" control bit. This process is to be repeated until the "DEX" bit returns to "0"; all data has then been removed from the buffer. "R-ACK" must be toggled here again once more as a terminating read confirmation in order to release data transmission for the next read cycle.
Used status and control bits:
•DLC
•BLR
•DEX
•R-ACK
Writing slave data in Collective mode (PLC -> gateway)Writing in blocks
The data sent by the master to the slave is first collected in a "transmit buffer" by setting the "CTB" bit (Copy to transmit buffer). Please observe that data provided is transmitted directly by toggling the bit.
The data is then sent in the order received from the buffer to the connected Leuze device via the serial interface with the command: "SFB" (Send data from transmit buffer). Please don't forget the suitable data frame!
Afterward, the buffer is again empty and can be written with new data.
Notice!
With this function, it is possible to temporarily store longer data strings in the gateway independent of how many bytes the used fieldbus can transmit at once. With this function, longer PT sequences or RFID write sequences, for example, can be transmitted, since the connected devices can, in this way, receive their commands (e.g., PT or W) in a continuous string. The respective frame (STX CR LF) is needed to differentiate between the individual telegrams.
Used status and control bits:
•CTB
•SFB
TNT 35/7-24V

11.1.2 W-ACK

If PLC data is provided and transferred without a state change of the CTB bit, it goes directly to the RS 232 interface with the set telegram data length. Incomplete (incl. data frame) or faulty telegrams can cause error messages in the connected device!
Examples for the activation of a Leuze device
In the data part (starting at byte 2) of the telegram to the gateway, a "+" (ASCII) is sent for activation.
Leuze electronic MA 204i 53
Modes
This means that the hex value "2B" (corresponds to a " +" ) i s to b e e nt e re d in control or output byte 2. To deactivate the reading gate, a "2D" (hex) must be used instead (corresponds to a "-" ASCII).
7 6 5 4 3 2 1 0
ND Address 4 Address 3 Address 2 Address 1 Address 0 Broadcast
CTB SFB R-ACK Control byte 1
Command
mode
Control byte 0
Data byte / parameter byte 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 Output byte 0 0 0 0 0 0 0 0 0 Output byte 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Output byte 3
B 2 Output byte 2
DataData byte / parameter byte 1
54 MA 204i Leuze electronic
Collective mode sequence diagram
Activate
Collective mode
Select
function mode in
PLC via EDS file?
Save toggle bits
as process image
Reception of data
Has the slave received data from the RS 232?
BLR = ! BLR
Rescue data e.g. data
block DLC = number of
valid binary-coded data
bytes
Is there still data
in the receive buffer?
DEX = 1 set
(status bit 0.3)
Transmit the next
data with toggle bit
R-ACK = ! R-ACK
(control bit 1.0)
Confirm data retrieval with
toggle bit
R-ACK = ! R-ACK
(control bit 1.0)
No
No
No
Yes
Yes
Sending of data
Number < 254
Enter user data that are to
be sent into output data
words starting at Out 2
DLC = number of binary-
coded data bytes
Send data in the transmit
buffer with the
CTB = ! CTB toggle bit
(control bit 1.3)
All desired data in the
buffer?
*)
Command ok?
W-ACK = ! W-ACK
(status bit 0.0)
(Display!)
*)
Command ok?
W-ACK = ! W-ACK
(status bit 0.0)
(Display!)
Send data with the
SFB = ! SFB toggle bit
(control bit 1.2)
No
No
No
Yes
Yes
Send long online commands to the DEV, read RS 232 answer from DEV
Modes
Figure 11.1: Data transmission scheme with long online commands
Leuze electronic MA 204i 55
TNT 35/7-24V
Modes

11.1.3 Command mode

One specific feature is the so-called Command mode, which is defined via the output control byte 0 (bit 0)... and enables the control of the connected device per bit.
If the Command mode is activated (Command mode = 1), no data is sent by the PLC to the Leuze end device via the gateway. The data from the MA to the PLC is transmitted in the selected operating mode (Transparent/Collective).
With the Command mode, it is possible to set various device-specific bits in the data- or parameter field that execute the corresponding serial commands (e.g., v, +, -, etc.). If, for example, the version of the Leuze end device is to be queried, the corresponding bit is to be set so that a "v" is sent to the Leuze device with the <STX> v <CR> <LF> frame.
The Leuze end device also answers the gateway with data (e.g. bar code content, NoRead, device version, etc.) in response to most commands. The answer is immediately passed on to the PLC by the gateway.
Notice!
The parameters available for the individual Leuze devices are listed in chapter 16. Command mode cannot be used with hand-held scanners.
56 MA 204i Leuze electronic
Modes
Device executes the corresponding function (cf. chap. 16). For function to be re-established, the ND bit and the selected bit in byte 2 must be toggled, byte 0.0 can stay.
No
No
Yes
Yes
Bit 0.0 =1?
Byte 2: Bit set?
Connected device can only be a6ddressed via HW or PLC data telegram e.g. +
Bit 0.0 signals that the respective bit is evaluated as a "control bit" in byte 2, and according to the posi­tion of the device selection switch, executes a corresponding function on the device via the stored table.
No detectable function
Select bit, or incorrect byte
Examples for the activation of a Leuze device
In Command mode, control or output byte 0.0 is to be set for activating the Command mode. Only the corresponding bit (control or output byte 2.1) then needs to be set for activating and deactivating the reading gate.
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Output byte 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Output byte 3
Command mode sequence diagram
Set control byte 0, bit 0.0 to 1
1 Output byte 0
1 0 Output byte 2
Figure 11.2: Execution of command after activation of the Command mode
Leuze electronic MA 204i 57
TNT 35/7-24V
Modes
Triggering scanner
Reception of data
Has the slave
received data from
the RS 232?
BLR = ! BLR
Rescue data
e.g. data block
DLC = number of valid
binary-coded data bytes
Is there still data
in the receive buffer?
DEX = 1 set
(status bit 0.3)
Transmit the next
data with toggle bit
R-ACK = ! R-ACK
(control bit 1.0)
Confirm data retrieval
with toggle bit
R-ACK = ! R-ACK
(control bit 1.0)
No
No
Yes
Triggering the ident devices and reading the data
Figure 11.3: Activating DEV and reading data
Notice!
Further information on fieldbus telegram structure can be found in chapter 10.1. A specification of all usable commands can be found in chapter "Specifications for Leuze end devices" on page 81.
58 MA 204i Leuze electronic
Commissioning and configuration
OnesTensHundreds

12 Commissioning and configuration

12.1 Measures to be performed prior to the initial commissioning

Before commissioning, familiarize yourself with the operation and configuration of the
MA 204
i.
Before connecting the supply voltage, recheck all connections and ensure that they
have been properly made.
The Leuze device must be connected to the internal RS 232 device interface.
Connecting the Leuze device
Open the housing of the MA 204
for BCL 32) through the middle threaded opening.
Connect the cable to the internal device interface (X30, X31 or X32, see chapter 7.5.1).
Use rotary switch S4 (see chapter 8.2.5) to select the connected device.
Now screw the PG cable gland into the threaded opening to provide strain relief and
ensure protection class IP 65.
Setting the PROFIBUS device address
By setting the PROFIBUS address, the MA 204 Each network device is thereby automatically informed that it is a slave on the PROFIBUS with its specific address and that it is initialized and queried by the PLC.
The PROFIBUS permits an address range from 0 to 126. Other addresses must not be used for data communication.
Set the station address of the gateway via the rotary switch S1 - S3 (ones, tens and
hundreds digits).
i and guide the corresponding device cable (e.g., KB 031
i is assigned its respective station number.
Figure 12.1: Rotary switch for setting the address
Finally, close the housing of the MA 204
Leuze electronic MA 204i 59
i.
TNT 35/7-24V
Commissioning and configuration
PWR OUT
VOUT
123
4
SWIO_2
GND
FE
5
PWR IN
SWIO_1
SWIO_2
321
4
5
GND VIN
FE
LEUZE Device
HOST / BUS IN
GND
485
321
4
FE
A (N)
B (P)
N.C.
5
BUS OUT
VP
123
4
A (N)
B (P)
GND
485
FE
5
SWIO_1
M 12 connector
(A-coded)
M 12 socket
(A-coded)
M 12 connector
(B-coded)
M 12 socket
(B-coded)
Attention!
Only then may the supply voltage be applied. Upon startup of the MA 204i, the device selection switch and the address settings are queried and the gateway automatically sets itself to the Leuze device.
Figure 12.2: Connections of the MA 204
i seen from below, device on mounting plate
Check the applied voltage. It must be in the range between +18V … 30 V DC.
Connecting functional earth FE
Ensure that the functional earth (FE) is connected correctly.
Unimpaired operation is only guaranteed when the functional earth is connected properly. All electrical disturbances (EMC couplings) are discharged via the functional earth connec­tion.
On delivery, the SWIO 1/2 are connected in parallel on PWR IN/OUT. This connection can be separated with a jumper.

12.2 Starting the device

Apply the supply voltage +18 … 30 V DC (+24 V DC model); the MA 204

12.3 Configuration steps for a Siemens Simatic S7 control

The following steps are necessary for commissioning with a Siemens S7 control:
1. Preparation of the control system (S7 PLC)
2. Installation of the GSD file
3. Hardware configuration of the S7 PLC
4. Configuration of the modules
5. Transmission of the PROFIBUS configuration to the controller (S7 PLC)
i starts up.
60 MA 204i Leuze electronic
Commissioning and configuration

12.3.1 Step 1 – Preparing the control system (S7 PLC)

In the first step, the control is prepared for consistent data transmission.
During programming the control system must be prepared for consistent data transmission. This varies from control system to control system. The following possibilities are available for the Siemens control systems.
S7
The specific function blocks SFC 14 for input data and SFC 15 for output data must be integrated in the program. These are standard function blocks and are used to facilitate consistent data transmission.
Notice!
If an S7 control is used, you need to ensure that Simatic-Manager Version 5.4 + service pack 5 (V5.4+SP5) or higher is used.

12.3.2 Step 2 – Installation of the GSD file

For the subsequent configuration of the PROFIBUS devices, e.g., MA 204 corresponding GSD file must be loaded first.
General information on the GSD file
The term GSD stands for the textual description of a PROFIBUS device model.
The GSD file can support an arbitrary number of languages in one file. Every GSD file contains a version of the MA 204
i device model. This is also reflected in the file name.
i, the
You can find the GSD file at
www.leuze.com -> Download -> identify -> Stationary and hand-held bar code readers.
All data in modules required for operating the MA 204 input and output data and device parameters for the functioning of the MA 204 nition of the control and status bits.
If parameters are changed, e.g., in the project tool, these changes are stored on the PLC side in the project, not in the GSD file. The GSD file is a certified and integral part of the device and must not be changed manually. The file is not changed by the system either.
The functionality of the MA 204 their functions are structured in the GSD file using module. A user-specific configuration tool is used during PLC program creation to integrate the required modules and configure them appropriately for their respective use. During operation of the MA 204 PROFIBUS DP, all parameters are set to default values. If these parameters are not changed by the user, the device functions with the default settings delivered by Leuze electronic.
For the default settings of the MA 204
Leuze electronic MA 204i 61
i is defined via GSD parameter sets. The parameters and
i, please refer to the following module descriptions.
i is described in this file. These are
i and the defi-
i on the
TNT 35/7-24V
Commissioning and configuration

12.3.3 Step 3 – Hardware configuration of the S7 PLC: Configuration

For the configuration of the PROFIBUS system using the HW Config of the SIMATIC Manager, insert the MA 204 (0 … 125).
Notice!
Ensure that the address is the same as the address configured in the device.
i into your project and assign a unique address
Figure 12.1: Assignment of the device address

12.3.4 Step 4 – Configuration of the modules

Now select a corresponding data module for the input and output area.
A number of combinable modules are available with various data lengths (4, 8, 12, 16, 20, 32 … 128 bytes). In total, a maximum of 244 bytes are possible for both the input bytes and for the output bytes.
62 MA 204i Leuze electronic
Commissioning and configuration
Notice!
Because the data module contains 2 bytes for the control and status bytes, the actual user data length is always 2 bytes smaller than the selected data module. E.g., when using the data module with 12 bytes, there are effectively 10 bytes available for user data on the Leuze device after subtracting the 2 bytes for status and control bytes.
Recommendation
In most cases, the 4-byte module is sufficient for the output module. A larger module is needed, for example, if a BCL bar code scanner is to be configured by means of PT-sequences, or an RFID transponder is to be described. In these cases, larger data modules are usually sensible.
Examples of sensible settings for corresponding Leuze devices
BPS 8
• Input module: 8 bytes
• Output module: 4 bytes
AMS
• Input module: 8 bytes
• Output module: 8 bytes
Hand-held scanner
• Input module: individual
The size of the input module is dependent on the number of digits of the bar code or 2D code that is to be read. For example, with an 12-digit bar code (+ 2 bytes of status bytes), the input module with 16 bytes is sensible.
• Output module: none
Because the hand-held scanner does not typically send any data, no output module is necessary.
BCL bar code scanners, RFID devices (RFM, RFI and RFU), LSIS 122 and LSIS 4x2i
• Input module: individual
The size of the input module is dependent on the number of digits of the bar code, RFID code or 2D code that is to be read. For example, with an 18-digit bar code (+ 2 bytes of status bytes), the input module with 20 bytes is sensible.
• Output module: 4 bytes
TNT 35/7-24V
Leuze electronic MA 204i 63
Commissioning and configuration

12.3.5 Step 5 – Transmission of the configuration to the controller (S7 PLC)

After correct transmission to the controller (S7 PLC), the PLC automatically carries out the following activities:
• Check device names
• Establishment of a connection between the controller and configured PROFIBUS devices
• Cyclical data exchange

12.4 Commissioning via the PROFIBUS DP

12.5 General information on the PROFIBUS implementation of the MA 204

12.5.1 Communication profile

The communication profile defines how participants serially transmit their data via the transmission medium. The MA 204 systems and Decentral Periphery -> PROFIBUS DP.
DP communication profile
The PROFIBUS DP communication profile is designed for efficient data exchange on the field level. Data exchange with the decentral devices occurs primarily cyclically. The neces­sary communication functions are defined in the DP base functions. The DP optionally offers acyclic communication services as well. These are used for configuring, operating, observing and alarm handling.
In order to be able to perform data exchange, services are defined which PROFIBUS DP differentiates between on the basis of the data access points transmitted in the telegram header.
The MA 204
i
i supports the communication profile for automation
i profile is based on the PROFIBUS profile for identification systems.

12.5.2 Bus-access protocol

The PROFIBUS communication profiles (DP,FMS) use a uniform bus-access process. It is implemented by layer 2 of the OSI model. The bus-access control (MAC) defines the process for specifying the point in time at which a network device can transmit data. It must ensure that no more than one participant has permission to transmit at any given time. The PROFIBUS bus-access process includes the token-passing process and the master-slave process.
64 MA 204i Leuze electronic
Process Description MA 204i
Token-passing process
Master-slave process
Table 12.1: PROFIBUS bus-access processes
The two processes can also be mixed in order to create a multi-master system. The MA 204i functions both in a mono-master system as well as in a multi-master system.
Notice!
In 2007, the PROFIBUS DP was extended by the DPV2 specification. The specification will then also permit slave-slave communication. The MA 204 communication.

12.5.3 Device types

With the PROFIBUS DP, there are two types of master and one type of slave:
Commissioning and configuration
With this process, the bus-access permission is distributed by means of a token. The participant obtains permission to transmit with t he token. The token wanders between the master devices in the ring in a permanently defined time frame. This type of bus access is used for communication between the masters. Various slave devices are assigned to a master. The master can address the slaves which are assigned to it and fetch messages from them. The master always has the initiative.
i does not support this type of
No
Yes
Device type Description MA 204i
Class 1 master (DPM1)
Class 2 Master (DPM2)
Slave
Table 12.2: PROFIBUS DP master and slave types
Note!
The device is defined as a slave in the device master file (GSD file) of the MA 204
All expanded services are not implemented for the MA 204
Leuze electronic MA 204i 65
Class 1 masters are defined for the user-data communication (e.g. PLC, PC).
Class 2 masters are defined for commissioning purposes. Additional services facilitate easier configuration as well as device diagnosis.
The slave is a peripheral device which makes available input data for the control and receives output data from the control.
i PROFIBUS profile.
X
i!
TNT 35/7-24V
Commissioning and configuration

12.5.4 Automatic baud rate detection

The PROFIBUS implementation of the MA 204
i uses this function and offers no possibility for manual or permanent adjustment.
MA 204 The following baud rates are supported:
Baud rate kBit/s9.6 19.2 45.45 93.75 187.5 500 1500 3000 6000 12000
i features automatic baud rate detection. The
Automatic baud rate detection is indicated in the device master file of the MA 204
Auto_Baud_supp = 1

12.5.5 Modular structure of the parameter

The PROFIBUS DP functionality of the device is defined via parameter sets which are clus­tered in modules. The modules are included in a GSD file, which is supplied as an integral part of the device. By using a user-specific project tool, such as, e.g., Simatic Manager for the Siemens programmable logic control, the required modules are integrated into a project during commissioning and its settings and parameters are adjusted accordingly. These modules are provided by the GSD file.
Notice!
All input and output modules described in this documentation are described from the controller's perspective:
- Input data arrives at the controller.
- Output data is sent out by the controller.
Detailed information on how to prepare the control and the GSD file may be found in chapter "Configuration steps for a Siemens Simatic S7 control" on page 60.
For the default settings of the MA 204
Notice!
Please note that the set data is overwritten by the PLC! Some controls make available a so-called "universal module". This module must not be activated for the MA 204
i!
i, please refer to the following module descriptions.
i:
From the perspective of the device, a distinction is made between PROFIBUS parameters and internal parameters. PROFIBUS parameters are all parameters that can be changed via the PROFIBUS and are described in the following modules. Internal parameters, on the other hand, can only be changed via a service interface and retain their value even following a PROFIBUS configuration.
During the configuration phase, the MA 204 IO Controller (master). Before this is evaluated and the respective parameter values are set, all PROFIBUS parameters are reset to default values. This ensures that the parameters of modules that are not selected are set to the default values.
66 MA 204i Leuze electronic
i receives parameter telegrams from the
Commissioning and configuration

12.5.6 Permanently defined parameters/device parameters

On the PROFIBUS, parameters may be stored in modules or may be defined permanently in a PROFIBUS participant.
The permanently defined parameters are called "common" parameters or device-specific parameters, depending on the configuration tool.
These parameters must always be present. They are defined outside of the configuration modules and are permanently anchored in the telegram header.
In Simatic Manager, the permanently defined parameters are set via object properties of the device. The module parameters are set via the module list of the selected device. By selecting the project properties of a module, the respective parameters may be set if required.
The following list contains the device parameters that are permanently defined in the MA 204
i (DAP Slot 0/Subslot 0) but are configurable. These parameters always exist and
are available independent of the modules.
Parameter Description Addr. Data type Value range Default Unit
Operating mode Baud rate 0.1 Bit Default, 9600 Default
Data bits 0.2 Bit 7, 8, 9 8 Parity 0.3 Bit Yes, None None Stop bit 0.4 Bit 0.1 1 Use separator 0.5 Bit Yes, No No Use status
and control bits
0:0 Bit
0.6 Bit Yes, No No
Table 12.3: Device parameters
0:Transparent mode 1:Collective mode
0 -
Parameter length: 33 byte
Input data
None
Output data
None
Leuze electronic MA 204i 67
TNT 35/7-24V
Commissioning and configuration

12.5.7 Overview of the project modules

When using PROFIBUS modules, the parameters are assembled dynamically, i.e., only the parameters that were selected by the activated modules are changed.
The MA 204 parameters are defined outside of modules and are thus linked to the base module (DAP).
In the current version, several modules are available for use. A device module (DAP, see Permanently defined parameters/device parameters) is used for basic scanner configuration of the MA 204 included into the project according to requirements and application.
The modules fall into the following categories:
• Parameter module for the configuration of the MA 204
• Status or control modules that influence the input/output data.
• Modules that may include both parameters and control or status information.
A PROFIBUS module defines the existence and meaning of the input and output data. In addition, it defines the necessary parameters. The arrangement of the data within a module is defined.
The composition of the input/output data is defined via the module list.
The MA 204 the MA 204 during initialization.
The same applies for the input data. Using the module list and the defined module proper­ties, the input data string is formatted and referenced to the internal data.
During cyclic operation, the input data is then passed on to the controller.
During the startup or initialization phase, the MA 204 (usually 0).
i has parameters (device parameters) that must always be present. These
i and is permanently integrated into the project. Further modules may be
i interprets the incoming output data and triggers the appropriate reactions in
i. The interpreter for processing the data is adapted to the module structure
i.
i sets the input data to an initial value
Notice!
The modules can be grouped together in any order in the engineering tool. Note, however, that many MA 204 of these data. The MA 204i offers different modules. Each of these modules may only be selected once; otherwise, the MA 204 The MA 204i checks its max. permissible number of modules. The control also reports an error if the input and output data across all selected modules exceed a total length of 488 bytes. A maximum of 244 bytes can be used for both the input data and for the output data. The specific limits of the individual modules of the MA 204i are declared in the GSD file.
68 MA 204i Leuze electronic
i modules contain related data. It is important to maintain the consistency
i ignores the configuration.
Commissioning and configuration
The following module overview shows the characteristics of the individual modules:
Module Description Input data Output data
4 bytes input Data content with max. 2 bytes 4 8 bytes input Data content with max. 6 bytes 8 12 bytes input Data content with max. 10 bytes 12 16 bytes input Data content with max. 14 bytes 16 20 bytes input Data content with max. 18 bytes 20 32 bytes input Data content with max. 30 bytes 32 64 bytes input Data content with max. 62 bytes 64 128 bytes input Data content with max. 126 bytes 128
4 bytes output Data content with max. 2 bytes 4 8 bytes output Data content with max. 6 bytes 8 12 bytes output Data content with max. 10 bytes 12 16 bytes output Data content with max. 14 bytes 16 20 bytes output Data content with max. 18 bytes 20 32 bytes output Data content with max. 30 bytes 32 64 bytes output Data content with max. 62 bytes 64 128 bytes output Data content with max. 126 bytes 128
Table 12.4: Module overview

12.5.8 Preparing the control system for consistent data transmission

During programming the control system must be prepared for consistent data transmission. This varies from control system to control system. The following possibilities are available for the Siemens control systems.
S7
The specific function blocks SFC 14 for input data and SFC 15 for output data must be inte­grated in the program. These are standard function blocks and are used to facilitate consis­tent data transmission.
Notice!
If an S7 control is used, you need to ensure that Simatic-Manager Version 5.4 + service pack 5 (V5.4+SP5) or higher is used.

12.6 Variable configuration of the communication data width

The communication of the MA 204 able data width; the upper limit is restricted by the fieldbus. The following sizes are available for the data frame for PROFIBUS DP:
4, 8, 12, 16, 20, 24, 28, 36, 64, 128 bytes
The small data lengths (< 28 bytes) are particularly of interest for use with bar code scanners (BCL). The larger data lengths are, on the other hand, relevant for 2D code scanners (hand­held scanners, LSIS) and RFID.
Taking into consideration the maximum permissible data width of 244 bytes, multiple modules can also be used for the input data or combined with one another. The combination of module 128 and module 64, for example, yields an input data length of 192 bytes.
Leuze electronic MA 204i 69
i with the fieldbus systems can be configured with a vari-
TNT 35/7-24V
Commissioning and configuration

12.7 Setting the read parameters on the Leuze device

Commissioning the Leuze device
To commission a read station, you must prepare the Leuze device on the MA 204i for its reading task. Communication with the Leuze device occurs via the service interface.
Notice!
Further information on connecting and using the service interface.
To do this, connect the Leuze device to the MA 204
Depending on the Leuze device, this occurs either via a connection cable (accessory no.: KB 031-1000) or directly on the MA 204 switches can be accessed with the housing cover open.
Select the "DEV" service switch position.
i. The service connector and corresponding
i.
Connect the service interface; call up the terminal program
Connect your PC to the service connector via the RS 232 cable.
On the PC, call up a terminal program (e.g., BCL-Config) and check whether the interface
(COM 1 or COM 2) to which you have connected the MA 204 standard setting: 9600 baud, 8 data bits, no parity, 1 stop bit and STX, data, CR, LF.
You can download the config. tool from www.leuze.de -> Download -> Identify for BCL, RFID, VR etc.
In order to communicate with the connected Leuze device, the STX, data, CR, LF framing must be set on the PC terminal program, as the Leuze device is preconfigured ex works for this frame character.
STX (02h): Prefix 1
CR (0Dh): Postfix 1
LF (0Ah): Postfix 2
i is set to the following Leuze
Operation
Switch the MA 204
The Leuze device is now connected to the fieldbus. Activation of the Leuze device can now occur via the switching input on the MA 204 or by transmitting a "+" command to the Leuze device (see chapter 16 "Specifications for Leuze end devices"). For further information on the fieldbus transmission protocol, see chapter 10 "Telegram".
i to switch position "RUN" (operation).
i, via the process data word Out-bit 1 (Bit 0.2)
70 MA 204i Leuze electronic
Commissioning and configuration
Reading out information in service mode
Set the service switch of the gateway to switch position "MA" (gateway).
Send a "v" command to call up all service information of the MA 204
An overview of the available commands and information can be found in chapter "Reading out information in service mode" on page 41.
i.

12.7.1 Specific feature for the use of hand-held scanners (bar code and 2D devices, combi devices with RFID)

Notice!
For a description of device configuration and the required codes, please see the correspond­ing documentation at www.leuze.com -> Download -> identify -> Bar code hand-held
readers or 2D code hand-held readers.
12.7.1.1 Cable-connected hand-held scanners on the MA 204
All hand-held scanners and mobile combi devices available in the Leuze electronic product line can be used with the corresponding connection cable.
When using the MA 204 connected to the interface by means of a cable via the 9-pin Sub-D connector (voltage on PIN 9). The corresponding cable is to be selected for the respective hand-held scanner and ordered separately. The 9-pin Sub-D cable (KB JST-HS-300, Part no. 50113397) is connected to this cable, which is connected to the MA 204 separately.
In this example, triggering occurs by means of a trigger button on the hand-held scanner.
12.7.1.2 Cableless hand-held scanners on the MA 204
All cableless hand-held scanners and mobile combi devices available in the Leuze electronic product line can be used with the corresponding connection cable via the base station.
A 230 VAC connection (socket) is usually necessary for the charging station. Here, a data connection of the charging station is established with the MA 204 is to be selected for the respective hand-held scanner and ordered separately. The 9-pin Sub-D cable (KB JST-HS-300, Part No. 50113397) is connected to this cable, which is connected to the MA 204
In this example, triggering occurs by means of a trigger button on the hand-held scanner.
The following codes for configuring the devices are necessary for these devices as well.
i, the voltage supply of the hand-held scanner (5 V/at 1 A) can be
i. This cable must also be ordered
i
i. This cable must also be ordered separately.
i
i. The corresponding cable
TNT 35/7-24V
Leuze electronic MA 204i 71
Commissioning and configuration

12.7.2 Specific features in the operation of an RFM/RFI

When using the MA 204 of at least 24 bytes to be able to transmit information to or from the reader in a telegram.
Shown here is a sample telegram for a write command in combination with an RFID device.
Notice!
Also note that all characters which are sent to a transponder are hex-encoded ASCII characters. Each of these (hexadecimal) characters is, in turn, to be handled as an individual ASCII character and converted to hexadecimal format for transmission via the fieldbus.
Example:
7 6 5 4 3 2 1 0
00 00 00 00 00 00 00 00 Control byte 0
00 00 00 00 00 00 00 00 Control byte 1
i in connection with an RFID device, we recommend a data width
34 35 31 31 30 35 30 57 00 00 34 37 33 37 35 36
Data
HEX 5730353031313534363537333734 CHAR W0501154657374 Plain text T e s t
72 MA 204i Leuze electronic
Diagnostics and troubleshooting

13 Diagnostics and troubleshooting

If problems should occur during commissioning of the MA 204i you can refer to the following table. Typical errors and their possible causes are described here as well as tips for their elimination.

13.1 General causes of errors

Error Possible error cause Measures
Data loss (DL bit) Data in the RS 232 instead of in the buffer
Data telegram longer than the bus telegram in bus cycle/memory size.
Incorrect order.
Increase in bus telegram length. Toggle out data earlier.
Correct order: Provide data, toggle CTB.
PWR status LED on the circuit board
Off
Green/orange, flashing Continuous orange light COM LED on the housing (see figure 8.1 on page 34)
Red continuous light
PWR LED on the housing (see figure 8.1 on page 34)
Off
Red continuous light Device error. Send the device to customer service. Green, flashing SERVICE active. Service switch on RUN.
Red, flashing
Red continuous light Device error. Send the device to customer service.
Table 13.1: General causes of errors
No supply voltage connected to the device. Check supply voltage. Hardware error. Send the device to customer service.
Device in boot mode.
Device error. Firmware update failed.
Communication error on the PROFIBUS: No communication to controller established ("no data exchange").
No supply voltage connected to the device. Check supply voltage. Device not yet recognized by the PROFIBUS.
Incorrect baud rate / address: Address >126: no communication
No valid firmware, send device to customer service.
Send the device to customer service.
Check interface. Cannot be rectified by a reset. Send the device to customer service.
Send the device to customer service.
Check switch settings: Address switch S1, S2,
TNT 35/7-24V
Leuze electronic MA 204i 73
Diagnostics and troubleshooting

13.2 Interface errors

Error Possible error cause Measures
No communication via PROFIBUS COM continuous red light LED
Sporadic errors at the PROFIBUS
Figure 13.1: Interface error
Notice!
Please use chapter 13 as a master copy should servicing be required. Cross the items in the "Measures" column which you have already examined, fill out the following address field and fax the pages together with your service contract to the fax number listed below.
Customer data (please complete)
Device type:
Company:
Contact partner / department:
Phone (direct):
Fax:
Street / No:
ZIP code/City:
Country:
Incorrect wiring. Check wiring. Different protocol settings. Check protocol settings. Incorrect PROFIBUS address set. Check PROFIBUS address.
Incorrect configuration.
Incorrect wiring.
Effects due to EMC.
Overall network expansion exceeded.
Check configuration of the device in the configuration tool. Check wiring. In particular, check wire shielding. Check the cable used. Check shielding (shield covering in place up to the clamping point). Check grounding concept and connection to functional earth (FE). Avoid EMC coupling caused by power cables laid parallel to device lines. Check max. network expansion as a function of the max. cable lengths.
Leuze Service fax number:
+49 7021 573 - 199
74 MA 204i Leuze electronic

14 Type overview and accessories

14.1 Type key

MA
2xx i
i = Integrated fieldbus technology
08 Ethernet TCP/IP 35 CANopen 38 EtherCAT 48 PROFINET RT 55 DeviceNet 58 EtherNet/IP MA Modular interfacing unit

14.2 Type overview

Type designation Description Description
MA 204
i PROFIBUS gateway 50112893 i Ethernet TCP/IP gateway 50112892
MA 208 MA 235
i CANopen 50114154
MA 238
i EtherCAT 50114155 i PROFINET-IO RT gateway 50112891
MA 248 MA 255
i DeviceNet 50114156
MA 258
i EtherNet/IP 50114157
Table 14.1: Type overview MA 2xxi
Interface 04 PROFIBUS DP
Type overview and accessories

14.3 Accessory terminating resistor

Type designation Description Part no.
TS 02-4-SO M12 M 12 connector with integrated terminating resistor for BUS OUT 50038539
Table 14.2: Terminating resistor for the MA 204
i

14.4 Accessory connectors

Type designation Description Description
KD 02-5-BA M 12 socket for HOST or BUS IN 50038538 KD 02-5-SA M 12 connector for BUS OUT 50038537 KDS BUS OUT M12-T-5P M 12 T-connector for BUS OUT 50109834 KD 095-5A M 12 socket for voltage supply 50020501 KS 095-4A M 12 connector for SW IN/OUT 50040155
Table 14.3: Connectors for the MA 204
Leuze electronic MA 204i 75
i
TNT 35/7-24V
Type overview and accessories
PWR IN
1
2
3
4
SWIO_2
SWIO_1
FE
5
GNDVIN
M 12 socket
(A-coded)
M 12 connector
(A-coded)

14.5 Accessory ready-made cables for voltage supply

14.5.1 Contact assignment of PWR connection cable

PWR IN (5-pin socket, A-coded)
Pin Name Core color
1 VIN brown
2 SWIO_2 white
3 GND blue
4 SWIO_1 black
5 FE gray
Thread FE bare
PWR OUT (5-pin connector, A-coded)
Pin Name Core color
1VOUT brown
2SWIO_2 white
3GND blue
4SWIO_1 black
5FE gray
Thread FE bare
GND
FE
PWR OUT
SWIO_2
2
3
5
4
SWIO_1
1
VOUT

14.5.2 Specifications of the cables for voltage supply

Operating temperature range in rest state: -30° C … +70° C
in motion: 5° C … +70° C
Material sheathing: PVC
Bending radius > 50 mm
76 MA 204i Leuze electronic
Type overview and accessories
M 12 socket
(B-coded)
M 12 connector
(B-coded)

14.5.3 Order codes of the cables for voltage supply

Type designation Description Part no.
K-D M12A-5P-5m-PVC
K-D M12A-5P-10m-PVC
Table 14.4: PWR cables for the MA 204i
M 12 socket for PWR, axial plug outlet, open cable end, cable length 5 m
M 12 socket for PWR, axial plug outlet, open cable end, cable length 10 m
50104557
50104559

14.6 Accessory ready-made cables for bus connection

14.6.1 General information

•Cable KB PB… for connecting to the BUS IN/BUS OUT M 12 connector
• Standard cable available in lengths from 2 … 30 m
• Special cables on request

14.6.2 Contact assignment of M 12-PROFIBUS connection cable KB PB…

PROFIBUS connection cable (5-pin socket/connector, B-coded)
A (N)
2
1
N.C. N.C.
4
B (P)
A (N)
2
3
5
N.C.
Pin Name Core color
1 N.C./VCC
2 A (N) green
3
N.C./
GND 485
4 B (P) red
5 N.C.
TNT 35/7-24V
3
N.C. N.C.
N.C.
5
4
B (P)
1
Thread FE bare
Leuze electronic MA 204i 77
Type overview and accessories
1 Conductor with insulation red 2 Conductor with insulation green 3 Drain wire 4 Fibrous fleece
Figure 14.1: Cable structure of PROFIBUS connection cable

14.6.3 Specifications of M 12-PROFIBUS connection cable KB PB…

Operating temperature range in rest state: -40° C … +80° C
in motion: -5° C … +80° C
Material The lines fulfill the PROFIBUS requirements and are
free of halogens, silicone, and PVC
Bending radius > 80 mm, suitable for drag chains

14.6.4 Order codes of M 12-PROFIBUS connection cable KB PB…

Type designation Description Part no.
M 12 socket for BUS IN, axial connector, open cable end
KB PB-2000-BA Cable length 2 m 50104181 KB PB-5000-BA Cable length 5 m 50104180 KB PB-10000-BA Cable length 10 m 50104179 KB PB-30000-BA Cable length 30 m 50104175
M 12 connector for BUS OUT, axial connector, open cable end
KB PB-2000-SA Cable length 2 m 50104188 KB PB-5000-SA Cable length 5 m 50104187 KB PB-10000-SA Cable length 10 m 50104186 KB PB-30000-SA Cable length 30 m 50104182
M 12 connector + M 12 socket for PROFIBUS/multiNet plus, axial connector
KB PB-1000-SBA Cable length 1 m 50104096 KB PB-2000-SBA Cable length 2 m 50104097 KB PB-5000-SBA Cable length 5 m 50104098 KB PB-10000-SBA Cable length 10 m 50104099 KB PB-30000-SBA Cable length 30 m 50104173
Table 14.5: Bus connection cable for the MA 204
i
78 MA 204i Leuze electronic
Type overview and accessories

14.7 Accessory ready-made cables for connecting Leuze ident devices

14.7.1 Order codes for the device connection cables

:
Type designation Description Part no.
KB JST-3000 MA 31, BCL 90, IMRFU-1(RFU), cable length 3 m 50115044 KB JST-HS-300 Hand-held scanner, cable length 0.3 m 50113397 KB JST-M12A-5P-3000 BPS 8, BCL 8, cable length 3 m 50113467 KB JST-M12A-8P-Y-3000 LSIS 4x2i, cable length 3 m 50113468 KB JST-M12A-8P-3000 LSIS 122, cable length 3 m 50111225 K-D M12A-5P-5m-PVC Voltage supply, cable length 5 m 50104557 K-D M12A-5P-10m-PVC Voltage supply, cable length 10 m 50104559 K-DS M12A-MA-5P-3m-S-PUR ODS 96B with RS 232 50115049 K-DS M12A-MA-8P-3m-S-PUR ODSL 30/D 232-M12 50115050 K-DS M12A-MA-5P-3m-1S-PUR Konturflex Quattro RSX 50116791 KB AMS 1000 SA AMS 200, cable length 1 m 50106978 KB 500-3000-Y BCL 300i, BCL 500i,cable length 3 m 50110240 KB 031 1000 BCL 32, cable length 1 m 50103621 KB 031 3000 BCL 32, cable length 3 m 50035355
Table 14.6: Device connection cables for the MA 204
Notice!
The BCL 22 devices with JST connector, RFM xx and RFI xx can be connected directly with the injection molded device cable.

14.7.2 Contact assignment for the device connection cables

i
K-D M12A-5P-5000/10000 connection cable (5-pin with injection molded connector), open cable end
Pin Core color
1brown
2white
3blue
4black
5gray
KB JST 3000 (RS 232 connection cable, JST pin strip 10-pin, open cable end)
Signal Core color JST 10-pin
TxD 232 red 5
RxD 232 brown 4
GND orange 9
FE shield 10
Leuze electronic MA 204i 79
TNT 35/7-24V
Maintenance

15 Maintenance

15.1 General maintenance information

The MA 204

15.2 Repairs, servicing

Repairs to the device must only be carried out by the manufacturer.
Contact your Leuze distributor or service organization should repairs be required.
The addresses can be found on the inside of the cover and on the back.
Notice!
When sending devices to Leuze electronic for repair, please provide an accurate description of the error.

15.3 Disassembling, packing, disposing

Repacking
For later reuse, the device is to be packed so that it is protected.
Notice!
Electrical scrap is a special waste product! Observe the locally applicable regulations regarding disposal of the product.
i does not require any maintenance by the operator.
80MA 204i Leuze electronic
Specifications for Leuze end devices

16 Specifications for Leuze end devices

Serial interface and Command mode
The corresponding Leuze end device can be selected while configuring the fieldbus gateway (see chapter 9 "Configuration").
The exact specifications for the individual Leuze end devices can be found in the following sections and in the device description.
The corresponding serial command is sent to the Leuze end device in Command mode. To send the corresponding command to the RS 232 device after activating the Command mode in byte 0 (control bit 0.0), set the corresponding bit in byte 2.
The Leuze end device also responds to most commands by sending data, such as the bar code contents, NoRead, device version, etc., back to the gateway. The answer is not eval­uated by the gateway, but is instead passed on to the PLC.
Additional parameters such as the baud rate and data mode can be configured via the GSD file with the "USE GSD settings" enable function. The data frame and, if necessary, the length are specified via the switch position. However, the changes have to match the device settings.
For the BPS 8, AMS and hand-held scanners, a number of specific features are to be noted.

16.1 Standard setting, KONTURflex (S4 switch position 0)

This switch position can be used with almost all devices, since a data frame is transmitted along with it if necessary. A 00h in the data range of the control is interpreted as the end of a telegram/invalid, however.
The distance between two successive telegrams (without frame) must be more than 20 ms in this switch position, since there is otherwise no clear separation between them. If neces­sary, the settings have to be adjusted on the device.
Leuze measuring sensors with RS 232 interface (such as a KONTURflex Quattro RS) do not necessarily use a telegram frame, which is why these are also operated in switch position 0.
Specifications for the serial interface
Default parameter Standard
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <Data> Data mode transparent
Notice!
The data frame is specified via the switch position. Only the data mode and the baud rate can also be set via the GSD file. In the factory setting, the S4 switch position is 0.
Leuze electronic MA 204i 81
TNT 35/7-24V
Specifications for Leuze end devices
KONTURflex specifications
Settings on the MA 204
• PROFIBUS address is freely selectable
• Device selection switch at position "0"
Settings on the PROFIBUS
• Module selection: Dependent on number of beams used, but at least "8 bytes in"
• User Parameters: "Transparent mode", "Use GSD settings", baud rate 38400, "8 data bits", "No parity", "2 stop bits";
KONTURflex settings
First, the following settings are to be performed on the device using KONTURFlex-Soft:
• Either "Autosend (fast)" or "Autosend with data in Modbus format"
• Repeat time "31.5 ms"
• Autosend baud rate "38.4 KB"
• 2 stop bits, no parity
i
82MA 204i Leuze electronic
Specifications for Leuze end devices

16.2 Bar code reader BCL 8 (S4 switch position 1)

Specifications for the serial interface
Default parameter BCL 8
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query v 1 Activation / deactivation reading gate + / ­2 Reference-code 1 teach-in RT1 3 Reference-code 2 teach-in RT2 4 Automatic configuration of reading task activation / deactivation CA+ / CA­5 Switching output 1 activation OA1 6 7 Switching output 1 deactivation OD1 8 System standby SOS 9 System active SON 10 Query reflector polling AR? 11 Output version of the boot kernel with check sum VB 12 Output version of the decoder program with check sum VK 13 Reset parameters to default values PC20 14 Device restart H
Recommended settings
• Input module: dependent on the number of digits of the bar code that is to be read.
With an 18-digit bar code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
serial command (ASCII)
TNT 35/7-24V
• Output module: 4 bytes
Leuze electronic MA 204i 83
Specifications for Leuze end devices

16.3 Bar code reader BCL 22 (S4 switch position 2)

Specifications for the serial interface
Default parameter BCL 22
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query v 1 Activation / deactivation reading gate + / ­2 Reference-code 1 teach-in RT1 3 Reference-code 2 teach-in RT2 4 Automatic configuration of reading task activation / deactivation CA+ / CA­5 Switching output 1 activation OA1 6 Switching output 2 activation OA2 7 Switching output 1 deactivation OD1 8 Switching output 2 deactivation OD2 9 10 11 Output version of the boot kernel with check sum VB 12 Output version of the decoder program with check sum VK 13 Reset parameters to default values PC20 14 Device restart H 15
serial command (ASCII)
Recommended settings
• Input module: dependent on the number of digits of the bar code that is to be read.
With an 18-digit bar code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
• Output module: 4 bytes
84MA 204i Leuze electronic
Specifications for Leuze end devices

16.4 Bar code reader BCL 32 (S4 switch position 3)

Specifications for the serial interface
Default parameter BCL 32
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query v 1 Activation / deactivation reading gate + / ­2 Reference code teach-in activation / deactivation , / . 3 4 Automatic configuration of reading task activation / deactivation CA+ / CA­5 Switching output 1 activation OA1 6 Switching output 2 activation OA2 7 Switching output 1 deactivation OD1 8 Switching output 2 deactivation OD2 9 10 11 12 13 14 Reset parameters to default values PC20 15 Device restart H
serial command (ASCII)
TNT 35/7-24V
Recommended settings
• Input module: dependent on the number of digits of the bar code that is to be read.
With an 18-digit bar code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
• Output module: 4 bytes
Leuze electronic MA 204i 85
Specifications for Leuze end devices

16.5 Bar code reader BCL 300i, BCL 500i (S4 switch position 4)

Specifications for the serial interface
Default parameter BCL 300i, BCL 500i
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
serial command (ASCII)
0 Version query v 1 Activation / deactivation reading gate + / ­2 Reference code teach-in activation / deactivation RT+ / RT­3 4 Autom. configuration of reading task activation / deact. CA+ / CA­5 Switching output 1 activation OA1 6 Switching output 2 activation OA2 7 Switching output 1 deactivation OD1 8 Switching output 2 deactivation OD2 9 10 11 12 13 Parameter - difference to default parameter set PD20 14 Reset parameters to default values PC20 15 Device restart H
Recommended settings
• Input module: dependent on the number of digits of the bar code that is to be read.
With an 18-digit bar code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
• Output module: 4 bytes
86MA 204i Leuze electronic
Specifications for Leuze end devices

16.6 Bar code reader BCL 90 (S4 switch position 5)

Specifications for the serial interface
Default parameter BCL 90
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query v 1 Activation / deactivation reading gate + / ­2 Configuration mode 11 3 Alignment mode 12 4 Read operation 13 5 6 7 8 9 10 11 12 13 14 Reset parameters to default values PC20 15 Device restart H
serial command (ASCII)
TNT 35/7-24V
Recommended settings
• Input module: dependent on the number of digits of the bar code that is to be read.
With an 18-digit bar code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
• Output module: 4 bytes
Leuze electronic MA 204i 87
Specifications for Leuze end devices

16.7 LSIS 122 (S4 switch position 6)

Specifications for the serial interface
Default parameter LSIS 122
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query i 1 Activation/Deactivation of reading gate: 12h/14h <DC2> / <DC4> 2 3 4 5 6 7 8 9 10 11 12 13 14 15
serial command (ASCII)
Recommended settings
• Input module: dependent on the number of digits of the 2D code that is to be read.
With a 18-digit code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
• Output module: 4 bytes
88 MA 204i Leuze electronic

16.8 LSIS 4x2i (S4 switch position 7)

Specifications for the serial interface
Default parameter LSIS 4x2i
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query v 1 Image acquisition trigger + 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Specifications for Leuze end devices
serial command (ASCII)
TNT 35/7-24V
Recommended settings
• Input module: dependent on the number of digits of the 2D code that is to be read.
With a 18-digit code (+ 2 bytes of status bytes), for example, the input module with 20 bytes is sensible.
• Output module: 4 bytes
Leuze electronic MA 204i 89
Specifications for Leuze end devices

16.9 Hand-held scanner (S4 switch position 8)

Specifications for the serial interface
Default parameter Hand-held scanner
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <Data> <CR> <LF>
Notice!
Command mode cannot be used with hand-held scanners.
Recommended settings
• Input module: dependent on the number of digits of the bar code or 2D code that is to be read.
With a 12-digit code (+ 2 bytes of status bytes), for example, the input module with 16 bytes is sensible.
• Output module: none
90MA 204i Leuze electronic
Specifications for Leuze end devices

16.10 RFI, RFM, RFU RFID readers (S4 switch position 9)

Specifications for the serial interface
Default parameter RFM 12,RFM 32 and RFM 62
RFI 32 RFU (via IMRFU)
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Recommended settings
Control bit Meaning Corresponds to
0 Version query v 1 Activation / deactivation reading gate + / ­2 3 4 5 6 7 8 9 10 11 12 13 14 Reset parameters to default values R 15 Device restart H
1) Not for IMRFU/RFU
Input module: dependent on the number of digits of the RFID code that is to be read.
For example, it is advisable to use the input module/output module setting with 24 bytes during the reading of a serial number with 16 characters (+ 2 bytes of status bytes).
• Output module: 4 bytes
If data are to be written, it is advisable to use the setting with 24 bytes or 32 bytes. The RFID devices expect the telegrams / data in HEX format.
serial command (ASCII)
TNT 35/7-24V
1)
Leuze electronic MA 204i 91
Specifications for Leuze end devices

16.11 BPS 8 bar code positioning system (S4 switch position A)

Specifications for the serial interface
Default parameter BPS 8
Baud rate 57600 Data mode 8N1 Handshake no Protocol binary protocol without acknowledgment Frame <Data>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to serial command
(HEX)
byte 1 byte 2 0 Request diagnostic info 01 01 1 Request marker info 02 02 2 Request SLEEP mode 04 04 3 Request position info 08 08 4 Request individual measurement 10 10 5 6 7 8 9 10 11 12 13 14 15
Recommended settings
• Input module: 8 bytes
• Output module: 4 bytes
In this switch position, the MA automatically sends a position request to the BPS 8 every 10 ms until another command comes via the control. Automatic request only restarts when a new position request is sent by the PLC or when the MA is restarted.
92MA 204i Leuze electronic
Specifications for Leuze end devices

16.12 AMS distance measurement device, ODSL xx optical distance sensors with RS 232 interface (S4 switch position B)

Notice!
In this switch position, 6-byte data (fixed) is always expected by the device. This is why a quick telegram sequence can be transmitted reliably even without a data frame.
AMS
Specifications for the serial interface
Default parameter AMS
Baud rate 38400 Data mode 8N1 Handshake no Protocol binary protocol without acknowledgment Frame <Data>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
serial command (HEX)
0 Transmit individual position value = single shot C0F131 1 Cyclically transmit position values C0F232 2 Stop cyclical transmission C0F333 3 Laser diode on C0F434 4 Laser diode off C0F535 5 Transmit single speed value C0F636 6 Cyclically transmit speed values C0F737 7 8 9 10 11 12 13 14 15
Recommended settings
• Input module: 8 bytes
• Output module: 8 bytes
Leuze electronic MA 204i 93
TNT 35/7-24V
Specifications for Leuze end devices

ODSL 9, ODSL 30 and ODSL 96B

Notice!
The default settings of the ODS serial interface have to be adjusted! Further information on configuration of the interface can be found in the technical description of the corresponding device.
Specifications for the serial interface
Default parameter AMS
Baud rate 38400 Data mode 8N1 Handshake no Protocol ASCII transmission, 5-digit measurement value Frame <Data>
Specifications for Command mode
Command mode cannot be used with the ODSL 9, ODSL 30 and ODSL 96B.
The ODSL 9/96B is to be operated in the "Precision" measure mode. The mode is set through the display menu via Application -> Measure mode -> Precision. You can find more details on this in the technical description.
94MA 204i Leuze electronic
Specifications for Leuze end devices

16.13 Modular interfacing unit MA 3x (S4 switch position C)

Specifications for the serial interface
Default parameter MA 3x
Baud rate 9600 Data mode 8N1 Handshake no Protocol framing protocol without acknowledgment Frame <STX> <Data> <CR> <LF>
Specifications for Command mode
To activate the Command mode, bit 0 must be set to 1 in control byte 0.
For further information, see chapter 11.1.3 "Command mode", figure 11.2.
Control bit Meaning Corresponds to
0 Version query v 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Reset parameters to default values PC20 15 Device restart H
serial command (ASCII)
TNT 35/7-24V
Recommended settings
• Input module: dependent on the number of digits of the code that is to be read.
With an 18-digit bar code (+ 2 bytes of status bytes + 2 bytes of slave address), for example, it is advisable to use the 24-byte setting.
• Output module: 4 bytes
Notice!
In this switch position, the address of the multiNet slave is also transmitted in the first two bytes of the data range!
Leuze electronic MA 204i 95
Appendix

17 Appendix

17.1 ASCII table

HEX DEC CTRL ABB DESIGNATION MEANING
00 0 ^@ NUL NULL Null 01 1 ^A SOH START OF HEADING Start of heading 02 2 ^B STX START OF TEXT Start of text characters 03 3 ^C ETX END OF TEXT Last character of text 04 4 ^D EOT END OF TRANSMISSION End of transmission 05 5 ^E ENQ ENQUIRY Request to transmit data 06 6 ^F ACK ACKNOWLEDGE Positive acknowledgment 07 7 ^G BEL BELL Bell signal 08 8 ^H BS BACKSPACE Backspace 09 9 ^I HT HORIZONTAL TABULATOR Horizontal tabulator 0A 10 ^J LF LINE FEED Line feed 0B 11 ^K VT V ERTI CAL TABUL ATOR Vertical tabulator 0C 12 ^L FF FORM FEED Form feed 0D 13 ^M CR CARRIAGE RETURN Carriage return 0E 14 ^N SO SHIFT OUT Shift out 0F 15 ^O SI SHIFT IN Shift in 10 16 ^P DLE DATA LINK ESCAPE Data link escape 11 17 ^Q DC1 DEVICE CONTROL 1 (X-ON) Device control character 1 12 18 ^R DC2 DEVICE CONTROL 2 (TAPE) Device control character 2 13 19 ^S DC3 DEVICE CONTROL 3 (X-OFF) Device control character 3 14 20 ^T DC4 DEVICE CONTROL 4 Device control character 4 15 21 ^U NAK NEGATIVE (/Tape) ACKNOWLEDGE Negative acknowledge 16 22 ^V SYN SYNCRONOUS IDLE Synchronization 17 23 ^W ETB END OF TRANSMISSION BLOCK End of data transmission bloc 18 24 ^X CAN CANCEL Invalid 19 25 ^Y EM END OF MEDIUM End of medium 1A 26 ^Z SUB SUBSTITUTE Substitution 1B 27 ^[ ESC ESCAPE Escape 1C 28 ^\ FS FILE SEPARATOR File separator 1D 29 ^] GS GROUP SEPARATOR Group separator 1E 30 ^^ RS RECORD SEPARATOR Record separator 1F 31 ^_ US UNIT SEPARATOR Unit separator 20 32 SP SPACE Space 21 33 ! EXCLAMATION POINT Exclamation point 22 34 " QUOTATION MARK Quotation mark 23 35 # NUMBER SIGN Number sign 24 36 $ DOLLAR SIGN Dollar sign 25 37 % PERCENT SIGN Percent sign 26 38 & AMPERSAND Ampersand 27 39 ' APOSTROPHE Apostrophe 28 40 ( OPENING PARENTHESIS Opening parenthesis
96MA 204i Leuze electronic
Appendix
HEX DEC CTRL ABB DESIGNATION MEANING
29 41 ) CLOSING PARENTHESIS Closing parenthesis 2A 42 * ASTERISK Asterisk 2B 43 + PLUS Plus sign 2C 44 , COMMA Comma 2D 45 - HYPHEN (MINUS) Hyphen (minus) 2E 46 . PERIOD (DECIMAL) Period (decimal) 2F 47 / SLANT Slant 30 48 0 31 49 1 32 50 2 33 51 3 34 52 4 35 53 5 36 54 6 37 55 7 38 56 8 39 57 9 3A 58 : COLON Colon 3B 59 ; SEMICOLON Semicolon 3C 60 < LESS THAN Less than 3D 61 = EQUALS Equals 3E 62 > GREATER THAN Greater than 3F 63 ? QUESTION MARK Question mark 40 64 @ COMMERCIAL AT Commercial AT 41 65 A 42 66 B 43 67 C 44 68 D 45 69 E 46 70 F 47 71 G 48 72 H 49 73 I 4A 74 J 4B 75 K 4C 76 L 4D 77 M 4E 78 N 4F 79 O 50 80 P 51 81 Q 52 82 R 53 83 S 54 84 T 55 85 U 56 86 V 57 87 W 58 88 X
TNT 35/7-24V
Leuze electronic MA 204i 97
Appendix
HEX DEC CTRL ABB DESIGNATION MEANING
59 89 Y 5A 90 Z 5B 91 [ OPENING BRACKET Opening bracket 5C 92 \ REVERSE SLANT Reverse slant 5D 93 ] CLOSING BRACKET Closing bracket 5E 94 ^ CIRCUMFLEX Circumflex 5F 95 _ UNDERSCORE Underscore 60 96 GRAVE ACCENT Grave accent 61 97 a 62 98 b 63 99 c 64 100 d 65 101 e 66 102 f 67 103 g 68 104 h 69 105 i 6A 106 j 6B 107 k 6C 108 l 6D 109 m 6E 110 n 6F 111 o 70 112 p 71 113 q 72 114 r 73 115 s 74 116 t 75 117 u 76 118 v 77 119 w 78 120 x 79 121 y 7A 122 z 7B 123 { OPENING BRACE Opening brace 7C 124 | VERTICAL LINE Vertical line 7D 125 } CLOSING BRACE Closing brace 7E 126 ~ TILDE Tilde 7F 127 DEL DELETE (RUBOUT) Delete
98 MA 204i Leuze electronic
Loading...