Festo Motion 3 Library en
Festo Motion 3 Library en
Festo Motion 3 Library en
Table of Contents
1
Important instructions........................................................................................................................ 1
1.1 Designated use ............................................................................................................................ 1
1.1.1 Target group...................................................................................................................... 1
1.1.2 Service .............................................................................................................................. 1
1.2 Safety instructions ........................................................................................................................ 1
1.3 Important user information ........................................................................................................... 1
1.3.1 Danger categories ............................................................................................................ 1
1.4 Marking special information ......................................................................................................... 2
1.4.1 Pictograms ........................................................................................................................ 2
1.4.2 Text markings.................................................................................................................... 2
1.4.3 Further conventions .......................................................................................................... 2
Overview ............................................................................................................................................. 3
2.1 Architecture .................................................................................................................................. 3
2.2 Requirements ............................................................................................................................... 4
2.3 General information on Festo motor controllers ........................................................................... 5
2.3.1 Documentation on Festo motor controllers ....................................................................... 5
2.4 Festo Handling and Positioning Profile (FHPP) ........................................................................... 5
2.4.1 Control and status bytes ................................................................................................... 5
2.4.2 Parameter channel ........................................................................................................... 6
2.5 Operating modes ......................................................................................................................... 6
2.5.1 Record selection ............................................................................................................... 6
2.5.2 Direct mode ...................................................................................................................... 6
Examples ........................................................................................................................................... 31
4.1 Controlling a Festo motor controller ........................................................................................... 31
4.1.1 Prerequisites for ready status ......................................................................................... 31
4.1.2 Establishing the ready status .......................................................................................... 31
4.1.3 Homing ........................................................................................................................... 32
4.1.4 Setting and operation of "Record selection".................................................................... 32
4.1.5 Setting and operation of "Direct mode position control" .................................................. 32
4.1.6 Setting and operation of "Direct mode torque control" .................................................... 33
4.1.7 Setting and operation of "Direct mode speed control" .................................................... 33
4.2 Parameterising a Festo motor controller .................................................................................... 34
4.2.1 Prerequisites for ready status ......................................................................................... 34
4.2.2 Establishing the ready status .......................................................................................... 34
4.2.3 Reading parameters (e.g. homing method) .................................................................... 34
4.2.4 Writing parameters (e.g. acceleration homing method) .................................................. 35
Glossary ............................................................................................................................................ 37
iii
Important instructions
1.1
Designated use
The function blocks (FB) described are used to control and parameterise the associated device. You can
use them to conveniently integrate the many functions of the relevant device into your program. Function
blocks are integrated into the user program for each motor unit or motor controller (each axis) and called
cyclically using a separate instance. Simultaneous use of other function blocks for controlling the same
device is not permitted.
Read the "Safety instructions" and instructions on the designated use of the relevant devices, components
and modules. If additional commercially available components such as sensors and actuators are
connected, the specified limits for pressures, temperatures, electrical data, torques, etc. must not be
exceeded.
1.1.1
Target group
This manual is intended exclusively for technicians trained in control and automation technology.
1.1.2
Service
Please contact your local Festo service partner if you have any technical
problems( http://www.festo.com).
1.2
Safety instructions
When commissioning and programming positioning systems, you must observe the safety regulations in
the manuals and operating instructions for the components used.
The user must make sure there is nobody within the positioning range of the connected actuators or axis
systems. Access to the possible danger area must be prevented by suitable measures such as barriers
and warning signs.
Warning
Pneumatic and electric 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.
1.3
1.3.1
Danger categories
This document contains information on the possible dangers that can occur if the product is not used as
designated. This information is marked with a signal word (warning, caution, etc.), placed on a grey
background and additionally marked with a pictogram. A distinction is made between the following danger
warnings:
Warning
... means that serious injury to people and damage to property can occur if this warning is not
observed.
Caution
... means that injury to people and damage to property can occur if this warning is not observed.
Note
... means that damage to property can occur if this warning is not observed.
1.4
1.4.1
Pictograms
The following pictograms mark passages in the text that contain special information.
Information: Recommendations, tips and references to other sources of information.
1.4.2
Text markings
1.
Figures denote activities that must be carried out in the order specified.
Bullets denote activities that may be carried out in any desired order.
Hyphens denote general listings.
1.4.3
Further conventions
[Project] [New]
Menu items are framed in square brackets, for example the [New] command in the
[Project] menu opens a new project.
"OK"
The names of windows, dialogs and buttons, e.g. "Message window," "Dearchivate
project," "OK" as well as designations are displayed in inverted commas.
CTRL
Names of keys on the PC keyboard are represented in the text with uppercase letters
(e.g. ENTER KEY, CTRL, C, F1 etc.).
CTRL+C
For some functions you need to press two keys simultaneously. For example, press
and hold down the CTRL key and also press the C key. This is written in the text as
CTRL+C.
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.
Overview
Festo_Motion_3 is an internal library for CoDeSys V3 provided by Festo. The following Festo motor
controllers (drive controllers) can be controlled with this library:
CMMD-AS-...
CMMP-AS-...
CMMS-AS-...
CMMS-ST-...
SFC-DC-...
MTR-DCI-...
SFC-LAC-...
SFC-LACI-...
Communication takes place via fieldbus and uses the CANopen communication protocol.
Actuation of the Festo motor controllers takes place via the Festo Handling and Positioning Profile (FHPP).
The library contains function blocks for controlling and parameterising the individual drives.
Refer to the documentation for the motor controller for further information on operating and configuring the
relevant motor controller type.
Integrating the library
The Festo_Motion_3 library is located under "Library Manager" in CoDeSys V3 pbF.
Use the "Add Library" command to integrate the library.
All elements from this library are assigned to the namespace "FM".
2.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 as well as the first address of the input data as a transit 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) input data as well as the first FPC address of the
output data as a transit variable.
An instance of the function blocks for control must also be generated for each motor controller
instance. This means that a function block for control cannot be used for two different motor
controllers.
Parameterisation function
block
CMMD-AS-...
CMMS_AS_CTRL (FB)
CMMS_AS_PRM_INIT (FB)
CMMS_AS_PRM_SINGLE (FB)
CMMP-AS-...
CMMP_AS_CTRL (FB)
CMMP_AS_PRM_INIT (FB)
CMMP_AS_PRM_SINGLE (FB)
CMMS-AS-...
CMMS_AS_CTRL (FB)
CMMS_AS_PRM_INIT (FB)
CMMS_AS_PRM_SINGLE (FB)
CMMS-ST-...
CMMS_ST_CTRL (FB)
CMMS_ST_PRM_INIT (FB)
CMMS_ST_PRM_SINGLE (FB)
MTR-DCI-...
MTR_DCI_CTRL (FB)
MTR_DCI_PRM_INIT (FB)
MTR_DCI_PRM_SINGLE (FB)
SFC-DC-...
SFC_DC_CTRL (FB)
SFC_DC_PRM_INIT (FB)
SFC_DC_PRM_SINGLE (FB)
Parameterisation function
block
SFC-LAC-...
SFC_LAC_CTRL (FB)
SFC_LAC_PRM_INIT (FB)
SFC_LAC_PRM_SINGLE (FB)
SFC-LACI-...
SFC_LACI_CTRL (FB)
SFC_LACI_PRM_INIT (FB)
SFC_LACI_PRM_SINGLE (FB)
2.2
Requirements
For communication via fieldbus, the corresponding files are required for Festo motor controllers:
Motor controller
CMMD-AS-
CMMD-AS- (FHPP)
CMMD-AS_CAN_FHPP.eds
CMMP-AS-
CMMP-AS- (FHPP)
CMMP-AS--_CAN_FHPP.eds
CMMS-AS-
CMMS-AS (FHPP)
CMMS-AS_CAN_FHPP.eds
CMMS-ST-
CMMS-ST (FHPP)
CMMS-ST_CAN_FHPP.eds
MTR-DCI-...-CO
MTR-DCI--CO (FHPP)
MTR-DCI--FHPP.eds
SFC-DC-...-CO
SFC-DC-VC-3-E--CO (FHPP)
SFC-DC--CO-FHPP.eds
SFC-LAC--CO
SFC-LAC--CO-FHPP
SFC-LAC--CO-FHPP.eds
SFC-LACI--CO
SFC-LACI--CO-FHPP
SFC-LACI--CO-FHPP.eds
During installation of CoDeSys V.3 provided by Festo, the supplied device files are installed
automatically and stored in the following directory: C:\Documents and Settings\All
Users\Application Data\CoDeSys\Devices\
Device files that are not supplied can be installed via the standard CoDeSys dialog "Device
Repository".
2.3
The following sections contain information on the motion function blocks for Festo motor controllers. The
following additional manuals are required for a complete understanding:
2.3.1
Documentation
Contents
Manuals P.BE-...
Note
Always read the information and safety instructions contained in this documentation.
2.4
Festo has developed an optimised data profile especially tailored to the target applications for handling
and positioning tasks, the "Festo Handling and Positioning Profile (FHPP)."
The FHPP enables uniform control and programming for the various fieldbus systems and controllers from
Festo.
The FHPP defines the following for the user:
Operating modes
I/O data structure
Parameter objects
Sequence control
2.4.1
Control via the fieldbus takes place via 8 bits of I/O data. The triggering of control functions and the
analysis of status messages of the function block is mostly performed using single-bit operations.
2.4.2
Parameter channel
The controller can access all parameter values of the controller by means of the parameter channel. A
further 8 bytes of I/O data are used for this purpose.
2.5
Operating modes
2.5.1
Record selection
Saved positioning records can be processed in record selection mode. For this purpose, positioning
records are parameterised with the Festo Configuration Tool or taught via the control panel during
commissioning.
2.5.2
Direct mode
In direct mode operating mode, the important positioning data is transferred directly via the control bytes.
Target positions and speeds can be ascertained and specified by the controller during running time,
depending on the operating status.
No limitations due to the number of saved positioning records.
In both operating modes values can be taught/parameterised via the PLC.
The following direct mode types can be selected:
Direct mode position control
Direct mode torque control
Direct mode speed control
The names of the function blocks for Festo motor controllers start with the motor controller designation,
e.g. CMMP-AS. This is followed by the function of the function block, e.g. CTRL for a control function
block.
The Festo_Motion_3 library contains the following function blocks (FB):
Control FB for controlling the respective Festo motor controller
Organisation FB for parameterising the respective Festo motor controller types
Parameterisation FB for transferring individual parameters to the respective Festo motor controller
Function block
Explanation
xxx_CTRL
xxx_PRM_INIT
xxx_ PRM_SINGLE
xxx_ PRM_MULTI
xxx_ PRM_DIAG
xxx_ PRM_DIRMP
xxx_ PRM_KO
Notes
The function blocks can have drive-specific differences.
The function blocks of the CMMS-AS can be used for the motor controller CMMD-AS.
3.1
3.1.1
xxx_CTRL
Type
Description
FB_CFG
WORD
FB configuration
Bit 0 = FALSE: Low Byte first
Bit 0 = TRUE: High Byte first
Bit 1 = reserved
...
Bit 31 = reserved
Input
Type
Description
Pos_Factor_numerator
DINT
Pos_Factor_denumerator
DINT
AxisType
INT
EnableDrive
BOOL
Enable drive
= 1: Enable drive
= 0: Drive blocked
Stop
BOOL
Stop
= 1: Enable operation
= 0: Stop active (cancel emergency ramp + positioning
task). The drive stops with maximum braking ramp, the
positioning task is reset.
Brake
BOOL
Release brake
= 1: Release brake
= 0: Activate brake
Note: Release of the brake is only possible when the
controller is blocked. As soon as the controller is
enabled, it has sovereignty over control of the brake.
ResetFault
BOOL
Acknowledge fault
With a rising edge a fault is acknowledged and the fault
value is deleted.
HMIAccessLocked
BOOL
OPM
INT
Halt
BOOL
Halt
= 1: Halt is not active
= 0: Halt activated (do not cancel emergency ramp +
positioning task). The axis stops with a defined braking
ramp, the positioning task remains active (the remaining
path can be deleted with "ClearRemainingPosition").
StartTask
BOOL
StartHoming
BOOL
Start homing
With a rising edge homing is started with the configured
parameters.
Type
Description
JoggingPos
BOOL
Jogging positive
The drive moves at the specified velocity or rotational
speed in the direction of larger actual values, providing
the bit is set. The movement begins with the rising edge
and ends with the falling edge.
JoggingNeg
BOOL
Jogging negative
The drive moves at the specified velocity or rotational
speed in the direction of smaller actual values, see
JoggingPos.
TeachActualValue
BOOL
Teach value
With a falling edge the current actual value is transferred
to the nominal value register of the currently addressed
positioning record. Examples of actual values
include position, pressure or torque.
ClearRemainingPosition
BOOL
AbsoluteRelative
BOOL
Absolute/relative
= 0: Nominal value is absolute
= 1: Nominal value is relative to the last nominal value
SetFunction
BOOL
Cam disc
= 0: Cam disc not active
= 1: Cam disc active
DeactivateStrokeLimit
BOOL
RecordNo
SINT
Record number
Preselection of record number for record selection.
SetFuncNumber
USINT
SetFuncGroup
USINT
SetValuePosition
DINT
Position
Position in the positioning unit
SetValueForceRamp
USINT
Torque ramp
Value of the torque ramp as a % of the nominal value or
maximum value
SetValueVelocity
USINT
Velocity
Velocity as a % of the maximum velocity
SetValueForce
DINT
Torque
Torque as a % of the maximum torque
SetValueRotRamp
SINT
Velocity ramp
Velocity ramp as a % of the maximum ramp
Type
Description
SetValueRotSpeed
DINT
Velocity
Velocity in velocity unit
Input/output
Type
Description
b_FHPP_In
VAR_IN_OUT
b_FHPP_Out
VAR_IN_OUT
Output
Type
Description
OPMString
STRING(80)
StateOPMString
STRING(80)
DriveEnabled
BOOL
Controller enabled
= 0: Drive blocked, controller not active
= 1: Drive (controller) enabled
Ready
BOOL
Operation enabled
= 0: Stop active
= 1: Operation enabled, positioning possible
Warning
BOOL
Warning
= 0: No warning present
= 1: Warning present
Fault
BOOL
Fault
= 0: No fault
= 1: Fault present or fault reaction active. Fault code in
diagnostic memory.
SupplyVoltagePresent
BOOL
10
Type
Description
ControlFCT_HMI
BOOL
StateOPM
INT
HaltActive
BOOL
Halt
= 0: Halt is active
= 1: Halt is not active, axis can be moved
AckStart
BOOL
Acknowledge start
= 0: Ready for start (homing, jog)
= 1: Start carried out (homing, jog)
MC
BOOL
Motion Complete
= 0: Positioning task active
= 1: Positioning task completed, possibly with fault
Note: MC is set after device is switched on (status "Drive
blocked").
AckTeach
BOOL
Acknowledge teach
= 0: Ready for teaching
= 1: Teaching carried out, actual value has been
transferred
DriveIsMoving
BOOL
Axis is moving
= 0: Velocity of axis < limit
= 1: Velocity of axis >= limit
DragError
BOOL
Following error
= 0: No following error
= 1: Following error active
StandstillControl
BOOL
Standstill monitoring
= 0: After MC axis remains in tolerance window
= 1: After MC axis exits tolerance window
DriveIsReferenced
BOOL
Drive homed
= 0: Homing must be carried out
= 1: Homing information available, homing does not
need to be carried out
RC1
BOOL
RCC
BOOL
ActualFuncActive
BOOL
VelocityLimitReached
BOOL
11
Type
Description
StrokeLimitReached
BOOL
ActualRecordNo
SINT
Record number
Feedback of record number for record selection.
ActualFuncNumber
USINT
ActualFuncNumber
USINT
ActualPosition
DINT
Position
Feedback of position in position unit
ActualVelocity
SINT
Velocity
Feedback of velocity as a % of the maximum velocity
ActualForce
INT
Torque
Feedback of torque as a % of the maximum torque
ActualRotRamp
SINT
Velocity ramp
Feedback of velocity ramp as a % of the maximum ramp
ActualRotSpeed
DINT
Velocity
Feedback of velocity in velocity unit
Restricted selection
The following table contains a list of inputs and outputs that are only supported by specific Festo motor
controllers and, in some cases, only for specific operating modes.
Input/output
Type
Motor controller
Operating mode
Pos_Factor_numerator
DINT
MTR_DCI
SFC_DC
Pos_Factor_denumerator
DINT
MTR_DCI
SFC_DC
AxisType
INT
SFC_LACI
Brake
BOOL
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
SFC_LACI
StartHoming
BOOL
All
Record selection
Direct mode position control
TeachActualValue
BOOL
All
Record selection
AbsoluteRelative
BOOL
All
SetFunction
BOOL
CMMP_AS_CAM
12
Type
Motor controller
Operating mode
DeactivateStrokeLimit
BOOL
MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
RecordNo
SINT
All
Record selection
SetFuncNumber
USINT
CMMP_AS_CAM
SetFuncGroup
USINT
CMMP_AS_CAM
SetValuePosition
DINT
All
SetValueForceRamp
USINT
CMMP_AS
SetValueVelocity
USINT
All
SetValueForce
DINT
All
SetValueRotRamp
SINT
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
SetValueRotSpeed
DINT
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
AckTeach
BOOL
All
Record selection
DriveIsReferenced
BOOL
All
Record selection
Direct mode position control
RC1
BOOL
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
SFC_LAC
SFC_LACI
Record selection
RCC
BOOL
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
SFC_LAC
SFC_LACI
Record selection
ActualFuncActive
BOOL
CMMP_AS_CAM
VelocityLimitReached
BOOL
MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
StrokeLimitReached
BOOL
MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
ActualRecordNo
SINT
All
Record selection
ActualFuncNumber
USINT
CMMP_AS_CAM
ActualFuncGroup
USINT
CMMP_AS_CAM
ActualPosition
DINT
All
13
Type
Motor controller
Operating mode
ActualVelocity
SINT
All
ActualForce
INT
All
ActualRotRamp
SINT
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
ActualRotSpeed
DINT
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
14
3.1.2
To control a Festo motor controller, the respective fieldbus data must be transferred to the function block.
The following screenshots show a sample device configuration with a CMMP-AS CANopen slave.
15
16
3.1.3
For each motor controller there is one function block for control and multiple function blocks for
parameterisation.
There is also a visualisation element, which makes initial commissioning easier.
Fig: 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.
17
1.
2.
3.
Adjust the size and position of the visualisation element if necessary. To do this, click on the element
and use the borders.
For configuration, click on the visualisation element with the left mouse button. In the "Property" area
of the editing window ( [View] [Element Properties]) you can make various settings for displaying
and linking the visualisation element.
Click in the edit field of the "Object" "m_Input_INST" and then on the button for opening the "Input
Assistant" dialog.
18
Click on the "Plus Sign" of the "References" path in the "Property" dialog. The path is expanded.
Repeat by expanding the next path down. Now expand the path of the displayed visualisation element.
Link the visualisation element with the corresponding instance (name of axis).
There are two options here:
In the line "m_Input_INST", enter the name of the function block in combination with the higherlevel program name.
Double-click in the input line using the mouse. Using the left mouse button, click on the button that
is now displayed in the line. The "Input Assistance" dialog opens, where you can select the
corresponding instance. Confirm the selection with "OK."
19
3.2
3.2.1
xxx_PRM_INIT
Function blocks of type _PRM_INIT control access to the I/O data when using parameterisation function
blocks. Data is exchanged via the Festo Parameter Channel (FPC).
Parameterisation function blocks ..._PRM_... must have an instance of the organisation function
block ..._PRM_INIT.
Type
Description
FB_CFG
WORD
FB configuration
Bit 0 = FALSE: Low Byte first
Bit 0 = TRUE: High Byte first
Bit 1 = Reserved
...
Bit 31 = Reserved
DATA_REF
VAR_IN_OUT
b_FPC_In
VAR_IN_OUT
b_FPC_Out
VAR_IN_OUT
20
3.3
3.3.1
xxx_PRM_SINGLE
The function block xxx_PRM_SINGLE transfers a single parameter to the respective drive controller.
Type
Description
Execute
BOOL
Start transfer
0->1: Transfer of a parameter is started with a rising edge.
Write
BOOL
Read/write
= 0:
Read parameters
= 1:
Write parameters
Prerequisite: UpperLimit = 0; LowerLimit = 0
UpperLimit
BOOL
LowerLimit
BOOL
PNU
WORD
Subindex
SINT
DatatypeWR
USINT
ParamValueWR
DINT
DATA_REF
VAR_IN_OUT
Done
BOOL
Transfer status
= 0:
Transfer was not initiated
= 1:
Transfer was initiated
Err
BOOL
Error
= 0:
= 1:
parameter
parameter
ErrStr
STRING(80)
ActPNU
WORD
21
Type
Description
ActSubindex
SINT
DatatypeRD
USINT
ParamValueRD
DINT
RETVAL
UINT
Type
Motor controller
UpperLimit
BOOL
LowerLimit
BOOL
CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
DatatypeWR
USINT
DatatypeRD
USINT
MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
The position factor must be taken into account when using the following inputs and outputs with the
specified motor controllers.
Input/output
Type
Motor controller
ParamValueWR
DINT
ParamValueRD
DINT
MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
22
3.3.2
xxx_PRM_MULTI
The function block xxx_PRM_MULTI transfers a list of parameters to the respective motor controller.
Type
Description
Execute
BOOL
Start transfer
0->1: With a rising edge transfer of a parameter is started.
SizeOfParam
USINT
AdrOfParam
POINTER_TO_BYTE
DATA_REF
VAR_IN_OUT
Done
BOOL
Transfer status
= 0:
Transfer was not initiated
= 1:
Transfer was initiated
The reading result is contained in the parameter field (array)
under "Value".
ParamNr
USINT
Err
BOOL
Error
= 0:
= 1:
parameter
parameter
ErrStr
STRING(80)
RETVAL
UINT
23
SUBINDEX : USINT;
ACCESS
: USINT;
LENGTH
: USINT;
VALUE
: DINT;
END_STRUCT
ENT_TYPE
24
:UINT ;
3.3.3
xxx_PRM_DIAG
The function block xxx_PRM_DIAG reads the error memory or warning memory of the respective motor
controller.
Type
Description
ReadLatest
BOOL
ReadAll
BOOL
Warning
BOOL
Switch to warnings
= 0:
Read errors
= 1:
Read warnings
DATA_REF
VAR_IN_OUT
Done
BOOL
Transfer status
= 0:
Transfer was not initiated
= 1:
Transfer was initiated
ParamNr
USINT
Err
BOOL
Error
= 0:
= 1:
ErrStr
STRING(80)
DiagBuff
ARRAY [1..n] OF
FHPP_PRM_DIAGMESSAGE
Diagnostic buffer
The read messages are stored in the diagnostic
buffer (array). The completeness of the entries and
the number of parameters depends on the
respective device.
RETVAL
UINT
25
Type
Motor controller
Warning
BOOL
CMMP_AS
CMMP_AS_CAM
TYPE FHPP_PRM_DIAGMESSAGE :
STRUCT
DiagEvent
: DINT
DiagMsgNumber
: DINT
DiagTimeStamp:
: TOD
DiagMsgDescription : STRING;
END_STRUCT
ENT_TYPE
Given the fact that the structure FHPP_PRM_DIAGMESSAGE is universally valid, entries such
as DiagEvent and DiagTimeStamp, for example, are not supported by all drives. The size of the
diagnostic buffer also depends on the respective motor controller.
26
3.3.4
xxx_PRM_DIRMP
The function block xxx_RM_DIRMP writes or reads the dynamic values for direct mode (position control).
Type
Description
AxisType
INT
Execute
BOOL
Start transfer
0->1: With a rising edge transfer of a parameter is started.
Write
BOOL
Read/write
= 0:
Read parameters
= 1:
Write parameters
Velocity
DINT
Acceleration
DINT
Deceleration
DINT
JerkLimit
DINT
DampingTime
DINT
Load
DINT
DATA_REF
VAR_IN_OUT
Done
BOOL
Transfer status
= 0:
Transfer was not initiated
= 1:
Transfer was initiated
Err
BOOL
Error
= 0:
= 1:
ErrStr
STRING(80)
ActVelocity
DINT
ActAcceleration
DINT
ActDecceleration
DINT
ActJerkLimit
(Pos/Neg)
DINT
ActDampingTime
DINT
parameter
parameter
27
Type
Description
ActLoad
DINT
RETVAL
UINT
Type
Motor controller
DampingTime
DINT
ActDampingTime
DINT
SFC_LAC
SFC_LACI
Load
DINT
ActLoad
DINT
28
SFC_LAC
SFC_LACI
3.3.5
xxx_PRM_KO
The function block xxx_PRM_KO transfers a list of communication objects (CO) to the respective motor
controller.
Type
Description
Execute
BOOL
Start transfer
0->1: Transfer of a parameter is started with a rising edge.
Write
BOOL
Read/write
= 0:
Read communication object
= 1:
Write communication object
Prerequisite: UpperLimit = 0; LowerLimit = 0
For more information on communication objects, contact
your Festo service partner.
KO
DINT
Communication object
For more information on communication objects, contact
your Festo service partner.
ParamValueWR
DINT
DATA_REF
VAR_IN_OUT
Done
BOOL
Transfer status
= 0:
Transfer was not initiated
= 1:
Transfer was initiated
Err
BOOL
Error
= 0:
= 1:
parameter
parameter
ErrStr
STRING(80)
ParamValueRD
DINT
RETVAL
UINT
29
3.3.6
xxx_CAM_PRM_CAMNUMBER
Type
Description
Execute
BOOL
Start transfer
0->1: With a rising edge transfer of a parameter is started.
Write
BOOL
Read/write
= 0:
Read PNU 700 Subindex 1
= 1:
Write PNU 700 Subindex 1
CamNumber
DINT
DATA_REF
VAR_IN_OUT
Done
BOOL
Transfer status
= 0:
Transfer was not initiated
= 1:
Transfer was initiated
Err
BOOL
Error
= 0:
= 1:
parameter
parameter
ErrStr
STRING(80)
ActCamNumber
DINT
RETVAL
UINT
30
Examples
4.1
4.1.1
Depending on the respective motor controller, additional input signals may be required here, e.g. at DIN_4,
DIN_5, DIN_13, etc. Detailed information can be found in the manual for the motor controller used.
Motor controller is switched on
Load voltage is present
Control sovereignty lies with the PLC
4.1.2
User action
Feedback
--
SupplyVoltagePresent = 1
EnableDrive = 1
DriveEnabled = 1
MC = 1
Stop = 1
Ready = 1
Halt = 1
HaltActive = 0
31
4.1.3
Homing
User action
Feedback
StartHoming = 0->1
AckStart = 1
MC = 0
DriveIsMoving = 1
HaltActive = 1
--
DriveIsMoving = 0,
MC = 1, DriveIsReferenced = 1, HaltActive = 1 (homing
completed)
4.1.4
User action
Feedback
OPM = 0
RecordNo = 1
--
StartTask 0->1
--
DriveIsMoving = 0
MC = 1 (positioning completed)
4.1.5
User action
Feedback
OPM = 1
SetValueVelocity = ...
--
SetValuePosition = ...
--
StartTask = 1
--
DriveIsMoving = 0
MC = 1 (positioning completed)
32
4.1.6
User action
Feedback
OPM = 5
SetValueForce = ...
--
StartTask = 1
--
DriveIsMoving = 0
MC = 1 (torque specification reached)
4.1.7
User action
Feedback
OPM = 9
SetValueRotRamp = ...
--
SetValueRotSpeed = ...
--
StartTask = 1
--
DriveIsMoving = 0
MC = 1 (speed specification reached)
33
4.2
4.2.1
Depending on the respective motor controller, additional input signals may be required here, e.g. at DIN_4,
DIN_5, DIN_13, etc. Detailed information can be found in the manual for the motor controller used.
Motor controller is switched on
Load voltage is present
Control sovereignty lies with the PLC
4.2.2
User action
Feedback
--
SupplyVoltagePresent = 1
EnableDrive = 1
DriveEnabled = 1
MC = 1
Stop = 1
Ready = 1
Halt = 1
HaltActive = 0
4.2.3
User action
Feedback
Write = 0
No feedback
UpperLimit
PNU = 1011
No feedback
Subindex = 1
No feedback
34
Feedback
Execute = 0->1
Done = TRUE
Err = FALSE
ErrStr = 'no Error'
ActPNU = 1011
ActSubindex = 1
ParamValueRD = ...
RETVAL = 0
4.2.4
User action
Feedback
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 with the function block ..._PRM_SINGLE are stored in a volatile
memory and are valid until the control voltage of 24 V at the motor controller is interrupted. In a nonvolatile memory, the values can be assumed permanently by describing PNU 127 Subindex 2 with the
value 1.
The following actions must be performed in order for the described parameters to be assumed
permanently:
User action
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
35
Glossary
C
COB-ID: Communication object identifier.
Consistency: A data range, which is defined as consistent, is transmitted complete, i.e. in a bus
cycle.
Controller: Control electronics that evaluate the control signals and provide the voltage supply for the
motor via the power electronics (power electronics + closed-loop 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 by means of plug-ins with the necessary descriptions and dialogs.
Festo Handling and Positioning Profile (FHPP): Uniform field bus 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.
FPC: FHPP-specific parameter PKW version (Festo Parameter Channel).
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/velocity
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
Package: The package allows the installation of target system-specific files for the control of Festo
CoDeSys motor controllers. The program can be found in the Start menu under "Programs" in the
selection "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 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.
37
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
Teach mode: Operating mode for setting positions by moving to the target position e.g. when creating
position sets.
38