0% found this document useful (0 votes)
3 views60 pages

L AIF ProgrammingGuide

The document is a reference manual for the Automation Building Blocks AIF Function Blocks by Lenze SE, detailing the software solution for communication with servo inverters. It includes information on function blocks such as L_AIF_Base, L_AIF_IN, and L_AIF_OUT, which facilitate data exchange between logic PLCs and servo inverters. The manual also covers configuration, parameter handling, and provides examples for commissioning sequences.

Uploaded by

Niko Adi Prabowo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views60 pages

L AIF ProgrammingGuide

The document is a reference manual for the Automation Building Blocks AIF Function Blocks by Lenze SE, detailing the software solution for communication with servo inverters. It includes information on function blocks such as L_AIF_Base, L_AIF_IN, and L_AIF_OUT, which facilitate data exchange between logic PLCs and servo inverters. The manual also covers configuration, parameter handling, and provides examples for commissioning sequences.

Uploaded by

Niko Adi Prabowo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

FAST Application Software

Automation Building Blocks

AIF Function
_ _ _ _ _ _Blocks
________________________ Reference Manual EN


This manual applies to the Automation Building Blocks AIF Function Blocks.

Copyright
© 2025 Lenze SE. All rights reserved.

Imprint
Lenze SE
Hans-Lenze-Strasse 1, D-31855 Aerzen, Germany
Phone: +49 (0)5154 / 82-0
Fax: +49 (0)5154 / 82-2111
E-Mail: Lenze@[Link]

Copyright information
All texts, photos and graphics contained in this documentation are subject to copyright
protection. No part of this documentation may be copied or made available to third parties
without the explicit written approval of Lenze SE.

Liability
All information given in this documentation has been carefully selected and tested for
compliance with the hardware and software described. Nevertheless, discrepancies
cannot be ruled out. We do not accept any responsibility or liability for any damage that
may occur. Required correction will be included in updates of this documentation.

Trademarks
Microsoft, Windows and Windows NT are registered trademarks or trademarks of the Mi-
crosoft Corporation in the USA and/or other countries.
Adobe and Reader are registered trademarks or trademarks of Adobe System Incorporated in
the USA and/or other countries.
Any additional trade names given in this documentation are trademarks of their correspond-
ing owners.

 Automation Building Blocks


Contents

Contents

1 Function Blocks .......................................................................................................................................... 2-1


1.1 Document History ....................................................................................................................................... 2-1
1.2 About Automation Building Blocks ........................................................................................................ 2-1
1.3 Conventions used........................................................................................................................................ 2-2
2 Function Blocks .......................................................................................................................................... 2-3
2.1 Function Block L_AIF_Base ....................................................................................................................... 2-5
2.1.1 Configuration Mode Selection (GSD/GSE Configuration)............................................... 2-5
2.1.2 Parameter Handling.................................................................................................................. 2-6
2.1.3 Incompatibility List..................................................................................................................2-10
2.1.4 Interface .....................................................................................................................................2-11
2.1.5 Task Information .....................................................................................................................2-11
2.1.1 Inputs and Outputs .................................................................................................................2-11
2.1.2 Inputs ..........................................................................................................................................2-11
2.1.3 Outputs ......................................................................................................................................2-14
2.2 Function Block L_AIF_IN ..........................................................................................................................2-17
2.2.1 Process Data (PZD) ..................................................................................................................2-18
2.2.2 Drivecom State Machine .......................................................................................................2-19
2.2.3 Incompatibility List..................................................................................................................2-20
2.2.4 Interface .....................................................................................................................................2-21
2.2.5 Task Information .....................................................................................................................2-21
2.2.6 Inputs and Outputs .................................................................................................................2-21
2.2.7 Inputs ..........................................................................................................................................2-21
2.2.8 Outputs ......................................................................................................................................2-21
2.3 Function Block L_AIF_OUT ......................................................................................................................2-25
2.3.1 Process Data (PZD) ..................................................................................................................2-26
2.3.2 Drivecom State Machine .......................................................................................................2-28
2.3.3 Incompatibility List..................................................................................................................2-29
2.3.4 Interface .....................................................................................................................................2-30
2.3.5 Task Information .....................................................................................................................2-30
2.3.1 Inputs and Outputs .................................................................................................................2-30
2.3.2 Inputs ..........................................................................................................................................2-30
2.3.3 Outputs ......................................................................................................................................2-30
3 Application Example ................................................................................................................................3-34
3.1 Commissioning Sequence (Motion Application) ..............................................................................3-34
3.2 Commissioning Sequence (PROFIBUS) ................................................................................................3-42
4 Appendix ...................................................................................................................................................4-51
4.1 Supported GSD Configurations .............................................................................................................4-51
4.2 AIF-IN Interface of 9300 ..........................................................................................................................4-52
4.3 AIF-OUT Interface of 9300 ......................................................................................................................4-53
4.4 Drivecom Control Word ...........................................................................................................................4-54
4.5 Drivecom Status Word .............................................................................................................................4-55
4.6 Drivecom DP V0 Parameter Channel (Tx) ...........................................................................................4-56
4.7 Drivecom DP V0 Parameter Channel (Rx) ...........................................................................................4-57

 Automation Building Blocks I


1 Function Blocks
1.1 Document History

1 Function Blocks

1.1 Document History

Version Desciption
0.1 24/11/2025 LSE MH(SL) first edition
0.2 04/12/2025 LSE MH(SL) update to simplified GSD identification method

1.2 About Automation Building Blocks

This manual describes a software solution for a partial task.


It is the user’s responsibility to verify if the solution proposed by the software corresponds to his
requirement. If necessary, the solution must be adapted. Physical aspects such as drive design are
not part of this manual.

Note:
 The terminal connection diagrams appearing in this manual show the wiring required
to operate the software on a sample demo rig.

 Automation Building Blocks 2-1


1 Function Blocks
1.3 Conventions used

1.3 Conventions used

This manual uses the following conventions to distinguish between different types of information:

Type of information Highlighting Example/notes


Spelling of numbers
Decimal separator Point The decimal point is always used.
For example: 1234.56
Text
Program name »« »PLC Designer« ...
Variable names italic By setting xEnable to TRUE...
Function blocks bold The L_MC1P_AxisBasicControl function block ...
Function libraries The L_TT1P_TechnologyModules function library ...
Buttons … and confirm by clicking on Continue.
Source code Courier ...
dwNumerator := 1;
dwDenominator := 1;
...
Key words Courier ...starts with FUNCTION and ends with END FUNCTION.
bold
Keyboard commands <bold> Press the <F2> key to request input assistance
If a shortcut is required for a command to be executed, a „+“ separates the com-
mands:
Press the <Shift>+<ESC> key to ...

Variable Names
The conventions used by Lenze for the variable names of Lenze system blocks, function blocks and
functions are based on the "Hungarian Notation". This notation makes it possible to identify the
most important properties (e.g. the data type) of the corresponding variable by means of its name,
e.g. xAxisEnabled.

 Automation Building Blocks 2-2


2 Function Blocks
1.3 Conventions used

2 Function Blocks
The function blocks L_AIF_Base, L_AIF_IN and L_AIF_OUT aim at replacement scenarios of the 9300
servo inverter series by Lenze’s latest CbM/DbM systems such as the i950.

logic PLC logic PLC


(PROFIBUS master) (PROFIBUS master)

EMF2133IB
???????
(PROFIBUS slave module)
(PROFIBUS slave module)

9300 servo inverter


i950 servo inverter

Illustration 1: 9300 servo inverter with PROFIBUS module1 Illustration 2: i950 servo inverter with PROFIBUS slot module

Note:
 In many cases, a one-to-one replacement might be required, not touching the logic
PLC’s program.

1 For Lenze devices such as 9300, two AIF modules for PROFIBUS were available:
1 = EMF2133IB with an extended scope of GSD/GSE configurations (see chapter 4.1)
2 = EMF2131IB with a basic scope of GSD/GSE configurations (only Drivecom drive profile with 1 … 4 process data)
 Automation Building Blocks 2-3
2 Function Blocks
1.3 Conventions used

Three function blocks exist, splitting the AIF field bus communication into three sub-functions:

L_AIF_IN: L_AIF_OUT:
field bus process data from the field bus data process data to
logic PLC the logic PLC

L_AIF_Base:
- field bus initialization
- request data of the field bus DP V0 parameter
channel from the logic PLC (optional)
- response data of the field bus DP V0 parameter
channel to the logic PLC (optional)

Illustration 3: overview on the process data communication (PDO) and parameter channel communication (SDO)

1. A function block L_AIF_IN to extract the process data control information from the raw data
received on PROFIBUS. The method provides the process data in the form of the AIF-IN format
of the 9300 servo inverter (see chapters 2.2.1 and 3).
2. A function block L_AIF_OUT to compile the complete field bus telegram to be transmitted to
the logic PLC. The method reads the process data control information in the form of the AIF-
OUT format of the 9300 servo inverter (see chapters 2.2.1 and 0).
3. The function block L_AIF_Base, processing the communication set-up and the DP V0 parameter
channel (see chapter 0).

Note:
 Always declare and call the AIF function blocks in the following order:
• L_ AIF_Base
• L_ AIF_IN
• L_ AIF_OUT

 Automation Building Blocks 2-4


2 Function Blocks
2.1 Function Block L_AIF_Base

2.1 Function Block L_AIF_Base

The function block L_AIF_Base must always be integrated in the PLC project for correct initialization
of the GSD/GSE configuration. If configured, the block additionally processes the DP V0 parameter
channel if selected.

2.1.1 Configuration Mode Selection (GSD/GSE Configuration)


The configuration of the PROFIBUS communication for each slave is defined with the help of the
GSD/GSE file. Typically, the scope of PROFIBUS Tx/Rx data is pre-defined during the programming
the logic PLC. One out of a pool of possible configurations (see chapter 4.1) determines the structure
of the PROFIBUS telegram to a slave device.
During the initialization of PROFIBUS communication, the function block L_AIF_Base identifies the
selected GSD/GSE configuration as listed in the appendix, chapter 4.1. For this purpose, an internal
service2 reads the received GSD configuration.

