IFM Electronic efectror190 DTE100 Application guide

Device manual
Supplement
S7 library for
evaluation unit DTE100
706146 / 00 04 / 2012
UK

2
Contents
1 Preliminary note � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 3
1�1 Symbols used� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 3
2 General� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 3
3 Installation� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 4
3�1 Modules available in the hardware configuration � � � � � � � � � � � � � � � � � � � � 5
3�2 Module parameterisation � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 6
3�2�1 Description of the parameters � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 7
4 Function blocks� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 8
4�1 COM_FB � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 8
4�2 FB_CONFIG_READ� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �11
4�3 FB_CONFIG_WRITE � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 13
4�4 FB_PHYSICAL_READ � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 15
4�5 FB_PHYSICAL_WRITE � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 18
4�6 FB_DEV_STATUS � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 21
4�7 FB_WRITE_IM1 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 23
4�8 FB_GET � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 25
4�9 FB_PUT � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 28
4�10 FB_DIAG � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 30
4�11 FB_SET_ANTENNA� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 32
4�12 User-defined data type � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 34
Licences and trademarks
The screen areas shown in this document are subject to the copyright© of Siemens AG�
All trademarks and company names are subject to the copyright of the respective companies�

UK
3
1 Preliminary note
These instructions serve for the set-up and parameter setting of the communica-
tion between the RFID evaluation unit DTE100 from ifm electronic and a Simatic
S7 controller from Siemens�
1.1 Symbols used
►Instructions
> Reaction, result
Information
Supplementary note
2 General
The function blocks of the library DTE100_L allow easy access to the data of the
device DTE100 and its connected periphery�
(Up to 4 read/write heads or IEC61131 inputs and outputs�)
The 4 channels of the DTE100, IO-1, IO-2, IO-3 and IO-4 can be configured to the
respective periphery on a modular basis depending on the application�

4
3 Installation
►Install the GSD file "ifm_0D33�gsd"�
> In the hardware catalogue of the controller there is the entry
"DTE100" in the section_"Profibus DP" → "Further field devices" → "Gateway".
►Depending on the application, select the respective module and assign it to the
requested slot�
Example of a configuration with 2 RFID antennas, one input and one output:

UK
5
3.1 Modules available in the hardware configuration
Application Module name Description Note
Unused channel Channel deactivated Deactivation of the
channel
-
Switching outputs of
sensors, IEC61131
input signal
Input (1 byte In) Cyclic reading of the
input
Data is stored in the
periphery input image of
the controller� No library
access required�
Switching inputs of
controllers, valves,
actuators with 24 V
voltage supply
Output (1 byte In/Out) Cyclic reading of the
output
Data is read from the
periphery output image of
the controller and written
to the output� No library
access required�
RFID antennas of
the ANT51x family
PIB state (2 bytes In/Out ) Acyclic command chan-
nel (MS0/MS1)
Library access required�
RFID antennas of
the ANT51x family
RWH UID (11 bytes In/Out) Cyclic reading of UID
with 64 bits
Data is stored in the
periphery input image of
the controller� No library
access required�
RWH UID (15 bytes In/Out) Cyclic reading of UID
with 96 bits
Data is stored in the
periphery input image of
the controller� No library
access required�
RWH UID (19 bytes In/Out) Cyclic reading of UID
with 128 bits
Data is stored in the
periphery input image of
the controller� No library
access required
RFID antennas of
the ANT51x family
RWH STRG (26 bytes In/
Out)
Cyclic command chan-
nel (MS0)
Library access required�
RWH STRG (34 bytes In/
Out)
Cyclic command chan-
nel (MS0)
Library access required�
RWH STRG (42 bytes In/
Out)
Cyclic command chan-
nel (MS0)
Library access required�
For a detailed description of the modules see the device manual of the
evaluation unit�

6
3.2 Module parameterisation
Each module allows additional, individual parameterisation�
Module name Description
Channel deactivated no parameterisation available
Input
Output
PIB state
RWH UID
RWH STRG

