IFM AL1340 User manual

Operating Instructions
IO-Link Master with Modbus TCP interface
DataLine
4 Ports
IP 65 / IP 66 / IP 67
AL1340
IO-Link: 1.1.2
ifm firmware: 2.1.19 or higher
LR DEVICE: 1.3.0.131 or higher
English
7391168 / 00 04 / 2018

2
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Content
Table of Contents
1Preliminary note 5
1.1 Legal and copyright information...........................................................................................5
1.2 Purpose of the document.....................................................................................................5
1.3 Symbols and styles used.....................................................................................................6
1.4 Modification history ..............................................................................................................6
2Safety instructions 7
2.1 General ................................................................................................................................7
2.2 Required background knowledge ........................................................................................7
2.3 Safety symbols on the device..............................................................................................8
2.4 Tampering with the unit........................................................................................................8
3Intended use 9
3.1 Permitted use.......................................................................................................................9
3.2 Prohibited use......................................................................................................................9
4Function 10
4.1 Communication, parameter setting, evaluation .................................................................11
4.1.1 IO-Link........................................................................................................................................11
4.1.2 Modbus TCP ..............................................................................................................................11
4.1.3 Internet of Things (IoT)...............................................................................................................11
4.1.4 Parameter setting.......................................................................................................................11
4.1.5 Visual indication .........................................................................................................................12
4.2 Digital inputs.......................................................................................................................12
4.3 IO-Link supply....................................................................................................................12
5Mounting 13
5.1 Mount the device................................................................................................................13
6Electrical connection 14
6.1 Remarks.............................................................................................................................14
6.2 Modbus TCP ports.............................................................................................................15
6.3 IoT port...............................................................................................................................15
6.4 IO-Link ports.......................................................................................................................16
6.4.1 Input circuit.................................................................................................................................17
6.4.2 IO-Link circuits............................................................................................................................17
6.5 Connect the device ............................................................................................................18
7Operating and display elements 19
7.1 Overview............................................................................................................................19
7.2 LED indicators....................................................................................................................20
7.2.1 Status LEDs ...............................................................................................................................20
7.2.2 Ethernet interface.......................................................................................................................21
7.2.3 IoT port.......................................................................................................................................21
7.2.4 Voltage supply............................................................................................................................21
7.2.5 IO-Link ports (Class A)...............................................................................................................22

3
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Content
8Configuration 23
8.1 LR DEVICE........................................................................................................................24
8.1.1 Remarks.....................................................................................................................................25
8.1.2 IoT: Configure access rights.......................................................................................................26
8.1.3 IoT: Configure IP settings...........................................................................................................27
8.1.4 IoT: Configure the interface to the LR SMARTOBSERVER.......................................................28
8.1.5 Fieldbus: configure Modbus TCP port........................................................................................29
8.1.6 IO-Link ports: Activate data transfer to the LR SMARTOBSERVER ..........................................30
8.1.7 IO-Link ports: Configure operating mode....................................................................................31
8.1.8 IO-Link ports: Set the device validation and data storage ..........................................................32
8.1.9 IO-Link ports: set fail-safe values...............................................................................................33
8.1.10 Info: Show device information ....................................................................................................33
8.1.11 Firmware: Reset device to factory settings.................................................................................34
8.1.12 Firmware: Reboot the device......................................................................................................34
8.1.13 Configure IO-Link devices..........................................................................................................35
8.2 Modbus TCP......................................................................................................................36
8.2.1 Integrate the AL1340 into the Modbus project............................................................................36
8.2.2 Set IO-Link master and IO-Link ports.........................................................................................38
8.2.3 read input data of several IO-Link ports......................................................................................39
8.2.4 Read input data of individual IO-Link ports.................................................................................40
8.2.5 Write output data of several IO-Link ports..................................................................................41
8.2.6 Write output data of individual IO-Link ports...............................................................................42
8.2.7 Read diagnostic information and events.....................................................................................43
8.2.8 Read device information.............................................................................................................44
8.2.9 Control IO-Link master ...............................................................................................................44
8.2.10 Configure IO-Link devices..........................................................................................................44
8.2.11 Modbus TCP: Programmers' notes ............................................................................................45
8.3 IoT Core.............................................................................................................................47
8.3.1 Configure IoT port ......................................................................................................................48
8.3.2 Configure the fieldbus port .........................................................................................................49
8.3.3 Configure IO-Link ports ..............................................................................................................49
8.3.4 Set application identification.......................................................................................................50
8.3.5 Read / write cyclic process data.................................................................................................50
8.3.6 Read diagnostic data..................................................................................................................50
8.3.7 Read device information.............................................................................................................51
8.3.8 Read information about IO-Link devices ....................................................................................51
8.3.9 Configure IO-Link devices..........................................................................................................52
8.3.10 Control IO-Link master ...............................................................................................................52
8.3.11 Examples....................................................................................................................................53
8.3.12 Programmers' notes...................................................................................................................57

