You are on page 1of 89

www.pepperl-fuchs.

com
Start-up function block
IDENTControl IC-KP-Bxx
Standard function block TIA Portal
with SingleFrame protocol
Profinet and Profibus
Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 2
IC-KP-Bxx SingleFrame TIA Portal
This documentation is valid with the following specification:
• Siemens S7-1200/1500 SPS and TIA Portal V14
• Single Frame protocol
• Valid for the IP (125kHz) and IQ (13,56MHz) systems
• Valid for the system IU (868MHz) with configuration protocol mode “SingleFrame”
• IDENTControl IC-KP-B17-AIDA1 (Profinet)
• IDENTControl IC-KP-B6-V15B (Profibus)
• IDENTControl IC-KP-B6-2V15B (Profibus)
• IDENTControl IC-KP-B6-SUBD (Profibus)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 3


IC-KP-Bxx SingleFrame TIA Portal
Content download:
• Archived library for TIA V14
• Upgrade to newer versions of TIA (V15, V16) possible
• Archived example project for TIA V14
• Release history
• Documentation (ENG)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 4


IC-KP-Bxx SingleFrame TIA Portal
Content:
Open Library
Configuring PLC
Configuring IDENTControl
Transfer function block from library
Schematic representation of the program blocks
Example 1: Initialization
Example 2: Single Read Fixcode (UID)
Example 3: Single Read Words
Example 4: Single Write Words
Example 5: Enhanced Read Fixcode (UID)
Example 6: Enhanced Read Words
Example 7: Enhanced Write Words
Example 8: Quit
Example 9: Single Read Special Fixcode (EPC)
Example 10: Enhanced Read Special Fixcode (EPC)
Example 11: Single Program Special Fixcode (EPC)
Example 12: Special Command  Readout Transmitting power
Example 13: Special Command  Setting Transmission power

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 5


IC-KP-Bxx SingleFrame TIA Portal
Open library:

Retrieve library:
• Options  Global libraries  Retrieve library
• Select library archive (.zal14)
• Select destination directory

• Under “Master copies”, the library contains various elements for creating a program
• At least the function module "IC-KP-B17_SingleFrame" and the UDT "IC-KP-B17_SF_Data_UDT" must be
transferred to the project
• All other elements can also be created within the project and do not necessarily have to be taken from the
library
• The following documentation is based on the complete transfer of all elements from the library

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 6


IC-KP-Bxx SingleFrame TIA Portal
Open library:

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 7


IC-KP-Bxx SingleFrame TIA Portal
Create new project:

Create new PLC project:


• Create new project  Project name (IC-KP-B17_SF)  define memory path

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 8


IC-KP-Bxx SingleFrame TIA Portal
Configuring the controller (PLC):

Add PLC:
• Add new device  Controllers (PLC)
• Select suitable CPU from menu

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 9


IC-KP-Bxx SingleFrame TIA Portal
Configuring the controller (PLC):

Configuring controller:

• Add new sub net


• Subnet: PN/IE_1

• Define net parameter (IP-


Address and sub net mask) of
the PLC

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 10


IC-KP-Bxx SingleFrame TIA Portal
Configuring IDENTControl:
Configuring IDENTControl:

• GSDML file was previously


imported into the hardware catalog
• Other field devices  Profinet IO
 Ident Systems 
Pepperl+Fuchs GmbH 
Pepperl+Fuchs Ident
• Select module IC-KP-B17-AIDA1 2
PDEVs
• Insert module into network view

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 11


IC-KP-Bxx SingleFrame TIA Portal
Configuring IDENTControl:
Configuring IDENTControl:

• IDENTControl must be assigned to a


Profinet network
• Connect evaluation unit to the network
PN/IE_1

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 12


IC-KP-Bxx SingleFrame TIA Portal
Configuring IDENTControl:
Configuring IDENTControl:

• Evaluation unit is
connected to subnet
PN/IE_1
• Setting network
parameters (IP address
and subnet mask)
• Setting Profinet Name
• The Profinet name in the
hardware configuration
must be identical to the
Profinet name stored
within the device
• Check via website
IDENTControl or
assignment of Profinet
Name

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 13


IC-KP-Bxx SingleFrame TIA Portal
Configuring IDENTControl:

Configuring IDENTControl:

• Data Hold Time is a holding time for response telegrams from the evaluation unit in the process data
• The holding time should be at least as long as the cycle time of the PLC
• It is recommended to set twice the value of the cycle time
• Very large values lead to slower data transmission; too small values lead to telegram losses

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 14


IC-KP-Bxx SingleFrame TIA Portal
Configuring IDENTControl:
Configuring IDENTControl:

• Setting the telegram length


from the evaluation unit
• Assign the module "In/Out
64 Byte" from the hardware
catalog
• A telegram length of 64
bytes is recommended to
transfer a maximum amount
of data within one telegram
• HW identifier of the "In/Out
64 Byte" module must be
set as input parameter
"HWIO_Hardware_ID" on
the function block

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 15


IC-KP-Bxx SingleFrame TIA Portal
Transfer function block from library:
Transfer function block from
library to project:
• IC-KP-B17_SingleFrame
(FB803) must be inserted
into the user project
• Data blocks IC-KP-
B17_SF_DB (DB1) and
UserData (DB2) are
optional and can also be
generated
• IC-KP-B17_SF_DB =
Instance data block for IC-
KP-B17_SingleFrame
• UserData = Data block for
the user data

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 16


IC-KP-Bxx SingleFrame TIA Portal
Transfer UDT from library:
Transfer UDT from library to
project:
• Insert UDT into the user
project
• UDT for creating the data
block UserData
• Data structure for the user
data

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 17


IC-KP-Bxx SingleFrame TIA Portal
Transfer variable table from library:
Transfer VAT from library to
project:
• Variable table for controlling
the function block (FB_IOs)
and the user data
• Optional; can also be created

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 18


IC-KP-Bxx SingleFrame TIA Portal
Transfer PLC variable from library:
Transfer PLC variables
from library into project:
• Assigning flags as
auxiliary variables for
controlling the
function block
• Optional

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 19


