Beruflich Dokumente
Kultur Dokumente
www.festo.de
Library for motor controller
with FHPP
FestoMotionFHPP TIA Portal (Siemens TIA portal)
21.11.2016
Version 14.0.1
Table of contents
1 Important information ................................................................................................................................... 5
1.1 Intended use ....................................................................................................................................... 5
1.2 Safety instructions .............................................................................................................................. 5
1.3 Danger categories ............................................................................................................................... 6
1.4 Marking special information ............................................................................................................... 6
2 Introduction ................................................................................................................................................... 7
2.1 Basic principles ................................................................................................................................... 7
2.2 General information on Festo motor controllers .................................................................................. 7
ii
Table of contents
iii
1 Important information
1.1 Intended use
The function blocks (FB) described are used to control and parameterise motor controllers by Festo via the FHPP
protocol.
By means of the function blocks, the various functions of these controllers can be comfortably incorporated into
the PLC program. The function blocks are called cyclically, using a separate instance, for each motor controller
(each axis) that is integrated into the user program. Simultaneous use of other function blocks for controlling the
same device is not permitted.
Observe the "Safety instructions" and instructions on the designated use of the respective devices, components
and modules. When connected with commercially available components, such as sensors and actuators, the
specified limits for pressures, temperatures, electrical data, torques etc. must be observed.
Target group
This manual is intended exclusively for technicians trained in control and automation technology, who have
experience in installing, commissioning, programming and diagnosing positioning systems and the relevant
fieldbuses.
Service
If you have any technical problems, please consult your local Festo service, or contact the central service at the
following e-mail address:
service_international@festo.com
Warning
Electrical axes can move with high force and at high speed. Collisions can lead to serious injury to
people and damage to components.
You must make sure that nobody can place their hand in the positioning range of the axes or other
connected actuators and that there are no objects in the positioning path while the system is
connected to energy sources.
Warning
Parameterisation errors can cause injury to people and damage to property.
Only enable the controller if the axis system has been professionally installed and parameterised.
5
FHPP library for Siemens TIA Portal
Warning
... means that non-observance can result in serious personal injury or damage to property.
Caution
... means that any failure to comply can result in personal injury or material damage.
Note
... means that failure to observe this instruction can result in damage to equipment.
Pictograms
The following pictograms mark passages in the text which contain special information.
Text markings
1. Numbers denote activities that must be carried out in the order specified.
Bullet points denote activities that can be carried out in any order.
o Circular dots denote general listings.
Further conventions
FB Sometimes, the abbreviation "FB" (or "FBs") is used for "function block(s)":
Names of windows, dialogues and buttons such as "Message Window," "Extract Project," "OK" as
"OK"
well as designations are shown in inverted commas.
Names of keys on the PC keyboard are represented in the text with uppercase letters (e.g. ENTER
CTRL
KEY, CTRL, C, F1 etc.).
For some functions you need to press two keys simultaneously.
CTRL+C
Example: The CTRL key together with the "C" key produces the CTRL+C character.
If "click" or "double-click" is mentioned, this always applies to the left-hand mouse button. If the
right-hand mouse button is to be used, this will be explicitly mentioned.
6
2 Introduction
2.1 Basic principles
"FestoMotionFHPP" is a library for use under Siemens TIA portal. With this library,
o the CMMD-AS motor controllers
o the CMMO-ST-C5-1-LKP motor controllers
o the CMMP-AS motor controllers
o the CMMS-AS and CMMS-ST motor controllers
o the integrated motor unit EMCA-EC
can be controlled and parameterised via their respective fieldbus interface.
A motor controller is controlled by means of the Festo Handling and Positioning Profile (FHPP).
The library contains function blocks for controlling and parameterising the drives.
Refer to the User Documentation of the motor controller for additional information on operating and setting up.
Architecture
Each motor controller is integrated into the project via the Devices & Networks menu.
o All function blocks that access I/O data directly to control a motor controller require the addresses of
the input and output data. See Chapter 3.5 Addressing the data elements
o All function blocks that access I/O data directly to parameterise a motor controller require the
addresses of the input and output data of the Festo Parameter Channel (FPC).
For each motor controller, a separate instance of a function block needs to be created for control or
parameterisation.
Note
Always observe the information and safety instructions in the documentation.
7
3 Festo handling and positioning profile (FHPP)
Tailored to the target applications for handling and positioning tasks, Festo has developed an optimised device
profile, the Festo Handling and Positioning Profile (FHPP).
The FHPP device profile allows uniform programming for the control of Festo motor controllers via various
fieldbus systems.
In the FHPP, the user can create a uniform definition for
o Operating modes
o I/O data structure
o Parameter objects
o Sequence control.
Parameter channel
The control system has read and write access to all controller parameter values via the parameter channel. A
further 8 bytes of I/O data are used for this purpose.
9
FHPP library for Siemens TIA Portal
Direct mode
In "Direct mode", the most important positioning data is transferred directly to the motor controller via the FHPP
control data.
o Target positions and speeds can be ascertained and specified by the controller at execution time.
o There are no limitations regarding the number of saved records.
In direct mode, values can be taught/parameterised via the PLC control system.
The following direct operating modes can be selected:
o Direct mode with position control
o Direct mode with torque control
o Direct mode with speed adjustment
The transfer function blocks are dependent on the fieldbus, via which an FHPP device is connected to
the control system.
10
4 Usage of the library
4.1 Linking the library
The library is added to the project via the menu Extras, Global libraries, Open library.
The library is now available in the Global Libraries window. The elements and data types required are copied
directly into the project by drag & drop.
Notes on using the library can be found in the general help under the topic "Using elements from
libraries".
11
FHPP library for Siemens TIA Portal
All elements and data types required from the library for the project must be copied to the project.
FHPP_CTRL
FHPP CONTROL
FHPPplus FML_REF
Note
The function block required for reading or writing data depends on the connection of the device and
the CPU required.
12
Usage of the library
FHPP_DPRD_DAT
Profibus/ Profinet
FHPP library blocks
FHPP-Device
FHPP_DPWR_DAT
Figure 4-5: CPU and fieldbus-specific features for data transfer (Profibus/ Profinet)
4.4.2 IO-Link
S71500/ S7300/ S7400
FHPP_GETIO_PART
FHPP-Device
FHPP library blocks
IO-LINK
FHPP_SETIO_PART
Profibus/ Profinet
IO-Link Master
S71500/ S71200
FHPP_DATA_PEEK
FHPP_DATA_POKE
Figure 4-6: CPU and fieldbus-specific features for data transfer (IO-Link)
13
FHPP library for Siemens TIA Portal
FHPP_MB_CLIENT
Figure 4-7: CPU and fieldbus-specific features for data transfer (Modbus TCP)
14
Usage of the library
Note
Unconfigured modules have zero as their address on the element.
Note
"Message from PLC" in the FCT is viewed from the device perspective. The PLC sends the data to the
device.
15
FHPP library for Siemens TIA Portal
2
2
16
Usage of the library
17
5 Device setup in the TIA portal
5.1 Installing the GSD/GSDML files in the TIA portal
Before the library can be used, the GSD/GSDML files for the respective drive must be installed. The installation
process is the same for the GSD and GSDML file.
To install the GSD/GSDML files, switch to project view in the TIA portal.
1. Select "Extras" > "Install device description file (GSD)"
2. Click the "Search" button to the right of the source path, and select the folder in which the
GSD/GSDML files were saved.
3. Select the desired GSD/GSDML file(s).
4. Click "Install" to start the installation process for the selected files.
19
FHPP library for Siemens TIA Portal
20
Device setup in the TIA portal
Note
The individual I/O modules on an IO-Link master are grouped into a module in the control system. As
a result, partial access to the I/O data of the IO-Link master is required for an IO-Link device.
5.4.1 Installing the IODD files in the TIA portal (Device Tool)
The device description file for IO-Link devices is installed in the "Device Tool".
An IO-Link master needs to be configured in the Devices & Networks dialogue. Start the Device Tool by right-click
on the IO-Link master.
21
FHPP library for Siemens TIA Portal
Note
The function block FHPP_MB_CLIENT only supports Modbus TCP connections with S71200 and
S71500 CPUs.
Note
Not all FHPP devices support Modbus TCP
Note
The function block FHPP_MB_CLIENT only supports the Siemens MB_Client version 4.0 or higher.
22
6 Elements in the library
6.1 FHPP_DATA elements for data exchange
The elements use functions from Siemens to read and write data to the device. The names of the blocks contain
the Siemens function used in each case.
Note
With S7300/400 CPUs you have to asign the logical input address oft the specific module.
23
FHPP library for Siemens TIA Portal
Note
With S7300/400 CPUs you have to asign the logical output address oft the specific module.
24
Elements in the library
Note
only S71200/1500 CPUs
25
FHPP library for Siemens TIA Portal
Note
only S71200/1500 CPUs
26
Elements in the library
Note
only S7300/400/1500 CPUs
27
FHPP library for Siemens TIA Portal
Note
only S7300/400/1500 CPUs
28
Elements in the library
Note
only S71200/1500 CPUs
Modbus_DATA_PTR:
For the exchange of data via Modbus, the MB_CLIENT requires a global memory area as a data buffer.
For each Modbus TCP connection to an FHPP drive, an FHPP Modbus data register must be created and
transferred to the element.
Note
Create the FHPP data register as an ARRAY[1..32] of bytes in a global DB.
The maximum length of an FHPP telegram is 32 bytes.
The FHPP_MB_CLIENT is preset internally with all Festo specific configuration settings.
29
FHPP library for Siemens TIA Portal
Note
The supply and disposal of the FHPP data must be ensured by means of the function blocks from the
FHPP_DATA library folder.
The following tables describe all inputs and outputs provided by the "FHPP_CTRL" function block for controlling
a motor controller.
In-out variable - VAR_INOUT
30
Elements in the library
31
FHPP library for Siemens TIA Portal
32
Elements in the library
33
FHPP library for Siemens TIA Portal
For the function block FHPP_CTRL, the monitoring and watch table of the same name is available. It
permits simple initial start-up.
34
Elements in the library
6.2.2 FHPP_PLUS
The module FHPP_PLUS permits data exchange of freely defined additional objects. The selection of these
objects is parameterised in the FCT, and transferred as a configuration entry to the transfer function block used.
Note
The data is transferred to the fieldbus in the parameter sizes 1 byte, 2 byte, 4 byte. Within the PLC, all
FHPP+ data is converted to the DINT data type.
Please note the positive/negative signs and value limits.
The availability of the FHPP+ data channel is device-dependent. See the device description for
further information.
35
FHPP library for Siemens TIA Portal
Note
The supply and disposal of the FPC data must be ensured by means of the function blocks from the
FHPP_DATA library folder.
For every function block FPC_xxx, a monitoring and force table is available.
36
Elements in the library
37
FHPP library for Siemens TIA Portal
PNU Parameter
540.1 Basic velocity
541.1 Acceleration
542.1 Deceleration
38
Elements in the library
For example, the function block can transfer all parameters to the new device if a device is replaced.
Note
The function block FPC_FILE is only supported by controller types CMMO-ST and EMCA-EC.
Functional description
o The function must be selected by setting one of the variables "Upload" or "Download" to "TRUE".
o The parameter records are stored in a pre-defined byte array in a GlobalDB on the controller.
o The byte array must be >= the size of the data expected.
o Every error interrupts the current transfer.
o Upload: If there is an error, the data already written is deleted again.
o Every message is monitored by timeout on transfer.
o The duration of the transfer depends on the bus cycle time and might take some time.
39
FHPP library for Siemens TIA Portal
Note (*): The "Upload" and "Download" signals must not be set simultaneously.
40
Elements in the library
41
FHPP library for Siemens TIA Portal
Structure DT_FML_PRM_DESCRIPTION
42
Elements in the library
Note (1):
The object parameters are not public. If necessary, please contact the Festo Service.
43
FHPP library for Siemens TIA Portal
44
7 STATUS (reporting system element)
7.1 DT_FML_STATUS
Category Source
Variables Data type Description
Err Bool Error bit
Cat INT Category
ID DINT Number
7.2 Category
Category Source
1 Function block
2 Reserved
3 Parameter transfer (FPC)
4 Siemens
45
FHPP library for Siemens TIA Portal
46
STATUS (reporting system element)
ID Description
16#xxxx_8xxx Siemens return code of internal used function block
16#40xx_xx00 Siemens return code of internal used function block
47
8 Application examples
8.1 Controlling a Festo motor controller
In the example, the motor controller CMMP-AS is used with the function block FHPP_CTRL.
This function block allows control of a motor controller in the following four combinations of operating mode and
control mode:
o (0) Record selection
o (1) Direct mode with position control
o (5) Direct mode with force/torque control
o (9) Direct mode with speed adjustment
49
FHPP library for Siemens TIA Portal
The preset operating and control mode is only adopted when a movement is initiated, i.e. a rising
edge at the StartTask input.
1. Read the fieldbus data, e.g. with FHPP_DPRD_DAT. The input data from the motor controller is
prepared in the FML_REF structure.
2. Calls the instance of the function block FHPP_CTRL. That controls the allocated motor controller.
3. Writes the fieldbus data, e.g. with FHPP_DPWR_DAT. The output data for the motor controller from
FML_REF are correctly assigned there.
50
Application examples
51
FHPP library for Siemens TIA Portal
52
Application examples
53
FHPP library for Siemens TIA Portal
54
Application examples
This function block permits the parameterisation of the motor controller with individual parameters (FHPP PNU):
Note
For a description of the parameters supported per FHPP, see the respective User Documentation.
1. Read the fieldbus data, e.g. with FHPP_DPRD_DAT. The input data from the motor controller is
prepared in the FML_REF structure.
-> The FPC_aktiv signal must be set to TRUE.
2. Calls the instance of the Parameter function block. This parameterises the assigned motor controller.
3. Writes the fieldbus data, e.g. with FHPP_DPWR_DAT. The output data for the motor controller from
FML_REF are correctly assigned there.
The values written to the motor controller using the "FPC_PNU" function block are stored in a volatile memory
and only remain valid until the control voltage of 24 V at the motor controller is interrupted. The values can be
permanently transferred to a non-volatile memory by writing the value 1 to the PNU 127 subindex 2.
The following steps must be taken to permanently adopt written parameters:
55
FHPP library for Siemens TIA Portal
56
9 Glossary
C
Controller: Control electronics that evaluate the control signals and provide the voltage supply for the
motor via the power electronics (power electronics + controller + positioning controller).
E
EDS file: Electronic data sheet which describes the functions and features of a CANopen device in
standardised form.
F
Festo Configuration Tool (FCT): Commissioning software with uniform project and data management for all
supported device types. The special requirements of a device type are supported with the necessary
descriptions and dialogues by means of plug-ins.
Festo Handling and Positioning Profile (FHPP): Uniform fieldbus data profile for positioning controllers
from Festo.
Festo Parameter Channel (FPC): FHPP-specific parameter channel version
FHPP: Uniform fieldbus data profile for positioning controllers from Festo (Festo Handling and Positioning
Profile)
FPC: FHPP-specific parameter channel version (Festo Parameter Channel)
G
GSD/GSG file: Profibus device description file
GSDML: Profinet device description file
I
IODD: IO-Link device description; device description file for IO-Link devices
P
Package: The package allows the installation of target system-specific files for controlling Festo CoDeSys
motor controllers. The program is located in the start menu under "Programs" in the option "CoDeSys
V3"
PDO: Process Data Object
PKE: Integral part of the parameter channel (PKW) which contains the task and reply identifiers (AK) and the
parameter number (PNU).
PKW: Telegram part used for transmitting parameters. PKW refers to a parameter identification value (see
also "Festo Parameter Channel (FPC)").
PNU: Parameters that can be transmitted via the parameter channel are addressed with the parameter
number (PNU). The parameter number is an integral part of the parameter identifier (PKE) and serves
for identifying or addressing the individual parameter.
Profile position mode: Operating mode for executing a position set or a direct positioning job.
Project zero point (PZ): Measuring reference point for all positions in positioning jobs. The project zero
point forms the basis for all absolute position specifications (e.g. in the position set table or with direct
control via the control interface or diagnostic interface). The point of reference for the project zero
point is the axis zero point. With the MTR-DCI, the project zero point PZ and the axis zero point AZ are
identical.
57
FHPP library for Siemens TIA Portal
R
Homing: Homing defines the reference position and thereby the origin of the measuring reference system of
an axis.
Referencing method: Method for determination of the reference position: against a fixed stop (over-
current/speed evaluation) or with reference switch.
Reference point (REF): Point of reference for the incremental measuring system. The reference point defines
a known orientation or position within the travel distance of the drive.
S
Sub-index (IND): Integral part of the parameter channel (PKW) which addresses an element of an array
parameter (sub-parameter number).
T
Teach mode: Operating mode for setting positions by moving to the target position, e.g. when creating
position sets.
Jog operation: Manual travel in a positive or negative direction
X
XML: EtherCAT XML file; device description file for EtherCAT devices
58
Copyright:
Festo AG & Co. KG
Postfach
73726 Esslingen
Germany
Phone:
+49 711 347-0
Fax:
+49 711 347-2144
E-mail:
service_international@festo.com
Reproduction, distribution or sale of this document or communication
Internet:
of its contents to others without express authorization is
www.festo.com
prohibited. Offenders will be liable for damages. All rights reserved
in the event that a patent, utility model or design patent is
registered. Original: de
59