0% found this document useful (0 votes)
73 views5 pages

Parameter Data Type Memory Area Description: 2.3.2 Mode of Operation

The document discusses the FB IO_LINK_DEVICE function block that operates asynchronously to read and write data from an IO-Link device. It takes several cycles to process and the BUSY and DONE_VALID outputs indicate status. If an error occurs, it is shown in the ERROR, STATUS, and IOL_STATUS outputs, with IOL_STATUS providing specific error codes. The document also provides tables explaining the coding of errors in the STATUS and IOL_STATUS outputs.

Uploaded by

tad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views5 pages

Parameter Data Type Memory Area Description: 2.3.2 Mode of Operation

The document discusses the FB IO_LINK_DEVICE function block that operates asynchronously to read and write data from an IO-Link device. It takes several cycles to process and the BUSY and DONE_VALID outputs indicate status. If an error occurs, it is shown in the ERROR, STATUS, and IOL_STATUS outputs, with IOL_STATUS providing specific error codes. The document also provides tables explaining the coding of errors in the STATUS and IOL_STATUS outputs.

Uploaded by

tad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

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

You might also like