You are on page 1of 54

Library Description 10/2015

SIMATIC S7 Library for the


Integration of SIEMENS
IO-Link Devices
ET 200SP CM 4 X IO-Link ST, S7-1200 SM 4 X IO-Link Master
ET 200S 4SI IO-Link, ET 200eco PN IO-Link Master, ET 200AL CM 4 X IO-Link

https://support.industry.siemens.com/cs/ww/en/view/90529409
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete with
regard to configuration, equipment or any contingencies. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for the correct
operation of the described products. These Application Examples do not relieve
you of the responsibility of safely and professionally using, installing, operating
and servicing equipment. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time and without prior notice. If there are any
deviations between the recommendations provided in this Application Example
and other Siemens publications – e.g. catalogs – the contents of the other
documents have priority.

We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this application example will be excluded. Such an exclusion will not
apply in the case of mandatory liability, e.g. under the German Product Liability Act
(“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body
or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
 Siemens AG 2015 All rights reserved

(“wesentliche Vertragspflichten”). The compensation for damages due to a breach


of a fundamental contractual obligation is, however, limited to the foreseeable
damage, typical for the type of contract, except in the event of intent or gross
negligence or injury to life, body or health. The above provisions do not imply a
change of the burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.

Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens’ products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
http://support.automation.siemens.com.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 2
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1 Library Overview “Siemens IO-Link Devices” ................................................ 5
1.1 User scenarios ..................................................................................... 6
1.2 Functionality of the blocks .................................................................... 7
1.3 Hardware and software requirements .................................................. 8
1.4 Library resources .................................................................................. 9
2 Blocks of the Library ....................................................................................... 10
2.1 Library for STEP 7 V5.5 ..................................................................... 10
2.2 Library for STEP 7 V13 SP1............................................................... 13
2.3 Explanations on FB IO_LINK_3SU1_IDKey-Switch (FB5210)Fehler! Textmarke nicht def
2.3.1 Interface and parameters .............. Fehler! Textmarke nicht definiert.
2.4 Explanation on FB IO_LINK_DEVICE (FB5001) .............................. 14
2.4.1 Interface and parameters ................................................................... 14
2.4.2 Mode of Operation .............................................................................. 16
2.4.3 Status and error displays.................................................................... 17
2.5 Joint parameters for all IO-Link device blocks ................................... 19
2.6 Explanation on FB IO_LINK_3RAxy (FB5100) .................................. 20
2.6.1 Interface and parameters ................................................................... 20
2.6.2 Mode of Operation .............................................................................. 21
2.7 Explanation on FB IO_LINK_3RB24 (FB5110) .................................. 22
2.7.1 Interface and parameters ................................................................... 22
 Siemens AG 2015 All rights reserved

2.7.2 Mode of Operation .............................................................................. 23


2.8 Explanation on FB IO_LINK_3RR24 (FB5120) .................................. 24
2.8.1 Interface and parameters ................................................................... 24
2.8.2 Mode of Operation .............................................................................. 25
2.9 Explanation on FB IO_LINK_3RS1x (FB5130) .................................. 26
2.9.1 Interface and parameters ................................................................... 26
2.9.2 Mode of Operation .............................................................................. 27
2.10 Explanation on FB IO_LINK_3UG481x (FB5140) .............................. 28
2.10.1 Interface and parameters ................................................................... 28
2.10.2 Mode of Operation .............................................................................. 29
2.11 Explanation on FB IO_LINK_3UG4822 (FB5150) ............................. 30
2.11.1 Interface and parameters ................................................................... 30
2.11.2 Mode of Operation .............................................................................. 31
2.12 Explanation on FB IO_LINK_3UG4825 (FB5160) ............................. 32
2.12.1 Interface and parameters ................................................................... 32
2.12.2 Mode of Operation .............................................................................. 33
2.13 Explanation on FB IO_LINK_3UG4832 (FB5170) ............................. 34
2.13.1 Interface and parameters ................................................................... 34
2.13.2 Mode of Operation .............................................................................. 35
2.14 Explanation on FB IO_LINK_3UG4841 (FB5180) ............................. 36
2.14.1 Interface and parameters ................................................................... 36
2.14.2 Mode of Operation .............................................................................. 37
2.15 Explanation on FB IO_LINK_3UG4851 (FB5190) ............................. 38
2.15.1 Interface and parameters ................................................................... 38
2.15.2 Mode of Operation .............................................................................. 39
2.16 Explanation on FB IO_LINK_RFID (FB5200)..................................... 40
2.16.1 Interface and parameters ................................................................... 40
2.16.2 Mode of Operation .............................................................................. 41
2.17 Explanation on FB IO_LINK_3SU1_IDKey-Switch (FB5210) ............ 42
2.17.1 Interface and parameters ................................................................... 42
2.17.2 Mode of Operation .............................................................................. 43
2.18 Explanation on FB IO_LINK_3SU1_Electronic (FB5220) .................. 44
2.18.1 Interface and parameters ................................................................... 44

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 3
Table of Contents

2.18.2 Mode of Operation .............................................................................. 45


3 Working with the Library in STEP 7 V5.5 ...................................................... 46
3.1 Integrating the library.......................................................................... 46
3.2 Using library blocks ............................................................................ 47
4 Working with the Library as of STEP 7 V13SP1 ........................................... 50
4.1 Integrating the library.......................................................................... 50
4.2 Using library blocks ............................................................................ 51
4.2.1 Use with S7-300/400, S7-1200/1500 ................................................. 51
4.3 Calling a user-defined documentation ................................................ 53
5 Links & Literature ............................................................................................ 54
6 History............................................................................................................... 54
 Siemens AG 2015 All rights reserved

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 4
1 Library Overview “Siemens IO-Link Devices”
1.1 User scenarios

1 Library Overview “Siemens IO-Link


Devices”
What will I get?
The present document describes the “Siemens IO-Link Devices” block library. You
receive a tested code for the communication with IO-Link components together
with the block library with uniquely defined interfaces. They can be used as a basis
for your task to be implemented.
The main focus of this document is to describe
 all blocks pertaining to the block library
 the functionality implemented through these blocks.
The present documentation furthermore illustrates possible applications, and the
included step-by-step instructions help you integrate the library into your STEP 7
project.

Scope of validity of the libraries


 STEP 7 V5.5 SP3 and higher
 STEP 7 ≥ V13 SP1
 Siemens AG 2015 All rights reserved

 SIMATIC S7-300
 SIMATIC S7-400
 SIMATIC S7-1200
 SIMATIC S7-1500
 S7-1200, SM 4 X IO-Link master module
 ET 200SP, CM 4 X IO-Link master module
 ET 200AL, CM 4 X IO-Link master module
 ET 200S electronic module 4SI IO-Link
 ET 200S, IO-Link master for Sirius industrial controls
 ET 200eco PN IO-Link Master

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 5
1 Library Overview “Siemens IO-Link Devices”
1.1 User scenarios

1.1 User scenarios


Motivation
The different Siemens IO-Link devices provide different data, according to their
functionality.
The data that is provided by the individual devices, differ in parts regarding content
and storage location.
In order to read out data from the individual devices or to write them into the
individual devices, each individual structure of the data storage has to be
observed. Working with the devices can thus become quickly unclear and involves
great effort.
The library provided here, facilitates your work considerably.

Application
1
The library provides function blocks and UDTs for all IO-Link devices from the
Siemens portfolio, which facilitates and makes communication with the IO-Link
devices easier.
The function blocks have a uniform interface for the individual devices. For each
read/write job, the data record specified at the input is read or written.
 Siemens AG 2015 All rights reserved

1
A UDT (User Defined Data type, or also PLC data type) is a self-defined data type, which
makes it possible, for example, to easily create multiply-used structures.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 6
1 Library Overview “Siemens IO-Link Devices”
1.2 Functionality of the blocks

1.2 Functionality of the blocks


The individual blocks of the library each illustrate one or several IO-Link devices.
The function of the blocks is shown by the following program flow chart:

Figure 1-1

Start

Positive No
edge detected at
REQ?

Yes

Read
RD_WR=0 Read
or write
access

Write
RD_WR=1
 Siemens AG 2015 All rights reserved

Which Which
data record data record
selected? selected?

Read
Write
selected data
selected data
record via FB
record via FB
IO_LINK_DEVICE
IO_LINK_DEVICE

End

The individual blocks of the library get the specified data record from the IO-Link
devices, by logically connecting the block input.
When several data records are switched at the input, then the first selected data
record is read out.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 7
1 Library Overview “Siemens IO-Link Devices”
1.3 Hardware and software requirements

1.3 Hardware and software requirements


Requirements for this library
To make use of the full functionality of the library described here, the hardware and
software requirements listed below must be met:

Hardware
You can use the library with the following master modules:
 ET 200SP, CM 4 X IO-Link master module
 S7-1200, SM 4 X IO-Link master module
 ET 200S electronic module 4SI IO-Link
 ET 200S, IO-Link master for Sirius industrial controls
 ET 200eco PN, IO-Link Master
 ET 200AL, CM 4xIO-Link Master

Using the distributed I/O system ET 200S, ET 200eco PN, ET 200AL and
ET 200SP requires a PNIO controller. The following devices are possible:
 S7-300/S7-400/WinAC CPU
 S7-1200 CPU as of FW V2.2
 Siemens AG 2015 All rights reserved

 S7-1500 CPU as of FW V1.0

The IO-Link master SM1278 can only be operated with a S7-1200 CPU.

Software
Table 1-1
No. Component Article number
1. SIMATIC STEP 7 V5.5 SP3 6ES7810-4CC10-0YA5
2. SIMATIC STEP 7 V13 SP1 6ES7822-1AA03-0YA5
3. S7-PCT V3.3 see \3\

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 8
1 Library Overview “Siemens IO-Link Devices”
1.4 Library resources

1.4 Library resources


The overview below shows the assignment of the main memory by the “Siemens
IO-Link Devices” library blocks.

Overall occupancy
All blocks belonging to the “Siemens IO-Link Devices” library occupy a total of
57 kBytes in the main memory, without the system function blocks used.
Normally not all blocks are used at the same time, since not all possible IO-Link
devices are used at the same time.
To be able to use the library, you also have to plan for respective storage space for
data blocks and instance data blocks.

Assignment of memory space to the individual blocks


Table 1-2
Block Symbol Size of main memory
FB1 IO_LINK_DEVICE 2486 bytes
FB5100 IO_LINK_3RAxy 4418 bytes
FB5110 IO_LINK_3RB24 4402 bytes
FB5120 IO_LINK_3RR24 4380 bytes
 Siemens AG 2015 All rights reserved

FB5130 IO_LINK_3RS1x 4136 bytes


FB5140 IO_LINK_3UG481x 4218 bytes
FB5150 IO_LINK_3UG4822 4250 bytes
FB5160 IO_LINK_3UG4825 4252 bytes
FB5170 IO_LINK_3UG4832 4122 bytes
FB5180 IO_LINK_3UG4841 4290 bytes
FB5190 IO_LINK_3UG4851 4130 bytes
FB5200 IO_LINK_RFID 3806 bytes
FB5210 IO_LINK_3SU1_IDKey 3049 bytes
FB5220 IO_LINK_3SU1_Electronic 2898 bytes

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 9
2 Blocks of the Library
2.1 Library for STEP 7 V5.5

2 Blocks of the Library


The following chapters list all blocks of the “SIEMENS IO-Link Devices” library for
STEP 7 V5.5 and STEP 7 V13 SP1.

2.1 Library for STEP 7 V5.5


Each of the respective UDTs belongs to the blocks for the structure of the data.
These are listed in Table 2-3.
Table 2-1
Block Symbol Modules
FB1 IO_LINK_DEVICE Subordinate IO-Link block. For details see \4\.
FB5100 IO_LINK_3RAxy Compact starter 3RA64/3RA65; function module
3RA27.
FB5110 IO_LINK_3RB24 Overload relay 3RB24.
FB5120 IO_LINK_3RR24 Monitoring relay 3RR2441/3RR2442/3RR2443.
FB5130 IO_LINK_3RS1x Temperature monitoring relay 3RS1x.
FB5140 IO_LINK_3UG481x Monitoring relay 3UG481x.
FB5150 IO_LINK_3UG4822 Current monitoring relay 3UG4822.
FB5160 IO_LINK_3UG4825 Error current monitoring relay 3UG4825.
 Siemens AG 2015 All rights reserved

FB5170 IO_LINK_3UG4832 Monitoring relay 3UG4832.


FB5180 IO_LINK_3UG4841 Cos-phi and active current monitoring 3UG4841.
FB5190 IO_LINK_3UG4851 Speed monitoring, 3UG4851.
FB5200 IO_LINK_RFID RFID reader for IO-Link.
FB5210 IO_LINK_3SU1_IDKey ID key switch
FB5220 IO_LINK_3SU1_Electronic DI/DO electronic modules for IO-Link

In addition, the following system function blocks from the standard library are used.
Table 2-2
Block Symbol Classification
SFB4 TON Standard STEP 7 library
SFB52 RDREC Standard STEP 7 library
SFB53 WRREC Standard STEP 7 library

For the individual IO-Link devices the following UDTs (User Defined Data types)
are included in the library:
Table 2-3
Block Symbol Note
UDT 5000 ParameterPage0 As “standard” UDT as part of other UDTs (e.g. UDT
5100)
UDT 5100 3RAxy For function block 5100
UDT 5101 ParameterPage1_3
RAxy
Subordinate to UDT 5100
UDT 5102 DIAG_3RAxy
UDT 5103 PARA_3RAxy

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 10
2 Blocks of the Library
2.1 Library for STEP 7 V5.5

Block Symbol Note


UDT 5110 3RB24 For function block 5110
UDT 5111 DIAG_3RB24
UDT 5112 MEAS_3RB24
UDT 5113 PresetConfigOP_3 Subordinate to UDT 5110
RB24
UDT 5114 TechnoFunctions_3
RB24
UDT 5120 3RR24 For function block 5120
UDT 5121 DIAG_3RR24
UDT 5122 MEAS_3RR24 Subordinate to UDT 5120
UDT 5123 PARA_3RR24
UDT 5130 3RS1x For function block 5130
UDT 5131 DIAG_3RS1x
UDT 5132 MEAS_3RS1x Subordinate to UDT 5130
UDT 5133 PARA_3RS1x
UDT 5140 3UG481x For function block 5140
UDT 5141 DIAG_3UG481x
UDT 5142 MEAS_3UG481x Subordinate to UDT 5140
 Siemens AG 2015 All rights reserved

UDT 5144 PARA_3UG481x


UDT 5150 3UG4822 For function block 5150
UDT 5151 DIAG_3UG4822
UDT 5152 MEAS_3UG4822 Subordinate to UDT 5150
UDT 5153 PARA_3UG4822
UDT 5160 3UG4825 For function block 5160
UDT 5161 DIAG_3UG4825
UDT 5162 MEAS_3UG4825 Subordinate to UDT 5160
UDT 5163 PARA_3UG4825
UDT 5170 3UG4832 For function block 5170
UDT 5171 DIAG_3UG4832
UDT 5172 MEAS_3UG4832 Subordinate to UDT 5170
UDT 5173 PARA_3UG4832
UDT 5180 3UG4841 For function block 5180
UDT 5181 DIAG_3UG4841
UDT 5182 MEAS_3UG4841 Subordinate to UDT 5180
UDT 5183 PARA_3UG4841
UDT 5190 3UG4851 For function block 5190
UDT 5191 DIAG_3UG4851
UDT 5192 MEAS_3UG4851 Subordinate to UDT 5190
UDT 5193 PARA_3UG4851
UDT 5200 RFID For function block 5200
UDT 5201 RFID_Event_Histor
y
Subordinate to UDT 5200
UDT 5202 RFID_Reader_Stat
us

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 11
2 Blocks of the Library
2.1 Library for STEP 7 V5.5

Block Symbol Note


UDT 5203 RFID_Tag_Status
UDT 5204 RFID_UID_History
UDTxyz 3SU1_IDKey- For function block 5210
Switch
UDT5210 3SU1_IDKeySwitch
UDT5211 3SU1_IDKeySwitch
_DS81
UDT5212 3SU1_IDKeySwitch
_DS82 Subordinate to UDT 5210
UDT5213 3SU1_IDKeySwitch
_DS92
UDT5214 3SU1_IDKeySwitch
_DS94
UDT5220 3SU1_Electronic For function block 5220
UDT5221 3SU1_Electronic_D
S92
UDT5222 SU1_Electronic_DS
Subordinate to UDT 5220
94
UDT5223 SU1_Electronic_DS
131
 Siemens AG 2015 All rights reserved

NOTICE You can call the block parallel or in several instances for several devices.
Please note that depending on the CPU used, only a certain number of
block calls for RDREC/WRREC must be active at the same time (see \5\).

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 12
2 Blocks of the Library
2.2 Library for STEP 7 V13 SP1

2.2 Library for STEP 7 V13 SP1


The blocks for STEP 7 V5.5 listed in section “Library for STEP 7 V5.5” also
correspond to the blocks for the STEP 7 V13 SP1 library. They contain the identical
symbols, however, the absolute addresses, the UDTs for example, can be changed
when inserting the library into a project of STEP 7.
For each CPU, the library includes a folder with respectively suitable function
blocks. Only use the appropriate blocks depending on the CPU.
See also Chapter 4 “Working with the Library as of STEP 7 V13”.

Figure 2-1
 Siemens AG 2015 All rights reserved

The following chapters list all blocks of the “SIEMENS IO-Link Devices” library. In
this documentation, the screenshots were created with STEP 7 V5.5 SP4.
The description of the individual blocks applies for STEP7 V5.5 as well as the
STEP 7 V13 SP1 library.

Note Only integrate those blocks into your project that refer to the respective CPU. For
more information refer to Chapter 2.16.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 13
2 Blocks of the Library
2.3 Explanation on FB IO_LINK_DEVICE (FB5001)

2.3 Explanation on FB IO_LINK_DEVICE (FB5001)


2.3.1 Interface and parameters

Interface
Figure 2-2
 Siemens AG 2015 All rights reserved

Note The IO_LINK_DEVICE block is called internally by the other function blocks of
the library (see Chapter 1.2 “Functionality of the blocks”). A detailed description
of the block is available in \4\.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 14
2 Blocks of the Library
2.3 Explanation on FB IO_LINK_DEVICE (FB5001)

Input parameters
Table 2-4
Parameter Data type Memory area Description
REQ BOOL I, Q, M, D Positive edge: Triggers data transfer
ID HW_IO I, Q, M, D, L, For S7-1200/1500
const Hardware identifier of the IO-Link
communication module
(for ET200ecoPN the
HW_ID of the IO-Link submodule
must be used)
DWORD For S7-300/400
Logic address of the IO-Link
communication module (module or
submodule)
CAP DINT I, Q, M, D, L, Access point of the
(S7- const IO_LINK_DEVICE function (Siemens
1200/1500) AG = 227 decimal)
INT
(S7-300/400)
RD_WR BOOL I, Q, M, D, L, Read or write access
const 0: read
 Siemens AG 2015 All rights reserved

1: write
PORT INT I, Q, M, D, L, Port number at which the IO-Link
const device is operated.
Possible values: 1..63
IOL_INDEX INT I, Q, M, D, L, Parameter index
const Possible values: 0..32767

IOL_SUBINDEX INT I, Q, M, D, L, Parameter subindex


const 0 : total record
1..255: Parameter from record
LEN INT I, Q, M, D, L, Length of the data to be written (net
const data)
Read: 0..232 (not relevant)
Write: 1..232

Output parameters
Table 2-5
Parameter Data type Memory area Description
DONE_VALID BOOL I, Q, M, D, L Validity:
0: Data not valid
1: Data valid
BUSY BOOL I, Q, M, D, L Job in progress:
0: Job completed (valid or error)
1: Job being processed
ERROR BOOL I, Q, M, D, L Error status:
0: No error
1: Abort with error

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 15
2 Blocks of the Library
2.3 Explanation on FB IO_LINK_DEVICE (FB5001)

Parameter Data type Memory area Description


STATUS DWORD I, Q, M, D, L Status output:
ERROR flag set = function error
Error flag reset = status of the
function
DW#16#000x0000
(x: process step 0..3)
IOL_STATUS DWORD I, Q, M, D, L IO-Link error status:
ERROR flag set and IO-Link error:
See error information
ERROR flag set and communication
error:
Specification to which SFB the status
belongs
Error flag reset: DW#16#00000000
RD_LEN INT I, Q, M, D, L Length of the read data (net data)

Input/output parameters
Table 2-6
Parameter Data type Memory area Description
 Siemens AG 2015 All rights reserved

RECORD_IOL_ ARRAY I, Q, M, D, L Source/target area for the data to be


DATA [0..231] of read/written.
BYTE

2.3.2 Mode of Operation

FB “IO_LINK_DEVICE” is a function block that operates asynchronously; that is,


processing extends over several cycles.
You start the transfer with a positive edge on the REQ input of the block.
Parameter BUSY indicates whether valid response data has arrived (BUSY = 0) or
whether the block is still being processed (BUSY = 1). If the block is currently
processed (BUSY = 1), output parameter IOL_STATUS signals the current
processing step / status of the FB. If this time interval exceeds the TIMEOUT of the
IO-Link master or max. 20s, processing is cancelled with a timeout error
(IOL_STATUS).
The value TRUE of output parameter DONE_VALID indicates whether the last
transfer was successful. If the data has been read, parameter RD_LEN shows the
length of the received data.
As long as REQ = 1, the output parameters maintain their current value. If REQ is
reset (REQ = 0) before the processing of the FB is completed, the current values of
the output parameters will only be pending for one cycle.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 16
2 Blocks of the Library
2.3 Explanation on FB IO_LINK_DEVICE (FB5001)

2.3.3 Status and error displays

Response in the event of an error


If an error occurs during the transfer, this is signaled via the ERROR output
parameter. In the event of a communication error, the status of SFB 52 or SFB 53
is passed on to the STATUS output parameter.
In addition, the IOL_STATUS output parameter provides the information, at which
SFB call the error has occurred. The description of the status can, in this case, be
found in the online help of the respective SFBs.
If there is an IO-Link error, this is displayed at output parameter IOL_STATUS (in
this case, the status parameter has the value 16#0000 0000).

STATUS parameter error


The STATUS output parameter includes error information of SFB52 (RDREC) or
SFB53 (WRREC).
To interpret the STATUS parameter, see online help for SFB52 or the help for
SFB53.

IOL_STATUS error parameter


In the case of a correct completion of “IO_LINK_DEVICE”, the IOL_STATUS tag is
 Siemens AG 2015 All rights reserved

set to DW#16#00000000.
In the case of cancelling the “IO_LINK_DEVICE”, error signaling is performed at
the respective IOL_STATUS output tag.
The IO-Link error codes (Device Error Code) are directly mapped to the
IOL_STATUS output tag of data type DWORD. The coding can be found in the
respective IO-Link device documentation.
Error codes from the IO-Link master (IOL-M Error_Code) are also mapped to the
IOL_STATUS tag.

Table 2-7 Syntax of IO-Link error code (IOL_STATUS)


IOL_STATUS = DW#16#00000000
IOL-M Error Code Device Error Code (device specific)
W#16#0000 W#16#0000
B#16#00 B#16#00 B#16#00 B#16#00

Examples for IOL_STATUS


DW#16#80520000 = error alarm from the communication module (IO-Link master)
DW#16#00008011 = error alarm from the device (sensor, etc.)

Table 2-8 Coding of IOL-M Error_Code within IOL_STATUS


IO-Link Meaning Explanation
Master Error_Code
16#0000 No error No error has occurred
16#0001 No call Function ready for new job
16#0002 IO_LINK_CALL write Function in send state
(SEND_REQUEST)

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 17
2 Blocks of the Library
2.3 Explanation on FB IO_LINK_DEVICE (FB5001)

IO-Link Meaning Explanation


Master Error_Code
16#0003 IO_LINK_CALL read Function in polling state
(WAIT_ON_RESPONSE)
16#0004 .. 06FF - Reserved
16#7000 IO_LINK_CALL conflict Send and response data inconsistent
16#7001 Wrong IO_LINK_CALL Decoding error
16#7002 Port blocked Port occupied by another job or not
existing
16#7003 .. 7FFF - Reserved
16#8000 Timeout Timeout. Job could not be performed
within the timeout period
16#8001 Wrong port address Port address smaller than 1 or larger
63
16#8002 Wrong index Index smaller than 1 or larger 32767
16#8003 Wrong subindex Subindex smaller than 0 or larger 255
16#8004 No Device No device connected (however port still
in IO-Link mode)
16#8005 Wrong LEN Invalid length when writing, less than 1
or over 232
 Siemens AG 2015 All rights reserved

16#8006 Wrong LEN Invalid length when reading, less than


0 or over 232
16#8007 DI/DO mode Port in DI or DO mode
16#8008 No SPDU However, device in IO-Link mode does
not support SPDU
16#8009 - Upload not possible, because Upload
function is not enabled (Data Storage)
16#8010 .. 8051 - Reserved
16#8052 RDREC Fault Error occurred when calling RDREC,
see STATUS
16#8053 WRREC Fault Error occurred when calling WRREC,
see STATUS
16#8054 Unexpected Internal error in IO-Link technology
acknowledge (unexpected status during an IO-Link
request)
16#8055 Port function failed Only relevant for port functions
16#8056 .. FFFF - reserved

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 18
2 Blocks of the Library
2.4 Joint parameters for all IO-Link device blocks

2.4 Joint parameters for all IO-Link device blocks


The following table describes the parameters that are identical for all of the listed
function blocks. The descriptions of the individual blocks do not list these
parameters separately.

Input parameters
Table 2-9 Input parameters
Parameter Data type Memory area Description
REQ BOOL I, Q, M, D, L, const Positive edge:
Perform data transfer (read or write)
ID DWORD I, Q, M, D, L, const logic address of the IO-Link master
CAP INT I, Q, M, D, L, const Client Access Point (CAP), for Siemens
IO-Link master modules always 227
(dec).
RD_WR BOOL I, Q, M, D, L, const Read or write access:
0=Read, 1=Write
PORT INT I, Q, M, D, L, const Port of the IO-Link device that is to be
read/written.
 Siemens AG 2015 All rights reserved

Output parameters
Table 2-10 Output parameters
Parameter Data type Memory area Description
DONE Bool I, Q, M, D, L DONE = TRUE  Data valid. Job
successfully executed.
Busy Bool I, Q, M, D, L BUSY = TRUE, job currently active.
Error Bool I, Q, M, D, L ERROR = TRUE, function aborted with
error.
Status DWord I, Q, M, D, L DP/PNIO error status, when error =
TRUE:
Status of the communication error.
IOL_Status DWOrd I, Q, M, D, L IO_Link error status, when ERROR =
TRUE. See Chapter 2.3.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 19
2 Blocks of the Library
2.5 Explanation on FB IO_LINK_3RAxy (FB5100)

2.5 Explanation on FB IO_LINK_3RAxy (FB5100)


Functionality
The block is used for application with the compact starters 3RA64/3RA65 and the
3RA27 function module.

2.5.1 Interface and parameters

Interface
Figure 2-3
 Siemens AG 2015 All rights reserved

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 20
2 Blocks of the Library
2.5 Explanation on FB IO_LINK_3RAxy (FB5100)

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Input parameters
Table 2-11 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
ParameterPage1 DWORD Read/write access to ParameterPage1.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName Read access to product name.
BOOL
ProductID BOOL Read access to product ID.
ProductText BOOL Read access to product description.
SerialNumber BOOL Read access to serial number.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
 Siemens AG 2015 All rights reserved

ApplicationSpecificName BOOL Read/write access to application-specific name.


GroupDiagnostics BOOL Read access to diagnostics data.
ActualConfiguration BOOL Read access to the current configuration.
TargetConfiguration BOOL Read/write access to the target configuration.

Input/output parameters

Table 2-12 Input/Output parameters


Parameter Data type Description
Data UDT 3RAxy Data structure for the IO-Link devices 3RAxy.

2.5.2 Mode of Operation

FB “IO_LINK_3RAxy” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3RAxy” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 21
2 Blocks of the Library
2.6 Explanation on FB IO_LINK_3RB24 (FB5110)

2.6 Explanation on FB IO_LINK_3RB24 (FB5110)


Functionality
The block is used for the application of electronic overload relay 3RB24.

2.6.1 Interface and parameters

Interface
Figure 2-4
 Siemens AG 2015 All rights reserved

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 22
2 Blocks of the Library
2.6 Explanation on FB IO_LINK_3RB24 (FB5110)

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Input parameters
Table 2-13 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
ManufacturersName BOOL Read access to manufacturer name.
ManufacturersText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
ProductText BOOL Read access to product description.
SerialNumber BOOL Read access to serial number.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
 Siemens AG 2015 All rights reserved

ProcessInput BOOL Read access to process input.


ProcessOutput BOOL Read access to process output.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access to the measured values.

Input/output parameters

Table 2-14 Input/Output parameters


Parameter Data type Description
Data UDT 3RB24 Data structure for IO-Link device 3RB24.

2.6.2 Mode of Operation

FB “IO_LINK_3RB24” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3RB24” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 23
2 Blocks of the Library
2.7 Explanation on FB IO_LINK_3RR24 (FB5120)

2.7 Explanation on FB IO_LINK_3RR24 (FB5120)


Functionality
The block is used for the application of electronic overload relay
3RR2441/3RR2442/3RR2443.

2.7.1 Interface and parameters

Interface
Figure 2-5
 Siemens AG 2015 All rights reserved

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 24
2 Blocks of the Library
2.7 Explanation on FB IO_LINK_3RR24 (FB5120)

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Input parameters
Table 2-15 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
ParameterPage1 BOOL Read/write access to ParameterPage1.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
SerialNumber BOOL Read access to serial number.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
 Siemens AG 2015 All rights reserved

Measurements BOOL Read access for measured values


Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.

Input/output parameters

Table 2-16 Input/Output parameters


Parameter Data type Description
Data UDT Data structure for IO-Link device 3RR24.
3RR24

2.7.2 Mode of Operation

FB “IO_LINK_3RR24” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3RR24” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 25
2 Blocks of the Library
2.8 Explanation on FB IO_LINK_3RS1x (FB5130)

2.8 Explanation on FB IO_LINK_3RS1x (FB5130)


Functionality
The block is used for the application of electronic overload relay 3RS1x.

2.8.1 Interface and parameters

Interface
Figure 2-6
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 26
2 Blocks of the Library
2.8 Explanation on FB IO_LINK_3RS1x (FB5130)

Input parameters
Table 2-17 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-18 Input/Output parameters
Parameter Data type Description
Data UDT 3RS1x Data structure for IO-Link devices 3RS1x.

2.8.2 Mode of Operation

FB “IO_LINK_3RS1x” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3RS1x” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 27
2 Blocks of the Library
2.9 Explanation on FB IO_LINK_3UG481x (FB5140)

2.9 Explanation on FB IO_LINK_3UG481x (FB5140)


Functionality
The block is used for the application of electronic overload relay 3UG481x.

2.9.1 Interface and parameters

Interface
Figure 2-7
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 28
2 Blocks of the Library
2.9 Explanation on FB IO_LINK_3UG481x (FB5140)

Input parameters
Table 2-19 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-20 Input/Output parameters
Parameter Data type Description
Data UDT Data structure for IO-Link devices 3UG481x.
3UG481x

2.9.2 Mode of Operation

FB “IO_LINK_3UG481x” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3UG481x” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 29
2 Blocks of the Library
2.10 Explanation on FB IO_LINK_3UG4822 (FB5150)

2.10 Explanation on FB IO_LINK_3UG4822 (FB5150)


Functionality
The block is used for the application of electronic overload relay 3UG4822.

2.10.1 Interface and parameters

Interface
Figure 2-8
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 30
2 Blocks of the Library
2.10 Explanation on FB IO_LINK_3UG4822 (FB5150)

Input parameters
Table 2-21 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-22 Input/Output parameters
Parameter Data type Description
Data UDT Data structure for IO-Link device 3UG4822.
3UG4822

2.10.2 Mode of Operation

FB “IO_LINK_3UG4822” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3UG4822” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 31
2 Blocks of the Library
2.11 Explanation on FB IO_LINK_3UG4825 (FB5160)

2.11 Explanation on FB IO_LINK_3UG4825 (FB5160)


Functionality
The block is used for the application of electronic overload relay 3UG4825.

2.11.1 Interface and parameters

Interface
Figure 2-9
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 32
2 Blocks of the Library
2.11 Explanation on FB IO_LINK_3UG4825 (FB5160)

Input parameters
Table 2-23 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
SystemCommands BOOL Write system commands.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
SerialNumber BOOL Read access to serial number.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-24 Input/Output parameters
Parameter Data type Description
Data UDT Data structure for IO-Link device 3UG4825.
3UG4825

2.11.2 Mode of Operation

FB “IO_LINK_3UG4825” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3UG4825” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 33
2 Blocks of the Library
2.12 Explanation on FB IO_LINK_3UG4832 (FB5170)

2.12 Explanation on FB IO_LINK_3UG4832 (FB5170)


Functionality
The block is used for application with 3UG4832 voltage monitoring.

2.12.1 Interface and parameters

Interface
Figure 2-10
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 34
2 Blocks of the Library
2.12 Explanation on FB IO_LINK_3UG4832 (FB5170)

Input parameters
Table 2-25 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-26 Input/Output parameters
Parameter Data type Description
Data UDT Data structure for IO-Link device 3UG4832.
3UG4832

2.12.2 Mode of Operation

FB “IO_LINK_3UG4832” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3UG4832” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 35
2 Blocks of the Library
2.13 Explanation on FB IO_LINK_3UG4841 (FB5180)

2.13 Explanation on FB IO_LINK_3UG4841 (FB5180)


Functionality
The block is used for application with the cos-phi and active current monitoring
relay 3UG4841.

2.13.1 Interface and parameters

Interface
Figure 2-11
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 36
2 Blocks of the Library
2.13 Explanation on FB IO_LINK_3UG4841 (FB5180)

Input parameters
Table 2-27 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-28 Input/Output parameters
Parameter Data type Description
Data UDT Data structure for IO-Link device 3UG4841.
3UG4841

2.13.2 Mode of Operation

FB “IO_LINK_3UG4841” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3UG4841” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 37
2 Blocks of the Library
2.14 Explanation on FB IO_LINK_3UG4851 (FB5190)

2.14 Explanation on FB IO_LINK_3UG4851 (FB5190)


Functionality
The block is used for application with speed monitoring relay 3UG4851.

2.14.1 Interface and parameters

Interface
Figure 2-12
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 38
2 Blocks of the Library
2.14 Explanation on FB IO_LINK_3UG4851 (FB5190)

Input parameters
Table 2-29 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
HWRevision BOOL Read access to hardware version.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Measurements BOOL Read access for measured values
Parameters BOOL Read/write access for parameter
ParameterPage0 BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-30 Input/Output parameters
Parameter Data type Description
Data UDT Data structure for IO-Link device 3UG4851.
3UG4851

2.14.2 Mode of Operation

FB “IO_LINK_3UG4851” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_3UG4851” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 39
2 Blocks of the Library
2.15 Explanation on FB IO_LINK_RFID (FB5200)

2.15 Explanation on FB IO_LINK_RFID (FB5200)


Functionality
The block is used for application with the SIMATIC RF200 IO-Link RFID readers.

2.15.1 Interface and parameters

Interface
Figure 2-13
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 40
2 Blocks of the Library
2.15 Explanation on FB IO_LINK_RFID (FB5200)

Input parameters
Table 2-31 Input parameters
Parameter Data type Description
DirectParameterPage BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
ErrorCount BOOL Read access to error counter
EventHistory BOOL Read access to event history
ReaderStatus BOOL Read access to state of the reader
TagStatus BOOL Read access to tag status
UIDHistory BOOL Read access to UID history
DirectParameterPage BOOL Read access to ParameterPage 0.
VendorName BOOL Read access to manufacturer name.
 Siemens AG 2015 All rights reserved

Input/output parameters
Table 2-32 Input/Output parameters
Parameter Data type Description
Data UDT RFID Data structure for RFID

2.15.2 Mode of Operation

FB “IO_LINK_RFID” is an FB that operates asynchronously; that is, processing


extends over several FB calls. Start the transfer of FB “IO_LINK_RFID” with a
positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Note More information on the parameters that are processed with this function block
can be found in \6\.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 41
2 Blocks of the Library
2.16 Explanation on FB IO_LINK_3SU1_IDKey-Switch (FB5210)

2.16 Explanation on FB IO_LINK_3SU1_IDKey-Switch


(FB5210)
Functionality
The block is used for the application of ID key switch 3SU1400-1GD10-1AA0.

2.16.1 Interface and parameters

Interface
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 42
2 Blocks of the Library
2.16 Explanation on FB IO_LINK_3SU1_IDKey-Switch (FB5210)

Input parameters
Table 2-33 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
System Command BOOL Write access to the system commands.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Del_Key-ID BOOL Write access to the key ID to be deleted.
KeyList1-30 BOOL Write access to the individual encodable
key IDs (1-30)
KeyList31-50 BOOL Read access to the memory of the individual
encodable key IDs (31-50)
Diagnostics BOOL Read access to diagnostics data.
 Siemens AG 2015 All rights reserved

Input/output parameters

Table 2-34 Input/Output parameters


Parameter Data type Description
Data UDT Data structure for IO-Link devices 3SU1400-
3SU1_IDKey- 1GD10-1AA0.
Switch

2.16.2 Mode of Operation

FB “IO_LINK_3SU1_IDKey-Switch” is an FB that operates asynchronously; that is,


processing extends over several FB calls. Start the transfer of FB
“IO_LINK_3SU1_IDKey-Switch” with a positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 43
2 Blocks of the Library
2.17 Explanation on FB IO_LINK_3SU1_Electronic (FB5220)

2.17 Explanation on FB IO_LINK_3SU1_Electronic (FB5220)


Functionality
The block is used for application of the electronic module for IO-Link 3SU1400-
2HL10-6AA0.

2.17.1 Interface and parameters

Interface
 Siemens AG 2015 All rights reserved

Note The parameters valid for all blocks from Chapter 2.3 onward are described in
Chapter 2.2.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 44
2 Blocks of the Library
2.17 Explanation on FB IO_LINK_3SU1_Electronic (FB5220)

Input parameters
Table 2-35 Input parameters
Parameter Data type Description
ParameterPage0 BOOL Read access to ParameterPage 0.
System Command BOOL Write access to the system commands.
VendorName BOOL Read access to manufacturer name.
VendorText BOOL Read access to the specific text of the
manufacturer.
ProductName BOOL Read access to product name.
ProductID BOOL Read access to product ID.
FWRevision BOOL Read access to firmware version.
ApplicationSpecificName BOOL Read/write access to application-specific name.
Diagnostics BOOL Read access to diagnostics data.
Statistics BOOL Read access to the statistic input/output data.
Parameters BOOL Read/write access to the parameters.

Input/output parameters
 Siemens AG 2015 All rights reserved

Table 2-36 Input/Output parameters


Parameter Data type Description
Data UDT Data structure for the IO-Link devices 3SU1
3SU1_Electronic Electronic.

2.17.2 Mode of Operation

FB “IO_LINK_3SU1_Electronic” is an FB that operates asynchronously; that is,


processing extends over several FB calls. Start the transfer of FB
“IO_LINK_3SU1_Electronic” with a positive edge on the REQ.
Internally, the function block calls FB “IO_LINK_DEVICE”.
The function block reads the data record logically connected at the block input with
TRUE.
For more detailed information on the mode of operation, please refer to the
parameter description.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 45
3 Working with the Library in STEP 7 V5.5
3.1 Integrating the library

3 Working with the Library in STEP 7 V5.5


What will you learn here?
This chapter includes instructions for integrating the “Siemens IO-Link Devices”
library into your STEP 7 V5.5 project as well as for using the library blocks.

3.1 Integrating the library


In order to be able to use the previously described library functions, they must first
be integrated into the configuration software. The necessary steps are listed in the
following table.

Table 3-1
Step Instruction
1. The library is available on the HTML page from which you downloaded this
document. Save the “90529409_IOLink_Devices_LIB_V55.zip” library to your hard
drive.
2. Open the SIMATIC MANAGER and retrieve STEP 7 library
“90529409_IOLink_Devices_LIB_V55.zip”.
“File > Retrieve...”
The library is now available in “Libraries”.
 Siemens AG 2015 All rights reserved

3.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 46
3 Working with the Library in STEP 7 V5.5
3.2 Using library blocks

3.2 Using library blocks


In order to use the library blocks in your user program, proceed as follows:

Table 3-2
Step Instruction
1. Open an already existing STEP 7 V5.5 project.
2. Open the “SIEMENS_Devices_IO_Link” library.

3. Copy the required blocks into your project.

General:
Move FB5001, the FB that corresponds to your device, as well as the
respective UDTs and UDT5000 into your user program. Then add the required
system functions.

Example:
 Siemens AG 2015 All rights reserved

Use the IO-Link device 3RA6400-2AB42.


Use drag & drop to move the following blocks into your S7-300 user program:
 FB5001 “IO_LINK_DEVICE” (called internally by FB 5100)
 FB5100 “IO_LINK_3RAxy”
 UDTs
– 5100 3RAxy (data structure for the “Data” input of FB 5100)
– 5000 ParameterPage0 (among others part of UDT 5100)
– 5101 ParameterPage1_3RAxy (subordinate to UDT 5100)
– 5102 DIAG_3RAxy (subordinate to UDT 5100)
– 5103 PARA_3RAxy (subordinate to UDT 5100)
 SFBs 4, 52, 53 (TON, RDREC, WRREC)

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 47
3 Working with the Library in STEP 7 V5.5
3.2 Using library blocks

Step Instruction
4. Check the consistency of your user program via right mouse click on the block
folder and select “Check Block Consistency”.

If no enumerations appear after clicking “Dependency tree: Only conflicts”


, the block calls are consistent and you have added all required blocks.
 Siemens AG 2015 All rights reserved

5. Create organization block 1 (OB1) and open it. Use drag & drop to move the
function block into any network for your IO-Link device.
Note
You can also use the blocks in other, cyclic organization blocks.

6. Enter the data block with the number of the instance data block that you would
like to use. Generate the instance data block if it does not exist.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 48
3 Working with the Library in STEP 7 V5.5
3.2 Using library blocks

Step Instruction
7. Assign values of your choice to all formal parameters. The values can be, for
example, stored in any data block.

Save organization block 1 (OB1) and load the STEP 7 project.


 Siemens AG 2015 All rights reserved

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 49
4 Working with the Library as of STEP 7 V13SP1
4.1 Integrating the library

4 Working with the Library as of STEP 7


V13SP1
What will you learn here?
This chapter includes instructions for integrating the “Siemens IO-Link Devices”
library into your STEP 7 project as well as for using the library blocks.

4.1 Integrating the library


In order to be able to use the previously described library functions, they must first
be integrated into the configuration software. The necessary steps are listed in the
following table.

Table 4-1
Step Instruction
1. The library is available on the HTML page from which you downloaded this
document. Store the “90529409_IOLink_Devices_LIB_V13_SP1.zip” library on
your hard disk and extract it.
2. Open the TIA Portal and retrieve the STEP 7 library “Siemens_IO-
Link_Devices_Library_V13_SP1.zal13”.
 Siemens AG 2015 All rights reserved

Open the project view and go to the “Libraries” tab.


Right click “Retrieve library” in “Global libraries".

3. The library is then available in “Global libraries”.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 50
4 Working with the Library as of STEP 7 V13SP1
4.2 Using library blocks

4.2 Using library blocks


The procedure for using the library blocks is described in the following two
chapters.

4.2.1 Use with S7-300/400, S7-1200/1500

The following table describes the procedure for adding the “IO_LINK_3RAxy”
function block.
Table 4-2
Step Instruction
1. Open an already existing STEP 7 V13 SP1 project.
2. Open the library “Siemens_IO-LINK_Devices_Library_V13_SP1”.
 Siemens AG 2015 All rights reserved

3. Copy the required blocks into your project.


Example:
Use the IO-Link device 3RA6400-2AB42.
Use drag&drop to move function block IO_LINK_3RAxy into your user program
from folder “Types” and subfolder <CPU type>.
The respective PLC data types as well as the internally called
IO_LINK_DEVICE block are automatically copied into the project.

4. Compile the IO_LINK_3xx block. (Shortcut: Strg+B).


The block is compiled with message “Block was successfully compiled”.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 51
4 Working with the Library as of STEP 7 V13SP1
4.2 Using library blocks

Step Instruction
5. Open the OB “Main”. Use drag & drop to move the function block into any
network for your IO-Link device.
Note
You can also use the blocks in other, cyclic organization blocks.

6. Enter the data block with the number of the instance data block that you would
like to use.
 Siemens AG 2015 All rights reserved

7. Assign values of your choice to all formal parameters. The values can be, for
example, stored in any data block.
Save the OB1 organization block and load the STEP 7 project into your
S7-CPU.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 52
4 Working with the Library as of STEP 7 V13SP1
4.3 Calling a user-defined documentation

4.3 Calling a user-defined documentation


Use the key combination <Shift-F1> to directly call this document from the user-
defined documentation of the global library in TIA Portal.
Select the name of the IO library and press <Shift-F1>. Subsequently, this
document is displayed after a security query.

Shift-F1
 Siemens AG 2015 All rights reserved

Note The direct call of the documentation only works after the library name has been
selected. When using <Shift-F1> to call a different item in this library, you will be
forwarded to the HTML page in the Siemens Industry Online Support from which
you downloaded this entry.

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 53
5 Links & Literature

5 Links & Literature


Table 5-1
Topic Title
\1\ Siemens Industry http://support.automation.siemens.com
Online Support
\2\ Download page of https://support.industry.siemens.com/cs/ww/en/90529409
the entry
\3\ S7-PCT http://support.automation.siemens.com/WW/view/en/32469496
\4\ Acyclic Reading http://support.automation.siemens.com/WW/view/en/82981502
and Writing with
the “IO-Link
Library"
\5\ Restrictions of http://support.automation.siemens.com/WW/view/en/15364459
WRREC and
RDREC
\6\ SIMATIC Ident http://support.automation.siemens.com/WW/view/en/60641859
RFID systems
SIMATIC RF200
IO-Link
\7\ System Manual http://support.automation.siemens.com/WW/view/en/107542462
SIRIUS ACT
 Siemens AG 2015 All rights reserved

command and
Signaling devices
3SU1

6 History
Table 6-1
Version Date Modifications
V1.0 07/2014 First version
V2.0 05/2015 Upgrade to TIA Portal V13 SP1
V2.1 09/2015 Expanded by SIRIUS ACT devices

Siemens IO-Link Device Library


Entry ID: 90529409, V2.1, 10/2015 54

You might also like