festo motion 3 library en (1)
Post on 13-Apr-2018
567 Views
Preview:
TRANSCRIPT
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 1/42
Festo Motion_3 library
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 2/42
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 3/42
iii
Table of Contents
1 Important instruct ions........................................................................................................................ 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
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
3 Function b locks for Festo motor con tro llers ................................................................................... 7
3.1 Control function block................................................................................................................... 7
3.1.1 xxx_CTRL ................................................................ ......................................................... 7
3.1.2 Linking function blocks ........................................................ ............................................ 15
3.1.3
Visualising function blocks .............................................................. ................................ 17 3.2 Organisation function block ............................................................ ............................................ 20
3.2.1 xxx_PRM_INIT ......................................................... ....................................................... 20
3.3 Parameterisation function blocks .......................................................................... ..................... 21
3.3.1 xxx_PRM_SINGLE ......................................................................................................... 21
3.3.2 xxx_PRM_MULTI ...................................................................................... ...................... 23
3.3.3 xxx_PRM_DIAG .................................................................. ............................................ 25
3.3.4 xxx_PRM_DIRMP ................................................................ ........................................... 27
3.3.5 xxx_PRM_KO .......................................................... ....................................................... 29
3.3.6 xxx_CAM_PRM_CAMNUMBER ..................................................................................... 30
4 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
5 Glossary ............................................................................................................................................ 37
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 4/42
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 5/42
Festo Motion_3 library
1
1 Important instructions
1.1 Designated useThe function blocks (FB) described are used to control and parameterise the associated device. You canuse them to conveniently integrate the many functions of the relevant device into your program. Functionblocks 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 samedevice is not permitted.
Read the "Safety instructions" and instructions on the designated use of the relevant devices, componentsand modules. If additional commercially available components such as sensors and actuators areconnected, the specified limits for pressures, temperatures, electrical data, torques, etc. must not beexceeded.
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 technicalproblems( http://www.festo.com).
1.2 Safety instructionsWhen commissioning and programming positioning systems, you must observe the safety regulations inthe 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 axissystems. Access to the possible danger area must be prevented by suitable measures such as barriersand warning signs.
Warning
Pneumatic and electric axes can move with high force and at high speed. Collisions can lead toserious 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 isstill 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 bytechnically qualified staff.
1.3 Important user information
1.3.1 Danger categor ies
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 greybackground and additionally marked with a pictogram. A distinction is made between the following dangerwarnings:
Warning
... means that serious injury to people and damage to property can occur if this warning is notobserved.
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.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 6/42
Festo Motion_3 library
2
1.4 Marking special information
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.
Accessory: Information on necessary or useful accessories for the Festo product.
Environment: Information on the environmentally friendly use of Festo products.
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," "Dearchivateproject," "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, pressand hold down the CTRL key and also press the C key. This is written in the text asCTRL+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.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 7/42
Festo Motion_3 library
3
2 Overview
Festo_Motion_3 is an internal library for CoDeSys V3 provided by Festo. The following Festo motorcontrollers (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 therelevant 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 ArchitectureEach motor controller is integrated into the CoDeSys project using a controller-specific hardwareconfiguration.
– All function blocks that access I/O data directly to control a motor controller require the first address ofthe 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 theoutput data as a transit variable.
An instance of the function blocks for control must also be generated for each motor controllerinstance. This means that a function block for control cannot be used for two different motorcontrollers.
Motor units/motor controllers Control function block Parameterisation functionblock
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)
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 8/42
Festo Motion_3 library
4
Motor units/motor controllers Control function block Parameterisation functionblock
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 RequirementsFor communication via fieldbus, the corresponding files are required for Festo motor controllers:
Motor cont roller Element name in CoDeSys Filename for CANopen
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 installedautomatically and stored in the following directory: C:\Documents and Settings\AllUsers\Application Data\CoDeSys\Devices\
Device files that are not supplied can be installed via the standard CoDeSys dialog "Device
Repository".
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 9/42
Festo Motion_3 library
5
2.3 General information on Festo motor control lersThe following sections contain information on the motion function blocks for Festo motor controllers. Thefollowing additional manuals are required for a complete understanding:
2.3.1 Documentation on Festo motor controllers
Documentation Contents
Brief description and manuals on CD-ROM (see catalogue)
Brief description: Important instructions on commissioningand preliminary information.
Manuals: Contents as described below.
Manuals P.BE-... Installation, commissioning and diagnosis of electric axeswith the respective Festo motor controller.
Operating instructions for accessories Fitting and commissioning of the electric mini slide SLTE asa drive element.
Help system for the Festo ConfigurationTool (contained in FCT software)
Functional descriptions for the Festo Configuration Toolconfiguration software.
Help system for CoDeSys V3 pbF
library Festo_Motion_3 (this Help)
How to use the motion function blocks for Festo motor
controllers.
Note
• Always read the information and safety instructions contained in this documentation.
2.4 Festo Handling and Positioning Profi le (FHPP)Festo has developed an optimised data profile especially tailored to the target applications for handlingand positioning tasks, the "Festo Handling and Positioning Profile (FHPP)."
The FHPP enables uniform control and programming for the various fieldbus systems and controllers fromFesto.
The FHPP defines the following for the user: – Operating modes
– I/O data structure
– Parameter objects
– Sequence control
Fig: The FHPP principle
2.4.1 Control and status bytes
Control via the fieldbus takes place via 8 bits of I/O data. The triggering of control functions and theanalysis of status messages of the function block is mostly performed using single-bit operations.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 10/42
Festo Motion_3 library
6
2.4.2 Parameter channel
The controller can access all parameter values of the controller by means of the parameter channel. Afurther 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, positioningrecords are parameterised with the Festo Configuration Tool or taught via the control panel duringcommissioning.
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
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 11/42
Festo Motion_3 library
7
3 Function blocks for Festo motor control lers
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 functionblock.
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 Control function block of the motor controller
xxx_PRM_INIT Organisation function block for parameterising the motor controller
xxx_ PRM_SINGLE Transfer of individual parameters
xxx_ PRM_MULTI Transfer of a parameter list (parameter array)
xxx_ PRM_DIAG Reading out of the diagnostic memory
xxx_ PRM_DIRMP Transfer of the parameters for direct mode position control
xxx_ PRM_KO Transfer of communication objects
xxx_CAM_PRM_CAMNUMBER Selection or information of a cam disc
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 Control function block
3.1.1 xxx_CTRL
Inputs and outputs
The following table contains a list of all inputs and outputs that an FHPP function block has to control amotor controller. The actual number depends on the control modes supported by the motor controller to becontrolled. The information as to which control modes are supported by which motor controller can befound in the corresponding motor controller documentation ( chapter "Restricted selection").
Legend:
– Input/output: Designation of an input or output of the CoDeSys function block ..._CTRL.
– Type: Data type that the respective input expects or data type that is issued at an output.
– Description: German designation and brief description of the CoDeSys function block.1 = TRUE0 = FALSE
Input 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
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 12/42
Festo Motion_3 library
8
Input Type Description
Pos_Factor_numerator DINT Counter value for conversion of position by increments
Pos_Factor_denumerator DINT Nominal value for conversion of position by increments
AxisType INT Connected axis type
EnableDrive BOOL Enable drive
= 1: Enable drive= 0: Drive blocked
Stop BOOL Stop
= 1: Enable operation
= 0: Stop active (cancel emergency ramp + positioningtask). The drive stops with maximum braking ramp, thepositioning task is reset.
Brake BOOL Release brake
= 1: Release brake= 0: Activate brakeNote: Release of the brake is only possible when thecontroller 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 faultvalue is deleted.
HMIAccessLocked BOOL Software access blocked
Control of access to the local (integrated) diagnosticinterface of the controller.
= 1: The FCT software may only monitor the controller,control of the device (HMI control) cannot be assumed bythe software.
= 0: The FCT software can assume control of the device(to change parameters or control inputs).
OPM INT FHPP operating mode + control mode
= 0: Record selection= 1: Direct mode position control= 5: Direct mode torque control= 9: Direct mode speed control= 13: Reserved= 17: Continuous mode
Halt BOOL Halt
= 1: Halt is not active= 0: Halt activated (do not cancel emergency ramp +positioning task). The axis stops with a defined brakingramp, the positioning task remains active (the remainingpath can be deleted with "ClearRemainingPosition").
StartTask BOOL Start positioning task
With a rising edge the current nominal values aretransferred and positioning started (also e.g. record 0 =homing).
StartHoming BOOL Start homing
With a rising edge homing is started with the configuredparameters.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 13/42
Festo Motion_3 library
9
Input Type Description
JoggingPos BOOL Jogging positive
The drive moves at the specified velocity or rotationalspeed in the direction of larger actual values, providingthe bit is set. The movement begins with the rising edgeand ends with the falling edge.
JoggingNeg BOOL Jogging negativeThe drive moves at the specified velocity or rotationalspeed in the direction of smaller actual values, seeJoggingPos.
TeachActualValue BOOL Teach value
With a falling edge the current actual value is transferredto the nominal value register of the currently addressedpositioning record. Examples of actual valuesinclude position, pressure or torque.
ClearRemainingPosition BOOL Delete remaining path
In the "Halt" status, a rising edge causes the positioningtask to be deleted and transfer to the "Ready" status.
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 Torque limit not active (only with torque control)
= 0: Torque monitoring active= 1: Torque monitoring not active
RecordNo SINT Record number
Preselection of record number for record selection.
SetFuncNumber USINT Cam disc function
= 0: Reserved= 1: Synchronisation on external input= 2: Synchronisation on external input with cam discfunction
(i.e. slave with physical master)= 3: Synchronisation on virtual master with cam discfunction
SetFuncGroup USINT Cam disc group
= 0: Synchronisation with/without cam disc= 1: Reserved= 2: Reserved= 3: Reserved
SetValuePosition DINT Position
Position in the positioning unit
SetValueForceRamp USINT Torque ramp
Value of the torque ramp as a % of the nominal value ormaximum value
SetValueVelocity USINT Velocity
Velocity as a % of the maximum velocity
SetValueForce DINT Torque
Torque as a % of the maximum torque
SetValueRotRamp SINT Velocity rampVelocity ramp as a % of the maximum ramp
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 14/42
Festo Motion_3 library
10
Input Type Description
SetValueRotSpeed DINT Velocity
Velocity in velocity unit
Input/output Type Description
b_FHPP_In VAR_IN_OUT FHPP input dataFirst address of the input data (output data of the motorcontroller)
b_FHPP_Out VAR_IN_OUT FHPP output data
First address of the output data (input data of the motorcontroller)
Output Type Description
OPMString STRING(80) Feedback of the selected FHPP operating mode +control mode
Record selection = 'Record Mode selected'
Direct mode position control = 'DirectmodePositioncontrol selected'Direct mode torque control = 'Directmode Forcecontrolselected'Direct mode speed control = 'Directmode Velocitycontrolselected'Operating mode and control mode invalid = 'notspecified'
Continuous mode = 'Continuousmode selected'
StateOPMString STRING(80) Feedback of active FHPP operating mode + controlmode
Record selection = 'Record Mode active'
Direct mode position control = 'Directmode
Positioncontrol activeDirect mode torque control = 'Directmode Forcecontrolactive'Direct mode speed control = 'Directmode Velocitycontrolactive'Operating mode and control mode invalid = 'notspecified'
Continuous mode = 'Continuousmode selected'
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 indiagnostic memory.
SupplyVoltagePresent BOOL Load voltage present
= 0: No load voltage= 1: Load voltage present
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 15/42
Festo Motion_3 library
11
Output Type Description
ControlFCT_HMI BOOL Software device control
= 0: Device control free (e.g. PLC/fieldbus)= 1: Device control by software (PLC control is locked)
StateOPM INT Feedback of FHPP operating mode + control mode
= 0: Record selection
= 1: Direct mode position control= 5: Direct mode torque control= 9: Direct mode speed control= 13: Reserved= 17: Continuous mode
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 "Driveblocked").
AckTeach BOOL Acknowledge teach
= 0: Ready for teaching= 1: Teaching carried out, actual value has beentransferred
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 notneed to be carried out
RC1 BOOL First record continuation carried out
= 0: A continuation condition was not configured or notsatisfied= 1: The first continuation condition was satisfied
RCC BOOL Record continuation completed - valid as soon as MC isavailable.
= 0: Record sequencing aborted. At least onecontinuation condition was not satisfied= 1: Record sequence was processed until the end.
ActualFuncActive BOOL Cam disc active
= 0: Cam disc not active= 1: Cam disc active
VelocityLimitReached BOOL Velocity limit reached (only with torque control)
= 1: Velocity limit reached= 0: Velocity limit not reached
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 16/42
Festo Motion_3 library
12
Output Type Description
StrokeLimitReached BOOL Torque limit reached (only with torque control)
= 0: Torque monitoring reached= 1: Torque monitoring not reached
ActualRecordNo SINT Record number
Feedback of record number for record selection.
ActualFuncNumber USINT Feedback of cam disc function
= 0: Reserved= 1: Synchronisation on external input= 2: Synchronisation on external input with cam discfunction
(i.e. slave with physical master)= 3: Synchronisation on virtual master with cam discfunction
ActualFuncNumber USINT Feedback of cam disc group
= 0: Synchronisation with/without cam disc= 1: Reserved= 2: Reserved
= 3: Reserved 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 motorcontrollers and, in some cases, only for specific operating modes.
Input/output Type Motor controller Operating mode
Pos_Factor_numerator DINT MTR_DCI
SFC_DC
All operating modes
Pos_Factor_denumerator DINT MTR_DCI
SFC_DC
All operating modes
AxisType INT SFC_LACI All operating modes
Brake BOOL CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
SFC_LACI
All operating modes
StartHoming BOOL All Record selection
Direct mode position control
TeachActualValue BOOL All Record selection
AbsoluteRelative BOOL All Direct mode position controlSetFunction BOOL CMMP_AS_CAM Direct mode position control
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 17/42
Festo Motion_3 library
13
Input/output Type Motor controller Operating mode
DeactivateStrokeLimit BOOL MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
Direct mode torque control
RecordNo SINT All Record selection
SetFuncNumber USINT CMMP_AS_CAM Direct mode position control
SetFuncGroup USINT CMMP_AS_CAM Direct mode position control
SetValuePosition DINT All Direct mode position control
SetValueForceRamp USINT CMMP_AS Direct mode torque control
SetValueVelocity USINT All Direct mode position control
SetValueForce DINT All Direct mode torque control
SetValueRotRamp SINT CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
Direct mode speed control
SetValueRotSpeed DINT CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
Direct mode speed control
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 Direct mode position controlVelocityLimitReached BOOL MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
Direct mode torque control
StrokeLimitReached BOOL MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
Direct mode torque control
ActualRecordNo SINT All Record selection
ActualFuncNumber USINT CMMP_AS_CAM Direct mode position control ActualFuncGroup USINT CMMP_AS_CAM Direct mode position control
ActualPosition DINT All Direct mode position control
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 18/42
Festo Motion_3 library
14
Input/output Type Motor controller Operating mode
ActualVelocity SINT All Direct mode position control
ActualForce INT All Direct mode torque control
ActualRotRamp SINT CMMD_AS
CMMP_AS
CMMS_ASCMMS_ST
Direct mode speed control
ActualRotSpeed DINT CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
Direct mode speed control
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 19/42
Festo Motion_3 library
15
3.1.2 Linking funct ion blocks
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.
Fig: Device configuration
Fig: CANopen I/O screenshot
The data should ideally be transferred using an array variable, whereby only the first element of the arrayhas to be transferred to the function block.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 20/42
Festo Motion_3 library
16
Fig: Link between drive controller and function block
The input and output data of the Festo Parameter Channel (FPC_In, FPC_Out) is offset by8 bytes after the FHPP standard data.
For parameterisation of a motor controller, a further 8 bytes, the Festo Parameter Channel data (FPCdata), are transferred to a special function block. All necessary parameterisation function blocks in theproject are supplied with data using this "transfer" function block.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 21/42
Festo Motion_3 library
17
3.1.3 Visualising funct ion blocks
For each motor controller there is one function block for control and multiple function blocks forparameterisation.
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 visualisationand output data is displayed in the right half. TRUE inputs and outputs are blue and FALSE inputs andoutputs are grey.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 22/42
Festo Motion_3 library
18
Linking the visualisation
The visualisation element for the selected function block is added to a visualisation object. You can selectthe visualisation object using the "Frame Selection" context command.
The desired visualisation element appears in the editing window for the visualisation object.
Refer to the section "Visualisation" in the general CoDeSys Help for information on how to createa visualisation object.
1. Adjust the size and position of the visualisation element if necessary. To do this, click on the elementand use the borders.
2. For configuration, click on the visualisation element with the left mouse button. In the "Property" areaof the editing window ( [View] [Element Properties]) you can make various settings for displayingand linking the visualisation element.
3. Click in the edit field of the "Object" "m_Input_INST" and then on the button for opening the "Input Assistant" dialog.
Fig: Linking a visualisation
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 23/42
Festo Motion_3 library
19
Fig: Visualisation - "Property" dialog
4. 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.
5. 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 higher-level program name.
– Double-click in the input line using the mouse. Using the left mouse button, click on the button thatis now displayed in the line. The "Input Assistance" dialog opens, where you can select thecorresponding instance. Confirm the selection with "OK."
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 24/42
Festo Motion_3 library
20
3.2 Organisation function block
3.2.1 xxx_PRM_INIT
Function blocks of type …_PRM_INIT control access to the I/O data when using parameterisation functionblocks. Data is exchanged via the Festo Parameter Channel (FPC).
Parameterisation function blocks ..._PRM_... must have an instance of the organisation function
block ..._PRM_INIT.
Inputs and outputs
Legend:
– Input/output: Designation of an input or output of the CoDeSys function block ..._PRM_INIT.
– Type: Data type that the respective input expects or data type that is issued at an output.
– Description: German designation and brief description of the CoDeSys function block (0 = FALSE,1 = TRUE).
Input/output Type Description
FB_CFG WORD FB configuration
Bit 0 = FALSE: Low Byte firstBit 0 = TRUE: High Byte first
Bit 1 = Reserved
...
Bit 31 = Reserved
DATA_REF VAR_IN_OUT FPC data structure of data type FHPP_PRM_REF
Content of the data structure mirrors I/O data of the FPC
b_FPC_In VAR_IN_OUT FHPP-FPC input data
First address of the CAN input data of the FPC (outputdata of the motor controller)
b_FPC_Out VAR_IN_OUT FHPP-FPC output data
First address of the CAN output data of the FPC (inputdata of the motor controller)
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 25/42
Festo Motion_3 library
21
3.3 Parameterisation function blocks
3.3.1 xxx_PRM_SINGLE
The function block xxx_PRM_SINGLE transfers a single parameter to the respective drive controller.
Fig: Example of function block CMMP_AS_PRM_SINGLE
Inputs and outputs
The following table shows the inputs and outputs that the function block xxx_PRM_SINGLE has forparameterising a motor controller.
Input/output 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 Reading of upper limit
= 1: Read upper limit
Prerequisite: Write = 0; LowerLimit = 0;
LowerLimit BOOL Reading of lower limit
= 1: Read lower limit
Prerequisite: Write = 0; UpperLimit = 0;
PNU WORD Number of the corresponding parameter
Subindex SINT Subindexof the corresponding parameter
DatatypeWR USINT Data type of the parameter to be written
= 1: Byte= 2: Word= 4: Double Word
ParamValueWR DINT Parameter value when writing a parameter
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
Done BOOL Transfer status
= 0: Transfer was not initiated= 1: Transfer was initiated
Err BOOL Error
= 0: No error during the transfer of a parameter= 1: Error during the transfer of a parameter
ErrStr STRING(80) Output of an error message as a string
ActPNU WORD Current number of the corresponding parameter
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 26/42
Festo Motion_3 library
22
Input/output Type Description
ActSubindex SINT Current subindex of the corresponding parameter
DatatypeRD USINT Data type of the read parameter
= 1: Byte= 2: Word= 4: Double Word
ParamValueRD DINT Parameter value when reading a parameter
RETVAL UINT Current status of the FB instance
When using multiple instances of the FB, the currentinternal status of the respective FB is output.
Table: xxx_PRM_SINGLE, inputs and outputs
Legend:
– Input/output: Designation of an input or output of the CoDeSys function block.
– Type: Data type that the respective input expects or data type that is issued at an output.
– Description: German designation and brief description of the CoDeSys function block (0 = FALSE,1 = TRUE).
Restricted selection of function b locks
The following inputs and outputs are only supported by specific Festo motor controllers. All other inputsand outputs are available for all CoDeSys function blocks ..._PRM_SINGLE irrespective of the motorcontroller type.
Input/output Type Motor controller
UpperLimit BOOL CMMD_AS
CMMP_AS
CMMS_AS
CMMS_ST
LowerLimit BOOL
DatatypeWR USINT MTR_DCI
SFC_DCSFC_LAC
SFC_LACI
DatatypeRD USINT
The position factor must be taken into account when using the following inputs and outputs with thespecified motor controllers.
Input/output Type Motor controller
ParamValueWR DINT MTR_DCI
SFC_DC
SFC_LAC
SFC_LACI
ParamValueRD DINT
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 27/42
Festo Motion_3 library
23
3.3.2 xxx_PRM_MULTI
The function block xxx_PRM_MULTI transfers a list of parameters to the respective motor controller.
Fig: Example of function block CMMP_AS_PRM_MULTI
Inputs and outputs
The following table shows the inputs and outputs that the function block xxx_PRM_MULTI has forparameterising a motor controller.
Input/output Type Description
Execute BOOL Start transfer
0->1: With a rising edge transfer of a parameter is started.
SizeOfParam USINT Size of the parameter field (array) intended for transfer.
AdrOfParam POINTER_TO_BYTE Address of the parameter field (array) intended for transfer.
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
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 Number of the parameter currently being transferred
Err BOOL Error
= 0: No error during the transfer of a parameter= 1: Error during the transfer of a parameter
ErrStr STRING(80) Output of an error message as a string
RETVAL UINT Current status of the FB instance
When using multiple instances of the FB, the currentinternal status of the respective FB is output.
Example of a parameter fi eld (array)
Mul t i Par am : ARRAY [1. . 5] OF FHPP_PRM_DESCRI PTI ON : =
( PNU: =404, SUBI NDEX: =2, ACCESS: = 1, LENGTH: = 4, VALUE: =100) ,
( PNU: =404, SUBI NDEX: =3, ACCESS: = 1, LENGTH: = 4, VALUE: =200) ,
( PNU: =404, SUBI NDEX: =4, ACCESS: = 0, LENGTH: = 4, VALUE: =300) ,
( PNU: =404, SUBI NDEX: =5, ACCESS: = 1, LENGTH: = 4, VALUE: =400) ,
( PNU: =404, SUBI NDEX: =6, ACCESS: = 0, LENGTH: = 4, VALUE: =500) ;
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 28/42
Festo Motion_3 library
24
Composition of the structure FHPP_PRM_DESCRIPTION
TYPE FHPP_PRM_DESCRI PTI ON :
STRUCT
PNU : UI NT ; ( *Parameter number of t he speci f i ed par ameter*)
SUBI NDEX : USI NT; ( *Subi ndex of t he speci f i ed parameter *)
ACCESS : USI NT; ( *0 = Read paramet er / 1 = Wr i t e par amet er *)
LENGTH : USI NT; ( *Length of t he par amet er as number of bytes ( al ways4 f or CMM. . . cont r ol l er , ot her wi se see FBxxx_PRM_Si ngl e i nput Dat at ypeWR) *)
VALUE : DI NT; ( *Resul t r ead out or wr i t t en val ueFor t he f ol l owi ng f uncti on bl ocks:MTR_DCI _PRM_MULTI , SFC_DC_PRM_MULTI ,SFC_LAC_PRM_MULTI , SFC_LACI _PRM_MULTI t he posi t i onf act or must be t aken i nt o account . *)
END_STRUCT
ENT_TYPE
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 29/42
Festo Motion_3 library
25
3.3.3 xxx_PRM_DIAG
The function block xxx_PRM_DIAG reads the error memory or warning memory of the respective motorcontroller.
Fig: Example of function block CMMP_AS_PRM_DIAG
Inputs and outputs
The following table shows the inputs and outputs that the function block xxx_PRM_DIAG has forparameterising a motor controller.
Input/output Type Description
ReadLatest BOOL Read latest entry
0->1: With a rising edge the last message is readout.
ReadAll BOOL Read all entries
0->1: With a rising edge all messages are read out.
Warning BOOL Switch to warnings
= 0: Read errors= 1: Read warnings
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
Done BOOL Transfer status
= 0: Transfer was not initiated= 1: Transfer was initiated
ParamNr USINT Parameter number of the error memoryNumber of the parameter currently being transferred
ReadLatest: ParamNr = 1ReadAll: Parameter number of the error memorycurrently being processed
Err BOOL Error
= 0: No error during the transfer of a parameter= 1: Error during the transfer of a parameter
ErrStr STRING(80) Output of an error message as a string
DiagBuff ARRAY [1..n] OFFHPP_PRM_DIAGMESSAGE
Diagnostic buffer
The read messages are stored in the diagnosticbuffer (array). The completeness of the entries andthe number of parameters depends on therespective device.
RETVAL UINT Current status of the FB instance
When using multiple instances of the FB, the currentinternal status of the respective FB is output.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 30/42
Festo Motion_3 library
26
Restricted selection of function b locks
The following inputs and outputs are only supported by specific Festo motor controllers. All other inputsand outputs are available for all CoDeSys function blocks ..._PRM_DIAG irrespective of the motorcontroller type.
Input/output Type Motor controller
Warning BOOL CMMP_AS
CMMP_AS_CAM
Composition of the field structure of the diagnostic bu ffer
Di agBuf f ARRAY [ 1. . 32] OF FHPP_ PRM_DI AGMESSAGE;
TYPE FHPP_PRM_DI AGMESSAGE :
STRUCT
Di agEvent : DI NT ; ( *Di agnost i c event PNU 200 / PNU 210*)
Di agMsgNumber : DI NT ; ( *Faul t number PNU201 / PNU 211*)
Di agTi meStamp: : TOD ; ( *Ti mest amp of t he di agnost i c message*)
Di agMsgDescri pt i on : STRI NG; ( *Descri pt i on of t he di agnost i c message*) END_STRUCT
ENT_TYPE
Given the fact that the structure FHPP_PRM_DIAGMESSAGE is universally valid, entries suchas DiagEvent and DiagTimeStamp, for example, are not supported by all drives. The size of thediagnostic buffer also depends on the respective motor controller.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 31/42
Festo Motion_3 library
27
3.3.4 xxx_PRM_DIRMP
The function block xxx_RM_DIRMP writes or reads the dynamic values for direct mode (position control).
Fig: Example of function block CMMP_AS_PRM_DIRMP
Inputs and outputs
The following table shows the inputs and outputs that the function block xxx_PRM_DIRMP has forparameterising a motor controller.
Input/output Type Description
AxisType INT Connected axis type
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 Basic velocity: PNU 540
Acceleration DINT Acceleration: PNU 541
Deceleration DINT Deceleration: PNU 542
JerkLimit DINT SFC_LACx: Smoothing: PNU 543CMMx_xxx: Smoothing: PNU 546
DampingTime DINT Filter time: PNU 1023
Load DINT Additional weight: PNU 544
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
Done BOOL Transfer status
= 0: Transfer was not initiated= 1: Transfer was initiated
Err BOOL Error
= 0: No error during the transfer of a parameter= 1: Error during the transfer of a parameter
ErrStr STRING(80) Output of an error message as a string
ActVelocity DINT Current basic velocity: PNU 540
ActAcceleration DINT Current acceleration: PNU 541
ActDecceleration DINT Current deceleration: PNU 542
ActJerkLimit(Pos/Neg)
DINT SFC_LACx: Current smoothing: PNU 543
CMMx_xxx: Current smoothing: PNU 546
ActDampingTime DINT Current filter time: PNU 1023
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 32/42
Festo Motion_3 library
28
Input/output Type Description
ActLoad DINT Current additional weight: PNU544
RETVAL UINT Current status of the FB instance
When using multiple instances of the FB, the current internalstatus of the respective FB is output.
Restricted selection of function b locks
The following inputs and outputs are only supported by specific Festo motor controllers. All other inputsand outputs are available for all CoDeSys function blocks ..._PRM_DIRMP irrespective of the motorcontroller type.
Input/output Type Motor controller
DampingTime DINT SFC_LAC
SFC_LACI ActDampingTime DINT
Load DINT SFC_LAC
SFC_LACI ActLoad DINT
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 33/42
Festo Motion_3 library
29
3.3.5 xxx_PRM_KO
The function block xxx_PRM_KO transfers a list of communication objects (CO) to the respective motorcontroller.
Fig: Example of function block CMMP_AS_PRM_KRO
Note
Use of the function block xxx-PRM_KO excludes simultaneous communication with the FestoConfiguration Tool (FCT).
Inputs and outputs
The following table shows the inputs and outputs that the function block xxx_PRM_KO has forparameterising a motor controller.
Input/output 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, contactyour Festo service partner.
KO DINT Communication object
For more information on communication objects, contactyour Festo service partner.
ParamValueWR DINT Parameter value when writing a communication object
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
Done BOOL Transfer status
= 0: Transfer was not initiated= 1: Transfer was initiated
Err BOOL Error
= 0: No error during the transfer of a parameter= 1: Error during the transfer of a parameter
ErrStr STRING(80) Output of an error message as a string
ParamValueRD DINT Parameter value when reading a communication object
RETVAL UINT Current status of the FB instance
When using multiple instances of the FB, the current internalstatus of the respective FB is output.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 34/42
Festo Motion_3 library
30
3.3.6 xxx_CAM_PRM_CAMNUMBER
With the function block xxx_CAM_PRM_CAMNUMBER you can:
– Select a cam disc via specification of the cam disc number in the drive
– Output the current cam disc using the read command
The function for using cam discs is optional. Please contact your Festo service partner.
Fig: Example of function block CMMP_AS_PRM_CAMNUMBER
Note
Execute the function again after resetting the controller.
Inputs and outputs
The following table shows the inputs and outputs that the function block xxx_PRM_CAMNUMBER has forparameterising a motor controller.
Input/output 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 Preselection of cam disc number
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
Done BOOL Transfer status
= 0: Transfer was not initiated= 1: Transfer was initiated
Err BOOL Error
= 0: No error during the transfer of a parameter= 1: Error during the transfer of a parameter
ErrStr STRING(80) Output of an error message as a string
ActCamNumber DINT Number of the currently selected cam disc
RETVAL UINT Current status of the FB instance
When using multiple instances of the FB, the current internalstatus of the respective FB is output.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 35/42
Festo Motion_3 library
31
4 Examples
4.1 Controlling a Festo motor control lerFesto motor controller CMMP-AS with corresponding function block CMMP_AS_CTRL
Fig: Example of function block CMMP_AS_CTRL
With this function block, the motor controller type CMMP-AS-... can be controlled using the following fouroperating and control mode combinations:
– Record selection
– Direct mode position control
– Direct mode torque control
– Direct mode speed control
The set operating and control mode is only accepted and displayed with the start of a movement,i.e. with a rising edge at the "StartTask" input.
4.1.1 Prerequisi tes for ready status
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 Establishing the ready status
User action Feedback
-- SupplyVoltagePresent = 1
EnableDrive = 1 DriveEnabled = 1
MC = 1
Stop = 1 Ready = 1
Halt = 1 HaltActive = 0
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 36/42
Festo Motion_3 library
32
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 (homingcompleted)
4.1.4 Setting and operation of "Record selection"
User action Feedback
OPM = 0 OPMString = 'Record Mode selected'
StateOPMString = 'Record Mode active'
StateOPM = 0
RecordNo = 1 --
StartTask 0->1 OPMString = 'Record Mode selected'
StateOPMString = 'Record Mode active'
StateOPM = 0
AckStart = 1
MC = 0
DriveIsMoving = 1
ActualRecordNo = 1
ActualPosition = ...
-- DriveIsMoving = 0
MC = 1 (positioning completed)
4.1.5 Setting and operation of "Direct mode posit ion cont rol"
User action Feedback
OPM = 1 OPMString = 'Directmode Positioncontrol selected'
StateOPMString = 'Directmode Positioncontrol active'
StateOPM = 1
SetValueVelocity = ... --
SetValuePosition = ... --
StartTask = 1 OPMString = 'Directmode Positioncontrol active'
StateOPMString = 'Directmode Positioncontrol active'
StateOPM = 1
AckStart = 1
MC = 0
DriveIsMoving = 1
ActualVelocity = ...
ActualPosition = ...
-- DriveIsMoving = 0
MC = 1 (positioning completed)
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 37/42
Festo Motion_3 library
33
4.1.6 Setting and operation of "Direct mode torque control"
User action Feedback
OPM = 5 OPMString = 'Directmode Forcecontrol selected'
StateOPMString = Previous operating and control mode asSTRING
StateOPM = Previous operating and control mode as INT
SetValueForce = ... --
StartTask = 1 OPMString = 'Directmode Forcecontrol active'
StateOPMString = 'Directmode Forcecontrol active'
StateOPM = 5
AckStart = 1
MC = 0
DriveIsMoving = 1
ActualForce = ...
ActualPosition = ...
-- DriveIsMoving = 0MC = 1 (torque specification reached)
4.1.7 Setting and operation of "Direct mode speed cont rol"
User action Feedback
OPM = 9 OPMString = 'Directmode Velocitycontrol selected'
StateOPMString = Previous operating and control mode asSTRING
StateOPM = Previous operating and control mode as INT
SetValueRotRamp = ... --
SetValueRotSpeed = ... --
StartTask = 1 OPMString = 'Directmode Velocitycontrol active'
StateOPMString = 'Directmode Velocitycontrol active'
StateOPM = 9
AckStart = 1
MC = 0
DriveIsMoving = 1
ActualRotRamp = ...
ActualRotSpeed = ...
-- DriveIsMoving = 0
MC = 1 (speed specification reached)
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 38/42
Festo Motion_3 library
34
4.2 Parameterising a Festo motor control lerFesto motor controller CMMP-AS with corresponding function block CMMP_AS_PRM_SINGLE.
Fig: Example of function block CMMP_AS_PRM_SINGLE
With this function block, the motor controller type CMMP-AS-... can be parameterised using all fouroperating and control mode combinations:
– Record selection
– Direct mode position control
– Direct mode torque control – Direct mode speed control
Note
For a description of the parameters supported by the various motor controllers according toFHPP, please refer to the respective product documentation.
4.2.1 Prerequisi tes for ready status
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 Establishing the ready status
User action Feedback
-- SupplyVoltagePresent = 1
EnableDrive = 1 DriveEnabled = 1MC = 1
Stop = 1 Ready = 1
Halt = 1 HaltActive = 0
4.2.3 Reading parameters (e.g. homing method)
User action Feedback
Write = 0 No feedback
UpperLimit Reading of upper limit
PNU = 1011 No feedback
Subindex = 1 No feedback
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 39/42
Festo Motion_3 library
35
User action Feedback
Execute = 0->1 Done = TRUEErr = FALSEErrStr = 'no Error' ActPNU = 1011 ActSubindex = 1ParamValueRD = ...
RETVAL = 0
4.2.4 Writing parameters (e.g. acceleration homing method)
User action Feedback
Write = 1 No feedback
PNU = 1013 No feedback
Subindex = 1 No feedback
ParamValueWR = ... No feedback
Execute = 0->1 Done = TRUEErr = FALSEErrStr = 'no Error' ActPNU = 1013 ActSubindex = 1ParamValueRD = ...RETVAL = 0
The values written to the motor controller with the function block ..._PRM_SINGLE are stored in a volatilememory and are valid until the control voltage of 24 V at the motor controller is interrupted. In a non-volatile memory, the values can be assumed permanently by describing PNU 127 Subindex 2 with thevalue 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 = TRUEErr = FALSEErrStr = 'no Error' ActPNU = 127
ActSubindex = 2ParamValueRD = 0RETVAL = 0
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 40/42
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 41/42
37
5 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 themotor via the power electronics (power electronics + closed-loop controller + positioningcontroller).
E
EDS file: Electronic data sheet, which describes the functions and features of a CANopen device instandardised 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 aresupported by means of plug-ins with the necessary descriptions and dialogs.
Festo Handling and Positioning Profile (FHPP): Uniform field bus data profile for positioningcontrollers 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 FestoCoDeSys motor controllers. The program can be found in the Start menu under "Programs" in theselection "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.
7/25/2019 Festo Motion 3 Library en (1)
http://slidepdf.com/reader/full/festo-motion-3-library-en-1 42/42
Festo Motion_3 library
Profile position mode: Operating mode for processing a position set or a direct positioning task.
Project zero point (PZ): Measuring reference point for all positions in positioning tasks. The projectzero point forms the basis for all absolute position specifications (e.g. in the position set table orwith direct control via the control interface or diagnostic interface). The basis point for the projectzero point is the axis zero point. With the MTR-DCI the project zero point PZ and the axis zeropoint AZ are identical.
RReference poin t (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 anarray parameter (subparameter number).
T
Teach mode: Operating mode for setting positions by moving to the target position e.g. when creatingposition sets.
top related