Sie sind auf Seite 1von 39

Running a SIMATIC

MV400 via PROFINET


as a Technology
Objekt
Siemens
SIMATIC MV / PROFINET / SIMATIC S7-1200/1500 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109757269 Support
Legal information

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

3 How to Use the Application Example ............................................................ 30


4 Tips and Tricks ................................................................................................ 36
5 Links & Literature ............................................................................................ 39
6 History............................................................................................................... 39

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

A large number of interface and communication modules are available to integrate


the SIMATIC Ident modules into a SIMATIC control system.
For running the SIMATIC MV modules on SIMATIC S7 controllers, suitable function
blocks are available for programming using STEP 7 TIA Portal.
Depending on the preferred transmission type, the user has to select the
appropriate communication module.

Objective of this configuring aid


The aim of this application example is to directly connect the MV readers to the
control system via PROFINET. SIMATIC MV420 / MV440 is used as the MV
system for identification using 1D/2D codes, labeling and/or shapes.
The goal of this application example is to support you in commissioning your
SIMATIC Ident modules. The application example mainly focuses on the ready-to-
use blocks of the "SIMATIC Ident" library. It additionally describes the project
engineering and configuration of the SIMATIC Ident modules.
The focal point of this application example is the use of the Ident technology object
that allows easy and convenient configuration of the SIMATIC MV4x0 readers.

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

1.2 Mode of operation


Sequence of the core functionality
Figure 1-3

Trigger Display
reset job result

Trigger
Trigger Trigger
Set_MV_
Program read write

Data
storage

Display Display Display


job result job result job result
 Siemens AG 2018 All rights reserved

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.

1.3 Components used


Prerequisites and restrictions
This application deals only with receiving and evaluating the data of the MV440. It
only provides a partial description of setting up the MV440.
The following components are required to implement the solution:
 SIMATIC MV440 plus accessories (lens, ring light, lens protection)
 PG/PC with browser, including 32-bit Java Runtime Environment
Depending on the application, the user must determine the suitable MV440
resolution, lens and lighting.

MV Basics
Entry ID: 109757269, V1.0, 04/2018 6
1 Introduction

This application example was created with the following components:

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

Sample files and projects


The following list contains all files and projects that are used in this example:
Table 1-3
Component Note
109757269_SIMATIC_MV440_PN_S7-1200_TO.zip This zip file contains the STEP 7
project for the SIMATIC S7-1200.
109757269_SIMATIC_MV440_PN_S7-1500_TO.zip This zip file contains the STEP 7
project for the SIMATIC S7-1500.
109757269_SIMATIC_MV440_PN_TO_en.pdf This document.

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.

2.1 Complete overview


The diagrammatic representation below shows the interaction between the user
program and the SIMATIC hardware:
Figure 2-1

User program
Ident blocks

Reset_
Reader
Set_MV_
Program
Read_MV Write …

Hardware
 Siemens AG 2018 All rights reserved

SIMATIC S7 controllers

Interface modules

SIMATIC MV code readers


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

OB 1 cycle MvControl Data storage

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.

2.2 Basics of using the Ident blocks


To be able to use the Ident blocks, the following requirements must be met:

Call of the blocks


When an Ident block is called in TIA Portal, all required software components for
 Siemens AG 2018 All rights reserved

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".

Addressing of the blocks


All Ident blocks have an INOUT parameter called "HW_CONNECT". Via this
interface, the blocks are provided with the address information of the configured
interface module/reader. To this end, a data block for this address information is
automatically generated when creating a technology object.
For more information about using the technology object, please refer to the next
chapter, "2.3 Explanation of the technology object".

Edge-triggered execution of the blocks


All Ident blocks have an input parameter called "EXECUTE". Execution of the
respective RFID functionality of the blocks is started via this parameter. Please
note that the "EXECUTE" input responds only to positive edges. This means that
the blocks must be executed with a logic 0 ("false") at the EXECUTE parameter
before they can detect the change to 1 ("true") in a later CPU cycle.
Therefore, after successful or unsuccessful processing of the Ident blocks, it is
important that the EXECUTE parameter be set to 0 ("false") to be able to start the
block again at a later time.
Please see also chapter "4. Tips and Tricks".

Reset of the blocks


Before a SIMATIC MV code reader can execute its function, a reset must be
performed. The "Reset_Reader" block is available for this purpose.

MV Basics
Entry ID: 109757269, V1.0, 04/2018 10
2 Engineering

2.3 Explanation of the technology object


The "HW_CONNECT" input parameter of the Ident blocks is used to address the
configured interface modules/readers and requires "TO_IDENT" as the data type.
This data type is automatically generated when creating a technology object.

Creating a technology object


The following description explains how to create a technology object:
1. In the project tree, open the CPU folder.
2. Open the "Technology objects" folder and double-click "Add new object".
3. Select the "TO_Ident" row and click "OK" (if necessary, select block version
V5.0).
 Siemens AG 2018 All rights reserved

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