UK
7
3.2.1 Description of the parameters
Data hold time
Time in seconds for which the input signals C/Qi, I/Q and UID are to be maintained
at channels IO-1 …IO-4 in the data input image (pulse stretching)�
With the setting 0�0 s the signal is maintained as long as the respective input
detects it�
Overload detection
Activate or deactivate overload detection on pin L+ for channels IO-1 … IO-4�
Overcurrent detection
Activate or deactivate overload detection on pin L+ for channels IO-1 … IO-4�
Data block length
Data block length of the user memory on the transponder (tag) which is to be read
or written�
You will find the data block length in the data sheet of the transponder/tag at:
www�ifm�com
→ Data sheet search
Read of UID edge controlled
Activate or deactivate trigger for reading UID on channels IO-1 … IO-4�
If this parameter is deactivated, the UID is read by the RFID antenna every 6 ms
and transmitted via the Profibus to the controller (cyclic scanning/screening)�
If the parameter is activated, scanning of the UID is made with a positive edge of
bit RD in the output image of the module RWH UID (edge-controlled scanning)�
High current 1A on IO-3, IO-4
Activate or deactivate the output current of 1 ampere on channels IO-3 und IO-4�
If this parameter is deactivated, the maximum output voltage is limited to 0�5 am-
pere�

8
4 Function blocks
The following section describes the available function blocks and their input and
output parameters�
4.1 COM_FB
The POU COM_FB assumes the communication between the controller and the
evaluation unit DTE100� The POUs FB_CONFIG_READ, FB_CONFIG_WRITE,
FB_PHYSICAL_READ, FB_PHYSICAL_WRITE, FB_GET and FB_PUT need it for
exchanging data within the controller�
When the modules PIB_STATE or RWH_STRG are used, it must be called cycli-
cally in the organisation POU OB1�
It should be ensured that only those channels are activated via the inputs IOx_
ENABLE on which a module PIB_STATE or RWH_STRG has been configured�
Unused channels must be deactivated via the inputs IOx_ENABLE� Otherwise an
error message will be generated on output STATUS�
The function blocks FB_CONFIG_READ, FB_CONFIG_WRITE, FB_PHYSICAL_
READ, FB_PHYSICAL_WRITE, FB_GET and FB_PUT may only be called after
the function block COM_FB has been successfully initialised on the respective
channel and this was signalled on the output IOx_Ready�

UK
9
Input parameter IN
Name Data type Description
EXECUTE BOOL
0: Deactivate POU
1: Execute POU
0 → 1: Initialisation routine is started.
DPM_SYSTEM_ID BYTE Number of the DP master system from the S7 hardware confi-
guration
IDU_DP_ADDR WORD Profibus address of the evaluation unit DTE100 (ident unit,
IDU)
IO1_ENABLE BOOL 0: Deactivate IO-1 interface
1: Activate IO-1 interface
IO2_ENABLE BOOL 0: Deactivate IO-2 interface
1: Activate IO-2 interface
IO3_ENABLE BOOL 0: Deactivate IO-3 interface
1: Activate IO-3 interface
IO4_ENABLE BOOL 0: Deactivate IO-4 interface
1: Activate IO-4 interface
Output parameter OUT
Name Data type Description
ERROR BOOL
0: No error
1: Error occurred, details see STATUS� The POU is not pro-
cessed any further and must be restarted via a positive edge
on EXECUTE�
STATUS WORD
Error code:
1� 0x0000: No error
2� 0x8000: Internal error (e�g� unexpected return value of an
SFC, undefined status word of the evaluation unit)
3� 0x8100: 60s timeout for initialisation expired
4� 0x8101: Evaluation unit does not exist on Profibus
5� 0x8102: No IO interface was activated via IOx_ENABLE
6� 0x8201: Parameter DPM_SYSTEM_ID invalid
7� 0x8202: Parameter IDU_DP_ADDR invalid
8� 0x830x: IOx activated but not available (x = 1���4)
9� 0x840x: IOx with configuration error (e�g� IOx activated
but projected as inactive, input or output or UID module
projected) (x =1��4)
10� 0x850x: IOx could not be initialised (e�g� because the bit
ACP is not implemented at MS1) (x = 1-4)
IO1_READY BOOL 0: IO-1 interface not ready (see STATUS)
1: IO-1 interface ready, commands can be processed

10
Name Data type Description
IO2_READY BOOL 0: IO-2 interface not ready
1: IO-2 interface ready, commands can be processed
IO3_READY BOOL 0: IO-3 interface not ready
1: IO-3 interface ready, commands can be processed
IO4_READY BOOL 0: IO-4 interface not ready
1: IO-4 interface ready, commands can be processed

