You are on page 1of 17

Block library LSDR

(Library SIMOCODE
Data Records)
Siemens
SIMOCODE pro V PN, TIA Portal Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109745043 Support
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete with regard to
configuration, equipment or any contingencies. The Application Examples do not
represent customer-specific solutions. They are only intended to provide support for
typical applications. You are responsible for the correct operation of the described
products. These Application Examples do not relieve you of the responsibility of safely
and professionally using, installing, operating and servicing equipment. When using these
Application Examples, you recognize that we cannot be made liable for any
damage/claims beyond the liability clause described. We reserve the right to make
changes to these Application Examples at any time and without prior notice. If there are
any deviations between the recommendations provided in this Application Example and
other Siemens publications – e. g. catalogs – the contents of the other documents shall
have priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of fundamental contractual obligations (“wesentliche
Vertragspflichten”). The compensation for damages due to a breach of a
fundamental contractual obligation is, however, limited to the foreseeable damage,
typical for the type of contract, except in the event of intent or gross negligence or
 Siemens AG 2017 All rights reserved

injury to life, body or health. The above provisions do not imply a change of the
burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.

Security Siemens provides products and solutions with industrial security functions that support the
informa- secure operation of plants, systems, machines and networks.
tion In order to secure plants, systems, machines and networks against cyber threats it is
necessary to implement (and to maintain continuously) a holistic, state-of-the-art Industrial
Security concept. With this in mind, Siemens’ products and solutions are only part of such
a concept.
It is the client’s responsibility to prevent unauthorized access to his plants, systems,
machines and networks. Systems, machines and components should only be connected
with the company’s network or the Internet, when and insofar as this is required and the
appropriate protective measures (for example, use of firewalls and network segmentation)
have been taken.
In addition, Siemens’ recommendations regarding appropriate protective action should be
followed. For more information on Industrial Security, visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them even
more secure. Siemens explicitly recommends to carry out updates as soon as the
respective updates are available and always only to use the current product versions. Use
of product versions that are no longer supported, and failure to apply latest updates may
increase customer’s exposure to cyber threats.
In order to always be informed about product updates, subscribe to the Siemens Industrial
Security RSS Feed at http://www.siemens.com/industrialsecurity.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 2
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1 Introduction ........................................................................................................ 4
1.1 Overview............................................................................................... 4
1.2 Mode of operation ................................................................................ 5
1.3 Components used ................................................................................ 5
2 Engineering ........................................................................................................ 7
2.1 Components of the block library ........................................................... 7
2.2 Interface description LSDR_ReadRec ................................................. 8
2.2.1 Parameters ........................................................................................... 8
2.2.2 Diagnostics ........................................................................................... 9
2.3 Integration into the user project .......................................................... 10
3 Appendix .......................................................................................................... 16
3.1 Service and support ........................................................................... 16
3.2 Links and literature ............................................................................. 17
3.3 Change documentation ...................................................................... 17
 Siemens AG 2017 All rights reserved

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 3
1 Introduction

1 Introduction
1.1 Overview
SIMOCODE pro is a flexible, modular motor management system for motors with
constant speed in the low-voltage range.
The basic device SIMOCODE pro V PN can be integrated via PROFINET into a
higher-level automation system such as SIMATIC S7-1500.
Besides the cyclically exchanged control and status signals, SIMOCODE pro V PN
provides a wide range of data records which can be read or written acyclically.

Figure 1-1: Overview

SIMATIC S7-1500
 Siemens AG 2017 All rights reserved

SIMOCODE pro V PN

By means of the block library "LSDR" (Library SIMOCODE Data Records) block
library, you can read data records without much programming work and store the
data in structured PLC data types for easy access.
You can read the following data records with the block library:
 Device diagnostics
 Measurements
 Service / statistical data

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 4
1 Introduction

Figure 1-2: Example of the "LSDR_typeMeasurements" data type

1.2 Mode of operation


On request using the "RDREC” instruction, the "LSDR_ReadRec" function block
reads one of the data records "Device diagnostics", "Measurements" or "Statistics".
To allow easy access to the data, the function block stores the received serial data
 Siemens AG 2017 All rights reserved

stream with slice access and shift operations in a structured way. For this purpose,
the block library "LSDR" provides various PLC data types.

1.3 Components used


This block library "LSDR" can be used with the following hardware and software
components:

Table 1-1: Hardware and software components


Component Qty Article number Note
SIMOCODE pro V PN 1 3UF7011-1AB00 -
Current/voltage 1 3UF7110-1AA00-0 0,3 - 3 A
measuring module
Connection cable 1 3UF7932-0AA00-0 For current/voltage
measuring module
SIMATIC S7-1500 1 6ES7516-3AN01-0AB0 Alternatively
S7-1200 with FW 4.0 or
higher
STEP 7 Professional V14 1 6ES7822-1AA04-0YC5 -
SIMOCODE ES V14 1 3ZS1322-4CC12-0YA5 -

NOTE The block library is also available for download for TIA Portal V13 SP1.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 5
1 Introduction

