IFM efector 190 Owner's manual

Programming manual
Supplement
Communication between
multicode reader O2I1xx
and Siemens Simatic S7
704546 / 00 12 / 2009
UK

Communication between multicode reader O2I1xx and Siemens Simatic S7
2
Contents
1 Preliminary note � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 3
1�1 Symbols used� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 3
2 General� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 3
3 Ethernet connection via TCP protocol � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 4
3�1 Principles � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 4
3�2 Set-up of the multicode reader � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 4
3�3 Set-up of the hardware configuration / NetPro Step7� � � � � � � � � � � � � � � � � 7
3�4 Setting parameters on function block FB50 � � � � � � � � � � � � � � � � � � � � � � � 10
3�5 Description function block FB50� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 10
4 Serial connection via ASCII driver � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 12
4�1 Principles � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 12
4�2 Set-up of the multicode reader � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 12
4�3 Set-up in step 7 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 14
4�4 Setting parameters on function block FB49 � � � � � � � � � � � � � � � � � � � � � � � 17
4�5 Function block description FB49 � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � 17
Licences and trademarks
Microsoft®, Windows®, Windows XP®and Windows Vista®are registered trademarks of Microsoft Corporation�
All trademarks and company names are subject to the copyright of the respective companies�

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
3
Preliminary note1
These instructions serve for the set-up and parameter setting of the
communication between the multicode reader O2I1xx from ifm electronic and a
Simatic S7 controller from Siemens�
Symbols used1.1
►Instruction
> Reaction, result
[…] Designation of pushbuttons, buttons or indications
→Cross-reference
Important note
Non-compliance can result in malfunctions or interference�
Information
Supplementary note
General2
Communication via Ethernet or serial communication is possible�
The following functions can be executed:
Release trigger●
(code read, fail string or match string are provided)
Select configuration/group●
(confirmation is given)
Enquire configuration●
(list of all configurations is provided)
Enquire statistics●
(number of readings is provided)

Communication between multicode reader O2I1xx and Siemens Simatic S7
4
Ethernet connection via TCP protocol3
Principles3.1
The data of the TCP connection is transmitted as a data flow, i�e� there is no
defined start or end character on the protocol level�
The returned data is received byte for byte and stored in the receive buffer�
For communication via Ethernet, all TCP protocol compatible Ethernet CPs can be
used�
However, the different selection of the Siemens communication blocks when using
controllers of the 300 or 400 series is to be taken into account�
The communication was tested with a CPU 414-2DP and a CP 443-1�
Set-up of the multicode reader3.2
Select Global device settings → Process interface → Selection of the process ►
interface → TCP/IP.

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
5
Select Global device settings → Network parameters → set IP address.►

Communication between multicode reader O2I1xx and Siemens Simatic S7
6
Select the trigger type "Serial" in the active configuration�►

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
7
Set-up of the hardware configuration / NetPro Step73.3
Set up and link the multicode reader as "Andere Stationen" in NetPro�►

Communication between multicode reader O2I1xx and Siemens Simatic S7
8
Create TCP connection with multicode reader�►
Note down the connection ID and CP address for the function block parameter►
setting�

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
9
Set the port number as in the parameter setting software�►

Communication between multicode reader O2I1xx and Siemens Simatic S7
10
Setting parameters on function block FB503.4
Indicate ID and LADDR as set up in Net-Pro�►
(Are forwarded to the communication function blocks�)
The parameter RECV_BUF must be declared as absolute, because with
some controller types the width of access may not be transmitted correctly
in case of symbolic declaration�
Description function block FB503.5
The function block establishes the telegrams to be sent to the multicode reader
and creates a character string from the received data flow�
The "trigger" input sends a trigger command to the multicode reader with each
positive edge� In addition the receive buffer is deleted�
The "change_group" input sends a change group command to the multicode
reader with each positive edge� The selection is indicated at the "group_nr" and
"conf_nr" inputs� In addition the receive buffer is deleted�
The "read_conf" and "read_stat" inputs send the corresponding status query to the
multicode reader with each positive edge� In addition the receive buffer is deleted�

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
11
The received data is read byte-by-byte from the data flow and then stored
consecutively in the receive buffer�
The length of the receive buffer is defined variably as ANY pointer and can be
extended or reduced according to the respective requirements�
The character string received from the configuration software after the start and
end characters have to be evaluated externally�

Communication between multicode reader O2I1xx and Siemens Simatic S7
12
Serial connection via ASCII driver4
Principles4.1
The received data is received byte for byte and stored in the receive buffer�
All PtP CPs with ASCII protocol driver can be used for serial communication� In
that case, however, the transmitting and receiving function blocks used in FB49
have to be adapted accordingly�
The communication was tested with a CPU 414-2DP, a CP 440 and an RS-485/
RS-232 interface converter�
Set-up of the multicode reader4.2
Select Global device settings → Process interface → Selection of the process ►
interface → "Serial".

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
13
Select Global device settings → set transfer parameters (here 9600 8N1).►
Select the trigger type "Serial" in the active configuration�►

Communication between multicode reader O2I1xx and Siemens Simatic S7
14
Set-up in step 74.3
Set up an ASCII coupling for the corresponding CP and define the telegram►
length 1 byte�
All other settings depend on the CP used�
Below as an example the setting of a CP 440 with interface converter:

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
15

Communication between multicode reader O2I1xx and Siemens Simatic S7
16

UK
Communication between multicode reader O2I1xx and Siemens Simatic S7
17
Setting parameters on function block FB494.4
Enter parameters for the CP address�►
(Are forwarded to the communication function blocks�)
The parameters SEND_DB_BUF, SEND_DBB_NO, RECV_DB_BUF und
RECF_DBB_NO are the start addresses for an intermediate buffer needed for this
coupling�
The parameter RECV_BUF must be declared as absolute, because with
some controller types the width of access may not be transmitted correctly
in case of symbolic declaration�
Function block description FB494.5
The function block establishes the telegrams to be sent to the multicode reader
and creates a character string from the received data flow�
The "trigger" input sends a trigger command to the multicode reader with each
positive edge� In addition the receive buffer is deleted�
The "change_group" input sends a change group command to the multicode
reader with each positive edge� The selection is indicated at the inputs "group_nr"
and "conf_nr"� In addition the receive buffer is deleted�

Communication between multicode reader O2I1xx and Siemens Simatic S7
18
The "read_conf" and "read_stat" inputs send the corresponding status query to the
multicode reader with each positive edge� In addition the receive buffer is deleted�
The received data is read byte-by-byte from the CP and then stored consecutively
in the receive buffer�
The length of the receive buffer is defined variably as ANY pointer and can be
extended or reduced according to the respective requirements�
For the serial coupling there is an additional intermediate buffer for the telegram
to be sent and the telegram to be received� Stored here in DB200, parameters
can be set at the inputs SEND_DB_BUF, SEND_DBB_NO, RECV_DB_BUF and
RECF_DBB_NO�
The character string received from the configuration software after the start and
end characters have to be evaluated externally�
Table of contents
Other IFM Cables And Connectors manuals