Codesys Modbus - TRUCK
Codesys Modbus - TRUCK
Codesys Modbus - TRUCK
WITH
CoDeSys
FOR
PROGRAMMABLE
GATEWAYS
All brand and product names are trademarks or registered trade marks of the owner
concerned.
Edition 01/09
© Hans Turck GmbH, Mülheim an der Ruhr
No part of this manual may be reproduced in any form (printed, photocopy, microfilm or any
other process) or processed, duplicated or distributed by means of electronic systems
without written permission of Hans Turck GmbH & Co. KG, Mülheim an der Ruhr.
Concept of documentation.................................................................................................................0-2
1 General .............................................................................................................................................5-2
1.6 Function demands ....................................................................................................................5-2
6 Glossary
v
vi
0 About this manual
Concept of documentation...................................................................................................2
Concept of documentation
In the first chapter of this manual you are provided with an overview of the TURCK BL ident ®
system.
In the second chapter "mounting and installation" the correct connections of the BL ident ®-
system with suitable connection cables is explained.
The third chapter contains instructions for commissioning of a BL ident ® systems. The
standard function block "Proxy Ident Function Block" is used for the start-up of systems with
BLxx-2RFID-A modules. Systems with BLxx-2RFID-S modules have 12 bytes process data
with 8 bytes user data for read/write commands. The basic commands are part of the process
data. The commissioning example is realized using a programmable Ethernet gateway. The
61131-3 compliant programming system CoDeSys is used.
In the fourth chapter the setup of a control interface to a Modbus TCP-, PROFIBUS-DP- and
a EtherNet/IP master is explained.
The fifth chapter contains an excerpt from the specification "Proxy Ident Function Block".
Warning
This symbol appears next to an alert which points to a source of danger. This may
refer to injury of persons and damage to systems (hard- and software).
For the user this symbol means: Please, proceed with extreme causion.
Attention
This symbol appears next to an alert which points to a potential source of danger.
This may refer to possible injury of persons and damage to systems (hard- and
software) and installations.
Note
This symbol appears next to general instructions which point out important
information concerning the procedure for one or more operational steps.
The relevant instructions may faciliate the work and may help prevent redundancy
caused by incorrect operational steps, for example.
Attention
Please, consider it mandatory to read this chapter because safe handling of
electrical devices should not be left to chance.
This manual contains the required information for the start-up of the TURCK BL ident ®-
system.
The concept was specifically created for qualified staff with the necessary technical know-
how.
Intended use
Warning
The devices described in this manual must be used only in the intended applications
found in this manual and the respective technical description, and only together with
certifed external devices and -components.
The correct and safe operation of the devices is based on the prerequisite of proper
transport, storage, assembly and mounting, as well as carefuly operation and maintenance.
Warning
It is imperative that the instructions be followed for the safety and accident
prevention for the respective application.
The TURCK BL ident ®-system has multiple levels. Each level offers opportunities for
variation. An application that is adjusted to the complete system is possible.
Figure 1:
System SPS/PC for startup
overview
IP20 IP67
Read/write device
Air interface
To meet the requirements of a variety of applications, the TURCK BL ident ®-system offers
multiple possibilities for combining data carriers and read/write heads, as well as interface
modules to connect automation systems (for example Modbus TCP, EtherNet/IPTM). Software
modules enable simple integration and commissioning.
Performance characteristics of the TURCK BL ident ®-system are as follows:
Protection class
Some data carriers, as well as the applicable read/write heads have a high mechanical
protection class (for example,IP67) and therefore may be used in the toughest industrial
applications.
The read/write heads are also available in IP69K (wash-down design).
Connection to the fieldbus-system is realized with suitable TURCK interface modules. The
interface-modules for CANopen are available in the protection class IP20. TURCK connection
cables with the suitable protection class complement the identification system.
Temperature-resistant data carriers up to 210°C are available for the high temperature range.
Life cycle
The life cycle is a result of the possible read/write operations to the data carrier.
FRAM data carriers can provide for an unlimited number of Read operations and 1010 Write
operations.
EEPROM data carriers can provide for an unlimited number of Read operations and 104 or
105 Writer operations.
The data carriers do not require batteries.
Transfer frequency
The TURCK BL ident ®-system operates with a transfer frequency of 13.56 MHz in the HF-
band or with a country-specific transfer frequency in the UHF-range (860-960 MHz) between
the data carriers and the read/write heads.
HF: Systems that operate with this transfer frequency are to a large extent insensitive to
electromagnetic interferences. Therefore the 13.56 MHz transfer frequency has developed
into the standard in many RFID applications.
UHF: Systems in this frequency band gain higher read/write ranges compared to HF, typically
several meters. The carrier frequencies are country-specific, and in Europe, for example, they
are between 865 and 868 MHz.
Note
The speed with which the data carrier can pass by the read/write head is influenced
by the data volume to be processed and varies according to the respective
combination of read/write head and data carrier that is being used.
This is why numerical data for max. speed and data volumes can only be seen as
examples!
The speed with which the data carrier can pass by the read/write head may be increased, for
example, with the data carrier TW-R50-K2 and the read/write head
TN-CK40-H1147 to up to 2.5 m/s for 8 bytes at a distance of 36 mm. With the help of the
"BL ident ®-simulator" (see below) the application parameters "speed", "data volume" and
"range" can be changed. The optimum combination read/write head and data carrier for the
respective application is apparent in the simulator.
The simulator is online at http://www.turck.com.. In any case, please follow the instructions
including limits in this chapter.
Note
Next to the data processing time in the read/write head, the processing time within
the complete installation of the identification system must also be taken under
consideration.(„System overview” page 1-2). Depending on the application, the time
for data transfer and processing within the complete installation may vary!
If your application requires a fast sequence of data carriers, it may be necessary to
decrease the speed with which the data carrier passes by the read/write head.
When in doubt, we recommend to empirically determine the possible speed!
Note
The transfer curves (max. read/write distance, length of transfer zone) only
represent typical values and test lab conditions.
Because of component tolerances, installation situation of the application, ambient
conditions and interferences caused by materials (especially metals) the distances
that can be reached may differ up to 30 %.
This is why it is absolutely necessary to test the application (especially during Read
and Write when movement occurs) under real conditions!
In addition, the recommended distance from data carrier to read/write head should
be complied with if possible in order to gain errorless read/write operations despite
of possible discrepancies.
Depending on the actual transfer curve of the respective application, the parameters
of reachable pass over speeds (Read and Write on the Fly) and the max. transferable
data volume also change.
Figure 2:
BL ident ®-
simulator
Compatibility
All technical data refer to the BL ident ®-system, this means to the combination of BL ident ®-
data carriers, read/write heads and interface modules. Entirely different values may be valid
for data carriers of other manufacturers. This is why external products may only be used after
they have been released by TURCK.
Applications (examples):
The performance characteristics described in the prior chapter support the application of a
TURCK BL ident ®-system in the following industries:
Automobile
Transport and handling
Machine building
Food and beverages
Chemical industry
Pharmaceutical and petrochemical industries
The application in all areas is possible here, like:
Assembly lines
Materials handling
Industrial manufacturing
Inventory and storage
Logistics
Distribution
Consignment
Transport logistics
Figure 3:
BL ident ®-
Interface 128,9
module with LED 128,9 LED
Protection Class 74,1
IP20 (2- and 8- 74,1
port version)
74,4 74,4
110,3
72,5
TI-BL20-PG-EN-2 1545053
TI-BL20-PG-EN-4 1545054
TI-BL20-PG-EN-6 1545055
TI-BL20-PG-EN-8 1545056
TI-BL20-PG-EN-S-2 1545086
TI-BL20-PG-EN-S-4 1545087
TI-BL20-PG-EN-S-6 1545088
TI-BL20-PG-EN-S-8 1545089
TI-BL20-PG-EIP-2 1545020
TI-BL20-PG-EIP-4 1545021
TI-BL20-PG-EIP-6 1545022
TI-BL20-PG-EIP-8 1545023
TI-BL20-PG-EIP-S-2 1545090
TI-BL20-PG-EIP-S-4 1545091
TI-BL20-PG-EIP-S-6 1545092
TI-BL20-PG-EIP-S-8 1545093
The integration of BL ident ® in Modbus TCP and EtherNet/IP makes programmable Ethernet-
gateways possible:
Modbus TCP
EtherNet/IP
Figure 4:
Modbus TCP D
EtherNet/IP E
A
C B
F
H
UL-
Ethernet-connection
The BL20-gateway is connected to Ethernet via a female RJ45-connector.
Figure 5: 1 = TX +
2 = TX –
Female RJ45- 3 = RX +
4 = n.c.
connector 5 = n.c.
6 = RX –
87654321 7 = n.c.
8 = n.c.
Attention
No equalizing current must flow across the shield. For this purpose a safe system
must be created for potential equalization!
Addressing
The three decimal rotary switches are used for Ethernet-addressing of the programmable
gateways.
address
Set
9 0 1 9 0 1
8 2 8 2
7 3 7 3
6 5 4 6 5 4
Adr. × 10 Adr. × 1
000 : 192.168.1.254
1-254 : Static rotary
300 : BootP
400 : DHCP
500 : PGM
600 : PGM-DHCP
Note
A voltage reset must be completed when the addressing mode is changed!
300 BootP_Mode
The IP-address of the gateway and the subnet mask ("Network mask" page
6-2) are assigned with the help of a BootP-server. Both network settings are
permanently stored in the EEPROM of the gateway.
400 DHCP_Mode
The IP-address of the gateway and the subnet mask ("Network mask" page
6-2) are assigned with the help of a DHCP-server. Both network settings are
permanently stored in the EEPROM of the gateway.
500 PGM_Mode
The PGM-mode allows access of the I/O-ASSISTANT to the network settings
of the gateway. The IP-address of the gateway and the subnet mask
("Network mask" page 6-2) are permanently stored in the EEPROM of the
gateway.
600 PGM_DHCP_Mode
like DHCP_Mode
Attention
The protection cover on top of the rotary switch should be firmly locked after
addressing. It serves to protect from dirt!
SET-scanner
You will only require the functions of the SET-scanner if you change the interface module
configuration after the first switch-on. A modification may occur when modules are added or
when one or more modules are pulled.
When the BL ident ®-interface module is connected for the first time, the current configuration
is automatically read. The continuously illuminated green LED "IOs" page 2-14 signals in
sequence that the process was successfully executed.
Press the SET-button for approx. 10 seconds if you changed the interface module
configuration. The current station configuration is stored as Actual-configuration and is
transferred to both the Temp-Should-be configuration buffer and the Should-be configuration
buffer.
During the operation, the "GW"-LED remains blinking.
Service-interface
The service-interface connects the Ethernet gateway to a PC. Projecting is possible with the
software
I/O-ASSISTANT, and diagnostic messages can be displayed.
A special standard cable must be used for the service-interface/PC connection.
BL20-connection cable (I/O-ASSISTANT-ADAPTERCABLE-BL20/BL67)
Connection with the BL20-cable
The BL20-cable has a PS/2-connector (connection of female connector to gateway) and a
SUB-D female connector (connection of connector to PC).
Figure 7:
PS/2-connector
on the
connection
cable to the 4 3
gateway (top
5 2
view)
6 1
Figure 8: 5 4 3 2 1
9-pole SUB-D
female
connector on
the connection
cable to the PC 9 8 7 6
(top view)
3 DATA – –
5 +5 V RTS 7
Figure 9: b
B
Connection
between PC
and BL20-
gateway via the c
C
BL20-
connection
cable
A Female SUB-
D-connector
a
A
B BL20-
connection
cable
C PS/2-
connector
Firmware-update
A firmware-download may be done on the gateway via the "Service-interface" page 2-8 or via
the "Ethernet-connection" page 2-5 with the help of the software I/O-ASSISTANT (please
refer to Online Help for more information).
Please go to the TURCK web site at www.turck.com to locate the current firmware for your
gateway and an instruction for executing the actualization.
Attention
During the download, the station should be disconnected from the fieldbus. The
firmware download may only be performed by authorized staff. The field side must
be switched free!
RK4.5T-2/S2500 g x
(8035244)
RK4.5T-5/S2500 g x
(6699206)
RK4.5T-10/S2500 g x
(6699207)
RK4.5T-25/S2500 g x
(6699421)
RK4.5T-50/S2500 g x
(6699422)
WK4.5T-2/S2500 a x
(8035245)
WK4.5T-5/S2500 a x
(6699208)
WK4.5T-10/S2500 a x
(6699209)
WK4.5T-25/S2500 a x
(6699423)
WK4.5T-50/S2500 a x
(6699424)
For the food and beverage range (FB = Food and Beverage) - IP69K
FB-RK4.5T-5/S2502 g x
(8036404)
FB-RK4.5T-10/S2502 g x
(8036405)
FB-RK4.5T-25/S2502 x
(8037011)
Note
When installing the coupling, please pay attention to "Color Assignment RK4.5T...
and WK4.5T..." from "Pin assignment for the connection cables" page 2-39!
Note
Please connect the open end of the connection cable per the "Connection terminal
when using the connection cables RK4.5T... and WK4.5T..." page 2-11!
Connection terminal when using the connection cables RK4.5T... and WK4.5T...
Transceiver
14 24
Data- 1 (2 BK)
Data+ 1 (4 WH)
Figure 11:
Data- 0 (BU)
Connection of
Data+ 0 (WH)
the read/write
head
(transceiver) for Transceiver
connection 11 21
cables FB4.5T...
to BL20-S4x- GND (BK) GND (3 BK)
SBBS 12 22
Transceiver
14 24
Data- 1 (2 BU)
Data+ 1 (4 WH)
green blinking, The allowed max. number – Please check the number of
4 Hz of modules connected to modules connected to the
the gateway has been gateway and pull surplus
exceeded. modules if needed.
Diagnostic Port 1
0 0 reserved
1 reserved
3 to 7 reserved
1 to 2 reserved
4 to 7 reserved
Diagnostic Port 2
2 0 reserved
1 reserved
3 to 7 reserved
1 to 2 reserved
4 to 7 reserved
Technical data
Warning
This device may cause radio interference in living quarters and in small industry
(living-, business- and commercial areas, small business). In this case the user may
be asked to implement respective measures at his own expense.
Attention
The auxiliary supply must meet the requirements of the safety low voltage (SELV =
Safety extra low voltage) per IEC 364-4-41.
Approval
Ambient temperature
Falling and tumbling Per IEC 68-2-31 and free fall per
IEC 68-2-32
Protection Class IP 20
Reliability
Note
Additional technical specifications for the tests for the TURCK products of the BL20
product family can be found in the catalog "Modular I/O systems and compact I/O
modules in IP20 and IP67" (D301053) and the Manual "BL20 – I/O Modules
Hardware and Engineering" (D300717).
Power supply
Field supply
System supply
Physical interfaces
Fieldbus
Isolation voltage
URS 500 V AC
(Ethernet/
Service-interface)
UEN 500 V AC
(Ethernet/ Module Bus)
PLC-data
Programming
– Application tasks 1
Memory
Number of ports 2
Inputs/Outputs
Cable length 50 m
Utilization factor 1
Protection Class IP 20
"f" with wire sleeve per DIN 46228/1 (wire 0.5 to 1.5 mm2
sleeve crimped on gastight)
Degree of pollution 2
Figure 12:
BL ident ®-
Interface
module with the
LED
Protection Class LED
IP67 (2- and 8- 32
port) 32
77,5
77,5 13
13
145 204
108 145
TI-BL67-PG-EN-2 1545065
TI-BL67-PG-EN-4 1545066
TI-BL67-PG-EN-6 1545067
TI-BL67-PG-EN-8 1545068
TI-BL67-PG-EN-S-2 1545098
TI-BL67-PG-EN-S-4 1545099
TI-BL67-PG-EN-S-6 1545100
TI-BL67-PG-EN-S-8 1545101
TI-BL67-PG-EIP-2 1545069
TI-BL67-PG-EIP-4 1545070
TI-BL67-PG-EIP-6 1545071
TI-BL67-PG-EIP-8 1545072
TI-BL67-PG-EIP-S-2 1545102
TI-BL67-PG-EIP-S-4 1545103
TI-BL67-PG-EIP-S-6 1545104
TI-BL67-PG-EIP-S-8 1545105
TI-BL67-PG-DP-2 1545061
TI-BL67-PG-DP-4 1545062
TI-BL67-PG-DP-6 1545063
TI-BL67-PG-DP-8 1545064
TI-BL67-PG-DP-S-2 1545094
TI-BL67-PG-DP-S-4 1545095
TI-BL67-PG-DP-S-6 1545096
TI-BL67-PG-DP-S-8 1545097
The following diagram shows the connection level of the programmable gateway:
left: Gateway connection level TI-BL67-PG-EN-X (also TI-BL67-PG-EN-IP-X)
right: Gateway connection level TI-BL67-PG-DP-X
Figure 13:
Gateway
connection level
A A
C C
B B
D D
E E
F F
J J
G G
H H
I I
K
K
L L
1 5 V0
5 VDC
2 4 Vi
3 24 VDC
Power
bus
Figure 15:
BL67-
Power supply system bus
and simplified service
switching interface mC memory
PS/2
diagram communi-
cation
PROFIBUS-DP bus
DP OUT DP
(DPV0) interface
module bus
interface
DP IN
1 5 V0
5 VDC
2 4 Vi
3 24 VDC power
bus
The read/write heads are fed via the voltage Vr/w head (VI). This connection is overload- and
short circuit protected.
The LED "VI" page 2-42 indicates when this voltage is defective.
Note
Please refer to the appendix of this product catalog "Fieldbus Technology" for order
information for available cable types. The TURCK-catalog "Modular I/O systems
and compact I/O modules in IP20 and IP67" D301053 is located in the download
area of the web page http://www.turck.com.
Figure 16:
7/8"-connector 1 5
2 4
3
Note
Please refer to the appendix of the product catalog for order information for
available couplings and cable types. The TURCK-catalog "Modular I/O systems and
compact I/O modules in IP20 and IP67" D301053 is located on the website
http://www.turck.com.
Ethernet-connection
The BL67 Ethernet-gateway is connected to Ethernet via the 4-pole, M12 female panel
connector "Ethernet".
The M12 female connector on the gateway has a 4-pole and D-coded design per IAONA-
specifications.
Note
Please refer to the appendix of the product catalog for order information for
available bus cables for Ethernet. The TURCK-catalog "Modular I/O systems and
compact I/O modules in IP20 and IP67" D301053 is located in the download area of
the website: http://www.turck.com.
Note
Please refer to the appendix of the product catalog for order information for
connectors and connection cables for PROFIBUS-DP. The TURCK-catalog
"Modular I/O systems and compact I/O modules in IP20 and IP67" D301053 is
located on the website: http://www.turck.com
Note
Please note that the specific connector should have 4 inductors (from 100 nH to 110
nH each) in the P- and N-feed lines (as recommended by the PROFIBUS user
organization).
Figure 17: 2
PBDP female
connector - "DP 1 3
OUT"
5 4
Attention
No equalizing current must flow across the shield. For this purpose a safe system
must be created for potential equalization!
Bus termination
If the BL67-PG-DP is used as first or last participant in the bus communication (at the end of
a bus segment), the fieldbus must be terminated. The gateway itself offers no opportunity to
terminate the fieldbus. The female connector of the Y-Part for connecting the PROFIBUS-DP-
output must be terminated with a integrated termination resistance (for example RSS4.5-
PDP-TR, Ident-No.: 6601590 as passive terminating resistance or PDP-TRA, Ident-No.:
6825346 as active terminating resistance).
Note
The bus termination is done externally with a connector with integrated terminating
resistance.
Addressing
The three decimal rotary switches are used for Ethernet-addressing of the programmable
gateways.
In addition, PROFIBUS-DP-addressing can be done via the three rotary switches. For this the
gateway-parameter "DPSlaveAddrMode" must be set to the value "RotaryMode". In this case
the last three digits of the Ethernet-address and the PROFIBUS-DP-address are the same.
Figure 18: 9 0 1
Decimal rotary 8 2
X 100
switches for 7 3
6 5 4
setting the
Ethernet-
address 9 0 1
8 2
X 10
7 3
6 5 4
9 0 1
8 2
X1
7 3
6 5 4
Note
Generally the voltage is reset when the "Addressing Mode" is changed.
300 BootP_Mode
The IP-address of the gateway and the subnet mask ("Network mask" page
6-2) are assigned with the help of a BootP-server. Both network settings are
permanently stored in the EEPROM of the gateway.
400 DHCP_Mode
The IP-address of the gateway and the subnet mask ("Network mask" page
6-2) are assigned with the help of a DHCP-server. Both network settings are
permanently stored in the EEPROM of the gateway.
500 PGM_Mode
The PGM-mode allows access of the I/O-ASSISTANT to the network settings
of the gateway. The IP-address of the gateway and the subnet mask
("Network mask" page 6-2) are permanently stored in the EEPROM of the
gateway.
600 PGM_DHCP_Mode
like DHCP_Mode
Note
You may also set the PROFIBUS-DP-address of the TI-BL67-PG-DP-X in the
program software (for example CoDeSys). For this the parameter
"DPSlaveAddrMode" must be set to the value "NormalMode". In this case the
switch setting of the rotary switches has no effect on the PROFIBUS-DP-address.
Attention
After addressing, the protective cover must be tightly affixed with screws on top of
the rotary switches.
Please ensure that the seal of the protective cover is not damaged or moved.
Protection Class IP67 can only be guaranteed when the cover is correctly locked.
Service-interface
The service-interface connects the BL ident ®-interface module to the PC. With the software
I/O-ASSISTANT the interface module can be projected and diagnostic messages can be
displayed.
A special, standard cable is used for the service-interface/PC connection.
TURCK connection cable (I/O-ASSISTANT-ADAPTERCABLE-BL20/BL67; Ident No.:
6827133)
The cable has a PS/2 connector (connection for female connector to gateway) and a SUB-D
female connector (for connector/PC connection).
Figure 19:
PS/2-connector
on connection
cable of the
gateway (top 4 3
view)
5 2
6 1
Figure 20: 5 4 3 2 1
9-pole SUB-D
female
connector on
the connection
cable to the PC 9 8 7 6
(top view)
Figure 21: B
Connection
between PC
and BL67-
C
interface
module via the
TURCK-
connection
cable.
Pin assignment
The table shows the pin assignment when using the PS/2-cable:
5 +5 V /CtrlMode 7 RTS
Firmware-update
A firmware-download may be done on the gateway via the "Service-interface" page 2-34 or
via the "Ethernet-connection" page 2-29 with the help of the software I/O-ASSISTANT (please
refer to Online Help for more information).
Please go to the TURCK web site at www.turck.com to locate the current firmware for your
gateway and an instruction for executing the actualization.
Attention
During the download, the station should be disconnected from the fieldbus. The
firmware download may only be performed by authorized staff. The field side must
be switched free.
SET-scanner
You will only require the functions of the SET-scanner if you change the interface module
configuration after the first switch-on. A modification may occur when modules are added or
when one or more modules are pulled.
When the BL ident ®-interface module is connected for the first time, the current configuration
is automatically read. The continuously illuminated green LED "IO" page 2-40 signals in
sequence that the process was successfully executed.
Press the SET-button for approx. 10 seconds if you changed the interface module
configuration. The current station configuration is stored as Actual-configuration and is
transferred to both the Temp-Should-be configuration buffer and the Should-be configuration
buffer.
During the operation, the "GW"-LED remains blinking.
RK4.5T-2-RS4.5T/S2500 g g x
(6699200)
RK4.5T-5-RS4.5T/S2500 g g x
(6699201)
RK4.5T-10-RS4.5T/S2500 g g x
(6699202)
WK4.5T-2-RS4.5T/S2500 a g x
(6699203)
WK4.5T-5-RS4.5T/S2500 a g x
(6699204)
WK4.5T-10-RS4.5T/ a g x
S2500
(6699205)
RK4.5T-0.3-RS4.5T/ g g x
S2500
(6699210)
RK4.5T-25-RS4.5T/S2500 g g x
(6699211)
RK4.5T-50-RS4.5T/S2500 g g x
(8035246)
WK4.5T-25-RS4.5T/ a g x
S2500
(6638425)
WK4.5T-50-RS4.5T/ a g x
S2500
(6638426)
Note
When installing the connector, please note the "Pin assignment for the connection
cables" page 2-39!
RK4.5T-2/S2500 g x
(8035244)
RK4.5T-5/S2500 g x
(6699206)
RK4.5T-10/S2500 g x
(6699207)
RK4.5T-25/S2500 g x
(6638421)
RK4.5T-50/S2500 g x
(6638422)
WK4.5T-2/S2500 a x
(8035245)
WK4.5T-5/S2500 a x
(6699208)
WK4.5T-10/S2500 a x
(6699209)
WK4.5T-25/S2500 a x
(6699423)
WK4.5T-50/S2500 a x
(6638424)
For the food and beverage range (FB = Food and Beverage) - IP69K
FB-RK4.5T-5/S2502 g x
(8036404)
FB-RK4.5T-10/S2502 g x
(8036405)
FB-RK4.5T-25/S2502 g x
(8037011)
Note
When installing the connector and the coupling, please note the "Pin assignment for
the connection cables" page 2-39.
Figure 22:
Connection
level
Figure 23: 2 2
Pin assignment
connector (left) 3 1 1 3
and coupling
(right) 4 5 5 4
Table 21: Port Pin Pin SignalB) Color mappingA) Color mappingA)
Pin assignment of assignm RK4.5T... and FB4.5T..
assignment to the ent of WK4.5T..
BL67-2RFID BL67-B-2M12 the
connect
or
red and CPU not ready for – Please check the voltage
LED "IOs" OFF operation, VCC too low→ supply of the system
possible causes: connected to the gateway and
– too many modules on the wiring.
gateway – Pull surplus modules.
– short circuit in connected – Replace the gateway if need
module be.
– gateway defective
green blinking, The allowed max. number Please check the number of
4 Hz of modules connected to modules connected to the
the gateway has been gateway and pull surplus
exceeded. modules if needed.
green blinking, Low voltage VO; system – Please check the supply
1 Hz running. voltage of the system
connected to the gateway.
green blinking, High voltage VO; system
4 Hz running.
VI green VI o.k.
green blinking, Low voltage VI; system – Please check the supply
1 Hz running voltage of the system
connected to the gateway.
green blinking, High voltage VI; system
4 Hz running
DP green PROFIBUS-DP –
communication
established
Diagnoses Port 1
0 0 reserved
1 reserved
3 to 7 reserved
1 to 2 reserved
4 to 7 reserved
Diagnoses Port 2
2 0 reserved
1 reserved
3 to 7 reserved
1 to 2 reserved
4 to 7 reserved
Technical data
Warning
This device may cause radio interference in living quarters and in small industry
(living, business- and commercial areas, small business). In this case the user may
be asked to implement respective measures at his own expense.
Attention
The auxiliary supply must meet the requirements of the safety low voltage (SELV =
Safety extra low voltage) per IEC 364-4-41.
Ambient temperature
Falling and tumbling per IEC 68-2-31 and free fall per
IEC 68-2-32
Protection Class IP 67
Reliability
Note
Additional technical specifications for testing TURCK products of the BL67 product
family can be found in the catalog "Modular I/O systems and compact I/O modules
in IP20 and IP67" (D301053) and the manuals "BL67–User Manual for BL67-PG-EN"
D301033, "BL67 – programmable Gateway BL67-PG-EN-IP User Manual"
D301044, "BL67- programmable Gateway BL67-PG-DP User Manual" D301047.
Supply voltage
PROFIBUS-DP
Isolation voltage
PLC-data
Programming
– Application tasks 1
Memory
Ambient conditions
Ambient temperature
Permanent shock resistance per IEC 29.02.68, 1000 shocks, half sinus 25 g
peak value/6 ms, each in ± direction per space
coordinate
– Test cycles 7
Transient emissions
– Relay discharge 4 kV
(indirect)
Reliability
Dimensions
Number of ports 2
Inputs/Outputs
Cable length 50 m
Utilization factor 1
Dimensions (B x L x H) 32 x 91 x 59 mm
TURCK provides example projects for this specific purpose. Order directly from TURCK the
CD with the example projects and all other required software components: Ident-No. 1545052
Hardware description of the example project
The following hardware components were used for the example startup:
BL ident ®-interface module "TI-BL67-PG-EN-2" (1 x 2-port)
BL ident ®-read/write head "TN-CK40-H1147"
Data carrier "TW-R30-B128" (user data = 112 bytes)
Suitable connection and supply cables
Installation of the software "CoDeSys"
If you install the CoDeSys software directly from the BL ident ®-CD (Ident-No. 1545052), you
will automatically have the correct version for the example project.
Note
Please note that you will require the CoDeSys-version 2.3.6.4 (or earlier) for startup
of the BL ident ®-system!
Note
The example project works with the target file folders as suggested by the CoDeSys!
Figure 24:
TSP file folder
for the
programmable
gateways
Note
Please ensure that the directory structure of the TSP file folder remains intact.
If this is not the case, problems may occur when the target is installed.
Note
Current Target files are also located online at http://www.turck.com.
The program TargetInstall.exe is needed for installation. In general, this program can be
located via the following directory tree:
C > Programs > 3S Software > CoDeSys V2.3 > InstallTarget.exe
The program can also be started alternatively via:
Start > Programs > 3S Software > CoDeSys V2.3 >InstallTarget
After the start of the InstallTarget program, please click on the "Open" button. Search for the
TSP file folder for the programmable gateway (for example, TSP_turck_all_pgs_Vx.x.x.x) and
select the .tnf-file (for example, Turck-PGs.tnf). Please click on the "Open" button again. Now
the new Turck file folder is in the field "Possible Target Systems".
The respective installation directory is displayed. Mark the gateway type you used. Click the
"Install" button. The new gateway now belongs to the "Installed Target Systems".
Downloading the example project to the CoDeSys
Start the 3S-software CoDeSys. Open the example project that is compatible with your
gateway:
File > Open >
Figure 25:
Library manager
Integrated
Libraries
The libraries BLxxPIB.lib and BLxxIoSys.lib can be found in the TSP file folder:
C > Programs > Shared Files > CAA-Targets > Turck > BLxx
The library, Standard.lib, is located under:
C > Programs > 3S Software > CoDeSys V2.3 > Library
In the case that a missing library appears with a red text, delete the library first by right-
clicking the mouse and then by clicking "Delete". The library can now be integrated without
problems as described above.
Figure 26:
Setting of the
communication
parameters in
CoDeSys
Here, the last three digits of the address must be "001". In the example, this corresponds to
the switch setting of the rotary switches on the gateway. Differing switch settings must be
accepted accordingly.
Note
After each change of the switch setting of the rotary switches on the gateway, a
voltage-reset is needed!
Note
Please note that the parameter "Motorola byteorder" must have the value "Yes"!
Figure 27:
IP-address of
the data
processor or
rather the
network
interface card
It is possible to change the IP-address by selecting the item "Use the following IP address"
or rather "Specify IP address".
Communication between the BL67 gateway and the data processor is possible if the digits of
the first three ranges correspond. In this example it is 192.168.001.
Note
A complete description of the LED diagnostics can be found in chapter „Mounting
and installation“.
Figure 28:
The component
PLC_PRG
(PRG)
Operation of the first port of a 2RFID-module can be initiated with this example project. Here,
the addition, CH_0, represents the first port. For a second port an additional instance of the
PIB should be created (mapped) and programmed in the same manner.
The following tables describe the variables of the function block PIB_001KB of this example
program. The values of the configuration parameters that had been written first can only be
changed "Offline" by overwriting them. The Offline mode is generated with:
Online > Logout
or alternatively with
INDEX 111 The index "111" indicates that the next execution initiates
a data transfer (also parameter data) to Port 1. The index
"112" refers to Port 2 of each BL ident ®-module of the
station. Differing indices (for example, "113") result in an
error message "DW#16#E7FE06xx" page 3-55.
TXBUFLEN 200 The send buffer for the 1st port (1st instance) occupies a
range of 200 bytes in CH_0_TXREF. The array
CH_0_TXREF defines the entire memory range for the
send data and includes 1024 bytes.
CH_0_TXREF can be found under the tab "Resources" in
the file folder Global Variables in "VarGlobe_PIB".
TXSTART 1 The send buffer for the 1st port starts at Position 1 of the
memory range. Here is the first byte of the array
CH_0_TXREF: CH_0_TXREF[1].
Because of the length of 200 bytes (TXBUFLEN), the
memory range CH_0_TXREF[1] to CH_0_TXREF[200] is
available for the send data (write data) of the 1st port.
A 2nd port could therefore occupy the range
CH_0_TXREF[201] to CH_0_TXREF[400].
RXBUFLEN 200 The received buffer for the 1st port (1st. instance) occupies
a range of 200 bytes in CH_0_RXREF. The array
CH_0_RXREF defines the entire memory range for the
received data and includes 1024 bytes.
CH_0_RXREF can be found under the tab Resources in
the file folder Global Variables in "VarGlobe_PIB".
RXSTART 1 The received buffer for the 1st port starts with Position 1
of the memory range. Here is the first byte of the array
CH_0_RXREF: CH_0_RXREF[1].
Due to the length of 200 bytes (RXBUFLEN), the memory
range CH_0_RXREF[1] to CH_0_RXREF[200] is therefore
available for the received data (read data) of the 1st port.
A 2nd port could occupy accordingly the range
CH_0_RXREF[201] to CH_0_RXREF[400].
You may access the control variables and the command selection in the following table via
the tab "Visualizations" and by selecting "PLC_VISU".
The definitions of variables described in the following table can be found in the tab
"Resources" in the file folder "Global Variables" in "VarGlobe_PIB".
Please observe the status messages of the following table also with the visualization for this
example program (via the tab "Visualizations" with the selection of "PLC_VISU").
CH_0 An error and alert code is sent with the help of this variable. A detailed
_STATUS description of all types of error codes can be found at "Alerts and error
messages" page 3-53
CH_0 With "TRUE" (blue) this variable signals that the command has been
_DONE executed. During the execution of a command, this variable briefly
switches to the mode "FALSE" (black).
CH_0 This value indicates with "FALSE" (black) that at this time, no command
_BUSY is being executed.
This value indicates with "TRUE" (blue) when the PIB is occupied with
processing a command, and when no further command is transferable.
CH_0 This output value is set to "TRUE" if an error has been detected. The
_ERROR detected error could exist locally (inside the host control) or in the
peripherals (inside the Ident device). More detailed information
concerning the error are provided via the "STATUS" parameter. (This flag
is internally set by the PIB in the acknowledgment telegram (Bit 0 of CI)
depending on the error bit. After a new request of a command this flag is
reset to "FALSE".
CH_0 This output value is set to "TRUE" (blue) if a target (here a data carrier) is
_TP within the detection range of the read/write head.
It is "FALSE" (black) if there is no target (here data carrier) within the
detection range of the read/write head.
If an Ident-device does not support this feature, the value is set to "0".
CH_0 This output value indicates with "TRUE" whether the read/write head is
_Transmitter active. An active read/write head creates an electromagnetic field (for
ON example, the signal is transferred with 13.56 MHz).
It is "FALSE" when the read/write head is inactive, this means no creation
of an electromagnetic field.
CH_0 This output value indicates with "TRUE" that all data ranges of the data
_TagFully carrier were fully read from the BL ident ®-system. Automatic reading
Read always occurs when a data carrier is within the detection range of the
read/write head. The output value only continues to signal "TRUE" as
long as TP=1. The time between TP=1 and TFR=1 can not be seen as
reference time for a read/write command. If only few bytes are written or
read with a read/write command, the command is executed significantly
faster than the time it takes to fully read a 2000 bytes data carrier, for
example. Read commands can directly access data with TFR=1.
The output value is "FALSE" when the data ranges of the data carrier
were not fully read from the BL ident ®-system, or if the data carrier is not
within the detection range of the read/write head.
CH_0 This output value signals with "TRUE" that a read/write head is
_Transmitter connected.
Connected The value is "FALSE" when the read/write head is disconnected.
CH_0 This output parameter indicates the number of the bytes last sent
_TRLEN (depending on the executed command, sent or received bytes), after the
command has been successfully executed.
For a thorough description of all parameters, please refer to "3.1.1 Parameters" page 5-7.
Figure 29:
Visualization tab
Command button
Status messages
The initialization occurs with "WriteConfig". The three offered alternatives differ as follows:
Init (or also Reset) - initialization is implemented. The status of the read/write head is
"activated" by default and is not changed.
Init - Transmitter ON - initialization is implemented. The read/write head is activated or
remains active.
Init - Transmitter OFF - initialization is implemented. The read/write head is deactivated.
Now implement initialization with "Init (or also Reset)".
Please ensure that the online connection to your control is active and that the program is
running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is highlighted black and
displayed at the bottom right of the window.
You may monitor command execution via the status messages. Active modes are signalled
here with the green illumination of the respective circular surface.
When initialization has been successful, the INIT-, BUSY-, and DONE-status ("3.1.1
Parameters" page 5-7) become consecutively active.
The first byte of the received buffer corresponds to the value "MaxPacketSize" page 5-25.
If initialization was not successfully implemented, the ERROR-status is active via "Status": An
error code is sent to point out the cause of the error to the user. An explanation of all possible
error codes can be found in "Alerts and error messages" page 3-53.
Reading of the UID from the data carrier / Port 1 (CH_0)
Every RFID data carrier receives a "UID" page 6-4 (unique identifier) from the manufacturer.
The UID represents a worldwide unique TAG identification number and consists of 8 bytes.
Read of the UID is executed with the command "Read UID" in "PLC_VISU" of the tab
"Visualization". For a thorough description of this command code, please refer to "Inventory"
page 5-28.
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
You may monitor command execution via the status messages. Active modes are signalled
here when the respective circles are illuminated green.
The request for command execution is created with the increasing edge of "EXECUTE". The
readiness to read the UID is signalled with the active BUSY ("3.1.1 Parameters" page 5-7)-
status.
The status "TP" is active when a data carrier is within the received range of the read/write
head.
The successful execution of the command "Read UID" is acknowledged with the active
DONE-status.
If the command "Read UID" was not successfully executed, the ERROR-status is active via
"Status": The sent error code points out the cause of the error to the user. A detailed error text
can be found in the "Error description" in the bottom window area. For an explanation of all
types of error codes, please refer to "Alerts and error messages" page 3-53.
Now you may read the "Unique Identifier / UID" only in the received field of the "PLC_VISU".
Figure 30:
PLC_VISU after
Inventory
A The UID consisting of 8 bytes can be found in the received buffer starting with byte 5 (Received
Buffer 5). Byte 5 represents the MSB, and byte 12 the LSB of the UID.
Here, the 2 bytes of the Received Buffer 1 and the Received Buffer 2 always signal 0x0001. In case
a group is compiled, it would be signalled here which data carrier was read.
Together the 2 bytes of the Received Buffer 3 and the Received Buffer 4 signal the number of read
byte.
Figure 31:
PLC_VISU with
Write data
Data to be written
in the
send data field
Writing is implemented with the command "Physical Write" (or physical writing) in
"PLC_VISU" of the tab "Visualization". For a thorough description of this command code,
please refer to "Physical_Write" page 5-24.
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
You may monitor command execution via the status messages. Active modes are signalled
here when the respective circles are illuminated green.
The request for command execution is created with the increasing edge of "EXECUTE".
Readiness to write is signalled with the active BUSY-status ("3.1.1 Parameters" page 5-7).
The status "TP" is active when a data carrier is within the received range of the read/write
head.
Successful execution of the "Physical Write" command is acknowledged with the active
status DONE.
If the command "Physical Write" could not be successfully executed, the ERROR status is
active, and with the help of "Status": an error code is sent to point out the cause of the error
to the user. A detailed error text can be found in the "Error description" in the bottom window
area. For an explanation of all types of error codes, please refer to "Alerts and error
messages" page 3-53.
Reading from the data carrier / Port 1 (CH_0)
This paragraph explains reading of 12 bytes of data of any content from your RFID data
carrier.
Reading from the data carrier of the 1st port is possible if "Initialization of the 1st port (CH_0)"
page 3-14 has been implemented.
The prior paragraph explained writing of any data to the data carrier with the "Physical Write"
command. In this paragraph, the same data is read with the "Physical Read" command (or
physical reading) from the data carrier.
For a thorough explanation of this command code, please refer to "Physical_ Read" page
5-23.
Note
If you use a different data carrier than indicated in "Hardware description of the
example project" page 3-3 or if you like to access certain areas of the data carrier,
please pay attention to "User data ranges of the data carrier versions." page 3-56.
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
You may monitor command execution via the status messages. Active modes are signalled
here when the respective circles are illuminated green.
The request for command execution is created with the increasing edge of "EXECUTE".
Readiness to read is signalled with the active status BUSY ("3.1.1 Parameters" page 5-7).
The status "TP" is active when a data carrier is within the received range of the read/write
head.
Successful execution of the command "Physical Read" is acknowledged with the active
status DONE.
If the "Physical Read" command could not be successfully executed, the status ERROR is
active, and with the help of "Status": an error code is sent to point out the cause of the error
to the user. A detailed error text can be found in the "Error description" in the bottom window
space. For an explanation of all types of error codes, please refer to "Alerts and error
messages" page 3-53.
You can now read the read data in the received data field of the "PLC_VISU".
Figure 32:
PLC_VISU with
read data
Read data
in the received
data field
Note
If you use a different data carrier than indicated in "Hardware description of the
example project" page 3-3 or if you like to access certain arrays of the data carrier,
please pay attention to "User data ranges of the data carrier versions." page 3-56.
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
You may monitor command execution via the status messages. Active modes are signalled
here when the respective circles are illuminated green.
The request for command execution is created with the increasing edge of "EXECUTE".
Readiness to write is signalled with the active status BUSY ("3.1.1 Parameters" page 5-7).
The status "TP" is active when a data carrier is within the received range of the read/write
head.
The successful execution of the command "Mem Status" is acknowledged with the active
status DONE.
If the command "Mem Status" could not be successfully executed, the status ERROR is
active, and with the help of "Status": an error code is sent to point out the cause of the error
to the user. A detailed error text can be found in the "Error description" in the bottom window
space. For an explanation of all types of error codes, please refer to "Alerts and error
messages" page 3-53.
Now you may read the first 12 bytes of the data from the data carrier in the received data field
of the "PLC_VISU".
Figure 33:
PLC_VISU with
data from the
data carrier
With the command Mem Status, 13 bytes of information is sent. The complete information is
reproduced with the array CH_0_RXREF in the CoDeSys under the tab "Resources" in the file
folder "Global variables" in "VarGlobe_PIB".
The following table explains the 13 bytes data carrier information:
13 1 1: IC-identification is supported.
0: IC-identification is not supported.
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
You may monitor command execution via the status messages. Active modes are signalled
here when the respective circles are illuminated green.
The request for command execution is created with the increasing edge of "EXECUTE".
Readiness to write is signalled with the active status BUSY ("3.1.1 Parameters" page 5-7).
The status "TP" is active when a data carrier is within the received range of the read/write
head.
The successful execution of the command "Dev Status" is acknowledged with the active
status DONE.
If the "Dev Status" command could not be successfully executed, the status ERROR is active,
and with the help of "Status": an error code is sent to point out the cause of the error to the
user. A detailed error text can be found in the "Error description" in the bottom window space.
For an explanation of all types of error codes, please refer to "Alerts and error messages"
page 3-53.
You can only read the first 12 bytes of the read/write head data in the received data field of
the "PLC_VISU".
Figure 34:
PLC_VISU with
data for the
Ident-device (12
of 48 bytes).
With the command Dev Status, 64 bytes of information are sent. The complete information is
reproduced with the array CH_0_RXREF in the CoDeSys under the tab "Resources" in the file
folder "Global variables" in "VarGlobe_PIB".
The following tables explain the 64 bytes Ident-device information:
13 to 32 84, 78, 45, 67, 75, 52, Product description – the hexadecimal
48, 45, 72, 49, 49, 52, values can be interpreted per an ASCII
55, 0, 32, 32, 32, 32, code table, and then the result is:
32, 32 <=> TN-CK40-H1147
0x54, 0x4E, 0x2D,
0x43, 0x4B, 0x34,
0x30, 0x2D, 0x48,
0x2D, 0x2D, 0x34,
0x37, 0x00, 0x20,
0x20, 0x20, 0x20,
0x20, 0x20
55 to 56 0, 0 Version counter
Is currently not used by BL ident ®.
The "Next"-commands
This paragraph explains the "Next" command (or next). You may execute the command after
a successful initialization ("Initialization of the 1st port (CH_0)" page 3-14) and after a data
carrier was present in the received range of the read/write head.
This sample project contains the following variable for "Next" command:
Next - Mode 0
The command that follows "Next - Mode 0" is only executed when the data carrier linked
to the prior command has at one time left the detection range of the read/write head.
Next - Mode 1
The command that follows "Next - Mode 1" is only executed when the "UID" linked to the
data carrier in the received range is different from the "UID" linked to the prior command.
For a thorough explanation of this command code, please refer to "Next" page 5-24.
You may read the definition of "Next - Mode 0" and "Next - Mode 1" under the tab
"Component" in "PRG-Pib-Commands".
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
The status "TP" is active when a data carrier is within the received range of the read/write
head.
The request to execute the command that follows "Next" is created with the increasing edge
of "EXECUTE". The readiness to execute the command following "Next" is signalled with the
active status BUSY "3.1.1 Parameters" page 5-7). Only when the "Next" conditions are
satisfied, the command may be executed and "DONE" is sent.
If the "Next" command could not be successfully executed, the status ERROR is active, and
with the help of "Status": an error code is sent to point out the cause of the error to the user.
A detailed error text can be found in the "Error description" in the bottom window space. For
an explanation of all types of error codes, please refer to "Alerts and error messages" page
3-53.
The startup of the TURCK BL ident ®-system with the "Proxy Ident Function Block" entails
some modifications from the "Extract from the specification" page 5-1 (specification). The
differences pertain to the command- and diagnostic levels.
The following conformity table indicates which command and status- or rather diagnostic
messages of the complete specification are not supported by BL ident ®:
Read Command N
Get Command Y
Physical_Read Command Y
Write Command N
Put Command N
Physical_Write Command Y
Format Command N
Create Command N
Delete Command N
Clear Command N
Update Command N
Next Command Y
Get-Directory Command N
Set-Attribute Command N
Get-Attribute Command N
Mem-Status Command Y
Dev-Status Command Y
Inventory Command Y
Read-Bar-Code Command N
Read-Config
This command reads Config-data written under Write-Config.
Possible command specific STATUS values after faulty execution:
Inventory
Only the parameter Attributes=0 is supported. ("Inventory" page 5-28)
Physical_Read
The parameter StartAddress and Length (+StartAddress) must be within the address range of
the data carrier. ("Physical_ Read" page 5-23)
Physical_Write
The parameter StartAddress and Length (+StartAddress) must be within the address range of
the data carrier. ("Physical_Write" page 5-24)
Mem-Status
In connection with the command Mem-Status, the Attribute 0x40 (physical status information)
is supported.
The response of the data carrier is transferred as data to a GET_SYSTEM_INFORMATION-
command per ISO/IEC 15693-3.
Byte 0 = serial number (UID), LSB
to
Byte 7 = serial number (UID), MSB
Byte 8 = data carrier format (DSFID)
Byte 9 = application identification (AFI)
Byte 10 = memory size: Block number 1
Byte 11 = memory size: Bytes/Block-1,
Byte 12 = IC-identification
Dev-Status
Only the parameter Attributes = 0x04 is supported. Resent is a data record per I&M-
specification I&M0. The connected read/write head is being written to. ("Dev Status" page
5-27)
Example:
12 31 ORDER_ID ‚TN-CK40-H1147’,
0x00,
0x20, 0x20, 0x20,
0x20, 0x20, 0x20
48 49 HARDWARE_REVISION 0x0003
58 59 PROFILE_SPECIFIC_TYPE 0x0000
Next
Only the parameter NextMode = 0 or 1 is supported. ("Next" page 5-24)
Get
With this command it is possible to set the write protection of a block of a data carrier.
For this it is necessary to know how the memory of the used data carrier is arranged (number
and size of the blocks).
Attention
Setting of the write protection for a block is not reversible!
0 0x02
9 0x67
0 0x02
1 0x67
2 Command index
Note
Please note that CoDeSys Version 2.3.6.4 is required for BL ident ®-system startup!
Figure 35:
TSP folder for
the gateway
BL67-PG-EN
Note
Please ensure that the directory structure of the TSP file folder remains intact.
If this is not the case, problems may occur when the target is installed.
The program TargetInstall.exe is needed for installation. In general, this program can be
located via the following directory tree:
C > Programs > 3S Software > CoDeSys V2.3 > InstallTarget.exe
Alternatively the program can also be started via:
Start > Programs > 3S Software > CoDeSys V2.3 >InstallTarget
After the start of the InstallTarget program, please click on the "Open" button. Search for the
TSP folder for your gateway (for example, TSP_Turck_BL67_PG_EN_Vx.x.x.x) and select the
.tnf file (for example, BL67-PG-EN.tnf). Please click on the "Open" button again. Now the new
Turck file folder is in the field "Possible Target Systems".
The respective installation directory is displayed. Click on the button "Install". The new
gateway now belongs to the "Installed Target Systems".
Configuration in the CoDeSys
Start the software CoDeSys. Select File > New. Now you are asked to select your gateway-
type from the list:
Figure 36:
Selection of the
gateway
Figure 37:
Selection of the
programming
language
Figure 38:
Component
PLC-PRG
Figure 39:
PLC
Configuration
Figure 40:
Setting of the
communication
parameters in
CoDeSys
Here, the last three digits for "Address" must be "001". In this example, this corresponds to
the switch setting of the rotary (encoder) switches on the gateway. Differing switch settings
must be accepted accordingly. The first 9 digits of the IP-address match the delivery status.
Note
Please note that the parameter "Motorola Byteorder" must have the value "Yes"!
Please select from the list the network connection for your gateway. Please check the name
of your connection. You may select the subitem "Properties" by right clicking it.
Please check under "General" the bottom item "Internet Protocol - (TCP/IP)" in the window
"This Connection uses the following elements". You may click on the "Properties" button if
this entry is checked blue. Check here whether the IP-address of the data processor/network
interface card matches the IP-address of the gateway (here: 192.168.001.001).
Figure 41:
IP-address of
the data
processor or
rather the
network
interface card
The IP-address may be changed after you have selected the item "Use the following IP
address" or rather "Specify IP address".
Communication between the BL67 gateway and the data processor is possible if the digits of
the first three ranges match. In this example it is 192.168.001.
Process data
For testing purposes you may directly write and read the process data within the PLC
Configuration range.
Please refer to the paragraph "Process image BLxx-2RFID-S-modules" page 3-43 for a
description of the complete process image.
Please assign variable names for single bits of the process image for fast location and
possibly for later programming. The input field opens by double-clicking on the respective bit.
Note
Please ensure that the online connection to your control is inactive. The "ONLINE"
mode is shown inactive at the right bottom of the window.
Figure 42:
Assigning
variable names
in the process
image
Please switch to the "ONLINE" mode with online > login or and start the program .
Note
Please ensure that the online connection to your control is active and that the
program is running. The mode "ONLINE:BL67_PG_EN" and "RUNNING" is
highlighted black and displayed at the bottom right of the window.
Command functions
Please test the different functions as described in detail in the paragraph "Meaning of the
command bits/control bits" page 3-47.
First, please activate the read/write head. An active read/write head creates an
electromagnetic field.
Figure 43:
Switching on
the read/write
head
Figure 44:
Write errors,
number and
address on the
data carrier -
(example)
Figure 45:
Write data
(example)
The following status messages indicate that the read/write head will execute the command
as soon as a data carrier is in the received range:
Figure 46:
Status message
after WRITE-
command
When a data carrier is in the detection range of the read/write head and recognized by it, "TP"
becomes active (=1).
Figure 47:
Data carrier in
received range
When a data carrier is in the detection range of the read/write head, the user range of the data
carrier is automatically and fully read. During this process, TFR=0 and changes to TFR=1 after
the read operation is fully completed. Only after the detection range has been evacuated, TFR
again becomes "0". This automatic read operation is interrupted by all user commands; the
TFR-Bit keeps its active value. The process is restarted when no other commands exist and
when TP=1. Read commands can directly access already stored data via TFR=1.
A new command is only accepted when all remaining commands were reset to "0". DONE
switches to status "1" when the execution of the command is completed and a new command
can be acknowledged. When "ERROR" = 0, the command was successfully executed.
Figure 48:
The execution
of the command
was successful.
Figure 49:
ERROR-Byte 1 0x4
and 2 of the
process input
data
0x80
Figure 50:
Mapping of
values 0x4 and
0x80 in the error
code table
Figure 51:
RESET-
command
Figure 52:
Setting
parameter
values
3 4
2
5
7
Diagnostics
All diagnostic messages are sent to the "Process input data" page 3-43 with 2 bytes error
code.
Three diagnostic messages ("Diagnostics" page 3-52) concerning the read/write head can
also be represented with the function "iIO_ReadModuleDiags" of the BLxxIoSys.lib.
Please refer to the manual "BLxxIoSys.lib – System Diagnostics" (D301114) for a description
of the functions concerning the system diagnostics.
Please activate the "POUs" tab for installing the function component. Please select the
"Offline" mode. Please open a new "Network (after)" by right-clicking the mouse in the right,
middle area of the window. Please click directly after the three red question marks and select
"Box" from the menu. Check "AND" (Default Component) and select input assistance with F2.
Select from the list under "IoDiagnostic" the component "iIO_ReadModuleDiags".
Define the four variables of the component:
Figure 53:
Definition of the
variables
The variables may be mapped via the input assistance (F2). A pointer is expected at "pbData".
Put the variable RFID_Diag in parentheses and write "ADR" in front of it.
Figure 54:
Installing the
function
"iIO_ReadModu
leDiags"
With Online > Login or , the "Online-Mode" is changed and the new program can be
loaded into the control. With Online > Run or , the program in your gateway is started.
Figure 55:
The function
"iIO_ReadModu
leDiags" when
Program/online
is running.
The "Diagnostics" page 3-52 are transferred into the variable RFID_Diag.
Figure 56:
Display of the
variable
RFID_Diag
Figure 57:
Reset of the command is done
command bit CMD 0 1 by transceiver
after execution
CMD 1 0
Figure 58:
Reset of the
CMD 0 1 CMD 1 0
command bit
prior to
execution
DONE = 1 DONE = 0 DONE = 0
BUSY = 0 BUSY = 1 BUSY = 1
command is done
by transceiver
7 6 5 4 3 2 1 0
Port 1
2 MSB
10
11
Port 2
14 MSB
7 6 5 4 3 2 1 0
17
18
19
20
21
22
23
A Byte-Number
DONE 1: The system does not process a command at this time and is ready to
receive another command.
0: All arriving commands, except the RESET-command, are ignored.
DONE only switches the status "1" when all command bits (READ,
WRITE...) are "0".
"Flow diagram for command execution" page 3-42
ERROR 1: An error has occurred during command execution. If this flag follows
a write command (WRITE), for example, the data of the send-buffer
were not written to the data carrier. If this flag follows a read command,
no data was read from the data carrier and no new data was stored in
the received data buffer. Details about the cause of the error is provided
via the 2 bytes error code of the process image.
Paragraph "Error messages" page 3-38 shows how the error code is
displayed in the CoDeSys and the reference to the error code table
"Status values" page 3-53.
0: It was possible to successfully execute the last Write or Read
command. The received data buffer contains valid data. The value of
the 2 bytes error code is irrelevant in this case.
XCVR_ON 1: The transfer with 13.56 MHz from read/write head to data carrier is
active.
0: The transfer with 13.56 MHz from read/write head to data carrier is
not active.
TFR 1: All data ranges of the data carrier were fully read from the BL ident ®-
(Tag Fully system, and the data carrier still remains within the detection range
Read) (TP=1). Automatic reading always occurs when a data carrier is within
the detection range of the read/write head. The time between TP=1 and
TFR=1 can not be seen as reference time for a read and write
command. If only few bytes are written or read with a read/write
command, the command is executed significantly faster than the time
it takes to fully read a 2000 bytes data carrier, for example. Read
commands can directly access already stored data with TFR=1.
0: The BL ident ®-system did not yet fully read all data ranges of the data
carrier or the data carrier is outside the detection range of the read/write
head.
Note
Depending on the system, the status bit "BUSY" can not be used for a handshake
operation in many cases!
7 6 5 4 3 2 1 0
Port 1
10
11
Port 2
17
18
19
20
21
22
23
A Byte-Number
Note
If more than one command bit has been set via TAG_ID, READ, WRITE,
TRANSCEIVER_INFO or TAG_INFO, the BL67-2RFID-S-module will generate an
error message! The Bit "XCVR" must always be set to execute a command so that
the read/write head remains active!
The following table provides the meaning of the command bits of the process output data
listed above:
NEXT 1: Exactly one command can be executed with the same data carrier. If
another command is initiated with the same data carrier, the status bit
remains "BUSY=1". The BL ident ®-system must be reset (RESET) or
the command must be executed with a different data carrier.
0: Function is not used.
TAG_ID 0 -> 1: The command to read the UID is initiated with the increasing
edge. The command is executed when a data carrier is within the
detection range of the read/write head. ("UID" page 6-4)
0: Function is not used.
READ 0 -> 1: The command to read is initiated with the increasing edge. The
command is executed when a data carrier is within the detection range
of the read/write head.
The Byte number "ByteCount0..ByteCount2" is read from the data
carrier address "AddrLo, AddrHi".
0: Function is not used.
WRITE 0 -> 1: The command to write is initiated with the increasing edge. The
command is executed when a data carrier is within the detection range
of the read/write head.
The Byte number "ByteCount0..ByteCount2" is written to the data
carrier address "AddrLo, AddrHi".
0: Function is not used.
TAG_INFO 0 -> 1: The command TAG_INFO (information for data carrier) is initiated
with the increasing edge. The command is executed when a data carrier
is within the detection range of the read/write head.
Together with the process input data the information about the data
carrier is sent in the range read data with the following 8 bytes:
Byte 0: Number of Block-1 of the data carrier (this means 27 ->
28 Blocks)
Byte 1: Number of bytes-1 per block (this means 3 -> 4 bytes per block)
Byte 2: Is not supported (DSFID-data carrier format)
Byte 3: Is not supported (AFI - Application Identification)
Byte 4: Is not supported (ICID - IC-identification (is not supported)
Byte 5 to Byte 7: „0"
0: Function is not used.
ByteCount0..2 Number of Byte-1 that still need to be read (READ) or written (WRITE).
0x007 -> 8 byte still need to be read/written.
AddrHi, AddrLo Array of the length 2 bytes. Repeats the start address of the memory
range in the data carrier which is to be accessed via the Write or Read
command.
The writable/readable start addresses of the data carriers can be ≠ 0.
Paragraph "User data ranges of the data carrier versions." page 3-56
contains information concerning the writable/readable start addresses
and data carrier versions.
Parameter
At this time only the parameter "Bridging Time K1[n*4ms]" and "Bridging Time K2[n*4ms]" are
transferred with the 8 bytes parameter data image.
0A) reserved
6 reserved
A Byte-Number
Keep the default setting "=0" of this parameter when the startup occurred without the error
message "Dwell time of the data carrier in the detection range was not sufficient for
successful command processing." page 3-53.
If the error message "Dwell time of the data carrier in the detection range was not sufficient
for successful command processing." page 3-53 appears, check whether your application
supports "Compliance with Recommended Distances (Minimum Distances), a decrease of
the speed or the data volume. Please refer to the manual D101583, Chapter "Operating Data"
for the specification "Recommended and Maximum Distances".
In case the recommended distances can not be adhered to or in case the error with the
recommended distances continues to be sent based on external influences, the parameter
"Bridging Time Kx[n*4ms]" must be set to a suitable value.
Figure 59:
Detection range 35
of a read/write 30
head A
25
20
mm
15
C
10
0
B0 5 10 15 20 25 30
mm
A Distance bridged by the data carrier when passing by the read/write head
B Center of the read/write head
C Section of the distance that needs to be bridged.
For the section "C" in the above diagram the data carrier must use maximum the "Bridging
Time K1[n*4ms]". The data carrier must be within the detection range before the bridging time
elapses so that the transfer can continue.
Additional diagrams for the detection ranges of different read/write heads and data carriers
are shown in the manual D101583 in the Chapter "Overtravel Ranges".
The LEDs of the read/write head or rather the status bit "TP" of the process input data indicate
if the data carrier is within the detection range or not.
Diagnostics
There are three diagnostics for read/write head with 2 bytes for each port. These diagnostics
are also displayed with the ERROR-Byte of the process input data.
Port 1
0A) TR_PS_OVL
1 TR_PS_ERR TR_HW_ERR
Port 2
2 TR_PS_OVL
3 TR_PS_ERR TR_HW_ERR
TR_PS_OVL The voltage supply of the read/write head was switched off because of
over-current ("DW#16#E4FE01xx" page 3-53).
TR_PS_ERR The voltage supply of the read/write head is not in the required range
("DW#16#E4FE88xx" page 3-53).
The following table provides information in regards to the meaning of some STATUS values:
DW#16#E1FE02xx Dwell time of the data carrier in the detection range was not
sufficient for successful command processing.
DW#16#E1FE03xx The indicated address range or command does not match the
used data carrier type.
DW#16#E1FE08xx Data carrier in the transfer range does not have the expected
UID.
DW#16#E1FE0Axx At least one section of the defined data carrier range is write
protected.
DW#16#E4FE01xx Supply of the read/write head was switched off because of the
increased current consumption, for example short circuit.
DW#16#E4FE8Axx The Ident Unit signals permanent CRC error on the RS485
cable. EMC problem?
DW#16#E4FE90xx The read/write head does not recognize a command sent via
GET.
DW#16#E6FE05xx The Ident Unit signals that only Write commands (Write-
Config) are permitted at this time.
DW#16#E7FE04xx RXBUF overflow (more data has been received than can be
saved in the RXBUF memory).
DW#16#E7FE06xx The index is outside the range 111/112 (101 to 108) and
therefore wrong.
DW#16#E7FE0Axx Error in the PIB during the determination of the data packet
size.
Note
Please ensure that the online connection to your control is not active. The "ONLINE"
mode at the bottom right of the window is not highlighted.
For this open the program PRG_PibCommands (PRG) in the file folder "Components". Here,
you may locate the default settings for the commands "Physical_ Read" page 5-23 and
"Physical_Write" page 5-24.
The "Start Byte Number" matches the "Start Address". Please pay attention to the following
paragraph when assignment is completed.
Figure 60:
Changing the
start byte
number
Starting at byte number 18 to byte number 63, the data carriers of type I-Code SL1 are
writable and readable.
The "Start byte number" is part of the command structure "Physical_ Read" page 5-23 and
"Physical_Write" page 5-24, and there it is designated as "Start Address".
The table describes the data structure of the data carriers:
TW-R16-B64
TW-R22-HT-B64
...
16 family code
17 application
identifier
Starting at byte number 0 to byte number 1999, the data carriers of type FRAM are writable
and readable.
The "Start byte number" is part of the command structure "Physical_ Read" page 5-23 and
"Physical_Write" page 5-24, and there it is designated as "Start Address".
The table describes the data structure of the data carriers:
TW-R20-K2
TW-R30-K2
TW-R50-K2
TW-R50-90-HT-K2
...
Modbus-TCP master
The following description is based on the prerequisite that an initial startup of the BL ident ®
system was completed with the programming software CoDeSys from the company "3S".
The previous chapter contains instructions.
Installation of the interface with BLxx-2RFID-A-modules
The following paragraphs describe the procedural method for the transfer of 1 byte Tag-data:
from the Receive-buffer of the PIB function block to a Modbus-TCP-master of a HMI-PLC.
from a Modbus-TCP-master of a HMI-PLC to the Transmit-buffer of the PIB function
block.
Variable names for the Modbus-TCP-register
After startup of the BL ident ®-system, open the tab Resources with the programming
software CoDeSys and select the array "PLC Configuration".
Note
Please ensure that the online connection to your control is not active. The mode
“ONLINE” at the bottom right of the window is not highlighted.
In the middle of the window of the control configuration you may open the tab for the
configuration of the Modbus-TCP-registers by double-clicking on "Modbus-Registers
[SLOT]". Open the tab Input/Output.
Under "Input Modules" select an "Input Register", and under "Output Modules" an "Output
Register".
Now assign the variable names to both selected registers in the middle window:
Double-click on "AT %IW2:WORD" to open the input field and enter "I_Register_0".
Double-click on "AT %QW2:WORD" to open the input field and enter "O_Register_0".
Figure 61:
Modbus-TCP-
register
Modbus-TCP-register
Figure 62:
Entries for the
new component
Open the newly created component Modbus_Comm. This new component is to execute the
following tasks:
Data of the register "I_Register_0" is to be transferred to the Send-buffer CH_0_TXREF.
Data of the Receive-buffer CH_0_RXREF is to be transferred to register "O_Register_0".
Send-buffer CH_0_TXREF and Receive-buffer CH_0_RXREF are "byte" type arrays and
belong to the global variables of the PIB-component ("The function block PIB_001KB" page
3-9).
Modbus-TCP-registers are "Word" type registers. The functions WORD_TO_BYTE and
BYTE_TO_WORD adopt the appropriate format.
Take the instructions in the following diagram:
Figure 63:
Instruction text
Now select "Project > Build". In case of a typing error, you will receive an error message in
the subjacent message field.
In the opened main program PLC_PRG (PRG), you will receive a new component (alternatively
with drag and drop via ) via insert > box. Add it next to the component PIB_001KB. The
component will receive a sequential number and by default, "AND" is assigned to it.
Check "AND". The input mask for the component is opened via the shortcut "F2". Select
"User defined Programs" from the list in the left space of the window. Check the
"Modbus_Comm" program defined above and acknowledge with OK.
Figure 64:
Inserting the
new component
Modbus_Comm
into the master
program
PLC_PRG.
In the Online mode (Online > Login or ) download the expanded program into the
programmable gateway and start it ( )!
Configuration of the Modbus-TCP-interface in the control software
Open the visualization software "Galileo" and if need be, create a new project. In the first step
you are asked to select the type of your control from the list:
Figure 65:
Device type of
the control
In the second step select the PLC-type. Via the button "Add" the window "Select PLC "
opens. Open the pull-down menu for type, select "Modbus TCP" and acknowledge with OK.
Figure 66:
PLC selection
On the tab "Firm / Model" you may indicate, next to other configurations, the IP-address of
your gateway "BL67-PG-EN" (here: 192.168.1.1 "Setting of the IP-addresses for Ethernet
communication" page 3-6). The port number of the Modbus-TCP-port is 502, the "Address
Offset" is "0".
Figure 67:
Configuration of
the Modbus-
connection
to
to
to
etc.
Please refer to the user manual BL67-PG-EN (D301032) for an overview of all Modbus-TCP-
register ranges.
Double-click on O_Register0 to open the tab Variable Definitions for this variable. Open the
tab "Address" and enter the first address from the range of the output data "17408" (0x4400).
Double-click on I_Register0 to open the tab Variable Definitions for this variable. Open the tab
"Address" and enter the first address from the range of the input data "16384" (0x4400).
Figure 68:
Register-
address entry
If the value "46" is now mapped to the register I_Register0 (16384), this value is written into
the Transmit Buffer 1 via the newly created interface. With the next write command, this value
is written to a physically present Tag.
The value from the Receive -buffer 1 is transferred to Register O_Register0 (17408) via the
newly created interface.
Figure 69:
PLC_VISU with
1 byte data of
Register 17408
and 1 byte data
for Register
16384
Note
Please pay attention to the LED display on the gateway housing!
Communication via the newly created interface is only possible when the expanded
program runs on the gateway (RUN/STOP: green) and when Ethernet-
communication is active (LNK/ACT: not OFF). Please refer to the user manual
"BL67-PG-EN (D301033)" for the complete description of LED-diagnostics.
Note
Please ensure that the online connection to your control is not active. The mode
“ONLINE” at the bottom right of the window is not highlighted.
In the middle of the window of the control configuration you may open the tab for configuring
the Modbus-TCP-registers by double-clicking "Modbus-Registers [SLOT]". Open the tab
"Input/Output".
Under "Input Modules" select an "Input Register", and under "Output Modules" an "Output
Register".
Now assign the variable names to both selected registers in the middle window:
Double-click on "AT %IW2:WORD" to open the input field and enter "I_Register_0".
Double-click on "AT %QW2:WORD" to open the input field and enter "O_Register_0".
Figure 70:
Modbus-TCP-
register
Modbus-TCP-register
Program expansion
Open the tab POUs, select the main PLC_PRG (PRG) and expand it as described below:
Right-click on "POUs" and select "Add Object...". Accept the entries in the following diagram:
Figure 71:
Entries for a
new component
Open the newly created component Modbus_Comm. This new component is to execute the
following tasks:
Data of the register "I_Register_0" is to be transferred to the variable "WRITE_Data1_0".
The description "WRITE_Data1_0" was selected here for Byte 4 of the process output data
("Process output data" page 3-46).
The data of the variable READ_Data1_0 are to be transferred to the register
"O_Register_0". The description "WRITE_Data1_0" was selected here for Byte 4 of the
process input data ("Process input data" page 3-43).
The variables READ_Data1_0 and WRITE_Data1_0 are "byte" type variables and belong to the
global variables.
Modbus-TCP-registers are "Word" type registers. The functions WORD_TO_BYTE and
BYTE_TO_WORD adopt the appropriate format.
Accept the instructions in the following diagram:
Figure 72:
Instruction text
Now select "Project > Build". In case of a typing error, you will receive an error message in
the subjacent message field.
In the opened master program PLC_PRG (PRG) you will receive a new range after "Insert
> Network (after)". Insert a new component here with "Insert > Box". By default, "AND" is
assigned to the component.
Check "AND". The input mask for the component is opened via the shortcut "F2". Select
"User defined Programs" from the list in the left space of the window. Check the
"Modbus_Comm" program defined above and acknowledge with OK.
Figure 73:
Inserting the
new component
Modbus_Comm
into the master
program
PLC_PRG.
In the Online mode (Online > Login or ) download the expanded program into the
programmable gateway and start it ( )!
Configuration of the Modbus-TCP-interface in the control software
Open the visualization software "Galileo" and if need be, create a new project. In the first step
you are asked to select the type of your control from the list:
Figure 74:
Device type of
the control
In the second step select the PLC-type. Via the button "Add", the window "Select PLC "
opens. Open the pull-down menu for type, select "Modbus TCP" and acknowledge with OK.
Figure 75:
PLC selection
On the tab "Firm / Model" you may indicate, next to other configurations, the IP-address of
your gateway "BL67-PG-EN" (here: 192.168.1.1 "Setting of the IP-addresses for Ethernet
communication" page 3-6). The port number of the Modbus-TCP-port is 502, the "Address
Offset" is "0".
Figure 76:
Configuration of
the Modbus-
connection
to
to
to
etc.
Please refer to the user manual BL67-PG-EN (D301033) for an overview of all Modbus-TCP-
register ranges.
Double-click on O_Register0 to open the tab Variable Definitions for this variable. Open the
tab "Address" and enter the first address from the range of the output data "17408" (0x4400).
Double-click on I_Register0 to open the tab Variable Definitions for this variable. Open the tab
"Address" and enter the first address from the range of the input data "16384" (0x4400).
Figure 77:
Register-
address entry
If the value "46" is now mapped to the register I_Register0 (16384), this value is written into
the variable WRITE_Data_10 via the newly created interface. With the next write command,
this value is written to a physically present tag.
The value of the variable READ_Data1_0 is transferred to the register O_Register0 (17408) via
the newly created interface.
Note
Please pay attention to the LED display on the gateway housing!
Communication via the newly created interface is only possible when the expanded
program runs on the gateway (RUN/STOP: green) and when Ethernet-
communication is active (LNK/ACT: not OFF). Please refer to the user manual
"BL67-PG-EN (D301033)" for the complete description of LED-diagnoses.
The following description is based on the prerequisite that an initial startup of the BL ident ®
system was completed with the programming software CoDeSys from the company "3S".
The previous Kapitel 3 provides instructions for this purpose.
Installation of the interface with BLxx-2RFID-A-modules
The following paragraphs describe the procedural method for transferring 1 byte Tag-data:
from the Receive-buffer of the PIB function block to a PROFIBUS-DP-master of a SIMATIC
S7/-300 control.
from a PROFIBUS-DP-master of a SIMATIC S7/-300 control into the Transmit-buffer of the
PIB function block.
Variable names for the PROFIBUS-DP I/Os
After startup of the BL ident ®-system, open the tab Resources with the programming
software CoDeSys and select the array "PLC Configuration".
Note
Please ensure that the online connection to your control is not active. The mode
“ONLINE” at the bottom right of the window is not highlighted.
Figure 78:
"RotaryMode"
Ethernet-
address and
PROFIBUS-DP-
address
together via
rotary switch
Figure 79:
PROFIBUS-DP
inputs/outputs
Input word
Output word
Program expansion
Open the tab POUs, select the main PLC_PRG (PRG) and expand it as described below:
Right-click on component "Add Object..." and make a selection. Accept the entries of the
following diagram:
Figure 80:
Entries for a
new component
Open the newly created Profibus_Comm. This new component is to execute the following
tasks:
The first byte of the input word “I_Word0” is to be transferred to the first byte of the Send-
buffer CH_0_TXREF.
The first byte of the Receive-buffer CH_0_RXREF is to be transferred to the first byte of the
output word O_Word0.
Send-buffer CH_0_TXREF and Receive-buffer CH_0_RXREF are "byte" type arrays and
belong to the global variables of the PIB-component ("The function block PIB_001KB" page
3-9).
The functions WORD_TO_BYTE and BYTE_TO_WORD adopt the appropriate format.
Accept the instructions in the following diagram:
Figure 81:
Instruction text
for
Profibus_Comm
(PRG)
Now select "Project > Build". In case of a typing error, you will receive an error message in
the subjacent message field.
In the opened master program PLC_PRG (PRG), you will receive > a new component via Insert
Component (alternatively also via drag and drop ). Add it next to the component
PIB_001KB. The component will receive a sequential number and by default, "AND" is
assigned to it.
Check "AND". The input mask for the component is opened via the shortcut "F2". Select
"User defined Programs" from the list in the left space of the window. Check the program
"Profibus_Comm" defined above and acknowledge with OK.
Figure 82:
Inserting the
new component
Profibus_Comm
into the master
program
PLC_PRG
In the Online mode (Online > Login or ) download the expanded program into the
programmable gateway and start it ( )!
Figure 83:
Selection
"Input Word"
and
"Output Word"
Figure 84:
Accessing the
variables "Input
Word" and
"Output Word"
Activate the online connection to your control (PLC > Connect to > Direct CPU) to read the
status values and load the control variables. The mode "RUN" is displayed highlighted in
green in the right bottom of the window.
Note
Please pay attention to the LED display on the gateway housing!
Communication via the newly created interface is only possible when the expanded
program runs on the gateway (RUN/STOP: green) and when the PROFIBUS-DP-
communication is not being interfered with (DP: green). Please refer to the user
manual BL67-programmable Gateway BL67-PG-DP (D301047) for the complete
description of the LED diagnoses.
Note
Please ensure that the online connection to your control is not active. The mode
"ONLINE" at the right bottom of the window is not highlighted.
Figure 85:
"RotaryMode"
Ethernet-
address and
PROFIBUS-DP-
address
together via
rotary switch
Figure 86:
PROFIBUS-DP
inputs/outputs
Input word
Output word
Program expansion
Open the tab POUs, select the main PLC_PRG (PRG) and expand it as described below:
Right-click on component "Add Object..." and make a selection. Accept the entries in the
following diagram:
Figure 87:
Entries for a
new component
Open the newly created component Profibus_Comm. This new component is to execute the
following tasks:
The first byte of the input word "I_Word0" is to be transferred to the byte
"WRITE_Data1_0" of the process output data. The description "WRITE_Data1_0" was
selected here for Byte 4 of the process output data ("Process output data" page 3-46).
The byte "READ_Data1_0" of the process input data is to be transferred to the first byte of
the Output Word "O_Word0". The name "READ_Data1_0" was selected here for Byte 4 of
the process input data ("Process input data" page 3-43).
The variables "READ_Data1_0" and "WRITE_Data1_0" are "byte" type variables and belong
to the global variables.
The functions "WORD_TO_BYTE" and "BYTE_TO_WORD" adopt the appropriate format.
Accept the instructions in the following diagram:
Figure 88:
Instruction text
for
Profibus_Comm
(PRG)
Now select "Project > Build". In case of a typing error, you will receive an error message in
the subjacent message field.
In the open master program PLC_PRG (PRG), the new component "Profibus_Comm"
may be inserted into the master program via "Insert > Function Block".
Figure 89:
Inserting the
new component
Profibus_Comm
into the master
program
PLC_PRG
In the Online mode (Online > Login or ) download the expanded program into the
programmable gateway and start it ( )!
Figure 90:
Selection
"Input Word"
and
"Output Word"
Figure 91:
Accessing the
variables "Input
Word" and
"Output Word"
Activate the online connection to your control (PLC > Connect to > Direct CPU) to read
the status values and load the control variables. The mode "RUN" is displayed highlighted in
green in the right bottom of the window.
Note
Please pay attention to the LED display on the gateway housing!
Communication via the newly created interface is only possible when the expanded
program runs on the gateway (RUN/STOP: green) and when the PROFIBUS-DP-
communication is not being interfered with (DP: green). Please refer to the user
manual "BL67-programmable Gateway BL67-PG-DP" (D301047) for the complete
description of the LED diagnostics.
EtherNet/IP master
The following description is based on the prerequisite that an initial startup of the BL ident ®
system was completed with the programming software CoDeSys from the company "3S".
The previous Kapitel 3 provides instructions for this purpose.
Installation of the interface with BLxx-2RFID-A-modules
The following paragraphs describe the process for transferring 1 byte Tag-data:
from the Receive-buffer of the PIB function component to the EtherNet/IP master
CompactLogix™ (Allen-Bradley, CPU L35E).
from the EtherNet/IP-master CompactLogix™ (Allen-Bradley, CPU L35E) to the Transmit-
buffer of the PIB function component.
Variable names for the EtherNet/IP-registers
After startup of the BL ident ®-system, open the tab Resources with the programming
software CoDeSys and select the array "PLC Configuration".
Note
Please ensure that the online connection to your control is not active. The mode
"ONLINE" at the right bottom of the window is not highlighted.
Figure 92:
EtherNet/IP
register
EtherNet/IP register
Program expansion
Open the tab POUs, select the main PLC_PRG (PRG) and expand it as described below:
Right-click on component "Add Object..." and make a selection. Accept the entries in the
following diagram:
Figure 93:
Entries for a
new component
Open the newly created component "Ethernet_IP_Comm". This new component is to execute
the following tasks:
Data of the register "I_Register_0" is to be transferred to the Send-buffer CH_0_TXREF.
Data of the Receive-buffer CH_0_RXREF is to be transferred to the register O_Register_0.
Send-buffer CH_0_TXREF and Received buffer CH_0_RXREF are "byte" type arrays and
belong to the global variables of the PIB-component ("The function block PIB_001KB" page
3-9).
Modbus-TCP-registers are "Word" type registers. The functions "WORD_TO_BYTE" and
"BYTE_TO_WORD" adopt the appropriate format.
Accept the instructions in the following diagram:
Figure 94:
Instruction text
Now select "Project > Build". In case of a typing error, you will receive an error message in
the subjacent message field.
In the opened master program "PLC_PRG (PRG)", you will receive a new component via
insert > box (alternatively with drag and drop via ). Add it next to the component
"PIB_001KB". The component will receive a sequential number and by default, "AND" is
assigned to it.
Check "AND". The input mask for the component is opened via the shortcut "F2". Select
"User defined Programs" from the list in the left space of the window. Check the program
"Ethernet_IP_Comm" defined above and acknowledge with OK.
Figure 95:
Inserting the
new component
"Ethernet_IP_
Comm" into the
master program
"PLC_PRG"
In the Online mode (Online > Login or ) download the expanded program into the
programmable gateway and start it ( )!
Figure 96:
Configuration of
the “BL67-PG-
EN-IP” gateway
Figure 97:
Controller Tags
The data from O.Data[1] is transmitted to the Transmit-buffer 1 of the function component
PIB_001KB via the newly created interface:
Figure 98:
Display of the
CoDeSys
In this example, the Receive-buffer 1 contains the value “99”. This value is transferred to
I.Data[1] via the newly created interface. I.Data [0] is reserved for the “Status Word” of the
gateway.
Figure 99:
Input data of the
control
Note
Please ensure that the online connection to your control is not active. The mode
"ONLINE" at the right bottom of the window is not highlighted.
In the middle of the window of the control configuration double-click on "EtherNet/IP Words
[SLOT]" to open the tab for configuration of the EtherNet/IP-register. Open the tab Input/
Output.
Under "Input Modules" select an "Input Word", and under "Output Modules" an "Output
Word".
Now assign the variable names to both selected registers in the middle window:
Double-click on "AT %IW2:WORD" to open the input field and enter "I_Register_0".
Double-click on "AT %QW2:WORD" to open the input field and enter "O_Register_0".
Figure 100:
EtherNet/IP
register
EtherNet/IP-register
Program expansion
Open the tab POUs, select the main PLC_PRG (PRG) and expand it as described below:
Right-click on component "Add Object..." and make a selection. Accept the entries in the
following diagram:
Figure 101:
Entries for a
new component
Open the newly created Ethernet_IP_Comm POU. This new component is to execute the
following tasks:
The first byte of the input register "I_Register_0" is to be transferred to the byte
"WRITE_Data1_0" of the process output data. The description "WRITE_Data1_0" was
selected here for Byte 4 of the process output data ("Process output data" page 3-46).
The byte "READ_Data1_0" of the process input data is to be transferred to the first byte of
the output register O_Register_0. The description "READ_Data1_0" was selected here for
Byte 4 of the process input data ("Process input data" page 3-43).
The variables "READ_Data1_0" and "WRITE_Data1_0" are "byte" type variables and belong
to the global variables.
The functions "WORD_TO_BYTE" and "BYTE_TO_WORD" adopt the appropriate format.
Figure 102:
Instruction text
Now select "Project > Build". In case of a typing error, you will receive an error message in
the subjacent message field.
In the open master program PLC_PRG (PRG), the new component may be inserted into the
master program via "Insert > Function Block". The new component is in the array "User
defined Programs".
Figure 103:
Inserting the
new component
EtherNet_IP_
Comm into the
master program
PLC_PRG
In the Online mode (Online > Login or ) download the expanded program into the
programmable gateway and start it ( )!
Figure 104:
Configuration of
the “BL67-PG-
EN-IP” gateway
Figure 105:
Controller Tags
Figure 106:
Input data of the
control
1 General
TURCK publishes this excerpt of the PROFIBUS Specification „Profile for Identification
Systems, Proxy Ident Function Block“ (Version 1.02, December 2005) by courtesy of the PNO
(PROFIBUS Nutzer Organisation).
The PIB for CoDeSys is based on this specification.
Please also note the "Definitions in the command and diagnostics level" page 2-25.
1.6 Function demands
In this section the function demands of the application of RFID and Barcode reader systems
is defined. These demands define the limitations or limits which have to be observed with the
development of the PIB and the functions which have to be realised within the field device.
The RFID and barcode reader systems demands are described in parallel because of the
different functions.
1.6.1 General demands
The basic concept involves the adaptation of existing RFID and barcode reader systems to
Profibus technology, so that it can be integrated into existing systems, and to make sure that
use in new systems can be simplified (see following illustration).
IEC 61131-3
acyclic: file transfer
PIB Interrogator/ TAG
Barcode reader
cyclic: control and status word
Buffer
Application
program
(not modified)
TAG
As the existing proprietary solutions have to be mastered, there are certain limitations which
have to be considered in addition to the Profibus conformity.
The following demands must be fulfilled:
Existing Profibus systems may only be minimally affected by the integration of RFID and
barcode reader systems
The control is implemented cyclically
The data transfer is acyclic
Application programs should be independent of the integration of the PIB
Fragmentation and defragmentation of data packages should occur within the PIB
Figure 108:
Relevant Application Interrogator AIR Interface RF Tag
standardisation decoder tag physical memory
activities logical
encoder memory
map
application
commands tag driver commands
command/ and
response unit mapping
application rules responses
responses
logical
memory Note: the logical memory map
in the tag physical memory is
given by the tag architecture and
the mapping rules in the tag driver.
All the information in the logical
data protocol physical memory is represented in the
processor interrogator logical memory map
The topics concerning this specification do not need to be dealt with here as the process is
ongoing. It will be possible to refer to the respective documents at a later stage when the
standardisation to IEC is completed. For this reason the following points are not examined in
this document:
Air interface
File format,
File handler,
Coding of application data.
At the moment the respective data is normally considered as a data package, which is
interpreted both by the application in the Ident device as well as by the PLC application, which
uses the PIB (see illustration below).
Figure: 109
Air interface
Data transfer
IEC 61131-3
exchange of data containers
PIB
logical
Figure: 110
Use of Comm- Proxy FB
FB and Proxy- One Proxy FB
FB_Field Device Control Proxy FB
FB for PIB represents a
modelling DevID field device
METHOD
WRREC
data_m1 result_m1
data_m2 result_m2
Comm FB
inside a
Proxy FB
RDREC
Local Instance Data
2.3 Representation
The interface for the POU type is represented by text and graphics compliant to IEC 61131-3.
The behaviour of the POU is represented as a graphic state diagram with tables for the
transitions and actions.
This section defines the specification of the Proxy Ident Block according to the guidelines set
out in [4].
NOTE: If several PIB instances are operated simultaneously by an application program, it is
necessary to ensure that the individual instances do not inhibit each other. Block definition
The following illustration is a graphic representation of the PIB interface:
Figure 111:
Graphic DONE BOOL
representation BOOL EXECUTE ERROR BOOL
RDREC
of the PIB DWORD ID ID STATUS STATUS DWORD
interface INT INDEX
WRREC
INT OFFSET ID STATUS WARNING BOOL
BOOL RPTCMD BUSY BOOL
SETIO_PART
BOOL SRESET ID STATUS
BOOL INIT RPTACT BOOL
GETIO_PART
BOOL UOUT0 ERR_IREQ BOOL
ID STATUS
BOOL UOUT1 TPC BOOL
BOOL UOUT2 TP BOOL
BOOL UOUT3 UIN0 BOOL
BOOL RDGATE UIN1 BOOL
PIB
INT CMDDM UIN2 BOOL
INT CMDSEL UIN3 BOOL
ARRAY[1..10] CMDREF CMDREF ARRAY[1..10]
Para
of CMD_STRUCT of CMD_STRUCT
INT TXBUFLEN
INT TXSTART
ARRAY[1..N] TXREF TXREF ARRAY[1..N]
Data
of BYTE of BYTE
INT RXBUFLEN TRLEN INT
INT RXSTART
ARRAY[1..N] RXREF RXREF ARRAY[1..N]
Data
of BYTE of BYTE
3.1.1 Parameters
PIB parameter
description
EXECUTE By setting the input parameters from the types BOOL to TRUE the user
(application program) can start an FB instance. Before the FB can be put
into operation the command and the corresponding parameters must be
written into memory, which is assigned to the CMDREF parameter. The
CMDSEL parameter must be set correctly for this purpose. This parameter
is set using a positive edge.
ID* The value of this input parameter is used as a unique ID for addressing of
an individual device or a slot within a device. A detailed description of this
is contained in document [4]. This parameter addresses an individual Ident
device in conjunction with the "INDEX" parameter.
INDEX* The value of this input parameter is used for identifying an individual Ident
channel within a slot on a device. The use of the parameter corresponds
with the definition of the address parameter "Index" according to [1] and [2].
OFFSET* The value of this input parameter is used for identifying the I/O data
assigned to the channel, which is cyclically transferred as a subset of the
data that is assigned to a slot (module).
RPTCMD* If this parameter is set to "1", the Ident device will repeat the currently
executed command or the subsequently completed command. The
parameter is mirrored on the "Repeat_Command" bit in the cyclic control
word (see section 4.2.1)
SRESET* If this input parameter = "1", the command currently being executed in the
Ident device is cancelled. The parameter is mirrored on the "Soft_Reset" in
the cyclic control word (see section 4.2.1). This parameter is activated using
a positive edge.
INIT* With a change from "0" to "1" this input parameter forces the Ident device
to start operation with the exception of the communication interface.
Processes which are executed locally by the Ident device are
manufacturer-specific. The parameter is mirrored on the Init bit in the cyclic
control word (see section 4.2.1). After the sequence "lnit_Active=0 ->
lnit_Active=1 lnit_Active=0" (cyclic Status word) has been completed, the
PIB must send a Write-Config command to the Ident device. This
parameter is set using a positive edge.
UOUT0* This parameter of type BOOL represents the user-specific bit 0 which is to
be transmitted within the cyclic control word (see section 4.2.1). The
parameter is mirrored on bit 0 of the cyclic control word.
UOUT1* This parameter of type BOOL represents the user-specific bit 1 which is to
be transmitted within the cyclic control word (see section 4.2.1). The
parameter is mirrored on bit 1 of the cyclic control word.
UOUT2* This parameter of type BOOL represents the user-specific bit 2 which is to
be transmitted within the cyclic control word (see section 4.2.1). The
parameter is mirrored on bit 2 of the cyclic control word.
UOUT3* This parameter of type BOOL represents the user-specific bit 3 which is to
be transmitted within the cyclic control word (see section 4.2.1). The
parameter is mirrored on bit 3 of the cyclic control word.
RDGATE* This parameter of type BOOL represents the optional bit 8 which is to be
transmitted within the cyclic control word (see section 4.2.1). The operation
starts if this bit is set to "1".
CMDREF* These In_Out parameters refer to a global memory range, which is used for
storage of commands and the associated parameters. The maximum
number of commands which are assigned to an individual PIB instance
may not exceed 10. Section 3.1.3 describes the commands which are
supported by the profile version.
TXBUFLEN* These input parameters determine the number of bytes which are used by
this PIB instance for storing transmit data. The number of bytes are
counted by the TXSTART parameter defined position within the memory
range. For reasons of consistency it is recommended that these
parameters should not be changed after the installation of the PIB.
TXSTART* The input parameter TXSTART defines the relative position of the "TXBUF"
defined by the "TXREF" within the global memory range. This location is the
start of the memory range which is assigned to the PIB instance. For
reasons of consistency it is recommended that these parameters should
not be changed after instantiation of the PIB.
TXREF* These In_Out parameters refer to a global memory range which is used by
several PIB modules. The PIB instance may share the memory with other
modules.
RXBUFLEN* These input parameters determine the number of bytes which are used by
this PIB instance for storing receive data. The number of bytes are counted
by the RXSTART parameter defined position within the memory range. For
reasons of consistency it is recommended that these parameters should
not be changed after instantiation of the PIB.
RXSTART* The input parameter RXSTART defines the relative position of the "RXBUF"
defined by the "RXREF" within the global memory range. This location is
the start of the memory range which is assigned to the PIB instance. For
reasons of consistency it is recommended that these parameters should
not be changed after instantiation of the PIB.
RXREF* These In_Out parameters refer to a global memory range which is used by
several PIB modules. The PIB instance may share the memory with other
modules.
TRLEN This output parameter indicates the number of the user bytes last sent
(depending on the command sent or received), after the command has
been successfully implemented. The number of transferred bytes from the
position (TXSTART + OffsetBuffer) or (RXSTART + OffsetBuffer) is counted.
DONE This output parameter is set to "TRUE" if a command with a positive result
is executed. The user program can query this flag during the time that the
command is being executed and before the transmitted data is computed.
ERROR This output parameter is set to "TRUE" if a fault has been detected. The
detected error can be locally (within the host control) or decentrally (within
the Ident device). More detailed information about the error are defined in
the "STATUS" parameter. This flag is set internally by the PIB in the
acknowledgement telegram (Bit 0 of Cl) depending on the error bit. After a
renewed call of a command the flag is reset to "FALSE".
WARNING This output parameter is set to "TRUE" if a warning has been detected. The
detected warning can be locally (within the host control) or decentrally
(within the Ident device). More detailed information about the warning is
defined in the "STATUS" parameter. This flag is internally set by the PIB
depending on the warn bit in the acknowledgement telegram (Bit 1..7 of Cl:
one or more bits are set to 1). After a renewed call of a command the flag
is reset to "FALSE".
Note: In case of a WARNING all user data assigned to a command are
transmitted correctly (if ERROR is not set). In this case the data buffer
receives valid values.
STATUS The output parameter "STATUS" provides detailed error information and/or
warning information about the last command, which has been implemented
with a negative result or a warning. The value is retained until the next time
a warning or an error occurs. The coding depends on the possible source
of the respective warning or error message.
BUSY If this output parameter is set to "TRUE" the PIB is “busy”. A command
cannot be transferred for execution (exceptions: "INIT" and "SRESET").
The parameter indicates that the PIB is still in operation.
RPTACT If this output parameter is set to "TRUE", the PIB* has accepted the
requirement to repeat the command currently being implemented. The
cyclic input data is mirrored by the bit "Repeat_Command_Active". The
output parameters remain active as long as the bit is set within the cyclic
telegram. As long as the output parameter is set, the PIB* provides data
after an executed command. The user is in a position to read the result of
the command.
ERR_REQ This output parameter is set to "TRUE" if the PIB* has detected a fatal error.
It is mirrored by the Error_Flag of the cyclic input data. The output
parameters remain active as long as the bit is set within the cyclic telegram.
The PIB remains in the current state (state machine). If this parameter is set
to "TRUE" the user must set the INIT input parameter of the PIB POU or
trigger a Dev-Status command (if possible).
UINO This output parameter of type BOOL represents the user-specific bit 0
which is to be transmitted within the cyclic status word (see section 4.2.2).
UIN1 This output parameter of type BOOL represents the user-specific bit 1
which is to be transmitted within the cyclic status word (see section 4.2.2).
UIN2 This output parameter of type BOOL represents the user-specific bit 2
which is to be transmitted within the cyclic status word (see section 4.2.2).
UIN3 This output parameter of type BOOL represents the user-specific bit 3
which is to be transmitted within the cyclic status word (see section 4.2.2).
TP This output parameter is set to "1" if a target is within the Ident device
range. The parameter corresponds with the "Target_Present" bit of the
cyclic status word (see section 4.2.2). It is reset if there is not target within
the Ident device range. If an Ident device does not support this feature, the
parameter is set to "0". This parameter is not used for barcode readers.
TPC This output parameter is set to "1" if a new target is within the Ident device
range. The parameter corresponds with the "Target_Presence_Changed"
bit of the cyclic status word (see section 4.2.2). It is reset to "0" after the
next "Inventory" command has been completed successfully. If an Ident
device does not support this property the parameter is set to "0". This
parameter is not used for barcode readers.
*The application program has the task of resetting and changing all input parameters.
TXREF ARRAY c
[1..N]of
BYTE
RXREF ARRAY N c
[1..N]of
BYTE
Figure 112:
Data type
definitions of
the PIB
command:
Note
In the first case there are only very few alternative reactions which are dependent
on the respective error message. Detailer error information is barely used.
As other function blocks (Comm-FBs) and functions are embedded in the PIB, the parameter
STATUS provides status information from several sources.
The STATUS parameter can also be used for warning information.
As an alternative to the use of STATUS parameters error and warning information can be
transmitted within the diagnostics data (see section 4.4).
The STATUS output of type DWORD is interpreted as a packed array consisting of four bytes
as shown in the following table.
The definition of the byte Function_Num is based on (IEC 61158_6, Part 6; 1999) and expands
the supplements realised in (PROFIBUS Communication and Proxy Function Blocks acc. to
IEC 61131-3 Vers. 1,2). It us used to group errors and warnings.
1 3 0/1 0 Manufacturer-
specific coding of
Error_Code_1 and
Error_Code_2
1 3 0/1 1 Error_Code_1
provides error
information
concerning the Tag/
transponder/barcode
Manufacturer-
specific coding of
Error_Code_2
1 3 0/1 2 Error_Code_1
provides error
information about the
air interface
Manufacturer-
specific coding of
Error_Code_2
1 3 0/1 3 Error_Code_1
provides error
information about the
file system
Manufacturer-
specific coding of
Error_Code_2
1 3 0/1 4 Error_Code_1
provides error
information about the
Ident device
(Transponder/
Barcode reader)
Manufacturer-
specific coding of
Error_Code_2
1 3 0/1 5 Error_Code_1
provides error
information
concerning
communication
between the PIB and
Ident device (with the
exception of DP
errors)
Manufacturer-
specific coding of
Error_Code_2
1 3 0/1 6 Error_Code_1
provides command-
specific error
information
Manufacturer-
specific coding of
Error_Code_2
1 3 0/1 7 Error_Code_1
provides error
information which is
internally generated
by the PIB
Manufacturer-
specific coding of
Error_Code_2
Error_Code_1 provides the number which represents the error or warning. The byte
Error_Decode is defined on 0xFE in the following table.
1 3 IG Address or command o
does not correspond with
the Tag properties
(memory size) (reported
by Ident device)
1 6 IG Unformatted Tag o
1 128..255 IG Manufacturer-specific o
2 1 IG Communication timeout o
on the air interface
(reported by the Ident
device)
2 128..255 IG Manufacturer-specific o
3 4 IG Create command; no o
directory entries available,
(reported by Ident device)
3 128..255 IG Manufacturer-specific o
4 128..255 IG Manufacturer-specific o
5 1 IG Incorrect sequence c
number (SN) reported by
Ident device
5 128..255 IG Manufacturer-specific o
6 1 IG Invalid CMD c
6 3 IG Invalid command o
parameters (e.g. data
area) reported by Ident
device.
6 4 IG Incorrect synchronization o
between user program
and Tag. An expected
command is missing.
(Object detection error)
6 5 IG Only Write-Config is c
permissible in this state
(reported by Ident device)
6 128..255 IG Manufacturer-specific o
3.1.3 Commands
In this section commands are described which are supported by the PIB POU and their
respective parameters. The following limitations apply for the use of commands:
The cyclic control process has precedence over acyclically transmitted commands
"INIT" and "SRESET" interrupt the execution of a command within the Ident device
After transmission of a cyclic control telegram (INIT, SRESET) the continuous change of
the "DONE" parameter relates to the cyclic control telegram and not to the INIT or SRESET
interrupted command
"INIT" resets the communication (cyclic control flow and status flow, cyclic commands)
between the PIB and the Ident device. For this procedure the "Init" is first of all transmitted
within the cyclic control word. After reset of the "lnit_Active" bit in the status word a "Write-
Config" command is triggered and sent to the Ident device. For this the user must provide
"Write-Config" parameters within the command range before the "INIT" command is
requested. (see section 4.2.3)
The "Write-Config" command resets all functions in the Ident device with the exception of
the communication
The "SRESET" command ends the last command
Description of
the PIB
commands
Get Manufacturer-specific data are read into the Ident device with this
command. Hereby the TXBUF range is used as a manufacturer-
specific memory range for the parameter data (optional transmission
data). Received data are stored in the RXBUF area from the start of
the range. The parameter TRLEN of the PIB POU indicates the number
of received bytes.
VAR
CMD : BYTE := 0x62; (* b *)
END_VAR
Parameter Description
Physical_ The data is read from a transponder which are defined via a physical
Read start address and the length of the data to be read with this command.
The parameter TRLEN of the PIB POU indicates the number of
received bytes.
VAR
CMD : BYTE := 0x70; (* p *)
END_VAR
Parameter Description
VAR
CMD : BYTE := 0x71; (* q *)
END VAR
Parameter Description
Next With this command the procedures are ended with a transponder. The
Next command is executed when the next transponder is detected/
signalled.
VAR
CMD : BYTE := 0x6E; (* n *)
END VAR
Parameter Description
Write Config The operation of the Ident device is modified with this service. The
communication will continue. Herewith new parameters can be sent
to the Ident device (ConfigData). A reset can also be triggered with it
where the Ident device is requested to restart operation. TXBUF is
used as the manufacturer-specific area for configuration data, as
configuration data (Config data) are manufacturer-specific.
Normally the Write-Config command is automatically implemented by
the PIB during the INIT phase. The Write Config command can be
started optionally with EXECUTE.
Config is forcibly supported:
Config = 1
Config is optionally supported:
Config = 2 or Config = 3
VAR
CMD : BYTE := 0x78; (* x *)
END VAR
Parameter Description
Read Config With this service the configuration data are read from the Ident device.
RXBUF is used as the manufacturer-specific area for configuration
data, as configuration data (Config data) are manufacturer-specific.
The parameter TRLEN of the PIB POU indicates the number of
received bytes.
VAR
CMD : BYTE := 0x61; (* a *)
END VAR
Parameter Description
Mem Status With this service the status of a Tag (battery state, memory size,
available capacity) are read. The RXBUF is used as the manufacturer-
specific area for status data, as the status data is manufacturer-
specific. The parameter TRLEN of the PIB indicates the number of
received bytes.
VAR
CMD : BYTE := 0x73; (* s *)
END VAR
Parameter Description
Dev Status The status of an Ident device is read with this service. The RXBUF is
used for status data as the manufacturer-specific area, as the status
data is manufacturer-specific. The parameter TRLEN of the PIB POU
indicates the number of received bytes.
VAR
CMD : BYTE := 0x74; (* t *)
END VAR
Parameter Description
Inventory This command is used in order to request a list of all UIDs which can
be contacted within the antenna beam. The possibility for
manufacturer-specific additional information is provided. The RXBUF
has the following structure.
The following example indicates the structure of the file to be sent and
should not be used as structured text in the PLC program. In the
example 5 objects (ObjectNumber = 5) with ObjectLength = 16 are
transmitted.
VAR CONSTANT
ObjectNumber : INT := 5;
ObjectLength : INT := 16;
END_VAR
TYPE
UID_STRUCT
STRUCT
UID : ARRAY[1..8] OF BYTE;
Data : ARRAY[1.. (ObjectLength-8) ] OF
BYTE;
END STRUCT;
END_TYPE
TYPE
UidList: ARRAY[1..ObjectNumber] OF
UID _STRUCT;
END_TYPE
VAR
CMD : BYTE := 0x69; (* i *)
END VAR
Parameter Description
Parameter Description
The following table contains a list of the permissible "Implementation independent properties"
of the PIB. A manufacturer who declares conformity with this PNO specification, must provide
a list of all compliant properties of the supported PIB in this tabular format.
The following tables contain a listing of the communication relevant properties of the Ident
device, which are relevant for this profile specification. The manufacturer of an Ident device,
which communicates via a PIB instance, must provide a list of all compliant properties of the
supported Ident device in this tabular format.
MaxPacketSize Max.
supported
size of the
Ident PDU
This annex contains information about defined data types which are used in the profile
specification.
INT Integer (the value range for variables of this data IEC 61131-3
type ranges from - (216-1) to (216-1)-1.)
DINT Double integers (the value range for variables of IEC 61131-3
this data type ranges from - (232-1) to (232-1)-1.)
CMD_ TYPE
STRUCT CMD STRUCT
STRUCT
CMD : BYTE;
Config : BYTE;
OffsetBuffer : INT;
UID : ARRAY[1..8] OF BYTE;
FileName : ARRAY[1..8] OF BYTE;
Offset : DINT;
Length : INT;
StartAddress : DINT;
Attributes : BYTE;
NextMode : BYTE;
Timeout : INT;
ObjectNumber : INT;
FileType : Word;
END STRUCT;
END TYPE
DIRELEMENTS_ TYPE
STRUCT DIRELEMENTS_STRUCT
STRUCT
FileName : ARRAY[1..8] OF BYTE;
UsedLength : DINT;
Attributes : BYTE;
FileLength : DINT;
FileType : WORD
END STRUCT;
END_TYPE
TYPE
DIRLIST_ STRUCT
STRUCT
UID1 : ARRAY[1..8] OF BYTE;
TagName : ARRAY[1..8] OF BYTE;
FreeUserMem : DINT;
Checksum : WORD
FileCount : INT;
FileList : ARRAY[1..FileCount] of
DIRELEMENTS_STRUCT;
END STRUCT;
END TYPE
TYPE
ObjectLength : INT;
END_TYPE
TYPE
UID STRUCT
STRUCT
UID : ARRAY[1..8] OF BYTE;
Data : ARRAY[1..(ObjectLength-8)] OF
BYTE;
END_STRUCT;
END_TYPE
TYPE
ObjectNumber : INT;
END TYPE
TYPE
UldList: ARRAY[1..ObjectNumber] OF
UID_STRUCT;
END TYPE
The coding of a UID is defined as follows in the Technical Report ISO/IEC /TR 15963,
Automatic identification - Radio Frequency Identification for item management - Unique
identification for RF tags, Annex A:
MSB LSB
Table 65: AC value Class UID issuer Size of the Registration body
Registration identifier size serial no. (the "UID issuer
Registration
Number")
000xxxxx INCITS 256 per ANS per ANS ANSI ASC INCITS
INCITS 256 INCITS 256 T6
B Bus
Bus system for data exchange between hardware components (for example, CPU, memory, and I/O-level). A bus
may consist of several parallel cables for data transfer (addressing, control, and power supply).
Bus system
The sum of all units that communicate with each other via a bus.
C Configuration
Systematic arrangement of the I/O-modules of a station.
CPU
English abbr. for "Central Processing Unit". Central unit for data processing, the core piece of a processor.
D DIN
Abbr. for "German Institute for Engineering Standards".
Distribution
Distribution involves all activities concerning the transfer of goods between economic entities.
DP-Master Class 1
The automation system (PLC) which mainly completes cyclic data processing. The „DPV1“-functions may be used
additionally/optionally.
(also DPM1/DPC1).
DP-Master Class 2
Exclusively acyclic demand data are transferred. This data transfer may be implemented with the help of an
engineering tool (PC user program), for example.
DPV1
Expanding functions for PROFIBUS-DP. In addition to the cyclic process data, demand data may be transferred
with the help of acyclic communication functions. In regards to time, the acyclic services are processed in parallel
and in addition to the cyclic process data transfer, they are processed as low priority.
E Earth electrode
One or more components that have direct and good contact with the earth.
EMC
Electromagnetic compatibility (EMC) identifies the generally desireable state in which technical devices are not
interfering with each other based on unintentional electric or electromagnetic effects.
Ethernet
Data network technology for local data networks (LANs).
F Fieldbus
Data network on the sensor/actuator level. A fieldbus connects the devices on the field level with the control unit.
Characteristic for a fieldbus is high transfer safety and real time behavior.
Function Code
Are part of the data telegram with Modbus. Amongst others contain read/write commands of input, or rather output
data.
G Ground
Expression in electrical engineering for conductive earth of which its electrical potential equals zero at each point.
In the environment of grounding equipment the electrical potential of the earth can be other than zero, and in this
case one refers to "common ground reference potential".
to ground
Connection of an electrically conductive component with the earth electrode via a piece of grounding equipment.
H Hexadecimal
Numerical system with the basis 16. The count is from 0 to 9 and continues with the letters A, B, C, D, E and F.
LI IEC 61131
IEC 61131 is an international standard which treats the basics of programmable controllers.
IP - International Protection
The protection class (IP) identifies the suitability of electrical operating devices (for example, devices, installation
material) in regards to different ambient conditions, also the protection of people against potential dangers when
the electric operating devices are being used.
IP protocol
Abbr: for Internet Protocol, protocol for the packet-oriented and connectionless transport of data packets from a
sender to a receiver across multiple networks.
K
L Logistics
Logistics involves the teachings of comprehensive planning, control, execution, allocation, optimization and
control of processes for the movement from one location to another of goods, data, energy and persons as well as
the needed means of transport.
LSB
Abbr. "Least Significant Bit". Bit with the lowest place value.
M Modbus-TCP
TCP/IP packets are used to transfer data with Modbus-TCP.
The Modbus communicates with the help of function codes which are integrated into the data telegram. Modbus-
TCP utilizes the transport control protocol (TCP) for the transfer of the Modbus application protocol for the data
transfer in Ethernet-TCP/IP networks.
Mode
Operating mode
MSB
Abbr: "Most Significant Bit". Bit with the highest place value.
N Network mask
The usable address range of a network is defined by the network mask. A network mask is exactly as long as the
IP-address for which it is used. The binary display of the network mask "0" contains changeable ranges of the IP-
address. Set ranges are "1".
P PIB
Abbr. for "Proxy Ident Function Block". This function block represents an Ident-system in the control. Thus a
common programming interface exists for the actual application.
PLC
Abbr. for Programmable Logic Controller.
Pulk capture
Simultaneous, unequivocal recognition of multiple RFID data carriers which are directed around a read/write head
(transceiver).
R Read/write head
The Read/write head (also Read/write device) creates an electromagnetic high-frequency field. This is how data is
transferred and the data carrier (transponder) is supplied with power. The data is displayed with the help of
modulation of the electromagnetic field.
RFID
Radio frequency identification
RFID technology
This technology allows a non-contact transfer of data. The data is transferred on the basis of radio frequency
technology. A „Transponder” Seite 6-3is used as a data carrier.
S Station
A function unit or assembly consisting of multiple components.
T Tag
RFID-tags are small transponders in an application suitable enclosure, for example, sticker, chip card, tag.
TCP
English abbr. for "Transmission Control Protocol", connection-oriented transport protocol. Certain error
identification mechanisms (for example, acknowledgements of telegrams, time monitoring of telegrams) can
guarantee a safe and error free data transfer.
TCP/IP
(Transmission Control Protocol/Internet Protocol) is a family of network protocols also called "Internet Protocol"
because of its significance for the internet.
Transceiver
Sender and receiver combination
The RFID technology uses transceivers in form of so-called "Readers". These devices send a signal first which the
transponder (for example, RFID-tag) acknowledges by sending a response which in turn is received by the
transceiver and sent to a (computer) system for further processing.
Transponder
(Transmitter + Responder)
response sending device A transponder consists of a microchip (with a unique identification number), a send/
receive antenna and a housing. The data is transferred between the reading device and the transponder via
electromagnetic waves.
Transponder technology
(also „RFID technology” Seite 6-3)
UID
English abbr. "Unique Identifier". The UID is a unique serial number for transponders. As an address, it refers to
the data that corresponds to the transponder or rather the tagged product. This data can be stored in a database,
for example.
D101640 0109