Set GSD/GSE Configuration (BYTE ARRAY[23])


The requested GSD configuration is polled by the function block L_AIF_Base continuously to check
for a new GSD/GSE configuration:

byte length of the new GSD configuration (green-colored part of data)


set GSD configuration (1 … 5 bytes, according to chapter 4.1)

The active GSD configuration is displayed in index 0x2348:003.

 Automation Building Blocks 2-5


2 Function Blocks
2.1 Function Block L_AIF_Base

2.1.2 Parameter Handling


Parameter communication must be selected via the GSD/GSE configuration from the logic PLC and
is included in the complete Rx/Tx PROFIBUS data. On receiving a valid GSD/GSE configuration (xInit
= FALSE), an optional parameter channel (DRIVECOM DP V0) is initialized, if included in the GSD/GSE
configuration.

process data communication (PZD) process data communication (PZD) + parameter channel (PAR)

Illustration 4: no parameter channel (PZD only) Illustration 5: with parameter channel (PZD + PAR)

In case of a parameter channel configured, the lowest 8 bytes of the raw data received on
L_AIF_IN.adwFieldBusIn / transmit on L_AIF_OUT.adwFieldBusOut are interpreted as shown in the
appendix, chapters 4.6 and 4.7.

Illustration 6: DP V0 parameter channel data as a part of the complete PROFIBUS telegram

In migration scenarios, the superposed logic PLC still addresses codes/sub-codes of the Lenze GDC3
devices 8200/9300 (legacy devices), not available on the i950 servo inverter.

3 GDC = Global Drive Control, one of the most successful inverter/servo inverter series of Lenze
 Automation Building Blocks 2-6
2 Function Blocks
2.1 Function Block L_AIF_Base

Example:

actual motor speed: actual motor speed:


code number: 51 index number: 0x606C
sub-code number: 0 sub-index number: 0
access: read-only access: read-only
unit: [rpm] unit: [rpm]
size: 4 byte size: 4 byte
scaling factor: 10000 : 1 (FIX324) scaling factor: 231 : 480000 (‘_s’5)

Illustration 7: 9300 servo inverter (legacy product) Illustration 8: i950 servo inverter (actual product)

Because of the mismatch between the old GDC device’s code list and the current i950’s index list,
an internal re-mapping of codes/sub-codes to current (user-) indexes is required. The correspond-
ence between old GDC codes and the i950 indexes is defined via a mapping table on the input/out-
put ascParReference.

The generation of the mapping list must be done by the user in the following way:

start

Step 1 Define the number of objects in your mapping list: The amount of objects defines on
how many different codes/indexes you would like to get access to.

Example: The logic PLC uses the DP V0 parameter channel to read the following codes
from a 9300 servo inverter:
• C0051/000: actual motor speed, scaled in [rpm]
• C0053/000: actual DC bus voltage, scaled in [V]
• C0063/000: actual motor temperature, scaled in [°C]
In this example, the mapping list requires three entries.

Step 2 In the i950’s PLC program, declare a data array with a corresponding number of
entries of type sc93ParReference as follows:
ascParReference: ARRAY[1..3] OF sc93ParReference; // mapping table

4 The FIX32 format uses a 4-byte data size and a scaling factor of 10000, meaning a value of 10000 represents a physical value of 1.0000[rpm]. This format is also
known as the ‘_e4’ format in the Lenze terminology.
5 The ‘_s’ scaling was introduced with the Lenze 9400 series and scales the motor speed as a 32-bit value. A raw value of 231 represents a physical value of

480000[rpm].
 Automation Building Blocks 2-7
2 Function Blocks
2.1 Function Block L_AIF_Base

Extend the declaration of step 2 by assigning initialization values to the mapping