This block library "LSDR" consists of the following components:

Table 1-2: Downloads of the block library


Component File name Note
Documentation on the 109745043_LSDR_DOC_V10_en.pdf This document
block library
Block library for 109745043_LSDR_LIB_TIAV14_V10.zip -
TIA Portal V14
Block library for 109745043_LSDR_LIB_TIAV13_V10.zip -
TIA Portal V13 SP1
 Siemens AG 2017 All rights reserved

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 6
2 Engineering

2 Engineering
2.1 Components of the block library
Blocks
Table 2-1: Blocks of the block library
Name Description
LSDR_ReadRec Reads the data records "Device diagnostics",
"Measurements" or "Statistics" of a SIMOCODE device
and stores the received data in structured data types.

Data types
Table 2-2: Main data types of the block library
Name Description
LSDR_typeControl Control and status tags for interconnecting the block
"LSDR_ReadRec"
LSDR_typeDataRecords Grouping of the data types of the following data
records:
 "LSDR_typeDeviceDiag"
 "LSDR_typeMeasurements"
 "LSDR_typeStatistics"
 Siemens AG 2017 All rights reserved

LSDR_typeDeviceDiag Structured data type of data record 92 "Device


diagnostics"
LSDR_typeMeasurements Structured data type of data record 94 "Measurements"
LSDR_typeStatistics Structured data type of data record 95 "Statistics"

Table 2-3: Auxiliary data types of the block library


Name Description
LSDR_typeDiagAM Diagnostic data of an analog module
LSDR_typeDiagEM Diagnostic data of an earth fault module
LSDR_typeDiagEventsTM Diagnostic data of events of a temperature module
LSDR_typeDiagLevels Diagnostic data of threshold exceedance
LSDR_typeDiagThermistor Diagnostic data of a thermistor
LSDR_typeDiagTM Diagnostic data of a temperature module
LSDR_typeMeasureAM Measured values of an analog module
LSDR_typeMeasureTM Measured values of a temperature module

Note The meaning of the individual tags of the data types can be found in the
"SIMOCODE pro PROFINET" system manual:
https://support.industry.siemens.com/cs/ww/en/view/61896631/82017614859

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 7
2 Engineering

Watch tables
Table 2-4: Watch tables of the library
Name Description
LSDR_ReadRec Watch table for controlling and evaluating the
"LSDR_ReadRec” function block

2.2 Interface description LSDR_ReadRec


2.2.1 Parameters

Figure 2-1: Block overview of LSDR_ReadRec

LSDR_ReadRec

Bool req done Bool

Int type busy Bool

HW_IO hwID error Bool

status Word

drDeviceDiag
 Siemens AG 2017 All rights reserved

"LSDR_typeDeviceDiag" "LSDR_typeDeviceDiag"

drMeasurements
"LSDR_typeMeasurements" "LSDR_typeMeasurements"

drStatistics
"LSDR_typeStatistics" "LSDR_typeStatistics"

Table 2-5: Parameters of LSDR_ReadRec


Name P type Data type Comment
req IN Bool Request to read a data record
type IN Int  0: data record "Device diagnostics"
 1: data record "Measurements"
 2: data record "Statistics"
hwID IN HW_IO HW identifier of the SIMOCODE basic
device
done OUT Bool Job completed
busy OUT Bool Job is being processed
error OUT Bool An error has occurred
status OUT Word Status/error code
drDeviceDiag IN_OUT "LSDR_typeDeviceDiag" Storage of data record "Device
diagnostics"
drMeasurements IN_OUT "LSDR_typeMeasurements" Storage of data record "Measurements"
drStatistics IN_OUT "LSDR_typeStatistics" Storage of data record "Statistics"

Note Create an own instance of the "LSDR_ReadRec" function block for each
SIMOCODE device the data records of which you want to read.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 8
2 Engineering

2.2.2 Diagnostics

The table below explains the status codes of the "status" output.

Table 2-6: Status codes


Status Meaning
0000 Reading of the data record completed successfully.
7000 Block is ready, no job is currently being processed.
7001 First call after job, data transfer triggered.
7002 Intermediate call after job, data transfer already active.
8001 Invalid value at the "type" parameter.
8002 New job is not accepted, as another job is already being processed.
8003 A time-out occurred, the job was not finished. Check the connection
between CPU and SIMOCODE base unit and the parameter "hwID".
> 8090 If an error occurs in the "RDREC" instruction, the status code of this
instruction is output. For its meaning, refer to the TIA Portal information
system on the "RDREC" instruction.
 Siemens AG 2017 All rights reserved

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 9
2 Engineering

2.3 Integration into the user project


To integrate the "LSDR" library into your user program, proceed as follows:

Opening the library and loading it into the project


Table 2-7: Opening the library and loading it into the project
No. Action
1. Download the file "109745043_LSDR_LIB_TIAVxx_V10.zip" and unzip the file:
https://support.industry.siemens.com/cs/ww/en/view/109745043
2. Open an existing project in TIA Portal V13 SP1 or create a new one. Create a
CPU and a SIMOCODE device.
3. Go to the project view.
4. Open the "Libraries" task card on the right.
 Siemens AG 2017 All rights reserved

