Uploaded by Islombek Maqsudov

SICK RFU6XX PNDP V2 1 TIA EN

advertisement
Technical information
SICK
RFU6xx function block
SICK RFU6xx PNDP function block for
Siemens S7-1200 / S7-1500 controls
(TIA-Portal V12+SP1 or higher)
Technical information
RFU6xx PNDP
FB (TIA-Portal)
Table of contents
1 Version history ................................................................................................................. 3
2 About this document........................................................................................................ 4
2.1 Purpose of this document ............................................................................................ 4
2.2 Target audience ........................................................................................................... 4
3 General information ......................................................................................................... 5
4 Hardware configuration ................................................................................................... 6
4.1 Supported PLC controls ............................................................................................... 6
4.2 Supported fieldbus gateways/sensors .......................................................................... 6
4.3 Configuration in the TIA portal...................................................................................... 6
5 Module description........................................................................................................... 8
5.1 Module specifications ................................................................................................... 8
5.2 Operating principle ....................................................................................................... 9
5.3 Response to faults ......................................................................................................10
5.4 Timing .........................................................................................................................10
5.5 Value transfer .............................................................................................................11
5.5.1 Communication ....................................................................................................11
5.5.2 Single-TAG Mode: SOPAS object trigger control ..................................................14
5.5.3 Single-TAG Mode: SOPAS output format .............................................................14
5.5.4 Read TAG ............................................................................................................16
5.5.5 Write TAG ............................................................................................................17
5.5.6 Set Device Password ...........................................................................................18
5.5.7 Set TAG Password ...............................................................................................18
5.5.8 Lock TAG .............................................................................................................19
5.5.9 Kill TAG ................................................................................................................20
5.5.10 Communication test ............................................................................................20
5.5.11 Free command ...................................................................................................20
5.5.12 Reading result ....................................................................................................20
5.6 Receiving reading results > 200 bytes ........................................................................21
6 Parameter.........................................................................................................................22
7 Error codes ......................................................................................................................26
8 Examples .........................................................................................................................31
8.1 Reading transponder content ......................................................................................32
8.2 Writing TAG content ....................................................................................................34
Page 2
RFU6xx PNDP
FB (TIA-Portal)
Technical information
1 Version history
Bundle
Version
V1.0
V1.1
V1.2
Date
Description
21.02.2014
07.08.2014
30.03.2015
Initial version
Rising edge detection (R_TRIG block calls removed)
Output format (Mode 1):
- Can be used optionally without a [STX]/[ETX] framing
- Using an ‘x’ instead of a ‘X’ is also possible
Changing the data type of the mode parameter from Boolean to
unsigned short integer.
0 = Single-TAG mode
1 = Multi-TAG mode (hexadecimal)
2 = Multi-TAG mode (ASCII)
- Adding TAG access/kill functions
- Rename “Mode” structure to “Communication”
- Moving the retry and antenna parameters into the Communication structure
- Increasing the number of data that could be read to 64Words
(128Bytes)
- New example program added
- Provide libraries for TIA12+SP1, TIA13+SP1 and TIA14
V1.3
21.04.2015
V2.0
26.5.2015
V2.1
18.10.2017
No library changes
Page 3
Technical information
RFU6xx PNDP
FB (TIA-Portal)
2 About this document
Please read these chapters carefully before you begin working with these operating instructions and the SICK RFU6xx function block.
2.1 Purpose of this document
These instructions describe how to use the SICK_RFU6xx_PNDP function block. They are
used to guide technical personnel working for the machine manufacturer/operator in project
planning and commissioning the function block.
2.2 Target audience
These operating instructions are aimed at specialist personnel such as technicians and engineers.
Page 4
RFU6xx PNDP
FB (TIA-Portal)
Technical information
3 General information
The SICK_RFU6xx_PNDP function block is used to facilitate communication between a Siemens S7-1200 / S7-1500 control and a SICK RFU6xx RFID interrogator.
The following figure shows how the function block is represented in the function block diagram (FBD) view.
Figure 1: Representation of function block in FBD
Functionality of the function block:
-
i
ii
Send a software trigger via the PLC
Receive telegrams sent by the device which can be configured in the SOPASi output
format (reading results)
Read and write transponder content (Single TAG/Multi-TAG mode)
Write the UII/EPC bank using internal retries
Set a TAG-Access / Kill-TAG password on the device
Set a TAG-Access / Kill-TAG password on the TAG
Lock/Unlock TAG regions
Kill TAG permanently
Execute a communication test
Communication via freely selectable device commands (SICK CoLaii protocol)
Address devices in a SICK CAN bus network
SOPAS is an engineering tool used for configuring SICK sensors.
The Command Language (CoLa) is an internal SICK protocol for communicating with SOPAS devices.
Page 5
Technical information
RFU6xx PNDP
FB (TIA-Portal)
4 Hardware configuration
4.1 Supported PLC controls
The function block only supports S7-1200 and S7-1500 PLCs with an industrial Ethernet interface.
4.2 Supported fieldbus gateways/sensors
The SICK sensor communicates with the control via a fieldbus (PROFIBUS/PROFINET). If
the sensor does not directly support the PROFIBUS/PROFINET fieldbuses, gateway modules can be used.
The following gateways are supported by the function block:
CDM 425 (PROFINET), firmware version V3.31 or higher
CDF 600-2 (PROFIBUS and PROFINET)
CDF 600 (PROFIBUS), firmware version V1.15 or higher
CDM 420 including CMF400 PROFIBUS module, firmware version V1.100 or higher
4.3 Configuration in the TIA portal
The correct sensor or gateway must be configured in the hardware configuration of the TIAPortal before the function block can be used. In the first step, the correct generic station description file (GSD/GSDML) must be imported into the TIA-Portal.
The function block is specially designed for the handshake mode (HS). Only use modules
from the "Handshake (HS)" category, which are defined with a length between 8 and 128
bytes. The addresses used can be configured inside or outside of the I/O area. Addresses
are not permitted for use in peripheral ranges to which a partial process image and OB6x
connection (synchronous alarms) are assigned as in this case consistent data transmission
can no longer be achieved.
Page 6
Technical information
RFU6xx PNDP
FB (TIA-Portal)
Figure 2 shows an example configuration of the SICK RFU6xx RFID interrogator. The hardware identifications necessary for the function block are shown in the properties of the individual modules.
Figure 2: Hardware configuration
The size of the in/out modules indicates the amount of data which can be exchanged in one
fieldbus cycle. If a telegram is longer than the projected module, the data will be transmitted
fragmented over several PLC cycles (handshaking).
Page 7
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5 Module description
The SICK_RFU6xx_PNDP function block simplifies the use of the RFID interrogator on S71200 / S7-1500 controls. The module enables data exchange via a PROFIBUS/PROFINET
connection projected in the hardware configuration.
The module automatically fragments the data as soon as it cannot be transmitted / received
in one fieldbus cycle.
The function block is working asynchronously, which means the processing is done via various function block call ups. Therefore it is necessary that the function block is called up cyclically in the user program.
The RFU FB encapsulates the SICK_CCOM_PNDP, which facilitates communication between the PLC and the sensor. The SICK_GetValue / SICK_SetValue functions are used
internally to interpret/create the device telegrams.
5.1 Module specifications
Module name:
Version:
Supported PLCs:
Modules used:
PLC data types used:
Optimized module access:
Module call:
Global variables used:
Language used for module creation:
SICK_RFU6xx_PNDP
2.0
S7-1200
S7-1500
DPRD_DAT
DPWR_DAT
MOVE_BLK
TON_TIME
SICK_CCOM_PNDP
SICK_GetValue
SICK_SetValue
ST_SICK_RFU6xx
yes
cyclical
none
S7-SCL
Page 8
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5.2 Operating principle
The following communication parameters must be specified before the RFU module can be
used:
#HWInputIdent: Hardware identification of the projected input module. The identifier can be
defined during the hardware configuration (see Figure 2).
#HWInputLength: Byte length for the projected input module (see Figure 2).
#HWOutputIdent: Hardware identification for the projected output module. The identifier can
be defined during the hardware configuration (see Figure 2).
#HWOutputLength: Byte length for the projected output module (see Figure 2).
#Data: The function block requires an instance of PLC data type ST_SICK_RFU6xx. This
data type describes input and output parameter values for the individual block functions. The
ST_SICK_RFU6xx variable must be stored in a data block in order to use the data type. Afterwards it must be connected to the function block.
To carry out a module block action (#TriggerOn, #ReadTag etc.), the desired function must
first be selected first. Only one function can be carried out at a the same time. The #Req parameter must be triggered with a rising edge (signal change from logic zero to one) in order
to carry out the function. As long as no valid response has been received, the #ReqBusy
parameter is used to signal this.
The FB signals the #ReqDone = TRUE output parameter when the function has been successfully completed. If data was requested from the device during this function (e.g. #ReadTag), this data is copied to the relevant data structure of the data type ST_SICK_RFU6xx
(#Data).
Data sent via trigger command (#TriggerOn, #TriggerOff) or directly by the device (e.g. direct
trigger via a photoelectric sensor) is stored in the data structure (ReadingResult.arrResult).
The #RdDone output parameter indicates that new data has been received for a PLC cycle.
The data sent by the device can be changed or adapted in SOPAS output format (see Figure
6).
Page 9
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5.3 Response to faults
If the function block has an incorrect input value or faulty input circuit, an error bit (#Error) is
set and an error code (#Errorcode) is output. In this case, no further processing is carried
out. The parameters (#Error, #Errorcode) of the function block retain their value until a new
command is started.
5.4 Timing
Figure 3: Timing diagram
1: Trigger the #Req input by rising edge. The desired function (#TriggerOn in this case) must
be selected at the same time/in advance. Only one function is permitted for selection at the
same time; otherwise an error (#Error) will terminate the function.
2: When the command has been sent and the response is received, the function is terminated with #ReqDone. If an error occurred during the function, the function is terminated with
#Error. The parameter #Errorcode contains the error code that occurred if the function is
terminated with #Error.
Page 10
RFU6xx PNDP
FB (TIA-Portal)
Technical information
5.5 Value transfer
The PLC data type ST_SICK_RFU6xx contains all input and output parameter values of the
supported function block actions. The data structure has a fixed definition and may not be
modified except for the last entry "ReadingResult.arrResult" (see chapter 5.6: Receiving
reading results > 200 bytes).
Figure 4: ST_SICK_RFU6xx PLC data type
5.5.1 Communication
The RFU can only communicate with one transponder at the same time. For this reason,
read, write and lock commands are always addressed. The function block used the UII
(Unique Item Identifier) to identify the transponder.
The FB supports three different modes in order to determine which transponder UII is to be
communicated with:
iMode = 0 (Single-TAG mode):
The system always communicates with the transponder which is currently in the reading
field. This mode can only be used when precisely one TAG is located within the field. Special
configuration of the output format of the RFU with SOPAS (see chapter’s 0 and 5.5.3) is required for this mode. If the single TAG mode is active, a trigger is automatically activated to
read the UII and the antenna with the best signal strength (RSSI).
Page 11
Technical information
RFU6xx PNDP
FB (TIA-Portal)
iMode = 1 (Multi-TAG mode [Hexadecimal-Formatted]):
A user defined transponder UII is used for purposes of communication. The UII-String must
be entered in a hexadecimal representation (e.g. ‘1234ABCD’). The antenna to be used must
be indicated in the respective read/write parameters.
iMode = 2 (Multi-TAG mode [ASCII-Formatted]):
A user defined transponder UII is used for purposes of communication. The UII-String must
be entered in an ASCII representation (e.g. “This is my TAG”). The antenna to be used must
be indicated in the respective read/write parameters.
Parameter
Communication.iMode
Declaration
Input
Data type
USINT
Description
Addressing mode
0:
1:
Communication.iAntenna
Mask
In/Out
USINT
Single-TAG mode active
Multi-TAG mode active (hexadecimal
formatted UII)
2: Multi-TAG mode active (ASCII formatted UII)
Antenna selection for current command.
A1 = antenna 1 (internal/external,
depending on device type)
A2 = antenna 2 (external)
A3 = antenna 3 (external)
A4 = antenna 4 (external)
Value
1
2
4
8
A4
A3
A2
A1
X
X
X
X
In the Single-TAG mode, the antenna is
selected automatically (antenna with the
best signal strength).
With firmware >= V1.50 it is possible to use
multiple antennas with one single command.
For example:
iAntennaMask = 16#03 (Antenna 1+2)
iAntennaMask = 16#0F (All antennas)
Valid value range:
[1…15]
Page 12
Technical information
Parameter
Communication.iRetry
Declaration
In/Out
RFU6xx PNDP
FB (TIA-Portal)
Data type
USINT
Description
Number of read/write attempts to be carried
out.
Valid value range:
LowNibble (retries on one channel)
16#[0..7]
HighNibble (retries on different channels)
16#[0..5]
In the Single-TAG mode, the retry value
is set by default to 16#32.
Communication.sUII
In/Out
String[120]
Example:
iRetry:= 16#32 executes 3 changes of the
channel (4 channels) with 2 retries per
channel in each case (3 repetitions), i.e. a
total of 4x3= 12 attempts.
Transponder Identification (UII)
If no UII is indicated (empty string), the respective read/write command will be carried
out unaddressed.
The UII is automatically determined in
the Single-TAG mode and does not have
to be indicated.
Communication.arrRSSI
Output
Array [1..4]
of SInt
Example:
‘DEF011111234ABCD’
Outputs the RSSI value (reception strength)
of the transponder in the reading field (only
on the Single-TAG mode).
[1] = RSSI value from antenna 1 (internal)
[2] = RSSI value from antenna 2 (external)
[3] = RSSI value from antenna 3 (external)
[4] = RSSI value from antenna 4 (external)
Table 1: Mode parameter
Page 13
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5.5.2 Single-TAG Mode: SOPAS object trigger control
The object trigger control settings define the reading gate settings. The sensor sends a reading result to the PLC control after each reading gate (open/close). The FB uses this mechanism in order to read out the UII, the PC word and RSSI values from the corresponding transponder in the Single-TAG mode.
The SOPAS settings under the menu Parameter  Reading configuration  Object trigger
control must be defined, that the trigger window is opened via a "command" and closed
again when a "Good Read" result is received or after a defined period of time (1000ms in this
case).
Figure 5: Trigger setting (SOPAS)
5.5.3 Single-TAG Mode: SOPAS output format
The output format defines the content of the telegram that is sent by the device as soon as
the trigger window is closed. This telegram is evaluated by the PLC and the information for
address-specific read/write processes for TAG content is read. The SOPAS output format
must be structured as shown in Figure 6 in order to use the function block in the Single-TAG
mode.
Figure 6: SOPAS output format
Page 14
RFU6xx PNDP
FB (TIA-Portal)
Technical information
Please ensured that the format of the blocks "RSAVG1...4" are set to hexadecimal format
(double-click the respective block). The "PCUII" block may not be changed.
Figure 7: Settings for RSSI blocks (RSAVG1...4)
Depending on the number of TAGs located in the receiving range of the RFU and the configured RSSI threshold, the following ASCII telegrams are sent by the device:
Case 1: One TAG in field
[STX]01;[RSSI Antenna 1] [RSSI Antenna 2] [RSSI Antenna 3] [RSSI Antenna 4]
[PC+UII][ETX]
Case 2: More than one TAG in field
[STX]0X[ETX]
Case 3: No TAGs in field
[STX]00[ETX]
Page 15
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5.5.4 Read TAG
The “ReadTag” function is used to read a defined data area of a TAG. This function can only
be applied to one TAG. The selected mode determines which transponder the system communicates with (see chapter 5.5.1).
The following parameters must be set in the "ReadTag" structure before executing this block
function.
Parameter
Declaration Data type
Description
ReadTag.
Input
USInt
Selection of the memory bank from which
iBank
data is to be read.
ReadTag.
iStartWord
ReadTag.
iWordCount
Input
UInt
0 = Reserved
1 = UII/EPC
2 = TID
3 = User memory
First word (16 bits) to be read.
Input
UInt
Number of words (16 bits) to be read.
ReadTag.
iDataLength
Output
UInt
ReadTag.
arrData
Output
Array
[1..128] of
Byte
Valid value range:
[1..64]
Valid length of read content in bytes. Required in order to define which content of
the array "ReadTag.arrData" is valid.
Content of read data.
Table 2: Read TAG parameter
Page 16
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5.5.5 Write TAG
The "WriteTag" function is used to write values to a defined data area of a TAG. This function
can only be applied to one TAG. The selected mode determines which transponder the system communicates with (see chapter 5.5.1).
The following parameters must be set in the "WriteTag" structure before executing this block
function.
Parameter
Declaration Data type
Description
This parameter is only relevant if the UII
WriteTag.
Input
USInt
is to be written (Bank 1).
iTIDWordCount
The TID is automatically read once a writing
command is placed on the UII. It is necessary to indicate the length of the TID. Transponders of the same type have the same
TID lengths.
Advantage:
It is possible to use the internal retries for
the command. In case of a write error it
could happen that only a part of the UII is
changed, so addressing is not possible anymore (inconsistent UII).
Example:
WriteTag.iTIDWordCount:= 2
If no TID should be used when writing the
UII, the parameter must be set to zero
(WriteTag.iTIDWordCount:= 0).
Advantage:
It reduces the TAG access time because
the TID doesn’t need to be read.
WriteTag.
iBank
WriteTag.
iStartWord
Input
Input
USInt
UInt
Valid value range:
[0..16]
Selection of the memory bank to be written
to.
0 = Reserved
1 = UII/EPC
2 = TID (cannot be described)
3 = User memory
First word (16 bits) to be written.
Page 17
RFU6xx PNDP
FB (TIA-Portal)
Technical information
Parameter
WriteTag.
iWordCount
WriteTag.
arrData
Declaration
Input
Data type
UInt
Input
Array [1..64]
of byte
Description
Number of words (16 bits) to be written.
Valid value range:
[1..32]
Data to be written to the selected TAG area. The length is defined by the iWordCount parameter.
Table 3: Write TAG parameter
5.5.6 Set Device Password
This function is used to set a password for a TAG-Access / Kill-TAG on the device (RFU)
side. Only when the password of the device and the TAG is matched, a TAG access is possible.
The following parameters must be set in the "SetDevicePwd" structure before executing this
block function.
Parameter
Declaration Data type
Description
SetDevicePwd Input
USInt
Type selection
.iType
0 = Set a device access password
1= Set a transponder kill password
SetDevicePwd
.sPassword
Input
String[8]
Valid value range:
[0..1]
Password
This string must have exactly 8 characters.
Only characters with the values [0..9 - A..F]
are valid.
To remove the password from the device,
use the value ’00000000’
Table 4: Set device password parameter
5.5.7 Set TAG Password
This function is used to set a password for a TAG-Access / Kill-TAG on the transponder side.
Only when the password of the device and the TAG is matched, a TAG access is possible.
The selected mode determines which transponder the system communicates with (see chapter 5.5.1).
The following parameters must be set in the "SetTagPwd" structure before executing this
block function.
Parameter
Declaration Data type
Description
SetTagPwd
Input
USInt
Mode selection
.iType
0 = Set a device access password
1= Set a transponder kill password
Valid value range:
[0..1]
Page 18
RFU6xx PNDP
FB (TIA-Portal)
Technical information
Parameter
SetTagPwd
.sPassword
Declaration
Input
Data type
String[8]
Description
Password
This string must have exactly 8 characters.
Only characters with the values [0..9 - A..F]
are valid.
To remove the password from the transponder, use the value ’00000000’
Table 5: Set TAG password parameter
5.5.8 Lock TAG
This function is used to lock/unlock TAG region temporarily or permanently. The #iDataParameters defines the region of the TAG which should be locked / unlocked. The selected
mode determines which transponder the system communicates with (see chapter 5.5.1).
The following parameters must be set in the "LockTag" structure before executing this block
function.
Parameter
Declaration Data type
Description
LockTag.
Input
USInt
This value defines which TAG regions
iDataParameshould be locked / unlocked.
ter
Parameter values see
Valid value range:
[1..32]
Table 6: LockTag parameter
Value
Memory bank
1
UII
2
UII
3
UM
4
UM
5
TAG access password
6
TAG access password
7
TAG kill password
8
TAG kill password
9
UII+UM
10
UII+UM
11
UII+TAG access password
12
UII+TAG access password
13
14
UII+TAG access password+TAG
kill password
UII+TAG access password+TAG
kill password
15
All memory banks
16
All memory banks
Table 8: Lock parameter
Action
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Lock
temporary
Lock
permanent
Value
Memory bank
17
UII
18
UII
19
UM
20
UM
21
TAG access password
22
TAG access password
23
TAG kill password
24
TAG kill password
25
UII+UM
26
UII+UM
27
UII+TAG access password
28
UII+TAG access password
29
30
UII+TAG access password+TAG kill password
UII+TAG access password+TAG kill password
31
All memory banks
32
All memory banks
Action
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Unlock
temporary
Unlock
permanent
Table 7: Unlock parameter
Page 19
RFU6xx PNDP
FB (TIA-Portal)
Technical information
5.5.9 Kill TAG
This function is used to kill the whole transponder. After this function the TAG is permanently
destroyed. The selected mode determines which transponder the system communicates with
(see chapter 5.5.1).
5.5.10 Communication test
This function performs a communication test between the PLC and the RFU.
5.5.11 Free command
The free command is used to communicate with the SICK sensor via a valid device command (CoLa protocol). To be used for this purpose, the command must be stored in the
string "sCommand" of the "FreeCommand" structure. The commands can be obtained from
the device description or the SOPAS engineering tool.
Parameter
Declaration Data type Description
FreeCommand.
Input
String
Freely selectable CoLa command (for
sCommand
[100]
commands, see device documentation).
FreeCommand.
Output
String
Answer received from the CoLa telesResult
[100]
gram sent.
Table 9: Free command parameters
5.5.12 Reading result
The "ReadingResult.arrResult" array stores data that are sent per trigger command (#TriggerOn, #TriggerOff) or directly from the device (e.g. direct trigger via photoelectric sensor).
The output parameter #RdDone signals whether data were received.
Parameter
Declaration
Data type Description
ReadingResult.
Output
USInt
The receive counter is incremented by
iCounter
one as soon as a new reading result
is received.
ReadingResult.
iLength
ReadingResult.
arrResult
Output
UInt
Value range:
[0..255]
Byte length of received reading result.
Output
Array
[1..200]
of byte
Received response to a trigger signal
(can be defined via the SOPAS output
format).
The maximum length of the received
data is 200 bytes. Chapter 5.6 describes the procedure for receiving
longer data telegrams.
Table 10: Reading result parameters
Page 20
Technical information
RFU6xx PNDP
FB (TIA-Portal)
5.6 Receiving reading results > 200 bytes
The function block is designed to receive reading results up to a length of 200 bytes. If longer
data are to be handled, the function block must be changed at the points indicated below:
Change to the PLC data type (ST_SICK_RFU6xx):
In the PLC data type provided, the array size of the variable ReadingResult.arrResult must
be changed (to a maximum of 500 bytes).
Figure 8: Change to PLC data type
Change to the program code (SICK_RFU6xx_PNDP):
The newly defined array size for the reading result must be entered into the program code for
the SICK_RFU6xx_PNDP block.
Figure 9: Change to function block
After these changes, the amended PLC blocks must be re-compiled and transmitted to the
PLC.
Page 21
Technical information
RFU6xx PNDP
FB (TIA-Portal)
6 Parameter
Parameter
HWInputIdent
HWInputLength
HWOutputIdent
Declaration Data
type
Input
HW_IO
Input
Input
USInt
HW_IO
HWOutputLength
Input
USInt
CANId
Input
USInt
Description
Hardware identification for the projected input
module (see hardware configuration).
Only HS modules (handshake modules) with a
maximum length of 128 bytes may be used in
the hardware configuration.
Length of the input module used in the hardware configuration.
Valid value range: [8..128]
Hardware identification for the projected output
module (see hardware configuration).
Only HS modules (handshake modules) with a
maximum length of 128 bytes may be used in
the hardware configuration.
Length of the output module used in the hardware configuration.
Valid value range: [8..128]
CAN ID of the sensor to be addressed.
If no SICK CAN network is used, the
CAN ID = 0
TOut
Input
Time
The master and the multiplexer are always addressed with the CAN ID = 0 even if this is allocated another CAN ID.
Period of time, after a timeout error is occured.
If this parameter is not wired, the timeout period
is set to 5 seconds as a default.
Req
Input
Bool
Note that some commands require longer processing periods (e.g. storage commands).
Rising edge: Execute the selected block function.
Page 22
Technical information
Parameter
TriggerOn
RFU6xx PNDP
FB (TIA-Portal)
Declaration Data
type
Input
Bool
Description
Block function: Device trigger (open a reading
gate).
This function requires that the object trigger
control (SOPAS) for the opening of the reading
gate is set to "Command".
TriggerOff
Input
Bool
The result sent from the device (defined in the
SOPAS output format) is stored in the "ReadingResult.arrResult" variable (PLC data type:
ST_SICK_RFU6xx).
Block function: Device trigger (close a reading
gate).
This function requires that the object trigger
control (SOPAS) for the closing of the reading
gate is set to "command".
ReadTag
Input
Bool
The result sent from the device (defined in the
SOPAS output format) is stored in the "ReadingResult.arrResult" variable (PLC data type:
ST_SICK_RFU6xx).
Block action: Read TAG content.
This function requires that the parameters of
the "ReadTag" structure (PLC data type:
ST_SICK_RFU6xx) are assigned with valid
values (see chapter 5.5.4).
WriteTag
Input
Bool
The selected function block mode determines
which transponder is to be read (see chapter
5.5.1).
Module function: Write TAG content.
This function requires that the parameters of
the "WriteTag" structure (PLC data type:
ST_SICK_RFU6xx) are assigned valid values
(see chapter 5.5.5).
SetDevicePwd
Input
Bool
The selected function block mode determines
which transponder is to be written to (see chapter 5.5.1).
Module function: Set device password
This function requires that the parameters of
the "SetDevicePwd" structure (PLC data type:
ST_SICK_RFU6xx) are assigned valid values
(see chapter 5.5.5).
Page 23
Technical information
Parameter
SetTagPwd
RFU6xx PNDP
FB (TIA-Portal)
Declaration Data
type
Input
Bool
Description
Module function: Set TAG password
This function requires that the parameters of
the "SetTagPwd" structure (PLC data type:
ST_SICK_RFU6xx) are assigned valid values
(see chapter 5.5.5).
LockTag
Input
Bool
The selected function block mode determines
which transponder should be used (see chapter
5.5.1).
Module function: Lock / Unlock TAG
This function requires that the parameters of
the "LockTag" structure (PLC data type:
ST_SICK_RFU6xx) are assigned valid values
(see chapter 5.5.5).
KillTag
ComTest
FreeCommand
Input
Input
Input
Bool
The selected function block mode determines
which transponder should be used (see chapter
5.5.1).
Module function: Kill TAG
Bool
The selected function block mode determines
which transponder should be used (see chapter
5.5.1).
Module function: Communication test
Bool
#ReqDone= TRUE: communication OK
#ReqDone= FALSE: communication not OK
Module function: Free command (see chapter
5.5.6).
The command to be transferred is defined in
the variable "FreeCommand.sCommand" (PLC
data type: ST_SICK_RFU6xx).
Data
In/Out
After successful transfer (#ReqDone= TRUE),
the command response in the result string
"FreeCommand.sResult" is available.
ST_SICK The ST_SICK_RFU6xx-type variable required
_RFU6xx for configuring the block functions and storing
the Tag results.
This variable must be defined in a data block
and linked to the function block.
Page 24
Technical information
Parameter
RdDone
ReqDone
ReqBusy
Error
Error code
RFU6xx PNDP
FB (TIA-Portal)
Declaration Data
type
Output
Bool
Output
Output
Output
Output
Bool
Description
Rising edge: New reading result received
The reading result and the valid length are
stored in the structure "ReadingResult" (PLC
data type: ST_SICK_RFU6xx) (see chapter
5.5.12).
Indicates whether the selected block function
has been successfully completed.
Bool
Bool
TRUE: Successfully completed
FALSE: Not completed
Block function in progress.
Error bit:
DWord
FALSE: No error
TRUE: Aborted with error
Error status (see Error codes)
Table 11: Module parameters
Page 25
Technical information
RFU6xx PNDP
FB (TIA-Portal)
7 Error codes
The #Errorcode parameter contains the following error information:
- Error in the SICK_RFU6xx_PNDP function block
- Error in the SICK_CCOM_PNDP function block
- Error in the SICK_GetValue/SICK_SetValue functions
- Error in the Siemens functions DPRD_DAT/DPWR_DAT
- Error sent by the device
Error code
16#0000_0000
16#0000_0001
Brief description
No error
Timeout
(SICK_CCOM_PNDP)
16#0000_0002
Invalid module length (input)
16#0000_0003
Invalid module length (output)
16#XXXX_0004
DPWR_DAT error
16#XXXX_0005
16#0000_0006
16#0000_0009
16#XXXX_000A
16#XXXX_000F
DPRD_DAT error
Description
No error
The command could not be executed
within the defined timeout period.
Possible causes:
- Device is not connected to the PLC
- Device is not sending command responses (echo)
- Processing time of the command >
timeout period
- CAN bus station not present
The length of the input module projected
in the hardware configuration is not valid.
Valid module length: [8..128]
The length of the output module projected in the hardware configuration is not
valid.
Valid module length: [8..128]
Writing to the output module is not possible. Check the hardware identification
and the length of the output module.
XXXX: Error code for the Siemens function "DPWR_DAT" (see TIA portal information system).
Reading the input module is not possible. Check the hardware identification
and the length of the input module.
Communication error
XXXX: Error code for the Siemens function "DPRD_DAT" (see TIA portal information system).
Internal communication error
Reserved
Reserved
Page 26
Technical information
Error code
16#0000_0010
16#XXXX_0011
RFU6xx PNDP
FB (TIA-Portal)
Brief description
Timeout
(SICK_CCOM_PNDP)
Description
The command could not be executed
within the defined timeout period.
Device error
Possible causes:
- Device is not connected to the PLC
- Device is not sending command responses (echo)
- Processing time of the command >
timeout period
- CAN bus station not present
A device error occurred.
XXXX = This error is sent by the device
connected (see device documentation)
16#0001: Access denied
16#0002: Unknown index
16#0003: Unknown index
16#0004: Wrong condition
16#0005: Invalid data
16#0006: Unknown error
16#0007: Too many parameters
16#0008: Parameter missing
16#0009: Wrong parameter
16#000A: No write access
16#000B: Unknown command
16#000C: Unknown command
16#000D: Server busy
16#000E: Text string too long
16#000F: Unknown event
16#0010: Too many parameters
16#0011: Invalid character
16#0012: No message
16#0013: No answer
16#0014: Internal error
16#0015: Hub address: wrong
16#0016: Hub address: error
16#0017: Hub address: error
16#XXXX_0012
16#XXXX_0013
SICK_GetValue error
SICK_SetValue error
For a detailed description of the error,
see the device description.
Error interpreting the device command
received (internal FB error).
XXXX = Error code for the function
SICK_GetValue (see FB description).
The received device answer cannot be
interpreted (internal FB error).
XXXX = Error code for the function
SICK_SetValue (see FB description).
Page 27
Technical information
Error code
16#0000_0014
16#0000_0015
16#0000_0016
16#XXXX_0017
16#XXXX_001F
16#0000_0020
16#0000_0021
16#0000_0022
16#0000_0023
RFU6xx PNDP
FB (TIA-Portal)
Brief description
#CANId > 63
No block function selected,
or more than one block
function selected
Invalid command response
received
Reserved
FreeCommand.sCommand
> arrCommand (500 bytes)
Response to free command
> result string
(FreeCommand.sResult
[100 characters])
No TAG in field
There is more than one
TAG in the field or the
RSSImin evaluation condition has not been met.
Description
Invalid CAN ID
Valid value range:
[0..63]
Only one block function can be carried
out at the same time.
The selected block function was not carried out as the expected device response
did not correspond to the request sent.
This can have the following causes, depending on function:
- Incorrect trigger setting in the SOPAS
device configuration
- Device is not in "Run mode"
- Send/receive power insufficient
- Tag not long enough in field
- Access to a not-existent TAG range
(check iStartWord and iWordCount parameters)
- Selected antenna cannot access the
selected TAG (check iAntenna parameter).
- Invalid UII (check sUII mode)
- Signal strength too low
- The TAG region is locked
Reserved
Length of free command is invalid
Valid value range:
[1...100]
The response to the free command is
longer than 100 characters.
There are no TAGs in the receiving
range of the RFU. This error can only
occur in the Single-TAG mode.
This error can signify several different
things:
- There is more than one TAG in the
receiving range of the RFU.
- The evaluation condition RSSlmin is
not met (see SOPAS).
This error can only occur in the SingleTAG mode.
Page 28
Technical information
Error code
16#0000_0024
16#0000_0025
16#0000_0026
16#0000_0027
16#0000_0028
16#0000_0029
16#0000_002A
16#0000_002B
16#0000_002C
16#0000_002D
RFU6xx PNDP
FB (TIA-Portal)
Brief description
Invalid output format
Description
Invalid SOPAS output format. Check the
output format (see Chapter 5.5.3)
ReadTag.iBank > 3
This error can only occur in the SingleTAG mode.
Invalid bank (read TAG)
64 < ReadTag.
iWordCount < 1
Valid value range:
[0..3]
The function block can read a maximum
of 64 words (128 bytes) from the TAG.
Reserved
Reserved
WriteTag.iBank > 3
Valid value range
[1..64]
Reserved
Reserved
Invalid bank (write TAG)
32 < WriteTag.
iWordCount < 1
Valid value range:
[0..3]
The function block can write a max. of 32
words (64 bytes) to the TAG.
Invalid Retry
(Communication.iRetry)
15 < Communication.
iAntennaMask < 1
WriteTag.
iTIDWordCount > 16
Valid value range
[1..32]
Invalid retry parameter
Valid value range:
Low nibble = [0..7]
High nibble = [0..5]
Invalid antenna selection
Valid value range:
[1..15]
Invalid TID length (write UII/EPC bank).
This error can only occur if the UII is to
be described and the parameter iTIDWordCount is <> 0.
16#0000_002E
16#0000_002F
16#0000_0030
Selected UII > 240Bit (60
characters)
Reserved
Reserved
Valid value range:
[0..16]
Invalid length of selected UII.
This error can only occur in the SingleTAG mode.
Reserved
Reserved
Page 29
Technical information
Error code
16#0000_0031
16#0000_0032
16#0000_0033
16#0000_0034
RFU6xx PNDP
FB (TIA-Portal)
Brief description
Description
Invalid iType value
Invalid type parameter value.
(SetDevicePwd/SetTagPwd)
Valid value range:
[0..1]
Password length <> 8 char- The password for the TAG-Access / Killacters
TAG function must have exactly a length
of 8 characters.
32 < LockInvalid data parameter value
Tag.iDataParameter < 1
Valid value range:
[1..32]
Communication.iMode > 2
Invalid communication mode value.
#ReadingResult. Reading result > 200 bytes
iLength = -1
Valid value range:
[0..2]
The reading result received is longer
than 200 bytes.
See chapter 5.6 for information on how
to receive reading results > 200 bytes.
Table 12: Error codes
Page 30
Technical information
RFU6xx PNDP
FB (TIA-Portal)
8 Examples
Figure 10 shows an example wiring of the SICK_RFu6xx_PNDP function block in the OB1
program of the control. In the hardware configuration, a SICK RFU6xx interrogator is projected with a process data width of 128bytes input (hardware identification: 270) and 128 bytes
output (hardware identification: 271) (see Figure 2). The CAN ID is entered as null because
the RFU is not operated together with other devices on a CAN network.
In DB1 (SICK_RFU_Data), the variable "RFU" was stored as type ST_SICK_RFU6xx. This
structure of variables contains input and output parameters for the module functions supported.
Example program:
Figure 10: Program code (example)
Figure 11: Data block (example)
Page 31
Technical information
RFU6xx PNDP
FB (TIA-Portal)
8.1 Reading transponder content
First, it is necessary to select the transponder which should be used. If the value "Communication.iMode = 0", then the system will communicate with the transponder that is currently
located in the RFID sensor's reading range. Special configuration of the RFU in SOPAS-ET
(see chapters 0 and 5.5.3) is required for this mode.
Figure 12: Selection of communication mode
Then, it is necessary to define what content is to be read out of the transponder.
Bank:
Start word:
Word count:
3 (User memory)
0 (Start address)
3 (Read out three words)
Figure 13: Read TAG parameters
The reading function (#ReadTag) is executed as soon as the bit #Req is triggered with a rising edge.
Figure 14: Starting the block function (ReadTag)
The reading function is completed as soon as bit #ReqDone = TRUE. The parameter mode
sUII shows the UII of the selected transponder.
Page 32
Technical information
RFU6xx PNDP
FB (TIA-Portal)
The read TAG content is available in the data array "ReadTag.arrData" of the corresponding
data block. The "ReadTag.iDataLength" variable specifies how many bytes have been received and valid.
Figure 15: Read TAG content
Page 33
RFU6xx PNDP
FB (TIA-Portal)
Technical information
8.2 Writing TAG content
First, it is necessary to select the transponder which should be used. If the value "Communication.iMode = 1", then the system will communicate with the specified transponder.
Mode:
Antenna:
Retry:
UII:
1 (Multi-TAG mode (hexadecimal))
1 (Internal antenna)
16#32 (Internal retries: 4 channels with 3 repetitions = 12 attempts)
3005FB63AC1F3681EC880468
Figure 16: Specification of transponder UII
Subsequently, it is necessary to define what content is to be written to the TAG and where it
should be stored.
Bank:
Start word:
Word count:
TID word count:
Content to be written:
3 (User memory)
0 (Start address)
3 (Write three words)
0 (Is only required for writing the UII)
"112233" (6 ASCII characters = 3 words)
Figure 17: Write TAG parameters
The writing function (#WriteTag) is executed as soon as the bit #Req is triggered with a rising
edge.
Figure 18: Starting the block function (WriteTag)
The writing function is completed as soon as bit #ReqDone = TRUE.
Page 34
Download