The controller is a source of danger which may lead to death or severe injury of persons.
To protect yourself and others against these dangers, observe the safety instructions
before switching on the controller.
Please read the safety instructions in the mounting instructions and in the hardware manual for the 9400 Servo PLC. Both instructions are included in the scope of supply of
the drive controller.
Target group
This documentation describes the procedure for creating a project using the »L-force Engineer«
integrated development environment and the »L-force PLC Designer« software for an L-force »9400
ServoPLC«.
In the following, we only describe ways of usage with a binding character. Details of alternative
possibilities for the implementation of functions are provided for information purposes only.
Validity
The information in this documentation applies to the following standard devices / components:
Software
ProductType designationVersion
»Engineer«from 2.12
»PLC Designer«from 2.2.3
Hardware
ProductType designationHardware versionSoftware version
»9400 ServoPLC«E94AxPExxxxfrom 2Afrom 02.01
Memory modules MM340, MM440
Screenshots/application examples
All screenshots in this documentation are application examples. Depending on the firmware
version of the 9400 Servo PLC and the software version of the engineering tools installed (»PLC
Designer« or »EASY Starter«), the screenshots in this documentation may deviate from the screen
representation.
Engineering toolsSoftware solutions for easy engineering in all project stages
»EASY Navigator« – provides a good guide to the user
• All convenient Lenze engineering tools at a glance
• Tools can be selected quickly
• The clear structure simplifies the engineering process from the start
»EASY Starter« – easy-to-use tool for service technicians
• Specially designed for the commissioning and maintenance of Lenze
devices
• Graphical user interface with just a few buttons
• Easy online diagnostics, parameterisation, and commissioning
• No risk of an unintended change in applications
• Loading of ready-to-use applications to the device
»Engineer« – multi-device engineering
• For all products in our L-force portfolio
• Practical user interface
• Graphic interfaces make it easy to navigate
• Can be applied in every phase of a project (project planning,
commissioning, production)
• Parameter setting and configuration
»PLC Designer« –For programming processes
• Creating your own programs
• Programming Logic & Motion according to IEC 61131-3 (AWL, KOP, FUP,
ST, AS and CFC-Editor), based on CoDeSys V3
• Certified function blocks according to PLCopen part 1 + 2
• Graphic DIN 66025 Editor (G code) with DXF import
• Integrated visualisation for easy process visualisation
• All important information at a glance during the commissioning process
L-force ControllerThe L-force controller is the central component of the automation system which (by
means of the runtime software) controls the Logic and Motion functionalities.
The L-force Controller uses the fieldbus to communicate with the field devices.
Engineering PCThe Engineering PC and the engineering tools installed on it serve to configure and
parameterise the system.
The Engineering PC uses Ethernet to communicate with the L-force Controller.
Code"Container" for one or several parameters by means of which you can parameterise or
monitor the controller.
SubcodeIf a code contains several parameters, these are stored in "subcodes".
This Manual uses a slash "/" as a separator between code and subcode (e.g. "C00118/3").
Function block editorGraphical interconnection tool which is provided for controllers in the MotionControl
HighLevel and TopLevel license level in the »Engineer« on the FB editor tab and by means
of which the technology applications supplied can also be reconfigured and extended by
individual functions.
Function blockA function block (FB) can be compared with an integrated circuit that contains a specific
control logic and delivers one or several values when being executed.
• A n in stan ce ( repro ducti on, co py) of the f unc tion b lock i s alw ays inser ted in the ci rcuit .
• It is also possible to insert several instances of a function block in a circuit.
• Each instance has an unequivocal identifier (the instance name) and a processing
number which defines the position at which the function block is calculated during
the task cycle.
The basis of every L-force application is an easy and quick parameter setting of prepared technology
applications and solutions*.
This chapter contains basic information on the runtime software model of L-force and on how you
can establish an online connection between the PC and controller for parameter setting with
»Engineer« very easily.
At the end of this chapter you will find an overview of the different signal types & scaling which
serve to process physical values (e.g. a speed or position) within the application.
* In preparation!
2.1Parameter setting, configuring, or programming?
The graded runtime software model of L-force provides a simple and consistent solution for motion
and process tasks as well as for complex machine functions:
Runtime software
PLC levelProgramming
Freely programmable open and closed
loop control functions
Technology levelConfiguring
Motion Control TopLevel
Additional motion and process control
modes for complex drive tasks.
Motion Control HighLevel
Individual extensibility of the basic
functions & technology applications by
means of the function block editor and
the comprehensive function library.
The HighLevel and TopLevel licenses enable you to
extend the provided technology applications by
individual functions using the graphic function block
editor of »Engineer«. Here you can access the
comprehensive function libraries of Lenze which
among other things contain process controllers,
arithmetic functions, logic blocks, and ramp
generators and integrators.
Parameter setting
The StateLevel license includes a range of technology
applications which can be put into operation easily
with a keypad or via dialogs in »Engineer«.
Important basic drive functions and further basic functions are implemented in the firmware of the
controller and thus are always provided, irrespective of the runtime software licence available.
Firmware
Motion Control basic drive functionsFurther basic functionalities
• Stop
• Quick stop
• Manual jog
• Homing
• Positioning
• Position follower
• Speed follower
• Torque follower
• Limiter
• Brake control
• Drive interface
• Motor interface
• Encoder evaluation
• I/O terminals
• Safety engineering
• Logbook
• Oscilloscope
2.1.2Technology applications
Technology applications (TAs) are applications prepared by Lenze which can serve as a basis for
solving typical applications.
• The technology applications available for the Servo Drives 9400 can be selected in »Engineer«
from the application catalogue.
The following interfaces/communication modules can be used to establish communication
between the PC and controller:
• Diagnostic interface X6/Going online via diagnostic adapter
• CAN on board interface/Going online via system bus (CAN on board) ( 24)
• Optional interfaces which are provided by corresponding communication modules in the
module slots MXI1/MXI2 of the controller.
Note!
For communication with the controller, at least the control electronics of the controller
must be supplied with 24 V low voltage via plug X2. For detailed information, please see
the Mounting Instructions for the controller.
Stop!
If you change parameters in the »Engineer« while the controller is connected online, the
changes will be directly accepted by the controller!
Tip!
Detailed information about the individual interfaces can be found in the corresponding
Communication Manuals (KHB).
2.2.1Going online via diagnostic adapter
For initial commissioning of the controller you can for instance use the diagnostic adapter offered
by Lenze:
Note!
Please observe the documentation for the diagnostic adapter!
If no communication path was configured yet for the controller selected, the
Communication path dialog box is shown after the update has been carried out:
• The "Diagnostic adapter" bus connection is already preset.
3. Click on Connect.
• The dialog box is closed and the online connection with the controller is built up.
•In the Project view a yellow icon indicates the online connection with the controller:
Now you can use the icons and to easily build up and end a connection with the controller.
The communication settings are only required when communication with a controller is built up for
the first time.
• If you want to change the configured communication path, select the command Online Set
communication path and go online to open the Communication path dialog box and change the
settings.
• When an online connection has been established, the »Engineer« displays the current
parameter settings of the controller with a yellow background colour.
As an alternative to the diagnostic adapter, you can use the integrated system bus interface (CAN on
board, terminal X1) of the controller for communication.
• Lenze offers the following communication accessories for connection to the PC:
Communication accessoriesPC interface
PC system bus adapter 2173
incl. connection cable and voltage supply adapter
• for DIN keyboard connection (EMF2173IB)
• for PS/2 keyboard connection (EMF2173IBV002)
• for PS/2 keyboard connection with electrical isolation (EMF2173IBV003)
PC system bus adapter 2177
incl. connection cable (EMF2177IB)
Parallel interface
(LPT port)
USB
(Universal Serial Bus)
Note!
• For detailed information about the PC system bus adapter, please see the "CAN
Communication Manual".
• Please observe the documentation for the PC system bus adapter!
• The online connection is established as described in the previous chapter "Going
online via diagnostic adapter", only that this time the entry "CAN system bus" is to be
selected in the Bus connection list field of the Communication path dialog box.
( 22)
2.2.3Use of other communication interfaces
The controller can be extended by further communication interfaces, if required, e.g. Ethernet,
ETHERNET Powerlink, or PROFIBUS.
• For this the controller is provided with the module slots MXI1 and MXI2 for accepting
communication modules.
• Detailed information on this subject can be found in the Hardware Manual and Communication
Manual for the corresponding communication system.
It is very helpful for the parameterisation & configuration of the controller to know the signal types
and their scaling listed below, which serve to process physical quantities (e.g. a speed or position)
within the function block interconnection.
This documentation contains detailed information on parameter setting and configuration of the
controller. Sequential reading is not required.
In order to obtain the information relevant for initial commissioning, this chapter describes
different commissioning scenarios which can also be used as a guide through this manual:
A. Initial commissioning
• Target: Adapting the controller to the electromechanics and the control system.
B. Standard set-up
• Target: Taking over the application and parameter set of an already preconfigured "Engineer"
project into several controllers.
( 29)
( 30)
C. Controller replacement
• Target: Replacing a controller which has failed in a running system by a replacement device
using the "old" memory module.
D. Motor replacement
• Target: Replacing a motor which has failed in a running system.
Some parameters of the controller have a setting range depending on the device type.
If parameterisation is carried out offline or if the memory module is exchanged between
different 9400 ServoPLC device types, always check the settings of the parameters listed
in the following table and adapt them, if required, to prevent a parameter error after the
parameter set download or module change!
ParameterInfoLenze setting
C00018
C00022
C00173
C00174
Switching frequency8 kHz variable
Maximum current
Accepting/adapting plant parameters
Mains voltage and undervoltage threshold (LU)
Machine parameters
( 80)
( 172)
0.00 A
400/415 V, LU = 285 V
Tip!
The rated data of the different device types can be found in the Hardware Manual in the
"Rated data" chapter.
Term definition of "Plant parameters"
The term "plant parameters" which is frequently used in the following chapters summarises all
parameters which result from the combination of motor and load. They characterise the transfer
behaviour of the entire controlled system including the desired monitoring functions. The plant
parameters depend on the application in which the controller and motor are used.
• A display of the plant parameters offered by ENP via keypad is not provided. The plant
parameters must be edited and optimised individually.
• To avoid that the motor starts unintentionally without adjusting the plant parameters, the
maximum current in the Lenze setting is set to "0 A" in C00022
• After setting the plant parameters, they have to be saved on the memory module of the
controller with mains failure protection, just as the motor data that have been read out from
the ENP (C00002
For a motor without an electronic nameplate (ENP)
• The motor data and plant parameters must be edited and set individually.
• To avoid that the motor starts unintentionally without adjusting the plant parameters, the
maximum current is set to "0 A" in C00022
• After setting the motor data and plant parameters, they have to be saved on the memory
module of the controller with mains failure protection (C00002
= "11: Save start parameters").
by the factory.
.
= "11: Save start parameters").
Commissioning of the application
• The application must already be stored on the memory module of the controller. Otherwise
commissioning by only using the keypad is not possible.
• All application parameters which deviate from the factory adjustment have to be edited
individually. For this the project planner has to provide a corresponding list to the commissioner
(including the motor and plant data).
• In the case of a standard set-up, a pole position identification may have to be carried out for
synchronous motors of a third party manufacturer or Lenze synchronous motors with a
Stegmann absolute value encoder.
• After setting the parameters, they have to be saved on the memory module of the controller
with mains failure protection (C00002
1. Read out the motor data of the controller or select them via the »Engineer« motor catalogue.
• If the motor connected to the controller is provided with an electronic nameplate (ENP), all motor
data are automatically read out from the ENP and a selection in the motor catalogue is not required.
Reading out motor data from the controller
• If a motor without ENP or a motor by a third-party manufacturer is used, the selection is carried out
via the »Engineer« motor catalogue. Selecting a motor from the motor catalogue in the »Engineer«
( 166)
2. Select motor control
• Servo control is preset for the synchronous motor.
3. Adjusting motor and controller to each other
4. Carry out settings for selected motor control.
• For this see description for the corresponding motor control:
• Servo control (SC)
• Sensorless vector control (SLVC) ()
• V/f control (VFCplus)
• V/f control (VFCplus)
Optimise control mode:
7. Optimise control mode of the selected motor control.
• By means of traversing profile from the application and oscilloscope.
• For this see description for the corresponding motor control:
• Servo control (SC)
• Sensorless vector control (SLVC) ()
• V/f control (VFCplus)
• V/f control (VFCplus)
Save project and parameter set:
8. Execute device command C00002
9. Save »Engineer« project.
. ( 169)
()
()
()
()
= "11: Save start parameters".
( 165)
( 171)
More (optional) worksteps
Worksteps
Establish network:
1. Insert network and machine application into the »Engineer« project.
2. Interconnect port blocks reasonably to each other within the machine application.
3. Configure network (set addresses, baud rate, and process data channels in a reasonable manner).
4. Establish communication with the control system.
5. Establish communication with other drive components (e.g. HMIs, I/O extensions and other controllers).
Scenario: The controller has failed in a running system.
Note!
For the procedure described in the following it is assumed that the memory module and
possibly available extension modules in the controller, as well as the motor are not
affected by the failure and that all parameters have been saved with mains failure
protection.
Worksteps
Replacement of the controller:
1. Replace controller.
See Mounting Instructions for the controller!
2. Insert the memory module of the failed controller into the replacement device.
3. If further extension modules are plugged into the failed controller, they must be inserted into the
replacement device as well.
Further steps are not required since all data required are on the memory module.
3.6Motor replacement
Scenario: The motor has failed in a running system.
Note!
For the procedure described in the following it is assumed that the controller is not
affected by the failure.
Worksteps
Replacement of the motor:
1. Replace the motor.
See Mounting Instructions for the controller!
Note:
The motor connection on the controller is accessible without having to remove the standard device
from the installation backplane.
For a motor with an electronic nameplate (ENP):
2. Restart controller with connected motor to read out the motor data from the electronic nameplate.
• Either by switching off/switching on again the voltage supply or by means of device command
C00002
• See chap. Motor interface
3. Execute device command C00002
For a motor without an electronic nameplate (ENP):
Note:
The motor is operated with the motor data and plant data from the memory module.
= "11000: Restart controller".
Reading out motor data from the controller ( 165)
This chapter provides information on how to prepare, execute and complete a PLC programming.
The description focuses on the »PLC Designer« engineering software which serves to implement the
tasks mentioned.
Moreover, the software provides more opportunities than can be described here. More information
can be found in the associated online help of »PCL Designer«.
See also:Technical data
Task and timing frame
User task
Runtime measurement
Data consistency
Storage capacities and memory modules
Known function restrictions of the controller
The installation of »Engineer« requires a PC with the following system requirements:
• processor with 1.4 GHz or higher
• A main memory of at least 512 MB and 650 MB of free hard disk space
•Microsoft
Required software
The following engineering software is required for programming, parameterising, configuring and
diagnosing the »9400 ServoPLC«
• »PLC Designer« for programming a drive application according to IEC 61131-3
Thus, separate system blocks are available, which, if required, can be integrated in the control
configuration, and which then can be accessed from the IEC 61131-3 program via the
corresponding system variables.
• »Engineer« HighLevel for parameterising, configuring and diagnosing Lenze controllers.
Windows 2000 (service pack 2) or Windows XP
Tip!
The full version of the L-force engineering software »Engineer« HighLevel can be obtained
as single user, multiple user, company, or buyout license.
You obtain the »Engineer« engineering software by
• contacting the Lenze employee responsible for your region or
• placing the order via the following internet address:
http://www.Lenze.com
The »PLC Designer« engineering software and updates of »Engineer« and »PLC Designer«
can be downloaded for free in the download area "Services & Downloads".
An online help is also available for »PLC Designer«. It can be accessed by pressing the <F1>
button when being in the program. Many of the information that cannot be explained here
in detail, can be found there, e.g. the components described above.
When pressing the <F1> button, you start the online help of »Engineer«. In addition to the
descriptions of the Lenze controllers, the online help also contains the general
»Engineer«.
The following topics are described here. They are to be processed in the given order as a
precondition for the further descriptions in this manual:
1. Create a new project with controllers of the »9400 ServoPLC« series.
2. Select a memory module MM340 or MM440 for each controller.
3. Select the PLC application applicable for the memory module.
description of
Tip!
Please continue to use the online help as a supplementary description for the following
chapters.
After the actions mentioned above are completed, the Application parameters tab of the controller
appears in »Engineer«.
Usually, no PLC project has been assigned to the newly
respective entry, see arrow:
created device. Thus, the tab contains a
Instructions of how to export a newly created PCL application can be found in the section
Assignment of a PLC project for a newly created ServoPLC
The exchange of PLC applications between »Engineer« and »PLC Designer« takes place by means of
the Export PLC Application and Import PLC Application buttons:
• The PLC project contained in »Engineer« is exported to a separate directory by means of the
Export PLC Application button.
• Development of the PLC application in the exported PLC project directory is carried out with
»PLC Designer«.
• After these actions are completed, the application must be re-imported into »Engineer«. This is
done by pressing the Import PLC application button.
[4-1]Exchange of the PLC application between »Engineer« and »PLC Designer«
Tip!
If you want to use a PLC project that is already available, please read the section
Select an already existing project
How to import a program from »PLC Designer« into »Engineer« is described in section
Assignment of a PLC project for a newly created ServoPLC
If the PLC project has not yet been assigned, please observe the following instructions.
How to export a PLC application from the »Engineer« project
1. Click on the Export PLC application button.
• An empty or not yet available directory must be indicated for the export. For this
purpose, »Engineer« proposes a directory name which contains the ending "_PLC" in
addition to the project name:
• Contrary to the proposal of »Engineer« the directory with the project file can also be
exported into another directory.
• Neither the directory nor files may be write-protected.
2. Click the "Complete" button.
• The PLC application contained in the »Engineer« project is exported in the directory that
is named before (in the example below: "Projekt_PLC").
In this directory, a subdirectory is created for the component (»9400 ServoPLC«) of the
project which has the name of the component in the project (e.g. "9400_ServoPLC-1").
• Each of the component directories contains a file with the file type PRO, PRG, CHK and
ECI:
3. Repeat export function for further controllers (components) with PLC functionality
• Independent of the project structure in »Engineer«, all exported component directories
are saved in the same directory.
Please note that, as an exception to the Lenze setting, the directory structure of the project
can be stored differently for each axis.
The directory path of the PLC project is saved relatively to the directory of the »Engineer«
project in the »Engineer« project. The PLC project will only be saved with an absolute path
indication if the PLC project is located on a different drive than the »Engineer« project. This,
among other things, makes the transfer of the project more difficult.
The "FileSave under" menu command only serves to save the »Engineer« project in a
different directory. The PLC projects and the assignment to the PLC projects in the
»Engineer« project remain untouched.
Once a project has been assigned or exported to a directory, »PLC Designer« can be started with this
project.
Tip!
How to terminate the project is described in section
Completing the PLC project
4.2.1Starting »PLC Designer« from »Engineer«
»PLC Designer« is started from the Application parameters tab of »Engineer«:
•Click the Start »PLC Designer« button:
( 64)
»PLC Designer« starts and loads the project assigned.
In this case it is the Standard project "PLC_Application.pro"
Version of »PLC Designer«
The »Engineer« project stores the version of »PLC Designer« with which the project was edited last.
»Engineer« suggests this version for editing the PLC project.
If this version of »PLC Designer« is not installed or is a newly created project, the latest version is
suggested.
»Engineer« supplies a standard project for the controller. This standard project should generally
provide the basis of each PLC project.
The main window of »PLC Designer« shows the Object Organizer which is important for the
following descriptions with the Blocks, Data types, Visualisations and Resources:
Tab Blocks
The Blocks tab of the standard project contains
•Application (PRG)
•Idle (PRG)
•User (PRG)
•Visu (PRG)
Tab Data types
The Data types tab of the standard project contains 60 different user data type for ports.
Tab Visualisations
This tab will not be discussed in greater detail within the scope of this manual.
Tab Resources
The Resources tab of the standard project contains
• the tasks Application Task, User Task, Visu Task and Idle Task in the task configurations. The
associated description can be found in the section Configuring tasks
• 60 global variables for accessing the ports in the Ports list
• 60 user codes for mapping the ports in the parameter manager.
• the libraries IecSfc.lib, standard.lib and SysLibCallBack.lib in the library manager
( 43)
Tip!
An online help is also available for »PLC Designer«. It can be accessed by pressing the <F1>
button when being in the program.
Information that cannot be described in detail here in the manual is explained there, e.g.
the components mentioned above.
It is only permissible to use the function blocks indicated in the column "FB restrictions"
in the following table with an interval time of 1ms, 2ms, 4ms or 8ms.
Library nameInfoFB restriction
LenzeCamVxxyy.libFBs for cam functionalityall
LenzeCanMsgVxxyy.libFBs for CAN communication, transmission, and
LenzeCiA402DeviceProfileVxxyy.libFBs for implementing the CiA402 profile
LenzeDataConversionVxxyy.libData and type converters as well as bit operators
LenzeDevice9400Vxxyy.libFBs for the evaluation of application errors, states,
LenzeElectricalShaftVxxyy.libFBs for the master value processingL_EsEncoderConv,
LenzeLineDriveVxxyy.libFBs for the electrical shaftall
LenzePositioningVxxyy.libFBs for positioning
LenzeServoDriveVxxyy.libFBs for speed and position selectionsall
LenzeSysLibFileVxxyy.libFunctions for using file services
LenzeToolboxVxxyy.libFBs for arithmetic and logic operations, as well as
"xxyy": Software version ( xx = main version, yy = subversion)
In the Resources tab in the Task configuration object, the task features of the four tasks described in
the section Standard project "PLC_Application.pro"
Please make sure that the interval times of the cyclic tasks are limited to the permissible or optional
values.
TaskPriorityTypeInterval time and watchdog timeSensitivity
Application task1cyclicT = 1 ms
User task2cyclicT = 2 ms
Visu task7cyclicInterval time T = 8 ms,
Idle task8free-running
*) The value of interval times of cyclic tasks must always be selected as the power of two (e.g. 24=16ms).
( 40) can be checked.
1
optional: 2ms, 4ms or 8ms,
recommended: 1 ms or 2 ms
1
optional: 2ms, 4ms or 8ms *)
1
optional also larger
Tip!
When the checkbox Update unused I/Os (tab Resources Object Target system settings
tab General) is active, a system task with priority 9 is created.
If you have created your own task with priority 9, this will cause the translation error 3570
(error message: "The tasks 'InputUpdateTask' and 'IdleTask' have the same priority 9").
4.2.4.1Inserting other user tasks
As described in section Standard project "PLC_Application.pro", the Application, User, Visu and Idle
Task exist after creating a new project.
In order to create other user tasks, mark a task and then select the menu command InsertInsert
task.
A task can only call blocks of PRG type (program). Then this program is the main program of this task.
You access the program call as follows:
Tab Resources Object Task configuration tab Program call
Attach program call
A task can be assigned to one or several programs. More program calls are assigned as follows:
1. Open the Task configuration object
2. Select the task you want call a program from
3. Select the menu command InsertAttach program call
Tip!
A further option for attaching a program is to show the context menu by clicking the right
mouse button in the task configuration field (tab Resources) and select the corresponding
menu item.
If the field marked with the arrow has been selected, the input assistance opens which
displays all programs to be attached to the task.
System events as for example stopping of the PLC processing can result in a block being called and
processed once.
The Task configuration object serves to define which block is to be called at which system event. It
is not required that a block must be defined for each system event.
Tip!
Use the system events function to specify the exceptional behaviour of the "9400
ServoPLC", e.g. in the case of TaskOverrun.
Example: You can create a block for the system event "TaskOverrun" as follows
1. Go to the Task configuration and open the System events
2. Activate the checkmark for the PLC_TaskOverrun system event.
3. Enter the block name to be called in the called POU column, e.g. PLC_Exception.
• If the block does already exist, select it by means of the input assistance <F2>.
• Otherwise, you can create the block via the Create POU PLC button.
The new block can be found on the POU with the name PLC_Exception (FUN).
Note!
Only blocks of the type "program" can be selected with the input assistance whereas
»PLC Designer« creates a block of the type "function" when the button is clicked.
Lenze recommends using blocks of the type "program" for a system event. Otherwise, a
CRC error can occur in the »9400 ServoPLC«, for example, after downloading of the
project when the L_CanInit block is called from the LenzeCanMsg.lib library.
Up to and including version 02.xx.xx, remanent variables support RETAIN and PERSISENT
and RETAIN PERSISTENT are not
From version 03.00.00, PERSISTENT and PERSISTENT RETAIN are also supported.
• If a persistent variable is linked to a user-defined write/read code
overwritten as follows after the application has been downloaded:
• When the application is downloaded with the »L-force Engineer«, the parameter
set is also loaded into the »9400 ServoPLC«. Thus, the value of this persistent
variable is overwritten by the download depending on the downloaded parameter
value.
• When the application is downloaded with the »PLC Designer«, the user-defined
codes are set to their initial value. Thus, the value of this persistent variable is
overwritten by the download depending on the initial value of the parameter.
• If a persistent variable is linked to a user-defined read code
after the application has been downloaded.
• The size of the persistent variable memory is limited to 2 kbytes. During the
compilation, an error message is output if this value is exceeded. Please bear in mind
that permanently available contents as e.g. variable names, module names, and data
types reduce the freely available memory space.
supported.
, the variable will be
, the value is kept even
4.3.1Update function and scaling function
The update function is used to execute time-consuming calculations - similar to the scaling
functions.
• Scaling functions are always called when the corresponding user code is accessed.
• The update function "listens" to changes that have taken place elsewhere, e.g. changes in the
axis data structure, and executes various calculations again.
Some of the Lenze function blocks have an update function. The update function is not called
automatically by the »9400 ServoPLC«; calling of the function must be programmed.
Lenze function blocks with update function have the following syntax:
• Taskname-FBInstanzname.Update()
• Example: Cam.L_LdVirtualMasterP1.Update();
Tip!
In order to protect the resources, the update function of the function blocks should be
called in an unsolicited task.
Whether a function block has an update function, can be recognised by a corresponding
"Update" entry in the library manager.
The creation of codes that access individual bits of variables is not permissible for the
»9400 ServoPLC«.
1. Import the parameter list of »PLC Designer« to »Engineer« before exiting »Engineer«.
2. Comply with the following order
(see also Completing the PLC project
• Translate PLC project in »PLC Designer«, create boot project and then save
• Import the parameter list from »PLC Designer« to »Engineer«
• Save the project in »Engineer«
3. Creation of the codes with the parameter manager or Pragma instruction. Decide for one of the
two options:
• How to create codes in the parameter manager
• How to create codes with Pragma ( 50)
( 64))
( 50)
How to create codes in the parameter manager
1. Open the parameter manager (Resources tab).
2. Click the menu command InsertList…
3. Choose the Variables type and enter a name. (for parameters on ARRAYs, the instance type
has to be selected).
The parameter list appears in the navigation window of the Parameter Manager.
4. To create a new user code, select the menu command InsertRow.
5. Enter a code number.
User codes from C03000 (0x0BB8) onwards can be used.
How to create codes with Pragma
1. Create the Pragma in the declaration editor of the POU.
The appendix contains a
Sample collection for code creation with Pragma instruction
2. Go to »PLC Designer« and select the menu command ProjectClean all.
3. Select the menu command ProjectRebuild all.
During the rebuild process, »PLC Designer« automatically inserts the new parameter list
into the parameter manager.
If now error messages are generated that refer to errors during the Pragma creation, delete
the new parameter list in the Parameter manager. For this purpose, right-click the Contextmenu Delete list.
For generating application error messages, the L_DevApplErr and L_DevApplErrFix function blocks
from the LenzeDevice9400Vxxxx library are available.
The errors are written unambiguously via module ID and error ID. Moreover, an error response can
be defined, see the documentation for function libraries.
For defining an error message for an error, the LT_DevErrorList data type is available in the
LenzeDevice9400Vxxxx library.
Data type LT_DevErrorList
IdentifierData typeInformation/possible settings
dwModulIdDWORDModule ID (980 ... 990) of the error
dwErrorIdDWORDError ID (0 ... 65535) for error message
strErrorMessageSTRING(64)Error text
Definition of error messages:
1. Depending on the number of the error messages to be defined, an instance of the data type
LT_DevErrorList must be created.
• a declaration as array is possible
• the data type must be defined as global constant and initialised there,
see example:
VAR_GLOBAL CONSTANT
(* Example for declaration of errors as single structures *)
(* Example for declaration of errors as array *)
ErrorList : ARRAY[1..4] OF LT_DevErrorList :=(dwModulId := 901, dwErrorId:=1,strErrorMessage:='Hallo1'),
2. The error messages are incorporated in the software when the PLC application is imported into
»Engineer«.
Note!
• If the declaration of error messages is stored in an export file with the name
"Error_Text_Declaration.exp" in the project directory, the error messages will be read
out of this file during the importing process.
• Before error messages are imported from coded
the error messages in an export file.
PLC projects, it is necessary to place
Tip!
The import into the »Engineer« is described in section "Import in the »Engineer« project
When working with function blocks, proceed as follows (irrespective whether the function block has
instance codes or not):
1. Inserting the corresponding library in the library management,
menu command WindowLibrary management
2. Declaring the function block.
Parameterisable function blocks
Some function blocks of the controller libraries also have codes that serve to change certain settings
during operation or display actual values and status information.
In contrast to the 9400 HighLine servo inverter, the codes of these function blocks are not created
automatically but by the user in the PLC project.
Note!
If new library versions are incorporated in the PLC project, the initialisation values of
codes of parameterisable function blocks are reset to the Lenze settings.
If necessary, the codes must be reset in the Parameter Manager.
Tip!
Lenze recommends that no changes be made to the initialisation values of codes of
parameterisable function blocks.
Example for creating codes for function blocks:
1. Insert LenzeServoDriveVxxyy.lib library in the library management
2. Insert L_SdRampGenerator POU in the Application program
Functions used for implementing applications for Lenze controllers are described by means of
function blocks (FBs).
• Functions which can be used in your project as software functions are included in the function
libraries as function blocks or functions.
• Moreover, there are quasi hardware functions which are available as system blocks (SBs) in the
»PLC Designer« control configuration.
Principle
The principle of the system blocks can be explained with the help of a PLC system in a rack: The rack
contains the CPU, digital I/Os, analog I/Os, counter cards, positioning cards etc. as additional cards.
• The CPU can directly access the extension cards and process the resulting information.
• The single extension cards have a permanent address for being addressed.
Additional cards
With the »9400 ServoPLC«, the system blocks comply with these additional cards! Thus, system
blocks are special (hardware) function blocks that are permanently implemented in the runtime
system of the »9400 ServoPLC«.
• SBs can address real hardware.
• SBs are assigned/identified by node numbers.
• The inputs/outputs of the SBs are accessed via system variables or absolute memory addresses.
• Inputs/outputs are always classified from the program's point of view.
• Required SBs must be explicitly implemented into the project via the control configurations of
»PLC Designer«.
When you have implemented a system block into the control configuration of »PLC Designer«, you
can use its system variable in your project.
• In the editors of »PLC Designer«, use the function key <F2> to call the input assistance which,
among other things, lists all available system variables.
• In this chapter, the system variables can be found in the description of the corresponding
system block.
4.5.2Access via absolute addresses
The inputs and outputs of the system blocks can also be accessed via absolute addresses according
to the IEC 61131-3 standard.
• For inputs, the notation "%IDa.b" applies
(X = data type, a = module number, b = double word address)
• For outputs, the notation "%QDa.b" applies
(X = data type, a = module number, b = double word address)
• Each system variable described in the following chapters comes with the corresponding
address.
4.5.3Definition of the inputs and outputs
In order to establish a connection of the user program with the hardware, system blocks are
connected to the program organisation unit (POU).
Note!
The inputs and outputs are always classified from the program's point of view!
• Logic SB inputs are hardware outputs of the »9400 ServoPLC«.
• Logic SB outputs are hardware inputs of the »9400 ServoPLC«.
Example: System block DIGITAL_IO of the »9400 ServoPLC«
If you want to use the digital input 1 and the digital output 1 of the »9400 ServoPLC«, carry out the
following steps:
1. Implement the DIGITAL_IO system block into the control configuration of the »PLC Designer«.
Implementing system blocks in »PLC Designer«
2. For access to the digital input 1:
• The digital inputs can be found under Inputs_Digital[SLOT]
• Assign the system variable DIGIN_bIn1 to a POU input.
3. For access to the digital output 1:
• The digital outputs can be found under Outputs_Digital[SLOT]
• Assign the system variable DIGOUT_bOut1 to a POU output.
[4-2]Connecting the system block DIGITAL_IO of the »9400 ServoPLC« with a POU
4.5.4Implementing system blocks in »PLC Designer«
The system blocks are the interface between PLC program and the peripherals of the controller (e.g.
digital inputs and outputs).
In order to access from the PLC program to the system blocks, the system blocks must be inserted
into the control configuration.
Note!
The process image of the system blocks is created by the »9400 ServoPLC« in the task
with the highest priority, irrespective of the interval time set for this task.
In the PLC standard project, the ApplicationTask has the highest priority (priority 1).
Thus, a consistent process image is only available in the ApplicationTask. Therefore, the
system blocks should only be accessed in this task.
Tab Resources object Control configuration menu command InsertAppend subelement.
Then, a selection list of the system blocks is displayed. In the control configuration, the inputs and
outputs of each implemented system block are listed with the identifier of the corresponding
system variable, the absolute address, and the data type of the system variable:
System variable Absolute address Data type
[4-3]Example: Control configuration for the »9400 ServoPLC« with implemented system block DIGITAL_IO
Communication between the single components of an entire system requires fieldbus system for
process automation. For the common fieldbus systems, Lenze offers a great number of
communication modules in addition to the CAN system bus.
This section contains information on PDO mapping for the CAN (on board) implemented in the
controller and on PDO mapping for the fieldbus systems to be adapted additionally.
See also: Communicating with the controller ( 21)
4.6.1Network communication with CAN on board
The »9400 ServoPLC« features the following parameterisable process data channels (PDO
channels):
The data exchange between the »CAN on board« interface and the PLC program is carried out via
ports. In the Ports tab, 30 input ports and 30 output ports are created.
PDO mapping means the connection of the parameterisable process data channels with the ports
of the controller.
Note!
In contrast to the »9400 HighLine«, in the case of the »9400 ServoPLC« the user cannot
create his own ports. Instead of that, a set of fixed ports is provided under the Ports tab,
via which a port interconnection can be carried out.
Tip!
The general online help of »Engineer« describes PDO mapping in the section entitled Insert
and configure network / Process data objects.
The access to the ports and therefore to the CAN data is effected via global variables which are
already declared in the Ports list of the global variables.
Standard project "PLC_Application.pro"
In the PLC logic you can access the global "Port“ variables. The name of the variables is identical to
the port.
Each port variable has an individual data type which is defined in the standard project in the Datatypes tab.
The CAN mapping of the ports is effected via codes which are defined in the
AutomationSuite_ObjectDirectory list in the parameter manager.
Note!
Without the "AutomationSuite_ObjectDirectory" parameter list the PDO mapping can no
longer be carried out.
If you have deleted the "AutomationSuite_ObjectDirectory" parameter list, the global
variables "Ports", or the associated data types in your project, you can restore the missing
objects by importing them from a standard PLC application.
2. Just like under CAN, the access to the ports and therefore on the Profibus data is effected
via global variables which are already declared in the Ports list of the global variables in the
standard project. Standard project "PLC_Application.pro"
3. In the PLC logic you can access the global "Port“ variables. The name of the variables is
identical to the port.
Comply with the following procedure after PLC programming has been completed:
1. Compiling a PLC project
2. Generating a boot project ( 64)
3. Saving the PLC project ( 65)
4. Import in the »Engineer« project ( 65)
5. Saving the »Engineer« project ( 66)
6. Project download ( 67)
4.7.1Compiling a PLC project
For compiling the project, click on the menu command ProjectCompile all. In the message window
the number of errors and warnings, the size of the data and retain data consumed and the code size
used is displayed.
( 64)
4.7.2Generating a boot project
A boot project can only be downloaded using »Engineer«.
The boot project download loads and starts the compiled PLC project automatically in case of a
restart (e.g. mains switching).
The command "OnlineCreate boot project" is used to create the following files, among others, in
the PLC project directory:
• <projektname>.prg for the boot project
• <projektname>.chk for the checksum of the code.
Note!
• During the download it is not checked whether the binary coded data match the
current project. In order to avoid that a non-current project is loaded into the »9400
ServoPLC« unintentionally, Lenze recommends to also generate a boot project after
every compilation process to always keep the files consistent like this.
• The boot project may not be generated in the online mode of »PLC Designer«.
1. Click on the Import PLC application button on the Application parameters tab.
• During the import, error messages and warnings appear in the message window.
• If the checkmark next to Show details has been activated, the codes and error messages
imported into the »Engineer« project are shown in the message window as well.
The parameters imported can be viewed in the All parameters tab in the IEC 1131 parameters
category. The IEC 1131 parameters category only appears if user codes have been created in »PLC
Designer«.
Note!
By clicking the Import PLC application button, all data (i.e. files and subdirectories) that
4.7.4.1Saving the »Engineer« project
The project is saved completely if you
1. save the PLC project using »PLC Designer«
2. save the »Engineer« project using »Engineer«.
is the same directory as the project file (*.PRO) is imported into the Engineer project.
The task frame of the system mainly consists of a constant change of system components and user
components.
System = system components
MC = Motion Control basic functions
User PLC = freely programmable PLC part
[4-4]Distribution of the system interval
System components:
• Provision of the setpoint data for the control and actual data of the control
• Maintenance of the communication links on SDO and PDO level
• Processing and evaluation of the device status
• Parameter/services and error management
User components:
• Motion Control basic functions (MC)
• The basic functions enable a more comfortable access for motion control of the drive.
• For the »9400 ServoPLC«, the basic functions in »PLC Designer« are available as separate
system blocks which can be inserted, if required, into the control configuration and which
then can be accessed from the IEC 61131-3 program via the corresponding system variables.
• The basic functions are described in detail in the "Basic drive functions" chapter.
• Creation of the task images for the PLC tasks
• PLC part freely programmable by the user (User PLC).
9 user tasks can be created. User tasks can be event-controlled, time-controlled or unsolicited. Only
one unsolicited task can be created. The user tasks can interrupt themselves in the form of preemptive multitasking and thus make optimum use of the available computing time.
Note!
The »9400 ServoPLC« only ensures data consistency of the task images for the user task
with the highest priority. For all other tasks, the user is responsible for consistency.
Data consistency
Pre-emptive multi-tasking may cause the task images to start with a delay or being
interrupted by tasks with a higher priority. Example of pre-emptive multitasking
( 71)
Tip!
The tasks are created and configured in the »PLC Designer« via the task configuration that
is located as an object in the Object Organizer in the Resources tab.
( 73)
Priorities
Each task is assigned to a priority (1: highest ..... 9: lowest). The hierarchy determines the
distribution of the available calculating time to the tasks.
• One priority cannot be assigned for several tasks.
• The task with the highest priority must be a cyclic task.
• The unsolicited task must always have the lowest priority.
Distribution of the calculating time
Max. 350 μs of calculating time per millisecond are available for the task with the highest priority,
see illustration [4-4]
share this calculating time according to their priority.
• If the processing time in a task with higher priority takes longer, the free calculating time in the
lower-priority tasks is automatically reduced.
• In »PLC Designer«, an interval time of 1 ms, 2 ms, 4 ms or 8 ms must be set for the task with the
highest priority. After this interval time, the task is followed by processing of the basic motor
control functions.
. The calculating time not required remains for the lower-level tasks which
In the following example, three interval-controlled user tasks share the available 350 μs of
computing time per millisecond.
• The respective task cycle will not be used completely by the tasks so that a small amount of
calculating time remains after the lower-priority task 3.
• In the grey areas, processing in the respective task is frozen since either a higher-priority task,
the system part, or the basic motion control functions are being processed.
Task 1 Task 2 Task 3 Free calculating time
[4-5]Example "pre-emptive multitasking"
User taskPriorityTask interval
Task 111 ms
Task 222 ms
Task 334 ms
Tip!
The example in illustration [4-5]
total 1400 μs calculating time (4 task cycles * 350 μs per millisecond) is available but only
the part of the time that remains after processing the higher-priority task 1 and task 2.
shows that, e.g. for task 3 with the lowest priority, not the
When the PLC program has started, the controller continuously carries out a runtime measurement.
The current and maximum task runtimes of the single tasks are displayed in the codes C02121/1...2
to C02129/1...2:
ParameterInfoLenze setting
Value Unit
C02121/1Current runtime Task Prio 1- μs
C02121/2Maximum runtime Task Prio 1- μs
C02122/1Current runtime Task Prio 2- μs
C02122/2Maximum runtime Task Prio 2- μs
C02123/1Current runtime Task Prio 3- μs
C02123/2Maximum runtime Task Prio 3- μs
C02124/1Current runtime Task Prio 4- μs
C02124/2Maximum runtime Task Prio 4- μs
C02125/1Current runtime Task Prio 5- μs
C02125/2Maximum runtime Task Prio 5- μs
C02126/1Current runtime Task Prio 6- μs
C02126/2Maximum runtime Task Prio 6- μs
C02127/1Current runtime Task Prio 7- μs
C02127/2Maximum runtime Task Prio 7- μs
C02128/1Current runtime Task Prio 8- μs
C02128/2Maximum runtime Task Prio 8- μs
C02129/1Current runtime Task Prio 9- μs
C02129/2Maximum runtime Task Prio 9- μs
Highlighted in grey = display parameter
Note!
The runtime measurement is reset by the following actions:
• Start application
• Reset/delete/restart program
•Device command "Reset runtime measurement
Tip!
On the basis of the runtime measurement, you can detect the amount of the remaining
free calculating time in the different priority levels.
The free calculating times must not simply be added since each extension in a higherpriority task automatically affects the free calculating time in the lower-priority tasks.
The data consistency of the system variables in the control configuration as well as of the PDO
network variables is ensured for the user task with the highest priority. If these data have to be used
in tasks with a lower priority as well, the user must provide appropriate consistency mechanisms.
Due to the fact that the »9400 ServoPLC« is based on a 32-bit architecture, all accesses up to this
width are atomic accesses. One exception are the single bit accesses which can only be
implemented as Read-Modify-Write and are not provided with a protection against interruption by
another task.
Accesses with a width of 64 bits are atomic as well since the load and save command in the
processor architecture for two related values is handled atomically.
4.8.6Storage capacities and memory modules
RAM memory
Note!
With controllers of the Servo Drives 9400 series, the program code is executed in the
RAM memory.
The device command C00002 = "11: Save start parameter" serves to protect the
parameter settings against data loss against e.g. mains failure. This command serves to
archive the data safe against mains failure in the memory module.
In the RAM memory, the user data is limited to the following size:
Memory forSize
Program code512 kByte
Data256 kByte
User parameter196 kByte
Cam data512 kByte
Retain memory
The values of the retain variables are permanently saved in the retain memory. In this way, they are
even after mains disconnection available to the program. An explicit saving of the parameter set is
not required.
• Retain variables are declared by means of the variable class VAR RETAIN.
• Retain variables are used as a memory which can be symbolically addressed.
• With every program download, the retain variables are reset to their initialisation value. If no
initialisation value is defined, the corresponding retain variable is initialised with the value "0".
• In the online mode of the »PLC-Designer« you can reset the retain variables in the controller to
their initialisation value using the commands Online Reset (cold) or Online Reset (original).
• The available retain memory depends on the memory module plugged into the controller:
In order to use the PLC functionality, the memory module MM340 or MM440 (licence: "PLC") must
be plugged in the controller. Saving with mains failure protection of the IEC61131-3 program into
another memory module is not possible.
The following table compares the storage capacities and functions of both memory modules:
MM340MM440
Size of the file system
• For example for »Engineer« project data, programs, and
parameter sets.
Retain memory
CAN address switch
• For system bus "CAN on board".
Real-time clock
• For adjusting the system time at switch-on.
•Display in C01214
, setting in C01215.
4 MByte8 MByte
4992 Byte64 kByte
4.8.7Known function restrictions of the controller
Restrictions when working with the SysLibTime.lib library
The structure entry DayOfWeek of the function block CurTimeEx is not supported by the controller.
Device error by aborting a trace recording
A started trace recording must be stopped with the command "Stop trace".
Otherwise, a device error occurs in case of a premature log-out that can only be reset by mains
switching of the controller.
Project options in »PLC Designer«
In the PLC project under the menu item ProjectOptionsSource download, the setting "Only on
request" must be activated at the time of download. Otherwise, an error message will be generated
System variables of the »9400 ServoPLC« are addressed with %IBx.y and %QBx.y which differs from
the absolute addressing of boolean system variables (%IXx.y or %QXx.y according to IEC61131).
Thus, the following restrictions must be considered:
• When boolean variables with the keyword AT are linked to a certain address, the prefix "B" must
be used instead of prefix "X".
Example
bVar AT%IB2.0:BOOL;
• When an event-controlled task is created, the absolute address of the system variables cannot
be used directly but the symbolic name of the system variables must be used.
• The assignment of an absolute address to a boolean variable is not possible.
Example
bVar:BOOL;
bVar:=%IB2.0;
Permissible marking in the path and file name
The PLC project cannot be loaded if the path referred to a PLC project contains ASCII characters > 126
or umlauts and special characters.
Thus, do not use umlauts and special characters in the file name.
Trace configuration
It is possible that too large a value will be specified for the parameter "Number of measurements"
in the "Trace Configuration" dialog box of »PLC Designer«. In this case, the following error message
is shown when trace recording is started:
"The control has executed the last online service incorrectly. Service number: 28, error number: 53."
In this case, the value for "Number of measurements" must be reduced so that the following
applies:
The sum of the size of the recorded variables multiplied by the number of measurements must be
lower than 4990 bytes.
byCExample: BYTE (* Variable example Byte *)
{parameter list="CodestellenPerPragma"
[index="7001"
subindex="0"
name="Byte example"
variable="byCExample"
MinIntern="0"
MaxIntern="15"
value="1"
MIN="0"
MAX="15"
Unit=""
Scaleroutine=""
Cinh="No"
PlcStop="No"
SHIFTPrg="Yes"
SelectText="0:default;1:fixed value 1;2:fixed value 2;3:fixed value 3;4:fixed value 4;5:fixed value 5;6:fixed value 6;
7:fixed value7;8:fixed value 8;9:fixed value 9; 10:fixed value 10;11:fixed value 11;12:fixed value 12; 13:fixed value
13;14:fixed value 14;15:fixed value 15"
DisplayText="byExample"
DisplayNominator=1
DisplayDenominator=1
GDCText="byExample"
accessright="read-write"
Accesslevel="No"
]};
This chapter provides you with information on the drive interface via which you can control the
drive controller into specific states and call different pieces of status information of the controller.
Furthermore the machine constants for the motor end are entered via the drive interface.
How to get to the dialog for setting the drive interface parameters:
1. Go to the Project view of the »Engineer« and select the»9400 ServoPLC«.
2. Select the Application parameters tab from the Workspace.
3. Click the following button of the Overview dialog level:
Parameterisation dialog in the »Engineer«
• The white buttons indicate the configuration of the drive interface inputs. Internal interfaces
| "LS_DriveInterface" system block ( 158)
• The assignment is predefined by the technology application selected (in the example
"Actuating drive – speed"). If required, this assignment configuration can be changed by
clicking the corresponding buttons.
• If you click a button marked with the symbol, you go one level deeper in the corresponding
parameterisation dialog.
The global machine constants ("machine parameters") are set in the »Engineer» on the Application
parameters tab in the dialog level Overview Drive interface Machine parameters:
Tip!
Detailed information on the different machine parameters can be obtained from the
following subchapters.
Via the Mains voltage list field (C00173) the mains voltage for the controller is set.
• If you set a mains voltage with an adjustable threshold for undervoltage ("LU adjustable"), this
undervoltage threshold can be set in the Undervoltage threshold (LU) input field (C00174
•In the Resp. to DC-bus overvoltage list field (C00600
effected when a DC-bus overvoltage occurs.
) you can select the response that is to be
).
Note!
Changing the setting in C00173 also affects the permissible device utilisation!
Tip!
In the chapter "Rated data" of the hardware manual the device types and their permissible
device utilisation at a certain mains voltage and switching frequency are specified.
See also:Monitoring of the device utilisation ( 156)
The gearbox ratio indicates the number of revolutions of the motor axis it takes for exactly one
revolution of the load axis (e.g. spindle or drive roll) to take place.
[5-1]Schematic diagram of gearbox ratio
• In the example shown in illustration [5-1] one revolution of the spindle is carried out at exactly
58,667 revolutions of the motor axis.
Specification of the gearbox ratio
• The gearbox ratio is to be defined in the form of a quotient (numerator/denominator); the data
required can be found in the technical data for the gearbox:
[5-2]Example: Technical data relating to the gearbox (from gearbox catalogue)
Tip!
In order to specify the gearbox ratio exactly, use the number of teeth indicated on the data
sheet or in the catalogue, if possible, instead of the information on the nameplate (see
following calculation).
In C02531/1
Example calculation on the basis of the technical gearbox data:
[5-3]Sample calculation
the gearbox factor is displayed in decimal format.
Depending on the motor mounting position, you can carry out an inversion of the direction of
rotation via the Motor mounting direction list field (C02527
), if required:
• C02527
• C02527
5.1.4Feedback configuration
In most cases the system only has one motor encoder, i.e. no separate position encoder is installed
on the load side. The motor position (angle of rotation) and motor speed are detected via the motor
encoder selected in C00495
Motor encoder
[5-4]Schematic diagram - feedback with position encoder = motor encoder
The actual position and speed values on the machine side result from the conversion via the
Gearbox ratio
= "0": Clockwise rotating motor ≡ positive machine direction.
= "1": Counter-clockwise rotating motor ≡ positive machine direction.
and converted with regard to the load side.
on the motor side and the Feed constant.
Tip!
Detailed information on the parameterisation of the feedback systems for the motor
control can be found in the chapter "Encoder evaluation
Via these machine parameters you define the real unit of the machine in which the feed constant
and the parameters for a travel profile must be specified (e.g. position, speed, acceleration, and
deceleration).
• If you for instance set the unit "mm" for a linear axis, the position must be specified in [mm] and
the speed in [mm/s].
• By means of the user-defined unit, significant production units, like for example "bottles" can
also be set.
• For this, select the "User-defined" entry as unit in C02525
defined unit in C02526
.
and then enter the desired user-
Note!
In this documentation the term "unit" in the parameter unit data only serves as a
wildcard for the real unit of the machine.
The feed constant corresponds to the movement of the machine during one revolution of the
gearbox output shaft.
• The entry in the Feed constant field (C02524
one revolution.
• In the case of a conveyor drive, the feed constant is obtained from the drive roll's circumference,
which, in the following example, is calculated on the basis of the indicated diameter:
d = diameter
[5-8]Schematic diagram: Feed constant for a conveyor driver
• In the case of a spindle drive (linear axis), the feed constant is derived from the leadscrew pitch.
The feed constant indicates the distance the slide travels during one revolution of the spindle
(in the following example: 5.023 mm).
) is made in the unit defined in C02525 relating to
h = leadscrew pitch (can be obtained from the technical data of the linear axis)
[5-9]Schematic diagram: Feed constant for a spindle drive
• In the case of a rotary table and its specification as an angle, the feed constant is = 360°/
revolution.
C00100 serves to adjust the resolution to the application.
• The default resolution of 16 bits/revolution is sufficient for standard applications.
Sign bit
Number of revolutions: 15 bits ≡ ±32767 revolutions
Resolution of one encoder revolution: 16 bits ≡ 65536 increments/revolution
[5-10] Example: standard resolution (16 bits/revolution)
• For more significant applications, a higher resolution of the position values can clearly improve
the control properties and positioning accuracies:
• Finer resolution of the position targets improved positioning accuracy
• Finer quantisation of setpoints and actual values better control quality
• Higher loop gain adjustable less following errors
• However, a higher resolution at the same time causes a restricted number of encoder
revolutions, and only smaller traversing distances can be displayed.
[5-11] Example: Higher resolution (22 bits/revolution) with a restricted traversing range
Sign bit
Number of revolutions: 9 bits ≡ ±512 revolutions
Resolution of one encoder revolution: 22 bits ≡ 4194304 increments/revolution
Tip!
In the following subchapter "Determining the optimum resolution
how you can determine the optimum resolution of the position values.
The position values (e.g. setpoints, actual values, parameters, …) in the signal flow
always use the resolution set in C00100
resolution is delivered directly by the encoder.
Multi-axis systems
In an interconnection via the electrical shaft, at least two measuring systems (master
and slave) are available in the drive.
• Each measuring system is provided with an individual setting of the resolution.
• The machine parameters (gearbox factors, feed constants, encoder resolution and
cycle) for the master measuring system or master value must be set identically for all
drives in the system.
Technology applications "Electronic gearbox" and "Synchronism"
For these two technology applications the machine parameters of the master measuring
system are defined on the Application parameters tab in the "Master value scaling"
dialog level.
Electronic cam
The machine parameters of the master measuring system for electronic cams can be
defined on the Measuring systems tab for the electrical shaft.
In the dialog level Overview Drive interface Machine parameters:
1. Set gearbox factors.
2. Set real unit of the machine.
3. Set feed constant.
4. Press the Optimum positional resolution button.
•The Optimum positional resolution dialog box is displayed:
5. Go to the Max. presentable position input field and enter the highest position which is to
be entered in a parameter during operation.
• If required, set a reserve in the Overshoot input field to take into account possible
following errors (overshoot of actual values).
Then the maximum resolution for the position entered is shown in the Maximum resolution for encoder revolution field.
6. Click Accept value to accept the displayed resolution in C00100
7. Click Close to close the dialog box again.
.
Tip!
In order to display the position that can be maximally represented for a defined resolution,
activate the second option Determine max. presentable position. Then you can set the
resolution for which the maximally presentable position is to be displayed in the Maximum resolution for encoder revolution input field.
5.1.9Max. position, speed, and acceleration that can be displayed internally
By setting the following machine parameters, the connection between the real units (application
units) of the machine and the internal units in the controller is described:
• Gearbox ratio (C02520
• Feed constant (C02524
• Resolution of an encoder revolution (C00100
Possibly the defined values for position, speed, and acceleration cannot be represented in the
internal units by the numerical 32-bit format used.
• The following display parameters show the values that can be maximally displayed:
ParameterInfoLenze setting
C02539Max. presentable position- Unit
C02540Speed that can be maximally displayed- Unit/s
C02541Acceleration that can be maximally displayed- Unit/s
Highlighted in grey = display parameter
Response if a value that cannot be displayed internally is entered
If a position, speed, or acceleration which cannot be represented internally is defined via
parameters, the value defined is limited to the maximum value that can be represented internally
(±2147483647).
In the following subchapters the device commands of the controller are described, which are
provided in C00002
keypad when an online connection has been established.
and which can be executed by means of »Engineer« or alternatively with the
Note!
Before switching off the supply voltage after a device command has been executed,
check the successful execution of the device command via the status display in C00003
!
The meaning of the status display in C00003
the corresponding device command.
Activating frequently required device commands via the toolbar
The simplest way to execute the frequently required device commands is directly via the Toolbar of
»Engineer« when an online connection has been established.
IconFunction
Enable controller
Inhibit controller
Start application
Inhibit controller and Stop application
can be obtained from the subchapter for
Note!
Device commands that can be executed via the Toolbar of the »Engineer« always affect
the element currently selected in the Project view including all subelements!
• If no controller but a system module is selected in the Project view, the corresponding
device command will be activated in all lower-level controllers having an online
connection with the »Engineer«.
Before the desired action is carried out, a confirmation prompt appears first, asking
whether the action is really to be carried out.
The C00002 = "0: Load Lenze setting" device command is used to reset the parameters of the active
application to the Lenze setting, which is stored in the controller firmware:
[5-12] "Load Lenze setting" function
• Only possible when the application has stopped and the controller is inhibited.
• All parameter changes made since the last saving of the parameter set will get lost!
• This device command only affects the settings of the operating system, application and module
parameters, the active application remains unchanged.
If the Lenze motor connected to the controller is provided with an electronic nameplate (ENP), all
motor data are automatically read out from the electronic nameplate of the motor when the
controller is switched on for the first time and are temporarily stored in the controller at first.
With the device command C00002
the electronic nameplate (ENP) of the motor.
• Only possible when the application has stopped and the controller is inhibited.
• For a permanent acceptance of the motor data, the parameter set must be saved.Save start
parameters ( 99)
• The following plant data are read out from the ENP:
ParameterInfo
C00022
C00070Speed controller gain
C00071
C00596
Maximum current
Speed controller reset time
Threshold max. speed reached
= "2: ENP: Load plant data" the motor data can be reread from
Note!
The two pieces of plant data C00011 and C00497 listed in the following table are not
read out from the ENP and thus have to be checked and, if required, set manually after
this device command has been executed!
If several applications are available on the memory module, the C00002 = "5: Activate application"
device command can be used to activate the application the number of which has been set in
C00005
* In this example, application selection "2" is set in C00005
[5-14] "Activate application" function
.
• Only possible when the application has stopped and the controller is inhibited.
• Whether the application is started at the same time, depends on the auto-start setting selected
in C02104
.
• After mains switching, the preset application will be loaded into the controller.
• If after mains switching another application than the one preset by Lenze is to be loaded, it must
be activated first and then the selected application must be saved with the device command
"Save selected application
• The number of the currently active application is displayed in C00007
". ( 98).
.
Note!
When the application is activated, the corresponding start parameter set is loaded
automatically and parameter settings executed before will get lost unless the parameter
set was saved before!
After mains switching the controller always loads the preset start application from the memory
module, even if a different application has been active before.
With the device command C00002
= "7: Save selected application" the active application can be
defined as start application.
* In this example, the active application 2 is defined as start application
[5-15] "Save selected application" function
• When this device command is executed, the parameter set is also saved automatically.
• The number of the currently active application is displayed in C00007
Controller parameter changes made via »Engineer« or keypad will get lost after mains switching of
the controller or loading of another application unless the settings have been explicitly saved.
With the device command C00002
the active application can be saved with mains failure protection in the memory module of the
controller:
* In this example, application 1 is the active application
[5-16] "Save start parameters" function
= "11: Save start parameters" the current parameter settings of
Tip!
With the keypad this device command can be executed via the left function key if it is
currently assigned with the function.
Note!
The saving process can take several seconds. Before you switch off the supply voltage
after having executed this device command, therefore be absolutely sure to check via
the status display in C00003
successfully!
This device command serves to save the Cam data safe against mains failure in the
memory module.
• The saving process is only carried out if the cam data in the controller and the memory
module differ from each other (based on the time stamp/GUID of the cam data).
• For saving the cam data, you do not need to enter a possibly existing user password
(C02900
•The C00002
data ( 138)
).
= "502: Save Cam Data" device command remains available.Save cam