IC-KP-Bxx SingleFrame TIA Portal
Include function block in OB1:

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 20


IC-KP-Bxx SingleFrame TIA Portal
Select instance data block:
Assignment of instance data block:

• IC-KP-B17_SF_DB is the
instance data block from the
library

Alternative:
• If you select IC-KP-
B17_SingleFrame_DB, the
instance data block is created
again

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 21


IC-KP-Bxx SingleFrame TIA Portal
Assign data block:

Assignment of data block “UserData”:


• The data block UserData must be assigned to the input
"HeadXData" using the UDT HeadX.
• The data block can be generated by the user; HeadX is a
variable with the UDT "IC-KP-B17_SF_Data_UDT".

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 22


IC-KP-Bxx SingleFrame TIA Portal
Inputs and outputs Function block:

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 23


IC-KP-Bxx SingleFrame TIA Portal
Inputs and outputs Function block:
Name Type Significance

I_HWIO_Hardware_ID HW_IO Hardware identification (ID) In/Out 64 byte module

I_T_Timeout Time Timer for monitoring command execution (e.g. T#5s)

FALSE = Single command execution (one-time execution)


I_b_HeadXSingleEnhanced BOOL
TRUE = Enhanced command execution (permanent execution)
FALSE = Access to user data area (user memory)
I_b_HeadXDataFixcode BOOL
TRUE = Access to fixcode (UID/TID)
FALSE = no meaning; given by Head1DataFixcode
I_b_HeadXSpecialFixcode BOOL
TRUE = Access to EPC/UII area (IUH-F19x only)
TRUE (positive edge) = start execution of "SpecialCommand"; define command telegram in
I_b_HeadXSpecialCommand BOOL
data structure "SpecialCommand" before
TRUE (positive edge) = start of read access execution; defined by HeadXSingleEnhanced,
I_b_HeadXRead BOOL
HeadXDataFixcode and HeadXSpecialFixcode
TRUE (edge positive) = start execution write access; defined by HeadXSingleEnhanced,
I_b_HeadXWrite BOOL
HeadXDataFixcode and HeadXSpecialFixcode

I_b_HeadXQuit BOOL TRUE (edge positive) = Start execution Quit command; abort running Enhanced command

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 24


IC-KP-Bxx SingleFrame TIA Portal
Inputs and outputs Function block:
Name Type Significance

I_i_HeadXWordNum Int Number of addressed data blocks of 4 bytes each; value range: 1...15

I_w_HeadXWordAddress Word Start address on data carrier; value range: starting from 16#00; size depends on data carrier

Data carrier type; value range:


Default = 16#3939
IQC21 = 16#3231
IQC22 = 16#3232
I_w_HeadXTagType Word IQC33 = 16#3333
IPC02 = 16#3032
IPC03 = 16#3033
IUCxx = 16#3830
Etc.
TRUE (edge positive) = Start execution initialization routine; set input to False again after one
IO_b_SetRestart BOOL
cycle

IO_b_InitFinish BOOL TRUE = Initialization successfully executed; function block ready for operation

HeadXData UDT IDENTControl_Data_UDT

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 25


IC-KP-Bxx SingleFrame TIA Portal
Inputs and outputs Function block:
Name Type Significance

FALSE = no command active; negative edge = command terminated


O_b_HeadXBusy BOOL
TRUE = Command active or currently being executed
FALSE = Command is still active or not yet terminated; data carrier out of detection zone
O_b_HeadXDone BOOL
TRUE (edge positive) = command completed; data carrier within detection zone (Enhanced)
FALSE = data carrier within the detection zone (Enhanced)
O_b_HeadXNoDataCarrier BOOL
TRUE = Data carrier outside the detection zone (single and enhanced)
FALSE = no error condition
O_b_HeadXError BOOL
TRUE = Error status; error status at Head1Status
Status value of the command execution
16#00 = OK, data read or written
16#04 = Error in command parameters
O_B_HeadXStatus Byte
16#05 = no data carrier in the detection zone
16#06 = no RFID head connected
16#0A = two data carriers detected (IUH-F19x only)

O_B_HeadXReplyCounter Byte Execution counter; incremented for each new response

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 26


IC-KP-Bxx SingleFrame TIA Portal
Schematic representation of the program blocks:
Note:

• IC-KP-
Function block Data block B17_SingleFrame =
function block for
FB803 DB1 SingleFrame

• IC-KP-B17_SF_DB =
IC-KP- IC-KP-B17_SF_DB Instance data block
B17_SingleFrame
• HeadXData =
Parameter for
Head1Data Data block connection data block
DB2 DB2 UserData.HeadX
Head2Data
• UserData = data block
UserData.Head1 with the UDT; contains
Head3Data UserData.Head2 the user data and no
UserData.Head3 header information
Head4Data UserData.Head4

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 27


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization
• Initialization must be carried out after device startup
• Assignment of the data carrier type to the Head1TagType input (e.g. IQC21 16#3231 or factory setting
16#3939)
• Start by positive edge on "SetRestart”
• Initialization successfully completed if signal change at "InitFinish" to True
• Before executing a new initialization, "SetRestart" must be reset to False
• All variables of the FB are reset; data blocks are overwritten with 16#00
• All active Enhanced commands are aborted
• Option for error acknowledgement

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 28


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization
P+F Name Chip Name Tag Type RFID-head Commands

IPC02 EM4102 (Unique) 16#3032 IPH-…-V1 (125kHz) Single / Enhanced Read Fixcode

Single / Enhanced Read Fixcode


IPC03 EM4450 (Titan) 16#3033 IPH-…-V1 (125kHz) Single / Enhanced Read Words
Single / Enhanced Write Words

Single / Enhanced Read Fixcode


IPC11 Q5 16#3131 IPH-…-V1 (125kHz)
Single / Enhanced Write Fixcode

IQH1-…-V1
IQC20 all ISO15693 data carrier 16#3230 Single / Enhanced Read Fixcode
(13,56MHz; ISO15693)

Single / Enhanced Read Fixcode


IQH1-…-V1 Single / Enhanced Read Words
IQC21 NXP ICode SLI 16#3231
(13,56MHz; ISO15693) Single / Enhanced Write Words
Single / Enhanced Write Words with Lock (SpecialCommand)

Single / Enhanced Read Fixcode


Texas Instruments Tag-It IQH1-…-V1 Single / Enhanced Read Words
IQC22 16#3232
HF-I Plus (13,56MHz; ISO15693) Single / Enhanced Write Words
Single / Enhanced Write Words with Lock (SpecialCommand)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 29


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization
P+F Name Chip Name Tag Type RFID-head Commands

Single / Enhanced Read Fixcode


IQH1-…-V1
Infineon my-D Single / Enhanced Read Words
IQC24 16#3234 (13,56MHz;
SRF55V10P Single / Enhanced Write Words
ISO15693)
Single / Enhanced Write Words with Lock (SpecialCommand)

Single / Enhanced Read Fixcode


IQH1-…-V1
Single / Enhanced Read Words
IQC33 Fujitsu MB89R118 16#3333 (13,56MHz;
Single / Enhanced Write Words
ISO15693)
Single / Enhanced Write Words with Lock (SpecialCommand)