Step 3
table’s data array:
ascParReference: ARRAY[1..4] OF sc93ParReference := [ // mapping table
(wCode:=11, wSubCode:=0, wIndex:=16#5500, bySubIndex:=1, bySize:=8, diNum:=10000, diDen:=1),
(wCode:=51, wSubCode:=0, wIndex:=16#606C, bySubIndex:=0, bySize:=4, diNum:=1171875, diDen:=524288),
(wCode:=53, wSubCode:=0, wIndex:=16#6079, bySubIndex:=0, bySize:=4, diNum:=10, diDen:=1),
(wCode:=63, wSubCode:=0, wIndex:=16#2D49, bySubIndex:=5, bySize:=2, diNum:=1000, diDen:=1)];

How to find the values for the numerator/denominator ratio?

 The numerator/denominator scales a raw value of the physical Lenze device


to the raw value of the legacy Lenze device.
Example: The numerator/denominator value for the actual motor speed re-
sults from the scaling ratio of the i950 servo inverter (0x606C:000) and the
Lenze legacy product (C0051/000):
scaling ratio of the physical Lenze device (i950)
You can look-up the index scaling factors in the
parameter list’s tool tips of »EASY Starter«.

𝑑𝑖𝑁𝑢𝑚 480000[𝑟𝑝𝑚] 10000 4800000000 1171875


= ∙ = =
𝑑𝑖𝐷𝑒𝑛 231 1 2147483648 524288

scaling ratio of the legacy Lenze device (9300)


You can look-up the code scaling factors in the
9300’s reference manual in the attribute table.

*) use greatest common denominator calculations to shorten the numbers for the numerator/denominator

Assign the mapping table’s data array to the function block L_AIF_Base:
Step 4

Assign the mapping table array ascParReference


to the corresponding input of L_AIF_Base.

Tip:

 Call the function block L_AIF_Base in a freewheeling task with low priority
to unload the high-priority motion task.
Still, the function blocks L_AIF_IN and L_AIF_OUT for process data may be
called in the high-priority motion task.

end

 Automation Building Blocks 2-8


2 Function Blocks
2.1 Function Block L_AIF_Base

Note:
 In contrary to the 9300 series, i950 allows parameters using a floating-point data type
(LREAL) with 8 bytes data size. Even this i950 parameter type can be handled by the
function block L_AIF_Base.
To receive a data value with four decimal remainder digits on your machine PLC, apply
a numerator/denominator scaling of diNum = 10000 and diDen = 1 in the parameter
reference list.

To monitor the parameter channel, the function block L_AIF_Base includes a built-in visualization
screen:

You can test the internal function of the parameter


channel by activating the xInternalParChannel
button in the top left of the visu screen.
After activation of the internal parameter channel
control, you can use the input fields in the “Rx pa-
rameter data” block to simulate the parameter
channel of the PLC and check the i950’s re-
sponse telegram for plausibility.

Illustration 9: built-in visualization screen of function block L_AIF-Base

 Automation Building Blocks 2-9


2 Function Blocks
2.1 Function Block L_AIF_Base

2.1.3 Incompatibility List


The following functions are not implemented in the function block L_AIF_Base:
• No PROFIsafe protocol on i950 PROFIBUS is supported.
• Parameter/index numbers do not match between 9300 and i950. Apply a correspondence list
as a reference between the parameters of a Lenze legacy device and an i950 drive controller
as shown in the previous chapter 2.1.2.

 Automation Building Blocks 2-10


2 Function Blocks
2.1 Function Block L_AIF_Base

2.1.4 Interface

Illustration 10: interface of function block L_AIF_Base

2.1.5 Task Information


Call-up possible from: freewheeling task time-controlled task event-controlled task interrupt task
(INTERVAL) (EVENT)

Note:
 Make sure to have included the CAA Memory library in your PLC project to get a fault-
free built of your code.

2.1.1 Inputs and Outputs


Identifier Description
Data type
Axis reference to the connected drive axis
AXIS_REF In case of an i950 application, always assign the Motion_Axis to this signal.
ascParReference parameter correspondence list
ARRAY [*] OF sc93ParReference This list defines the correspondence between 9300 codes and i950 indexes. As parameter values are stored in in-
dexes, which have different numbers on 9300 and i950, the list allows to …
• … link a 9300 code to an i950 index
• … consider a scaling numerator/denominator factor between the 9300 parameter value and the i950 index value
Find a detailed overview of the structure ascParReference in chapter 2.1.2 (next page).

2.1.2 Inputs
Identifier Description
Data type
eFieldBusType type of field bus
FieldBusType In the default, this signal is set to 1 (‘PROFIBUS_2133’)
So far, this variable is not used in the function block L_AIF_Base, as the AIF function blocks only support PROFI-
BUS communication.
Note: In future, the input may allow to support various field bus systems Lenze offered on the 9300 series such as
CAN, INTERBUS, …

 Automation Building Blocks 2-11


2 Function Blocks
2.1 Function Block L_AIF_Base

User-Defined Variable Structure sc93ParReference


The structure serves to define the parameter correspondence on the PROFIBUS level and the i950
level. The following elements are part of this variable structure:

Identifier Description
Data type
wCode code number of the 9300 servo drive
WORD Note: The 9300 code number results from subtracting the index value (byte 3 and 4 of the parameter channel) from
a fixed value of 24575 (0x5FFF).
bySubCode sub-code number of the 9300 servo drive
BYTE
wIndex corresponding index number of the i950 servo drive
WORD
bySubIndex sub-index number of the i950 servo drive
BYTE
bySize data size of the i950’s index value
BYTE Note: This information is required, as the data size of the i950’s index value does not necessarily match the data
size of the 9300 code value.
diNum scaling factor between the 9300 code value and the i950 index value (split to numerator/denominator values)
diDen The values for the scaling numerator/denominator can be obtained as shown on the next page. More details can be
BYTE found in chapter 2.1.2.

 Note:
An application example is given in the appendix in chapter 2.1.2.

 Automation Building Blocks 2-12


2 Function Blocks
2.1 Function Block L_AIF_Base

Example: calculation of scaling numerator/denominator values:

The actual motor speed 0x606C:000 of the i950 servo drive should be read via parameter channel
and be returned to the PLC in the 9300 format of code C0051/000:

9300: i950:

code/sub-code: C0051/000 code/sub-code: 0x606C:000


sample value: 123[rpm] sample value: 123[rpm]
raw value: 1230000 raw value: 550293
scaling (numerator): 10000 scaling (numerator): 1073741824
scaling (denominator): 1 scaling (denominator): 240000

Illustration 11: code scaling 9300 Illustration 12: code scaling i950

From the above example, the total numerator/denominator values diNum and diDen can be calcu-
lated:
10000
𝑑𝑖𝑁𝑢𝑚 1 2400000000 1171875
= = =
𝑑𝑖𝐷𝑒𝑛 1073741824 1073741824 524288
240000

 Automation Building Blocks 2-13


2 Function Blocks
2.1 Function Block L_AIF_Base

2.1.3 Outputs
Identifier Description
Data type
scStateMachine data of the communication state machine
StateMachine This value must be connected to the corresponding input/output variables of the function blocks L_AIF_IN and
L_AIF_OUT to ensure consistent operation of the AIF function blocks. A detailed description is given on the next
page.
xInit status signal: initialization of the GSD/GSE configuration ongoing
BOOL FALSE GSD/GSE configuration has finished without errors
TRUE GSD/GSE configuration ongoing/has finished with errors
xError status signal: error during GSD/GSE configuration
BOOL FALSE no error during GSD/GSE configuration.
TRUE An error occurred during GSD/GSE configuration:
• Initialization sequence cannot be terminated – status signal xInit remains on TRUE.
• Refer to the wError output for more information.
wErrorId current error ID:
WORD 0: no error active
110: GSD/GSE configuration could not be identified – please select a GSD/GSE configuration as listed
in chapter.4.1
Notes:
-

 Automation Building Blocks 2-14


2 Function Blocks
2.1 Function Block L_AIF_Base

User-Defined Variable Structure scStateMachine


This variable structure comprises general data of the field bus communication, depending on the
field bus type active:

Identifier Description
Data type
eFieldBusType current error ID:
FieldBusType PROFIBUS_2133: The L_AIF function blocks behave like the EMF2133IB PROFIBUS module for 9300.
Notes: So far, only ‘PROFIBUS_2133’ is supported.
byGsdConfig number of the active GSD/GSE configuration found during communication initialization
BYTE A complete overview on all possible GSD/GSE configurations is listed in chapter 4.1.
byGsdGroup group of the active GSD/GSE configuration of the active GSD/GSE configuration, set-up during communication ini-
BYTE tialization
A complete overview on all possible GSD/GSE configurations is listed in chapter 4.1.
byGsdGroup current error ID:
BYTE 1: no parameter channel / process data (Drivecom control)
2: consistent Drivecom parameter channel / process data (Drivecom control)
3: consistent Drivecom parameter channel / consistent process data (Drivecom control)
4: Drivecom parameter channel / process data (Drivecom control)
5: Drivecom parameter channel / consistent process data (Drivecom control)
6: no parameter channel / consistent process data (Drivecom control)
7: no parameter channel / process data (Lenze device control)
8: consistent Drivecom parameter channel / process data (Lenze device control)
9: consistent Drivecom parameter channel / consistent process data (Lenze device control)
10: Drivecom parameter channel / process data (Lenze device control)
11: Drivecom parameter channel / consistent process data (Lenze device control)
12: no parameter channel / consistent process data (Lenze device control)
Notes: A complete overview on all possible GSD/GSE configurations is listed in chapter 4.1.
byPzdSize size of the process data (PZD), scaled in [byte]
BYTE
wDrivecomCtrl Drivecom control word
BYTE This variable is only used in a configuration with Drivecom process data communication (byGsdGroup = 1 … 6).
The meaning of each control bit of wDrivecomCtrl is explained in the appendix in chapter 4.4.
wDrivecomStat Drivecom status word
BYTE This variable is only used in a configuration with Drivecom process data communication (byGsdGroup = 1 … 6).
The meaning of each control bit of wDrivecomStat is explained in the appendix in chapter 4.5.
eDrivecomState current state of the Drivecom state machine:
DrivecomState 0: NOT_READY_TO_SWITCH_ON
32: SWITCH_ON_INHIBIT
1: READY_TO_SWITCH_ON
3: SWITCHED_ON
23: QUICK_STOP_ACTIVE
7: OPERATION_ENABLED
15: FAULT_REACTION_ACTIVE
8: FAULT
Notes: This variable is only used in a configuration with Drivecom process data communication (byGsdGroup = 1
… 6). The Drivecom state machine is shown in chapters 2.2.2 and 2.3.2.
xInit status signal: initialization of the GSD/GSE configuration ongoing
BOOL FALSE GSD/GSE configuration has finished without errors
TRUE GSD/GSE configuration ongoing/has finished with errors
Note: This signal mirrors the output signal L_AIF_Base.xInit.
xError status signal: error during GSD/GSE configuration
BOOL FALSE no error during GSD/GSE configuration.
TRUE An error occurred during GSD/GSE configuration:
• Initialization sequence cannot be terminated – status signal xInit remains on TRUE.
• Refer to the L_AIF_Base.wError output for more information.
Note: This signal mirrors the output signal L_AIF_Base.xError.

 Automation Building Blocks 2-15


2 Function Blocks
2.1 Function Block L_AIF_Base

Identifier Description
Data type
adwRawDataIn raw input data on the field bus interface
ARRAY [0..15] OF DWORD The variable data array is a copy of the field bus raw input data in, received on the input adwFieldBusIn of function
block L_AIF_IN.
adwRawDataOut raw output data on the field bus interface
ARRAY [0..15] OF DWORD The variable data array is a copy of the field bus raw output data in, generated on the output adwFieldBusOut of
function block L_AIF_OUT.
AxisState This structure includes important status signals of the i950 drive:
MC_ReadAxisInfo LimitSwitchPos: positive limit switch has triggered (i.e. on L_TF2P_SpeedControlBase1.scCtrl-
[Link])
LimitSwitchNeg: negative limit switch has triggered (i.e. on L_TF2P_SpeedControlBase1.scCtrl-
[Link])
Simulation: axis is operated in the virtual mode
On an i950 axis, this signal is always FALSE.
CommunicationReady: motion bus communication interface between axis driver (AXIS_REF) and motor
control is in operation
On an i950 axis, this signal is always TRUE.
ReadyForPowerOn: drive is ready for being powered on (i.e. via control signal L_TF2P_SpeedCon-
[Link]).
This signal state comprises the following states:
• drive is fault-free
• no STO command is active (safe torque off)
• DC bus voltage is switched on
PowerOn: i950 drive is powered on (same status as L_TF2P_SpeedControlBase1.xOpera-
tionEnabled)
IsHomed: zero position of the i950 drive’s measuring system is known
AxisError: error in the axis driver (AXIS_REF)
AxisWarning: warning in the axis driver (AXIS_REF)
DriveError: error in the inverter’s motor control
DriveWarning: warning in the inverter’s motor control
SWLimitSwitchPos: positive software limit has triggered
SWLimitSwitchNeg: negative software limit has triggered
ReadyForMotion: drive is ready for receiving motion commands
This signal state comprises the following states:
• drive is enabled
• drive is fault-free
• a motor brake (if available) has opened
STOActive: STO command is active (safe torque off)
VoltageEnabled: DC bus voltage is switched on
MotorMagnetised: motor is magnetization complete
QSPApplActive: quickstop command of the axis driver (AXIS_REF) is active
QSPDriveActive: quickstop command of the inverter’s motor control is active
Find more information about MC_ReadAxisInfo in the »PLC Designer« online help.

Caution:
 The above-listed variables are read-only! Never change any of these variables as this
may have unpredictable consequences in field bus communication and drive behav-
iour!

 Automation Building Blocks 2-16


2 Function Blocks
2.2 Function Block L_AIF_IN

2.2 Function Block L_AIF_IN

The function block L_ AIF_IN reads 16 double words of the field bus input data on the input data
array adwFieldBusIn. Once a valid GSD/GSE configuration was detected ([Link] =
FALSE), the raw data on the input signal adwFieldBusIn of the function block L_ AIF_IN are mapped
to …

• process data PZD


• parameter data PAR (optional, if selected, see chapter 2.1.2)

process data communication (PZD) process data communication (PZD) + parameter channel (PAR)

Illustration 13: no parameter channel (PZD only) Illustration 14: with parameter channel (PZD + PAR)

Note:
 The i950 PROFIBUS slot module handles up to 16 double words of input data. The
function block L_AIF_IN only processes the double words 0 to 7. The double word 8
to 15 are not considered in the evaluation of the field bus raw data.
However, always assign a data array ARRAY [0..15] OF DWORD to the input signal
L_AIF_IN.adwFieldBusIn.

 Automation Building Blocks 2-17


2 Function Blocks
2.2 Function Block L_AIF_IN

2.2.1 Process Data (PZD)


In any case, process data exchange is part of the field bus communication. The function block
L_AIF_IN handles the process input data of the field bus system and converts the raw data received
on adwFieldBusIn to the AIF data structures known from the 8200/9300 device series.

(motion) technology application


using the legacy AIF interface

raw input data from the field


bus module
(16 DWORD)

L_AIF_IN:

conversion of the of raw input process data adwFieldBusIn to the data sets AIF_IN1, AIF_IN2 and AIF_IN3
(16 DWORD)

Illustration 15: principle of process input data handling / detailed signal list of the AIF_IN interfaces of function block L_AIF_IN

 Automation Building Blocks 2-18


2 Function Blocks
2.2 Function Block L_AIF_IN

2.2.2 Drivecom State Machine


Depending on the GSD/GSE configuration, the first process input data word AIF_IN1.wCtrl is pro-
cessed via the Drivecom state machine:

Illustration 16: flow chart of the Drivecom state machine (affecting control/status word 1)

The actual state of the Drivecom state machine is displayed on the variable scStateMa-
[Link].

 Automation Building Blocks 2-19


2 Function Blocks
2.2 Function Block L_AIF_IN

2.2.3 Incompatibility List


The following functions are not implemented in the function block L_AIF_IN:
• The output AIF_IN1.[Link] does not find a corresponding function in the FAST tech-
nology modules. The user can evaluate this signal to set a user-defined error.
• Facing an undervoltage state during drive operation leads to an error, as the PLCopen state
machine is violated. On 9300 an undervoltage state during drive operating was resulting in a
message only.
• The STO command of i950 must be released to achieve the same behavior of the Drivecom
state machine as on 9300. If the i950’s STO command is active, the Drivecom state machine
remains in the state Switch-On Inhibited.
Using GSD configurations with Lenze device control (AR), the STO command keeps the Disable
control signal active, meaning the drive cannot be activated.
• The L_AIF_IN function block supports the following device control methods:
o Drivecom
o Lenze device control (AR)
The PROFIdrive control method is not supported.

 Automation Building Blocks 2-20


2 Function Blocks
2.2 Function Block L_AIF_IN

2.2.4 Interface

Illustration 17: interface of function block L_AIF_IN

2.2.5 Task Information


Call-up possible from: freewheeling task time-controlled task event-controlled task interrupt task
(INTERVAL) (EVENT)

Note:
 Make sure to have included the CAA Memory library in your PLC project to get a fault-
free built of your code.

2.2.6 Inputs and Outputs


Identifier Description
Data type
scStateMachine data of the communication state machine
StateMachine Connect the corresponding output scStateMachine of function block L_AIF_Base to ensure consistent operation of
the AIF function blocks. A detailed description of this variable structure is given in chapter 0.

2.2.7 Inputs
Identifier Description
Data type
adwFieldBusIn input of the field bus raw data
ARRAY [0..15] OF DWORD These values can directly be mapped to the input data of the field bus IO interface.

2.2.8 Outputs
Identifier Description
Data type
AIF_IN1 AIF field bus input data (first group)
AIF_IN1 The values comprise a four-word data structure, following the structure of the AIF-IN system block of the 9300 servo
inverter. A detailed description is given on the next page.
AIF_IN2 AIF field bus input data (second group)
AIF_IN The values comprise a four-word data structure, following the structure of the AIF-IN system block of the 9300 Ser-
voPLC inverter. A detailed description is given on the next pages.
AIF_IN3 AIF field bus input data (third group)
AIF_IN The values comprise a four-word data structure, following the structure of the AIF-IN system block of the 9300 Ser-
voPLC inverter. A detailed description is given on the next pages.

 Automation Building Blocks 2-21


2 Function Blocks
2.2 Function Block L_AIF_IN

User-Defined Variable Structure AIF_IN1


This structure implements the AIF-IN interface known from the 9300 servo inverter series. It in-
cludes the following elements:

Identifier Description
Data type
xBit00 bit 0 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit01 bit 1 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit02 bit 2 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xQsp bit 3 of the AIF-IN control word: activate quick stop
BIT FALSE: quick stop not activated
TRUE: quick stop activated
Note: This bit must be connected to a quick stop command in the application (i.e. implemented by the function blocks
MC_Stop, L_MC1P_SetQuickStopAppl, …).
xBit04 bit 4 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit05 bit 5 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit06 bit 6 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit07 bit 7 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xDisable bit 08 of the AIF-IN control word: disable the drive
BIT FALSE: do not disable drive (xCInh=FALSE leads to power-up the drive)
TRUE: disable drive (xCInh=FALSE has no effect)
Notes:
- Use this bit to interlock enabling the drive’s operation. On xDisable=TRUE, the drive must remain shut-down, even
if xCInh is on FALSE.
- If xDisable is on TRUE, the ‘drive ready’ status remains on FALSE.
xCInh bit 09 of the AIF-IN control word: inhibit the drive controller
BIT FALSE: drive controller enabled
TRUE: drive controller inhibited
Notes:
- The bit is used to power-up the drive (i.e. by means of the MC_Power function block).
- If xDisable is on TRUE, the xCInh control bit has no effect.

 Automation Building Blocks 2-22


2 Function Blocks
2.2 Function Block L_AIF_IN

Identifier Description
Data type
xTripSet bit 10 of the AIF-IN control word: set a user error on the drive
BIT FALSE: user error is triggered
TRUE: no user error is triggered
Note: As there is no corresponding function in the operating system of i950 available, the xTripSet bit has no practi-
cal meaning.
xTripReset bit 11 of the AIF-IN control word: error reset command
BIT FALSE=>TRUE reset error command
Notes:
- The bit is used to reset an error on the drive (i.e. by means of the MC_Reset function block).
- Resetting an error only works if the cause of the error does not apply any more.
xBit12 bit 12 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit13 bit 13 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit14 bit 14 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit15 bit 15 of the AIF-IN control word
BIT FALSE: control function deactivated
TRUE: control function activated
Note: This bit does not have a fixed meaning but can be connected freely by the user.
wCtrl AIF-IN control word
WORD The AIF-IN control word mirrors the 16 control bits as listed above in a WORD format.
wIn1 input of a 16 bit integer number
WORD Typically, the second WORD on AIF-IN1 is interpreted as the drive’s speed set value, scaled in [%] (0 … 16384 = 0.0
… 100.0[%]). However, it is up to the user to define the meaning in the application.
wIn2 input of a free 16 bit WORD value
WORD
wIn3 input of a free 16 bit WORD value
WORD

Tip:

 Do you need to merge AIF_IN1.wIn2 and AIF_IN1.wIn3 to a 32-bit value? The function
PackWordsToDword6 provides this function. Use it in the following way:

Illustration 18: conversion of two 16-bit WORD values to a 32-bit DWORD value

6 included the CAA Memory library


 Automation Building Blocks 2-23
2 Function Blocks
2.2 Function Block L_AIF_IN

User-Defined Variable Structure AIF_IN


This structure implements the extended AIF-IN interface known from the 9300 ServoPLC inverter
series. It is applied on the objects AIF-IN2 and AIF-IN3, and includes the following elements:

Identifier Description
Data type
wIn0 input of a free 16 bit WORD value
WORD
wIn1 input of a free 16 bit WORD value
WORD
wIn2 input of a free 16 bit WORD value
WORD
wIn3 input of a free 16 bit WORD value
WORD

 Automation Building Blocks 2-24


2 Function Blocks
2.3 Function Block L_AIF_OUT

2.3 Function Block L_AIF_OUT

The function block L_ AIF_OUT reads the AIF data structure known from the 8200/9300 device se-
ries and transfers its information to the 16 field bus output double-words on a data array. Once a
valid GSD/GSE configuration was detected ( [Link] = FALSE), the following data are
mapped to the output data array adwFieldBusOut:

• process data PZD from the AIF-OUT objects


• parameter data PAR (optional, if selected, see chapter 2.1.2)

process data communication (PZD) process data communication (PZD) + parameter channel (PAR)

Illustration 19: no parameter channel (PZD only) Illustration 20: with parameter channel (PZD + PAR)

Note:
 The i950 PROFIBUS slot module handles up to 16 double words of output data. The
output data range of the function block L_AIF_OUT (output adwFieldBusOut) com-
prises the full scope of 16 double words, even if only double words 0 to 7 are in use.

 Automation Building Blocks 2-25


2 Function Blocks
2.3 Function Block L_AIF_OUT

2.3.1 Process Data (PZD)


In any case, process data exchange is part of the field bus communication. The function block
L_AIF_OUT generates the raw data on adwFieldBusOut from the AIF-OUT objects known from the
8200/9300 series.

(motion) technology application


using the legacy AIF interface

raw output data to the PROFIBUS


module ???
(16 DWORD)

L_AIF_OUT:

conversion of the output data set AIF_OUT1, AIF_OUT2 and AIF_OUT3 to raw output process data adwFieldBusOut
(16 DWORD)

Illustration 21: principle of process output data handling / detailed signal list of the AIF_OUT interfaces of function block L_AIF_IN

 Automation Building Blocks 2-26


2 Function Blocks
2.3 Function Block L_AIF_OUT

Tip:

 Use the user-defined function block L_STAT to generate the status signals on
L_AIF_OUT.xStat1 … L_AIF_OUT.xStat8.

 Automation Building Blocks 2-27


2 Function Blocks
2.3 Function Block L_AIF_OUT

2.3.2 Drivecom State Machine


Depending on the GSD/GSE configuration, the first process output data word AIF_OUT1.wStat is
processed via the Drivecom state machine:

Illustration 22: flow chart of the Drivecom state machine (affecting control/status word 1)

The actual state of the Drivecom state machine is displayed on the variable scStateMa-
[Link].

 Automation Building Blocks 2-28


2 Function Blocks
2.3 Function Block L_AIF_OUT

2.3.3 Incompatibility List


The following functions are not implemented in the function block L_AIF_OUT:
• The status bits DCTRL-STAT*1, … DCTRL-STAT*8 do not comprise the full scope of 9300 states.
The red-marked states are not supported:
DCTRL-STAT*8

DCTRL-STAT*4

DCTRL-STAT*2
value DCTRL-STAT*1 note
0 0 0 0 0 initialization after the supply voltage has been connected
1 0 0 0 1 lock mode, restart protection is active C0142
3 0 0 1 1 drive is in controller inhibit mode
4 0 1 0 0 flying restart active
5 0 1 0 1 DC brake active
6 0 1 1 0 controller enabled
7 0 1 1 1 the release of a monitoring function resulted in a "message"
8 1 0 0 0 the release of a monitoring function resulted in a "trip"
10 1 0 1 0 the release of a monitoring function resulted in a "FAIL-QSP"
15 1 1 1 1 communication fail (PROFIBUS communication module  inverter)

• According to PLCopen, an undervoltage on the DC bus results in an error instead of a message.


Before restarting the drive, the user must reset the drive error.
• The L_AIF_IN function block supports the following device control methods:
o Drivecom
o Lenze device control (AR)
The PROFIdrve control method is not supported.

 Automation Building Blocks 2-29


2 Function Blocks
2.3 Function Block L_AIF_OUT

2.3.4 Interface

Illustration 23: interface of function block L_AIF_OUT

2.3.5 Task Information


Call-up possible from: freewheeling task time-controlled task event-controlled task interrupt task
(INTERVAL) (EVENT)

Note:
 Make sure to have included the CAA Memory library in your PLC project to get a fault-
free built of your code.

2.3.1 Inputs and Outputs


Identifier Description
Data type
scStateMachine data of the communication state machine
StateMachine Connect the corresponding output scStateMachine of function block L_AIF_Base to ensure consistent operation of
the AIF function blocks. A detailed description of this variable structure is given in chapter 0.

2.3.2 Inputs
Identifier Description
Data type
AIF_OUT1 AIF field bus output data (first group)
AIF_OUT1 The values comprise a four-word data structure, following the structure of the AIF-OUT system block of the 9300
servo inverter. A detailed description is given on the next page.
AIF_OUT2 AIF field bus output data (second group)
AIF_OUT The values comprise a four-word data structure, following the structure of the AIF-OUT system block of the 9300
ServoPLC inverter. A detailed description is given on the next pages.
AIF_OUT3 AIF field bus output data (third group)
AIF_OUT The values comprise a four-word data structure, following the structure of the AIF-OUT system block of the 9300
ServoPLC inverter. A detailed description is given on the next pages.

2.3.3 Outputs
Identifier Description
Data type
adwFieldBusOut output of the field bus raw data
ARRAY [0..15] OF DWORD These values can directly be mapped to the output data of the field bus IO interface.

 Automation Building Blocks 2-30


2 Function Blocks
2.3 Function Block L_AIF_OUT

User-Defined Variable Structure AIF_OUT1


This structure implements the AIF-OUT1 interface known from the 9300 servo inverter series. It in-
cludes the following elements:

Identifier Description
Data type
xBit00 bit 0 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xImp bit 1 of the AIF-OUT status word: pulse inhibit active
BIT FALSE: The drive’s power stage is active and provides voltage/current to the motor.
TRUE: The drive’s power stage is inactive and no current is applied to the motor.
Note: This bit must be connected to the corresponding signal in the application (i.e. by the status signal xImpActive
of function block L_TB2P_AxisInterface).
xBit02 bit 2 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit03 bit 3 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit04 bit 4 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit05 bit 5 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xNActEqZero bit 6 of the AIF-OUT status word: drive speed signal is zero
BIT FALSE: drive is moving (absolute drive speed is greater than the speed tolerance window)
TRUE: drive is in standstill (absolute drive speed below the speed tolerance window)
Note: Generate this signal by a suitable logic (i.e. (ABS(MCTRL_nNAct_v)<=scPar.wC0019_Nmin)).
xCInh bit 7 of the AIF-OUT status word: drive controllers are inhibited
BIT FALSE: position/speed/current control is active
TRUE: position/speed/current control is reset
Note: This bit must be connected to the corresponding signal in the application (i.e. by the status signal Status of
function block MC_Power).
xStat1 bits 8 to 11 of the AIF-OUT status word: indication of the drive state
xStat2
xStat8

xStat4

xStat2

xStat1

xStat4
xStat8
BIT 0 0 0 0 initialisation after the supply voltage has been connected
0 0 1 1 drive is in controller inhibit state
0 1 1 0 controller is enabled
0 1 1 1 a monitoring function triggered in a "message"
1 0 0 0 a monitoring function triggered in a "fault"
1 0 1 0 a monitoring function triggered in a "FAIL-QSP"
Notes: These bits must be connected to the corresponding signal in the application (i.e. by the status signals of func-
tion block L_TB2P_AxisInterface). Some states known from 9300 may not be possible to be indicated (see chapter
2.3.3).

 Automation Building Blocks 2-31


2 Function Blocks
2.3 Function Block L_AIF_OUT

Identifier Description
Data type
xWarning bit 12 of the AIF-OUT status word: warning active
BIT FALSE: no drive warning is active
TRUE: a drive warning is active
Note: This bit must be connected to the corresponding signal in the application (i.e. by the status signals of function
block MC_ReadAxisError).
xMessage bit 13 of the AIF-OUT status word: message is active (i.e. under-/overvoltage state)
BIT FALSE: no message is active
TRUE: a message is active (i.e. under-/overvoltage state)
Note: This bit must be connected to the corresponding signal in the application (i.e. by the inverted status signal
xVoltageEnabled of function block L_TB2P_AxisInterface).
xBit14 bit 14 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
xBit15 bit 15 of the AIF-OUT status word
BIT FALSE: status inactive
TRUE: status active
Note: This bit does not have a fixed meaning but can be connected freely by the user.
wStat AIF-OUT status word
WORD The wStat signal is logically OR-connected with the bits xBit00 … xBit15. This leaves it up to the user if the status is
compiled indivually via the Boolean inputs xBit00 … xBit15 or via the wStat status word.
wOut1 output of a 16 bit integer number
WORD Typically, the second WORD on AIF-OUT1 is interpreted as the drive’s speed set value, scaled in [%] (0 … 16384 =
0.0 … 100.0[%]). However, it is up to the user to define the meaning in the application.
wOut2 output of a free 16 bit WORD value
WORD
wOut3 output of a free 16 bit WORD value
WORD

Tip:

 Do you need to split a 32-bit value to two 16-bit values on AIF_OUT1.wOut2 and
AIF_Out1.wOut3? The function block UnpackDword7 provides this function. Use it in
the following way:

Illustration 24: conversion of a 32-bit DWORD value to two 16-bit WORD values

7 included the CAA Memory library


 Automation Building Blocks 2-32
2 Function Blocks
2.3 Function Block L_AIF_OUT

User-Defined Variable Structure AIF_OUT


This structure implements the extended AIF-OUT interface known from the 9300 ServoPLC inverter
series. It is applied on the objects AIF-IN2 and AIF-IN3, and includes the following elements:

Identifier Description
Data type
wOut0 output of a free 16 bit WORD value
WORD
wOut1 output of a free 16 bit WORD value
WORD
wOut2 output of a free 16 bit WORD value
WORD
wOut3 output of a free 16 bit WORD value
WORD

 Automation Building Blocks 2-33


3 Application Example
3.1 Commissioning Sequence (Motion Application)

3 Application Example

3.1 Commissioning Sequence (Motion Application)

Typically, PROFIBUS is not used in new machines as there are more advanced field bus systems
available such as EtherCAT or PROFInet. The PROFIBUS field bus moreover appears in existing ma-
chines in operation. This document focusses on previous Lenze servo inverters8, which now need to
be replaced by the latest device generation of i950 drives. In the best case, the replacement i950
unit requires a functional twin of the previous servo inverter. Instead of the well-known function
block connection of the GDC, the PLC program of the i950 bases on Lenze’s technology modules
with some slight extensions to generate a 100% functional compatibility between the previous and
actual drive system.
The following example shows how to migrate a 9300 servo inverter in speed control 9 to a compat-
ible i950 signal flow, using the Lenze technology module L_TF2P_SpeedControlBase.

start Pre-Requisites:
• »PLC Designer« is already open on your PC10.
• No project is open in »PLC Designer«.

Step 1 Create a new project in »PLC Designer«:

Click on New Project …

… select the empty Standard project, …

… assign a project name (file name), …

… select a directory path to store the project and …

… confirm by clicking Ok.

Illustration 25: creation of a new project in »PLC Designer«

8 in particular the 9300 servo inverter series


9 basic configuration “speed control via AIF” (C0005/000 = 1003)
10 In this example, we use »PLC Designer« V4.x.

 Automation Building Blocks 3-34


3 Application Example
3.1 Commissioning Sequence (Motion Application)

Step 2 Specify the i950 target system:

Select a servo inverter i950 (BS) as a


target system.

As a firmware, choose a version V1.14 or higher.

Select the PLC programming language which you


would like to use in your project.
In this example, we use Continuous Function Chart
(CFC).

Keep the empty standard project.

Close the dialogue by clicking Ok.

Illustration 26: select an i950 (BS) with firmware version V1.14 or higher as a target system

Step 3 Execute a Build process to enable access to the commissioning dialogues:

Execute a Build process.


You may also use the keyboards shortcut <F11>.

Illustration 27: Build the project to allow access to the commissioning dialogues of »PLC Designer«

 Automation Building Blocks 3-35


3 Application Example
3.1 Commissioning Sequence (Motion Application)

Set the important data in the commissioning dialogues of the device:


Step 4

mains supply voltage

motor type/data

auxiliary motor functions

motor feedback system

axis kinematics

quickstop profile

monitoring functions

Illustration 28: basic settings of the i950 drive

• mains supply voltage


• motor data
• motor brake (if mounted/wired)
• motor feedback system
• axis kinematics (gearbox ratio, feed constant, …)
• quickstop profile parameters
• monitoring functions (following error, end switches, …)

Tips:

 • Use the motor catalogue of »PLC Designer« to quickly find/set the mo-
tor data.
• The auto-tuning feature of the i950 allows to find optimum controller
settings for dynamic response of the servo drive.

 Automation Building Blocks 3-36


3 Application Example
3.1 Commissioning Sequence (Motion Application)

Open the Library Manager to add the L_TF2P_TechModulesFollowingPositioning


Step 5 library to your project:
Double-click the Library Manager to
open the list of included libraries.

Click on Add Library to browse the re-


quired library in the library repository.

When entering the first letters of the library name in the search
window, you can easily find it in the selection list below.

Mark the library L_TF2P_TechModulesFollowingPositioning …

… and confirm by clicking Ok.

Illustration 29: adding the L_TF2P_TechModulesFollowingPositioning library to your project

In the same way as shown in step 5, also include the L_TB2P_TechModulesBasic library
Step 6 in the Library Manager of your project.

 Automation Building Blocks 3-37


3 Application Example
3.1 Commissioning Sequence (Motion Application)

Open the PLC_PRG program and write a small CFC program as follows:
Step 7

Declare instances of the function blocks L_TF2P_Speed-


ControlBase and L_TB2P_AxisInterface.
Double-click the PLC_PRG to edit it.

Call the function block instance of


L_TF2P_SpeedControlBase first:
- Continuously enable the function block
by assigning a fixed TRUE signal to the
xEnable input.
- Connect the i950 Motion_Axis to the
Axis input of the technology function.

Then call the function block instance of


L_TB2P_AxisInterface:
- Connect the i950 Motion_Axis to the
Axis input of the function block.

The function block L_TB2P_AxisInterface


provides no additional functionality in out
program. It is solely used to output im-
portant status information which the field
bus interface requires when implementing it
in a later stage (see chapter 3.2).

Illustration 30: calling the function blocks L_TF2P_SpeedControlBase1 and L_TB2P_AxisInterface1 in PLC_PRG

 Automation Building Blocks 3-38


3 Application Example
3.1 Commissioning Sequence (Motion Application)

Insert an empty visualization panel:


Step 8
Click right on Application to open the context menu …

… and select Add Object.

Pick a Visualization object and give it a unique


name before adding it to your project

Illustration 31: adding a visualization screen to operate the function block L_TF2P_SpeedControlBase

 Automation Building Blocks 3-39


3 Application Example
3.1 Commissioning Sequence (Motion Application)

For a first test, insert the visualization template of the L_TF2P_SpeedControlBase


Step 9 technology module to operate it via the visu screen:

Open the Visualization Toolbox.

Select the L_TF2P library.

Drag the visualization template of L_TF2P_SpeedControlBase to the visu-


alization screen and drop it at a convenient position on the new visualization
screen.

Assign the function block instance L_TF2P_SpeedControlBase1 in the


PLC_PRG program to the visualization template you just inserted.

Illustration 32: adding the visualization template of L_TF2P_SpeedControlBase

Step 10 Test your PLC program:


• Switch on mains power and 24V control power on your i950 drive.
• Download the project to your i950 drive controller and start the PLC program.
• Release the STO command on the i950 drive.

 Automation Building Blocks 3-40


3 Application Example
3.1 Commissioning Sequence (Motion Application)

By means of the visualization screen, operate the i950 drive in different operation
Step 11 modes and check all functions:

Activate the internal control of the


function block via the visualization
screen.

Power-up the i950 drive by click-


ing on EnableOperation.

After enabling drive operation, you


can run a first test by manual jog-
ging the drive via the buttons Jog-
Pos and JogNeg.

Enable speed control mode by ac-


tivating SpeedCtrlEnable.

Define a target speed in the input


field SetVel. You now should see
the drive rotating in positive direc-
tion.

If you like, you can adjust the ac-


celeration, deceleration and jerk
parameters as well.

Illustration 33: visualization screen of L_TF2P_SpeedControlBase

end

 Automation Building Blocks 3-41


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

3.2 Commissioning Sequence (PROFIBUS)

The following chapter describes how to set the PROFIBUS communication into operation with the
help of the L_AIF function blocks.

Start Pre-Requisites:
• The field bus system is wired according to the PROFIBUS specifications.
• The logic PLC (PROFIBUS master) as well as all PROFIBUS slave devices are sup-
plied with control voltage (24VDC).
• The PLC program of the i950 is open in »PLC Designer« but not yet online.
• The application signal flow has been implemented in the i950’s PLC program as
described in the previous chapter 3.1, for example migrating motion applications
of competitors or Lenze legacy devices.
• The CAA Memory library is included in the i950’s PLC project.

Step 1 In the device tree of »PLC Designer«, import the L_AIF function blocks:

Select the L_AIF.export file in the file browser


dialog and click Open to import them to your
project.

Illustration 34: import of the L_AIF function blocks in »PLC Designer«,

 Automation Building Blocks 3-42


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

Declare the following global interface variable arrays for field bus communication in a
Step 2 separate GVL item TA_IO:
{attribute 'qualified_only'}
VAR_GLOBAL
adwPROFIBUS_IN: ARRAY [0..15] OF DWORD; // raw data input from PROFIBUS
adwPROFIBUS_OUT: ARRAY [0..15] OF DWORD; // raw data output to PROFIBUS
END_VAR

Map the variable arrays declared in step 3 to the field bus interface as follows:
Step 3

Map the input variable array TA_IO.adwPROFIBUS_IN


to the input channels of the field bus interface of i950.

Map the output variable array TA_IO.adwPROFIBUS_OUT


to the input channels of the field bus interface of i950.

Illustration 35: assignment of global variable arrays to the i950’s field bus interface

 Automation Building Blocks 3-43


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

In the i950 motion program PLC_PRG, declare the following function blocks:
Step 4
VAR
L_AIF_Base1: L_AIF_Base; // handling of basic PROFIBUS communication
L_AIF_IN1: L_AIF_IN; // reading/processing field bus inputs to AIF_IN
L_AIF_OUT1: L_AIF_OUT; // processing/writing field bus outputs from AIF_OUT
L_STAT1: L_STAT; // generating the 4-bit pattern of the drive status
L_MC1A_ZeroDetect1: L_MC1A_ZeroDetect; // detection of rotation sense/zero speed
END_VAR

Prepare the parameter correspondence list11 by extending the declaration list in the
Step 5 i950’s motion program PLC_PRG:

ascParReference: ARRAY [0..15] OF sc93ParReference; // parameter reference list

NO
?  12
Does your GSD configuration include a Drivecom V0 parameter channel?

YES

Extend the parameter correspondence list started in step 5 with the necessary
Step 6 initialization values as described in chapter 2.1.2:

ascParReference: ARRAY [0..15] OF sc93ParReference; // parameter reference list
(wCode:=51, bySubCode:=0, wIndex:=16#606C, bySubIndex:=0, bySize:=4, diNum:=1171875, diDen:=524288),
(wCode:=53, bySubCode:=0, wIndex:=16#6079, bySubIndex:=0, bySize:=4, diNum:=10, diDen:=1),
(wCode:=63, bySubCode:=0, wIndex:=16#2D49, bySubIndex:=5, bySize:=2, diNum:=1000, diDen:=1),
(wCode:=52, bySubCode:=0, wIndex:=16#2D82, bySubIndex:=0, bySize:=4, diNum:=10, diDen:=1),
(wCode:=54, bySubCode:=0, wIndex:=16#2DD1, bySubIndex:=5, bySize:=4, diNum:=10, diDen:=1),
(wCode:=61, bySubCode:=0, wIndex:=16#2D84, bySubIndex:=1, bySize:=2, diNum:=10, diDen:=1),
(wCode:=64, bySubCode:=0, wIndex:=16#2D40, bySubIndex:=7, bySize:=2, diNum:=1, diDen:=1),

(wCode:=84, bySubCode:=0, wIndex:=16#2C01, bySubIndex:=2, bySize:=4, diNum:=100, diDen:=1),
(wCode:=85, bySubCode:=0, wIndex:=16#2C01, bySubIndex:=3, bySize:=4, diNum:=10, diDen:=1)];

First, call the function block L_AIF_Base in your PLC program and connect the
Step 7
variables as shown:

As an axis reference, connect the


i950 drive (Motion_Axis).

The variable structure ascParRefer-


ence , which was declared in the
steps 5 and 6, is assigned to the cor-
responding input ascParReference.

Illustration 36: call of function block L_AIF_Base at the beginning of the PLC program

11 If no parameter channel is used, still the declaration is necessary as a dummy assignment.


 Automation Building Blocks 3-44
3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

Call the function block L_AIF_IN directly after the function block L_AIF_Base in your
Step 8 PLC program and connect the variables as shown:

To access each element of the process data


of L_AIF_IN.AIF_IN1, insert a selector of
Call the function block L_AIF_IN directly type AIF_IN1.
after the function block L_AIF_Base in
your PLC program.
Note:
On 9300, xBit00 and xBit01 were used to ad-
dress fixed speeds. In this example, these bits
are left disconnected.

The function block L_AIF_IN


reads the raw fieldbus data as
declared in step 2.

L_AIF_IN interacts with L_AIF_Base and


L_AIF_OUT by sharing the variable structure
L_AIF_Base.scStateMachine.
Please connect it accordingly to ensure cor-
rect function!

Connect the xDisable and xCInh signals via an OR


logic.
Connect the output of AIF_IN1 to the technology Do you see the signal negation at the OR output?
module L_TF2P_SpeedControlBase. Don’t forget to invert the OR output before assign-
ing the output to L_TF2P_SpeedControlBase.xEna-
bleOperation.

Illustration 37: call of function block L_AIF_IN directly behind the function block L_AIF_Base

 Automation Building Blocks 3-45


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

Read the maximum speed value nmax12 from the legacy drives13 and convert it with
Step 9
the help of the drive axis’ kinematic parameters to a reference velocity Vmax.

Example: nmax = 3000[rpm]

Illustration 38: kinematic parameters of the i950 drive

𝑛𝑚𝑎𝑥 1 1
𝑉𝑚𝑎𝑥 = 𝑠 ∙ 𝐹𝑒𝑒𝑑𝐶𝑜𝑛𝑠𝑡𝑎𝑛𝑡 ∙ 𝑖 ∙ =
60 𝑖
𝑔𝑒𝑎𝑟 𝑔𝑒𝑎𝑟,𝑎𝑑𝑑
𝑚𝑖𝑛

𝑛𝑚𝑎𝑥 0𝑥500𝐴: 034 0𝑥500𝐴: 026


= 𝑠 ∙ 0𝑥500𝐴: 032 ∙ 0𝑥500𝐴: 033 ∙ 0𝑥500𝐴: 025 =
60
𝑚𝑖𝑛
𝑟𝑒𝑣.
3000
= 𝑚𝑖𝑛 ∙ 320.0000 𝑢𝑛𝑖𝑡𝑠 ∙ 119 ∙ 1 = 1488.663 … 𝑢𝑛𝑖𝑡𝑠
𝑠 𝑟𝑒𝑣. 1279 1 𝑠
60
𝑚𝑖𝑛

Declare a constant variable C_lrMaxVelocity with an initialization value of Vmax as


Step 10
calculated in the previous step:
VAR CONSTANT
C_lrMaxVelocity: LREAL := 1488.663; // maximum drive velocity, scaled in [units/s]
END_VAR

12 scaled in [rpm]
13 In the Lenze legacy devices, the maximum speed was set in code C0011/000.
 Automation Building Blocks 3-46
3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

Read and scale the speed set value on L_AIF_IN.AIF_IN1.wIn1, and route it via the
Step 11 following signal flow to the speed control technology module
L_TF2P_SpeedControlBase. Modify your program as follows:

In the first step, the normalized input value on L_AIF_IN.AIF_IN1.wIn1 with


its value range is rescaled to a velocity range of 0.0 … C_lrMaxVelocity by
means of the function L_TB1A_AnalogInputScaling.
The function L_TB1A_AnalogInputScaling is included in the export file
loaded to the project in step 1. For more information to this function,
please refer to the PDF document in AKB article 202000349.

The control bit L_AIF_IN.AIF_IN1.xBit04 al-


lows freezing the ramp function generator
of the L_TF2P_SpeedControlBase tech-
nology module.
As currently this function is not included in
the technology module itself, it must be pro-
grammed outside the technology module by
means of a selector (SEL operator).

The control bit L_AIF_IN.AIF_IN1.xBit05 switches the target velocity for the
L_TF2P_SpeedControlBase technology module to a zero value. The function
has priority over the ‘freeze’ function.
As currently this function is not included in the technology module itself, it must
be programmed outside the technology module by means of a selector (SEL op-
erator).
The selector’s output is assigned to the target velocity lrSetVel of the technology
module L_TF2P_SpeedControlBase.

Illustration 39: reading/scaling/modifying the target velocity value lrSetVel of L_TF2P_SpeedControlBase

 Automation Building Blocks 3-47


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

To prepare the status word on the L_AIF_OUT function block, three steps of preparation
Step 12 work is necessary:
In the first step, declare a variable lrZeroSpeedThreshold for a velocity tolerance
window. The tolerance window defines the behavior/stability of the zero-speed signal.

lrZeroSpeedThreshold: LREAL := 1.0; // zero-speed tolerance threshold, scaled in [units/s]


Initialize the variable with a velocity threshold limit value. Whenever the drive’s actual
velocity is smaller/equal the threshold value, the (n=0) status flag goes to a TRUE level.

In the next step, call the function block L_MC1A_ZeroDetect at the end of your program
Step 13
and connect it in the signal flow as follows:
Assign the following element variables of the Motion_Axis structure to the inputs Call the function block L_MC1A_ZeroDe-
of the L_MC1A_ZeroDetect function block: tect. The block is included in the export
• Motion_Axis.lrActPosition => L_MC1A_ZeroDetect.lrPosIn file loaded to the project in step 1. For
more information to this function block,
• Motion_Axis.eTraversingRange => L_MC1A_ZeroDetect.eTraversingRange
please refer to the PDF document in AKB
• Motion_Axis.lrCycleLength => L_MC1A_ZeroDetect.lrCycleLength article 202000349.

Multiply the zero-speed threshold limit (lrZeroSpeedThreshold) with


the task cycle time ΔtTaskCycle (L_MC1A_GetTaskCycle()) to get a
standstill hysteresis distance.
Connect the result to the input signal L_MC1A_ZeroDetect.lrStand-
stillWindow.

Illustration 40: zero speed detection by means of the function block L_MC1A_ZeroDetect

Call the function block L_STAT at the end of your program and connect the following
Step 14 variables:
Call the function block L_STAT at the end of
your program.
The function block L_STAT is included in the
Please consider the negations in the signal flow on the input export file loaded to the project in step 1.
signals L_STAT.bCInh_b and L_STAT.bMessage_b.

Illustration 41: generation of status bits bStat1_b … bStat8_b by means of the function block L_STAT

 Automation Building Blocks 3-48


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

Insert a composer block of AIF_OUT1 and connect the following signals:


Step 15

Some (minor important) status signals are not yet


available on the Lenze technology modules.
However, you may program work-arounds if you re-
quire these signals already.

The drive’s actual velocity (0.0 … C_lrMaxVelocity) is scaled to a normal-


ized output signal (0 … 16384) on L_AIF_OUT.AIF_OUT1.wOut1 by
means of the function L_TB1A_AnalogOutputScaling.
The function L_TB1A_AnalogOutputScaling is included in the export file
loaded to the project in step 1. For more information to this function,
please refer to the PDF document in AKB article 202000349.

Illustration 42: assignment of status signals/of normalized motor speed to the AIF_OUT1 composer

Insert the AIF_OUT function block at the end of your program, link the AIF_OUT1
Step 16
composer’s output to the AIF_OUT1 input of the L_AIF_OUT block and assign the
generation of the AIF status word via function block L_AIF_OUT:
Insert the function block L_AIF_OUT.
Connect the AIF_OUT1 composer’s output to
the AIF_OUT1 input of the AIF_OUT block.

L_AIF_OUT interacts with L_AIF_Base and


L_AIF_IN by sharing the variable structure
L_AIF_Base.scStateMachine.
Please connect it accordingly to ensure correct
function!
.

Assign the adwFieldBusOut output array to the global


variable array TA_IO.adwPROFIBUS_OUT already
mapped to the field bus interface.

Illustration 43: call of function block L_AIF_OUT at the end of the program and assignment to the field bus output variables

 Automation Building Blocks 3-49


3 Application Example
3.2 Commissioning Sequence (PROFIBUS)

Set the PROFIBUS station address of the i950 in index 0x2341:001:


Step 17
Index SubIndex Name Value Unit
0x2341 1 PROFIBUS: Station address 4

Make sure that index 0x2341:011 is set to a value of 1 (‘ EMF2133IB (ID:2133)’)14 or of


Step 18 2 (‘EMF2131IB (ID:2131)’)15.
Index SubIndex Name Value Unit
0x2341 11 PROFIBUS: Compatibility mode EMF2133IB (ID: 0x2133) [1]

Compile, download and start the project to the i950 drive. You are now ready to
Step 19 control the i950 drive in the same way as the 9300 drive.

end

14 This setting defines which device type is reported via PROFIBUS to the logic PLC. A setting of 0x2341:11=1 makes the logic PLC believe that the connected device
is a 8200/9300 with a PROFIBUS module EMF2133IB.
15 A setting of 0x2341:11=2 makes the logic PLC believe that the connected device is a 8200/9300 with a PROFIBUS module EMF2131IB.

 Automation Building Blocks 3-50


4 Appendix
4.1 Supported GSD Configurations

4 Appendix

4.1 Supported GSD Configurations16

# GSD configuration PROFIBUS config value(s) corresponding value in 0x2348:003


1. no parameter channel / process data (Drivecom control)
1 PZD( 1W) 0x70 xx0170
… … … …
12 PZD(12W) 0x7B xx017B
2. consistent Drivecom parameter channel / process data (Drivecom control)
13 PAR(cons.) + PZD( 1W) 0xF3, 0x70 xx02F370
… … … ..
24 PAR(cons.) + PZD(12W) 0xF3, 0x7B xx02F37B
3. consistent Drivecom parameter channel / consistent process data (Drivecom control)
25 PAR(cons.) + PZD( 1W cons.) 0xF3, 0xF0 xx02F3F0
… … … …
36 PAR(cons.) + PZD(12W cons.) 0xF3, 0xFB xx02F3FB
4. Drivecom parameter channel / process data (Drivecom control)
37 PAR + PZD( 1W) 0x73, 0x70 xx027370
… … … …
48 PAR + PZD(12W) 0x73, 0x7B xx02737B
5. Drivecom parameter channel / consistent process data (Drivecom control)
49 PAR + PZD( 1W cons.) 0x73, 0xF0 xx0273F0
… … … …
60 PAR + PZD(12W cons.) 0x73, 0xFB xx0273FB
6. no parameter channel / consistent process data (Drivecom control)
61 PZD( 1W cons.) 0xF0 xx01F0
… … … …
72 PZD(12W cons.) 0xFB xx01FB
7. no parameter channel / process data (Lenze device control)
73 PZD( 1W) AR 0x00, 0x00, 0x00, 0x70 xx0400000070
… … … …
84 PZD(12W) AR 0x00, 0x00, 0x00, 0x7B xx040000007B
8. consistent Drivecom parameter channel / process data (Lenze device control)
85 PAR(cons.) + PZD( 1W) AR 0x00, 0x00, 0x00, 0xF3, 0x70 xx05000000F370
… … … …
96 PAR(cons.) + PZD(12W) AR 0x00, 0x00, 0x00, 0xF3, 0x7B xx05000000F37B
9. consistent Drivecom parameter channel / consistent process data (Lenze device control)
97 PAR(cons.) + PZD( 1W cons.) AR 0x00, 0x00, 0x00, 0xF3, 0xF0 xx05000000F3F0
… … … …
108 PAR(cons.) + PZD(12W cons.) AR 0x00, 0x00, 0x00, 0xF3, 0xFB xx05000000F3FB
10. Drivecom parameter channel / process data (Lenze device control)
109 PAR + PZD( 1W) AR 0x00, 0x00, 0x00, 0x73, 0x70 xx050000007370
… … … …
120 PAR + PZD(12W) AR 0x00, 0x00, 0x00, 0x73, 0x7B xx05000000737B
11. Drivecom parameter channel / consistent process data (Lenze device control)
121 PAR + PZD( 1W cons.) AR 0x00, 0x00, 0x00, 0x73, 0xF0 xx0500000073F0
… … … …
132 PAR + PZD(12W cons.) AR 0x00, 0x00, 0x00, 0x73, 0xFB xx0500000073FB
12. no parameter channel / consistent process data (Lenze device control)
133 PZD( 1W cons.) AR 0x00, 0x00, 0x00, 0xF0 xx04000000F0
… … … …
144 PZD(12W cons.) AR 0x00, 0x00, 0x00, 0xFB xx04000000FB

16 no distinguishing between inconsistent/consistent data transmission


 Automation Building Blocks 4-51
4 Appendix
4.2 AIF-IN Interface of 9300

4.2 AIF-IN Interface of 9300

Illustration 44: signal flow of the AIF-IN interface on the 9300 servo inverter (excerpt from GDC help)

 Automation Building Blocks 4-52


4 Appendix
4.3 AIF-OUT Interface of 9300

4.3 AIF-OUT Interface of 9300

Illustration 45: signal flow of the AIF-OUT interface on the 9300 servo inverter (excerpt from GDC help)

 Automation Building Blocks 4-53


4 Appendix
4.4 Drivecom Control Word

4.4 Drivecom Control Word

Bit Name Meaning


0 Switch On command bit:
FALSE commands 2, 6, 8 (controller inhibit)
TRUE command 3 (controller enable)
1 Voltage Inhibit command bit: disable/enable motor voltage
FALSE inhibit voltage
TRUE enable voltage
2 Quick Stop command bit: activate quick stop
FALSE activate quick stop
TRUE release quick stop
3 Enable Operation command bit: enable drive operation
FALSE disable drive operation
TRUE enable drive operation
4 RFG Inhibit command bit: application quick stop (QSP)
FALSE activate application quick stop (QSP)
TRUE release application quick stop (QSP)
Note: The negated signal of this bit is directly output on AIF_IN1.xQsp.
5 RFG Stop command bit: stop ramp function generator
FALSE ramp function generator freezes
The drive maintains the actual speed even if the target speed on AIF_IN1.iIn2 is not reached yet.
TRUE ramp function generator is active
The drive accelerates/decelerates to the target speed on AIF_IN1.iIn2.
Notes:
• The negated signal of this bit is directly output on AIF_IN1.xBit04.
• In the basic application ‘SpeedControl’, bit 5 (RFG Stop) has minor priority against bit 6 (RFG Zero).
6 RFG Zero command bit: ramp down set speed to zero
FALSE zero target speed
The drive ramps down to a zero speed. The value received on AIF_IN1.iIn2 is ignored.
TRUE external target speed
The drive follows the target speed on AIF_IN1.iIn2.
Notes:
• The negated signal of this bit is directly output on AIF_IN1.xBit05.
• In the basic application ‘SpeedControl’, bit 6 (RFG Zero) has priority over bit 5 (RFG Stop).
7 Error Reset command bit: reset drive error
FALSE=>TRUE resets a drive error
Notes:
• A drive error can only be reset in case the error cause has been removed before.
• This bit is directly output on AIF_IN1.xTripReset.
8 … 10 (reserved)
11 Manufacturer free bit (directly output on AIF_IN1.xBit07)
12 Manufacturer free bit (directly output on AIF_IN1.xBit12)
13 Manufacturer free bit (directly output on AIF_IN1.xBit13)
14 Manufacturer free bit (directly output on AIF_IN1.xBit14)
15 Manufacturer free bit (directly output on AIF_IN1.xBit15)

 Automation Building Blocks 4-54


4 Appendix
4.5 Drivecom Status Word

4.5 Drivecom Status Word

Bit Name Meaning


0 Ready To Start device state machine information:
FALSE The device status is lower than Ready To Start.
TRUE The device status is at least Ready To Start.
1 Switched On device state machine information:
FALSE The device status is lower than Switched On.
TRUE The device status is at least Switched On.
2 Operation Enabled device state machine information:
FALSE The device status is lower than Operation Enabled.
TRUE The device status is at least Operation Enabled.
3 Fault device is in error state:
FALSE no error is active on the device
TRUE an error is active on the device
Note: The signal is derived from AIF_OUT1.xStat8, AIF_OUT1.xStat10 and AIF_OUT1.xStat11.
4 Voltage Inhibited handshake signal: return of control bit 1 (“Voltage Inhibit“)
FALSE no error is active on the device
TRUE an error is active on the device
Note: The signal is directly copied from bit 1 of the Drivecom control word (see previous chapter 4.4).
5 Quick Stop handshake signal: return of control bit 2 (Quick Stop)
FALSE quick stop command is active on the device
TRUE no quick stop command is active on the device
Note: The signal is directly copied from bit 2 or bit 4 of the Drivecom control word (see previous chapter 4.4).
6 Switch-On Inhibited device state machine information:
FALSE The device is not in state Switch-On Inhibited.
TRUE The device is in state Switch-On Inhibited.
7 Warning device is in warning state:
FALSE no warning is active on the device
TRUE a warning is active on the device
Note: The signal of this bit is directly copied from AIF_OUT1.xWarning.
8 Message message is active on the device:
FALSE no message is active on the device
TRUE a message is active on the device
Notes:
• A message state typically occurs in at an undervoltage state (main power switched off).
• The signal of this bit is directly copied from AIF_OUT1.xMessage.
9 Remote field bus access authorization:
FALSE -
TRUE (this signal is set always TRUE in Drivecom operation mode)
10 Set Point Reached status of the internal ramp generator:
FALSE The actual drive speed does not match the target value.
TRUE The actual drive speed matches the target value.
Notes:
• In default speed control, the signal represents the Set Point Reached status of the speed ramp generator. In this
case, the following Drivecom command bits may suppress the Set Point Reached status signal:
− RFG Inhibit (command bit 4)
− RFG Stop (command bit 5)
− RFG Zero (command bit 6)
• Generally, the signal of this bit is directly copied from AIF_OUT1.xBit04.
11 Limit Value Status of the Drivecom speed limitation (not supported):
FALSE (this signal is set always FALSE in Drivecom operation mode)
TRUE -
12 Manufacturer free bit (signal directly copied from AIF_OUT1.xBit14)
13 Manufacturer free bit (signal directly copied from AIF_OUT1.xBit03)
14 Manufacturer free bit (signal directly copied from AIF_OUT1.xBit02)
15 Manufacturer free bit (signal directly copied from AIF_OUT1.xBit05)

 Automation Building Blocks 4-55


4 Appendix
4.6 Drivecom DP V0 Parameter Channel (Tx)

4.6 Drivecom DP V0 Parameter Channel (Tx)

The following chart describes the meaning of the transmit parameter channel request (8 bytes),
sent by the PLC to the slave device (drive):

byte 1 (service) byte 2 byte 3 byte 4 bytes 5 … 8


7 6 5 4 3 2 1 0 subindex index17 index data
(high byte) (low byte)

request type: 000 = no request


001 = read request (read data from device)
010 = write request (write data to device)
(not used)
data length18: 00 = 1 byte
01 = 2 bytes
10 = 3 bytes
11 = 4 bytes
handshake:
• The PLC changes this (toggle) bit for every new request.
• The slave mirrors this bit into its response telegram (see chapter 4.7).

(not used – keep on FALSE level)

Illustration 46: structure of the Drivecom DP V0 parameter channel Tx telegram on the 9300 servo inverter (PLC => drive)

17 The 9300 index number results from subtracting the 9300 code number from a fixed value of 24575 (=0x5FFF).
18 length of data in bytes 5 ... 8 (data/error 1 ... 4) to be read/written to the slave device index
 Automation Building Blocks 4-56
4 Appendix
4.7 Drivecom DP V0 Parameter Channel (Rx)

4.7 Drivecom DP V0 Parameter Channel (Rx)

The following chart describes the meaning of the receive parameter channel response (8 bytes),
returned by the slave device (drive) to the PLC:

byte 1 (service) byte 2 byte 3 byte 4 bytes 5 … 8


7 6 5 4 3 2 1 0 subindex index19 index data / error code
(high byte) (low byte)

mirror of the request type bits 0 … 2 (see chapter 2.1.4)


(not used)
data length20: 00 = 1 byte
01 = 2 bytes
10 = 3 bytes
11 = 4 bytes
mirror of handshake bit 6 of the Tx telegram (see chapter 2.2.16):
• The PLC changes this (toggle) bit for every new request.
• The slave device copies the bit into its response telegram.

status bit:
Status information from the slave device to the PLC when sending the request confirmation. This bit
informs the master PLC whether the request has been carried out without any faults.
0 = request completed without fault
(The data of bytes 5 ... 8 represent the data read from the target index.)
1 = request not completed - an error has occurred.
(The data of bytes 5 ... 8 represent the error number.)

The following error codes are returned in case of bit 7 is on TRUE:


byte 5 byte 6 byte 7 byte 8 error description
0x00 0x00 0x00 0x08 no response to a request could be received within the watchdog time
0x00 0x00 0x03 0x06 access not permitted for this parameter
0x00 0x00 0x07 0x06 code number does not exist in the parameter reference list
0x00 0x00 0x08 0x06 data types do not correspond
0x01 0xFE 0x00 0x08 invalid service (no read or write request)
0x10 0x00 0x05 0x06 target index/sub-index number does not exist on the device
0x11 0x00 0x05 0x06 sub-code number does not exist in the parameter reference list
0x12 0x00 0x05 0x06 data length of the value to be written is too large
0x13 0x00 0x05 0x06 data length of the value to be read is too small
0x30 0x00 0x00 0x08 write access not denied due to drive operation enabled
0x31 0x00 0x00 0x08 upper limit value of the parameter is not reached
0x32 0x00 0x00 0x08 lower limit value of the parameter is not reached

Illustration 47: structure of the Drivecom DP V0 parameter channel Rx telegram on the 9300 servo inverter (drive => PLC)

19 The 9300 index number results from subtracting the 9300 code number from a fixed value of 24575 (=0x5FFF).
20 length of the return data in bytes 5 ... 8 (data/error 1 ... 4)
 Automation Building Blocks 4-57

You might also like