6. The "basic parameters" are displayed as shown below.

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

2.4 Explanation of the "MvControl" block


The "MvControl" block is a complex block for controlling and monitoring the
SIMATIC MV4x0 code readers. This block implements the following functions:
 Reset MV4x0 with and without program change
 Trigger MV4x0 and transfer result string to PLC
 Change MV program
 Set / reset DISA function
Among other things, it includes an example of the Ident blocks' status and error
handling. These blocks are explained in detail in chapter 2.5 and the following
chapters.
The block was created in SCL and commented in the source code.

Program details about the block


Figure 2-3
 Siemens AG 2018 All rights reserved

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".

2.5 Explanation of the Ident blocks


This chapter explains the most important Ident blocks.

General output parameters of the Ident blocks


All Ident blocks share the following output parameters:
Table 2-3
Parameter Description
DONE Job successfully completed.
 Siemens AG 2018 All rights reserved

BUSY Job active.


ERROR Job completed with error.
STATUS Error message regarding an erroneous job (ERROR = true).
PRESENCE Not relevant to MV4x0.

"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.

Program details about the block


Figure 2-4

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.

Program details about the block

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.

Program details about the block


Figure 2-6

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

Program details about the block


Figure 2-7

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

2.6 Explanation of the "Ident_Profile" block


All Ident blocks are based on the "Ident_Profile" block. The simplified Ident blocks
run the Ident profile with the suitable parameter interconnection for the respective
RFID functionality. Therefore, the blocks are a simplified interface of the Ident
profile.

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\).

2.7 Diagnostics and error messages


If an error has occurred, the "STATUS" output parameter of the Ident blocks
provides different hex codes. For the meaning of the codes, please refer to the
"SIMATIC Ident RFID systems Ident profile and Ident blocks, standard function for
Ident systems" manual (\3\), chapter 4 "Error messages".
 Siemens AG 2018 All rights reserved

2.7.1 Block diagnostics in the technology object

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

error code, time stamp and error description.


The following figure shows an example of the diagnostics display in the technology
object.

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".

1. Open your TIA Portal V14 SP1.


2. Create a new project.
3. In the TIA Portal project tree, double-click "Add new device".
 Siemens AG 2018 All rights reserved

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".

6. Open an FC, FB or OB in which you want to call the Ident blocks.


7. In TIA Portal, navigate to "Instructions" > "Optional packages" > "SIMATIC
Ident". Drag the Ident blocks you require to the block you have just opened:
8. Assign the required values/tags to the parameter interfaces of the Ident blocks.
9. Download the user program and the hardware configuration to your S7 CPU.
To do this, select the S7 CPU in your project tree and then click "Download to
device".

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

2.9 Configuring MV420 / MV440


This chapter shows the settings for communication with the PLC and an example
of creating programs for reading 1D and 2D codes.

Communication parameter settings


1. In the "Connections" > "Interfaces" applet, make sure that "IP mode" is set to
"PROFINET (Ident profile)". If necessary, change the setting.
 Siemens AG 2018 All rights reserved

2. Go to the "Integration" applet.


3. Changing the settings restarts the MV440.
4. In the "Connections" > "Integration" applet, check the connection settings for
"Source", "String", "Result" and "Control". For these values, "PROFINET IO"
must be selected from the drop-down menu. If necessary, change these
settings.

MV Basics
Entry ID: 109757269, V1.0, 04/2018 25
2 Engineering

5. Save these settings in the MV440.


 Siemens AG 2018 All rights reserved

Parameterizing the MV440


To adjust the MV440 to the environmental conditions, the first step is to make the
exposure and focus settings in the "Adjustment" section.
1. To do this, place an object in the field of view of the MV440 (e.g., a DMC).
2. Use the focus on the lens and exposure settings to get a sharp, evenly
illuminated image.
3. Use the 3 set screws to lock the focus ring on the lens in place.

4. Finally, the result of the evaluation is defined as a string.

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.

Optional installation of licenses


When using advanced functions such as object recognition, code quality
verification or OCR, the license required for this function must be transferred to the
MV440. This is done using the Automation License Manager (ALM).
The product DVD supplied with the camera contains the MV plug-in for the ALM.
This plug-in must be installed first. For a detailed description, refer to chapter 7.3 of
the MV440 manual.
https://support.industry.siemens.com/cs/ww/en/view/84553392
To transfer a license, the reader must be in STOP.

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

2.10 Installation and startup


This chapter shows the steps necessary to install and start up the example using
the code from the download and the components from the hardware list.

Hardware configuration
The following figure shows the hardware configuration of the application.
Figure 2-10

L+ (24V)

M (0V)

SIMATIC S7-1500 SIMATIC S7-1200


 Siemens AG 2018 All rights reserved

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\).

Installing the software (download)