Single / Enhanced Read Fixcode


IQH1-…-V1
Single / Enhanced Read Words
IQC35 NXP Icode SLI-S 16#3335 (13,56MHz;
Single / Enhanced Write Words
ISO15693)
Single / Enhanced Write Words with Lock (SpecialCommand)

Single / Enhanced Read Fixcode


IQH1-…-V1
Single / Enhanced Read Words
IQC37 Fujitsu MB89R112 16#3337 (13,56MHz;
Single / Enhanced Write Words
ISO15693)
Single / Enhanced Write Words with Lock (SpecialCommand)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 30


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization
P+F Name Chip Name Tag Type RFID-head Commands

Single / Enhanced Read Fixcode


Single / Enhanced Read Words
Single / Enhanced Write Words
IUH-F19x-V1-FRx Single / Enhanced Read Special Fixcode
IUC72 NXP U Code G2XM 16#3830
(ISO18000-63) Single Program Special Fixcode
Single / Enhanced Read 16-Bit Words (SpecialCommand)
Single / Enhanced Write 16-Bit Words (SpecialCommand)
Read / Write Parameter (SpecialCommand)

Single / Enhanced Read Fixcode


Single / Enhanced Read Words
Single / Enhanced Write Words
IUH-F19x-V1-FRx Single / Enhanced Read Special Fixcode
IUC76 Alien Higgs-3 16#3830
(ISO18000-63) Single Program Special Fixcode
Single / Enhanced Read 16-Bit Words (SpecialCommand)
Single / Enhanced Write 16-Bit Words (SpecialCommand)
Read / Write Parameter (SpecialCommand)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 31


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization
P+F Name Chip Name Tag Type RFID-head Commands

Single / Enhanced Read Fixcode


Single / Enhanced Read Words
Single / Enhanced Write Words
IUH-F19x-V1-FRx Single / Enhanced Read Special Fixcode
IUC77 Impinj Monza 4QT 16#3830
(ISO18000-63) Single Program Special Fixcode
Single / Enhanced Read 16-Bit Words (SpecialCommand)
Single / Enhanced Write 16-Bit Words (SpecialCommand)
Read / Write Parameter (SpecialCommand)

Single / Enhanced Read Fixcode


Single / Enhanced Read Words
Single / Enhanced Write Words
IUH-F19x-V1-FRx Single / Enhanced Read Special Fixcode
IUC82 NXP U Code 7xm-2k 16#3830
(ISO18000-63) Single Program Special Fixcode
Single / Enhanced Read 16-Bit Words (SpecialCommand)
Single / Enhanced Write 16-Bit Words (SpecialCommand)
Read / Write Parameter (SpecialCommand)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 32


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization
Initialization routine:
• Start via edge positive on "SetRestart”
• Reset input "SetRestart" after at least one cycle
• Initialization finished when "InitFinish" = True
(edge positive)
• HeadXDone = True
• HeadXStatus = 16#00
• HeadXReplyCounter was increased

• If the status contains a value 16#04 (parameter


error), the data carrier type was parameterized
incorrectly
• If the status contains a value 16#06 (parameter
error), the data carrier type was parameterized
incorrectly

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 33


IC-KP-Bxx SingleFrame TIA Portal
Example 1: Initialization

Input data field:


Byte[0]  Command code; ChangeTag command; 16#04
Output data field: Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[0]  Command code; ChangeTag command; 16#04 Byte[2]  Status; command correctly executed = 16#00
Byte[1]  channel number; channel 1 = 16#02 or 16#03 Byte[3]  Execution counter; incremented for each new
Byte[2] and Byte [3]  TagType; 16#3231 for IQC21 response

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 34


IC-KP-Bxx SingleFrame TIA Portal
Example 2: Single Read Fixcode (UID)
• Single read attempt on the fixcode (UID or TID) of a data carrier
• HeadXDataFixcode := True and HeadXSpecialFixcode := False and HeadXSingleEnhanced := False
• Start by positive edge on "HeadXRead
• Command ends after a read attempt Reading successful, Fixcode read:
• HeadXDataFixcode := True  Access to the Fixcode area of the data carrier
• HeadXSingleEnhanced := False  a one-time reading command will execute
• HeadXRead := True  by signal change to True the command execution starts;
after finishing the command execution the input HeadXRead has to reset back to
False
• HeadXDone  is set to False as soon as the reading execution is active; after the
end of the reading the output HeadXDone is set to True
• HeadXNoDataCarrier  is set to False with the start of the command execution; the
data carrier is successfully read the output stay on False
• HeadXError  no error during command execution is occurred and the output is set
to False
• HeadXBusy  is set to True with the start of the command execution; thereby an
active command execution is signalized; after the end of the command the output is
set to False

Reading not successful; data carrier not detected and Fixcode not read

• HeadXNoDataCarrier  after the end of the command execution this output is set to
True

• Before starting a new reading command the input HeadXRead has to reset back to
False
• A new reading command starts by setting HeadXRead to True

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 35


IC-KP-Bxx SingleFrame TIA Portal
Example 2: Single Read Fixcode (UID)

