Академический Документы
Профессиональный Документы
Культура Документы
lib library
Table of Contents
1 The Festo_Motion.lib library.............................................................................................................. 1
1.1 Overview ...................................................................................................................................... 1
1.1.1 Architecture....................................................................................................................... 1
1.2 Requirements ............................................................................................................................... 3
1.2.1 I/O configuration for PROFIBUS ....................................................................................... 3
1.3 Designated use ............................................................................................................................ 4
1.4 Target group ................................................................................................................................. 4
1.5 Service ......................................................................................................................................... 4
1.6 Safety instructions ........................................................................................................................ 5
1.7 General information on Festo motor controllers ........................................................................... 6
1.7.1 Documentation on Festo motor controllers ....................................................................... 6
1.8 Festo Handling and Positioning Profile (FHPP) ........................................................................... 7
1.8.1 Operating modes .............................................................................................................. 7
1.9 Function blocks for Festo motor controllers ................................................................................. 8
1.9.1 Control function blocks ..................................................................................................... 8
1.9.2 Organisation function blocks ........................................................................................... 19
1.9.3 Parameterisation function blocks .................................................................................... 20
1.10 Examples ................................................................................................................................... 28
1.10.1 Example for controlling a Festo motor controller............................................................. 28
1.10.2 Example for parameterising a Festo motor controller ..................................................... 31
2 Glossary ............................................................................................................................................ 33
3 Index .................................................................................................................................................. 35
ii
1 The Festo_Motion.lib library
1.1 Overview
Festo_Motion.lib is an internal library for CoDeSys 2.3. This library can be used to control the following
types of Festo motor controller (drive controller):
– CMMD-AS-...
– CMMP-AS-...
– CMMS-AS-...
– CMMS-ST-...
– SFC-DC-...
– MTR-DCI-...
– SFC-LAC-...
– SFC-LACI-...
Communication is established via a fieldbus and one of the following communication protocols:
– CANopen
– PROFIBUS
The Festo motor controllers are controlled using the Festo Handling and Positioning Profile (FHPP).
The library contains function blocks for controlling and parameterising the individual drives.
Refer to the relevant motor controller documentation for information on operating and setting up the motor
controller types in question.
1.1.1 Architecture
Each motor controller is integrated into the CoDeSys project using a controller-specific hardware
configuration.
– All function blocks that access I/O data directly to control a motor controller require the first address of
the output data and the first address of the input data as an input/output variable.
– All function blocks that access I/O data directly to parameterise a motor controller require the first
address of the Festo Parameter Channel (FPC) output data and the first FPC address of the input data
as an input/output variable.
For each motor controller instance that exists, an instance of the function blocks used for control
purposes must also be created. As a result, function blocks used for control purposes cannot be
used for two different motor controllers.
1
The Festo_Motion.lib library
The following screenshots show how the input and output data is transferred from the fieldbus to the
function blocks.
The Festo Parameter Channel input and output data is offset by 8 bytes behind the FHPP Standard data.
2
The Festo_Motion.lib library
1.2 Requirements
The relevant files for the Festo motor controllers are required for communication via fieldbus:
Motor controller Element name in CoDeSys Filename for CANopen Filename for
PROFIBUS
During the installation of CoDeSys provided by Festo, the accompanying configuration files are
installed automatically and stored in the following directory: ...\CoDeSys
V2.3\Targets\Festo\...\IOCONFIG\
Configuration files that are not supplied with CoDeSys provided by Festo can be installed via the
standard CoDeSys dialog "Add configuration file".
In order to use the function blocks, the library Festo_Motion.lib must be integrated into the software
package "CoDeSys provided by Festo".
Refer to the "Library Manager" section in the "Resources" chapter of the general CoDeSys Help
for instructions on how to integrate a library.
FHPP Standard Use of the control function block alone Festo Handling and Positioning Profile
Standard
FHPP Standard Use of control, organisation and Festo Handling and Positioning Profile with
+ FPC parameter function blocks parameter channel
3
The Festo_Motion.lib library
Refer to the Help for the CoDeSys programming system for more information on base and DP
parameters. The documentation for the relevant PROFIBUS station contains special information on
configuration and parameterisation.
1.5 Service
Please contact your local Festo service centre or write to the following e-mail address if you have any
technical problems:
– service_international@festo.com
4
The Festo_Motion.lib library
Warning
Electrical axes can move with high force and at high speed. Collisions can lead to serious injury
to people and damage to components.
• 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
still connected to a power supply.
Warning
Parameterisation errors can cause injury to people and damage to property.
• Only enable the controller if the axis system has been installed and parameterised by
technically qualified staff.
5
The Festo_Motion.lib library
Documentation Contents
Brief description and manuals on CD- Brief description: Important instructions on commissioning
ROM (see catalogue) and preliminary information.
Manuals: Contents as described below.
Manuals P.BE-... Installation, commissioning and diagnosis of electric axes
with the relevant Festo motor controller.
Operating instructions for accessories Assembly and commissioning of the electric mini slide
SLTE as an actuator.
Help system for the Festo Configuration Functional descriptions for the Festo Configuration Tool
Tool (contained in FCT software) configuration software.
Help system for CoDeSys provided by Use of the motion modules for Festo motor controllers
Festo (this Help) described here.
Note
• Always read the information and safety instructions contained in this documentation.
6
The Festo_Motion.lib library
7
The Festo_Motion.lib library
Notes
– The function blocks can vary depending on the drive.
– The blocks belonging to the CMMS-AS can be used for the motor controller CMMD-AS.
8
The Festo_Motion.lib library
9
The Festo_Motion.lib library
10
The Festo_Motion.lib library
11
The Festo_Motion.lib library
12
The Festo_Motion.lib library
2. Limited selection of inputs and outputs with CoDeSys function blocks ..._CTRL
The following table contains a list of the inputs and outputs that are only supported by certain Festo motor
controllers and if applicable only for specific operating modes.
13
The Festo_Motion.lib library
14
The Festo_Motion.lib library
15
The Festo_Motion.lib library
The best way to perform the transfer is using an array variable, which means that only the first element in
the array has to be transferred to the block.
To parameterise a motor controller, a further eight bytes (the Festo Parameter Channel data (FPC data))
are transferred to a special function block. This "transfer" function block supplies all parameterisation
function blocks needed in the project with data.
16
The Festo_Motion.lib library
Figure: Visualisation element for the Festo motor controller CMMP-AS-... (example)
The input data of a function block linked to the visualisation is displayed in the left half of the visualisation
and output data is displayed in the right half. TRUE inputs and outputs are blue and FALSE inputs and
outputs are grey.
Proceed as follows:
1. Open the editing window of the visualisation object by double-clicking the name of the object in the
'Visualizations' tab.
2. Click the 'Insert' menu item and select the 'Visualizations' command. You can also click the
'Visualizations' icon in the function bar.
3. Move the mouse pointer over the editing window. The mouse pointer is identified with the relevant
symbol in the window.
4. Click in the editing field and hold the mouse button pressed. Then drag the mouse over the editing
field to create a placeholder for the visualisation element. Release the mouse button when the
placeholder reaches the required size.
5. Search for the correct visualisation element in the "Select visualization" dialog window and press "OK"
to confirm your selection.
17
The Festo_Motion.lib library
The required visualisation element appears in the editing window of the visualisation object.
• If necessary, adapt the size and position of the visualisation element by clicking and moving the
element or dragging the borders.
• Double-click the visualisation element to open the dialog window and configure the element. Here you
can modify different settings for displaying and connecting the visualisation element.
18
The Festo_Motion.lib library
The following table contains a list of the outputs and inputs of an organisation function block.
Key:
– Input/output: Designation of an input or output from the CoDeSys function block ..._PRM_INIT.
– Type: Data type expected by the relevant input or issued at an output.
– Description: Name and brief description of the CoDeSys function block (0 = FALSE, 1 = TRUE).
19
The Festo_Motion.lib library
20
The Festo_Motion.lib library
The position factor must be taken into consideration when using the following inputs and outputs with the
specified motor controllers.
Input/output Type Motor controller
21
The Festo_Motion.lib library
22
The Festo_Motion.lib library
23
The Festo_Motion.lib library
24
The Festo_Motion.lib library
25
The Festo_Motion.lib library
Note
Communication with the Festo Configuration Tool (FCT) is not possible when using the function
block xxx_PRM_KO.
26
The Festo_Motion.lib library
The function for using cam discs is optional. Please contact your local Festo service centre.
Note
Repeat the function after resetting the controller.
27
The Festo_Motion.lib library
1.10 Examples
1.10.1 Example for controlling a Festo motor controller
Festo motor controller CMMP-AS with associated function block CMMP_AS_CTRL
Type CMMP-AS-... motor controllers can be controlled in the following four combinations of operating and
control mode using this block:
– Record selection
– Direct mode position control
– Direct mode force control
– Direct mode velocity control
The preset operating and control mode is only adopted and displayed when a movement is
initiated, i.e. a rising edge at the "StartTask" input.
-- SupplyVoltagePresent = 1
EnableDrive = 1 DriveEnabled = 1
MC = 1
Stop = 1 Ready = 1
Halt = 1 HaltActive = 0
28
The Festo_Motion.lib library
Homing
Action by the user Feedback
29
The Festo_Motion.lib library
30
The Festo_Motion.lib library
Type CMMP-AS-... motor controllers can be parameterised in all four combinations of operating and
control mode using this block:
– Record selection
– Direct mode position control
– Direct mode force control
– Direct mode velocity control
Note
A description of the parameters according to FHPP supported by the different motor controllers
can be found in the relevant product documentation.
-- SupplyVoltagePresent = 1
EnableDrive = 1 DriveEnabled = 1
MC = 1
Stop = 1 Ready = 1
Halt = 1 HaltActive = 0
Write = 0 No feedback
UpperLimit Read upper limit value
PNU = 1011 No feedback
Subindex = 1 No feedback
Execute = 0->1 Done = TRUE
Err = FALSE
ErrStr = 'no Error'
ActPNU = 1011
ActSubindex = 1
ParamValueRD = ...
RETVAL = 0
31
The Festo_Motion.lib library
Write = 1 No feedback
PNU = 1013 No feedback
Subindex = 1 No feedback
ParamValueWR = ... No feedback
Execute = 0->1 Done = TRUE
Err = FALSE
ErrStr = 'no Error'
ActPNU = 1013
ActSubindex = 1
ParamValueRD = ...
RETVAL = 0
The values written to the motor controller using the type ..._PRM_SINGLE function block are stored in a
volatile memory and only remain valid until the control voltage of
24 V on 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:
Action by the user Feedback
Write = 1 No feedback
PNU = 127 No feedback
Subindex = 2 No feedback
ParamValueWR = 1 No feedback
Execute = 0->1 Done = TRUE
Err = FALSE
ErrStr = 'no Error'
ActPNU = 127
ActSubindex = 2
ParamValueRD = 0
RETVAL = 0
32
2 Glossary
C
COB-ID: Communication object identifier.
Consistency: A data range which is defined as consistent is transmitted complete, i.e. in one bus
cycle.
Controller: Control electronics which 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 dialogs 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 file: Device master data file in which all specific features of the slave are saved (e.g. number of
I/Os, number of diagnostic bytes, etc.).
H
Homing: Homing defines the reference position and thereby the origin of the measuring reference
system of an axis.
Homing method: Method for defining the reference position: against a fixed stop (overcurrent/speed
evaluation) or with reference switch.
Homing mode: Operating mode in which homing is carried out.
J
Jog mode: Manual movement in positive or negative direction.
N
Node ID: Used for unique identification of a bus station.
P
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)").
33
The Festo_Motion.lib library
PNU: Parameters which 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.
Position set: Positioning command defined in the position set table, consisting of target position,
positioning mode, positioning speed and accelerations.
Profile position mode: Operating mode for executing a position set or a direct positioning task.
Project zero point (PZ): Measuring reference point for all positions in positioning tasks. 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 basis point 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.
R
Reference point (REF): Basis point for the incremental measuring system. The reference point
defines a known orientation or position within the positioning path of the drive.
S
Subindex (IND): Integral part of the parameter channel (PKW) which addresses an element of an
array parameter (subparameter number).
T
Target Support Package: The Target Support Package enables the installation of target system-
specific files for controlling Festo CoDeSys motor controllers. The program is located in the start
menu under "Programs" and the option "Festo Software\CoDeSys V2.3 by Festo".
Teach mode: Operating mode for setting positions by moving to the target position, e.g. when
creating position sets.
34
3 Index
D R
Direct mode.................................................. 7 Record selection........................................... 7
F S
FHPP ........................................................... 7 Safety instructions for Festo_Motion.lib ........ 5
P
Parameter channel....................................... 7
35