4
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Content
9Operation 61
9.1 Identify device....................................................................................................................61
9.2 Firmware update................................................................................................................62
9.3 Replace IO-Link device......................................................................................................63
10 Maintenance 64
11 Factory settings 65
12 Accessories 66
13 Appendix 67
13.1 Technical data....................................................................................................................68
13.1.1 Application..................................................................................................................................68
13.1.2 Electrical data.............................................................................................................................68
13.1.3 Inputs / outputs...........................................................................................................................68
13.1.4 Inputs..........................................................................................................................................69
13.1.5 Outputs.......................................................................................................................................69
13.1.6 Interfaces....................................................................................................................................69
13.1.7 Operating conditions ..................................................................................................................70
13.1.8 Approvals / tests.........................................................................................................................70
13.1.9 Mechanical data.........................................................................................................................70
13.1.10 Electrical connection ..................................................................................................................71
13.2 Modbus TCP......................................................................................................................72
13.2.1 Register......................................................................................................................................73
13.2.2 Acyclic commands......................................................................................................................89
13.3 ifm IoT Core .....................................................................................................................100
13.3.1 Overview: IoT profile ................................................................................................................101
13.3.2 Overview: IoT types..................................................................................................................104
13.3.3 Overview: IoT services.............................................................................................................105
14 Index 117

5
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Preliminary note Legal and copyright information
1Preliminary note
Legal and copyright information ...............................................................................................................5
Purpose of the document .........................................................................................................................5
Symbols and styles used..........................................................................................................................6
Modification history...................................................................................................................................6
14801
>
1.1 Legal and copyright information
1631
© All rights reserved by ifm electronic gmbh. No part of this manual may be reproduced and used
without the consent of ifm electronic gmbh.
All product names, pictures, companies or other brands used on our pages are the property of the
respective rights owners:
AS-i is the property of the AS-International Association, (→www.as-interface.net)
CAN is the property of the CiA (CAN in Automation e.V.), Germany (→www.can-cia.org)
CODESYS™ is the property of the 3S – Smart Software Solutions GmbH, Germany
(→www.codesys.com)
DeviceNet™ is the property of the ODVA™ (Open DeviceNet Vendor Association), USA
(→www.odva.org)
EtherNet/IP® is the property of the →ODVA™
EtherCAT®is a registered trade mark and patented technology, licensed by Beckhoff Automation
GmbH, Germany
IO-Link®(→www.io-link.com) is the property of the →PROFIBUS Nutzerorganisation e.V.,
Germany
ISOBUS is the property of the AEF –Agricultural Industry Electronics Foundation e.V.,
Deutschland (→www.aef-online.org)
Microsoft®is the property of the Microsoft Corporation, USA (→www.microsoft.com)
PROFIBUS®is the property of the PROFIBUS Nutzerorganisation e.V., Germany
(→www.profibus.com)
PROFINET®is the property of the →PROFIBUS Nutzerorganisation e.V., Germany
Windows®is the property of the →Microsoft Corporation, USA
>
1.2 Purpose of the document
22044
This document is only for device types "IO-Link master - Modbus TCP gateway (DataLine) 4 port IP 65
/ IP 66 / IP 67" (art. no.: AL1340).
It is part of the device and contains information about the correct handling of the product.
►Read this document before using the device.
►Keep this document during the service life of the device.

6
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Preliminary note Symbols and styles used
>
1.3 Symbols and styles used
15989
WARNING
Death or serious irreversible injuries may result.
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
Important note
Non-compliance can result in malfunction or interference
Information
Supplementary note
►...
Request for action
>...
Reaction, result
→...
"see"
abc
Cross-reference
123
0x123
0b010
Decimal number
Hexadecimal number
Binary number
[...]
Designation of pushbuttons, buttons or indications
>
1.4 Modification history
21676
Version
Topic
Date
00
New creation of document
04 / 2018

