Professional Documents
Culture Documents
Legal information
Use of application examples
Application examples illustrate the solution of automation tasks through an interaction of several
components in the form of text, graphics and/or software modules. The application examples are
a free service by Siemens AG and/or a subsidiary of Siemens AG (“Siemens”). They are non-
binding and make no claim to completeness or functionality regarding configuration and
equipment. The application examples merely offer help with typical tasks; they do not constitute
customer-specific solutions. You yourself are responsible for the proper and safe operation of the
products in accordance with applicable regulations and must also check the function of the
respective application example and customize it for your system.
Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have the
application examples used by technically trained personnel. Any change to the application
examples is your responsibility. Sharing the application examples with third parties or copying the
application examples or excerpts thereof is permitted only in combination with your own products.
The application examples are not required to undergo the customary tests and quality inspections
of a chargeable product; they may have functional and performance defects as well as errors. It is
your responsibility to use them in such a manner that any malfunctions that may occur do not
result in property damage or injury to persons.
Disclaimer of liability
Siemens shall not assume any liability, for any legal reason whatsoever, including, without
limitation, liability for the usability, availability, completeness and freedom from defects of the
application examples as well as for related information, configuration and performance data and
any damage caused thereby. This shall not apply in cases of mandatory liability, for example
under the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss of
life, bodily injury or damage to health, non-compliance with a guarantee, fraudulent
non-disclosure of a defect, or culpable breach of material contractual obligations. Claims for
damages arising from a breach of material contractual obligations shall however be limited to the
Siemens AG 2018 All rights reserved
foreseeable damage typical of the type of agreement, unless liability arises from intent or gross
negligence or is based on loss of life, bodily injury or damage to health. The foregoing provisions
do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens
against existing or future claims of third parties in this connection except where Siemens is
mandatorily liable.
By using the application examples you acknowledge that Siemens cannot be held liable for any
damage beyond the liability provisions described.
Other information
Siemens reserves the right to make changes to the application examples at any time without
notice. In case of discrepancies between the suggestions in the application examples and other
Siemens publications such as catalogs, the content of the other documentation shall have
precedence.
The Siemens terms of use (https://support.industry.siemens.com) shall also apply.
Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary
to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens’ products and solutions constitute one element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines
and networks. Such systems, machines and components should only be connected to an
enterprise network or the internet if and to the extent such a connection is necessary and only
when appropriate security measures (e.g. firewalls and/or network segmentation) are in place.
For additional information on industrial security measures that may be implemented, please visit
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available
and that the latest product versions are used. Use of product versions that are no longer
supported, and failure to apply the latest updates may increase customer’s exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed
at: http://www.siemens.com/industrialsecurity.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 2
Table of Contents
Table of Contents
Legal information ......................................................................................................... 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Mode of operation ................................................................................ 6
1.3 Components used ................................................................................ 6
2 Engineering ........................................................................................................ 8
2.1 Complete overview ............................................................................... 8
2.2 Basics of using the Ident blocks ......................................................... 10
2.3 Explanation of the technology object ................................................. 11
2.4 Explanation of the "MvControl" block ................................................. 13
2.5 Explanation of the Ident blocks .......................................................... 14
"Reset_Reader" functionality.............................................................. 14
"Set_MV_Program" functionality ........................................................ 15
"Read_MV" functionality ..................................................................... 15
"Write" functionality ............................................................................ 16
2.6 Explanation of the "Ident_Profile" block ............................................. 18
2.7 Diagnostics and error messages ........................................................ 18
2.7.1 Block diagnostics in the technology object ......................................... 18
2.8 Configuration ...................................................................................... 21
2.9 Configuring MV420 / MV440 .............................................................. 25
2.10 Installation and startup ....................................................................... 28
Siemens AG 2018 All rights reserved
MV Basics
Entry ID: 109757269, V1.0, 04/2018 3
1 Introduction
1 Introduction
To implement automatic identification of goods, materials and material carriers for
process and production plants, the SIMATIC Ident product portfolio from Siemens
offers customized modules for this task.
This application example shows what needs to be considered when configuring MV
systems with MV420 / MV440.
1.1 Overview
The figure below provides an overview of the automation task.
Figure 1-1
PLC
MV field devices
Siemens AG 2018 All rights reserved
Object
MV Basics
Entry ID: 109757269, V1.0, 04/2018 4
1 Introduction
Diagrammatic representation
The diagrammatic representation below shows the most important components of
the solution:
Figure 1-2
SIMATIC S7 controllers
S7-1500 S7-1200
PROFINET IE
SIMATIC MV
Siemens AG 2018 All rights reserved
Advantages
The solution presented here offers the following advantages:
The illustrations and explanations included in this application example save
you time and costs when commissioning your own automation solution.
You can expand the supplied hardware configuration as required or integrate it
into your project.
The use of the ready-to-use Ident blocks significantly simplifies operating the
SIMATIC MV code readers.
The use of the technology object helps you avoid errors when configuring and
provides you with diagnostic capabilities of your MV application.
The configuration as technology object simplifies commissioning substantially.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 5
1 Introduction
Trigger Display
reset job result
Trigger
Trigger Trigger
Set_MV_
Program read write
Data
storage
A reset (initialization) through the Ident blocks sets the MV code reader to ready for
operation. When the reset has been successfully performed, the user can choose
between different MV operations and monitor their status.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 6
1 Introduction
Hardware components
Table 1-1
Component No. Article number Note
SIMATIC S7-1200 1 6ES7214-1AG40- Alternatively, you can use a
CPU 1214 DC/DC/DC 0XB0 different S7-1200 CPU.
SIMATIC S7-1500 1 6ES7516-3AN01- Alternatively, you can use a
CPU 1516-3 PN/DP 0AB0 different S7-1500 CPU.
SIMATIC MV440 UR 1 6GT3440-1LE10 Alternatively, you can use a
different MV420 / MV440.
MV440 Ethernet 1 6XV1871-5TH20 -
connecting cable_2M
Note This document describes the automation solution with different S7 controller
types. You only need one of the above controllers to install and start up the
application example.
Software components
Siemens AG 2018 All rights reserved
Table 1-2
Component No. Article number Note
STEP 7 TIA Portal 1 6ES7822-1A.04-.. V14 SP1 or higher
MV Basics
Entry ID: 109757269, V1.0, 04/2018 7
2 Engineering
2 Engineering
The following chapters describe the PLC program of the configuring aid.
User program
Ident blocks
Reset_
Reader
Set_MV_
Program
Read_MV Write …
Hardware
Siemens AG 2018 All rights reserved
SIMATIC S7 controllers
…
Interface modules
…
The Ident blocks from the "SIMATIC Ident" library integrated in TIA Portal control
the operations of the MV code readers. The command frames the Ident blocks
generate are sent from the SIMATIC S7 controller to the SIMATIC MV code
readers via the interface modules. The response frames of the MV code readers
take the same path back to the user program and are provided to the user via the
block outputs.
For the Ident blocks, it is irrelevant whether the interface modules are connected to
the control system via PROFIBUS, PROFINET or in a proprietary manner.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 8
2 Engineering
Program overview
The following figure shows the call hierarchy of the user program of this application
example:
Figure 2-2
Ident blocks
MvControl
ToMv440
Interface
Reset_
Reader
Read_MV MvData
Siemens AG 2018 All rights reserved
Write
Ident Profile
Set_MV_ Ident_
Main
Program Profile
To demonstrate the use of the Ident blocks in a simplified manner, this application
example calls them in a minimal PLC program directly in FB1 "MvControl" of the
OB 1 cycle.
Internally, the "MvControl" block calls the Ident_blocks. Each Ident block is
responsible for a specific MV functionality.
The transponder data read and to be written is stored in the "MvData" data block.
The "MvControlInterface" data block includes all the tags of the application
example that are to be modified.
The "ToMv440" data block is automatically generated when creating the
technology object and includes all the data for parameterizing the interface module
and the readers.
Internally, all Ident blocks call the basic block, "Ident_Profile". The Ident blocks are
therefore only a shell around the complex Ident_Profile block. This makes it easier
for the user to implement the RFID functionalities.
The block names describe their basic core functionality. The following ready-to-use
Ident blocks are available for the SIMATIC MV420 / MV440 product portfolio:
MV Basics
Entry ID: 109757269, V1.0, 04/2018 9
2 Engineering
Table 2-1
Ident block name Implemented in this example
Reset_Reader
Reset_MV
Set_MV_Program
Read_MV
Write
Read
AdvancedCMD
This application example discusses only the four implemented blocks as they
determine the basic operation of SIMATIC MV code readers.
the block are automatically generated and added to your project. This includes
user-defined data types (UDTs), the basic "Ident_Profile" block and various system
function blocks (SFCs and SFBs).
In TIA Portal, you can find the Ident blocks in "Instructions" > "Optional packages"
> "SIMATIC Ident".
MV Basics
Entry ID: 109757269, V1.0, 04/2018 10
2 Engineering
4. In "Basic parameter", select your MV4x0 from the "Ident device" drop-down
menu.
5. Select the "Ident Channel_1" module and click the green check mark.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 11
2 Engineering
7. Go to "Reader parameters" and select the MV program that will be used after
performing the reset. If the MV 4x0 is accessible online in TIA Portal via the set
IP address, the MV4x0 home page is displayed. "Adjustment" allows you to
parameterize the MV4x0.
Siemens AG 2018 All rights reserved
8. Now you have created the technology object for the first channel of the
communication module. The DB generated during this process can now be
directly interconnected with the "HW_CONNECT" input of the Ident blocks.
Note You have to create a separate technology object for each SIMATIC MV code
reader in your project.
Note Technology objects must not be copied. They must always be created in the
project itself to ensure correct addressing of the interface module/reader.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 12
2 Engineering
Table 2-2
Parameter Description
resetMv Starts the reset job
readMv Starts the read job
setMvProgram Starts the program change
setDisa Starts 'set DISA'
resetDisa Starts 'reset DISA'
numberMvProgram Program number
Range of values: 0x01 … 0x0F
hwConnect Address tag
mvData Data buffer for the read data; only an array of bytes with variable
length is allowed
lenData Length of the read data
mvState "RUN" = evaluation mode
"STOP" = stop or setup mode
"SF" = group error, must be acknowledged with a "reset"
disa "TRUE" = DISA is active,
"FALSE" = DISA is not active
MV Basics
Entry ID: 109757269, V1.0, 04/2018 13
2 Engineering
Parameter Description
done Job successfully completed.
busy Job active.
error Job completed with error.
status Error message regarding an erroneous job (ERROR = true).
The "resetMV" and "setMvProgram" parameters were created as InOut tags. After
successful execution of the command, these parameters are reset to "FALSE".
"Reset_Reader" functionality
The "Reset_Reader" block sets the reader to ready for operation. When the block
is executed, all settings made in the technology object are transferred to the
reader.
Executing the block additionally cancels running jobs of the reader and
acknowledges reader errors.
Note Always use the "Reset_Reader" block in conjunction with the technology object.
The "PROGRAM" input parameter is ignored by the technology object.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 14
2 Engineering
Table 2-4
Parameter Description
EXECUTE Starts the reset job
HW_CONNECT Address tag
"Set_MV_Program" functionality
The "Set_MV_Program" block allows you to change the program in a camera. The
"PROGRAM" parameter is used to transfer the desired program number.
Figure 2-5
Siemens AG 2018 All rights reserved
Table 2-5
Parameter Description
EXECUTE Starts the program change
PROGRAM Program number
Range of values: 0x01 … 0x0F
HW_CONNECT Address tag
"Read_MV" functionality
The "Read_MV" block reads out the read result of a camera. Based on the length
of the created receive buffer, the camera automatically determines the length of the
data to be read. The actual length of the read result is output in the "LEN_DATA"
output parameter. The data is stored in the "IDENT_DATA" data buffer. If the buffer
is too small, the "0xE7FE0400" error message appears and "LEN_DATA" outputs
the length to be expected.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 15
2 Engineering
Table 2-6
Parameter Description
EXECUTE Starts the read job
HW_CONNECT Physical address starting with which the transponder data is read
IDENT_DATA Data buffer for the read data; only an array of bytes with variable
length is allowed
LEN_DATA Length of the read data
Note Change the length of the "IDENT_DATA" data type such that it is as close as
possible to the maximum expected length of the read result (2 bytes code length
+ read code). This ensures that optimum speed is achieved.
"Write" functionality
The "Write" block writes process data to the SIMATIC MV code reader. The
"ADDR_TAG" and "LEN_DATA" parameters are used to define the reader memory
area to be written. The data to be written is provided via the "IDENT_DATA"
parameter.
Siemens AG 2018 All rights reserved
Table 2-7
Parameter Description
EXECUTE Starts the write job
ADDR_TAG Physical address starting with which the process data is written to
the MV code reader
LEN_DATA Length of the data to be written
HW_CONNECT Address tag
IDENT_DATA Data buffer for the transponder data to be written; only an array of
bytes with variable length is allowed
In this automation task, this block is used as an example of setting / resetting the
DISA functionality.
Setting DISA implements the following functions:
Disable manual key operation via WBM
Error acknowledgment
Start reader
MV Basics
Entry ID: 109757269, V1.0, 04/2018 16
2 Engineering
NOTICE The DISA bit must not be set during a firmware update.
If you control the reader using an automation system, you must ensure that the
DISA bit is not set during the firmware update. This prevents an automation
system from setting the reader to RUN and interrupting the firmware update.
Siemens AG 2018 All rights reserved
MV Basics
Entry ID: 109757269, V1.0, 04/2018 17
2 Engineering
Note It is not recommended to work directly with the "Ident_Profile" block if the Ident
blocks can implement the required RFID functionalities.
The Ident profile is based on the standardized "Proxy Ident Function Block"
protocol. For the specification of the protocol, please refer to the PROFIBUS User
Organization (\10\).
The diagnostic function allows you to monitor the devices configured in the
technology object.
Requirements
An online connection has been established between TIA Portal and the
S7 CPU.
The Ident instruction is called in the user program.
A technology object was created and downloaded to the S7 CPU.
The S7 CPU is in "RUN".
Procedure
Proceed as follows to open the display editor for the diagnostic function.
9. In the project tree, open the "Technology objects" folder.
10. In the project tree, open the relevant technology object.
11. Double-click the "Diagnostics" object.
12. Click the "Monitor all" icon to enable monitoring mode.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 18
2 Engineering
Figure 2-8
Display
The diagnostics display shows the last 5 occurred error messages, including the
Siemens AG 2018 All rights reserved
Figure 2-9
MV Basics
Entry ID: 109757269, V1.0, 04/2018 19
2 Engineering
The following values of the technology object are read and displayed:
Table 2-8
Values displayed Description
Date and time Displays the date and time when the error occurred.
Command Displays the command where the error occurred.
Error description Displays a brief description of the error that occurred.
Note: The table displays and describes the last five error
messages. When a new error message is displayed, the
previously displayed error messages are moved down one
row. The table does not display more than the last five error
messages.
Error message was selected
Error message Displays the error code of the error that occurred.
(Error code)
Error description Displays a more detailed description of the error that occurred.
Date and time Displays the date and time when the error occurred
Command code Displays the command code of the command where the error
occurred.
Command Displays the command where the error occurred.
Attribute Displays the attribute of the command where the error
occurred.
Siemens AG 2018 All rights reserved
MV Basics
Entry ID: 109757269, V1.0, 04/2018 20
2 Engineering
2.8 Configuration
This chapter shows the configuration steps necessary to create a project with the
SIMATIC S7 CPU and SIMATIC MV420 / MV440 readers.
Note Follow the instructions in this chapter if you are using alternative hardware.
If you are using identical hardware (see chapter "1.3 Components used"), the
below configuration steps do not need to be performed; they have already been
included in this project. Continue with chapter "2.10 Installation and startup".
MV Basics
Entry ID: 109757269, V1.0, 04/2018 21
2 Engineering
13. In the dialog that appears, select the S7 CPU you are using. Make sure that
the CPU has a PROFINET port or add a PROFINET CP to the CPU. Confirm
with "OK".
Siemens AG 2018 All rights reserved
4. Go to the "Network view"; in the "Hardware Catalog", click "Other field devices"
> "PROFINET IO" > "Ident Systems" > "Siemens AG" > "SIMATIC Code
Reading Systems" > " MV44x" > "Ident profile V7.0". Use drag and drop to
move the MV440 ("6GF344*-*****") from the hardware catalog to your
workspace and connect the PROFINET port to the CPU.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 22
2 Engineering
Siemens AG 2018 All rights reserved
5. When parameterizing the submodules, make sure to assign the same address
range to "I address" and "Q address".
MV Basics
Entry ID: 109757269, V1.0, 04/2018 23
2 Engineering
Siemens AG 2018 All rights reserved
MV Basics
Entry ID: 109757269, V1.0, 04/2018 24
2 Engineering
MV Basics
Entry ID: 109757269, V1.0, 04/2018 25
2 Engineering
MV Basics
Entry ID: 109757269, V1.0, 04/2018 26
2 Engineering
Note The above section provides only a rough explanation of the steps for adjusting
object recognition. For detailed information, refer the MV440 operating
instructions or the web user interface online help.
Note Make sure that the Automation License Manager and the MV plug-in have the
same bit version (32- or 64-bit).
Siemens AG 2018 All rights reserved
Note Once the license has been transferred, disconnect from the MV440 target
system.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 27
2 Engineering
Hardware configuration
The following figure shows the hardware configuration of the application.
Figure 2-10
L+ (24V)
M (0V)
PROFINET IE
SIMATIC MV440
PROFINET IE
Note Always follow the installation guidelines for SIMATIC S7-1500 (\6\), SIMATIC
S7-1200 (\7\) and SIMATIC MV440 (\4\).
MV Basics
Entry ID: 109757269, V1.0, 04/2018 28
2 Engineering
Startup
This chapter describes the steps for starting up the sample code.
1. Wire your hardware.
2. Open the application example in TIA Portal.
3. If you are using alternative hardware, perform the configurations described in
chapter "2.8 Configuration".
4. Assign an IP address from the IP range of the configured S7 CPU of the
application example to your programmer or customize the IP address of the
CPU to your preferences.
1. Download the user program to your S7 CPU. To do this, select the S7 CPU in
your project tree and then click "Download to device".
Siemens AG 2018 All rights reserved
MV Basics
Entry ID: 109757269, V1.0, 04/2018 29
3 How to Use the Application Example
MV Basics
Entry ID: 109757269, V1.0, 04/2018 30
3 How to Use the Application Example
The sections contain the tags – from the "Interface" data block – to be modified and
monitored. These tags are directly linked to the "MV_Control" block.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 31
3 How to Use the Application Example
2. The "done", "error" and "status" tags allow you to check whether or not the job
has successfully completed.
3. An erroneous job has occurred only if the "error" tag is set. In this case, a hex
error code is automatically written to the "status" tag. This error code allows
you to diagnose the cause of the error.
Siemens AG 2018 All rights reserved
2. The "done", "error" and "status" tags allow you to check whether or not the job
has successfully completed.
3. An erroneous job has occurred only if the "error" tag is set. In this case, a hex
error code is automatically written to the "status" tag. This error code allows
you to diagnose the cause of the error.
4. After a successful job, you will find the read data in the "IdentData" data block
in the "readData" tags.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 32
3 How to Use the Application Example
2. The "done", "error", "status", "stateMv" and "stateDisa" tags allow you to check
whether or not the job has successfully completed.
An erroneous job has occurred only if the "error" tag is set. In this case, a hex
error code is automatically written to the "status" tag. This error code allows
you to diagnose the cause of the error.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 33
3 How to Use the Application Example
2. The "done", "error", "status", "stateMv" and "stateDisa" tags allow you to check
whether or not the job has successfully completed.
3. An erroneous job has occurred only if the "error" tag is set. In this case, a hex
Siemens AG 2018 All rights reserved
error code is automatically written to the "status" tag. This error code allows
you to diagnose the cause of the error.
2. Right-click any row of the watch table. Go to "Modify" and then left-click
"Modify now". This transfers the entered values directly to the data block of the
S7 CPU.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 34
3 How to Use the Application Example
4. The "done", "error" and "status" tags allow you to check whether or not the job
has successfully completed.
5. An erroneous job has occurred only if the "error" tag is set. In this case, a hex
error code is automatically written to the "status" tag. This error code allows
you to diagnose the cause of the error.
Siemens AG 2018 All rights reserved
MV Basics
Entry ID: 109757269, V1.0, 04/2018 35
4 Tips and Tricks
A byte (byte 2) where the "IN_OP", "TRD", "RDY", "READ", "MATCH", "N_OK" bits
are encoded according to the status byte is stored in the result string. This binary
value can have a value to which no printable character corresponds, e.g. 0hex.
The assignment is shown in the following table:
Table 4-1
Bit position Assignment
7 Reserved
6 Current state of trigger input
5 N_OK
4 MATCH
3 READ
2 RDY
1 TRD
0 IN_OP
You can evaluate these bits or use them to control functions as required for your
automation task.
MV Basics
Entry ID: 109757269, V1.0, 04/2018 36
4 Tips and Tricks
MV Basics
Entry ID: 109757269, V1.0, 04/2018 37
4 Tips and Tricks
MV Basics
Entry ID: 109757269, V1.0, 04/2018 38
5 Links & Literature
\3\ SIMATIC Ident RFID systems Ident profile and Ident blocks, standard function for
Ident systems
https://support.industry.siemens.com/cs/ww/en/view/106368029
\4\ SIMATIC MV420 / SIMATIC MV440 V7.0
https://support.industry.siemens.com/cs/en/en/view/84553392
\5\ SIMATIC Ident RFID systems ASM 456 interface module - Operating Instructions
https://support.industry.siemens.com/cs/ww/en/view/21230460
https://support.industry.siemens.com/cs/en/en/view/109745995
\9\ Industrial Identification with SIMATIC Ident in the Siemens Industry Online Support
https://support.industry.siemens.com/cs/ww/en/view/109477926
6 History
Table 6-1
Version Date Modifications
V1.0 04/2018 First version
MV Basics
Entry ID: 109757269, V1.0, 04/2018 39