UK
11
4.2 FB_CONFIG_READ
This POU is used for reading the data length of the command channel selected via
CHANNEL� It is not required in normal applications�
Input parameter IN
Name Data type Description
REQUEST BOOL 0 → 1: Start command
0: Stop or reset command
IDB_COM_FB BLOCK_DB Instance POU of the COM_FB
CHANNEL BYTE Channels 1 - 4 for the IO interface
CMD_TIME_OUT BYTE
0 = timeout off
1… 255 = timeout in [s],
Default value: 10 s
RESP_DATA ANY
Data area for the maximum packet size supplied by the evalu-
ation unit
UDT: MAX_PACK_SIZE

12
Output parameter OUT
Name Data type Description
BUSY BOOL 0: POU ready for new command
1: Command is processed
DONE BOOL 0: No command initiated or command not yet completed
1: Command executed
ERROR BOOL 0: No error
1: Error occurred, details see STATUS
STATUS WORD
Error code:
1� 0x0000: No error
2� 0x8000: Internal error (e�g� unexpected return value of an
SFC, undefined status word of the evaluation unit)
3� 0x8001: Negative response of the evaluation unit, for more
details see EXT_STATUS
4� 0x8002: RAM battery flat
5� 0x8100: Timeout for command processing expired
6� 0x8201: Invalid parameter IDB_COM_FB
7� 0x8202: Invalid parameter CHANNEL
8� 0x8203: Invalid parameter RESP_DATA
9� 0x8500: Slot with RWH UID configuration, the command
cannot be executed
EXT_STATUS DWORD
Error code:
1� 0x0000 0000: No extended information available
2. Otherwise: see device manual → Function Num, Error
Decode, Error Code 1, Error Code 2
The RESP_DATA is deleted before writing (0x00)�

UK
13
4.3 FB_CONFIG_WRITE
This POU is used to synchronise the evaluation unit DTE100 with the PLC pro-
gram within the POU COM_FB� In common applications it is not required�
Input parameter IN
Name Data type Description
REQUEST BOOL 0 → 1: Start command
0: Stop or reset command
IDB_COM_FB BLOCK_DB Instance POU of the COM_FB
CHANNEL BYTE Channels 1 - 4 for the IO interface
CMD_TIME_OUT BYTE
0 = timeout off
1… 255 = timeout in [s],
Default value: 10 s
RESP_DATA ANY
Data area for the maximum packet size supplied by the evalu-
ation unit
UDT: MAX_PACK_SIZE

14
Output parameter OUT
Name Data type Description
BUSY BOOL 0: POU ready for new command
1: Command is processed
DONE BOOL 0: No command initiated or command not yet completed
1: Command executed
ERROR BOOL 0: No error
1: Error occurred, details see STATUS
STATUS WORD
Error code:
1� 0x0000: No error
2� 0x8000: Internal error (e�g� unexpected return value of an
SFC, undefined status word of the evaluation unit)
3� 0x8001: Negative response of the evaluation unit, for more
details see EXT_STATUS
4� 0x8002: RAM battery flat
5� 0x8100: Timeout for command processing expired
6� 0x8201: Invalid parameter IDB_COM_FB
7� 0x8202: Invalid parameter CHANNEL
8� 0x8203: Invalid parameter CMD_DATA
9� 0x8500: Slot with RWH UID configuration, the command
cannot be executed
EXT_STATUS DWORD
Error code:
1� 0x0000 0000: No extended information available
2� Otherwise: Function Num, Error Decode, Error Code 1,
Error Code 2
MS0: ConfigIn = 0x00, no other command data�MS0/MS1: ConfigIn = 0x04,
no other command data�

UK
15
4.4 FB_PHYSICAL_READ
This POU is used for reading the user memory range within the transponder (tag)�
Depending on the tag type the data block length has to be entered within the user
configuration of the modules PIB and RHW_STRG�
You will find the data block length in the data sheet of the transponder/tag at:
www�ifm�com
→ Data sheet search
Example
Setting with "Data block length" = 8 bytes:

