Festo Motion FHPP Rockwell

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

Description

www.festo.de
Library of AOI for
motor controller with FHPP
Festo Motion FHPP Add-On Instructions (AOIs)
(Rockwell RSLogix Design Studio 5000)
for Rockwell PLCs

07.12.2020
Table of Contents
1 Important instructions................................................................................................................................... 4
1.1 Designated use ................................................................................................................................... 4
1.2 Safety instructions .............................................................................................................................. 5
1.3 Danger categories ............................................................................................................................... 5
1.4 Marking special information ............................................................................................................... 6

2 Introduction ................................................................................................................................................... 7
2.1 Basic principles ................................................................................................................................... 7
2.2 General information on Festo motor controllers .................................................................................. 7

3 Festo Handling and Positioning Profile (FHPP) ............................................................................................. 8


3.1 Operating modes ................................................................................................................................ 9
3.2 Add-On Instructions for Festo motor controllers ................................................................................. 9

4 Usage of the library ..................................................................................................................................... 10


4.1 Import of the AOI’s ............................................................................................................................ 10
4.2 Basic program structure .................................................................................................................... 11
4.3 Workaround for copying default Tag Values to Instances .................................................................. 12

5 Add-On Instruction Elements ...................................................................................................................... 14


5.1 FML_READ – Add-On Instruction to prepare the input data ............................................................... 14
5.1.1 Inputs and outputs ............................................................................................................... 15
5.1.2 Device types of the motor controllers ................................................................................... 16
5.1.3 Addressing the input controller tags..................................................................................... 16
5.1.4 Working with FHPP+ input objects ........................................................................................ 17
5.1.5 Handling values from FHPP+ input objects ........................................................................... 18
5.1.6 The DT_FML_REF structure ................................................................................................... 19
5.1.7 EtherNet/IP – Passing the input data.................................................................................... 20
5.1.8 IO-Link – passing the input data ........................................................................................... 23
5.2 FML_WRITE – Add-On Instruction to prepare the output data ........................................................... 25
5.2.1 FML_WRITE: Inputs and outputs .......................................................................................... 26
5.2.2 Addressing the output controller tags .................................................................................. 27
5.2.3 Working with FHPP+ output objects ..................................................................................... 28
5.2.4 Handling values from FHPP+ output objects ......................................................................... 29
5.3 FHPP_CTRL – Add-On Instruction for controlling ............................................................................... 31
5.3.1 FHPP_CTRL: Inputs and Outputs........................................................................................... 32
5.4 FHPP_PLUS – Add-On Instruction to map the FHPP+ objects ............................................................. 36
5.5 FPC_xxx – Add-On Instructions for parameterisation ......................................................................... 37
5.5.1 Overview .............................................................................................................................. 37
5.5.2 FPC_DATA_OBJECT – object transfer ..................................................................................... 38
5.5.3 FPC_DIAG – get actual error.................................................................................................. 40
5.5.4 FPC_DIRMP – dynamic parameters for direct mode .............................................................. 41
5.5.5 FPC_FILE_ARRAY – transfer parameter set ............................................................................ 42
5.5.6 FPC_MULTI – transfer multiple FHPP parameters .................................................................. 44
5.5.7 FPC_PNU – transfer a single FHPP parameter ....................................................................... 46

6 Status and error numbers of the Add-On Instructions................................................................................. 47


6.1.1 The "DT_FML_Status" structure ........................................................................................... 47
6.1.2 Status Information ID oft the AOI.......................................................................................... 47
6.1.3 Fault numbers ...................................................................................................................... 48

ii
Table of Contents

7 Examples ..................................................................................................................................................... 50
7.1 Controlling a Festo motor controller .................................................................................................. 50
7.1.1 Prerequisites for ready status............................................................................................... 51
7.1.2 Establishing the ready state ................................................................................................. 51
7.1.3 Homing................................................................................................................................. 51
7.1.4 Setting and operation of "Record selection" ........................................................................ 51
7.1.5 Setting and operation of "Direct mode position control" ..................................................... 52
7.1.6 Setting and operation of "Direct mode force / torque control" ............................................ 52
7.1.7 Setting and operation of "Direct mode speed control" ......................................................... 53
7.2 Parameterisation of a Festo motor controller .................................................................................... 54
7.2.1 Prerequisites for communication .......................................................................................... 54
7.2.2 Reading parameters ............................................................................................................. 55
7.2.3 Writing parameters............................................................................................................... 55

8 Glossary ...................................................................................................................................................... 56

iii
1 Important instructions
1.1 Designated use
The Add-On Instructions (AOIs) of the Festo_Motion_FHPP_Rockwell library are used to control and parameterise
o the CMMD-AS-C8-3A double motor controller,
o the CMMO-ST-C5-1-LKP motor controller,
o the CMMP-AS motor controller family,
o the CMMS-AS and CMMS-ST motor controller family,
o the EMCA-EC motor unit.

You can use them to conveniently integrate the many functions of the device into your RSLogix 5000 control
program. AOIs 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 AOIs 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.

Target group
This manual is intended exclusively for technicians trained in control and automation technology, who have
experience in installation, commissioning, programming and diagnostics of positioning systems and the relevant
fieldbus.

Service
If you have a technical problem, please contact your local Festo service partner or use the respective contact
form at the following website.
www.festo.com/contact

4
Important instructions

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 Danger categories


This Help 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.

You can find information on how special information is represented under "Marking special information" (see
chapter 1.4).

5
Important instructions

1.4 Marking special information


Pictograms
The following pictograms mark passages in the text that contain special information.

Information: Recommendations, tips and references to other sources of information.

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.
o denote general listings.

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," "Import 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.

6
2 Introduction
2.1 Basic principles
Festo_Motion_FHPP_Rockwell AOIs are a library of RSLogix 5000 to access to a Festo motor controller unit, using
the FHPP Protocol. With this library,
o the CMMD-AS motor controllers
o the CMMO-ST-C5-1-LKP motor controllers
o the CMMP-AS motor controllers
o the CMMS-AS and CMMS-ST motor controllers
o the integrated motor unit EMCA-EC
can be controlled and parameterised via their respective fieldbus interface.
A motor controller is controlled by means of the Festo Handling and Positioning Profile (FHPP). The library
contains AOIs to control and parameterise the drives. Refer to the User Documentation of the motor controller for
additional information on operating and setting up.

Architecture
Each motor controller is integrated into the project via the I/O Configuration menu, and exchanges cyclic data
with specific Add-On Instructions from the library.

For each motor controller, a separate instance of a AOI needs to be created for control or
parameterisation.

2.2 General information on Festo motor controllers


The following sections contain information on the AOIs for Festo motor controllers. The following additional
manuals are required for a complete understanding:

Documentation on Festo motor controllers


Documentation Table of contents
Brief description and descriptions (see Brief description: Important commissioning instructions and
Support Portal or Catalogue) preliminary information.
Descriptions: contents as described below.
Manuals P.BE-... (from the Support Portal) Installation, commissioning and diagnostics of electric axes with
the relevant Festo motor controller.
Help system for the Festo Configuration Functional descriptions for the Festo Configuration Tool
Tool (contained in FCT software) configuration software.
Help system for using the AOI’s Use of the AOIs for Festo motor controller described here.
(this Help)

Note
Always observe the information and safety instructions in the documentation.

