Lenze DDS Function library MemDrv User Manual

L
Manual
Global Drive PLC Developer Studio
Global Drive
Function library
LenzeMemDrv.lib
The function library LenzeMemDrv.lib can be used for the following Lenze PLCs:
Type from hardware version from software version
9300 Servo PLC EVS93XX−xI 6A 6.0
9300 Servo PLC EVS93XX−xT 6A 6.0
Drive PLC EPL10200 1A 6.0
ECSxA ECSxAxxx 1C 7.0
Important note :
The software is supplied to the user as described in this document. Any risks resulting from its quality or use remain the responsibility of the user. The user must provide all safety measures protecting against possible maloperation.
We do not take any liability for direct or indirect damage, e.g. profit loss, order loss or any loss regarding business.
2002 Lenze Drive Systems GmbH
No part of this documentation may be copied or made available to third parties without the explicit written approval of Lenze Drive Systems GmbH.
All information given in this online documentation has been carefully selected and tested for compliance with the hardware and software described. Nevertheless, discrepancies cannot be ruled out. We do not accept any responsibility or liability for any damage that may occur. Required corrections will be included in updates of this documentation.
Windows, Windows NT and MS−DOS are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A and/or other coun­tries. IBM and VGA are registered trademarks of International Business Machines, Inc. All other product names are trademarks of the corresponding owners.
Version 1.1 07/2002 − TD05
Function library LenzeMemDrv.lib

Contents

1 Preface and general information 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 About this Manual 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Conventions used in this Manual 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 Layout of the descriptions 1−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.3 Pictographs used in this Manual 1−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.4 Terminology used 1−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Version identifiers of the function library 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Introduction 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 General information about the memory management 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Overview of the memory management functions 2−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Functions supported by Lenze PLCs 2−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2 Backup memory of Lenze PLCs 2−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 General memory functions 3−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Overview 3−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 L_MemGetStateDriver 3−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 L_MemGetStateOfMemory 3−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Functions for RAM memory access 4−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1 Overview 4−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 L_MemCopyFromRam 4−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 L_MemCopyToRam 4−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4 L_MemReadDINT 4−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5 L_MemReadDWORD 4−7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 L_MemReadINT 4−8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.7 L_MemReadWORD 4−9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.8 L_MemWriteDINT 4−10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.9 L_MemWriteDWORD 4−11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.10 L_MemWriteINT 4−12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.11 L_MemWriteWORD 4−13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 Functions for FLASH memory access 5−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1 Overview 5−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 L_MemClearFlash 5−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 L_MemLoadRamFromFlash 5−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4 L_MemSaveRamToFlash 5−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
l
LenzeMemDrv.lib EN 1.1
i
Function library LenzeMemDrv.lib
Contents
ii
LenzeMemDrv.lib EN 1.1
l
Function library LenzeMemDrv.lib
Preface and general information

1 Preface and general information

1.1 About this Manual

This Manual contains information about the LenzeMemDrv.lib function library for the Drive PLC Developer Studio.
· The LenzeMemDrv.lib function library includes functions for read/write access to the
additional backup memory (RAM, FLASH) of the PLC.
1.1.1 Conventions used in this Manual
This Manual uses the following conventions to distinguish between different types of information:
Variable identifiers
are written in italics in the explanation:
· Use bReset..."
Tip!
Information about the conventions used for the variables of the Lenze system blocks, function blocks and functions can be found in the appendix of the DDS online documentation Introduction into IEC61131−3 programming". The conventions ensure universal and uniform labelling and make reading the PLC program easier.
Lenze functions/function blocks
can be recognized by their names. They always begin with an L_":
· Use the function L_MemCopyToRam..."
Program listings
are written in Courier", keywords are printed in bold:
· IF (ReturnValue < 0)THEN..."
l
LenzeMemDrv.lib EN 1.1
1−1
Function library LenzeMemDrv.lib
Preface and general information
1.1.2 Layout of the descriptions
All function/function block and system block descriptions contained in this Manual have the same structure:
 
Function Function block (FB)/
Headline stating the function and the function identifierDeclaration of the function:
· Data type of the return value
· Function identifier
· List of transfer parameters
Short description of the most important propertiesFunction chart including all
associated variables
· Transfer parameters
· Return value
Table giving information about the
transfer parameters:
· Identifiers
· Data type
· Possible settings
· Info
Table giving information about the
return value:
· Data type of the return value
· Possible return values and their
meaning:
– The return values are listed
according to priority in descending order, i.e. the return value with the highest priority is listed first.
Additional information
(Notes, tips, application examples, etc.)
System block (SB)
FB/SB chart including all associated variables
· Input variables
· Output variables
Table giving information about the input and output variables:
· Identifiers
· Data type
· Type of variable
· Possible settings
· Info
1.1.3 Pictographs used in this Manual
Use of pictographs
Warning of material damage
More notes Tip!
Signal words
Stop! Warns of potential damage to material.
Note!
1.1.4 Terminology used
Term In the following text used for
DDS Drive PLC Developer Studio
FB Function block
GDC Global Drive Control (parameterization program from Lenze)
Parameter codes Codes for setting the functionality of a function block
SB System block
Possible consequences if disregarded: Damage to the controller/drive system or its environment
Indicates a tip or note.
.
1−2
LenzeMemDrv.lib EN 1.1
l
Function library LenzeMemDrv.lib
Preface and general information