7
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Safety instructions General
2Safety instructions
General.....................................................................................................................................................7
Required background knowledge.............................................................................................................7
Safety symbols on the device...................................................................................................................8
Tampering with the unit............................................................................................................................8
213
>
2.1 General
22068
The plant manufacturer is responsible for the safety of the plant in which the device is
installed.
If the device is used in a way that is not intended by the manufacturer, the protection
supported by the device may be impaired.
Non-observance of the instructions, operation which is not in accordance with use as
prescribed below, wrong installation or incorrect handling can affect the safety of operators
and machinery.
►Observe these operating instructions.
►Adhere to the warning notes on the product.
>
2.2 Required background knowledge
22046
This document is intended for specialists. Specialists are people who, based on their relevant training
and experience, are capable of identifying risks and avoiding potential hazards that may be caused
during operation or maintenance of the product.
The document contains information about the correct handling of the product.

8
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Safety instructions Safety symbols on the device
>
2.3 Safety symbols on the device
15021
General warning
Observe instructions in chapter "Electrical connection" (→Electrical connection (→p. 14))!
>
2.4 Tampering with the unit
11242
WARNING
Tampering with the units can affect the safety of operators and machinery!
Tampering with the units is not allowed.
In case of non-compliance our liability and warranty expire.
►Do not open the devices!
►Do not insert any objects into the devices!
►Prevent metal foreign bodies from penetrating!

9
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Intended use Permitted use
3Intended use
Permitted use ...........................................................................................................................................9
Prohibited use...........................................................................................................................................9
18761
>
3.1 Permitted use
22052
The IO-Link master serves as a gateway between intelligent IO-Link devices and the fieldbus. The
device is designed for use without a control cabinet in the plant construction.
>
3.2 Prohibited use
22053
The device may not be used beyond the limits of the technical data (→Technical data (→p. 68))!

10
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Function Prohibited use
4Function
Communication, parameter setting, evaluation......................................................................................11
Digital inputs...........................................................................................................................................12
IO-Link supply.........................................................................................................................................12
7482

11
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Function Communication, parameter setting, evaluation
>
4.1 Communication, parameter setting, evaluation
IO-Link....................................................................................................................................................11
Modbus TCP...........................................................................................................................................11
Internet of Things (IoT)...........................................................................................................................11
Parameter setting ...................................................................................................................................11
Visual indication......................................................................................................................................12
7485
>
4.1.1 IO-Link
7773
The device offers the following IO-Link functions:
IO-Link master (IO-Link revision 1.0 and 1.1)
4 IO-Link ports for connection of IO-Link devices
Provision of process data of the connected IO-Link devices for LR SMARTOBSERVER monitoring
software (→www.ifm.com)
>
4.1.2 Modbus TCP
2259
The device offers the following Modbus TCP functions:
Provision of the functions of a Modbus TCP Slave
2 port switch for access to the Modbus TCP interface (X21/X22)
Gateway for transmission of the process and parameter data between the connected IO-Link
devices and the higher-level Modbus TCP controller
>
4.1.3 Internet of Things (IoT)
8355
The device has an Ethernet port (X23) for Internet-of-Things applications. The interface allows
separate access from IT networks to parameters, process and monitoring data of the IO-Link master
and the connected IO-Link devices. Different protocols (e.g. TCP/IP JSON) are supported.
>
4.1.4 Parameter setting
7284
The device provides the following configuration options:
Parameter setting of the IO-Link master of the AL1340 with LR DEVICE parameter setting
software, Modbus TCP projection software or ifm IoT-Core services.
Parameter setting of the connected IO-Link devices (sensors, actuators) with LR DEVICE
parameter setting software, Modbus TCP projection software or ifm IoT-Core services
Storage of parameter sets of the connected IO-Link devices for automatic recovery (data storage)

12
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Function Digital inputs
>
4.1.5 Visual indication
7772
The device has the following visual indicators:
Status and error indication of the gateway, of the Modbus TCP connection and of the system
Status display of the voltage supply
Status and activity display of the Ethernet connection
Status, error and short circuit/overload indication of the IO-Link ports
>
4.2 Digital inputs
7584
The device has 4 additional digital inputs (type 2 according to EN 61131-2).
The digital inputs are on pin 2 of the IO-Link ports X01 ... X04.
All inputs refer to the potential of the device supply (pin 3).
>
4.3 IO-Link supply
7623
The device has 4 supplies for IO-Link devices.
The IO-Link ports X01...X04 are ports class A.
Every supply provides short circuit monitoring.
The device ensures fire protection for the connected IO-Link devices by providing a power-restricted
circuit at the IO-Link ports (according to IEC61010-1 and Class 2 according to UL1310).