5. Click on the "Open global library" icon and select the "LSDR.al13" file of the
unzipped file.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 10
2 Engineering

No. Action
6. Expand the "LSDR" library and the "Types" folder.

7. Select the block and the data types and drag and drop it to the "Program blocks"
folder of your CPU.
 Siemens AG 2017 All rights reserved

The data types are automatically stored in the "PLC data types" folder.
8. Drag and drop the "LSDR_ReadRec" watch table from the "Master copies" folder
into the "Watch and force tables" folder of your CPU.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 11
2 Engineering

Creating a global data block for the received data records


To create a global data block containing all of the three data records for a
SIMOCODE device, proceed as follows:

Table 2-8: Creating a global data block for the received data records
No. Action
1. Double-click "Add new block" in the project navigation.
2. Create a data block with the name "DataRecords" and select
"LSDR_typeDataRecords" as type.
 Siemens AG 2017 All rights reserved

The data block you have just created contains a tag for each of the three data
records.

Note As an alternative, you can create a global data block with several tags of the type
"LSDR_typeDataRecords" which contains the data records of several
SIMOCODE basic devices.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 12
2 Engineering

Connecting the "LSDR_ReadRec" function block


The block library includes the "LSDR_typeControl" data type which contains all
tags required to control and evaluate the "LSDR_ReadRec" function block.
To interconnect the "LSDR_ReadRec" function block with tags of the
"LSDR_typeControl" data type, proceed as follows:

Table 2-9: Connecting the "LSDR_ReadRec" function block


No. Action
1. Double-click "Add new block" in the project navigation.
2. Create a data block with the name "ControlReadRec" and select
“LSDR_typeControl" as type.
 Siemens AG 2017 All rights reserved

3. In the project navigation, open the "Main [OB1]" organisation block or another
block from which you want to read the data records.
4. Drag and drop the "LSDR_ReadRec" function block from the project navigation
into an empty network of the opened block.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 13
2 Engineering

No. Action
5. Assign a name such as "InstReadRec" to the instance of the function block.

6. Interconnect the parameters of the function block with the corresponding tags of
the previously created data blocks.
 Siemens AG 2017 All rights reserved

7. Double-click "Devices & networks" in the project navigation.


8. Double-click your SIMOCODE device.

9. Double-click your SIMOCODE basic device.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 14
2 Engineering

No. Action
10. In the area navigation of the inspection window, click "Hardware identifier" and
note down the HW identifier.

11. Go back to the block in which you call "LSDR_ReadRec" and enter the HW
identifier you have noted down at the "hwID" parameter.
 Siemens AG 2017 All rights reserved

12. Load the project into your CPU and control the function block via the
"LSDR_ReadRec" watch table.

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 15
3 Appendix

3 Appendix
3.1 Service and support
Industry Online Support
Do you have any questions or need support?
Siemens Industry Online Support offers access to our entire service and support
know-how as well as to our services.
Siemens Industry Online Support is the central address for information on our
products, solutions and services.
Product information, manuals, downloads, FAQs and application examples – all
information is accessible with just a few mouse clicks at
https://support.industry.siemens.com

Technical Support
Siemens Industry's Technical Support offers quick and competent support
regarding all technical queries with numerous tailor-made offers – from basic
support to individual support contracts.
Please address your requests to the Technical Support via the web form:
www.siemens.com/industry/supportrequest

Service offer
 Siemens AG 2017 All rights reserved

Our service offer comprises, among other things, the following services:
 Product Training
 Plant Data Services
 Spare Parts Services
 Repair Services
 Field & Maintenance Services
 Retrofit & Modernization Services
 Service Programs & Agreements
Detailed information on our service offer is available in the Service Catalog:
https://support.industry.siemens.com/cs/sc

Industry Online Support app


Thanks to the "Siemens Industry Online Support" app, you will get optimum
support even when you are on the move. The app is available for Apple iOS,
Android and Windows Phone.
https://support.industry.siemens.com/cs/en/en/sc/2067

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 16
3 Appendix

3.2 Links and literature


Table 3-1: Links and literature
No. Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Link to this entry
https://support.industry.siemens.com/cs/ww/en/view/109745043
\3\ System Manual SIMOCODE pro PROFINET
https://support.industry.siemens.com/cs/ww/en/view/61896631
\4\ System Manual SIMOCODE pro PROFINET – Data formats and data records
https://support.industry.siemens.com/cs/ww/en/view/61896631/82017614859
\5\ Support packages for the hardware catalog in TIA Portal (HSP)
https://support.industry.siemens.com/cs/ww/en/view/72341852

3.3 Change documentation


Table 3-2: Change documentation
 Siemens AG 2017 All rights reserved

Version Date Modifications


V1.0 01/2017 First version

LSDR block library


Entry ID: 109745043, V1.0, 01/2017 17

You might also like