Data carrier recognized and Fixcode read: No data carrier detected:


Head1Busy = FALSE Head1Busy = FALSE
Head1Done = TRUE Head1Done = TRUE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 36


IC-KP-Bxx SingleFrame TIA Portal
Example 2: Single Read Fixcode (UID)

Data carrier recognized and Fixcode read DB "UserData":


ReadData[0] …[7]  Fixcode (8 Byte Fixcode;
ISO15693)
ReadData[8]…[59]  16#00
The length of the Fixcode depends on the data carrier. All ISO15693 data
No data carrier detected:
carriers have a Fixcode with a length of 8 bytes. IPC02 has a Fixcode with a DB „UserData“:
length of 5 bytes. IPC03 has a Fixcode with a length of 4 bytes. ReadData[0]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 37


IC-KP-Bxx SingleFrame TIA Portal
Example 2: Single Read Fixcode (UID)

Input data field: Fixcode read: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Single Read Fixcode = 16#01 Input data field: No data carrier detected: DB "IC-KP-B17_SF_DB“
Byte[1]  channel number; channel 1 = 16#02 or 16#03 Byte[0]  Command code; Single Read Fixcode = 16#01
Byte[2]  Status; fixcode read = 16#00 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[3]  Status; fixcode read = 16#00 Byte[2]  Status; no data carrier detected = 16#05
Byte[4]…[11]  read fixcode Byte[3]  Execution counter
Byte[12]…[63]  16#00 Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 38


IC-KP-Bxx SingleFrame TIA Portal
Example 2: Single Read Fixcode (UID)

Output data field: Command Single Read Fixcode


DB "IC-KP-B17_SF_DB“
Byte[0]  Command code; Single Read Fixcode command; 16#01
Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]…[63]  no meaning or 16#00
Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 39
IC-KP-Bxx SingleFrame TIA Portal
Example 3: Single Read Words
• Single read attempt to access the user data area (UserMemory) of a data carrier
• HeadXDataFixcode := False and HeadXSpecialFixcode := False and HeadXSingleEnhanced := False
• HeadXWordAddress := 16#0000 (variable) and HeadXWordNum := 2 (variable; 1...15)
• Start by positive edge on "HeadXRead”
• Command ends after a read attempt Reading successful, Data read:
• HeadXDataFixcode := False  Access to user data area of data carrier
• HeadXSingleEnhanced := False  a one-time reading command will execute
• HeadXRead := True  by signal change to True the command execution starts; after
finishing the command execution the input HeadXRead has to reset back to False
• HeadXDone  is set to False as soon as the reading execution is active; after the end of
the reading the output HeadXDone is set to True
• HeadXNoDataCarrier  is set to False with the start of the command execution; the data
carrier is successfully read the output stay on False
• HeadXError  no error during command execution is occurred and the output is set to
False
• HeadXBusy  is set to True with the start of the command execution; thereby an active
command execution is signalized; after the end of the command the output is set to False

Reading not successful; data carrier not detected and user data not read

• HeadXNoDataCarrier  after the end of the command execution this output is set to True

• Before starting a new reading command the input HeadXRead has to reset back to False
• A new reading command starts by setting HeadXRead to True

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 40


IC-KP-Bxx SingleFrame TIA Portal
Example 3: Single Read Words

Data carrier recognized and data read in: No data carrier detected:
Head1Busy = FALSE Head1Busy = FALSE
Head1Done = TRUE Head1Done = TRUE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 41


IC-KP-Bxx SingleFrame TIA Portal
Example 3: Single Read Words

Data carrier recognized and data read in:


DB "UserData“
Byte[0]…[59]  Data read
The number of bytes (memory blocks) read in depends on No data carrier detected:
HeadXWordNum. 4 bytes are read in when HeadXWordNum = 1. DB „UserData“:
Not used bytes within "ReadData" are overwritten with 16#00. ReadData[0]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 42


IC-KP-Bxx SingleFrame TIA Portal
Example 3: Single Read Words