13
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Mounting Mount the device
5Mounting
Mount the device ....................................................................................................................................13
22016
>
5.1 Mount the device
15540
►Disconnect the system from power before installation.
►For installation choose a flat mounting surface.
►Please observe the maximum tightening torque.
►Fix the unit to the mounting surface using 2 M5 mounting screws and washers.
Tightening torque: 1.8 Nm
►Ground the unit via the two mounting screws of the upper mounting lugs.

14
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Electrical connection Remarks
6Electrical connection
Remarks .................................................................................................................................................14
Modbus TCP ports..................................................................................................................................15
IoT port ...................................................................................................................................................15
IO-Link ports...........................................................................................................................................16
Connect the device.................................................................................................................................18
22017
>
6.1 Remarks
18076
A qualified electrician must connect the unit.
►Observe the national and international regulations for the installation of electrical
equipment.
Device is only suitable for operation on SELV/PELV voltages.
►Observe the information concerning IO-Link circuits (→IO-Link circuits (→p. 17))!
The device contains components that can be damaged or destroyed by electrostatic discharge
(ESD).
►Observe the required safety measures against electrostatic discharge!
The IP rating depends on the individual protection ratings of the unit, the applied connection
elements and the corresponding protective covers.
►For UL applications: For connecting the device and the IO-Link devices use UL certificated
cables of category CYJV or PVVA with a minimum temperature rating of 100°C.
►Depending on the mounting conditions, cables must be provided with a strain relief to
avoid unacceptable loads on the mounting points and M12 connections.
►Make sure that the M12 connection parts are correctly seated and mounted correctly. The
specified protection rating can not be guaranteed if this is not observed.
Wiring: →Technical data (→p. 68)
The communication interfaces are seperated from the device supply according to EN61010-1
considering basis isolation as secondary circuit with maximum 30 V DC derived from the
applied voltage up to 300 V of overvoltage category II. The communication interfaces are
designed for a network environment 0 according to IEC TR62102.

15
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Electrical connection Modbus TCP ports
>
6.2 Modbus TCP ports
17849
►Connect the device via the M12 socket X21 and/or X22 to the
Modbus TCP network
(e.g. Modbus TCP PLC, additional Modbus TCP device)
Tightening torque: 0.6...0.8 Nm
►To connect the devices, use M12 connectors with protection rating
IP 65 / IP 66 / IP 67 or higher (→Accessories (→p. 66)).
►Cover the unused sockets with M12 protective caps (art no.
E73004).
Tightening torque 0.6...0.8 Nm
>
6.3 IoT port
11029
►Connect the device via the M12 socket X23 to the IT network (e.g.
laptop/PC with installed LR DEVICE parameter setting software,
laptop/PC with installed LR SMARTOBSERVER monitoring
software)
Tightening torque: 0.6...0.8 Nm
►To connect the devices, use M12 connectors with protection rating
IP 65 / IP 66 / IP 67 or higher (→Accessories (→p. 66)).
►Cover the unused sockets with M12 protective caps (art no.
E73004)
Tightening torque 0.6...0.8 Nm

16
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Electrical connection IO-Link ports
>
6.4 IO-Link ports
22684
Ports X01...X04: For use as IO-Link port class A:
►Connect the connector of the IO-Link devices with the M12 sockets
X01 ... X04.
Tightening torque: 0.6...0.8 Nm
Maximum cable length per IO-Link interface: 20 m
►For the connection, use M12 connectors with protection rating IP 65
/ IP 66 / IP 67 or higher (→Accessories (→p. 66)).
Ports X01...X04: For use as IO-Link port class B:
►Connect the connector of the IO-Link devices via the adapter with
the M12 sockets X01 ... X04.
Tightening torque: 0.6...0.8 Nm
►To connect the devices, use M12 connectors with protection rating
IP 65 / IP 66 / IP 67 or higher (→Accessories (→p. 66)).
►Cover the unused sockets with M12 protective caps (art no.
E73004).
Tightening torque 0.6...0.8 Nm