16
Input parameter IN
Name Data type Description
REQUEST BOOL 0 → 1: Start command
0: Stop or reset command
IDB_COM_FB BLOCK_DB Instance POU of the COM_FB
CHANNEL BYTE Channels 1 - 4 for the IO interface
CMD_TIME_OUT BYTE
0 = timeout off
1… 255 = timeout in [s],
Default value: 10 s
UID ARRAY [1���8]
OF BYTE
UID != 0:
The DTE100 must wait until a tag with the indicted UID is read,
then the command is executed by the DTE100�
UID = 0:
Immediate execution of the command by DTE100�
START_ADR DWORD Start address of the tag memory area as from where reading
starts�
LEN INT Number of bytes to be read by the tag�
RESP_DATA ANY
Data area for the data read by the evaluation unit
Example:
Reference to a data POU "DATA_PHYSICAL_READ“ or DB4
with the structure "Array[0…2048] of Byte,“ name "data“:
"DATA_PHYSICAL_READ"�data or DB4�data
Output parameter OUT
Name Data type Description
BUSY BOOL 0: POU ready for new command
1: Command is processed
DONE BOOL 0: No command initiated or command not yet completed
1: Command executed
ERROR BOOL 0: No error
1: Error occurred, details see STATUS�

UK
17
Name Data type Description
STATUS WORD
Error code:
1� 0x0000: No error
2� 0x8000: Internal error (e�g� unexpected return value of an
SFC, undefined status word of the evaluation unit)
3� 0x8001: Negative response of the evaluation unit, for more
details see EXT_STATUS
4� 0x8002: RAM battery flat
5� 0x8100: Timeout for command processing expired
6� 0x8201: Invalid parameter IDB_COM_FB
7� 0x8202: Invalid parameter CHANNEL
8� 0x8203: Invalid parameter RESP_DATA
9� 0x8204: Invalid parameter LEN
10� 0x8500: Module deactivated or configured with RWH UID,
input or output� The command cannot be executed
EXT_STATUS DWORD
Error code:
1� 0x0000 0000: No extended information available
2� Otherwise: Function Num, Error Decode, Error Code 1,
Error Code 2
The RESP_DATA is deleted before writing (0x00)�

18
4.5 FB_PHYSICAL_WRITE
This POU is used for writing the user memory range within the transponder (tag)�
Depending on the tag type the data block length has to be entered within the user
configuration of the modules PIB and RHW_STRG�
Example
Setting with "Data block length" = 8 bytes:

UK
19
Input parameter IN
Name Data type Description
REQUEST BOOL 0 → 1: Start command
0: Stop or reset command
IDB_COM_FB BLOCK_DB Instance POU of the COM_FB
CHANNEL BYTE Channels 1 - 4 for the IO interface
CMD_TIME_OUT BYTE
0 = timeout off
1… 255 = timeout in [s],
Default value: 10 s
UID ARRAY [1���8]
OF BYTE
UID != 0:
The DTE100 must wait until a tag with the indicted UID is read,
then the command is executed by the DTE100�
UID = 0:
Immediate execution of the command by DTE100�
START_ADR DWORD Start address of the tag memory range as from where writing
starts�
LEN INT Number of bytes to be written to the tag�
CMD_DATA ANY
Data area with the data to be sent to the evaluation unit�
Example:
Reference to a data POU "DATA_PHYSICAL_WRITE“ or DB3
with the structure "Array[0…2048] of Byte,“ name "data":
"DATA_PHYSICAL_WRITE"�data or DB3�data
Output parameter OUT
Name Data type Description
BUSY BOOL 0: POU ready for new command
1: Command is processed
DONE BOOL 0: No command initiated or command not yet completed
1: Command executed
ERROR BOOL 0: No error
1: Error occurred, details see STATUS�

20
Name Data type Description
STATUS WORD
Error code:
1� 0x0000: No error
2� 0x8000: Internal error (e�g� unexpected return value of an
SFC, undefined status word of the evaluation unit)
3� 0x8001: Negative response of the evaluation unit, for more
details see EXT_STATUS
4� 0x8002: RAM battery flat
5� 0x8100: Timeout for command processing expired
6� 0x8201: Invalid parameter IDB_COM_FB
7� 0x8202: Invalid parameter CHANNEL
8� 0x8203: Invalid parameter CMD_DATA
9� 0x8204: Invalid parameter LEN
10� 0x8500: Module deactivated or configured with RWH UID,
input or output� The command cannot be executed
EXT_STATUS DWORD
Error code:
1� 0x0000 0000: No extended information available
2� Otherwise: Function Num, Error Decode, Error Code 1,
Error Code 2
Table of contents
Other IFM Electronic Other manuals