This chapter describes the steps for installing the sample code.
1. Install TIA Portal V14 SP1 or higher.
2. The Step 7 V14 SP1 project is available on the HTML page from which you
downloaded this document (\2\). Save the
"109757269_SIMATIC_MV440_PN_S7-xxx_TO.zip" project (depending on the
CPU) to your hard drive.
3. Unzip the file.
4. In TIA Portal, open the project you have just unzipped:
"Project" > "Open" > "Browse".

MV Basics
Entry ID: 109757269, V1.0, 04/2018 28
2 Engineering

5. The project is now available to you.

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

3 How to Use the Application Example


The application example is controlled using a watch table.
This chapter describes how to use the application example.

Description of the watch table


The following figure shows the watch table for using the application example:
Figure 3-1
 Siemens AG 2018 All rights reserved

The watch table is divided into four sections.


 Input: tags for controlling the "MV_Control" block
 Output: operating state of the block
 State MV: operating state of the MV440
 Result: length and result of the result string.

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.

Using the watch table


This chapter describes the steps for using the sample code.
1. Double-click to open the "ControllingInterface" watch table from the project
tree.
 Siemens AG 2018 All rights reserved

2. In the watch table, click "Monitor all".

MV Basics
Entry ID: 109757269, V1.0, 04/2018 31
3 How to Use the Application Example

Executing a reset command


1. To do this, right-click the row of the "executeResetMv" tag, select "Modify" and
left-click "Modify to 1".

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

Executing a read command


1. To do this, right-click the row of the "executeReadMv" tag, select "Modify" and
left-click "Modify to 1".

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

Executing a SetDisa command


1. Execute a setDisa command. To do this, right-click the row of the
"executeSetDisa" tag, select "Modify" and left-click "Modify to 1".
 Siemens AG 2018 All rights reserved

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

Executing a ResetDisa command


1. Execute a resetDisa command. To do this, right-click the row of the
"executeResetDisa" tag, select "Modify" and left-click "Modify to 1".

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.

Executing a Set_MV_Program command


1. Enter your desired program parameters in the "numberMvProgram" tag in the
fields of the "Modify Value" column. In this example, the value for
"numberMvProgram" is set to 0x02 to select program 2 of the reader.

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

3. Now execute a "SetMvProgram" command. To do this, right-click the row of the


"executeSetMvProgram" tag, select "Modify" and left-click "Modify to 1".

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

4 Tips and Tricks


This chapter additionally provides a number of tips and tricks to optimize your
SIMATIC MV applications.

Outputting binary results of the read operation


The binary results of the read operation can be included in the format text output:
In the "Total read result" program step, prefix all other formatting instructions with
"%b". Save the settings in the program.
Figure 4-1
 Siemens AG 2018 All rights reserved

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

Checking the data buffer in the interface module / MV4x0


If you have logged in as the "Service" user and triggered the MV440 for test
purposes in "RUN" mode, the read results are buffered in the data buffer of the
reader / interface module and not transferred to the PLC. When the PLC takes
control again, this results in an offset of the read data.
Before executing a read command, make sure that the cyclic output parameters
"uin2" and "uin3" in the "Ident_Instance" are set to "FALSE". If this is not the case,
execute a "resetMv" without program change. This clears the data buffer and the
MV440 can correctly execute the read command.
Figure 4-2
 Siemens AG 2018 All rights reserved

Executing chained commands


The "Ident_Profile" and "AdvancedCMD" blocks allow you to send chained
commands to the readers. By sending multiple command frames in one call, you
can reduce the communication load on the fieldbus, which additionally reduces the
processing time.

MV Basics
Entry ID: 109757269, V1.0, 04/2018 37
4 Tips and Tricks

Visit our SIMATIC Ident guide


The "Industrial Identification with SIMATIC Ident in the Siemens Industry Online
Support" guide (\9\) provides you with a large number of SIMATIC Ident-related
application examples and more information on the topic.
 Siemens AG 2018 All rights reserved

MV Basics
Entry ID: 109757269, V1.0, 04/2018 38
5 Links & Literature

5 Links & Literature


Table 5-1
Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Download page of the entry
https://support.industry.siemens.com/cs/ww/en/view/109757269

\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

\6\ SIMATIC S7-1500, ET 200MP Automation System


https://support.industry.siemens.com/cs/ww/en/view/59191792

\7\ SIMATIC S7 S7-1200 Programmable Controller


https://support.industry.siemens.com/cs/ww/en/view/109478121

\8\ SIMATIC MV420 / MV440 firmware update version 7.0.2


 Siemens AG 2018 All rights reserved

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

\10\ PROFIBUS User Organization home page


http://www.profibus.com/

6 History
Table 6-1
Version Date Modifications
V1.0 04/2018 First version

MV Basics
Entry ID: 109757269, V1.0, 04/2018 39

Das könnte Ihnen auch gefallen