17
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Electrical connection IO-Link ports
>
6.4.1 Input circuit
18629
The inputs of the ports X01...X04 (pin 2) provide a type 2 behaviour according to standard EN61131-2,
the connected electronics must be rated for this electrically.
>
6.4.2 IO-Link circuits
11616
The IO-Link interfaces of the device meet the requirements of the IO-Link specification 1.0 to 1.1.2.
The connected IO-Link devices may only be supplied via the AL1340.
Exception: Connection of IO-Link devices to ports X01...X04 via suitable connection
technology for port class B operation (→IO-Link ports (→p. 16)):
The external supply for port class B operation must be galvanically separeted from the circuit
of the AL1340 by assuring basic isolation (according to EN61010-1, secondary circuit with
maximum 30 V DC derived from applied voltage up to 300 V of overvoltage category II)!
The isolation must be done both for IO-Link devices and for the connection technology.
NOTICE
Risk of material damage
If the requirements of galvanic separation of the circuits are not observed, the fire protection of the
device can not be assured.
►Observe the requirements of the electrical connection of IO-Link devices for port class B
operation!
Further information: →Technical data (→p. 68)

18
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Electrical connection Connect the device
>
6.5 Connect the device
2580
►Disconnect power.
►Connect the unit via M12 socket X31 to 24 V DC
(20...30 V SELV/PELV, for cULus max. 24 V DC; according to
EN61010-1, secondary circuit with maximum 30 V DC derived from
applied voltage up to 300 V of overvoltage category II).
Tightening torque: 0.6...0.8 Nm
Maximum cable length: 25 m
►To connect the device , use M12 connectors with protection rating
IP 65 / IP 66 / IP 67 or higher (→Accessories (→p. 66)).
If the port X01...X04 will be used as IO-Link ports Class B:
►Connect adapter for Port Class B operation to 24 V DC
(20...30 V SELV/PELV, for cULus max. 24 V DC; according to
EN61010-1, secondary circuit with maximum 30 V DC derived from
applied voltage up to 300 V of overvoltage category II) (→IO-Link
ports (→p. 16))
Tightening torque: 0.6...0.8 Nm
When using connectors longer than 25 m keep in mind the voltage drop as well as the
required minimum voltage supply of the AL1340.

19
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Operating and display elements Overview
7Operating and display elements
Overview.................................................................................................................................................19
LED indicators ........................................................................................................................................20
5440
>
7.1 Overview
17857
1
RDY, RUN and ERR status LEDs
→Status LEDs (→p. 20)
2
LNK and ACT status LEDs of the Modbus TCP
interfaces 1 (X21) and 2 (X22)
→Ethernet interface (→p. 21)
3
LNK, ACT status-LEDs and IoT LED of the IoT
interface (X23)
→IoT port (→p. 21)
4
IOL and DI status-LEDs of the IO-Link port (X01...X04)
→IO-Link ports (Class A) (→p. 22)
5
PWR status LED of the voltage supply (X31)
→Voltage supply (→p. 21)

20
ifm Operating Instructions IO-Link Master with Modbus TCP interface DataLine 4 Ports IP 65 / IP 66 / IP 67 (AL1340) 04 / 2018
Operating and display elements LED indicators
>
7.2 LED indicators
22024
The device only has the following LED indicators:
>
7.2.1 Status LEDs
11748
The RDY LED indicates the status of the gateway.
The RUN LED indicates the current state of the Modbus TCP state machine.
The ERR LED indicates occurring errors.
Status LED
Description
RDY
green
on
gateway functions properly
flashing 1 Hz
error
flashing 5 Hz
firmware update
off
gateway does not function; device reboots
ERR
red
on
error in application controller
flashes (10 Hz)
boot error
flashes (200 ms on,
200 ms off, 200 ms on,
1000 ms off)
watchdog error (Modbus TCP or process data)
flashes (200 ms on,
1000 ms off)
local error
flashes (2.5 Hz)
invalid configuration
off
no error
RUN
green
on
connection established
flashes (1 Hz)
ready, but not yet configured
flashes (5 Hz)
waiting for connection
off
not ready
Other manuals for AL1340
1
Table of contents
Other IFM I/O System manuals

IFM
IFM ZZ1102 Manual

IFM
IFM CR2016 Application guide

IFM
IFM AL1352 User manual

IFM
IFM SmartModule CR2520 Application guide

IFM
IFM AL4143 User manual

IFM
IFM ECOMAT 300 AL1000 Application guide

IFM
IFM AL1200 User manual

IFM
IFM AL4102 User manual

IFM
IFM AL1950 Application guide

IFM
IFM SmartModul CR2512 Application guide
Popular I/O System manuals by other brands

Omron
Omron CJ1W-AD041-V1 manual

National Instruments
National Instruments CB-2162 user guide

Meilhaus Electronic
Meilhaus Electronic RedLab TC user guide

I.O.T.
I.O.T. Eport PRO-EP10 user manual

Measurement Computing
Measurement Computing PCI-DAS4020/12 user guide

ADLINK Technology
ADLINK Technology DAQe Series user manual