1.2 Version identifiers of the function library

The version of the function library can be found under the global constant C_w[Function library name]Version .
Version identifiers as of PLC software version 7.x:
Constant Meaning
C_w[FunctionLibraryName]VersionER External Release 01
C_w[FunctionLibraryName]VersionEL External Level 05
C_w[FunctionLibraryName]VersionIR Internal Release 00
C_w[FunctionLibraryName]VersionBN Build No. 00
The value of this constant is a hexadecimal code.
· In the example, "01050000" stands for version "1.05".
Example value
Version: 01 05 00 00
l
LenzeMemDrv.lib EN 1.1
1−3
Function library LenzeMemDrv.lib
Preface and general information
1−4
LenzeMemDrv.lib EN 1.1
l
Function library LenzeMemDrv.lib
Introduction

2.1 General information about the memory management

2 Introduction

2.1 General information about the memory management
Lenze PLCs offer the oppportunity to copy parts of the variable memory of the PLC (e.g. global variables, arrays, etc.) into a backup memory. In this way, you can, for instance, create recipe memories or measured−value memories.

2.2 Overview of the memory management functions

The below figure gives you an overview of the memory management functions available:
PLC variables
L_MemGetStateDriver
RAM FLASH
L_MemCopyToRam
L_MemWriteINT
L_MemWriteDINT
L_MemWriteWORD
L_MemWriteDWORD
L_MemCopyFromRam
L_MemReadINT
L_MemReadDINT
L_MemReadWORD
L_MemReadDWORD L_MemGetStateOfMemory
State functionMemory transfer function
Block 1
64 KByte
Block 2
64 KByte
Block n
64 KByte
Access via Codes Download from Lenze software tools
L_MemSaveRamToFlash
L_MemLoadRamFromFlash
L_MemClearFlash
L_MemCompareMemory
Segment 1
64 KByte
Segment 2
64 KByte
Segment n
64 KByte
Drive PLC Developer Studio
Global Drive Loader
L
Note!
The type and size of the backup memory depends on the Lenze PLC used. This is why you cannot use all functions of the LenzeMemDrv.lib function library for all Lenze PLCs.
· In the following sections you can find an overview of the functions supported by the individual
Lenze PLCs.
LenzeMemDrv.lib EN 1.1
2−1
Function library LenzeMemDrv.lib
Introduction
2.2 Overview of the memory management functions
Tip!
In addition to the functions of the LenzeMemDrv.lib, the operating system of the PLC includes codes which allow the following memory−related functions:
· Reading/writing data of a RAM block by means of autoincrement access" while the PLC
program is running (C0504 ... C0508).
· Activating a read/write protection for the FLASH memory (C2006/C2007).
Detailed information can be found in the relevant PLC Manuals.
2.2.1 Functions supported by Lenze PLCs
9300 Servo PLC Drive PLC ECSxA
General memory functions
L_MemGetStateDriver ü ü ü ^ 3−2 L_MemGetStateOfMemory ü ü ü ^ 3−3
Functions for RAM memory access
L_MemCopyFromRam ü ü ü ^ 4−2 L_MemCopyToRam ü ü ü ^ 4−4 L_MemReadDINT ü ü ü ^ 4−6 L_MemReadDWORD ü ü ü ^ 4−7 L_MemReadINT ü ü ü ^ 4−8 L_MemReadWORD ü ü ü ^ 4−9 L_MemWriteDINT ü ü ü ^ 4−10 L_MemWriteDWORD ü ü ü ^ 4−11 L_MemWriteWORD ü ü ü ^ 4−13 L_MemWriteINT ü ü ü ^ 4−12
Functions for FLASH memory access
L_MemClearFlash ü ^ 5−2 L_MemLoadRamFromFlash ü ^ 5−3 L_MemSaveRamToFlash ü ^ 5−5
2.2.2 Backup memory of Lenze PLCs
9300 Servo PLC Drive PLC ECSxA
RAM 2 64−kbyte blocks 2 64−kbyte blocks 2 64−kbyte blocks
FLASH 15 64−kbyte segments
2−2
LenzeMemDrv.lib EN 1.1
L
Function library LenzeMemDrv.lib
General memory functions

3.1 Overview

3 General memory functions

3.1 Overview
9300 Servo PLC Drive PLC ECSxA
L_MemGetStateDriver ü ü ü ^ 3−2 L_MemGetStateOfMemory ü ü ü ^ 3−3
L
LenzeMemDrv.lib EN 1.1
3−1
Loading...
+ 23 hidden pages