Input data field: Data read in: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Single Read Words = 16#10 Input data field: No data carrier detected: DB "IC-KP-B17_SF_DB“
Byte[1]  Block number (16#2 = 2 blocks); channel Byte[0]  Command code; Single Read Words = 16#10
number; channel 1 = 16#02 or 16#03 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; data read = 16#00 Byte[2]  Status; no data carrier detected = 16#05
Byte[3]  Execution counter Byte[3]  Execution counter
Byte[4]…[63]  read in data Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 43


IC-KP-Bxx SingleFrame TIA Portal
Example 3: Single Read Words

Output data field:


DB "IC-KP-B17_SF_DB“
Byte[0]  Command code; Single Read Data command; 16#10
Byte[1]  Block number (16#2 = 2 data blocks); channel number; channel 1 = 16#02 or 16#03
Byte[2]…[3]  Start address 16#0000
Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 44


IC-KP-Bxx SingleFrame TIA Portal
Example 4: Single Write Words
• Single write attempt to the user data area (UserMemory) of a data carrier
• HeadXDataFixcode := False and HeadXSpecialFixcode := False and HeadXSingleEnhanced := False
• HeadXWordAddress := 16#0000 (variable) and HeadXWordNum := 2 (variable; 1...15)
• Set write data in "WriteData”
• Start by positive edge on "HeadXWrite”
Writing successful, user data write:
• HeadXDataFixcode := False  Access to user data area of data carrier
• HeadXSingleEnhanced := False  a one-time reading command will execute
• HeadXWrite:= True  by signal change to True the command execution starts; after
finishing the command execution the input HeadXWrite has to reset back to False
• HeadXDone  is set to False as soon as the writing execution is active; after the end of the
writing the output HeadXDone is set to True
• HeadXNoDataCarrier  is set to False with the start of the command execution; the data
carrier is successfully write the output stay on False
• HeadXError  no error during command execution is occurred and the output is set to
False
• HeadXBusy  is set to True with the start of the command execution; thereby an active
command execution is signalized; after the end of the command the output is set to False

Writing not successful; data carrier not detected and user data not write

• HeadXNoDataCarrier  after the end of the command execution this output is set to True

• Before starting a new writing command the input HeadXWrite has to reset back to False
• A new writing command starts by setting HeadXWrite to True

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 45


IC-KP-Bxx SingleFrame TIA Portal
Example 4: Single Write Words
Write data:
• Assignment before the start of command
execution
• Assignment within the DB "UserData”
• Byte [0] to [59] Write data
• Write data could parametrize up to Byte
[59]
• Number of write data depending on
parameter HeadXWordNum
• Value range of HeadXWordNum from
1...15

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 46


IC-KP-Bxx SingleFrame TIA Portal
Example 4: Single Write Words

Data carrier recognized and data written: No data carrier detected:


Head1Busy = FALSE Head1Busy = FALSE
Head1Done = TRUE Head1Done = TRUE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 47


IC-KP-Bxx SingleFrame TIA Portal
Example 4: Single Write Words

Input data field: Data written: DB "IC-KP-B17_SF_DB“ Input data field: No data carrier detected: DB "IC-KP-B17_SF_DB“
Byte[0]  Command code; Single Write Words = 16#40 Byte[0]  Command code; Single Write Words = 16#40
Byte[1]  channel number; channel 1 = 16#02 or 16#03 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; data written = 16#00 Byte[2]  Status; no data carrier detected = 16#05
Byte[3]  Execution counter Byte[3]  Execution counter
Byte[4]…[63]  16#00 Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 48


IC-KP-Bxx SingleFrame TIA Portal
Example 4: Single Write Words
Output data field:

Byte[0]  command code;


Single Write Words command;
16#40

Byte[1]  Block number (16#2


= 2 data blocks); channel number;
channel 1 = 16#02 or 16#03

Byte[2]…[3]  Start address


16#0000

Byte[4]…[11]  Write data

Byte[12]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 49


IC-KP-Bxx SingleFrame TIA Portal
Example 5: Enhanced Read Fixcode (UID)
• permanent read attempt on the Fixcode (UID or TID) of a data carrier
• HeadXDataFixcode := True and HeadXSpecialFixcode := False and HeadXSingleEnhanced := True
• Start by positive edge on "HeadXRead”
• End of command execution via Quit command or initialization

Start execution Enhanced Read Fixcode:


• HeadXDataFixcode := True Access to Fixcode area of data carrier
• HeadXSingleEnhanced := True  a permanent reading command will execute
• HeadXRead:= True  by signal change to True the command execution starts
No data carrier inside the detection range:
• HeadXNoDataCarrier := True and HeadXDone := False  no data carrier inside the detection range
Data carrier inside the detection range:
• HeadXNoDataCarrier := False and HeadXDone := True  data carrier enter the detection range and Fixcode is read
Abort of the reading command:
• HeadXRead := False
• HeadXQuit := True  by signal change to True a quit command will execute and the active reading command stopped

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 50


IC-KP-Bxx SingleFrame TIA Portal
Example 5: Enhanced Read Fixcode (UID)

Data carrier recognized and Fixcode read: No data carrier detected or data carrier has left the detection zone:
Head1Busy = TRUE Head1Busy = TRUE
Head1Done = TRUE Head1Done = FALSE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 51


IC-KP-Bxx SingleFrame TIA Portal
Example 5: Enhanced Read Fixcode (UID)

Data carrier recognized and fixcode read


DB "UserData“
ReadData[0] …[7]  Fixcode (8 Byte Fixcode;
ISO15693)
ReadData[8]…[59]  16#00
The length of the fixcode depends on the data carrier. All
ISO15693 data carriers have a fixcode with a length of 8 bytes. No data carrier detected or data carrier has left the detection zone
IPC02 has a fixcode with a length of 5 bytes. IPC03 has a fixcode DB „UserData“
with a length of 4 bytes. Byte[0]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 52


IC-KP-Bxx SingleFrame TIA Portal
Example 5: Enhanced Read Fixcode (UID)

Input data field: Fixcode read: DB "IC-KP-B17_SF_DB“ Input data field: No data carrier detected or data carrier has left the
Byte[0]  Command code; Enhanced Read Fixcode = 16#1D detection zone DB "IC-KP-B17_SF_DB"
Byte[1]  channel number; channel 1 = 16#02 or 16#03 Byte[0]  Command code; Enhanced Read Fixcode = 16#1D
Byte[2]  Status; fixcode read = 16#00 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[3]  Execution counter Byte[2]  Status; no data carrier detected = 16#05
Byte[4]…[11]  read fixcode Byte[3]  Execution counter
Byte[12]…[63]  16#00 Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 53


IC-KP-Bxx SingleFrame TIA Portal
Example 5: Enhanced Read Fixcode (UID)

Output data field:


• Byte[0]  Command code; Enhanced Read Fixcode command;
16#1D
• Byte[1]  channel number; channel 1 = 16#02 or 16#03
• Byte[2]…[63]  no relevance
Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 54
IC-KP-Bxx SingleFrame TIA Portal
Example 6: Enhanced Read Words
• Continuous read attempt on the user data area (user memory) of a data carrier
• HeadXDataFixcode := False and HeadXSpecialFixcode := False and HeadXSingleEnhanced := True
• HeadXWordAddress := 16#0000 (variable) and HeadXWordNum := 2 (variable; 1...15)
• Start by positive edge on "HeadXRead"; end via Quit command or initialization

Start execution Enhanced Read Words:


• HeadXDataFixcode := False Access to user data area of data carrier
• HeadXSingleEnhanced := True  a permanent reading command will execute
• HeadXRead:= True  by signal change to True the command execution starts
No data carrier inside the detection range:
• HeadXNoDataCarrier := True and HeadXDone := False  no data carrier inside the detection range
Data carrier inside the detection range:
• HeadXNoDataCarrier := False and HeadXDone := True  data carrier enter the detection range and user data are read
Abort of the reading command:
• HeadXRead := False
• HeadXQuit := True  by signal change to True a quit command will execute and the active reading command stopped

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 55


IC-KP-Bxx SingleFrame TIA Portal
Example 6: Enhanced Read Words

Data carrier recognized and data read: No data carrier detected or data carrier has left the detection zone:
Head1Busy = TRUE Head1Busy = TRUE
Head1Done = TRUE Head1Done = FALSE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 56


IC-KP-Bxx SingleFrame TIA Portal
Example 6: Enhanced Read Words

Data carrier recognized and data read in


DB "UserData“ No data carrier detected or data carrier has left the detection zone
Byte[0]…[7]  Data read DB "UserData“
Byte[8]…[59]  16#00 Byte[0]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 57


IC-KP-Bxx SingleFrame TIA Portal
Example 6: Enhanced Read Words

Input data field: Data read in: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Enhanced Read Words = 16#19 Input data field: No data carrier detected or data carrier has left the
Byte[1]  Block number (16#2 = 2 data blocks); channel acquisition zone DB "IC-KP-B17_SF_DB“
number; channel 1 = 16#02 or 16#03 Byte[0]  Command code; Enhanced Read Words = 16#19
Byte[2]  Status; data read = 16#00 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[3]  Execution counter Byte[2]  Status; no data carrier detected = 16#05
Byte[4]…[11]  read in data Byte[3]  Execution counter
Byte[12]…[63]  16#00 Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 58


IC-KP-Bxx SingleFrame TIA Portal
Example 6: Enhanced Read Words
Output data field:
• Byte[0]  command code; Enhanced
Read Words command; 16#19
• Byte[1]  Block number (16#2 = 2
data blocks); channel number; channel 1
= 16#02 or 16#03
• Byte[2]…[3]  Start address 16#0000
• Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 59


IC-KP-Bxx SingleFrame TIA Portal
Example 7: Enhanced Write Words
• Continuous write attempt to the user data area (user memory) of a data carrier
• HeadXDataFixcode := False and HeadXSpecialCommand := False and HeadXSingleEnhanced := True
• HeadXWordAddress := 16#0000 (variable) and HeadXWordNum := 2 (variable; 1...15)
• Set write data in "WriteData
• Start by positive edge on "HeadXWrite
• End via Quit command or initialization

Start execution Enhanced Write Words:


• HeadXDataFixcode := False Access to user data area of data carrier
• HeadXSingleEnhanced := True  a permanent reading command will execute
• HeadXWrite:= True  by signal change to True the command execution starts
No data carrier inside the detection range:
• HeadXNoDataCarrier := True and HeadXDone := False  no data carrier inside the detection range
Data carrier inside the detection range:
• HeadXNoDataCarrier := False and HeadXDone := True  data carrier enter the detection range and user data are written
Abort of the writing command:
• HeadXWrite := False
• HeadXQuit := True  by signal change to True a quit command will execute and the active reading command stopped

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 60


IC-KP-Bxx SingleFrame TIA Portal
Example 7: Enhanced Write Words

Write data:
• Assignment before the start of instruction execution
• Assignment within the DB "UserData”
• Byte [0] to [59] Write data
• Write data parametrize up to Byte [59]
• Number of write data depending on parameter Head1WordNum
• Value range of HeadXWordNum from 1...15

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 61


IC-KP-Bxx SingleFrame TIA Portal
Example 7: Enhanced Write Words

Data carrier recognized and data written: No data carrier detected or data carrier has left the detection zone
Head1Busy = TRUE Head1Busy = TRUE
Head1Done = TRUE Head1Done = FALSE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 62


IC-KP-Bxx SingleFrame TIA Portal
Example 7: Enhanced Write Words

Input data field: Data carrier recognized and data written: Input data field: No data carrier recognized or data carrier has left the
DB "IC-KP-B17_SF_DB“ detection zone DB "IC-KP-B17_SF_DB“
Byte[0]  Command code; Enhanced Write Words = 16#1A Byte[0]  Command code; Enhanced Write Words = 16#1A
Byte[1]  channel number; channel 1 = 16#02 or 16#03 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; data written = 16#00 Byte[2]  Status; no data carrier detected = 16#05
Byte[3]  Execution counter Byte[3]  Execution counter
Byte[4]…[63]  16#00 Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 63


IC-KP-Bxx SingleFrame TIA Portal
Example 7: Enhanced Write Words
Output data field:

Byte[0]  Command code; Enhanced


Write Data command; 16#1A

Byte[1]  Block number (16#2 = 2 data


blocks); channel number; channel 1 = 16#02
or 16#03

Byte[2]…[3]  Start address 16#0000

Byte[4]…[11]  Write data

Byte[12]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 64


IC-KP-Bxx SingleFrame TIA Portal
Example 8: Quit
• Termination of active Enhanced commands
• Start by positive edge on "HeadXQuit“

Start Execution Quit:


• HeadXQuit:= True with signal change a Quit command is executed and the active
read command is aborted

Quit executed:
• HeadXDone = True Quit Command terminated
• Head1Status = 16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 65


IC-KP-Bxx SingleFrame TIA Portal
Example 8: Quit

Input data field: Quit executed:


DB "IC-KP-B17_SF_DB“
Byte[0]  Command code; Quit = 16#02 Output data field: Quit command:
Byte[1]  channel number; channel 1 = 16#02 or 16#03 DB "IC-KP-B17_SF_DB“
Byte[2]  Status; Quit executed = 16#00 Byte[0]  Command code; Quit = 16#02
Byte[3]  Execution counter Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[4]…[63]  16#00 Byte[2]…[63]  no relevance

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 66


IC-KP-Bxx SingleFrame TIA Portal
Example 9: Single Read Special Fixcode (EPC)
• Only to be performed when using IUH-F19x-V1 (UHF system)
• HeadXDataFixcode := False and HeadXSpecialFixcode := True and HeadXSingleEnhanced := False
• Start by positive edge on "HeadXRead”
• Command ends after a read attempt
Read successful, EPC read:
HeadXSpecialFixcode := True Access to EPC area of data carrier
HeadXSingleEnhanced := False a one-time read command is executed
HeadXRead := True If the signal changes to True, command execution starts; at the
end of command execution, HeadXRead must be set to False.
HeadXDone is set to False as soon as the read operation is active; after the end of the
command execution, HeadXDone is set to True.
HeadXNoDataCarrier is set to False with the start of command execution; the data
carrier has been read successfully and the output remains False.
HeadXError no error occurred and output is set to False
HeadXBusy is set to True at the beginning of the command execution and thus signals
an active command; at the end, the output is set to False.

Read not successful, data carrier not recognized and EPC not read in
• HeadXNoDataCarrier is set to True at the end of the command execution.

• Before a new reading process can be started, the input HeadXRead must be set to
False.
• A new reading process is started by setting HeadXRead to True.

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 67


IC-KP-Bxx SingleFrame TIA Portal
Example 9: Single Read Special Fixcode (EPC)

Data carrier detected and EPC read: No data carrier detected:


Head1Busy = FALSE Head1Busy = FALSE
Head1Done = TRUE Head1Done = TRUE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 68


IC-KP-Bxx SingleFrame TIA Portal
Example 9: Single Read Special Fixcode (EPC)

Data carrier recognized and data read in: DB "UserData“


Byte[0]…[1]  PC-Word
Byte[2]…[13]  EPC Code (12 Byte) No data carrier detected:
The length of the read EPC code can be variable. Length DB „UserData“
information about the EPC Code is located within the PC Word. Byte[0]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 69


IC-KP-Bxx SingleFrame TIA Portal
Example 9: Single Read Special Fixcode (EPC)

No data carrier detected: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Single Read Special Fixcode =
16#0A
Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; no data carrier detected = 16#05
Byte[3]  Execution counter
Byte[4]…[59]  16#00

Data carrier detected and EPC read: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Single Read Special Fixcode =
16#0A
Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; EPC read = 16#00
Byte[3]  Execution counter
Byte[4]…[17]  read EPC information (PC Word + EPC)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 70


IC-KP-Bxx SingleFrame TIA Portal
Example 9: Single Read Special Fixcode (EPC)
Output data field:
• Byte[0]  Command code; Single Read
Special Fixcode command; 16#0A
• Byte[1]  channel number; channel 1 =
16#02 or 16#03
• Byte[2]…[63]  not relevant

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 71


IC-KP-Bxx SingleFrame TIA Portal
Example 10: Enhanced Read Special Fixcode (EPC)
• Only to be performed when using IUH-F19x-V1 (UHF system)
• HeadXDataFixcode := False and HeadXSpecialFixcode := True and HeadXSingleEnhanced := True
• Start by positive edge on "HeadXRead”
• End via Quit command or initialization

Start execution Enhanced Read Special Fixcode:


• HeadXSpecialFixcode := True Access to EPC area of data carrier
• HeadXSingleEnhanced := True  a permanent reading command will execute
• HeadXRead:= True  by signal change to True the command execution starts
No data carrier inside the detection range:
• HeadXNoDataCarrier := True and HeadXDone := False  no data carrier inside the detection range
Data carrier inside the detection range:
• HeadXNoDataCarrier := False and HeadXDone := True  data carrier enter the detection range and EPC is read
Abort of the reading command:
• HeadXRead := False
• HeadXQuit := True  by signal change to True a quit command will execute and the active reading command stopped

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 72


IC-KP-Bxx SingleFrame TIA Portal
Example 10: Enhanced Read Special Fixcode (EPC)

Data carrier detected and EPC read: No data carrier detected:


Head1Busy = TRUE Head1Busy = TRUE
Head1Done = TRUE Head1Done = FALSE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 73


IC-KP-Bxx SingleFrame TIA Portal
Example 10: Enhanced Read Special Fixcode (EPC)

Data carrier recognized and data read in: DB "UserData“


Byte[0]…[1]  PC-Word
Byte[2]…[13]  EPC Code (12 Byte) No data carrier detected:
The length of the read EPC code can be variable. Length information DB "UserData“
about the EPC Code is located within the PC Word. Byte[0]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 74


IC-KP-Bxx SingleFrame TIA Portal
Example 10: Enhanced Read Special Fixcode (EPC)

No data carrier detected: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Enh. Read Special Fixcode = 16#71
Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; no data carrier detected = 16#05
Byte[3]  Execution counter
Byte[4]…[63]  16#00

Data carrier detected and EPC read: DB "IC-KP-B17_SF_DB“


Byte[0]  Command code; Enh. Read Special Fixcode = 16#71
Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; EPC read = 16#00
Byte[3]  Execution counter
Byte[4]…[17]  read EPC information (PC Word + EPC)

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 75


IC-KP-Bxx SingleFrame TIA Portal
Example 10: Enhanced Read Special Fixcode (EPC)
Output data field:

• Byte[0]  Command code; Enhanced


Read Special Fixcode command; 16#71

• Byte[1]  channel number; channel 1


= 16#02 or 16#03

• Byte[2]…[63]  not relevant

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 76


IC-KP-Bxx SingleFrame TIA Portal
Example 11: Single Program Special Fixcode (EPC)
• Only to be performed when using IUH-F19x-V1 (UHF system)
• HeadXDataFixcode := False and HeadXSpecialFixcode := True and HeadXSingleEnhanced := False
• HeadXWordAddress := 16#0000 and Head1WordNum := 14 (variable; depending on the length EPC)
• Set write data in "WriteData”
• Start by positive edge on "HeadXWrite"; command ends after a write attempt
Writing successful, EPC write:
• HeadXSpecialFixcode := True  Access to EPC area of data carrier
• HeadXSingleEnhanced := False  a one-time reading command will execute
• HeadXWrite:= True  by signal change to True the command execution starts; after
finishing the command execution the input HeadXWrite has to reset back to False
• HeadXDone  is set to False as soon as the writing execution is active; after the end of the
writing the output HeadXDone is set to True
• HeadXNoDataCarrier  is set to False with the start of the command execution; the data
carrier is successfully write the output stay on False
• HeadXError  no error during command execution is occurred and the output is set to
False
• HeadXBusy  is set to True with the start of the command execution; thereby an active
command execution is signalized; after the end of the command the output is set to False

Writing not successful; data carrier not detected and user data not write

• HeadXNoDataCarrier  after the end of the command execution this output is set to True

• Before starting a new writing command the input HeadXWrite has to reset back to False
• A new writing command starts by setting HeadXWrite to True

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 77


IC-KP-Bxx SingleFrame TIA Portal
Example 11: Single Program Special Fixcode (EPC)
Write data:
DB "UserData“

Byte[0]…[1]  PC-Word; value


PC-Word depending on EPC Code

Byte [2]…[13]  EPC Code; length


12 bytes

The parameter Head1WordNum


specifies the length of the PC Word
plus the EPC Code
With 12 byte EPC Code and 2 byte
PC-Word, Head1WordNum has the
value 14

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 78


IC-KP-Bxx SingleFrame TIA Portal
Example 11: Single Program Special Fixcode (EPC)

Data carrier recognized and EPC written: No data carrier detected:


Head1Busy = TRUE Head1Busy = TRUE
Head1Done = TRUE Head1Done = FALSE
Head1NoDataCarrier = FALSE Head1NoDataCarrier = TRUE
Head1Status = 16#00 Head1Status = 16#05

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 79


IC-KP-Bxx SingleFrame TIA Portal
Example 11: Single Program Special Fixcode (EPC)

Data carrier recognized and EPC written: DB "IC-KP-B17_SF_DB“ No data carrier detected: DB "IC-KP-B17_SF_DB“
Byte[0]  Command code; Single Program Special Byte[0]  Command code; Single Program Special
Fixcode = 16#0D Fixcode = 16#0D
Byte[1]  channel number; channel 1 = 16#02 or 16#03 Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; data written = 16#00 Byte[2]  Status; no data carrier detected = 16#05
Byte[3]  Execution counter Byte[3]  Execution counter
Byte[4]…[63]  16#00 Byte[4]…[63]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 80


IC-KP-Bxx SingleFrame TIA Portal
Example 11: Single Program Special Fixcode (EPC)
Output data field:

Byte[0]  Command code; Single Program


Special Fixcode; 16#0D

Byte[1]  Block number (0xE) / channel


number; channel 1 = 16#02 or 16#03

Byte[2]…[3]  16#00

Byte[4]…[5]  16#3000; PC Word with 12 Byte


EPC Code

Byte[6]…[17]  EPC Code; length12 Byte

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 81


IC-KP-Bxx SingleFrame TIA Portal
Example 12: Special Command  Readout Transmitting power
• All commands that cannot be parameterized via the input parameters of the function block can be
executed
• Execution of all commands supported by the evaluation unit possible
• Parameterization of command telegram in the data field "SpecialCommand”
• Start by positive edge on "HeadXSpecialCommand”

SpecialCommand successful, transmission power read in:


• Assign command parameters in data field "SpecialCommand
• HeadXSpecialCommand := True If the signal changes to True, the command
execution starts; at the end of the command execution, HeadXSpecialCommand
must be set to False.
• HeadXDone is set to False as soon as command execution is active; at the end of
command execution HeadXDone is set to True
• HeadXError no error occurred and output is set to False
• HeadXBusy is set to True at the beginning of the command execution and thus
signals an active command; at the end, the output is set to False.

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 82


IC-KP-Bxx SingleFrame TIA Portal
Example 12: Special Command  Readout Transmitting power
Command telegram:
DB "UserData":

Byte[0]  Command code; Read


Parameter = 16#BE

Byte[1]  channel number; channel 1 =


16#02 or 16#03

Byte[2]  16#00

Byte[3]  System code „U“; U = 16#55

Byte[4] and [5]  Parameter type "PT"; P


= 16#50; T = 16#54

Byte[6] and [7]  Length parameter;


16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 83


IC-KP-Bxx SingleFrame TIA Portal
Example 12: Special Command  Readout Transmitting power

Special command executed:


Head1Busy = FALSE Transmission power read in: DB "UserData":
Head1Done = TRUE Byte[0]…[1]  Length Parameter
Head1NoDataCarrier = FALSE Byte[2]…[3]  Power stage PT1; 16#0032 = 50mW
Head1Status = 16#00 Byte[4]…[59]  16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 84


IC-KP-Bxx SingleFrame TIA Portal
Example 13: Special Command  Setting Transmission power
• All commands that cannot be parameterized via the input parameters of the function block can be
executed
• Execution of all commands supported by the evaluation unit possible
• Parameterization of command telegram in the data field "SpecialCommand”
• Start by positive edge on "HeadXSpecialCommand”

SpecialCommand successful, transmission power set:


• Assign command parameters in data field "SpecialCommand
• HeadXSpecialCommand := True If the signal changes to True, the command
execution starts; at the end of the command execution, HeadXSpecialCommand
must be set to False.
• HeadXDone is set to False as soon as command execution is active; at the end of
command execution HeadXDone is set to True
• HeadXError no error occurred and output is set to False
• HeadXBusy is set to True at the beginning of the command execution and thus
signals an active command; at the end, the output is set to False.

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 85


IC-KP-Bxx SingleFrame TIA Portal
Example 13: Special Command  Setting Transmission power
Command telegram:
DB "UserData":

Byte[0]  Command code; Write


Parameter = 16#BF

Byte[1]  channel number; channel 1 =


16#02 or 16#03

Byte[2]  16#00

Byte[3]  System code „U“; U = 16#55

Byte[4] and [5]  Parameter type "PT"; P =


16#50; T = 16#54

Byte[6] and [7]  Length Parameter; 16#02

Byte[8] and [9]  Transmission power;


16#0064 = 100mW

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 86


IC-KP-Bxx SingleFrame TIA Portal
Example 13: Special Command  Setting Transmission power

Transmission power set:


Byte[0]  command code; Write Parameter = 16#BF
Byte[1]  channel number; channel 1 = 16#02 or 16#03
Byte[2]  Status; transmit power set = 16#00
Byte[3]  Execution counter
Byte[4]…[63]  no relevance; 16#00

Special Command executed:


Head1Busy = FALSE
Head1Done = TRUE
Head1NoDataCarrier = FALSE
Head1Status = 16#00

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 87


Contact
Karsten Reinhardt
kreinhardt@de.pepperl-fuchs.com
+49 (0) 621 776 1736

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 88


IC-KP-Bxx SingleFrame TIA Portal
Version history:

V1.0 02.09.2020
- Initial Version

Karsten Reinhardt 02.09.2020 www.pepperl-fuchs.com 89

You might also like