7
3 Festo Handling and Positioning Profile (FHPP)
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:
o Operating modes
o I/O data structure
o Parameter objects
o Sequence control

Figure: The FHPP principle

Control and status SINTs


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 AOI is mostly performed using single-bit operations.
The AOI FHPP_CTRL for controlling a motor controller is described in chapter 5.3.

Parameter channel
The controller can access all parameter values of the controller by means of the parameter channel. A further
8 SINTs of I/O data are used for this purpose.
The AOIs FPC_xxx for parameterisation are described in chapter 5.5.

8
FHPP

3.1 Operating modes


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.

Direct mode
In direct mode operating mode, the important positioning data is transferred directly via the control SINTs.
o Target positions and speeds can be ascertained and specified by the controller during running time,
depending on the operating status.
o No limitations due to the number of saved positioning records.
In direct mode values can be taught/parameterised via the PLC.
The following direct mode types can be selected:
o Direct mode position control
o Direct mode torque control
o Direct mode speed control

3.2 Add-On Instructions for Festo motor controllers


The names of the Add-On Instructions for Festo motor controllers start with the motor controller “data structure
access”, (e.g. FHPP) followed by the designation of the code use (e.g. CTRL) for a control AOI.
The FHPP (Festo Handling Positioning Profile) library for Rockwell RSLogix5000/RSLogix Design Studio5000
contains the following AOIs (Add-On Instructions):
FML-DATA
o FML_READ – Prepare the input data. This AOI prepares the raw data from the motor controller to PLC
and stores them in normalized form in a data structure of type DT_FML_REF for the control AOI and
the parameter AOIs.
o FML_WRITE – Prepare the output data. This AOI prepares the normalized data structure of type
DT_FML_REF and sent it in raw data from PLC to the motor controller.

FML-CONTROL
o FHPP_CTRL – FHPP Control. This AOI controls the Festo motor controller. The input and output
variables resides in the DT_FML_REF structure.
o FHPP_PLUS – Data exchange of FHPP+ objects. This AOI permits data exchange of freely defined
additional objects, which are selected in the Festo Configuration Tool (FCT).

FML-PARAMETER
o FPC_DIAG – Festo Diagnostics Channel. This transmits a single parameter (PNU) to acquire the active
fault with the highest priority.
o FPC_PNU – Festo Parameter Channel for single parameter transmission. This AOI is used for
transmitting single parameters (PNUs) to/from the motor controller.
o FPC_MULTI – Festo Parameter Channel for multiple parameter transmission. This AOI is used to pass
an array of FHPP parameters (PNUs) to/from the motor controller.
o FPC_DIRMP – Festo Direct Mode Parameters. This AOI reads/writes values to the direct application –
positioning mode parameters (Base Velocity, Acceleration and Deceleration).
o FPC_FILE_ARRAY – Festo Parameter File Upload/Download. This AOI saves and restores parameter
files with the FCT project settings (Festo Configuration Tool Software).
o FPC_DATA_OBJECT – Festo Parameter Channel for internal Data Object transmission. This AOI is used
for transmitting single internal data objects to the motor controller.

9
4 Usage of the library
4.1 Import of the AOI’s
The Add-On Instructions can be imported in the Rockwell RSLogix5000 project file by, using the “Import Add-On
Instruction” for each Instruction. During this process, the programming logic and the dependant User-Defined
Data Types will be imported as well.

Note
Please see next page concerning AOIs that have a V20 designation in the name.

Figure: Import an Add-On Instruction

Figure: Import Configuration of an Add-On Instruction

10
Usage of the library

4.2 Basic program structure


A PLC program using the Festo AOIs has the following basic structure:

Figure: Basic program structure

More information is given in Examples (see chapter 7).

11
Usage of the library

4.3 Workaround for copying default Tag Values to Instances


When using AOI (Add-On Instruction) and using constants like strings as shown below, the user populates
“manually” the default values for the strings. Default values for other Data Types would be entered manually as
well.

Figure: Example of default tag value

Issue:
When the project is downloaded with the required “instances” of the AOI (Add-On Instruction), the user will
notice that the “instances DO NOT HAVE THE DEFAULT VALUES that were originally assigned to the AOI (Add-On
Instruction).

Facts:
During discussions with Rockwell Technical Support, it was “assumed” that these default values “SHOULD” be
copied to the INSTANCES if the check box was checked.

The Issue is that the box is “grey out” and cannot be selected/checked.

Figure: Box for copying all default values of parameters

12
Usage of the library

Solution:
For the meantime (pending Rockwell investigation), we found a work around. There is an alternative interface to
the tags within the AOI (Add-On Instruction) that is created as shown next. The user double clicks the
“Parameters and Local Tags” as shown below.

Figure: Parameters and Local Tags

While in this alternate view, the user can select items at the top as shown below. The user needs to select the
AOI “Definition” then to the right, selects Copy all Values or Copy Selected Values. The preferred method when
creating a project is to select “Copy All Values”, however the user may choose the other method to provide a
popup menu to select “specific” tags.

Figure: Drop Down Menu to copy all values

When this has been executed, the default tag values selected will now be copied from the default values to the
instance values. The Rockwell help file describes this in the following manor.

Copy definition default values

Displays options to copy all default parameter and local tag values to all instance tags, or display a dialog you
can use to copy specific default values to specific instance tags (including copying specific default values to all
instance tags or copying all default values to specific instance tags).

13
5 Add-On Instruction Elements
5.1 FML_READ – Add-On Instruction to prepare the input data
The Add-On Instruction (AOI) FML_READ prepares the raw data from the motor controller and stores them in
normalized form in a data structure of type DT_FML_REF for the control AOI and the parameterisation AOIs.
o Normalising Big Endian / Little Endian fieldbus data
o Normalising the special data format of Modbus/TCP

Note
This AOI must be called before the execution of the control and parameterisation AOIs!

Figure: FML_READ AOI as seen in Ladder

14
FML_READ – prepare the input data

5.1.1 Inputs and outputs


The following table shows the inputs and outputs of the FML_READ AOI.

Signal Name Scope Data Type Description


FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data
to control and parameterise a motor
controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter
"Status and error numbers".
I_Data VAR_IN_OUT SINT[8] FHPP input data
(raw data array from the motor controller)
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
DeviceType VAR_INPUT SINT Defined the device type of the motor
controller. Some AOIs may have device
specific differences. Valid input parameters
see chapter “Device types of the motor
controllers” (chapter 5.1.2).
Modbus VAR_INPUT BOOL Modbus/TCP is used
= TRUE: Modbus/TCP is used, special
data preparing will be done
= FALSE: Another fieldbus is used
HighByteFirst VAR_INPUT BOOL Byte order (Big or Little Endian) of the raw
fieldbus data
= TRUE: Big Endian Format (high byte
first)
= FALSE: Little Endian Format (low byte
first)
FHPP_IN_ArrayStartAddr VAR_INPUT SINT First array of the FHPP input data
(Start of FHPP input data)
cfgFPC VAR_INPUT BOOL Use of the Festo Parameter Channel (FPC)
for parameterisation AOIs additional to the
control data
= TRUE: The FPC is used. Parameter data
will be prepared additionally.
= FALSE: The FPC is not used. Only control
data will be prepared.
FPC_IN_ArrayStartAddr VAR_INPUT SINT First array of the FPC input data
(Start of FPC input data)
cfgFHPPplusIn VAR_INPUT STRING PLC Configuration from the "FHPP+ Editor"
page “Answer to PLC" folder of the related
motor controller in the FCT-project (see
Chapter “Working with FHPP+ input
objects” (chapter 5.1.4).
The FHPP+ input telegram is activated
when “cfgFHPPplusIn” is unequal 0.
FHPPplus_IN_ArrayStartAddr VAR_INPUT SINT First array of the FHPP+ input data
(Start of FHPP+ input data)
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected with more
information in variable “Status”.
= FALSE: No error detected

15
FML_READ – prepare the input data

5.1.2 Device types of the motor controllers


For the different device types (different motor controllers) some properties have to be adjusted in the AOIs.
Therefore it is necessary to select the motor controller which is connected to the PLC. The variable “DeviceType”
in the AOI FML_READ can have the following values:
o 10 = CMMO_ST
o 20 = EMCA_EC
o 30 = CMMP_AS
o 40 = CMMS_AS
o 50 = CMMS_ST
o 60 = CMMD_AS

5.1.3 Addressing the input controller tags


The AOI FML_READ copies the fieldbus data internally (from motor controller). You have to address the data as
seen in the figure below.

Figure: Addressing the input controller tags

16
FML_READ – prepare the input data

5.1.4 Working with FHPP+ input objects


With some motor controllers up to 10 FHPP+ objects can be transferred cyclically to the PLC (and vice versa).

Note
Not all devices support FHPP+. The operating instructions of the motor controller must be checked
before use.

Each object has up to 4 byte (32 bit) width and must be adapted to the fieldbus transfer specialities:
o Big- or Little Endian for objects with 2 or 4 byte width.
o The Modbus/TCP special word alignment.

The FML_READ AOI normalises the FHPP+ objects transferred from the motor controller to the PLC.

The transferred FHPP+ objects are described with the cfgFHPPplusIn variable. Each digit represents the width of
an FHPP+ object.
o 1 stands for an object with 8 bit width,
o 2 stands for an object with 16 bit width,
o 4 stands for an object with 32 bit width.
All other digits are not used!
Up to 10 FHPP+ objects with different sizes may be transferred. The objects are arranged in 8-byte packages. Up
to 3 FHPP+ packages are possible.

Figure: Example from an FCT project with 3 FHPP+ input objects

In the example above "Control Data" and "Parameter Channel" are used, therefore 16 byte are available for
FHPP+. The FHPP+ objects size is given right of "PLC Configuration".
The "PLC Configuration" must be assigned to cfgFHPPplusIn:= 44224 in the FLM_READ AOI.
The meaning of the digits from left to right:
o 4 = 32 bit object (FHPP+ object 1)
o 4 = 32 bit object (FHPP+ object 2)
o 2 = 16 bit object (FHPP+ object 3)
o 2 = 16 bit place holder
o 4 = 32 bit place holder
Therefore 2 FHPP+ packets are used.

17
FML_READ – prepare the input data

The FHPP+ input telegram is activated when cfgFHPPplusIn is unequal 0.

You have to assign the PLC Configuration for reading and writing separately. (cfgFHPPplusIn in AOI
FML_READ and cfgFHPPplusOut in AOI FML_WRITE (see chapter 5.2)).

5.1.5 Handling values from FHPP+ input objects


The AOI FML_Read stores the incoming FHPP+ objects in an underlying structure of DT_FML_REF. To handle the
FHPP+ objects from the motor controller you have to use the AOI FHPP_PLUS (see chapter 5.4).

18
FML_READ – prepare the input data

5.1.6 The DT_FML_REF structure


This data structure holds all necessary data to control and parameterise a motor controller.

This structure is only a data container to transfer data between the AOI’s. Please do not modify data
within this structure manually.

Component Data Type Description


FHPP DT_FHPP Structure for the management of the input and output variables
of the FHPP_CTRL AOI.
FPC DT_FPC Structure for the management of the input and output variables
of the parameterisation AOIs.
FHPP_PLUS DT_FHPP_PLUS Structure for the management of the input and output variables
of the AOI FHPP_PLUS.
Modbus BOOL
HighByteFirst BOOL
Input variables from the related AOI FML_READ instance.
cfgFPC BOOL
DeviceType E_FML_DEVICE_TYPE
MemberID INT Consecutive number of the related motor controller. This
number is used to manage multiple accesses with
parameterisation AOIs to the same device. The number will be
automatically assigned.
MemberIDmax INT Next free number for a further prepared motor controller.
Done BOOL
Err BOOL
PNU INT
Subindex DINT Data block for FPC access to the motor controller. The
components are typically copies of the input variables from a
Value DINT parameterisation AOI or it is calculated internally.
ReqID E_FML_FPC_REQ_ID
FPCC_Packet DT_FML_FPC_FILE_TRANSFER
FPCC_Modus DINT
ActPNU INT
ActSubindex DINT
ActValue DINT Data block with answer data from the motor controller.
Typically they are copied to the output variables of a
RespID E_FML_FPC_RESP_ID parameterisation AOI.
FPCS_Packet DT_FML_FPC_FILE_TRANSFER
FPCS_Modus DINT

19
FML_READ – prepare the input data

5.1.7 EtherNet/IP – Passing the input data


To prepare the input and output data from the motor controller, the respective I/O (Inputs/Outputs) data must
be passed to the AOIs FML_READ and FML_WRITE. The PLC (Programmable Logic Controller) memory usage for
I/O must match the FCT (Festo Configuration Tool Software) project configuration.
Configure the EtherNet/IP card, then select this as the control interface – see figure below.

Note
There are other considerations for configuring a fieldbus type (i.e. DIL switches). Please refer to the
Festo user manuals for this specific information.

Figure: Control interface configuration of the motor controller in the FCT software

Configure the “desired” I/O memory mapping which relates to the FML_READ AOI (Add-On Instruction) in the
following manor:
Control Data Required FHPP (Festo Handling Positioning Profile) area of memory
Parameter Channel Optional FPC (Festo Parameter Channel) area of memory
FHPP+ Data Optional FHPP+ (Enhanced flexible cyclic area data memory)

Figure: Fieldbus data configuration of the motor controller

20
FML_READ – prepare the input data

After the motor controller is set up, the EtherNet/IP Master for Rockwell RSLogix 5000 must be configured. Add
either a generic module or a module using an EDS (Electronic Data Sheet) file from Festo. Configure the IO
(Inputs/Outputs) data size to match what was previously configured in the FCT (Festo Configuration Tool
Software) project. Afterwards the fieldbus raw data could be mapped to the AOIs FML_READ respectively
FML_WRITE – see figures below.

Figure: EtherNet/IP Master configuration for Rockwell RSLogix 5000

21
FML_READ – prepare the input data

Figure: EtherNet/IP fieldbus data mapping to the AOI FML_READ and AOI FML_WRITE

The raw fieldbus data need special attention to the specific byte / word arrangement.
Typical values for EtherNet/IP are:
o Modbus := FALSE;
o HighByteFirst := FALSE;

22
FML_READ – prepare the input data

5.1.8 IO-Link – passing the input data


To prepare the input data from the motor controller, the respective input data must be passed to the AOI
FML_READ. The PLC (Programmable Logic Controller) memory usage for Inputs MUST MATCH the FCT (Festo
Configuration Tool Software) Project configuration. Configure the IO-Link Master card first and then select this as
the control interface. Afterwards the fieldbus raw data could be mapped to the AOIs FML_READ respectively
FML_WRITE.

Note
The master must be implemented according to the IO-Link specification 1.1! A matching IODD device
description file can be found in the Festo Support Portal. Also see the IO-Link specific documentation
of the device.

The following figures show an example of the device configuration with an IO-Link master.

Figure: IO-Link device configuration with one used port

Figure: IO-Link controller tags

23
FML_READ – prepare the input data

Figure: IO-Link fieldbus data mapping to the AOI FML_READ and AOI FML_WRITE

The raw fieldbus data need special attention to the specific byte / word arrangement.
Typical values for IO-Link are:
o Modbus := FALSE;
o HighByteFirst := TRUE;

24
5.2 FML_WRITE – Add-On Instruction to prepare the output data
The FML_WRITE AOI prepares the output data for the motor controller and transfers it. Data preparing consist of:
o Byte arrangement for Big or Little Endian transfer via fieldbus,
o Special word arrangement if Modbus/TCP is used.

Note
The related instance of this AOI must be called after execution of the control AOI and the
parameterisation AOIs!

Figure: FML_WRITE AOI as seen in Ladder

25
FML_WRITE – prepare the output data

5.2.1 FML_WRITE: Inputs and outputs


The following table shows the inputs and outputs of the AOI.

Signal Name Scope Data Type Description


FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary
data to control and parameterise a motor
controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter
"Status and error numbers".
O_Data VAR_IN_OUT SINT[8] FHPP and FPC output data
(fieldbus data array to the motor
controller)
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
cfgFHPPplusOut VAR_INPUT STRING PLC Configuration from the "FHPP+
Editor" page “Message from PLC" folder
of the related motor controller in the FCT-
project (see Chapter “Working with
FHPP+ output objects” (chapter 5.2.3).
The FHPP+ output telegram is activated
when “cfgFHPPplusOut” is unequal 0.
FHPP_OUT_ArrayStartAddr VAR_INPUT SINT First array of the FHPP output data
(Start of FHPP output data)
FPC_OUT_ArrayStartAddr VAR_INPUT SINT First array of the FPC output data
(Start of FPC output data)
FHPPplus_Out_ArrayStartAddr VAR_INPUT SINT First array of the FHPP+ output data
(Start of FHPP+ output data)
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected with more
information in variable “Status”.
= FALSE: No error detected

26
FML_WRITE – prepare the output data

5.2.2 Addressing the output controller tags


The AOI FML_WRITE copies the intern data to the fieldbus (to motor controller). You have to address the data as
seen in the figure below.

Figure: Addressing the output controller tags

27
FML_WRITE – prepare the output data

5.2.3 Working with FHPP+ output objects


With some motor controllers up to 10 FHPP+ objects can be transferred cyclically to the controller (and vice
versa).

Note
Not all devices support FHPP+. The operating instructions of the motor controller must be checked
before use.

Each object has up to 4 byte (32 bit) width and must be adapted to the fieldbus transfer specialities:
o Big- or Little Endian for objects with 2 or 4 byte width.
o The Modbus/TCP special word alignment.

The FML_WRITE AOI prepares the FHPP+ objects for the transmission from the PLC to the motor
controller.

The transferred FHPP+ objects are described with the cfgFHPPplusOut variable. Each digit represents the width
of an FHPP+ object.
o 1 stands for an object with 8 bit width,
o 2 stands for an object with 16 bit width,
o 4 stands for an object with 32 bit width.
All other digits are not used!
Up to 10 FHPP+ objects with different sizes may be transferred. The objects are arranged in 8-byte packages. Up
to 3 FHPP+ packages are possible.

Figure: Example from an FPC project with 3 FHPP+ output objects

In the example "Control Data" and "Parameter Channel" are used, therefore 16 byte are available for FHPP+. The
FHPP+ objects size is given right of "PLC Configuration".
The "PLC Configuration" must be assigned to cfgFHPPplusOut := 44224.
The meaning of the digits from left to right:
o 4 = 32 bit object (FHPP+ object 1)
o 4 = 32 bit object (FHPP+ object 2)
o 2 = 16 bit object (FHPP+ object 3)
o 2 = 16 bit place holder
o 4 = 32 bit place holder
Therefore 2 FHPP+ packets are used.

28
FML_WRITE – prepare the output data

The FHPP+ output telegram is activated when cfgFHPPplusOut is unequal 0.

You have to assign the PLC Configuration for reading and writing separately. (cfgFHPPplusIn in AOI
FML_READ(see chapter 5.1) and cfgFHPPplusOut in AOI FML_WRITE).

5.2.4 Handling values from FHPP+ output objects


The FML_WRITE AOI copies the FHPP+ objects from the structure DT_FML_REF to the fieldbus (to motor
controller). To handle the FHPP+ objects you have to use the AOI FHPP_PLUS (see chapter 5.4).

29
FHPP-CTRL – Add-On Instruction for controlling

5.3 FHPP_CTRL – Add-On Instruction for controlling


The FHPP_CTRL AOI is used to control a Festo motor controller. The input and output variables resides in the
DT_FML_REF structure.

Note
The associated FML_READ instance must be called before a call to the FHPP_CTRL instance, because
FML_READ prepares the input data from the motor controller.
After the FHPP_CTRL execution the associated FML_WRITE instance must be called to prepare the
output data for the motor controller in the correct format for fieldbus transfer.

Figure: FHPP_CTRL AOI as seen in Ladder

31
FHPP-CTRL – Add-On Instruction for controlling

5.3.1 FHPP_CTRL: Inputs and Outputs


The following table contains a list of all inputs and outputs that the AOI has to control a motor controller.
InOut Variables - VAR_IN_OUT
Signal Name Data Type Description
This data structure holds all necessary data to control and
FML_REF DT_FML_REF
parameterise a motor controller.

Input Variables - VAR_IN

Signal Name Data Type Description


EnableIn BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
HMIAccessLocked BOOL Software access blocked
Control of access to the local (integrated) diagnostic interface of the
controller.
= TRUE: The FCT software will only monitor the controller, active
control of the device is not possible by the software.
= FALSE: The FCT software can assume control of the device.
Note: The integrated WEB server (CMMO-ST and EMCA-EC) has the
same behaviour than FCT.
BrakeRelease BOOL Release brake
= TRUE: Release brake
= FALSE: Activate brake
Note: Release of the brake is only possible with a disabled
controller. An enabled controller has the full control of the brake.
ResetFault BOOL Acknowledge fault
With a rising edge a fault is acknowledged and the fault value is
deleted. If the fault stays further after the acknowledge, at first the
error source must be eliminated.
OPM_OperationMode INT FHPP operating mode
= 0: Record selection
= 1: Direct application - position mode
= 5: Direct application - force / torque mode
= 9: Direct application - velocity mode
Halt BOOL Halt
= TRUE: Halt is not active
= FALSE: Halt activated (does 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").
Stop BOOL Stop
= TRUE: Enable operation
= FALSE: Stop active (cancel emergency ramp + positioning task).
The drive stops with maximum braking ramp, the positioning task is
reset.
Enable BOOL Enable drive
= TRUE: Enable the drive
= FALSE: Disable the drive
StartHoming BOOL Start homing
A rising edge homing will start a homing run with the configured
parameters.
StartTask BOOL Start positioning task
With a rising edge the current nominal values are transferred and
the action selected by OPM will be started.

32
FHPP-CTRL – Add-On Instruction for controlling

Signal Name Data Type Description


JogPositive BOOL Jogging positive
The drive moves with the specified velocity in the direction of larger
actual values, as long as the bit is set. The movement begins with
the rising edge and ends with the falling edge.
JogNegative BOOL Jogging negative
The drive moves with the specified velocity in the direction of
smaller actual values, see JogPositive.
ClearRemainingPosition BOOL Delete remaining path
In the "Halt" status, a rising edge causes the positioning task to be
deleted and transfer to the "Ready" status.
TeachActualValue BOOL Teach value
With a falling edge the current actual position value is transferred to
the nominal value register of the currently addressed record.
Relative BOOL Absolute/relative
= TRUE: Nominal value is relative to the last nominal value
= FALSE: Nominal value is absolute
StrokeLimitDisable BOOL Deactivating the stroke limit control
= TRUE: Stroke limit monitoring not active
= FALSE: Stroke limit monitoring active
RecordNumber INT Record number (record selection only)

SetValueVelocity DINT Velocity set point as a % of the reference value (limited to 100%)
• Direct application - positioning mode: Target velocity
• Direct application - force/torque mode for CMMO-ST or
EMCA-EC: velocity limit
SetValuePosition DINT Position set point in the positioning unit
(Only for direct application - positioning mode)
SetValueForce DINT Force / torque set point as a % of the reference value
(Only for direct application - force/torque mode)
SetValueForceRamp DINT Force /torque ramp set point as a % of the reference value (limited
to 100%)
(Only for direct application - force/torque mode and only for the
CMMP-AS motor controller)
SetValueRotRamp DINT Velocity ramp set point as a % of the reference value (limited to
100%)
(Only for direct application - velocity mode)
SetValueRotVelocity DINT Velocity set point in velocity unit
(Only for direct application - velocity mode)
ExecuteFunction(1) BOOL CMMP-AS only: Activating the cam disc function
= TRUE: Cam disc function active
= FALSE: Cam disc function inactive
SetFunctionNumber(1) INT Cam disc function number:
1 =Synchronisation on external input
2 =Synchronisation on external input with cam disc function
3 =Synchronisation on virtual master with cam disc function
SetFunctionGroup(1) INT Cam disc function group:
0: Only valid value

Remark (1): This input variables are working only with the CMMP-AS family.

33
FHPP-CTRL – Add-On Instruction for controlling

Output Variables - VAR_OUT


Signal Name Data Type Description
EnableOut BOOL Necessary output for ladder diagram.
Bit is always TRUE.
DriveControlByFCT BOOL Software device control
= TRUE: Device control by software (PLC control is locked)
= FALSE: Device control free (e.g. PLC/fieldbus)
LoadVoltageApplied BOOL Load voltage applied
= TRUE: Load voltage applied
= FALSE: No load voltage
Fault BOOL Fault present
= TRUE: Fault present or fault reaction active. Fault code in
diagnostic memory.
= FALSE: No fault
Warning BOOL Warning present
= TRUE: Warning present
= FALSE: No warning present
FollowingError BOOL Following error
= TRUE: Following error active
= FALSE: No following error
HaltActive BOOL Halt
= TRUE: Halt is not active, axis can be moved
= FALSE: Halt is active
DriveEnabled BOOL Drive is enabled
= TRUE: Drive (controller) enabled
= FALSE: Drive disabled, controller not active
Ready BOOL Operation enabled
= TRUE: Operation enabled
= FALSE: Stop active
HomingValid BOOL Drive has a valid homing position
= TRUE: Homing information is valid
= FALSE: A homing run must be carried out
AcknowledgeStart BOOL Acknowledge start
= TRUE: Start carried out. Reset the start signal at this time.
= FALSE: Ready for start signal
AxisIsMoving BOOL Axis is moving
= TRUE: Velocity of axis >= limit
= FALSE: Velocity of axis < limit
StandstillWarning BOOL Standstill monitoring
= TRUE: After MC axis exits tolerance window
= FALSE: After MC axis remains in tolerance window
MotionComplete BOOL Motion Complete
= TRUE: Positioning task completed, possibly with fault
= FALSE: Positioning task active
Note: MC is set after device is switched on (status "Drive blocked").
AcknowledgeTeach BOOL Acknowledge teach
= TRUE: Teaching carried out, actual value has been transferred
= FALSE: Ready for teaching

34
FHPP-CTRL – Add-On Instruction for controlling

Signal Name Data Type Description


StrokeLimitReached BOOL Stroke limit reached
= TRUE: Stroke limit has reached
= FALSE: Normal behaviour: Stroke limit not reached
VelocityLimitReached BOOL Velocity limit reached (only with torque control)
= TRUE: Velocity limit reached
= FALSE: Velocity limit not reached
RecordChainActive BOOL First record continuation carried out
= TRUE: The first continuation condition was satisfied
= FALSE: A continuation condition was not configured or not
satisfied
RecordChainComplete BOOL Record continuation completed - valid as soon as MC is available.
= TRUE: Record sequence was processed until the end.
= FALSE: Record sequencing aborted. At least one continuation
condition was not satisfied.
OPM_OperationState INT Feedback of FHPP operating mode + control mode
= 0: Record selection
= 1: direct application - position mode
= 5: direct application - force/torque mode
= 9: direct application - velocity mode
ActualRecordNumber INT Actual record number (Record selection only)
ActualVelocity DINT Actual velocity as a % of the reference value
(Only for direct application - position mode)
ActualPosition DINT Actual position
(Only for direct application - position mode)
ActualForce DINT Actual force / torque as a % of the reference value
(Only for direct application - force/torque mode)
ActualRotRamp DINT Actual Velocity ramp as a % of the reference value
(Only for direct application - velocity mode)
ActualRotSpeed DINT Actual velocity
(Only for direct application - velocity mode)
FunctionIsActive(1) BOOL CMMP-AS only: Status of cam disc function
= TRUE: Cam disc function is active
= FALSE: Cam disc function is inactive
ActualFunctionNumber(1) INT Actual cam disc function number:
1 =Synchronisation on external input
2 =Synchronisation on external input with cam disc function
3 =Synchronisation on virtual master with cam disc function
ActualFunctionGroup(1) INT Actual cam disc function group

Remark (1): This input variables are working only with the CMMP-AS family.

35
FHPP_PLUS

5.4 FHPP_PLUS – Add-On Instruction to map the FHPP+ objects


The AOI FHPP_PLUS permits data exchange of freely defined additional objects. The selection of these objects is
parameterised in the Festo Configuration Tool (FCT), and transferred as a configuration entry to the transfer AOI
used.

Note
The data is transferred to the fieldbus in the parameter sizes 1 byte, 2 byte and 4 byte (see also
chapter 5.1.4 and chapter 5.2.3). Within the PLC, all FHPP+ data is converted to the DINT data type.
Please note the positive/negative signs and value limits.

The availability of the FHPP+ data channel is device-dependent. See the device description for
further information.

Figure: FHPP_PLUS AOI as seen in Ladder

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and
error numbers".
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
I_FHPPplus1..10 VAR_INPUT DINT FHPP+ input variables 1..10
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected (more information in
“Status”)
= FALSE: No error detected
O_FHPPplus1..10 VAR_OUTPUT DINT FHPP+ input variables 1..10

36
FPC_xxx – Add-On Instructions for parameterisation

5.5 FPC_xxx – Add-On Instructions for parameterisation


5.5.1 Overview
The table shows the existing parameterisation AOIs with the motor controllers that they support.

FB Name CMMD-AS CMMO-ST CMMP-AS CMMS-AS CMMS-ST EMCA-EC


FPC_DATA_OBJECT X - X X X -
FPC_DIAG X X X X X X
FPC_DIPMP X X X X X X
FPC_FILE_ARRAY - X - - - X
FPC_MULTI X X X X X X
FPC_PNU X X X X X X

X = The motor controller supports the AOI with Rockwell RSLogix Design Studio 5000.
- = The AOI is not usable with this motor controller.

Note
The associated FML_READ instance must be called before a call to the FPC_xxx instance, because
FML_READ prepares the input data from the motor controller. The cfgFPC input of this AOI must be
set to TRUE.
After the FPC_xxx execution the associated FML_WRITE instance must be called to prepare the
output data for the motor controller in the correct format for fieldbus transfer.

37
FPC_xxx – Add-On Instructions for parameterisation

5.5.2 FPC_DATA_OBJECT – object transfer


The FPC_DATA_OBJECT AOI transfers a single device specific object from or to the motor controller.

Note
The FPC_DATA_OBJECT AOI is only usable with the CMMD-AS, the CMMP-AS and the CMMS-AS/-ST
controller types!

Note
The device specific objects are not published! If required, please contact the Festo Service.

Figure: FPC_DATA_OBJECT AOI as seen in Ladder

38
FPC_xxx – Add-On Instructions for parameterisation

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and error
numbers".
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
Execute VAR_INPUT BOOL Starts the transfer with a rising edge (FALSE -> TRUE).
Write VAR_INPUT BOOL Read or write
= TRUE: Write the device specific object
= FALSE: Read the device specific object
Object (1) VAR_INPUT INT Number of the device specific object
Subindex VAR_INPUT DINT Subindex of the device specific object
Value VAR_INPUT DINT Value in case of "Write"
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Done VAR_OUTPUT BOOL Transfer status
= TRUE: Transfer has finished
= FALSE: Transfer is active (or not started yet)
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected with more information in
variable “Status”.
= FALSE: No error detected
ActObject VAR_OUTPUT INT Number of the actual transferred device specific object
ActSubindex VAR_OUTPUT INT Subindex of the actual transferred device specific object
ActValue VAR_OUTPUT DINT Object value in case of "Read"

Remark 1:
The device specific objects are not published! If required, please contact the Festo Service.

39
FPC_xxx – Add-On Instructions for parameterisation

5.5.3 FPC_DIAG – get actual error


The FPC_DIAG AOI reads the most recent error number from the motor controller.

Figure: FPC_DIAG AOI as seen in Ladder

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and
error numbers".
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
Execute VAR_INPUT BOOL Starts the transfer with a rising edge
(FALSE -> TRUE)
The most recent diagnostic value will be read.
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Done VAR_OUTPUT BOOL Transfer status
= TRUE: Transfer has finished
= FALSE: Transfer is active (or not started yet)
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected (more information in
“Status”)
= FALSE: No error detected
MessageNumber VAR_OUTPUT INT Received message number.
If MessageNumber = 0, no error is present.

40
FPC_xxx – Add-On Instructions for parameterisation

5.5.4 FPC_DIRMP – dynamic parameters for direct mode


The FPC_DIRMP AOI reads or writes some relevant parameters for the direct operation mode (position control).

Figure: FPC_DIRMP AOI as seen in Ladder

The AOI transfers 3 parameters (sorted by PNU):

PNU Parameter
540.1 Basic velocity
541.1 Acceleration
542.1 Deceleration

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and error
numbers".
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
Execute VAR_INPUT BOOL Starts the transfer with a rising edge (FALSE -> TRUE).
The parameters are transferred in the given order.
Write VAR_INPUT BOOL Read or write
= TRUE: Write the parameters to the motor controller
= FALSE: Read the parameters from motor controller
Velocity VAR_INPUT DINT Set Value for PNU 540.1: Basic velocity
(only in case of "Write" = TRUE)
Acceleration VAR_INPUT DINT Set Value for PNU 541.1: Acceleration
(only in case of "Write" = TRUE)
Deceleration VAR_INPUT DINT Set Value for PNU 542.1: Deceleration
(only in case of "Write" = TRUE)
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Done VAR_OUTPUT BOOL Transfer status
= TRUE: Transfer has finished
= FALSE: Transfer is active (or not started yet)
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected (more information in “Status”)
= FALSE: No error detected
ActVelocity VAR_OUTPUT DINT PNU 540.1: Actual Basic Velocity
ActAcceleration VAR_OUTPUT DINT PNU 541.1: Actual Acceleration
ActDecceleration VAR_OUTPUT DINT PNU 542.1: Actual Deceleration

41
FPC_xxx – Add-On Instructions for parameterisation

5.5.5 FPC_FILE_ARRAY – transfer parameter set


With this AOI a complete parameter set will be stored in an array (SINT [25000]) and also transferred back to
the motor controller.
The FPC_FILE_ARRAY AOI
o stores with "Upload" a parameter set from the motor controller in a specified byte array,
o transfers with "Download" a parameter set from the specified byte array to the motor controller.

Note
The FPC_FILE_ARRAY AOI is only usable with the CMMO-ST and EMCA-EC controller type!

The size of the parameter set depends on the controller and the actual firmware. Therefore the size of
the byte array which stores the data is little bigger than the parameter set. The size of the byte array
is 25000 bytes.

Functional description
o The transfer direction is selected with the "Upload" or "Download" input to "TRUE" state.
o The parameter set is stored in a declared byte array.
o If the byte array holds a parameter set, an "Upload" will overwrite it.
o A communication error will abort a transfer immediately.
o Each transfer unit is monitored by a time-out.
o The overall transfer may use a couple of minutes!

Figure: FPC_FILE_ARRAY AOI as seen in Ladder

42
FPC_xxx – Add-On Instructions for parameterisation

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and error
numbers".
ParameterFile VAR_IN_OUT SINT[25000] Array that holds the parameter set.
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
Execute VAR_INPUT BOOL Starts the transfer with a rising edge (FALSE -> TRUE).
The parameter transfer is started.
Upload (1) VAR_INPUT BOOL Transfer a parameter set to given array of SINT. The
array will be overwritten.
Download (1) VAR_INPUT BOOL Transfer a parameter set from the given array of SINT to
the motor controller.
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Done VAR_OUTPUT BOOL Transfer status
= TRUE: Transfer has finished
= FALSE: Transfer is active (or not started yet)
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected (more information in “Status”)
= FALSE: No error detected
CountByte VAR_OUTPUT DINT Shows the current SINT counter during an active
transfer.
FileSize VAR_OUTPUT DINT Size of the whole parameter set.

Remark (1): Only one of the both signals "Upload" or "Download" should be set!

43
FPC_xxx – Add-On Instructions for parameterisation

5.5.6 FPC_MULTI – transfer multiple FHPP parameters


The FPC_MULTI AOI transfers a given list of parameters to or from the motor controller.

The parameter list is given as an ARRAY[0..n] OF DT_FML_PRM_DESCRIPTION.

Figure: FPC_MULTI AOI as seen in the Ladder

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and error
numbers".
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
Execute VAR_INPUT BOOL Starts the transfer with a rising edge (FALSE -> TRUE).
The parameters are transferred in the given order.
AdrOfParam VAR_IN_OUT DT_FML_PRM_ Parameter array intended for transfer
DESCRIPTION
SizeOfParam VAR_INPUT DINT Size of the parameter array (number of parameters to be
transmitted)
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Done VAR_OUTPUT BOOL Transfer status
= TRUE: Transfer has finished
= FALSE: Transfer is active (or not started yet)
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected (more information in “Status”)
= FALSE: No error detected
ParamNo VAR_OUTPUT INT Number of the parameter currently being transferred

44
FPC_xxx – Add-On Instructions for parameterisation

Composition of the DT_FML_PRM_DESCRIPTION structure


TYPE DT_FML_PRM_DESCRIPTION :
STRUCT
PNU : INT ; // Parameter number of the specified parameter
SUBINDEX : INT; // Subindex of the specified parameter
ACCESS : INT; // 0 = read parameter / 1 = write parameter
VALUE : DINT ; // Result read out or written value
END_STRUCT
END_TYPE

Values for ACCESS


o 0 = Read PNU
o 1 = Write PNU

Example of a parameter array


MultiParam : ARRAY [0..5] OF DT_PRM_PRM_DESCRIPTION :=
[(PNU:=404, SUBINDEX:=2, ACCESS:= 1, VALUE:=100),
(PNU:=404, SUBINDEX:=3, ACCESS:= 1, VALUE:=200),
(PNU:=404, SUBINDEX:=4, ACCESS:= 1, VALUE:=300),
(PNU:=404, SUBINDEX:=5, ACCESS:= 1, VALUE:=400),
(PNU:=404, SUBINDEX:=6, ACCESS:= 1, VALUE:=500)];

The example writes to the "Target Value" (PNU=404) of the records 2..6 in the record table.

45
FPC_xxx – Add-On Instructions for parameterisation

5.5.7 FPC_PNU – transfer a single FHPP parameter


The FPC_PNU AOI transfers a single parameter to or from the respective motor controller.

Figure: FPC_PNU AOI as seen in Ladder

Inputs and outputs


Signal Name Scope Data Type Description
FML_REF VAR_IN_OUT DT_FML_REF This data structure holds all necessary data to control
and parameterise a motor controller.
Status VAR_IN_OUT DT_FML_STATUS Status and error numbers, see chapter "Status and error
numbers".
EnableIn VAR_INPUT BOOL Necessary input for ladder diagram.
AOI is skipped if FALSE.
Execute VAR_INPUT BOOL Starts the transfer with a rising edge (FALSE -> TRUE).
Write VAR_INPUT BOOL Read or write the parameter
= TRUE: Write the FHPP parameter
= FALSE: Read the FHPP parameter
PNU VAR_INPUT INT Number of the corresponding parameter
Subindex VAR_INPUT INT Subindex of the corresponding parameter
Value VAR_INPUT DINT Parameter value when writing a parameter
EnableOut VAR_OUTPUT BOOL Necessary output for ladder diagram.
Bit is always TRUE.
Done VAR_OUTPUT BOOL Transfer status
= TRUE: Transfer has finished
= FALSE: Transfer is active (or not started yet)
Error VAR_OUTPUT BOOL Error detected
= TRUE: Error detected (more information in “Status”)
= FALSE: No error detected
ActPNU VAR_OUTPUT INT Current number of the corresponding parameter
ActSubindex VAR_OUTPUT INT Current subindex of the corresponding parameter
ActValue VAR_OUTPUT DINT Current parameter value

46
6 Status and error numbers of the Add-On Instructions

All AOIs uses the status and error system in a similar way (without FHPP_CTRL).

At AOI execution and at data transfer between the PLC and the motor controller many faults may occur. These are
signalled in a couple of two output variables:

Error : BOOL A fault is active, if it has TRUE state.


Status : DT_FML_STATUS Additional information to the fault or status is given here.

Note
If Error = TRUE: a fault is active. Additional information is stored in the Status structure – see “Fault
numbers” (chapter 6.1.3).

If Error = FALSE: The Status structure may hold a AOI status information – see “Status information”
(chapter 6.1.2).

If DONE = TRUE and Error = FALSE then the AOI has finished correctly.

6.1.1 The "DT_FML_Status" structure


TYPE DT_FML_STATUS:
STRUCT
Err : BOOL; // Error Bit
Cat : DINT; // Status Category
ID : DINT; // Status ID
END_STRUCT
END_TYPE

Structure Data
Content
component Type
TRUE: a fault is active, additional Information is given in the other three structure
components.
Err BOOL
FALSE: No fault is active.
The state of the Err component will be copied to the Error output variable!
Category to identify the source of the fault (or AOI status)
0: No fault and no status is active - all things runs well.
Cat DINT 1: The AOI has a fault detected or there is status information present.
2: Reserved
3: The AOI has detected a transmission fault (FPC).
ID DINT Fault or status number (see Tables below)

6.1.2 Status Information ID oft the AOI


A status information is typically present at the execution phase of the AOI (Execute = TRUE, Done = FALSE).
Usually the Status Category is 1 (AOI). The relevant status information in the ID structure could be:
0: All things are OK. No fault or status information s active.
2: The AOI is in its execution phase (Execute = TRUE, Done = FALSE);
10: The data connection to the assigned motor controller is in use by another parameterisation AOI. This
prevents that several data transfer operations of various modules are started simultaneously. This status
disappears when the other AOI has ended his action.

47
Status and error numbers of the Add-On Instructions

6.1.3 Fault numbers


If a fault is active, then the output variable Error = TRUE. In the Cat and ID structure components of the
DT_FML_STATUS structure some information is present, to describe and identify the fault.
The fault numbers in ID are different for the given category.

Fault numbers at Category = 1


All AOIs uses the same ID range if there are internal faults presented in the AOI.

ID Msg (related description)


20 AOI: timeout of AOI
30 AOI: device type is not valid
40 AOI: wrong access value
50 AOI: pointer to zero
51 AOI: pointer wrong size
60 AOI: FHPP+ data configuration not valid

Fault numbers at Category = 3 – general


All AOIs uses the same ID range if there are faults presented in the Festo Parameter Channel (FPC).

ID Msg (related description)


0 FPC: non-permitted PNU
1 FPC: parameter is read only
2 FPC: lower or upper limit value exceeded
3 FPC: wrong subindex
4 FPC: no array
5 FPC: incorrect data type
6 FPC: setting not permitted (only reset allowed)
7 FPC: describing element cannot be modified
8 FPC: PPO-Write requested in IR does not exist
9 FPC: description data do not exist
10 FPC: access group incorrect
11 FPC: no control rights
12 FPC: password incorrect
13 FPC: text not readable in cyclic exchange
14 FPC: name not readable in cyclic exchange
15 FPC: text array does not exist
16 FPC: PPO-Write missing
17 FPC: order cannot be processed because of operating status
18 FPC: other Errors
19 FPC: date not readable in cyclic exchange
20 FPC: non-permitted value
22 FPC: non-permitted Attributes, number of elements, PNU or IND
23 FPC: write request: non-permitted format
24 FPC: write request: Number of values not permitted
101 FPC: ReqID is not supported
102 FPC: parameter is write only

48
Status and error numbers of the Add-On Instructions

Fault numbers at Category = 3 - for the FPC_FILE_ARRAY AOI


The AOI FPC_FILE_ARRAY has additionally a separate ID range with four digits.

ID Msg (related description)


1001 FPC: wrong sequence number
1002 FPC: timeout between two packets
1003 FPC: wrong packet format
1004 FPC: false instruction
1005 FPC: read error
1006 FPC: write error
1007 FPC: data volume is not correct
1008 FPC: parameter file error
1009 FPC: fault not receipt
1010 FPC: timeout
1011 FPC: file open error
1012 FPC: file close error
1013 FPC: file delete error
1014 FPC: directory create error
1015 FPC: file not exist
1016 FPC: file read error
1017 FPC: get size error
1018 FPC: file write error
1019 FPC: no or double direction selected
1020 FPC: filename is empty
1021 FPC: size of parameter file too short/long
1022 FPC: parameter file is not complete

49
7 Examples
7.1 Controlling a Festo motor controller
This example uses the motor controller CMMO-ST with the corresponding AOI FHPP_CTRL.

Figure: Example of AOI FHPP_CTRL as seen in Ladder

With this AOI, the motor controller CMMO-ST can be controlled using the following four operating and control
mode combinations:
o Record selection
o Direct mode position control
o Direct mode torque control
o 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.

50
Examples

7.1.1 Prerequisites for ready status


o Motor unit is switched on
o Load voltage is present
o Control sovereignty lies with the PLC
For the CMMO-ST motor controller, the additional input signal DIN6 may be required for the "Ready" state.

7.1.2 Establishing the ready state


User action Feedback from motor unit
-- LoadVoltageApplied = TRUE
Enable = TRUE DriveEnabled = TRUE
MotionComplete = TRUE
Stop = TRUE Ready = TRUE
Halt = TRUE HaltActive = FALSE

7.1.3 Homing
User action Feedback
StartHoming = FALSE -> TRUE AcknowledgeStart = TRUE
MotionComplete = FALSE
AxisIsMoving = TRUE
-- AxisIsMoving = FALSE
MotionComplete = TRUE
HomingValid = TRUE

7.1.4 Setting and operation of "Record selection"


(Example with record # 4)

User action Feedback


OPM_OperationMode = 0 OPM_OperationState = 0
ActualRecordNumber = 4 --
StartTask FALSE -> TRUE OPM_OperationState = 0
AcknowledgeStart = TRUE
MotionComplete = FALSE
AxisIsMoving = TRUE
RecordNumber = 4
ActualPosition = ...
-- AxisIsMoving = FALSE
MotionComplete = TRUE (positioning completed)

51
Examples

7.1.5 Setting and operation of "Direct mode position control"


User action Feedback
OPM_OperationMode = 1 OPM_OperationState = 1
SetValueVelocity = ... --
SetValuePosition = ... --
StartTask = FALSE -> TRUE OPM_OperationState = 1
AcknowledgeStart = TRUE
MotionComplete = FALSE
AxisIsMoving = TRUE
ActualVelocity = ...
ActualPosition = ...
-- AxisIsMoving = FALSE
MotionComplete = TRUE (positioning completed)

7.1.6 Setting and operation of "Direct mode force / torque control"


User action Feedback
OPM_OperationMode = 5 OPM_OperationState = Previous operating and control mode as INT
SetValueForce = ... --
SetValueForceRamp := ... (1)
SetValueVelocity := ... (2)
DeactivateStrokeDisable := ... (3) --
StartTask =FALSE -> TRUE OPM_OperationState = 5
AcknowledgeStart = TRUE
MotionComplete = FALSE
AxisIsMoving = TRUE
ActualForce = ...
ActualPosition = ...
-- AxisIsMoving = FALSE
MotionComplete = TRUE (torque specification reached)
Remark 1: SetValueForceRamp only with CMMP-AS device type.
Remark 2: SetValueVelocity only with CMMO-ST and EMCA-EC device types.
Remark 3: StrokeLimitDisable may be used for stroke limitation.

52
Examples

7.1.7 Setting and operation of "Direct mode speed control"


User action Feedback
OPM_OperationMode = 9 OPM_OperationState = Previous operating and control mode as INT
SetValueRotRamp = ... --
SetValueRotSpeed = ... --
StartTask = FALSE -> TRUE OPM_OperationState = 9
AcknowledgeStart = TRUE
MotionComplete = FALSE
AxisIsMoving = TRUE
ActualRotRamp = ...
ActualRotSpeed = ...
-- AxisIsMoving = FALSE
MotionComplete = TRUE (speed specification reached)

53
Examples

7.2 Parameterisation of a Festo motor controller


This example uses the motor controller CMMO-ST with the corresponding AOI FPC_PNU.

Figure: Example of AOI FPC_PNU as seen in Ladder

With this AOI you can


o read a single parameter from motor controller
o or write a single parameter to the motor controller.

Note
For a description of the parameters supported by the various motor controllers according to FHPP,
please refer to the respective product documentation.

7.2.1 Prerequisites for communication


o The motor controller is switched on
o Control sovereignty lies with the PLC

54
Examples

7.2.2 Reading parameters


(Example with homing method)

User action Feedback


Write = False No feedback
PNU = 1011
Subindex = 1
Execute = FALSE -> TRUE Done = TRUE
Error = FALSE
Status.Err = FALSE
ActPNU = 1011
ActSubindex = 1
ActValue = transferred value

7.2.3 Writing parameters


(Example with acceleration homing method)

User action Feedback


Write = TRUE No feedback
PNU = 1013
Subindex = 1
Value = to be transferred value
Execute = FALSE -> TRUE Done = TRUE
Error = FALSE
Status.Err = FALSE
ActPNU = 1013
ActSubindex = 1
ActValue = transferred Value

The values written to the motor controller with the AOI FPC_PNU are stored in a volatile memory 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 the
value 1.

The following actions must be performed in order for the described parameters to be assumed permanently:

User action Feedback


Write = TRUE No feedback
PNU = 127
Subindex = 2
Value = TRUE
Execute = FALSE -> TRUE Done = TRUE
Error = FALSE
Status.Err = FALSE
ActPNU = 127
ActSubindex = 2
ActValue = 0

55
8 Glossary

A
AOI: Add-On Instruction

C
Consistency: A data range, which is defined as consistent, is transmitted complete, i.e. in a bus cycle.

D
Device: Device is a synonym for a Festo motor controller

E
EDS file: Electronic data sheet, which describes the functions and features of a 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.

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.

J
Jog mode: Manual movement in positive or negative direction.

P
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 and serves for identifying or
addressing the individual parameter.
Position record: Positioning command defined in the record table, consisting of target position, positioning
mode, positioning speed and accelerations.
Profile position mode: Operating mode for processing a position record or a direct positioning task.

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 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.

56
Copyright:
Festo SE & Co. KG
Ruiter Straße 82
73726 Esslingen
Germany

Phone:
+49 711 347-0

Fax:
+49 711 347-2144

E-mail:
www.festo.com/contact
Reproduction, distribution or sale of this document or communication
Internet:
of its contents to others without express authorization is
www.festo.com
prohibited. Offenders will be liable for damages. All rights reserved
in the event that a patent, utility model or design patent is
registered. Original: en

57

You might also like