Вы находитесь на странице: 1из 212

Electric Drives Linear Motion and

and Controls Hydraulics Assembly Technologies Pneumatics Service


Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Title Rexroth IndraDrive


Rexroth IndraMotion MLD
Library

Type of Documentation Library Description

Document Typecode DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P

Internal File Reference RS-3f8ef8b70a6846ac00b4b7d3d98a87cc-4-en-US-3

Purpose of Documentation This documentation describes the functions, function blocks and data types
contained in the targets
● IndraDrive MPH02,
● IndraDrive MP03,
● IndraDrive MP04,
● IndraDrive MP05,
● IndraDrive MP06 and
● IndraDrive MP07
as well as a listing of the possible error reactions.

Record of Revision Edition Release Date Notes


DOK-INDRV*-MLD-SYSLIB*-FK01-EN-P 2004-08-13 to See chapter "About This
to DOK-INDRV*-MLD-SYSLIB*-FK05-EN- 2010-03-23 Documentation", margin‐
P al note "Editions of This
Documentation"

Copyright © Bosch Rexroth AG 2010


Copying this document, giving it to others and the use or communication of the
contents thereof without express authority, are forbidden. Offenders are liable
for the payment of damages. All rights are reserved in the event of the grant of
a patent or the registration of a utility model or design (DIN 34-1).
Validity The specified data is for product description purposes only and may not be
deemed to be guaranteed unless expressly confirmed in the contract. All rights
are reserved with respect to the content of this documentation and the availa‐
bility of the product.
Published by Bosch Rexroth AG
Bgm.-Dr.-Nebel-Str. 2 ■ D-97816 Lohr a. Main
Telephone +49 (0)93 52/ 40-0 ■ Fax +49 (0)93 52/ 40-48 85
http://www.boschrexroth.com/
Dept. DCC/EDY1 (SA, BB)
Note This document has been printed on chlorine-free bleached paper.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG I/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Table of Contents

Table of Contents
Page

1 Rexroth IndraDrive Firmware Libraries.......................................................................... 5


1.1 About This Documentation..................................................................................................................... 5
1.2 General Information................................................................................................................................ 7
1.3 Libraries.................................................................................................................................................. 8
1.3.1 Supported Libraries............................................................................................................................. 8
1.3.2 Library Assignment for the Targets "IndraDrive MPH02" and "IndraDrive MP03"............................... 9
1.3.3 Library Assignment as of the Target "IndraDrive MP04"................................................................... 12
1.4 Signal Time Diagrams of Most Frequently Used Inputs and Outputs................................................... 22
1.5 Error Handling....................................................................................................................................... 26
1.5.1 General Information........................................................................................................................... 26
1.5.2 Error Reference Lists for Function Blocks as of Target "IndraDrive MP03"...................................... 28
1.6 Data Types........................................................................................................................................... 34
1.6.1 General Data Types.......................................................................................................................... 34
1.6.2 Selected Data Types of "MX_Base.lib".............................................................................................. 35
MB_IDN.......................................................................................................................................... 35
1.7 AnalyzationNew.lib............................................................................................................................... 35
1.8 Iecsfc.lib................................................................................................................................................ 35
1.9 MX_PLCopen.lib................................................................................................................................... 36
1.9.1 General Information........................................................................................................................... 36
1.9.2 Overview of the Function Blocks....................................................................................................... 36
1.9.3 Function Blocks................................................................................................................................. 37
MB_ChangeProfileSet ................................................................................................................... 37
MB_ChangeProfileStep.................................................................................................................. 39
MB_Command................................................................................................................................ 42
MB_GearInPos............................................................................................................................... 46
MB_MotionProfile........................................................................................................................... 49
MB_Phasing................................................................................................................................... 52
MB_PhasingSlave.......................................................................................................................... 53
MB_Stop......................................................................................................................................... 55
MC_CamIn...................................................................................................................................... 57
MC_CamOut................................................................................................................................... 60
MC_GearIn..................................................................................................................................... 61
MC_GearOut.................................................................................................................................. 63
MC_MoveAbsolute......................................................................................................................... 64
MC_MoveAdditive........................................................................................................................... 66
MC_MoveRelative.......................................................................................................................... 69
MC_MoveVelocity........................................................................................................................... 71
MC_Stop......................................................................................................................................... 74
MC_TorqueControl......................................................................................................................... 77
MX_MoveAbsolute.......................................................................................................................... 78
MX_MoveAdditive........................................................................................................................... 81
MX_MoveRelative........................................................................................................................... 84
MX_MoveVelocity........................................................................................................................... 87
MX_Stop......................................................................................................................................... 89
II/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Table of Contents

Page
1.10 MX_SysLibCom.lib................................................................................................................................ 90
1.10.1 Overview............................................................................................................................................ 90
1.10.2 MX_fSysComStatus........................................................................................................................... 91
1.10.3 MX_SysComOpenAsync................................................................................................................... 91
1.10.4 SysComClose.................................................................................................................................... 92
1.10.5 SysComOpen.................................................................................................................................... 93
1.10.6 SysComRead.................................................................................................................................... 93
1.10.7 SysComWrite..................................................................................................................................... 94
1.11 MX_Base.lib.......................................................................................................................................... 95
1.11.1 Introduction........................................................................................................................................ 95
1.11.2 "Tools" - General Functions and Function Blocks............................................................................. 96
Overview......................................................................................................................................... 96
ATAN2............................................................................................................................................ 96
MX_fGetFreeTicks.......................................................................................................................... 96
MX_fGetHighResTime.................................................................................................................... 97
MX_fHighResTimerTicks_to_us...................................................................................................... 98
MX_IECTaskGetLoad..................................................................................................................... 99
MX_PositionLoopEventInfo.......................................................................................................... 100
1.11.3 "Drive Control" - Function Blocks/Functions for Drive Control......................................................... 100
Overview....................................................................................................................................... 100
MB_Home..................................................................................................................................... 100
MB_PreSetMode.......................................................................................................................... 102
MX_Power / MC_Power................................................................................................................ 103
MC_ReadStatus........................................................................................................................... 105
MX_Reset / MC_Reset................................................................................................................. 107
MX_Command.............................................................................................................................. 109
MX_SetControl............................................................................................................................. 112
MX_SetDeviceMode..................................................................................................................... 114
MX_SetOpMode........................................................................................................................... 116
MB_SetPositionControlMode........................................................................................................ 119
1.11.4 "Diagnostic" - Functions for Diagnosis............................................................................................. 120
Overview....................................................................................................................................... 120
MX_fGetDriveWarning.................................................................................................................. 121
MX_fSetDriveError........................................................................................................................ 121
MX_fSetDriveWarning.................................................................................................................. 122
1.11.5 "Parameters" - Function Blocks/Functions for Parameters.............................................................. 123
Overview....................................................................................................................................... 123
MB_ChangeCamData................................................................................................................... 124
MX_fCheckCmdRequest.............................................................................................................. 126
MX_fReadParamDINT.................................................................................................................. 127
MX_fReadStringParam................................................................................................................. 128
MX_fSetParamLimits.................................................................................................................... 129
MX_fSetParamName.................................................................................................................... 130
MX_fSetParamUnit....................................................................................................................... 131
MX_fWriteParamDINT.................................................................................................................. 132
MX_fWriteStringParam................................................................................................................. 133
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG III/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Table of Contents

Page
MB_ReadListParameter............................................................................................................... 134
MB_ReadMaxRealValue.............................................................................................................. 136
MB_ReadMaxValue...................................................................................................................... 138
MB_ReadMinRealValue............................................................................................................... 140
MB_ReadMinValue....................................................................................................................... 142
MB_ReadName............................................................................................................................ 144
MB_ReadParameter..................................................................................................................... 146
MB_ReadRealListParameter........................................................................................................ 148
MB_ReadRealParameter.............................................................................................................. 150
MB_ReadSercosDataStatus......................................................................................................... 152
MB_ReadSercosAttribute ............................................................................................................ 155
MB_ReadUnit / MX_ReadUnit...................................................................................................... 156
MB_ReadStringParameter............................................................................................................ 158
MB_WriteParameter..................................................................................................................... 160
MB_WriteRealListParameter ....................................................................................................... 163
MB_WriteListParameter ............................................................................................................... 165
MB_WriteRealParameter.............................................................................................................. 168
MB_WriteStringParameter............................................................................................................ 171
MX_ReadParamDINT................................................................................................................... 173
MX_SetCmdState......................................................................................................................... 175
MX_WriteParamDINT................................................................................................................... 176
1.11.6 "Scaling" - Functions for Scaling...................................................................................................... 178
MX_fDINT_AccTo_REAL.............................................................................................................. 178
MX_fDINT_DistTo_REAL ............................................................................................................. 179
MX_fDINT_VelTo_REAL .............................................................................................................. 179
MX_fREAL_AccTo_DINT ............................................................................................................. 180
MX_fREAL_DistTo_DINT ............................................................................................................. 181
MX_fREAL_TorqueRampTo_DINT .............................................................................................. 181
MX_fREAL_TorqueTo_DINT ....................................................................................................... 182
MX_fREAL_VelTo_DINT .............................................................................................................. 183
1.12 MX_DSP.lib......................................................................................................................................... 183
1.12.1 General Information......................................................................................................................... 183
1.12.2 MX_SynchronControl....................................................................................................................... 184
1.12.3 Notes on Programming ................................................................................................................... 189
1.13 MX_SysLibMem.................................................................................................................................. 189
1.13.1 General Information......................................................................................................................... 189
1.13.2 Functions......................................................................................................................................... 189
1.13.3 Notes on Utilization.......................................................................................................................... 189
1.14 MX_SysLibDir..................................................................................................................................... 189
1.14.1 General Information......................................................................................................................... 189
1.14.2 Functions......................................................................................................................................... 190
1.14.3 Notes on Utilization.......................................................................................................................... 190
1.15 "MX_SysLibFile" and "MX_SysLibFileAsync"..................................................................................... 190
1.16 MX_SysLibIecTasks.lib....................................................................................................................... 192
1.17 RIL_CommonTypes.lib ...................................................................................................................... 192
1.18 RIL_SocketComm.lib.......................................................................................................................... 194
IV/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Table of Contents

Page
1.19 RIL_Utilities......................................................................................................................................... 194
1.20 RIL_VExUtil.lib.................................................................................................................................... 194
1.21 SysLibCallback.lib............................................................................................................................... 194
1.22 SysLibSem.lib..................................................................................................................................... 195
1.23 SysLibSockets.................................................................................................................................... 195
1.23.1 General............................................................................................................................................ 195
1.23.2 Overview of Function Blocks and Functions.................................................................................... 195
1.23.3 Notes on Utilization.......................................................................................................................... 196
1.24 SysLibStr.lib........................................................................................................................................ 199
1.25 Util.lib.................................................................................................................................................. 199
1.26 For Internal Test Purposes Only!: The Library "MX_Debug.lib".......................................................... 199
1.27 For Program-Internal Use Only!: Functions for Checking or Signaling Runtime Errors...................... 200
1.28 Do Not Use!: Internal Functions, Function Blocks, Data Types and Structures................................. 200

2 Appendix.................................................................................................................... 203
2.1 Service and Support........................................................................................................................... 203

Index.......................................................................................................................... 205
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 5/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1 Rexroth IndraDrive Firmware Libraries


1.1 About This Documentation
Editions of This Documentation

Edition Release date Notes

Contains descriptions of libraries for target "IndraDrive


DOK-INDRV*-MLD-SYSLIB*-FK01-EN-P 2004-08-13
MPH02"
Contains descriptions of libraries for targets "IndraDrive
DOK-INDRV*-MLD-SYSLIB*-FK02-EN-P 2006-10-27
MPH02", "IndraDrive MP03" and "IndraDrive MP04"
Contains descriptions of libraries for targets "IndraDrive
DOK-INDRV*-MLD-SYSLIB*-FK03-EN-P 2007-10-30 MPH02", "IndraDrive MP03", "IndraDrive MP04" and
"IndraDrive MP05"
Error corrections and additions.
Also contains descriptions of functions and function blocks for
DOK-INDRV*-MLD-SYSLIB*-FK04-DE-P 2009-11-11 targets "IndraDrive MP06" and "IndraDrive MP07".
Contains references to the documentation of the basic libra‐
ries for IndraLogic 1x.
Table on dependance between parameterization of the axis,
functional package and selected function block included
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P 2010-03-23
Chapters and links on "RIL" and system libraries included
Error corrections

Fig.1-1: Record of Revisions


Means of Representation in This To make the reading of this documentation easier for you, the table below con‐
Documentation tains the means of representation and notations of recurring terms.

What? How? For example...

Paths and sequences of menus... ...are represented step by step in bold‐ Click Window ▶ Show view ▶ Properties
face
Buttons and keys... ... are represented in angle brackets Click <Add> or
Press <Ctrl>+<Alt>
Important facts which are to be highligh‐ Boldface For remote axes, "Active"=TRUE signals
ted in the body text that ...
Parameter names, diagnostic message Quotation marks "Axis2" to "Axis8" correspond to the re‐
names, function designations mote axes. The addresses contained in
the list "P‑0‑1601, CCD:Addresses of
projected drives" ...

Fig.1-2: Conventions of Notation


All important notes are highlighted. A symbol tells you what kind of note is used
in the text. The symbols have the following significances:

DANGER ...
DANGER indicates a hazardous situation which, if not avoided, will result in
death or serious injury.
6/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

WARNING ...
WARNING indicates a hazardous situation which, if not avoided, could result
in death or serious injury.

CAUTION ...
In case of non-compliance with this safety instruction, minor or moderate injury
could occur.

NOTICE ...
In case of non-compliance with this safety instruction, property damage could
occur.

This box contains important information which you should take into
consideration.

This symbol highlights useful tips and tricks.

Your Feedback Your experience is important for our improvement processes of products and
documentations.
If you discover mistakes in this documentation or suggest changes, you can
send your feedback to the following e-mail address:
Dokusupport@boschrexroth.de
We need the following information to handle your feedback:
● The number indicated under "Internal File Reference".
● The page number.
Documentation as Online Help This documentation has been included in the IndraLogic help system.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 7/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-3: Description of "Rexroth IndraDrive Firmware Libraries" in the IndraLogic


Help System
Title Reference Documentations Kind of documentation Document typecode1) Part number

Rexroth IndraWorks Reference Book DOK-IL*1X*-BASLIB**V09-RE01- R911330547


Basic Libraries EN-P

IndraLogic 1x
1) In the document typecodes, "xx" is a wild card for the current edition of
the documentation (example: PR01 is the first edition of a Project Plan‐
ning Manual)
Fig.1-4: Documentations – Overview

1.2 General Information


The PLC programming system Rexroth IndraLogic allows managing different
libraries.
The corresponding hardware must be available to use the different IndraDrive
target systems as drive-integrated PLC (see Application Manual "Rexroth
IndraMotion MLD"). In addition, the functional expansion package "IndraMotion
MLD" must have been enabled (see also Functional Description of firmware
"Enabling of Functional Packages").
For operating the IndraDrive target systems as drive-integrated PLC, Rexroth
provides specific function block libraries. After you have installed the PLC pro‐
gramming system Rexroth IndraLogic, these libraries are contained in the
directory
● ...\Rexroth\IndraLogic\Targets(target systems IndraDrive MPH02 and
IndraDrive MP03)
● ...\Rexroth\IndraWorks\IndraLogic\Targets (as of target system
IndraDrive MP04)
8/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

When a project with an IndraDrive target system is created, some Rexroth li‐
braries are automatically included in the project. The library manager allows
subsequently adding libraries to a project to use their functions.
Libraries can contain both function blocks and declarations and/or variables.
The drive-integrated PLC (Rexroth IndraMotion MLD) is supplied together with
basic libraries containing fundamental function blocks and definitions/variables.
As regards the function blocks, it is possible to create IEC functions/function
blocks or define firmware function blocks according to the library type.
As the code of the firmware libraries is contained in the firmware, the functions
of the PLC have to be known at the start time. For this purpose, a header file
template is provided per library which contains the necessary information.
So-called "internal libraries" contain the IEC code.

The shortcut <F2> provides you the dialog for selecting possible
input at the current cursor position in the editor window. In the left
column of the dialog select the desired category of input, in the right
column highlight the desired feature and confirm your selection with
"OK".

1.3 Libraries
1.3.1 Supported Libraries
Library Target Description

AnalyzationNew.lib As of "IndraDrive MPH02" Function blocks for the analysis of expressions


Makes available IEC steps conforming to standard in sequen‐
Iecsfc.lib As of "IndraDrive MPH02"
tial language ["Sequential Function Chart" (SFC)]
● General Functions
● Functional Blocks/Functions for Drive Control
● Functions for Diagnosis
● Function Blocks/Functions for Parameters

MX_Base.lib As of "IndraDrive MPH02" ● Functions for Scaling


● Data Types or Structures
● Cyclic Parameters as Direct Variables (System-Wide
Variables)
● Axis Structures [for Multi-Axis System (MLD System
Mode)]
For Program-Internal Use Only!: Functions for Checking or
MX_CheckRtv.lib As of "IndraDrive MPH02"
Signaling Runtime Errors
MX_Debug.lib_int As of "IndraDrive MPH02" For Internal Test Purposes Only (Laboratory)!
Function block for realizing a consistent data exchange via the
MX_DSP.lib As of "IndraDrive MPH02"
real-time channel
Do Not Use!: Internal Functions, Function Blocks, Data Types
MX_Internal.lib As of "IndraDrive MPH02"
and Structures
MX_PLCopen.lib As of "IndraDrive MPH02" IEC Function Blocks for Drive Control
MX_SysLibCom.lib As of "IndraDrive MPH02" Functions for Access to a Serial Interface
Functions for synchronously accessing a file directory system
MX_SysLibDir.lib As of "IndraDrive MPH02"
on the target
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 9/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Library Target Description


MX_SysLibFile.lib As of "IndraDrive MPH02" Functions for synchronously accessing files
MX_SysLibFileA‐
As of "IndraDrive MPH02" Functions for asynchronously accessing files
sync.lib
MX_SysLibIecTasks.lib As of "IndraDrive MP05" Functions for managing IEC tasks
MX_SysLibMem.lib As of "IndraDrive MPH02" Functions for memory management
NetVar‐ For Program-Internal Use Only!: Functions for Processing
As of "IndraDrive MP05"
Udp_LIB_V23.lib Network Variables
Contains data types and structures most of which are only
RIL_CommonTypes.lib As of "IndraDrive MPH02"
used internally
Functions and function blocks which allow using the TCP/UDP
RIL_SocketComm.lib As of "IndraDrive MPH02"
communication
Functions and functions blocks for conversions, SERCOS and
RIL_Utilities.lib As of "IndraDrive MPH02"
for time measurement or time conversion
Function block allowing safe key-type operation with all VEx
RIL_VExUtil.lib As of "IndraDrive MPH02"
devices
Functions and function blocks that are required by
Standard.lib As of "IndraDrive MPH02" IEC 61131‑3 as standard blocks for an IEC programming sys‐
tem
System library: Functions for activating defined callback func‐
SysLibCallback.lib As of "IndraDrive MPH02"
tions for runtime events
System library: Functions for creating and using semaphores
SysLibSem.lib As of "IndraDrive MP06"
for task synchronization
System library: Functions supporting the access to sockets for
SysLibSockets.lib As of "IndraDrive MP05"
communication via TCP/IP and UDP
SysLibStr.lib As of "IndraDrive MPH02" System library: Functions for handling strings
Function blocks that can be used for BCD conversion, bit/byte
functions, mathematical auxiliary functions, as controllers, sig‐
Util.lib As of "IndraDrive MPH02"
nal generators, function manipulators and for analog value
processing

1.3.2 Library Assignment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"
Depending on the functional package and the parameterization of
the axis, not all function blocks are operable (see table " Depend‐
ance Between Parameterization of the Axis, Functional Package
and Selected Function Block").

Function block name Description Target Library Range

ATAN2 For the conversion of Cartesian coordi‐ IndraDrive Base_MPH02.lib Tools


nates P(x;y) into polar coordinates P(r;φ), MPH02
the function is used to determine the angle
IndraDrive MP03 Base_MP03.lib
φ.
MB_ReadMaxRealVal‐ With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
ue the maximum allowed value of a parame‐ Parameter
ter. The value is returned in REAL format.
10/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MB_ReadMaxValue With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
the maximum allowed value of a parame‐ Parameter
ter. The value is returned in DINT format.
MB_ReadMinRealVal‐ With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
ue the minimum allowed value of a parameter. Parameter
The value is returned in REAL format.
MB_ReadMinValue With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
the minimum allowed value of a parameter. Parameter
The value is returned in DINT format.
MB_ReadName With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
the name of a parameter. Parameter
MB_ReadParameter With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
the current value of a parameter. The re‐ Parameter
turn value is DINT.
MB_ReadRealParame‐ With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
ter the current value of a parameter. The re‐ Parameter
turn value is REAL.
MB_ReadSercosAttri‐ With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
bute the SERCOS attribute of a parameter. Parameter
MB_WriteParameter With the function block it is possible to write IndraDrive MP03 Base_MP03.lib Drive Control /
a defined value to a parameter. Parameter
MB_WriteRealParame‐ With the function block you can write a de‐ IndraDrive MP03 Base_MP03.lib Drive Control /
ter fined REAL value to the parameter belong‐ Parameter
ing to the parameter number.
MX_Command The function block is used to execute a IndraDrive Base_MPH02.lib Drive Control
drive command. MPH02
IndraDrive MP03 Base_MP03.lib
MX_fDINT_AccTo_RE‐ The firmware function converts an accel‐ IndraDrive Base_MPH02.lib Scaling
AL eration value in the fixed point format of MPH02
data type DINT into a REAL value, accord‐
IndraDrive MP03 Base_MP03.lib
ing to the scaling which has been set.
MX_fDINT_DistTo_RE‐ The firmware function converts a position IndraDrive Base_MPH02.lib Scaling
AL value in the fixed point format of data type MPH02
DINT into a REAL value, according to the
IndraDrive MP03 Base_MP03.lib
scaling which has been set.
MX_fDINT_VelTo_RE‐ The firmware function converts a velocity IndraDrive Base_MPH02.lib Scaling
AL value in the fixed point format of data type MPH02
DINT into a REAL value, according to the
IndraDrive MP03 Base_MP03.lib
scaling which has been set.
MX_fGetFreeTicks The function is used to determine the time IndraDrive Base_MPH02.lib Tools
of the last PLC time slice still available to MPH02
the PLC. This PLC time slice is that part of
IndraDrive MP03 Base_MP03.lib
a millisecond which remains after the drive
controller and control tasks have been pro‐
cessed.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 11/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MX_fGetDriveWarning The firmware function allows polling IndraDrive Base_MPH02.lib Drive Control /
whether a certain warning diagnosis is ac‐ MPH02 Diagnostic
tive in the drive.
IndraDrive MP03 Base_MP03.lib
MX_fGetHighResTime The function returns a growing timer value IndraDrive Base_MPH02.lib Tools
with high resolution. MPH02
IndraDrive MP03 Base_MP03.lib
MX_fReadParamDINT The firmware function is used to read a pa‐ IndraDrive Base_MPH02.lib Drive Control /
rameter value and return it as DINT. MPH02 Parameter
IndraDrive MP03 Base_MP03.lib
MX_fReadStringParam With the firmware function it is possible to IndraDrive Base_MPH02.lib Drive Control /
read a parameter the operating data of MPH02 Parameter
which has the ASCII format (string).
IndraDrive MP03 Base_MP03.lib
MX_fREAL_Ac‐ The firmware function converts an accel‐ IndraDrive Base_MPH02.lib Scaling
cTo_DINT eration value in the REAL format into a MPH02
fixed-point DINT value, according to the
IndraDrive MP03 Base_MP03.lib
scaling which has been set.
MX_fREAL_Dis‐ The firmware function converts a position IndraDrive Base_MPH02.lib Scaling
tTo_DINT value in the REAL format into a fixed-point MPH02
DINT value, according to the scaling which
IndraDrive MP03 Base_MP03.lib
has been set.
MX_fREAL_Vel‐ The firmware function converts a velocity IndraDrive Base_MPH02.lib Scaling
To_DINT value in the REAL format into a fixed-point MPH02
DINT value, according to the scaling which
IndraDrive MP03 Base_MP03.lib
has been set.
MX_fSetDriveError The firmware function triggers an error di‐ IndraDrive Base_MPH02.lib Drive Control /
agnosis in the drive. MPH02 Diagnostic
IndraDrive MP03 Base_MP03.lib
MX_fSetDriveWarning The firmware function is used to set or clear IndraDrive Base_MPH02.lib Drive Control /
a warning diagnosis in the drive. MPH02 Diagnostic
IndraDrive MP03 Base_MP03.lib
MX_fWriteParamDINT The firmware function is used to write data IndraDrive Base_MPH02.lib Drive Control /
to a parameter. MPH02 Parameter
IndraDrive MP03 Base_MP03.lib
MX_fWriteStringParam The firmware function is used to write data IndraDrive Base_MPH02.lib Drive Control /
to a text parameter. MPH02 Parameter
IndraDrive MP03 Base_MP03.lib
MX_MoveAbsolute The function block is used to move the IndraDrive MXMo‐ Single Axis Mo‐
drive to a preset absolute position. MPH02 tion_MPH02.lib tion
IndraDrive MP03 MXMo‐
tion_MP03.lib
MX_MoveAdditive The function block is used to move the IndraDrive MXMo‐ Single Axis Mo‐
drive in relative form by a distance in addi‐ MPH02 tion_MPH02.lib tion
tion to the target position.
IndraDrive MP03 MXMo‐
tion_MP03.lib
12/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MX_MoveRelative The function block is used to move the IndraDrive MXMo‐ Single Axis Mo‐
drive in relative form by a distance, starting MPH02 tion_MPH02.lib tion
from the current actual position.
IndraDrive MP03 MXMo‐
tion_MP03.lib
MX_MoveVelocity The function block is used to preset a ve‐ IndraDrive MXMo‐ Single Axis Mo‐
locity for the drive. MPH02 tion_MPH02.lib tion
IndraDrive MP03 MXMo‐
tion_MP03.lib
MC_Power When the internal PLC has permanent or IndraDrive Base_MPH02.lib Drive Control
temporary control over the drive, drive en‐ MPH02
MX_Power
able can be activated with this function
IndraDrive MP03 Base_MP03.lib
block.
MX_ReadParamDINT The function block is used to read a pa‐ IndraDrive Base_MPH02.lib Drive Control
rameter value and return it as DINT. MPH02
IndraDrive MP03 Base_MP03.lib
MX_ReadUnit With the function block it is possible to read IndraDrive MP03 Base_MP03.lib Drive Control /
the unit of a parameter. Parameter
MX_Reset The function block is used to reset drive IndraDrive Base_MPH02.lib Drive Control
errors with the command "S‑0‑0099, MPH02
C0500 Reset class 1 diagnostics".
IndraDrive MP03 Base_MP03.lib
MX_SetDeviceMode The function block is used to switch the IndraDrive Base_MPH02.lib Drive Control
drive to the parameter or operating mode. MPH02
IndraDrive MP03 Base_MP03.lib
MX_SetOpMode The function block is used to directly switch IndraDrive Base_MPH02.lib Drive Control
the operation mode of the drive. MPH02
IndraDrive MP03 Base_MP03.lib
MX_SetControl The function block is used to switch control IndraDrive Base_MPH02.lib Drive Control
between master communication and PLC. MPH02
IndraDrive MP03 Base_MP03.lib
MX_Stop The function block is used to bring the drive IndraDrive MXMo‐ Single Axis Mo‐
to the status STOP. MPH02 tion_MPH02.lib tion
IndraDrive MP03 MXMo‐
tion_MP03.lib
MX_WriteParamDINT The function block is used to write a pa‐ IndraDrive Base_MPH02.lib Drive Control /
rameter. It is possible to write in unbuffered MPH02 Parameter
or buffered form.
IndraDrive MP03 Base_MP03.lib

Fig.1-5: Library Assignment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"

1.3.3 Library Assignment as of the Target "IndraDrive MP04"


Depending on the functional package and the parameterization of
the axis, not all function blocks are operable (see table " Depend‐
ance Between Parameterization of the Axis, Functional Package
and Selected Function Block").
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 13/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

ATAN2 For the conversion of Cartesian coordi‐ IndraDrive MP04 MX_Base.lib Tools
nates P(x;y) into polar coordinates P(r;φ),
IndraDrive MP05
the function is used to determine the angle
φ. IndraDrive MP06
IndraDrive MP07
MB_ChangeCamData The function block supports loading of cam IndraDrive MP06 MX_Base.lib Drive Control /
profiles to the drive parameters intended Parameter
IndraDrive MP07
for this purpose.
MB_ChangeProfileSet The function block is used to apply the data IndraDrive MP05 MX_PLCOpen.li Motion
which describe the set of a motion profile. b
IndraDrive MP06
IndraDrive MP07
MB_ChangeProfile‐ The function block is used to change the IndraDrive MX_PLCOpen.li Motion
Step four parameters which define a segment of MP04V12 b
a motion profile set.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_Command The function block is used to execute, mon‐ IndraDrive MP06 MX_PLCOpen.li Motion
itor and abort commands. b
IndraDrive MP07
MB_GearInPos With the function block it is possible to re‐ IndraDrive MP04 MX_PLCOpen.li Motion
alize a motion of the slave axis which is b
IndraDrive MP05
phase synchronous to the master axis.
IndraDrive MP06
IndraDrive MP07
MB_Home With the function block it is possible to carry IndraDrive MP04 MX_Base.lib Drive Control
out the "drive-controlled homing proce‐
IndraDrive MP05
dure" in the selected axis.
IndraDrive MP06
IndraDrive MP07
MB_MotionProfile The function block realizes an electronic IndraDrive MP04 MX_PLCopen.lib Motion
cam function.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_Phasing The function block allows realizing an off‐ IndraDrive MP04 MX_PLCopen.lib Motion
set to the master axis which is connected
IndraDrive MP05
as input to a synchronization function block
("MC_CamIn" or "MC_GearInPos"). IndraDrive MP06
IndraDrive MP07
MB_PhasingSlave With the function block it is possible to ad‐ IndraDrive MP04 MX_PLCopen.lib Motion
just the slave axis by a position offset.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
14/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MB_PreSetMode With the function block the axis can be pre‐ IndraDrive MP04 MX_Base.lib Drive Control
pared for command triggering before pow‐
IndraDrive MP05
er is switched on (PreSetMode / preselect‐
ing operation modes). IndraDrive MP06
IndraDrive MP07
MB_ReadListParame‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
ter the current value of a list parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_ReadMaxRealVal‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
ue the maximum allowed value of a parame‐ Parameter
IndraDrive MP05
ter. The value is returned in REAL format.
IndraDrive MP06
IndraDrive MP07
MB_ReadMaxValue With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
the maximum allowed value of a parame‐ Parameter
IndraDrive MP05
ter. The value is returned in DINT format.
IndraDrive MP06
IndraDrive MP07
MB_ReadMinRealVal‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
ue the minimum allowed value of a parameter. Parameter
IndraDrive MP05
The value is returned in REAL format.
IndraDrive MP06
IndraDrive MP07
MB_ReadMinValue With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
the minimum allowed value of a parameter. Parameter
IndraDrive MP05
The value is returned in DINT format.
IndraDrive MP06
IndraDrive MP07
MB_ReadName With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
the name of a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_ReadParameter With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
the current value of a parameter. The re‐ Parameter
IndraDrive MP05
turn value is DINT.
IndraDrive MP06
IndraDrive MP07
MB_ReadRealList‐ With the function block it is possible to read IndraDrive MP05 MX_Base.lib Drive Control /
Parameter the current list of a list parameter. Parameter
IndraDrive MP06
IndraDrive MP07
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 15/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MB_ReadRealParame‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
ter the current value of a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_ReadSercosAttri‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
bute the SERCOS attribute of a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_ReadSercosDa‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
taStatus the status of a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_ReadStringPara‐ With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
meter a parameter the operating data of which Parameter
IndraDrive MP05
has the ASCII format (string).
IndraDrive MP06
IndraDrive MP07
MB_ReadUnit With the function block it is possible to read IndraDrive MP04 MX_Base.lib Drive Control /
the unit of a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_SetPositionCon‐ The function block is used to set the posi‐ IndraDrive MP04 MX_Base.lib Drive Control
trolMode tion loop.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_Stop The function block is used to bring the drive IndraDrive MP04 MX_PLCOpen.li Motion
to the status STOP. b
IndraDrive MP05
IndraDrive MP06
MB_WriteListParame‐ With the function block it is possible to write IndraDrive MP04 MX_Base.lib Drive Control /
ter defined values to a list parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MB_WriteParameter With the function block it is possible to write IndraDrive MP04 MX_Base.lib Drive Control /
a defined value to a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
16/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MB_WriteRealList‐ With the function block it is possible to write IndraDrive MP05 MX_Base.lib Drive Control /
Parameter defined values to a list parameter. Parameter
IndraDrive MP06
IndraDrive MP07
MB_WriteRealParame‐ With the function block you can write a de‐ IndraDrive MP04 MX_Base.lib Drive Control /
ter fined REAL value to the parameter belong‐ Parameter
IndraDrive MP05
ing to the parameter number.
IndraDrive MP06
IndraDrive MP07
MB_WriteStringPara‐ With the function block it is possible to write IndraDrive MP04 MX_Base.lib Drive Control /
meter a parameter the operating data of which Parameter
IndraDrive MP05
has the ASCII format (string).
IndraDrive MP06
IndraDrive MP07
MC_CamIn With the function block it is possible to re‐ IndraDrive MP04 MX_PLCOpen.li Motion
alize an electronic cam. b
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_CamOut The function block is used to terminate an IndraDrive MP04 MX_PLCOpen.li Motion
active synchronization function block. b
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_GearIn With the function block it is possible to re‐ IndraDrive MP04 MX_PLCOpen.li Motion
alize a motion of the slave axis which is b
IndraDrive MP05
velocity-synchronous to the master axis.
IndraDrive MP06
IndraDrive MP07
MC_GearOut The function block is used to terminate an IndraDrive MP04 MX_PLCOpen.li Motion
active synchronization function block. b
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_MoveAbsolute The function block is used to move the IndraDrive MP04 MX_PLCOpen.li Motion
drive to a preset absolute position. b
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_MoveAdditive The function block is used to move the IndraDrive MP04 MX_PLCOpen.li Motion
drive in relative form by a distance in addi‐ b
IndraDrive MP05
tion to the target position.
IndraDrive MP06
IndraDrive MP07
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 17/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MC_MoveRelative The function block is used to move the IndraDrive MP04 MX_PLCOpen.li Motion
drive in relative form by a distance, starting b
IndraDrive MP05
from the current actual position.
IndraDrive MP06
IndraDrive MP07
MC_MoveVelocity The function block is used to preset a ve‐ IndraDrive MP04 MX_PLCOpen.li Motion
locity for the drive. b
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_Power When the internal PLC has permanent or IndraDrive MP04 MX_Base.lib Drive Control
temporary control over the drive, drive en‐
IndraDrive MP05
able can be activated with this function
block. IndraDrive MP06
IndraDrive MP07
MC_ReadStatus The function block reads the current status IndraDrive MP04 MX_Base.lib Drive Control
of the axis and outputs it in decoded form.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_Reset The function block is used to reset drive IndraDrive MP04 MX_Base.lib Drive Control
errors with the command "S‑0‑0099,
IndraDrive MP05
C0500 Reset class 1 diagnostics".
IndraDrive MP06
IndraDrive MP07
MC_Stop The function block is used to bring the drive IndraDrive MP04 MX_PLCopen.lib Motion
to the status STOP.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MC_TorqueControl The function block is used to activate the IndraDrive MP05 MX_PLCopen.lib Motion
operation mode "torque/force control"; the
IndraDrive MP06
drive follows the command value input.
IndraDrive MP07
MX_Command The function block is used to execute a IndraDrive MP04 MX_Base.lib Drive Control
drive command.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_fCheckCmdRe‐ The firmware function is used to return the IndraDrive MP04 MX_Base.lib Drive Control /
quest command input which was preset via the Parameter
IndraDrive MP05
drive parameter "P‑0‑1449, C4900 PLC
command". IndraDrive MP06
IndraDrive MP07
18/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MX_fDINT_AccTo_RE‐ The firmware function converts an accel‐ IndraDrive MP04 MX_Base.lib Scaling
AL eration value in the fixed point format of
IndraDrive MP05
data type DINT into a REAL value, accord‐
ing to the scaling which has been set. IndraDrive MP06
IndraDrive MP07
MX_fDINT_DistTo_RE‐ The firmware function converts a position IndraDrive MP04 MX_Base.lib Scaling
AL value in the fixed point format of data type
IndraDrive MP05
DINT into a REAL value, according to the
scaling which has been set. IndraDrive MP06
IndraDrive MP07
MX_fDINT_VelTo_RE‐ The firmware function converts a velocity IndraDrive MP04 MX_Base.lib Scaling
AL value in the fixed point format of data type
IndraDrive MP05
DINT into a REAL value, according to the
scaling which has been set. IndraDrive MP06
IndraDrive MP07
MX_fGetDriveWarning The firmware function allows polling IndraDrive MP04 MX_Base.lib Drive Control /
whether a certain warning diagnosis is ac‐ Diagnostic
IndraDrive MP05
tive in the drive.
IndraDrive MP06
IndraDrive MP07
MX_fGetFreeTicks The function is used to determine the time IndraDrive MP04 MX_Base.lib Tools
of the last PLC time slice still available to
IndraDrive MP05
the PLC. This PLC time slice is that part of
a millisecond which remains after the drive IndraDrive MP06
controller and control tasks have been pro‐
cessed. IndraDrive MP07

MX_fGetHighResTime The function returns a growing timer value IndraDrive MP04 MX_Base.lib Tools
with high resolution.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_fHighResTimer‐ The function is used to convert timer ticks IndraDrive MP04 MX_Base.lib Tools
Ticks_to_us into microseconds and return the value as
IndraDrive MP05
REAL.
IndraDrive MP06
IndraDrive MP07
MX_fReadParamDINT The firmware function is used to read a pa‐ IndraDrive MP04 MX_Base.lib Drive Control /
rameter value and return it as DINT. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_fReadStringParam With the firmware function it is possible to IndraDrive MP04 MX_Base.lib Drive Control /
read a parameter the operating data of Parameter
IndraDrive MP05
which has the ASCII format (string).
IndraDrive MP06
IndraDrive MP07
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 19/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MX_fREAL_Ac‐ The firmware function converts an accel‐ IndraDrive MP04 MX_Base.lib Scaling
cTo_DINT eration value in the REAL format into a
IndraDrive MP05
fixed-point DINT value, according to the
scaling which has been set. IndraDrive MP06
IndraDrive MP07
MX_fREAL_Dis‐ The firmware function converts a position IndraDrive MP04 MX_Base.lib Scaling
tTo_DINT value in the REAL format into a fixed-point
IndraDrive MP05
DINT value, according to the scaling which
has been set. IndraDrive MP06
IndraDrive MP07
MX_fSetDriveError The firmware function triggers an error di‐ IndraDrive MP04 MX_Base.lib Drive Control /
agnosis in the drive. Diagnostic
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_fSetDriveWarning The firmware function is used to set or clear IndraDrive MP04 MX_Base.lib Drive Control /
a warning diagnosis in the drive. Diagnostic
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_fSetParamLimits With the firmware function it is possible to IndraDrive MP05 MX_Base.lib Drive Control /
set the limit values of the Global Register Parameter
IndraDrive MP06
PLC parameters.
IndraDrive MP07
MX_fSetParamName With the firmware function it is possible to IndraDrive MP05 MX_Base.lib Drive Control /
set the names of the Global Register PLC Parameter
IndraDrive MP06
parameters.
IndraDrive MP07
MX_fSetParamUnit With the firmware function it is possible to IndraDrive MP05 MX_Base.lib Drive Control /
set the limit values of the Global Register Parameter
IndraDrive MP06
PLC parameters.
IndraDrive MP07
MX_fSysComStatus With the firmware function it is possible to IndraDrive MP05 MX_SysLib‐ Function blocks
poll the status of the opened port. Com.lib
IndraDrive MP06
IndraDrive MP07
MX_fREAL_TorqueR‐ The firmware function converts a torque/ IndraDrive MP05 MX_Base.lib Scaling
ampTo_DINT force ramp value in the REAL format into a
IndraDrive MP06
fixed-point DINT value, according to the
scaling which has been set. IndraDrive MP07
MX_fREAL_Torque‐ The firmware function converts a torque/ IndraDrive MP05 MX_Base.lib Scaling
To_DINT force value in the REAL format into a fixed-
IndraDrive MP06
point DINT value, according to the scaling
which has been set. IndraDrive MP07
20/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MX_fREAL_Vel‐ The firmware function converts a velocity IndraDrive MP04 MX_Base.lib Scaling
To_DINT value in the REAL format into a fixed-point
IndraDrive MP05
DINT value, according to the scaling which
has been set. IndraDrive MP06
IndraDrive MP07
MX_fWriteParamDINT The firmware function is used to write data IndraDrive MP04 MX_Base.lib Drive Control /
to a parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_fWriteStringParam The firmware function is used to write data IndraDrive MP04 MX_Base.lib Drive Control /
to a text parameter. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_IECTaskGetLoad The function block is used to activate the IndraDrive MP05 MX_Base.lib Tools
extended runtime measurement and dis‐
IndraDrive MP06
plays information on the task load.
IndraDrive MP07
MX_MoveAbsolute The function block is used to move the IndraDrive MP04 MX_PLCOpen.li Motion
drive to a preset absolute position. b
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_MoveAdditive The function block is used to move the IndraDrive MP04 MX_PLCOpen.li Motion
drive in relative form by a distance in addi‐ b
IndraDrive MP05
tion to the target position.
IndraDrive MP06
IndraDrive MP07
MX_MoveRelative The function block is used to move the IndraDrive MP04 MX_PLCOpen.li Motion
drive in relative form by a distance, starting b
IndraDrive MP05
from the current actual position.
IndraDrive MP06
IndraDrive MP07
MX_SysComOpenA‐ The firmware function block is used to IndraDrive MP05 MX_SysLib‐ Function blocks
sync asynchronously open the communication Com.lib
IndraDrive MP06
channel of a serial interface.
IndraDrive MP07
MX_ReadParamDINT The function block is used to read a pa‐ IndraDrive MP04 MX_Base.lib Drive Control /
rameter value and return it as DINT. Parameter
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 21/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range


MX_SetCmdState With the firmware function block it is pos‐ IndraDrive MP04 MX_Base.lib Drive Control /
sible to set the command status of Parameter
IndraDrive MP05
"P‑0‑1449, C4900 PLC command".
IndraDrive MP06
IndraDrive MP07
MX_SetDeviceMode The function block is used to switch the IndraDrive MP04 MX_Base.lib Drive Control
drive to the parameter or operating mode.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_SetControl The function block is used to switch control IndraDrive MP04 MX_Base.lib Drive Control
between master communication and PLC.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_SetOpMode The function block is used to directly switch IndraDrive MP04 MX_Base.lib Drive Control
the operation mode of the drive.
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07
MX_WriteParamDINT The function block is used to write a pa‐ IndraDrive MP04 MX_Base.lib Drive Control /
rameter. It is possible to write in unbuffered Parameter
IndraDrive MP05
or buffered form.
IndraDrive MP06
IndraDrive MP07
SysComClose The firmware function is used to close the IndraDrive MP05 MX_SysLib‐ Function blocks
communication channel of a serial inter‐ Com.lib
IndraDrive MP06
face (COM Port).
IndraDrive MP07
SysComOpen The firmware function is used to open the IndraDrive MP05 MX_SysLib‐ Function blocks
communication channel of a serial inter‐ Com.lib
IndraDrive MP06
face.
IndraDrive MP07
SysComRead The firmware function is used to read data IndraDrive MP05 MX_SysLib‐ Function blocks
from the serial interface. Com.lib
IndraDrive MP06
IndraDrive MP07
SysComWrite The firmware function is used to write data IndraDrive MP05 MX_SysLib‐ Function blocks
to the serial interface. Com.lib
IndraDrive MP06
IndraDrive MP07

Fig.1-6: Library Assignment as of the Target "IndraDrive MP04"


22/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1.4 Signal Time Diagrams of Most Frequently Used Inputs and


Outputs
Function blocks according to PLCopen use input and output signals with fixed
functions.
Input Signals "Execute" / "Enable" To trigger the processing of a function block or to activate it, a function block
has an "Execute" input, an "ExecuteLock" input or an "Enable" input. All three
inputs are of the BOOL type.
The activation input "Execute" is used at function blocks which work in edge-
controlled form. With a positive edge of "Execute", the input variables are
collected and at the same time the command triggering of a one-time execution
of the function block takes place. The outputs "Done" or "InVelocity", "InTor‐
que", "In_xxxx" depend on the input. New input values only take effect via the
repeated positive edge of "Execute". When command triggering has not yet
been completed and is interrupted, this is signaled by the fact that output
"CommandAborded" is set.

Retriggering is possible for edge-controlled function blocks with


"Execute" input; this means that when the activation input, with ac‐
tive function block, gets a repeated edge, the old task is rejected,
the inputs are applied again and the new task is continued with the
new values.

The activation input "ExecuteLock" behaves like the "Execute" input. But as
long as this input in TRUE, the function block cannot be interrupted. Exception:
The function block "MC_Stop" can interrupt the function block "MB_Stop".
The activation input "Enable" is used at function blocks which work in status-
controlled form. The input variables are applied with the positive edge of
"Enable". New input values only take effect via the repeated positive edge of
"Enable". If the input variables are cyclically transmitted (e.g. with process loop
function blocks), this has to be explicitly documented and marked at the function
block input.
Output Signal "Active" For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command (positive edge at "Execute", "ExecuteLock" or "Ena‐
ble").

The "Active" signal can be delayed at the start of the function block,
as possibly required pre-processing has not been completed.

"Active" becomes FALSE, when "Done", "CommandAborted" or "Error" be‐


come TRUE. For status-controlled function blocks, "Active" becomes FALSE
when "Enable" is reset.

For single axes, "Active" is not set!


Output Signal "Done" Function blocks which have an administrative task ("MC_Power", ...) or motion
function blocks (such as "MC_MoveAbsolute", "MC_MoveRelative", ...) which
end in the "standstill" state, signal via the "Done" output that their task has been
completed and are no longer active after they have been executed; in other
words: The "Done" output signals that a function block has successfully com‐
pleted its task and possibly provided data are valid.
For edge-controlled function blocks, "Done" remains TRUE for one cycle when
the "Execute" input had been FALSE at the point of time at which "Done" was
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 23/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

set to TRUE. If the input "Execute"=TRUE when "Done" is set, "Done" remains
TRUE until "Execute" is set to FALSE.
For status-controlled function blocks, when "Enable"=TRUE, "Done" after suc‐
cessful processing remains TRUE for exactly one cycle before processing
starts again.
24/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

① Status-controlled function block processing successfully completed


② Status-controlled function block processing aborted with error
③ Status-controlled function block processing has been interrupted
Fig.1-7: Signal-Time Behavior of Status-Controlled Function Blocks (With "En‐
able" Input); for Single Axes, the "Active" Output is not Set!
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 25/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

① Edge-controlled function block processing successfully completed


② Edge-controlled function block processing aborted with error
③ Edge-controlled function block processing has been interrupted
Fig.1-8: Signal-Time Behavior of Edge-Controlled Function Blocks (With "Exe‐
cute" Input); for Single Axes, the "Active" Output is not Set!
26/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

There are function blocks (such as "MC_MoveVelocity", "MC_CamIn",


"MC_GearIn", "MC_GearInPos", "MC_TorqueControl", "MB_MotionProfile")
which continue their motion or force activity after their task has been fulfilled
and which are aborted only by "MC_Stop" or another function block being
called. They signal this status by remaining "Active"; i.e. "Active" and, for ex‐
ample, "InVelocity", "InGear" etc. are at the same time TRUE.

①+② Edge-controlled function block processing has been interrupted


Fig.1-9: Signal-Time Behavior of Edge-Controlled Function Blocks (with "Exe‐
cute" Input); "Active" in Combination With "InVelocity"
Output Signal "CommandAborted" The "CommandAborted" output signals that the function block could not com‐
plete its task, because it had ben interrupted (e.g. by another function block).
For edge-controlled function blocks, the "CommandAborted" output remains
TRUE for one cycle when the "Execute" input had been FALSE at the point of
time at which "CommandAborted" was set to TRUE. If the input "Exe‐
cute"=TRUE when "CommandAborted" is set, "CommandAborted" remains
TRUE until "Execute" is set to FALSE.
For status-controlled function blocks, the "CommandAborted" output is reset
when the "Enable" input is reset.

1.5 Error Handling


1.5.1 General Information
According to their target, the function blocks have two or three outputs which
contain information in case an error occurs:
● "Error",
● "ErrorID" and
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 27/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● "ErrorIdent" (as of the target "IndraDrive MP03")


Error If the processing of a task could not be successfully completed, this is signaled
by the "Error" output. The "Error" output is reset with the inputs "Exe‐
cute"=FALSE or "Enable"=FALSE; an additional reset input therefore is not
required.
For edge-controlled function blocks, the output "Error" remains TRUE for one
cycle when the input "Execute" had been FALSE at the point of time at which
the output "Error" was set to TRUE. If the input "Execute"=TRUE when "Error"
is set, the output "Error" remains TRUE until the input "Execute" is set to FALSE.
For status-controlled function blocks, the output "Error" remains TRUE until the
input "Enable" is set to FALSE.
ErrorID The output "ErrorID" is of the type ERROR_CODE. When an error has occurred
at the function block, the error classification can be seen at output "ErrorID".

The output values of "ErrorID" have to be interpreted differently ac‐


cording to the respective target!

The type ERROR_CODE has been defined in the "CommonTypes" library of


the respective target.
ErrorIdent The output "ErrorIdent" signals the exact cause of the error.

The output "ErrorIdent" is available as of the target


"IndraDrive MP03".

"ErrorIdent" is of the type ERROR_STRUCT. ERROR_STRUCT contains the


following elements:
● "Table",
● "Additional1" and
● "Additional2".

The structure and its elements have been defined in the "Common‐
Types" library of the target.

Element Element data type Description

Table ERROR_TABLE The value of the "Table" element contains the information as to which error table
[(INDRV_TABLE, SERCOS_TABLE or MLDS_TABLE (as of target
"IndraDrive MP03") or MLD_TABLE (as of target "IndraDrive MP04")] has to be used
to decode the error code of element "Additional1"
Additional1 DWORD The element "Additional1" contains the error code for exact specification of the occur‐
red error
Additional2 DWORD "Additional2" contains additional information (if available)

Fig.1-10: Elements of ERROR_STRUCT


28/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1.5.2 Error Reference Lists for Function Blocks as of Target "IndraDrive


MP03"
When monitoring in IndraLogic, you can select via the right mouse
key whether binary data types (BYTE, WORD, DWORD) are to be
displayed in a decimal, hexadecimal or binary form. The activated
selection is marked with a dot.

MLDS_TABLE / MLD_TABLE At the output "ErrorIdent", the element "Table" refers to the error table
"MLDS_TABLE" for the target "IndraDrive MP03"; as of the target
"IndraDrive MP04" it refers to the error table "MLD_TABLE". (Only the name
has changed, the contents are identical.)

When there isn't any error present, the element "Table" has the
value "NO_TABLE_USED"

"ErrorID" "ErrorIdent", Ele‐ "ErrorIdent", Ele‐ Description


ment "Addition‐ ment "Addition‐
al1" (hexadeci‐ al2"
mal)

- 16#00000000 Transmitted axis When there isn't any error present, the element "Ta‐
number ble" has the value "NO_TABLE_USED"
INPUT_INVALID_ERROR 16#00000001 Transmitted axis As of target "IndraDrive MPx04", version 12: Selected
number function is not available for this axis
RESOURCE_ERROR 16#00000001 Transmitted axis Invalid axis reference / undefined axis.
number As of target "IndraDrive MP04": Indicated axis (also
slave axis) is not available
ACCESS_ERROR 16#00000002 Transmitted axis The function block used may only have one instance
number in the system (e.g.: "MX_SynchronControl")
STATE_MACHINE_ERROR 16#00000003 Transmitted axis Drive is not in operating status "bb" / communication
number phase 4
‑ or ‑
With master axis available, this axis has not been ac‐
tivated (P‑0‑0917, Control word of master axis gener‐
ator)
STATE_MACHINE_ERROR 16#00000004 Transmitted axis Drive is not in operating status "Ab"
number
ACCESS_ERROR 16#00000005 Transmitted axis MLD has neither permanent (P-0-1367) nor temporary
number control over the indicated (local) axis
STATE_MACHINE_ERROR 16#00000006 Transmitted axis Drive is torque-free / not under torque. Drive was
number switched off externally
RESOURCE_ERROR 16#00000007 Transmitted axis Function block not possible with current functional
number package / current control type (see table " Depend‐
ance Between Parameterization of the Axis, Function‐
al Package and Selected Function Block").
INPUT_RANGE_ERROR 16#00000008 Transmitted axis Only up to target "IndraDrive MP03": The velocity
number transmitted at "Velocity" input is "0"
INPUT_RANGE_ERROR 16#00000009 Transmitted axis Only up to target "IndraDrive MP03": Parameterized
number acceleration (positioning acceleration) is "0"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 29/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ "ErrorIdent", Ele‐ Description


ment "Addition‐ ment "Addition‐
al1" (hexadeci‐ al2"
mal)
INPUT_RANGE_ERROR 16#00000009 Transmitted axis Only up to target "IndraDrive MP03": The acceleration
number transmitted at "Acceleration" input is "0"
INPUT_RANGE_ERROR 16#00000010 Transmitted axis Only up to target "IndraDrive MP03": The deceleration
number transmitted at "Deceleration" input is "0"
STATE_MACHINE_ERROR 16#00000011 Transmitted axis As of target "IndraDrive MPx04": After the activation
number with "MB_PreSetMode" there was an attempt to switch
on with "MC_Power" without motion command trigger‐
ing
STATE_MACHINE_ERROR 16#00000012 Transmitted axis An instance of "MB_Stop" tries to command an axis
number while an instance of "MC_Stop" is active
INPUT_RANGE_ERROR 16#00000013 Transmitted axis As of target "IndraDrive MPx04": The "CamTableID"
number input is not within the valid range (1 .. 8)
STATE_MACHINE_ERROR 16#00000014 Transmitted axis MLD is in "ErrorStop" state.
number Remedy: Execute "MC_Reset"
STATE_MACHINE_ERROR 16#00000015 Transmitted axis As of MPx05V14.
number Activation of "MC_Power". The enable signal "Driv‐
eEnable" in the axis control word (P-0-0116, bit14) is
missing
ACCESS_ERROR 16#00000016 Transmitted axis MLD in slave axis has permanent control. Therefore,
number the MLD-M master cannot control the slave
ACCESS_ERROR 16#00000020 As of target Several tasks use the same instance of a function
"IndraDrive MP0 block, this is not allowed
4": Index of the
second task
STATE_MACHINE_ERROR 16#00000021 Transmitted axis An additive motion command was started which is not
number allowed in this axis status
OTHER_ERROR 16#00000199 Transmitted axis Internal processing error (undefined status)
number
ACCESS_ERROR 16#00000200 Parameter IDN Internal error: Undefined parameter data format, pa‐
rameter cannot be converted into FLOAT
ACCESS_ERROR 16#00000201 Parameter IDN With this function block it is impossible to read/write an
ASCII parameter
ACCESS_ERROR 16#00000202 Parameter IDN With this function block it is impossible to read/write a
list parameter
INPUT_INVALID_ERROR 16#00000203 Parameter IDN Parameter IDN does not belong to any command
OTHER_ERROR 16#00000204 Transmitted axis Internal processing error (string too short)
number
ACCESS_ERROR 16#00000205 Parameter IDN As of target "IndraDrive MPx04": The required number
of bytes is smaller than the actual length of the list
INPUT_INVALID_ERROR 16#00000206 Transmitted axis As of target "IndraDrive MPx04": Invalid pointer at the
number input of the function block (address of the applied array
is outside of the PLC range)
30/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ "ErrorIdent", Ele‐ Description


ment "Addition‐ ment "Addition‐
al1" (hexadeci‐ al2"
mal)
ACCESS_ERROR 16#00000207 Parameter IDN With this function block it is only possible to process
ASCII parameters
CCD_ERROR 16#00000208 16#00000200 Too many simultaneous read/write tasks on remote
axes
SYSTEM_ERROR 16#00000208 Transmitted axis Internal CCD system error; error number see "Addi‐
number tional2"
SYSTEM_ERROR 16#00000209 Transmitted axis Internal CoSeMa system error; error number see "Ad‐
number ditional2"
ACCESS_ERROR 16#00000210 99 Reset command S‑0‑0099 incorrectly executed
ACCESS_ERROR 16#00000211 Transmitted axis "MC_Reset" cannot reset the error (timeout)
number
RESOURCE_ERROR 16#00000220 Transmitted axis No external encoder available
number
RESOURCE_ERROR 16#00000250 Transmitted axis Master communication synchronizes the drive
number
RESOURCE_ERROR 16#00000251 Transmitted axis NC cycle time (S-0-0001) does not match MLD task
number cycle time
INPUT_RANGE_ERROR 16#00000252 Transmitted axis The "CmdDelay" input is greater than the maximum
number value
RESOURCE_ERROR 16#00000253 Transmitted axis The real-time channel may only use one MLD task
number
RESOURCE_ERROR 16#00000254 Transmitted axis Too many real-time variables used.
number At present, there are 4 RTcW_ variables and 4 RTcR_
variables allowed
CALCULATION_ERROR 16#00000255 Transmitted axis Internal error (variable offset too great)
number
CALCULATION_ERROR 16#00000256 Transmitted axis Internal error (incorrect variable access)
number
RESOURCE_ERROR 16#00000257 Transmitted axis As of target "IndraDrive MPx04": Real-time channel
number actual values but no command values defined
ACCESS_ERROR 16#00000258 Transmitted axis Synchronous motion task (CCD / master communica‐
number tion) of the type "triggered by external event" does not
support local real-time channel
ACCESS_ERROR 16#00000259 Transmitted axis The local real-time channel has not been configured
number for the task
ACCESS_ERROR 16#00000300 Transmitted axis MLD already has permanent control. Additionally
number switching to temporary control does not make sense
ACCESS_ERROR 16#00000301 Transmitted axis Temporary control is impossible with virtual slave
number
ACCESS_ERROR 16#00000302 Transmitted axis Manual mode active, temporary control impossible
number
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 31/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ "ErrorIdent", Ele‐ Description


ment "Addition‐ ment "Addition‐
al1" (hexadeci‐ al2"
mal)
STATE_MACHINE_ERROR 16#00000320 Transmitted axis Master communication internally synchronizes the
number drive / does not allow phase switch (P‑0‑4086, bit 0=0)
STATE_MACHINE_ERROR 16#00000321 Transmitted axis As of target "IndraDrive MPx04": Drive initialization not
number yet completed (incl. reaching of target phase)
In the case of master communication with analog or
parallel interface, it is necessary to wait until the auto‐
matic phase switch to "P4" is over. When a transition
command error occurs during this first phase switch,
you have to wait for 10 s; only then is it allowed to input
the phase with the function block "MX_SetDevice‐
Mode"
ACCESS_ERROR 16#00000322 Transmitted axis A transition command was started or cleared from a
number different device
DEVICE_ERROR 16#00000350 Transmitted axis Unknown secondary operation mode ("NewOp‐
number Mode">7 was set)
RESSOURCE_ERROR 16#00000355 Transmitted axis Axis applied at the "Master" input is not a valid master
number axis
INPUT_RANGE_ERROR 16#00000370 Incorrect As of target "IndraDrive MPx04": Invalid "CmdState"
"CmdState" input (wrong enum value)
INPUT_RANGE_ERROR 16#00000371 Incorrect As of target "IndraDrive MPx04": "CmdState" not al‐
"CmdState" lowed, e.g. "CmdState"="MX_CMD_NO_ACTIVE"
while "P‑0‑1449, C4900 PLC command"="3"
INPUT_RANGE_ERROR 16#00000380 Incorrect diag‐ As of target "IndraDrive MPx04": Invalid input of diag‐
nostic message nostic message number (N<1 or N>4)
number
ACCESS_ERROR 16#00000400 Parameter IDN The indicated parameter cannot be read / written with
this function block. For example, parameter of data
type HEX or BIN with "MB_WriteRealParameter"
ACCESS_ERROR 16#00000401 Parameter IDN With this function block it is impossible to read/write a
FLOAT parameter.
PLC registers (e.g. P-0-1370) can be configured as
FLOAT.
INPUT_RANGE_ERROR 16#00000402 Transmitted axis The applied parameter value does not fit in the data
number format of the parameter
INPUT_INVALID_ERROR 16#00000403 Transmitted axis For the function block "MB_ReadListParameter" or
number "MB_WriteListParameter", the address applied at the
"ValueAdr" input is not WORD-compatible (2Byte); i.e.
the address cannot be divided by 2.
INPUT_INVALID_ERROR 16#00000404 Transmitted axis For the function block "MB_ReadListParameter" or
number "MB_WriteListParameter", the address applied at the
"ValueAdr" input is not DWORD-compatible (4Byte);
i.e. the address cannot be divided by 4.
32/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ "ErrorIdent", Ele‐ Description


ment "Addition‐ ment "Addition‐
al1" (hexadeci‐ al2"
mal)
INPUT_INVALID_ERROR 16#00000405 Transmitted axis Only up to MPx05V08:
number For the function block "MB_ReadListParameter" or
"MB_WriteListParameter", the address applied at the
"ValueAdr" input is not byte-compatible (1Byte); i.e.
the address is odd.
ACCESS_ERROR 16#00000420 Transmitted axis A deactivated axis was addressed.
number
ACCESS_ERROR 16#00000421 Transmitted axis The service channel is not available, because a phase
number switch (PM→OM) is taking place just now.
ACCESS_ERROR 16#00000422 Transmitted axis The service channel is no longer available (phase < 2).
number
ACCESS_ERROR 16#00000423 Transmitted axis Double address assignment. At least 2 axes have the
number same SERCOS address.
SYSTEM_ERROR 16#00000424 Transmitted axis Queue error. Too many tasks were transmitted to an
number axis.
INPUT_RANGE_ERROR 16#00000500 Transmitted port As of target "IndraDrive MPx05": A value for
"Port"<>"COM1" was transmitted
ACCESS_ERROR 16#00000501 Transmitted port COM1 has already been opened

Fig.1-11: Error Table MLDS_TABLE / MLD_TABLE


P-0-2003 P-0-0045, P-0-0075 Positioning block mode Torque/force control Velocity synchroniza‐ Position synchroniza‐
bit 14/15 tion tion
(1) (3) (MX_MoveRelative / (MC_TorqueControl)
(2) MC_MoveRelative, (Phase synchroniza‐
(MC_GearIn)
MX_MoveAbsolute / tion, electronic cam,
MC_MoveAbsolute, MotionProfile:
MX_MoveAdditive / MC_CamIn,
MC_MoveAdditive, MB_GearInPos,
MB_Jog) MB_MotionProfile)
0x - -
0000 - - -
0001 -
0x - -
0000 - - + -
0021
0x 0b00 - + + - -
0000 0b01 - - - - -
0002
0b10 + - - -
0b11 0 - - - -
>0 + - - -
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 33/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

P-0-2003 P-0-0045, P-0-0075 Positioning block mode Torque/force control Velocity synchroniza‐ Position synchroniza‐
bit 14/15 tion tion
(1) (3) (MX_MoveRelative / (MC_TorqueControl)
(2) MC_MoveRelative, (Phase synchroniza‐
(MC_GearIn)
MX_MoveAbsolute / tion, electronic cam,
MC_MoveAbsolute, MotionProfile:
MX_MoveAdditive / MC_CamIn,
MC_MoveAdditive, MB_GearInPos,
MB_Jog) MB_MotionProfile)
0x 0b00 - + + + +
0000 0b01 - - - + -
0022
0b10 - + - + +
0b11 0 - - + -
>0 + - + +

- Function block is not operable


+ Function block is operable
1 P-0-2003, Selection of functional packages
2 P-0-0045, Control word of current controller
3 "P-0-0075, Encoder type 2 (optional encoder)"; is only evaluated as of
the following firmwares: MPx06V14, MPx07V10, MPx17
Fig.1-12: Dependance Between Parameterization of the Axis, Functional Pack‐
age and Selected Function Block
SERCOS_TABLE

Error code Explanation


Hexadecimal Decimal

0x1001 4097 No IDN


0x1009 4105 Invalid access to element 1
0x2001 8193 No name
0x2002 8194 Name transmission too short
0x2003 8195 Name transmission too long
0x2004 8196 Name cannot be changed (read only)
0x2005 8197 Name is write-protected at this time
0x3002 12290 Attribute transmission too short
0x3003 12291 Attribute transmission too long
0x3004 12292 Attribute cannot be changed (read only)
0x3005 12293 Attribute is write-protected at this time
0x4001 16385 No units
0x4002 16386 Unit transmission too short
0x4003 16387 Unit transmission too long
0x4004 16388 Unit cannot be changed (read only)
0x4005 16389 Unit is write-protected at this time
0x5001 20481 No minimum input value
0x5002 20482 Minimum input value transmission too short
0x5003 20483 Minimum input value transmission too long
0x5004 20484 Minimum input value cannot be changed (read only)
34/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Error code Explanation


Hexadecimal Decimal
0x5005 20485 Minimum input value is write-protected at this time
0x6001 24577 No maximum input value
0x6002 24578 Maximum input value transmission too short
0x6003 24579 Maximum input value transmission too long
0x6004 24580 Maximum input value cannot be changed (read only)
0x6005 24581 Maximum input value is write-protected at this time
0x7002 28674 Operation data transmission too short
0x7003 28675 Operation data transmission too long
0x7004 28676 Operation data cannot be changed (read only)
0x7005 28677 Operation data is write-protected at this time (reason: communication phase or mode)
0x7006 28678 Operation data is smaller than the minimum input value
0x7007 28679 Operation data is greater than the maximum input value
0x7008 28680 Invalid operation data (e.g. IDN not supported, invalid bit number, invalid bit combi‐
nation, invalid list length)
0x7009 28681 Operation data write protected by a password
0x700A 28682 Operation data is write protected, it is configured cyclically (IDN is configured in the
MDT or AT. Therefore writing via the service channel is not allowed).
0x700B 28683 Invalid indirect addressing (e.g., data container, list handling)
0x700C 28684 Operation data is write protected, due to other settings (e.g., parameter, operation
mode, drive enable, drive on etc.)
0x7010 28688 Procedure command already active
0x7011 28689 Procedure command not interruptible
0x7012 28690 Procedure command at this time not executable
(e.g., in this phase the procedure command cannot be activated)
0x7013 28691 Procedure command not executable (invalid or false parameters)

Fig.1-13: SERCOS Error Codes


INDRV_TABLE
"INDRV_TABLE" actually is not a table, but refers to the documen‐
tation "Troubleshooting Guide"; in this documentation, the error
number (diagnostic message number) provides information on
cause and remedy.

1.6 Data Types


1.6.1 General Data Types
Data type Bit size Description

BOOL 1 Bit values "true" or "false"


BYTE 8 Byte value 0 to 255
WORD 16 Word value 0 to 65535
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 35/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Data type Bit size Description


DWORD 32 Double word values 0 to (2^32)–1
CHAR 8 ASCII code
INT 16 Integer (16 bits) from ‑32768 to +32767
DINT 32 Integer (32 bits) from –2^31 to (2^31)–1
REAL 32 IEEE floating point number
TIME 32 IEC time in intervals of 1 ms
DATE 32 IEC date in intervals of 1 day
TIME_OF_DAY, 32 Time in steps of 1ms: hour (0‑23), min. (0‑59), second
TOD (0‑59), ms (0‑999)

Fig.1-14: General Data Types

1.6.2 Selected Data Types of "MX_Base.lib"


MB_IDN
The "MB_IDN" data type was introduced with the target "IndraDrive MP06".
It is a data type used to address parameters in accordance with SERCOS III.
For IndraMotion MLD, "MB_IDN" corresponds to the "DINT" data type in
SERCOS III coding; i.e. users normally still use the FP constants. If they had
used their own "DINT" variables for addressing, they can change them to
"MB_IDN", but do not have to do so.

The term "EIDN" for "Extended Ident Number" is often used in con‐
junction with SERCOS III coding.

The following syntaxes apply to EIDN:


● For addressing the parameters at function blocks (FP constants) (exam‐
ple): FP_S_0_1101_000_001 for S-0-1101.0.1
● For addressing direct variables (example): DV_S_0_1101_000_001 for
S-0-1101.0.1
● For addressing real-time variables (example):
RtcR_S_0_1101_000_001 for S-0-1101.0.1

1.7 AnalyzationNew.lib
The library "AnalyzationNew.lib" is supported as of the target "IndraDrive
MPH02". It contains function blocks for the analysis of expressions.
The library is supported by several targets; it is described in the IndraLogic help
under "AnalyzationNew.lib".

1.8 Iecsfc.lib
The library "Iecsfc.lib" is supported as of the target "IndraDrive MPH02". It
makes available IEC steps conforming to standard in sequential language ["Se‐
quential Function Chart" (SFC)].
The library is supported by several targets.
36/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1.9 MX_PLCopen.lib
1.9.1 General Information
The following libraries contain IEC function blocks for drive control:

Target Library

IndraDrive MPH02 MXMotion_MPH02.lib


IndraDrive MP03 MXMotion_MP03.lib
IndraDrive MP04 MX_PLCopen.lib
IndraDrive MP05 MX_PLCopen.lib
IndraDrive MP06 MX_PLCopen.lib
IndraDrive MP07 MX_PLCopen.lib

Fig.1-15: Library Names Depending on the Targets


General Properties ● Positioning function blocks have no input for "jerk"
● Function blocks have "AXIS_REF" as "VAR_IN_OUT"
● Up to MPx03: Positions and distances are transmitted as 32-bit integer
(initial value - fixed point).
As of MPx04: Positions and distances are transmitted as REAL (floating
point).

"ErrorID" "ErrorIdent", Ele‐ Description


ment "Addition‐
al1"

ACCESS_ERROR 16#00000006 Drive is torque-free / not under torque


RESOURCE_ERROR 16#00000007 Activated functional package does not support the selected operation
mode (see "P‑0‑2003, Selection of functional packages")
‑ or ‑
The axis is operated without encoder (see "P‑0‑0045, Control word of
current controller")

Fig.1-16: Generally Valid Errors of Motion Function Blocks, Taken From Error
Table MLDS_TABLE / MLD_TABLE for Function Blocks as of Target
"IndraDrive MP03"

1.9.2 Overview of the Function Blocks


● MB_ChangeProfileSet *3

● MB_ChangeProfileStep *1
● MB_Command*4
● MB_GearInPos*1
● MB_MotionProfile *1
● MB_Phasing *1
● MB_PhasingSlave *1
● MB_Stop *1
● MC_CamIn *1
● MC_CamOut*1
● MC_GearIn *1
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 37/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● MC_GearOut *1
● MC_MoveAbsolute *1
● MC_MoveAdditive *1
● MC_MoveRelative *1
● MC_MoveVelocity *1
● MC_Stop *1
● MC_TorqueControl *3
● MX_MoveAbsolute
● MX_MoveAdditive
● MX_MoveRelative
● MX_MoveVelocity
● MX_Stop*2
*1: Available as of target "IndraDrive MP04"
*2: Available up to target "IndraDrive MP03"
*3: Available as of target "IndraDrive MP05"
*4: Available as of target "IndraDrive MP06"

1.9.3 Function Blocks


MB_ChangeProfileSet
In the case of a positive edge at "Execute", those data are applied which de‐
scribe the set of a motion profile. The data include
● the number of motion steps
● the master axis velocity, as well as the lists for
– master axis initial position,
– distance,
– slave axis velocity and
– mode.
For the lists, you have to indicate the initial address of an array in which the
data are contained.

The number of elements in each of the 4 lists must be at least as


high as the indicated number of motion steps.

"SetNumber" defines which set is changed.


The units of the data contained in the lists for "Distance" and "SlaveAxisVeloc‐
ity" are defined by the scaling parameters of the axis (S-0-0076, S-0-0044).
The output "Done" is set when the set was completely transmitted and the
changed profile was checked. The output "CheckOk" is set depending on the
result of the check. If "CheckOk"=TRUE, no discrepancy was detected.
The data transmitted with this function block are stored in volatile form. This
function block can work on the local axis "Axis1" and on remote axes "Axis2"
etc.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
38/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-17: Firmware Function Block MB_ChangeProfileSet

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


SetNumber UINT Selection of motion profile set
0: Motion profile set 0 (parameters P-0-0703 to P-0-0708)
1: Motion profile set 1 (parameters P-0-0710 to P-0-0715)
NumberOfSteps UINT Number of motion steps
Each motion profile set can consist of up to 8 motion steps
● Parameter P-0-0703 for set 0
● Parameter P-0-0710 for set 1
MasterAxisVelocity REAL Master axis velocity
Velocity of the master axis at the output of the electronic gear in 1/min
● Parameter P-0-0704 for set 0
● Parameter P-0-0711 for set 1
MasterAxisInitialPosAdr POINTER TO REAL Pointer to an array with the master axis initial positions of the steps
Master axis initial positions indicated in degrees
● Data for parameter P-0-0705 with set 0
● Data for parameter P-0-0712 with set 1
DistanceAdr POINTER TO REAL Pointer to an array with the distance values of the steps
● Data for parameter P-0-0707 with set 0
● Data for parameter P-0-0714 with set 1
SlaveAxisVelocityAdr POINTER TO REAL Pointer to an array with the slave axis velocities of the steps
● Data for parameter P-0-0708 with set 0
● Data for parameter P-0-0715 with set 1
StepModeAdr POINTER TO Pointer to an array with the modes of the steps
MC_STEP_MODE ● Data for parameter P-0-0706 with set 0
● Data for parameter P-0-0713 with set 1

Fig.1-18: Input Variables of the Firmware Function Block "MB_ChangeProfileSet"

Output variable Data type Description

Done BOOL With "Done"=TRUE, the data for the motion set were applied
"P-0-0089, Status word for synchronous operating modes" (bit 12 for
set 0, bit 14 for set 1)
Active BOOL With "Active"=TRUE, the data transfer is active
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 39/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


Error BOOL Signals that error has occurred in function block instance

ErrorID * ERROR_CODE Short information on cause of error

ErrorIdent * ERROR_STRUCT Detailed information on error


CheckOk BOOL With "CheckOk"=TRUE, the motion profile set is error-free
"P-0-0089, Status word for synchronous operating modes" (bit 13 for
set 0, bit 15 for set 1)
* See note below
Fig.1-19: Output Variables of the Firmware Function Block "MB_ChangeProfile‐
Set"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description

Axis AXIS_REF Axis1 for MLD-S


Axis1 for MLD-M is the local axis
Axis2 to Axis8 correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" cor‐
respond to the order according to Axis2 to Axis8 (Axis2 acts on the
drive of list element 0 of P-0-1601)

Fig.1-20: Input / Output Variables of the Firmware Function Block "MB_Change‐


ProfileSet"
MB_ChangeProfileStep
The firmware function block "MB_ChangeProfileStep" is used to change the
four parameters which define a segment of a motion profile set; these param‐
eters are
● master axis initial position,
● distance,
● slave axis velocity and
● mode.
The step which is to be changed is defined by the values at the inputs "Set‐
Number" and "StepNumber".
The units for the function block inputs "Distance" and "SlaveAxisVelocity" are
defined by the scaling parameters of the axis (S-0-0076, S-0-0044).
The "StepMode" input defines the kind of step.
The "Done" output is set when the changed profile was checked. The "Check‐
Ok" output is set depending on the result of the check. If "CheckOk"=FALSE,
a discrepancy has been detected.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
40/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-21: Firmware Function Block "MB_ChangeProfileStep"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


SetNumber UINT Selection of motion profile set
0: Motion profile set 0 (parameters P-0-0705 to P-0-0708)
1: Motion profile set 1 (parameters P-0-0712 to P-0-0715)
StepNumber UINT Select motion step to be changed
Each motion profile set can consist of up to 8 motion steps
1: Motion step1 / list element 0 (from P-0-0705 to P-0-0708 or P-0-0712
to P-0-0715)
2: Motion step2 / list element 1 (from P-0-0705 to P-0-0708 or P-0-0712
to P-0-0715)
...
8: Motion step8 / list element 7 (from P-0-0705 to P-0-0708 or P-0-0712
to P-0-0715)
MasterAxisInitialPos REAL Setting of master axis initial position of selected motion step in degrees
P-0-0705, List of master axis initial positions, set 0
P-0-0712, List of master axis initial positions, set 1
Distance REAL Setting of slave axis distance of motion step
P-0-0707, List of distances, set 0
P-0-0714, List of distances, set 1
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 41/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


SlaveAxisVelocity REAL Setting of slave axis velocity within motion step
P-0-0708, List of slave axis velocities, set 0
P-0-0715, List of slave axis velocities, set 1
StepMode MC_STEP_MODE Definition of processing mode of selected motion step
P-0-0706, List of motion laws, set 0
P-0-0713, List of motion laws, set 1
● REST_IN_REST_INCLINEDSINE (0)
● REST_IN_REST_POLY5 (16#100)
● REST_IN_VELOCITY_POLY5 (16#200)
● VELOCITY_IN_REST_POLY5 (16#400)
● VELOCITY_IN_VELOCITY_POLY5 (16#700)
● CONSTANT_VELOCITY (16#600)
● CAM_TABLE_1 (1)
● CAM_TABLE_2 (2)
● CAM_TABLE_3 (3)
● CAM_TABLE_4 (4)
● CAM_TABLE_5 (5)
● CAM_TABLE_6 (6)
● CAM_TABLE_7 (7)
● CAM_TABLE_8 (8)

Fig.1-22: Input Variables of the Firmware Function Block "MB_ChangeProfile‐


Step"

Output variable Data type Description

Done BOOL Data for motion step were applied


"P-0-0089, Status word synchronization modes" (bit 12 for set 0, bit 14
for set 1)
Active BOOL Data transfer active
Error BOOL Signals that error has occurred in function block instance
ErrorID * ERROR_CODE Short information on cause of error

ErrorIdent * ERROR_STRUCT Detailed information on error

CheckOk BOOL Motion profile set error-free


"P-0-0089, Status word synchronization modes" (bit 13 for set 0, bit 15
for set 1)
* See note below
Fig.1-23: Output Variables of the Firmware Function Block "MB_ChangeProfile‐
Step"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28
42/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description

Axis AXIS_REF Axis1 for MLD-S


As of MPx04: Axis1 for MLD-M is the local axis
Axis2 to Axis8 correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: Addresses of projected drives"
correspond to the order of Axis2 to Axis8 (Axis2 acts on the drive of list
element 0 of P-0-1601)

Fig.1-24: Input / Output Variables of the Firmware Function Block "MB_Change‐


ProfileStep"
MB_Command
Brief Description The function block MB_Command is used to execute, monitor and abort com‐
mands.
Interface Description

Fig.1-25: Function Block MB_Command


Interface Variables .
Name Type Comment
VAR_IN_OUT Axis AXIS_REF Reference of axis
VAR_INPUT Execute BOOL Function block is enabled (one-time, edge-controlled)
Command execution is aborted (one-time, edge-con‐
Cancel BOOL
trolled)
Keep activation of command active upon execution
KeepActive BOOL
(permanent, status-controlled)
DINT
ParameterNum‐
or Command
ber
MB_IDN (as of MPx06)
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 43/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Name Type Comment


VAR_OUTPUT Done BOOL Command successfully completed and reset
Active BOOL Command execution active
CommandAbor‐
BOOL Command successfully aborted and reset
ted
Error BOOL Error during command execution
With "Error" output set, this output contains a rough
ErrorID ERROR_CODE
classification of the error
With "Error" output set, this output contains detailed in‐
ErrorIdent ERROR_STRUCT formation on the error
See "Error Handling" on page 45
CommandExe‐
BOOL Command successfully completed
cuted
MB_SERCOS_DATA_STA‐
CommandStatus Status of the command execution
TUS

Fig.1-26: Interface Variables Function Block MB_Command


Signal-Time Diagram

Fig.1-27: Signal-Time Diagram for Signal Sequence "Execute-Done"


44/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-28: Signal-Time Diagram for Signal Sequence "Execute-Cancel-Comman‐


dAborted"

Fig.1-29: Signal-Time Diagram for Signal Sequence "Execute-KeepActive-Done"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 45/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-30: Signal-Time Diagram for Signal Sequence "Execute-Error"


Functional Description After the function block has been enabled, the function block "MB_Com‐
mand" by means of "Execute" starts the command execution of the command
defined via the "ParameterNumber" input. Generally, the command is auto‐
matically reset when processing has been completed. The command must be
specified in the parameter IDN format in accordance with the SERCOS stand‐
ard. Apart from this direct specification, it is possible to use a predefined
constant from the global variables of the basic library (e.g. "ML_Base.lib") or a
conversion function from the "RIL_Utilities.lib" library. Depending on the com‐
mand itself, the command execution can be aborted via the "Cancel" input at
any time. The "KeepActive" input allows keeping the command active upon its
execution. When the "KeepActive" input is deactivated, the command is auto‐
matically reset. For the duration of at least one call, the outputs "Done" or
"CommandAborted" signal that a command was successfully completed or
aborted. The "Active" output and the corresponding data at the "Command‐
Status" output show the active processing of the command. The current status
of the command execution is permanently signaled at the "CommandStatus"
output; the "CommandExecuted" output acknowledges that the command ex‐
ecution was completed. If an error occurs during the processing of the com‐
mand, this is signaled via the "Error" output and via the elements of error
classification (ErrorID, ErrorIdent) for the duration of at least one call.
Error Handling The function block "MB_Command" uses the error tables F_RELATED_TA‐
BLE, 16#0170, and INDRV_TABLE, 16#0070. In Additional1 and Additional2 it
can generate the errors contained in the table below. In addition to this error,
the included function blocks "MB_WriteParameter", "MB_ReadSercosDataS‐
tatus", "MB_ReadParameter" and "MB_ReadSercosAttribute" can signal other
errors.
46/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Additional1 Additional2 Description


INPUT_RANGE_ERROR, 16#0002 16#0001 Invalid input
16#0006 - The function block MB_Command does not support
retriggering of the command execution.
INPUT_RANGE_ERROR, 16#0002 16#0002 Invalid input
16#0006 - Control commands do not support the inputs Cancel
or KeepActive.
INPUT_RANGE_ERROR, 16#0002 16#0003 Invalid input
16#0006 - The ParameterNumber input does not contain any val‐
id command.
DEVICE_ERROR, 16#1701 16#0000 Error during command execution (control)
16#0008
STATE_MACHINE_ERROR, 16#0006 16#???? Invalid status of the state machine
16#0005 16#???? specifies the invalid status

Fig.1-31: Error Numbers of the Error Table "F_RELATED_TABLE", Caused by


MB_Command

ErrorID Additional1 Additional2 Description


DEVICE_ERROR, 16#????? 16#0000 Error during command execution (drive)
16#0008 - 16#???? contains the current value from S-0-0390.

Fig.1-32: Error Numbers of the Error Table "INDRV_TABLE", Caused by


MB_Command
MB_GearInPos
With the function block "MB_GearInPos" it is possible to realize a motion of the
slave axis which is phase synchronous to the master axis.
The slave axis can be a real axis or (as of "IndraDrive MP05") the internal virtual
master axis (VmAxisInt).
When the slave axis is a real axis, a synchronous position command value for
the slave axis is determined from the position of the master axis. Select the
master axis at the "Master"input; you can choose from the following axes:
● External virtual master axis (VmAxisExt),
● internal virtual master axis (VmAxisInt) or
● real master axis (RmAxis).

As of "IndraDrive MP05": When "VmAxisInt" has been selected as


slave axis, this axis mustn't be master axis at the same time.

In principle, the synchronous position command value "XSync" is determined


according to the equation below (see also Functional Description of firmware
"Phase Synchronization with Real/Virtual Master Axis"):

Fig.1-33: Calculating the Synchronous Position Command Value "Xsync"


At the "StartMode" input, you have to set in which mode the synchronization
process is to take place. Velocity adjustment is carried out (relative synchroni‐
zation) and in the case of absolute synchronization, position adjustment is
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 47/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

carried out, too. This means that the actual values (velocity and position) are
adjusted to the command values calculated from the master position. When the
StartMode "0" or "1" has been set, the synchronization process only takes place
at the first positive edge at "Execute". Another positive edge only causes the
data at the input of the function block to be applied.
As of "IndraDrive MP04V12" and only for real axes: If the synchronization proc‐
ess is to take place at every positive edge at "Execute", the StartMode "2" or
"3" can be set; for the virtual axis, the repeated synchronization is not suppor‐
ted.
For a real axis, the parameters "P‑0‑0143, Synchronization velocity" and
"P‑0‑0142, Synchronization acceleration" take effect during the synchroniza‐
tion process, for the virtual axis, it is the parameters "P-0-0920, Synchronization
acceleration, secondary master" and "P-0-0921, Synchronization velocity, sec‐
ondary master".
Synchronization can take place by motion in positive direction, in negative di‐
rection or over the shortest distance. This has to be set at the "SyncMode" input.
The position of the master axis is directly converted into a position of the slave
axis.

When the function block "MB_GearInPos" is active, the position


loop of the drive is active, too, for real axes. Make the settings of
the position loop (with/without lag error, actual position value 1/2)
with the function block "MB_SetPositionControlMode".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-34: Firmware Function Block "MB_GearInPos"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


RatioNumerator UINT Gear ratio - numerator
● "P‑0‑0157, Master drive gear output revolutions" or
● "P-0-0926, Master drive gear output revolutions, secondary mas‐
ter" (as of IndraDrive MP05)
48/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


RatioDenominator UINT Gear ratio - denominator
● "P‑0‑0156, Master drive gear input revolutions" or
● "P-0-0925, Master drive gear input revolutions, secondary mas‐
ter" (as of IndraDrive MP05)
MasterFineadjust REAL "P‑0‑0083, Gear ratio fine adjust" or "P-0-0927, Master drive gear fine
adjust, secondary master" (as of IndraDrive MP05) in %
SyncMode MC_SYNC_DIRECTION "P‑0‑0154, Synchronization direction" or "P-0-0922, Preferred synchro‐
nization direction, secondary master" (as of IndraDrive MP05)
0:= Shortest distance
1:= Positive direction
2:= Negative direction
StartMode MC_START_MODE "P‑0‑0155, Synchronization mode", bit 1 or "P-0-0919, Synchronization
mode, secondary master" (as of IndraDrive MP05)
0:= Absolute synchronization only at first execution
1:= Relative synchronization only at first execution
2:= Absolute synchronization at every execution (as of IndraDrive
MP04V12)
3:= Relative synchronization at every execution (as of IndraDrive
MP04V12)

Fig.1-35: Input Variables of the Firmware Function Block "MB_GearInPos"

Output variable Data type Description

InSync BOOL With the output value TRUE, the function block signals that the slave axis
is synchronous.
"InSync" corresponds to P-0-0115, bit 12 of the parameterized axis.
For this application, bit 12 of P-0-0115 corresponds to bit 8 "synchroni‐
zation mode in synchronization" of "P-0-0089, Status word synchroniza‐
tion modes".
For the virtual axis, "InSync" corresponds to bit 8 of "P-0-0768, Virtual
master axis, positioning status" (as of IndraDrive MP05)
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion.
"Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present.
A drive error is signaled via the Error outputs of "MC_Power" or "MX_Pow‐
er".
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
* See note below
Fig.1-36: Output Variables of the Firmware Function Block "MB_GearInPos"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 49/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Master AXIS_REF Selection of master axis. The following master axes are available:
● VmAxisInt=P_0_0761 (in order that P-0-0761 provides the correct
value, a selection parameter must have been entered in P-0-0916)
● VmAxisExt=P_0_0053
● RmAxis=P_0_0052
Slave AXIS_REF Axis1 for MLD-S or local axis for MLD-M
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: Addresses of projected drives" correspond to
the order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)
As of IndraDrive MP05: VmAxisInt = P_0_0761 (in this case, not simulta‐
neously allowed as master axis).

Fig.1-37: Input / Output Variables of the Firmware Function Block "MB_GearIn‐


Pos"
MB_MotionProfile
The function block "MB_MotionProfile" realizes an electronic cam function. The
cams are analytically defined by the parameters which belong to the operation
mode "electronic motion profile". A synchronous position command value for
the slave axis is determined from the position of the master axis.
Select the master axis at the "Master" input; you can choose from the following
axes:
● External virtual master axis (VmAxisExt),
● internal virtual master axis (VmAxisInt) or
● real master axis (RmAxis).
To calculate the synchronous position command value XSynch, a table access
angle (P-0-0227) is first determined according to the equation below:

Fig.1-38: Table Access Angle


With the table access angle as an argument, a synchronous position command
value is calculated by means of a 5th order polynomial.
At the "StartMode" input, you have to set in which mode the synchronization
process is to take place. Velocity adjustment is carried out (relative synchroni‐
zation) and in the case of absolute synchronization, position adjustment is
carried out, too. This means that the actual values (velocity and position) are
adjusted to the command values calculated from the master position. When the
StartMode "0" or "1" has been set, the synchronization process only takes place
at the first positive edge at "Execute". Another positive edge only causes the
data at the input of the function block to be applied.
50/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

As of "IndraDrive MP04V12": If the synchronization process is to take place at


every positive edge at "Execute", the StartMode "2" or "3" can be set.
For the synchronization process, the parameters "P‑0‑0143, Synchronization
velocity" and "P‑0‑0142, Synchronization acceleration" take effect.

When the function block "MB_MotionProfile" is active, the position


loop of the drive is active, too. Make the settings of the position loop
(with/without lag error, actual position value 1/2) with the function
block "MB_SetPositionControlMode".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-39: Firmware Function Block "MB_MotionProfile"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


RatioNumerator UINT Gear ratio - numerator
"P-0-0157, Master drive gear output revolutions"
RatioDenominator UINT Gear ratio - denominator
P‑0‑0156, Master drive gear input revolutions
MasterFineadjust REAL "P‑0‑0083, Gear ratio fine adjust" in %
SetSelection UINT P-0-0088, bit9: Selection of motion profile set (0 or 1)
RelativePositioning BOOL P-0-0088, bit10:
FALSE = fixed (absolute) position reference,
TRUE = relative positioning.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 51/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


SyncMode MC_SYNC_DIRECTION "P‑0‑0154, Synchronization direction":
0:= Shortest distance
1:= Positive direction
2:= Negative direction
StartMode MC_START_MODE "P‑0‑0155, Synchronization mode", bit 1
0:= Absolute synchronization only at first execution
1:= Relative synchronization only at first execution
2:= Absolute synchronization at every execution (as of "IndraDrive
MP04V12")
3:= Relative synchronization at every execution (as of "IndraDrive
MP04V12")

Fig.1-40: Input Variables of the Firmware Function Block "MB_MotionProfile"

Output variable Data type Description

InSync BOOL With the output value TRUE, the function block signals that the slave axis
is synchronous.
"InSync" corresponds to P-0-0115, bit12 of the parameterized axis and
SetSelection(P-0-0088.9) = ActiveSet(P-0-0089.3).
For this application, bit 12 of P-0-0115 corresponds to bit 8 "synchroni‐
zation mode in synchronization" of parameter "P-0-0089, Status word
synchronization modes".
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion.
"Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present.
A drive error is signaled via the Error outputs of "MC_Power" or "MX_Pow‐
er".
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
ActiveSet UINT P-0-0089, bit3: The output displays the number of the active motion profile
set.
* See note below
Fig.1-41: Output Variables of the Firmware Function Block "MB_MotionProfile"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
52/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Master AXIS_REF Selection of master axis. The following master axes are available:
VmAxisInt=P_0_0761 (in order that P-0-0761 provides the correct value,
a selection parameter must have been entered in P-0-0916)
VmAxisExt = P_0_0053
RmAxis = P_0_0052
Slave AXIS_REF Axis1 for MLD-S or local axis for MLD-M
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: Addresses of projected drives" correspond to
the order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)

Fig.1-42: Input / Output Variables of the Firmware Function Block "MB_Motion‐


Profile"
MB_Phasing
The function block "MB_Phasing" allows realizing an offset to the master axis
which is connected as input to a synchronization function block ("MC_CamIn"
or "MC_GearInPos").
The parameter "P‑0‑0054, Additive master axis position" is changed. The inputs
"Velocity" and "Acceleration" determine the motion profile with which the dis‐
tance is traveled.
The units of the inputs which define the drive motion are fixed.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-43: Firmware Function Block "MB_Phasing"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


PhaseShift REAL Additive master axis position (P‑0‑0054) in degrees
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 53/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


Velocity REAL Additive master axis position, positioning velocity (P‑0‑0688) in rpm
Acceleration REAL Additive master axis position, positioning acceleration (P‑0‑0689) in rad/s²

Fig.1-44: Input Variables of the Firmware Function Block "MB_Phasing"

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that PhaseShift has
been reached (acknowledged by bit 6 of "P‑0‑0089, Status word for syn‐
chronous operating modes")
Active BOOL With TRUE the input "Active" signals that the preset value has not yet been
reached
CommandAborted BOOL The output "CommandAborted" is set to TRUE, when the firmware function
block has not yet signaled with "Done"=TRUE that it has been completed
and the firmware function block was aborted with another motion function
block
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-45: Output Variables of the Firmware Function Block "MB_Phasing"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis1 for MLD-S or local axis for MLD-M


Axis2 to Axis8 correspond to the remote axes. The remote axes contained in
the list "P-0-1601, CCD: addresses of projected drives" correspond to the order
according to Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)

Fig.1-46: Input / Output Variables of the Firmware Function Block "MB_Phasing"


MB_PhasingSlave
With the function block "MB_PhasingSlave" it is possible to adjust the slave axis
by a position offset. The adjustment only takes effect with active synchroniza‐
tion function block ("MC_CamIn", "MB_GearInPos" or "MB_MotionProfile").
Moving to the new value for the position offset ("PhaseShift" input) takes place
in consideration of the values for velocity ("Velocity" input) and acceleration
("Acceleration" input) provided at the function block.
The scaling parameters of the axis ("S‑0‑0044, Velocity data scaling type";
"S‑0‑0076, Position data scaling type"; "S‑0‑0160, Acceleration data scaling
type") define the units for the inputs "PhaseShift", "Velocity" and "Acceleration".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
54/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-47: Firmware Function Block "MB_PhasingSlave"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


PhaseShift REAL "S-0-0048, Additive position command value"
Velocity REAL "P-0-0686, Additive position command value, positioning velocity"
Acceleration REAL "P-0-0687, Additive position command value, positioning acceleration"

Fig.1-48: Input Variables of the Firmware Function Block "MB_PhasingSlave"

Output variable Data type Description

Done BOOL PhaseShift reached (acknowledged by "P‑0‑0152, Synchronization comple‐


ted", bit 0=1)
Active BOOL With "Active"=TRUE the function block signals that it contributes to the axis
motion
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that synchroniza‐
tion has been aborted
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-49: Output Variables of the Firmware Function Block "MB_PhasingSlave"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 55/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis1 for MLD-S or local axis for MLD-M


Axis2 to Axis8 correspond to the remote axes. The remote axes contained in
the list "P-0-1601, CCD: Addresses of projected drives" correspond to the order
of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of P-0-1601)
As of IndraDrive MP06: VmAxisInt = P_0_0761

Fig.1-50: Input / Output Variables of the Firmware Function Block "MB_Phasing‐


Slave"
MB_Stop
The firmware function block "MB_Stop" is used to bring the drive to the status
STOP.
With the rising edge at "ExecuteLock" the stopping process is started.
If the PLC does not have control over the drive, an error is returned.
As long as the input "ExecuteLock" is TRUE, no other motion function block
can be started. For this purpose, the drive is brought to the status "AH" (Drive
Halt). Further command triggering is only possible when the axis is in standstill.
With "ExecuteLock"=FALSE the drive remains in "AH".
With the deceleration set at "Deceleration" the drive is brought to standstill.
When several instances are called by "MC_Stop" or "MB_Stop" in a project, it
is always the last instance which takes effect. Exception: An active "MC_Stop"
cannot be interrupted by an "MB_Stop".
"MC_Stop" has higher priority than "MB_Stop"; this means that a running
"MC_Stop" cannot be aborted by an "MB_Stop".

Via the function block "MB_Stop" it is also possible to bring


"P-0-0759, Virtual master axis, actual velocity value" to standstill via
a defined ramp. For this purpose, the master axis generator has to
be activated via "P-0-0917, Control word of master axis generator",
bit 0=1. To convert the virtual actual position value (P-0-0758) into
the internal virtual master axis position (VmAxisInt, "P-0-0761, Mas‐
ter axis position for slave axis"), the parameter P-0-0758 must be
written to parameter "P-0-0916, Master axis format converter signal
selection".
See also Functional Description of firmware "Master Axis Genera‐
tor"

To test the function block, the instance variable "ActivateCounter"


can be used. It counts the positive edges of the "ExecuteLock" sig‐
nal and thereby signals whether the function block is run with edge.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
56/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-51: Firmware Function Block "MB_Stop"

Input variable Data type Description

ExecuteLock BOOL With a rising edge at "ExecuteLock" the drive is switched to "AH"
Deceleration REAL This input sets the deceleration. The deceleration which is set is written to
parameter "S‑0‑0372, Drive Halt acceleration bipolar".

Fig.1-52: Input Variables of the Firmware Function Block "MB_Stop"

Output variable Data type Description

Done BOOL With "Done"=TRUE (S-0-0331, bit 0=1) the firmware function block signals
that the drive has stopped. Only when the input "ExecuteLock" is TRUE is
the output "Done" generated
Active BOOL With "Active"=TRUE the firmware function block signals that it determines
the axis motion
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
function block has commanded another status (other "MC_Stop" or
"MB_Stop")
Error BOOL With "Error"=TRUE the function block signals that an error is present; the
kind of deceleration depends on the error
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-53: Output Variables of the Firmware Function Block "MB_Stop"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 57/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis1 for MLD-S or local axis for MLD-M


Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: addresses of projected drives" correspond to
the order according to Axis2 to Axis8 (Axis2 acts on the drive of list element
0 of P-0-1601)
VmAxisInt corresponds to the virtual master axis generator

Fig.1-54: Input / Output Variables of the Firmware Function Block "MB_Stop"


MC_CamIn
With the function block "MC_CamIn" it is possible to realize an electronic cam.
A synchronous position command value for the slave axis is determined from
the position of the master axis. Select the master axis at the "Master"input; you
can choose from the following axes:
● External virtual master axis (VmAxisExt),
● internal virtual master axis (VmAxisInt) or
● real master axis (RmAxis).
To calculate the synchronous position command value "XSynch", a profile ac‐
cess angle (P-0-0227) is first determined according to the equation below:

Fig.1-55: Calculating P‑0‑0227, Cam Table, Access Angle (Table Access Angle)
With the calculated table access angle, the table selected at the "CamTableID"
input is accessed and a percentage is taken from it. This table value is multiplied
with the position value at the "CamShaftDistance" input and provides the syn‐
chronous position command value.
At the "StartMode" input, you have to set in which mode the synchronization
process is to take place. Velocity adjustment is carried out (relative synchroni‐
zation) and in the case of absolute synchronization, position adjustment is
carried out, too. This means that the actual values (velocity and position) are
adjusted to the command values calculated from the master position with par‐
ameterized velocity (P-0-0143, Synchronization velocity) and acceleration
(P-0-0142, Synchronization acceleration). When the StartMode "0" or "1" has
been set, the synchronization process only takes place at the first positive edge
at "Execute". Another positive edge only causes the data at the input of the
function block to be applied. The input values (gear, distance, cam) then take
effect depending on the configuration of "P-0-0086, Configuration word syn‐
chronous operation modes".
As of "IndraDrive MP04V12": If the synchronization process is to take place at
every positive edge at "Execute", the StartMode "2" or "3" can be set. The input
values (gear, distance, cam) therewith take effect immediately, independent of
P-0-0086.
With modulo position scaling, synchronization can take place by motion in pos‐
itive direction, in negative direction or over the shortest distance. This has to
be set at the "SyncMode" input.
58/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

When the function block "MC_CamIn" is active, the position loop of


the drive is active, too. Make the settings of the position loop (with/
without lag error, actual position value 1/2) with the function block
"MB_SetPositionControlMode".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-56: Firmware Function Block "MC_CamIn"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a
falling edge, all outputs are reset
RatioNumerator UINT Gear ratio - numerator
"P-0-0157, Master drive gear output revolutions"
RatioDenominator UINT Gear ratio - denominator
"P-0-0156, Master drive gear input revolutions"
MasterFineadjust REAL "P‑0‑0083, Gear ratio fine adjust" in %
CamShaftDistance REAL Cam distance. Scaling of percentage-based table values
SyncMode MC_SYNC_DIRECTION "P‑0‑0154, Synchronization direction":
0:= Shortest distance
1:= Positive direction
2:= Negative direction
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 59/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


StartMode MC_START_MODE "P‑0‑0155, Synchronization mode", bit 1
0:= Absolute synchronization only at first execution
1:= Relative synchronization only at first execution
2:= Absolute synchronization at every execution (as of IndraDrive
MP04V12)
3:= Relative synchronization at every execution (as of IndraDrive
MP04V12)
CamTableID MC_CAM_ID Number of the cam table (1..8 according to parameters P‑0‑0072,
P‑0‑0092, P‑0‑0780..P‑0‑0785)

Fig.1-57: Input Variables of the Firmware Function Block "MC_CamIn"

Output variable Data type Description

InSync BOOL With "InSync"=TRUE the function block signals that the slave axis is syn‐
chronous.
"InSync" corresponds to
● "P-0-0115, Device control: Status word", bit12: "command value
reached" of the parameterized axis and
● "CamTableID"="CamActiveID" and
● "P-0-0089, Status word synchronization modes", bit 5=1 (status
distance switching). For this application, bit 12 of P-0-0115 corre‐
sponds to bit 8 "synchronization mode in synchronization" of pa‐
rameter "P-0-0089, Status word synchronization modes".
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion.
"Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is signaled via the "Error" outputs of "MC_Power".
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
CamActiveID Number of the cam active in the function block
* See note below
Fig.1-58: Output Variables of the Firmware Function Block "MC_CamIn"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
60/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Master AXIS_REF Selection of master axis.


The following master axes are available:
● VmAxisInt=P-0-0761 (in order that P-0-0761 provides the correct
value, a selection parameter must have been entered in P-0-0916)
● VmAxisExt=P-0-0053
● RmAxis=P-0-0052
Slave AXIS_REF Axis1 (only axis for MLD-S or local axis for MLD-M)
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: Addresses of projected drives" correspond to
the order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)

Fig.1-59: Input / Output Variables of the Firmware Function Block "MC_CamIn"


MC_CamOut
The firmware function block "MC_CamOut" is used to terminate an active syn‐
chronization function block. Transition to velocity control takes place. The actual
velocity value available with a rising Execute edge is taken as the velocity com‐
mand value.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-60: Firmware Function Block "MC_CamOut"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22

Fig.1-61: Input Variables of the Firmware Function Block "MC_CamOut"

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the preset ve‐
locity has been reached. (S-0-0330, bit 0=1)
Active BOOL With TRUE the "Active" output signals that it determines the axis motion.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 61/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
* See note below
Fig.1-62: Output Variables of the Firmware Function Block "MC_CamOut"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Slave AXIS_REF "VmAxisInt" (P-0-0761, Master axis position for slave axis) (as of
IndraDrive MP05)
"Axis1" (only axis for MLD-S or local axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: Addresses of projected drives" corre‐
spond to the order of "Axis2" to "Axis8" ("Axis2" acts on the drive of list
element 0 of P-0-1601)

Fig.1-63: Input / Output Variables of the Firmware Function Block "MC_CamOut"


MC_GearIn
With the function block "MC_GearIn" it is possible to realize a motion of the
slave axis which is velocity synchronous to the master axis.
When the function block is activated, the slave axis accelerates to the synchro‐
nous velocity with the acceleration set in "P‑0‑0142, Synchronization acceler‐
ation". The synchronous velocity is generated according to the equation below,
from the velocity of the master axis and the input data of the function block.

Fig.1-64: Calculating the Synchronous Velocity

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
62/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-65: Firmware Function Block "MC_GearIn"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


RatioNumerator UINT Gear ratio - numerator
"P-0-0157, Master drive gear output revolutions"
RatioDenominator UINT Gear ratio - denominator
"P-0-0156, Master drive gear input revolutions"
MasterFineadjust REAL "P‑0‑0083, Gear ratio fine adjust" in %

Fig.1-66: Input Variables of the Firmware Function Block "MC_GearIn"

Output variable Data type Description

InGear BOOL With "InGear"=TRUE the function block signals that the slave axis is ve‐
locity-synchronous.
InGear corresponds to "P-0-0115 bit12, Device control - status word:
command value reached" of the parameterized axis. For this application,
this bit corresponds to bit 8 "synchronization mode in synchronization" of
parameter "P-0-0089, Status word synchronization modes".
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
* See note below
Fig.1-67: Output Variables of the Firmware Function Block "MC_GearIn"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 63/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Master AXIS_REF Selection of master axis.


The following master axes are available:
● VmAxisInt=P-0-0761 (in order that P-0-0761 provides the correct
value, a selection parameter must have been entered in P-0-0916)
● VmAxisExt=P-0-0053
● RmAxis=P-0-0052
Slave AXIS_REF Axis1 (only axis for MLD-S or local axis for MLD-M)
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: Addresses of projected drives" correspond to
the order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)

Fig.1-68: Input / Output Variables of the Firmware Function Block "MC_GearIn"


MC_GearOut
The firmware function block "MC_GearOut" is used to terminate an active syn‐
chronization function block. Transition to velocity control takes place for real
axes. The actual velocity value available with a rising "Execute" edge is taken
as the velocity command value.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-69: Firmware Function Block "MC_GearOut"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22

Fig.1-70: Input Variables of the Firmware Function Block "MC_GearOut"


64/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the preset ve‐
locity has been reached. (S-0-0330, bit 0=1)
Active BOOL With TRUE the "Active" output signals that it determines the axis motion.
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
* See note below
Fig.1-71: Output Variables of the Firmware Function Block "MC_GearOut"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Slave AXIS_REF "VmAxisInt" (P-0-0761, Master axis position for slave axis) (as of
IndraDrive MP05)
"Axis1" (only axis for MLD-S or local axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: Addresses of projected drives" corre‐
spond to the order of "Axis2" to "Axis8" ("Axis2" acts on the drive of list
element 0 of P-0-1601)

Fig.1-72: Input / Output Variables of the Firmware Function Block "MC_GearOut"


MC_MoveAbsolute
The firmware function block "MC_MoveAbsolute" is used to move the drive to
a preset absolute position. Internally the operating mode "drive-controlled po‐
sitioning" is activated for this purpose. Make the settings of the position loop
(with/without lag error, actual position value 1/2) with the function block
"MB_SetPositionControlMode".
For permanent control and remote axes the secondary operation mode 3 and
its parameters are used. For temporary control the secondary PLC operation
mode 11 and its parameters are used.
The target position has to be preset at the input "Position". Via the inputs "Ve‐
locity", "Acceleration" and "Deceleration" you have to set how the drive moves
to the target position (motion profile).

Via the firmware function block "MC_MoveAbsolute" the parameter


"P-0-0758, Virtual master axis, actual position value" of the master
axis generator can be positioned in absolute form, too. For this pur‐
pose, the master axis generator has to be activated via "P-0-0917,
Control word of master axis generator", bit 0=1. To convert the vir‐
tual actual position value (P-0-0758) into the internal virtual master
axis position (VmAxisInt, "P-0-0761, Master axis position for slave
axis") the parameter P-0-0758 must be written to parameter
"P-0-0916, Master axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera‐
tor" and "Master Axis Format Converter"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 65/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-73: Firmware Function Block "MC_MoveAbsolute"

Operating mode parameter PLC mode parameter Virt. master axis (as of MPx04)

S-0-0282, Positioning command val‐ P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐
ue ing command value
S-0-0259, Positioning Velocity P-0-1451, PLC Positioning velocity P-0-0770, Virtual master axis, position‐
ing velocity
S-0-0260, Positioning Acceleration P-0-1452, PLC Positioning acceleration P-0-0771, Virtual master axis, position‐
ing acceleration
S-0-0346, Positioning control word P-0-1454, PLC Positioning command value P-0-0760, Virtual master axis, position‐
acceptance ing control word
S-0-0359, Positioning deceleration P-0-1453, PLC Positioning deceleration P-0-0772, Virtual master axis, position‐
ing deceleration

Fig.1-74: Comparison of Operation Mode Parameters

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


Position REAL The absolute position must be preset at the input "Position".
Velocity REAL Positioning velocity in physical unit
Acceleration REAL Positioning acceleration in physical unit
Deceleration REAL Positioning deceleration in physical unit

Fig.1-75: Input Variables of the Firmware Function Block "MC_MoveAbsolute"


66/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the absolute
target position has been reached. The processing is completed until the
next 0-1 edge at the "Execute" input. When a 1-0 edge is applied to the
"Execute" input before the firmware function block signals that it has been
completed ("Done"=TRUE), the output "Done" is set to TRUE for one call
when the motion target has been reached and the processing of the firm‐
ware function block has not been interrupted by an error or another firm‐
ware function block.
● Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
● Virtual master axis: (as of MPx04VRS) The output is set to TRUE
when bit 2 is set in parameter "P-0-0768, Virtual master axis, posi‐
tioning status".
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-76: Output Variables of the Firmware Function Block "MC_MoveAbsolute"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (axis for MLD-S or local axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-77: Input / Output Variables of the Firmware Function Block "MC_MoveAb‐


solute"
MC_MoveAdditive
The firmware function block "MC_MoveAdditive" is used to move the drive in
relative form by a distance in addition to the target position. The new target
position results from the old target position, plus a distance. The distance is
determined by the "Distance" input. The inputs "Velocity", "Acceleration" and
"Deceleration" determine the motion profile.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 67/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Internally the operation mode "drive-controlled positioning" is activated. Make


the settings of the position loop (with/without lag error, actual position value 1/2)
with the function block "MB_SetPositionControlMode".
For permanent control and remote axes the secondary operation mode 3 and
its parameters are used. For temporary control the secondary PLC operation
mode 11 and its parameters are used.

Via the firmware function block "MC_MoveAbsolute" the parameter


"P-0-0758, Virtual master axis, actual position value" of the master
axis generator can be moved in relative form by a distance in ad‐
dition to the current target position. For this purpose, the master
axis generator has to be activated via "P-0-0917, Control word of
master axis generator", bit 0=1. To convert the virtual actual position
value (P-0-0758) into the internal virtual master axis position
(VmAxisInt, "P-0-0761, Master axis position for slave axis") the pa‐
rameter P-0-0758 must be written to parameter "P-0-0916, Master
axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera‐
tor" and "Master Axis Format Converter"

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-78: Firmware Function Block "MC_MoveAdditive"

Operating mode parameter PLC mode parameter Virt. master axis

S-0-0282, Positioning command val‐ P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐
ue ing command value
S-0-0259, Positioning Velocity P-0-1451, PLC Positioning velocity P-0-0770, Virtual master axis, position‐
ing velocity
S-0-0260, Positioning Acceleration P-0-1452, PLC Positioning acceleration P-0-0771, Virtual master axis, position‐
ing acceleration
68/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Operating mode parameter PLC mode parameter Virt. master axis


S-0-0346, Positioning control word P-0-1454, PLC Positioning command value P-0-0760, Virtual master axis, position‐
acceptance ing control word
S-0-0359, Positioning deceleration P-0-1453, PLC Positioning deceleration P-0-0772, Virtual master axis, position‐
ing deceleration

Fig.1-79: Comparison of Operation Mode Parameters

Input variable Data type Description

Execute BOOL With a rising edge at "Execute" the data at the inputs are applied to the
firmware function block; processing starts.
With a falling edge, all outputs are cleared.
The firmware function block remains active until one of the two out‐
puts"Done" and "Error" is set to TRUE. The status persists for one call
before the outputs are reset
Distance REAL At the input "Distance" the relative distance must be preset; the new target
position results from the old target position and the value set at the input
"Distance".
Velocity REAL Positioning velocity in physical unit
Acceleration REAL Positioning acceleration in physical unit
Deceleration REAL Positioning deceleration in physical unit

Fig.1-80: Input Variables of the Firmware Function Block "MC_MoveAdditive"

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the target po‐
sition has been reached. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func‐
tion block has not been interrupted by an error or another firmware function
block.
● Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
● Virtual master axis: (as of MPx04VRS) The output is set to TRUE
when bit 2 is set in parameter "P-0-0768, Virtual master axis, posi‐
tioning status".
Active BOOL With "Active"=TRUE the firmware function block signals that it determines
the axis motion
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-81: Output Variables of the Firmware Function Block "MC_MoveAdditive"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 69/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-82: Input / Output Variables of the Firmware Function Block "MC_MoveAd‐


ditive"
MC_MoveRelative
The firmware function block "MC_MoveRelative" is used to move the drive in
relative form by a distance, starting from the current actual position.
Internally the operation mode "drive-controlled positioning" is activated for this
purpose. Make the settings of the position loop (with/without lag error, actual
position value 1/2) with the function block "MB_SetPositionControlMode".
For permanent control and remote axes the secondary operation mode 3 and
its parameters are used. For temporary control the secondary PLC operation
mode 11 and its parameters are used.
The relative distance to be moved has to be preset at the input "Distance". Via
the inputs "Velocity", "Acceleration" and "Deceleration" you have to set the mo‐
tion profile (determines how the relative distance is traveled).

Via the firmware function block "MC_MoveRelative" the parameter


"P-0-0758, Virtual master axis, actual position value" of the master
axis generator can be moved in relative form by a distance starting
from the current virtual actual position. For this purpose, the master
axis generator has to be activated via "P-0-0917, Control word of
master axis generator", bit 0=1. To convert the virtual actual position
value (P-0-0758) into the internal virtual master axis position
(VmAxisInt, "P-0-0761, Master axis position for slave axis") the pa‐
rameter P-0-0758 must be written to parameter "P-0-0916, Master
axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera‐
tor" and "Master Axis Format Converter"

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
70/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-83: Firmware Function Block "MC_MoveRelative"

Operating mode parameter PLC mode parameter Virt. master axis (as of MPx04)

S-0-0282, Positioning command val‐ P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐
ue ing command value
S-0-0259, Positioning Velocity P-0-1451, PLC Positioning velocity P-0-0770, Virtual master axis, position‐
ing velocity
S-0-0260, Positioning Acceleration P-0-1452, PLC Positioning acceleration P-0-0771, Virtual master axis, position‐
ing acceleration
S-0-0346, Positioning control word P-0-1454, PLC Positioning command value P-0-0760, Virtual master axis, position‐
acceptance ing control word
S-0-0359, Positioning deceleration P-0-1453, PLC Positioning deceleration P-0-0772, Virtual master axis, position‐
ing deceleration

Fig.1-84: Comparison of Operation Mode Parameters

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


Distance REAL At the input "Distance" you have to preset the relative distance which is to
be traveled starting from the current actual position.
The number of possible decimal places depends on the parameterized
scaling (see drive documentation). If the applied value has more decimal
places, they are cut off
Velocity REAL Positioning velocity in physical unit
Acceleration REAL Positioning acceleration in physical unit
Deceleration REAL Positioning deceleration in physical unit

Fig.1-85: Input Variables of the Firmware Function Block "MC_MoveRelative"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 71/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the preset dis‐
tance has been traveled. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func‐
tion block has not been interrupted by an error or another firmware function
block.
● Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
● Virtual master axis: (as of MPx04VRS) The output is set to TRUE
when bit 2 is set in parameter "P-0-0768, Virtual master axis, posi‐
tioning status".
Active BOOL With TRUE the output "Active" signals that it determines the axis motion.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-86: Output Variables of the Firmware Function Block "MC_MoveRelative"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-87: Input / Output Variables of the Firmware Function Block "MC_MoveRe‐


lative"
MC_MoveVelocity
The firmware function block "MC_MoveVelocity" is used to preset a velocity for
the drive. As the drive moves in velocity control, the firmware function block can
be used for open-loop drives, too.
For permanent control and remote axes the primary mode of operation and its
parameters are used. For temporary control the secondary PLC operation
mode 8 and its parameters are used.
72/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

If they are scaling-dependent and unless otherwise described, the


units of the inputs which define the drive motion are taken from the
scaling parameters.
● S-0-0044, Velocity data scaling type
● S-0-0076, Position data scaling type
● S-0-0086, Torque/force data scaling type

Via the firmware function block "MC_MoveVelocity" a velocity can


be preset for the virtual master axis generator, too. For this purpose,
the master axis generator has to be activated via "P-0-0917, Control
word of master axis generator", bit 0=1. To convert the virtual actual
position value (P-0-0758) into the internal virtual master axis posi‐
tion (VmAxisInt, "P-0-0761, Master axis position for slave axis") the
parameter P-0-0758 must be written to parameter "P-0-0916, Mas‐
ter axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera‐
tor" and "Master Axis Format Converter"

The functional principle of the firmware function block "MC_Move‐


Velocity" differs in one important point depending on the selected
axis: "VmAxisInt" "P-0-0769, Virtual master axis, command value
mode". For the function block "MC_MoveVelocity" the parameter
has the following effect:
● 00: Positive direction: Only positive direction of rotation is al‐
lowed for positioning (relative/absolute) and jogging
● 01: Negative direction: Only negative direction of rotation is
allowed for positioning (relative/absolute) and jogging
● 10: Shortest distance: Both positive and negative directions of
rotation are allowed for positioning (relative/absolute)and jog‐
ging
If this is not taken into consideration, the drive error "F2064 Incor‐
rect cmd value direction master axis generator" is triggered.
This parameter only takes effect with modulo scaling of the virtual
master axis generator.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 73/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-88: Firmware Function Block "MC_MoveVelocity"

Operation mode parameter PLC mode parameter Virt. master axis (as of MPx04)

S-0-0036, Velocity command value P-01460, PLC Velocity command value P-0-0770, Virtual master axis, positioning
velocity
P-0-1203, Ramp 2 pitch P-0-1461, PLC Ramp 2 pitch P-0-0771, Virtual master axis, positioning
acceleration
P-0-1213, Deceleration ramp 2 P-0-1463, PLC Deceleration ramp 2 P-0-0772, Virtual master axis, positioning
deceleration

Fig.1-89: Comparison of Operation Mode Parameters

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


Velocity REAL Velocity in physical unit. The number of possible decimal places depends
on the parameterized scaling (see drive documentation). If the applied val‐
ue has more decimal places, they are cut off
Acceleration REAL Acceleration in physical unit. The number of possible decimal places de‐
pends on the parameterized scaling (see drive documentation). If the
applied value has more decimal places, they are cut off
Deceleration REAL Deceleration in physical unit. The number of possible decimal places de‐
pends on the parameterized scaling (see drive documentation). If the
applied value has more decimal places, they are cut off

Fig.1-90: Input Variables of the Firmware Function Block "MC_MoveVelocity"


74/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

InVelocity BOOL With "InVelocity"=TRUE the firmware function block signals that the ve‐
locity preset by "Velocity" has been reached. When a 1-0 edge is applied
to the "Execute" input before the firmware function block signals that it has
reached the command velocity ("InVelocity"=TRUE), the output "InVeloci‐
ty" is set to TRUE for one call if the actual velocity corresponds to the
command velocity.
● Real axes: "Axis1" etc.
InVelocity = "P-0-0115, Device control: status word", bit 12 of the
parameterized axis. In this application, bit 12 of P-0-0115 corre‐
sponds to S-0-0330, message n_act = n_cmd
● Virtual master axis: "VmAxisInt" (as of MPx04VRS)
InVelocity = bit4 AND bit13 of "P-0-0768, Virtual master axis, posi‐
tioning status".
- Bit4 = 1 -> generator provides const. velocity
- Bit13 = 1 -> |P-0-0770 - P-0-0759| < 1rpm or <1mm/min
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-91: Output Variables of the Firmware Function Block "MC_MoveVelocity"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-92: Input / Output Variables of the Firmware Function Block "MC_MoveVe‐


locity"
MC_Stop
The firmware function block "MC_Stop" is used to bring the drive to the status
STOP.
With the rising edge of "Execute" the stopping process is started.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 75/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

If the PLC does not have control over the drive, an error is returned.
When the firmware function block "MC_Stop" is activated via a rising edge at
the "Execute" input, the drive goes to the status "AH" (Drive Halt). Further com‐
mand triggering of a motion function block will only be possible when the axis
is in standstill and the "Execute" input has the value FALSE.
With the deceleration set at "Deceleration" the drive is brought to standstill.
When several instances are called by "MC_Stop" in a project, it is always the
last instance which takes effect. An active "MC_Stop" cannot be interrupted by
an "MB_Stop".
When an instance is called with an edge at "Execute", other instances when
called (without edge) signal CommandAborted = TRUE.
"MC_Stop" has higher priority than "MB_Stop"; this means that a running
"MC_Stop" cannot be aborted by an "MB_Stop".

To test the function block "MC_Stop", the instance variable "Acti‐


vateCounter" can be used. It counts the positive edges of the
"Execute" signal and thereby signals whether the function block is
run with an edge.

Via the firmware function block "MC_Stop" it is also possible to bring


"P‑0‑0759, Virtual master axis, actual velocity value" to standstill via
a defined ramp (defined via "Deceleration" input). For this purpose,
the master axis generator has to be activated via "P‑0‑0917, Control
word of master axis generator", bit0=1. To convert the virtual actual
position value (P‑0‑0758) into the internal virtual master axis posi‐
tion (VmAxisInt, "P‑0‑0761, Master axis position for slave axis"),
"P‑0‑0758, Virtual master axis, actual position value" must be writ‐
ten to the parameter "P‑0‑0916, Master axis format converter signal
selection".
See also Functional Description of firmware "Master Axis
Generator" and "Master Axis Format Converter"

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-93: Firmware Function Block "MC_Stop"


76/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL Slave axis ("Axis1" to "Axis8"): With a rising edge at "Execute" the drive is
switched to "AH".
Master axis generator ("VmAxisInt"): With a rising edge at "Execute" the
master axis generator is brought to the positioning mode "halt" ("P‑0‑0760,
Virtual master axis, positioning control word", bit1 and bit2 to "1").
See also "Input Signals Execute / Enable" on page 22
Deceleration REAL This input sets the deceleration. The deceleration which is set is written to
parameter "S‑0‑0372, Drive Halt acceleration bipolar" of the slave axis (real
axis) or parameter "P‑0‑0772, Virtual master axis, positioning
deceleration" of the virtual master axis generator.

Fig.1-94: Input Variables of the Firmware Function Block "MC_Stop"

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the axis has
stopped.
Slave axis (real axis): When S‑0‑0331, bit0=1
Virtual master axis generator ("VmAxisInt"): When the absolute value of
P‑0‑0759 is smaller than P‑0‑0912
Active BOOL With "Active"=TRUE the firmware function block signals that it determines
the axis motion
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
"MC_Stop" was activated or a drive error was present. A drive error is dis‐
played via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present; the
kind of deceleration depends on the error
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
* See note below
Fig.1-95: Output Variables of the Firmware Function Block "MC_Stop"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes
contained in the list "P‑0‑1601, CCD: Addresses of projected
drives" correspond to the order of "Axis2" to "Axis8" ("Axis2" acts on
the drive of list element 0 of P‑0‑1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-96: Input / Output Variables of the Firmware Function Block "MC_Stop"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 77/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

MC_TorqueControl
The firmware function block "MC_TorqueControl" is used to activate the oper‐
ating mode "torque/force control"; the drive follows the command value input.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-97: Firmware Function Block MC_TorqueControl


Operation mode parameter PLC mode parameter
S-0-0080, Torque/force command value P-0-1465, PLC Torque/force command value
S-0-0822, Torque/force ramp P-0-1466, PLC Torque/force ramp
Fig.1-98: Comparison of Operation Mode Parameters

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


Torque REAL Torque/force command value (S-0-0080)
TorqueRamp REAL Torque/force ramp (S-0-0822) with reference to the torque/force ramp time
(S-0-0823)
Note: If the input "TorqueRamp" is set to 0, the torque/force command val‐
ue is input abruptly.

Fig.1-99: Input Variables of the Firmware Function Block "MC_TorqueControl"

Output variable Data type Description

InTorque BOOL Torque/force command value has been reached.


Note: With the parameter "S-0-0826, Torque/force window", set when the
function block provides the message "InTorque".
Active BOOL Function block or operating mode is active
CommandAborted BOOL Function block was aborted
Error BOOL With "Error"=TRUE the function block signals that an error is present
78/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
* See note below
Fig.1-100: Output Variables of the Firmware Function Block "MC_CamOut"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Slave AXIS_REF Axis1 (only axis for MLD-S or local axis for MLD-M)
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: addresses of projected drives" correspond to
the order according to Axis2 to Axis8 (Axis2 acts on the drive of list element
0 of P-0-1601)

Fig.1-101: Input / Output Variables of the Firmware Function Block "MC_CamOut"


MX_MoveAbsolute
The firmware function block "MX_MoveAbsolute" is used to move the drive to
a preset absolute position. For this purpose, the secondary PLC operation
mode "drive-controlled positioning without lag error with motor encoder" is in‐
ternally activated (see Functional Description of firmware "Drive-Controlled
Positioning").

As of MPx04 the operation mode "drive-controlled positioning" is


internally activated. Make the settings of the position loop (with/
without lag error, actual position value 1/2) with the function block
"MB_SetPositionControlMode".
For permanent control and remote axes, the secondary operation
mode 3 and its parameters are used. For temporary control, the
secondary PLC operation mode 11 and its parameters are used.

The target position has to be preset at the input "Position". Via the inputs "Ve‐
locity", "Acceleration" and "Deceleration" you have to set how the drive moves
to the target position (motion profile).
The corresponding PLC mode parameters are used as internal command val‐
ues instead of the usual operating mode parameters. They can be read for
diagnostic purposes:

Operation mode parameter PLC mode parameter Virt. master axis (as of MPx04)

S-0-0282, Positioning command val‐ P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐
ue ing command value
S-0-0259, Positioning Velocity P-0-1451, PLC Positioning velocity P-0-0770, Virtual master axis, position‐
ing velocity
S‑0‑0260, Positioning Acceleration P-0-1452, PLC Positioning acceleration P-0-0771, Virtual master axis, position‐
ing acceleration
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 79/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Operation mode parameter PLC mode parameter Virt. master axis (as of MPx04)
S-0-0346, Positioning control word P-0-1454, PLC Positioning command value P-0-0760, Virtual master axis, position‐
acceptance ing control word
S-0-0359, Positioning deceleration P-0-1453, PLC Positioning deceleration P-0-0772, Virtual master axis, position‐
ing deceleration

Fig.1-102: Comparison of Operation Mode Parameters

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-103: Firmware Function Block "MX_MoveAbsolute"

Input variable Data type Description

Execute BOOL See chapter 1.4 "Signal Time Diagrams of Most Frequently Used Inputs
and Outputs" on page 22
Position DINT At "Position" you have to preset the target position in fixed point format.
To preset the position correctly, the number of decimal places of parameter
"S‑0‑0282, Positioning command value" must be known.
With preferred scaling (see Functional Description of firmware "Scaling
Types"), the parameter has 4 decimal places.
Example:If the drive is to be moved to a target position of 100.25°, the value
1002500 must be written at "Position".
Velocity REAL Positioning velocity in physical unit
Acceleration REAL Positioning acceleration in physical unit
Deceleration REAL Positioning deceleration in physical unit

Fig.1-104: Input Variables of the Firmware Function Block "MX_MoveAbsolute"


80/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the absolute
target position has been reached. The processing is completed until the
next 0-1 edge at the "Execute" input. When a 1-0 edge is applied to the
"Execute" input before the firmware function block signals that it has been
completed ("Done"=TRUE), the output "Done" is set to TRUE for one call
when the motion target has been reached and the processing of the firm‐
ware function block has not been interrupted by an error or another firm‐
ware function block.
Real axis: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Virtual master axis generator (VmAxisInt): The output is set to TRUE when
bit 2 is set in parameter "P-0-0768, Virtual master axis, positioning status".
Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-107 " Descriptions of "ErrorID" of the
Firmware Function Block "MX_MoveAbsolute" in Target "IndraDrive
MPH02"" on page 81
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
(as of MPx03VRS) exact cause of the error; see chapter 1.5.2 "Error Reference Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-105: Output Variables of the Firmware Function Block "MX_MoveAbsolute"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-106: Input / Output Variables of the Firmware Function Block "MX_MoveAb‐


solute"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 81/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Description

RESSOURCE_ERROR Drive does not have packages enabled for closed-loop


‑ or‑
Invalid axis reference
ACCESS_ERROR_CODE Drive is not in control
‑ or‑
PLC has no control over drive
‑ or‑
Drive has not been homed
‑ or‑
Drive is in status "STOPPING" ("MX_Stop" with active "Execute" input)

Fig.1-107: Descriptions of "ErrorID" of the Firmware Function Block "MX_MoveAb‐


solute" in Target "IndraDrive MPH02"
MX_MoveAdditive
The firmware function block "MX_MoveAdditive" is used to move the drive in
relative form by a distance in addition to the target position. Th new target po‐
sition results from the old target position, plus a distance. The distance is
determined by the "Distance" input. The inputs "Velocity", "Acceleration" and
"Deceleration" determine the motion profile.
For this purpose, the secondary PLC operation mode "drive-controlled posi‐
tioning without lag error with motor encoder" is internally activated (see Func‐
tional Description of firmware "Drive-Controlled Positioning").

As of MPx04 the operation mode "drive-controlled positioning" is


internally activated. Make the settings of the position loop (with/
without lag error, actual position value 1/2) with the function block
"MB_SetPositionControlMode".
For permanent control and remote axes, the secondary operation
mode 3 and its parameters are used. For temporary control, the
secondary PLC operation mode 11 and its parameters are used.

As of MPx04: Via the firmware function block "MX_MoveAdditive",


the parameter "P-0-0758, Virtual master axis, actual position value"
of the master axis generator can be moved in relative form by a
distance in addition to the current target position. For this purpose,
the master axis generator has to be activated via "P-0-0917, Control
word of master axis generator", bit0=1. To convert the virtual actual
position value (P-0-0758) into the internal virtual master axis posi‐
tion (VmAxisInt, "P-0-0761, Master axis position for slave axis"), the
parameter P-0-0758 must be written to parameter "P-0-0916, Mas‐
ter axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera‐
tor" and "Master Axis Format Converter"

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
82/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-108: Firmware Function Block "MX_MoveAdditive"


The corresponding PLC mode parameters are used as internal command val‐
ues instead of the usual operation mode parameters. They can be read for
diagnostic purposes:

Operation mode parameter PLC mode parameter Virt. master axis (as of MPx04)

S‑0‑0282, Positioning command val‐ P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐
ue ing command value
S-0-0259, Positioning Velocity P-0-1451, PLC Positioning velocity P-0-0770, Virtual master axis, position‐
ing velocity
S‑0‑0260, Positioning Acceleration P-0-1452, PLC Positioning acceleration P-0-0771, Virtual master axis, position‐
ing acceleration
S‑0‑0346, Positioning control word P-0-1454, PLC Positioning command value P-0-0760, Virtual master axis, position‐
acceptance ing control word
S‑0‑0359, Positioning deceleration P-0-1453, PLC Positioning deceleration P-0-0772, Virtual master axis, position‐
ing deceleration

Fig.1-109: Comparison of Operation Mode Parameters

Input variable Data type Description

Execute BOOL See chapter 1.4 "Signal Time Diagrams of Most Frequently Used Inputs
and Outputs" on page 22
Distance DINT At "Distance" you have to preset the relative distance in fixed point format.
To preset the distance correctly, the number of decimal places of param‐
eter "S‑0‑0282, Positioning command value" must be known.
With preferred scaling (see Functional Description of firmware "Scaling
Types"), the parameter has 4 decimal places. Example: If the drive is to be
moved by a distance of 100.25°, the value 1002500 must be written at
"Distance"
Velocity REAL Positioning velocity in physical unit
Acceleration REAL Positioning acceleration in physical unit
Deceleration REAL Positioning deceleration in physical unit

Fig.1-110: Input Variables of the Firmware Function Block "MX_MoveAdditive"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 83/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the target po‐
sition has been reached. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the "Done" output is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func‐
tion block has not been interrupted by an error or another firmware function
block.
● Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
● Virtual master axis: (as of MPx04VRS) The output is set to TRUE
when bit 2 is set in parameter "P-0-0768, Virtual master axis, posi‐
tioning status".
Active BOOL With "Active"=TRUE the firmware function block signals that it determines
the axis motion
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is signaled via the "Error" outputs of "MC_Power".
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-113 " Descriptions of "ErrorID" of the
Firmware Function Block "MX_MoveAdditive" in Target "IndraDrive
MPH02"" on page 84
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ** ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
(as of MPx03VRS) the exact cause of the error; see chapter 1.5.2 "Error Reference Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-111: Output Variables of the Firmware Function Block "MX_MoveAdditive"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: Addresses of projected drives" corre‐
spond to the order of "Axis2" to "Axis8" ("Axis2" acts on the drive of list
element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-112: Input / Output Variable of the Firmware Function Block "MX_MoveAd‐


ditive"
84/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Description

RESSOURCE_ERROR_CODE Drive does not have packages enabled for closed-loop


‑ or ‑
Invalid axis reference
ACCESS_ERROR_CODE Drive is not in control
‑ or ‑
PLC has no control over drive
‑ or ‑
Drive is in status "STOPPING" ("MX_Stop" with active "Execute" input)

Fig.1-113: Descriptions of "ErrorID" of the Firmware Function Block "MX_MoveAd‐


ditive" in Target "IndraDrive MPH02"
MX_MoveRelative
The firmware function block "MX_MoveRelative" is used to move the drive in
relative form by a distance, starting from the current actual position. For this
purpose, the secondary PLC operation mode "drive-controlled positioning with‐
out lag error with motor encoder" is internally activated (see Functional De‐
scription of firmware "Drive-Controlled Positioning").

Internally the operation mode "drive-controlled positioning" is acti‐


vated. Make the settings of the position loop (with/without lag error,
actual position value 1/2) with the function block "MB_SetPosition‐
ControlMode".
For permanent control and remote axes, the secondary operation
mode 3 and its parameters are used. For temporary control, the
secondary PLC operation mode 11 and its parameters are used.

The relative distance to be moved has to be preset at the input "Distance". Via
the inputs "Velocity", "Acceleration" and "Deceleration" you have to set the mo‐
tion profile (determines how the relative distance is traveled).
The corresponding PLC mode parameters are used as internal command val‐
ues instead of the usual operating mode parameters. They can be read for
diagnostic purposes:

Via the firmware function block "MX_MoveRelative", the parameter


"P-0-0758, Virtual master axis, actual position value" of the master
axis generator can be moved in relative form by a distance starting
from the current virtual actual position. For this purpose, the master
axis generator has to be activated via "P-0-0917, Control word of
master axis generator", bit 0=1. To convert the virtual actual position
value (P-0-0758) into the internal virtual master axis position
(VmAxisInt, "P-0-0761, Master axis position for slave axis"), the pa‐
rameter P-0-0758 must be written to parameter "P-0-0916, Master
axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera‐
tor" and "Master Axis Format Converter"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 85/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Operation mode parameter PLC mode parameter Virt. master axis (as of MPx04)

S-0-0282, Positioning command val‐ P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐
ue ing command value
S-0-0259, Positioning Velocity P-0-1451, PLC Positioning velocity P-0-0770, Virtual master axis, position‐
ing velocity
S‑0‑0260, Positioning Acceleration P-0-1452, PLC Positioning acceleration P-0-0771, Virtual master axis, position‐
ing acceleration
S-0-0346, Positioning control word P-0-1454, PLC Positioning command value P-0-0760, Virtual master axis, position‐
acceptance ing control word
S-0-0359, Positioning deceleration P-0-1453, PLC Positioning deceleration P-0-0772, Virtual master axis, position‐
ing deceleration

Fig.1-114: Comparison of Operation Mode Parameters

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-115: Firmware Function Block "MX_MoveRelative"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


Distance DINT At "Distance" you have to preset the relative distance to be traveled in fixed
point format.
To preset the distance correctly, the number of decimal places of param‐
eter "S‑0‑0282, Positioning command value" must be known.
With preferred scaling (see Functional Description of firmware "Scaling
Types"), the parameter has 4 decimal places. Example: If the drive is to be
moved by a distance of 100.25° starting from the current actual position,
the value 1002500 must be written at "Distance"
Velocity REAL Positioning velocity in physical unit
86/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


Acceleration REAL Positioning acceleration in physical unit
Deceleration REAL Positioning deceleration in physical unit

Fig.1-116: Input Variables of the Firmware Function Block "MX_MoveRelative"

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the preset dis‐
tance has been traveled. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func‐
tion block has not been interrupted by an error or another firmware function
block.
● Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
● Virtual master axis: (as of MPx04VRS) The output is set to TRUE
when bit 2 is set in parameter "P-0-0768, Virtual master axis, posi‐
tioning status".
Active BOOL With TRUE the output "Active" signals that it determines the axis motion.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present. A drive
error is displayed via the Error outputs of "MC_Power"
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-119 " Descriptions of "ErrorID" of the
Firmware Function Block "MX_MoveRelative" in Target "IndraDrive
MPH02"" on page 87
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
(as of MPx03VRS) exact cause of the error; see chapter 1.5.2 "Error Reference Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-117: Output Variables of the Firmware Function Block "MX_MoveRelative"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
● "VmAxisInt" corresponds to the virtual master axis generator

Fig.1-118: Input / Output Variables of the Firmware Function Block "MX_MoveRe‐


lative"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 87/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Description

RESSOURCE_ERROR_CODE Drive does not have packages enabled for closed-loop


‑ or ‑
Invalid axis reference
ACCESS_ERROR_CODE Drive is not in control
‑ or ‑
PLC has no control over drive
‑ or ‑
Drive is in status "STOPPING" ("MX_Stop" with active "Execute" input)

Fig.1-119: Descriptions of "ErrorID" of the Firmware Function Block "MX_MoveR‐


elative" in Target "IndraDrive MPH02"
MX_MoveVelocity
The firmware function block "MX_MoveVelocity" is used to preset a velocity for
the drive; for this purpose, the secondary PLC operating mode "velocity control
with motor encoder" is internally activated.

As the drive moves in velocity control, the firmware function block


can be used for open-loop drives, too.

In contrast to the output "Done", the output "InVelocity" signals con‐


tinuous (error-free) fulfillment of the task. The function block never
completes the processing. "InVelocity" keeps being displayed as
long as "Execute" is active.

The corresponding PLC mode parameters are used as internal command val‐
ues instead of the usual operating mode parameters. They can be read for
diagnostic purposes:

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"".

Fig.1-120: Firmware Function Block "MX_MoveVelocity"


88/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


Velocity REAL Velocity in physical unit
Acceleration REAL Acceleration in physical unit
Deceleration REAL Deceleration in physical unit

Fig.1-121: Input Variables of the Firmware Function Block "MX_MoveVelocity"

Output variable Data type Description

InVelocity BOOL With "InVelocity"=TRUE the firmware function block signals that the ve‐
locity preset by "Velocity" has been reached. When a 1-0 edge is applied
to the "Execute" input before the firmware function block signals that it has
reached the command velocity ("InVelocity"=TRUE), the output "InVeloci‐
ty" is set to TRUE for one call if the actual velocity corresponds to the
command velocity
Active BOOL With TRUE the output "Active" signals that the drive was switched to the
corresponding secondary PLC operation mode and processes the input
command values (drive follows input). When the firmware function block
signals "InVelocity"=TRUE, "CommandAborted"=TRUE or "Error"=TRUE,
the output is set to FALSE again
CommandAborted BOOL The output "CommandAborted" is set to TRUE when the firmware function
block was aborted by another motion function block
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-124 " Descriptions of "ErrorID" of the
Firmware Function Block "MX_MoveVelocity" in Target "IndraDrive
MPH02"" on page 89
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
(as of MPx03VRS) exact cause of the error; see chapter 1.5.2 "Error Reference Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-122: Output Variables of the Firmware Function Block "MX_MoveVelocity"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-123: Input / Output Variables of the Firmware Function Block "MX_MoveVe‐


locity"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 89/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Description

RESSOURCE_ERROR_CODE Invalid axis reference


ACCESS_ERROR_CODE Drive is not in control
‑ or ‑
PLC has no control over drive
‑ or ‑
Drive is in status "STOPPING" ("M?_Stop" with active "Execute" input)

Fig.1-124: Descriptions of "ErrorID" of the Firmware Function Block "MX_MoveVe‐


locity" in Target "IndraDrive MPH02"
MX_Stop
The firmware function block "MX_Stop" is used to bring the drive to the status
STOP.
Functional Principle With the rising edge of "Execute" the stopping process is started. "Done" signals
standstill.
Currently running positioning processes go to the status MCFB_ABORTED,
that is they are signaling CommandAborted := TRUE.
With the deceleration value parameterized in "S‑0‑0372, Drive Halt acceleration
bipolar" the drive is brought to standstill.
With the duration of the TRUE level of "Execute", the drive can be kept in status
STOP; during that time no other motion function block can be started.
The "Execute" input acts on the "AH" signal in a level-oriented way so that the
drive remains in status "AH" and therefore does not allow motion.
When the "Execute" input goes to FALSE again, the drive remains in the PLC
mode "drive-controlled positioning" (with "halt") until it is moved again with an‐
other function block.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"".

Fig.1-125: Firmware Function Block "MX_Stop"


90/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL With a rising edge at "Execute" the drive is switched to "AH".
With a falling edge the PLC mode "positioning" with the positioning mode
"positioning halt" is activated.

Fig.1-126: Input Variables of the Firmware Function Block "MX_Stop"

Output variable Data type Description

Done BOOL With "Done"=TRUE (S-0-0331, bit 0=1) the firmware function block signals
that the drive has stopped. Only when the input "Execute" is TRUE is the
output "Done" generated
Active BOOL The output "Active" signals with TRUE that the drive has accepted the
command and starts processing. Feedbacks of the operating mode are
valid as of that point of time.
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-129 " Descriptions of "ErrorID" of the
Firmware Function Block "MX_Stop" in Target "IndraDrive MPH02"" on
page 90
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
(as of MPx03VRS) exact cause of the error; see chapter 1.5.2 "Error Reference Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-127: Output Variables of the Firmware Function Block "MX_Stop"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-128: Input / Output Variables of the Firmware Function Block "MX_Stop"

ErrorID Description

RESSOURCE_ERROR_CODE Invalid axis reference


ACCESS_ERROR_CODE Drive is not in control
‑ or ‑
PLC has no control over drive

Fig.1-129: Descriptions of "ErrorID" of the Firmware Function Block "MX_Stop" in


Target "IndraDrive MPH02"

1.10 MX_SysLibCom.lib
1.10.1 Overview
The library contains functions for the access to a serial interface:
● MX_fSysComStatus
● MX_SysComOpenAsync
● SysComClose
● SysComOpen
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 91/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● SysComRead
● SysComWrite

1.10.2 MX_fSysComStatus
With the firmware function "MX_fSysComStatus" it is possible to poll the status
of the opened port.

Present errors are cleared after the function was called!

This function can only work on the local axis "Axis1".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-130: Firmware Function Block "MX_fSysComStatus"

Input variable Data type Description

dwHandle DWORD Port Handle assigned by "SysOpencom"

Fig.1-131: Input Variable of the Firmware Function "MX_fSysComStatus"

Return value Data type Description

MX_fSysComStatus DWORD The value returned by the function displays the status of the requested interface.
The bits have the following significance:
● Bit #0: Receive buffer overflow
● Bit #1: Transmit buffer overflow
● Bit #2: Parity error was detected
● Bit #3: Break was detected
● Bit #4: "Fram" error was detected
● Bit #5: Not used
● Bit #6: Calling task has not opened the port
● Bit #7: Handle is invalid
● Bit #8: Receive buffer contains characters
● Bit #9: Transmit buffer contains characters

Fig.1-132: Return Value of the Firmware Function "MX_fSysComStatus"

1.10.3 MX_SysComOpenAsync
The firmware function block "MX_SysComOpenAsync" is used to asynchro‐
nously open the communication channel of a serial interface.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
92/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-133: Firmware Function Block "MX_SysComOpenAsync"

Input variable Data type Description

Execute BOOL See chapter 1.4 "Signal Time Diagrams of Most Frequently Used Inputs
and Outputs" on page 22
Port PORTS Indicate the serial interface to be opened.
Note: For the drive controllers of the IndraDrive range, it is only possible to
select the serial interface "COM1".

Fig.1-134: Input Variables of the Firmware Function Block "MX_SysComOpenA‐


sync"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted the
processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.5.2 "Error Reference Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 28
Handle DWORD When "Done"=TRUE, the Port Handle is applied at "Handle" for transmission to
the functions for data exchange via the serial interface ("SysComRead", "Sy‐
sComWrite" etc.).
If the port cannot be opened, 0xFFFFFFFF is returned.

Fig.1-135: Output Variables of the Firmware Function Block "MX_SysComOpenA‐


sync"

1.10.4 SysComClose
The firmware function "SysComClose" is used to close the communication
channel of a serial interface (COM Port).

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 93/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-136: Firmware Function "SysComClose"

Input variable Data type Description

dwHandle DWORD Transmission of the interface access received from "SysComOpen" or "MX_Sy‐
sComOpenAsync" (Port Handle)

Fig.1-137: Input Variables of the Firmware Function "SysComClose"

Return value Data type Description

SysComClose BOOL With "SysComClose"=TRUE the function signals that the commu‐
nication channel was successfully closed

Fig.1-138: Return Value of the Firmware Function "SysComClose"

1.10.5 SysComOpen
The firmware function "SysComOpen" is used to open the communication
channel of a serial interface.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-139: Firmware Function "SysComOpen"

Input variable Data type Description

Port Ports Indicate the serial interface to be opened.


Note: For the drive controllers of the IndraDrive range, it is only possible to select
the serial interface "COM1".

Fig.1-140: Input Variables of the Firmware Function "SysComOpen"

Return value Data type Description

SysComOpen DWORD Port Handle for transmission to the functions for data exchange via
the serial interface (SysComRead, SysComWrite etc.).
If the port cannot be opened, 0xFFFFFFFF is returned as Handle.

Fig.1-141: Return Value of the Firmware Function "SysComOpen"

1.10.6 SysComRead
The firmware function "SysComRead" is used to read data from the serial in‐
terface.
94/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-142: Firmware Function "SysComRead"

Input variable Data type Description

dwHandle DWORD Access (Handle) to the serial interface received from "SysComOpen" or "MX_Sy‐
sComOpenAsync"
dwBufferAddress DWORD Address to which the bytes which were read are to be copied.
The address of the interface can be determined by means of the operator "ADR".
dwBytesToRead DWORD Number of bytes which are to be read
dwTimeout DWORD Time in [ms] after which the function returns at the latest

Fig.1-143: Input Variables of the Firmware Function "SysComRead"

Return value Data type Description

SysComRead DWORD Number of bytes actually read

Fig.1-144: Return Value of the Firmware Function "SysComRead"

1.10.7 SysComWrite
The firmware function "SysComWrite" is used to write data to the serial inter‐
face.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-145: Firmware Function "SysComWrite"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 95/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

dwHandle DWORD Access (Handle) to the serial interface received from "SysComOpen" or "MX_Sy‐
sComOpenAsync"
dwBufferAddress DWORD Address from which the data, which are to be written to the interface, are to be
taken.
The address of the interface can be determined by means of the operator "ADR".
dwBytesToWrite DWORD Number of bytes which are to be written
dwTimeout DWORD Time in [ms] after which the function returns at the latest

Fig.1-146: Input Variables of the Firmware Function "SysComWrite"

Return value Data type Description

SysComWrite DWORD Number of bytes actually written

Fig.1-147: Return Value of the Firmware Function "SysComWrite"

1.11 MX_Base.lib
1.11.1 Introduction
The following libraries contain
● general functions,
● function blocks/functions for drive control,
● functions for diagnosis,
● function blocks/functions for parameters,
● functions for scaling,
● data types or structures,
● cyclic parameters as direct variables (system-wide variables) and
● axis structures [for multi-axis system (MLD system mode)].
Target Library
IndraDrive MPH02 Base_MPH02.lib
IndraDrive MP03 Base_MP03.lib
IndraDrive MP04
IndraDrive MP05
MX_Base.lib
IndraDrive MP06
IndraDrive MP07
Fig.1-148: Library Names Depending on the Targets
When a new project with an IndraDrive target is created, the corresponding
"Base" library is automatically included in the project and visible.
Namespace All function blocks of the "Base" libraries begin with the prefix "MX_", "MC_" or
"MB_". "MX" represents function blocks which have been specifically program‐
med for the drive PLC. "MC" represents system-independent, 100-percent
PLCopen function blocks. "MB" represents system-independent function block
with motion-oriented functionalities. "MB" function blocks have not been
PLCopen-certified but are based on this standard.
Functions begin with the prefix "MX_f".
Public data types normally start with "MX_" and are capitalized. Internal data
types start with "INT_MX_" and are capitalized.
96/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1.11.2 "Tools" - General Functions and Function Blocks


Overview
● ATAN2
● MX_fGetFreeTicks
● MX_fGetHighResTime
● MX_fHighResTimerTicks_to_us
● MX_IECTaskGetLoad*1
● MX_PositionLoopEventInfo*1
*1 Available as of target "IndraDrive MP05"
ATAN2
For the conversion of Cartesian coordinates P(x;y) into polar coordinates
P(r;φ), the function "ATAN2" is used to determine the angle φ.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-149: Firmware Function "ATAN2"

Input variable Data type Description

x REAL Cartesian coordinate x


y REAL Cartesian coordinate y

Fig.1-150: Input Variables of the Firmware Function "ATAN2"

Return value Data type Description

ATAN2 REAL φ

Fig.1-151: Return Value of the Firmware Function "ATAN2"


MX_fGetFreeTicks
The firmware function "MX_fGetFreeTicks" is used to determine the time of the
last PLC time slice still available to the PLC. This PLC time slice is that part of
a millisecond which remains after the drive controller and control tasks have
been processed.
Timer ticks are returned that can be converted into microseconds with the func‐
tion "MX_fHighResTimerTicks_to_us".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 97/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● When a freewheeling task is active, "0" is always returned in


this case because this task works for the whole time slice.
● If "MX_fGetFreeTicks" is called in a task which has a clock
slower than 1 ms, only the available time of the last ms time
slice is displayed.
● When a cyclic task takes more time to be processed than the
cycle time which was set, "MX_fGetFreeTicks" always returns
the value "0".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-152: Firmware Function "MX_fGetFreeTicks"

Input variable Data type Description

Dummy INT There is always one input variable required for the compiler

Fig.1-153: Input Variable of the Firmware Function "MX_fGetFreeTicks"

Return value Data type Description

MX_fGetFreeTicks DINT Returns timer ticks. The timer ticks can be converted into μs with the function
"MX_fHighResTimerTicks_to_us"

Fig.1-154: Return Value of the Firmware Function "MX_fGetFreeTicks"


MX_fGetHighResTime
The firmware function "MX_fGetHighResTime" returns a growing timer value
with high resolution.
Timer ticks are returned that can be converted into microseconds with the func‐
tion "MX_fHighResTimerTicks_to_us".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
98/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-155: Firmware Function "MX_fGetHighResTime"

Input variable Data type Description

Dummy INT There is always one input variable required for the compiler

Fig.1-156: Input Variable of the Firmware Function "MX_fGetHighResTime"

Return value Data type Description

MX_fGetHighResTime UDINT Returns timer ticks. The timer ticks can be converted into μs with the function
"MX_fHighResTimerTicks_to_us"

Fig.1-157: Return Value of the Firmware Function "MX_fGetHighResTime"


MX_fHighResTimerTicks_to_us
The firmware function "MX_fHighResTimerTicks_to_us" is used to convert tim‐
er ticks into microseconds and return the value as REAL.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-158: Firmware Function "MX_fHighResTimerTicks_to_us"

Input variable Data type Description

HighResTimerTicks UDINT Transfer values are timer ticks (see, for example, "MX_fGetHighRes‐
Time")

Fig.1-159: Input Variable of the Firmware Function "MX_fHighResTimer‐


Ticks_to_us"

Return value Data type Description

MX_fHighResTimerTicks_to_us REAL Returns the timer ticks in μs

Fig.1-160: Return Value of the Firmware Function "MX_fHighResTimer‐


Ticks_to_us"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 99/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

MX_IECTaskGetLoad
The function block "MX_IECTaskGetLoad" is used to activate the extended
runtime measurement and displays information on the task load (see also Ap‐
plication Manual on IndraMotion MLD, chapter "Runtime Measurements").

As soon as a function block instance has been created in the proj‐


ect, the extended runtime measurement is activated in the drive. It
can only be activated in the MPH firmware (not MPB).

The function block "MX_IECTaskGetLoad" can be called in the


"own" task, but also in another (slower) task to save calculating
time. The maximum task load is also measured, if the function block
is not called in every cycle.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-161: Firmware Function Block "MX_IECTaskGetLoad"

Input variable Data type Description

bEnable BOOL At "bEnable"=TRUE the task information of the task named at the "stTas‐
kName" input is returned.
stTaskName STRING At "stTaskName" indicate the name of the task the runtime information of which
is to be displayed

Fig.1-162: Input Variables of the Firmware Function Block "MX_IECTaskGet‐


Load"
100/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

bDone BOOL "bDone" returns TRUE, if the task exists and the outputs are valid
bError BOOL With "Error"=TRUE the function block signals that an error is present:
● The task was not found (wrong task name) or
● The extended runtime measurement was activated in the MPB firmware,
but this firmware does not support extended runtime measurement
IecTaskLoad MX_IECTASKLOAD Runtime information of the task
Elements in "IecTaskLoad":
● "rLoad" displays the load of the task in the last cycle in percent, with
reference to the cycle time
● "rLoadMax" displays the maximum load of the task in percent, with ref‐
erence to the cycle time
● "rFreeTime" displays the remaining unused calculating time of the task
up to its next start, from the last cycle in µs
● "rMinFreeTime" displays the minimum remaining unused calculating
time of the task up to its next start in µs

Fig.1-163: Output Variables of the Firmware Function Block "MX_IECTaskGet‐


Load"
MX_PositionLoopEventInfo
The function block "MX_PositionLoopEventInfo" is for exclusive use
by Bosch Rexroth staff.

1.11.3 "Drive Control" - Function Blocks/Functions for Drive Control


Overview
● MB_Home
● MB_PreSetMode
● MX_Power / MC_Power
● MC_ReadStatus
● MX_Reset / MC_Reset
● MX_Command
● MX_SetControl
● MX_SetDeviceMode
● MX_SetOpMode
● MB_SetPositionControlMode
MB_Home
With the function block "MB_Home" it is possible to carry out the "drive-con‐
trolled homing procedure" in the selected axis.
It is thereby possible to establish the position data reference for non-absolute
encoders.
In the homing parameter, details for carrying out the homing procedure have to
be set. After the function block was carried out, the axis is in standstill.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 101/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-164: Firmware Function Block "MB_Home"

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22

Fig.1-165: Input Variable of the Firmware Function Block "MB_Home"

Output variable Data type Description

Done BOOL Homing completed, velocity 0


Active BOOL With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that another
motion function block was activated or a drive error was present.
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives
the exact cause of the error
* See note below
Fig.1-166: Output Variables of the Firmware Function Block "MB_Home"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis1 (only axis for MLD-S or local axis for MLD-M)
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: addresses of projected drives" correspond to
the order according to Axis2 to Axis8 (Axis2 acts on the drive of list ele‐
ment 0 of P-0-1601)

Fig.1-167: Input / Output Variables of the Firmware Function Block "MB_Home"


102/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

MB_PreSetMode
With the function block "MB_PreSetMode" the axis can be prepared for com‐
mand triggering before power is switched on (PreSetMode / preselecting op‐
erating modes).
"MB_PreSetMode" already commands the axis with the corresponding data,
but the axis only starts when power is switched on with "MC_Power" and then
directly follows the input values.

"MB_PreSetMode" can only be activated in the operating mode


without power and without error. After activation with a rising "Ex‐
ecute" edge it is allowed to activate a motion function block (such
as "MC_MoveVelocity") or "MX_SetOpMode".

The following points exemplify a typical sequence when using the function block
"MB_PreSetMode":
1. Switch drive on
2. Switch or wait until drive in operating mode ("bb")
3. Activate "MB_PreSetMode" with rising "Execute" edge
4. Start a motion function block (in "Ab")
5. Switch power on with "MC_Power"
The axis immediately starts moving in the desired way

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-168: Firmware Function Block "MB_PreSetMode"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset

Fig.1-169: Input Variable of the Firmware Function Block "MB_PreSetMode"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the
task has been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 103/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Value DINT When the output "Done"=TRUE, "Value" displays the value of the selected
element
* See note below
Fig.1-170: Output Variables of the Firmware Function Block "MB_PreSetMode"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
● "Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes
contained in the list "P-0-1601, CCD: addresses of projected drives"
correspond to the order according to "Axis2" to "Axis8" ("Axis2" acts
on the drive of list element 0 of P-0-1601)

Fig.1-171: Input / Output Variables of the Firmware Function Block "MB_PreSet‐


Mode"
MX_Power / MC_Power
When the internal PLC has permanent or temporary control over the drive, drive
enable can be activated with this function block. Independent of the "Enable"
input, the "Status" output returns the current drive status.
The function block "MX_Power" or "MC_Power" sets the PLC-internal signal
"ON" to TRUE and thereby switches the drive on.

The "ON" signal is the "ON" signal of the PLC that becomes active,
linked to the external signal, in the drive with a possible delay (max.
1ms for ADVANCED, max. 2ms for BASIC or IndraDrive Mi); when
several edges are generated (e.g. "TRUE ‑ FALSE ‑ TRUE"), this
delay time must be taken into account.

When a WATCHDOG or an exception occurs in the PLC, the PLC-internal "ON"


signal is automatically set to FALSE and maintained FALSE until the next RE‐
SET of the PLC.
Further calls of "MX_Power" / "MC_Power" with TRUE signal error.
If the drive is not yet ready for power on (e.g. not in "Ab"), the "Status" output
provides FALSE and the "Error" output is TRUE.

As of MPx04V08, "MC_Power" also provides an error, when a mo‐


tion function block has detected an error and shut down the axis.

After every error ("Error"=TRUE), a new 0-1 edge has to be applied to the input
"Enable" to activate drive enable in the drive.
104/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-172: Firmware Function Block "MX_Power" (Looks Like Firmware Function


Block "MC_Power", Except for the Function Block Name)

Input variable Data type Description

Enable BOOL Via the "Enable" input, drive enable can be set for the drive. For safety reasons,
the input takes effect in edge-controlled form. Drive enable is set with a rising
edge and with a falling edge it is removed again.

Fig.1-173: Input Variables of the Firmware Function Block "MX_Power" / "MC_Pow‐


er"

Output variable Data type Description

Status BOOL When the output "Status"=TRUE, drive enable is active and the drive is under
torque. Independent of the "Enable" input, the "Status" output returns the cur‐
rent drive status. For this purpose, the combination "drive in control and no
error" is internally checked. Output status := (P115.14 AND P115.15 AND NOT
P115.13).
The "Status" output therefore goes to FALSE in the case of drive errors
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-176 " Descriptions of "ErrorID" of the Firm‐
ware Function Block "MX_Power" in Target "IndraDrive MPH02"" on page
105
As of target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
(as of MPx03VRS) exact cause of the error; see chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-174: Output Variables of the Firmware Function Block "MX_Power" /


"MC_Power"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 105/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
"MX_Power":
● "Axis1" (global variable)
"MC_Power":
● "Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: Addresses of projected drives" corre‐
spond to the order of "Axis2" to "Axis8" ("Axis2" acts on the drive of list
element 0 of P-0-1601)

Fig.1-175: Input / Output Variable of the Firmware Function Block "MX_Power" /


"MC_Power"

ErrorID Description

RESSOURCE_ERROR Invalid axis reference


ACCESS_ERROR "Power" with "Enable"=TRUE not possible, as drive not in operating mode
‑ or ‑
"Power" with "Enable"=TRUE not possible, as PLC in watchdog
STATE_MACHINE_ERROR Drive is not in phase 4
‑ or ‑
Drive was shutdown externally or by error of a motion function block
‑ or ‑
Drive is not in mode "AB"
‑ or ‑
Drive was brought to PreSetMode but not commanded, see "MB_PreSetMode"

Fig.1-176: Descriptions of "ErrorID" of the Firmware Function Block "MX_Power"


in Target "IndraDrive MPH02"
MC_ReadStatus
With the function block "MC_ReadStatus" it is possible to read the current status
of the axis. The status of the axis is output in decoded form.

Any change of the axis at the input of the function block requires a
repeated 0/1 transition at "Enable".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
106/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-177: Firmware Function Block "MC_ReadStatus"

Input variable Data type Description

Enable BOOL See "Input Signals Execute / Enable" on page 22

Fig.1-178: Input Variable of the Firmware Function Block "MC_ReadStatus"

Output variable Data type Description

Done BOOL Valid value is available


Active BOOL Processing of the data is running after completion of pre-processing
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
Errorstop BOOL Drive/axis in status "Errorstop"
Stopping BOOL Drive/axis in status "Stopping"
StandStill BOOL Drive/axis in status "StandStill"
DiscreteMotion BOOL Drive/axis in status "DiscreteMotion"
ContinuousMotion BOOL Drive/axis in status "ContinuousMotion"
SynchronizedMotion BOOL Drive/axis in status "SynchronizedMotion"
Homing BOOL Drive in status "Homing"
Disabled BOOL Drive/axis in status "Disabled"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 107/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


PreSetMode BOOL Drive in status "PreSetMode"
CoordinatedMotion BOOL Drive/axis in status "CoordinatedMotion"; not supported by the target
"IndraDrive"!
* See note below
Fig.1-179: Output Variables of the Firmware Function Block "MC_ReadStatus"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis1 (only axis for MLD-S or local axis for MLD-M)
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: Addresses of projected drives" correspond to
the order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)

Fig.1-180: Input / Output Variables of the Firmware Function Block "MC_ReadSta‐


tus"
MX_Reset / MC_Reset
The function block "MX_Reset" or "MC_Reset" is used to reset drive errors with
the command "S‑0‑0099, C0500 Reset class 1 diagnostics".
In order that the function block can correctly complete the reset command, it
has to be cyclically called until it signals "Done"=TRUE or "Error" in the case of
error.

If the command "S‑0‑0099, C0500 Reset class 1 diagnostics" is al‐


ready active, it should first be completed before "MX_Reset" /
"MC_Reset" is called. If "MX_Reset" / "MC_Reset" had been acti‐
vated and has not yet been completed, it is possible to trigger
another reset with a positive edge at "Execute".

For the function block "MX_Reset" (only targets


"IndraDrive MPH02" and "IndraDrive MP03"), the Motion Control is
in addition reset and temporary PLC control is ceded again.
As of the target "IndraDrive MP04", only the command "S‑0‑0099,
C0500 Reset class 1 diagnostics" is executed; drive enable remains
unchanged.
108/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Only for the function block "MC_Reset": In the case of a remote axis,
the task is ceded to the service channel (SERCOS III). Only at a
later call can the function block signal "Done". Therefore, the re‐
sulting times for the function block calls themselves are always
short. The outputs "Done" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the
load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-181: Firmware Function Block "MX_Reset" (Looks Like Firmware Function


Block "MC_Reset", Except for the Function Block Name)

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling edge,
all outputs are reset

Fig.1-182: Input Variables of the Firmware Function Block "MX_Reset" / "MC_Re‐


set"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 109/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-185 " Descriptions of "ErrorID" of the Firmware
Function Block "MX_Reset" in Target "IndraDrive MPH02"" on page 109
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
(as of MPx03VRS) cause of the error; see chapter 1.5.2 "Error Reference Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 28

Fig.1-183: Output Variables of the Firmware Function Block "MX_Reset" / "MC_Re‐


set"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
"MX_Reset":
● "Axis1" (global variable)
"MC_Reset":
● "Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: addresses of projected drives" corre‐
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)

Fig.1-184: Input / Output Variable of the Firmware Function Block "MX_Reset" /


"MC_Reset"

ErrorID Description

RE‐ Invalid axis reference


SSOURCE_ERROR
ACCESS_ERROR Drive refuses "Reset" command

Fig.1-185: Descriptions of "ErrorID" of the Firmware Function Block "MX_Reset" in


Target "IndraDrive MPH02"
MX_Command
The function block "MX_Command" is used to execute a drive command.
The command is activated or deactivated with the "Enable" input. If TRUE is
provided at the input, the command is started by writing "3" (dec.). In the case
of FALSE, the command is aborted/terminated by writing "0".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
110/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-186: Firmware Function Block "MX_Command"

Fig.1-187: Executing a Drive Command


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 111/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can "CmdStatus" signal
"MX_CMD_END_OK". Therefore, the resulting times for the func‐
tion block calls themselves are always short. The outputs "CmdSta‐
tus" and "Error" have to be cyclically polled. The data transmission
can take several seconds, depending on the load of the service
channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Input variable Data type Description

Enable BOOL The function block is status-controlled. The command is started with "Ena‐
ble"=TRUE, it is cleared with "Enable"=FALSE
CmdIdent DINT IDN of the command
or
MB_IDN (as of
MPx06)

Fig.1-188: Input Variables of the Firmware Function Block "MX_Command"

Output variable Data type Description

CmdStatus MX_CMD_STATUS The output displays the current status of the command.
Enum values for "CmdStatus" output:
● "MX_CMD_NO_ACTIVE": Command has not been set
● "MX_CMD_SETTING": Command has been set
● "MX_CMD_END_OK": Command completed without error
● "MX_CMD_IS_BREAK": Command interrupted
● "MX_CMD_IS_WORK": Command being processed
● "MX_CMD_BREAK_ERROR": Command aborted with error
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-191 " Descriptions of "ErrorID" of the Firm‐
ware Function Block "MX_Command" in Target "IndraDrive MPH02"" on page
112
As of target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐
tion Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
(as of MPx03VRS) exact cause of the error; see chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-189: Output Variables of the Firmware Function Block "MX_Command"


112/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Defines the axis. The following axes are possible:
MPx02 and MPx03:
● "Axis1" (global variable)
As of MPx04:
● "Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
● "Axis2" to "Axis8" correspond to the remote axes. The remote axes con‐
tained in the list "P-0-1601, CCD: Addresses of projected drives" corre‐
spond to the order of "Axis2" to "Axis8" ("Axis2" acts on the drive of list
element 0 of P-0-1601)
Note: The input is only applied at a rising edge of the Enable input. If several
axes are to be controlled, a separate instance should be used for each axis.

Fig.1-190: Input / Output Variable of the Firmware Function Block "MX_Command"

ErrorID Description

EINGANGS_RANGE_ERROR_CODE IDN is not available


‑ or ‑
IDN is no parameter
ACCESS_ERROR Access not allowed

Fig.1-191: Descriptions of "ErrorID" of the Firmware Function Block "MX_Com‐


mand" in Target "IndraDrive MPH02"
MX_SetControl
The function block "MX_SetControl" is used to switch control between master
communication and PLC; this makes sense when the axis is first controlled via
a master communication and the internal PLC is to continue controlling the axis
in a certain situation (e.g. error).

When the axis generally is to be moved with the internal PLC, per‐
manent control should be activated.

With "PLCControl"=TRUE the PLC gets control over the drive, with "PLCCon‐
trol"=FALSE the external master communication gets control over the drive.
The signals "Drive Halt" (AH), "Drive on" (ON) and the operation mode selection
are switched. With PLC control, the signals "AH" and "ON" are only operated
internally. The "Drive Halt" signal is controlled by the function block "MX_Stop"
or by stopping the PLC. The "ON" signal can be controlled with the function
block "MX_Power".
If the corresponding function blocks are not used, the internal signals are set
to TRUE.
When switching to temporary control, the internal "ON" signal is set to TRUE.
This results in the following behavior when temporary control was gotten with
"MX_SetControl":
● Switching off: With the firmware function block MX_Power/MC_Power.
In order that the firmware function block can detect a TRUE/FALSE tran‐
sition at its Enable input, it must be called at least once with Enable=TRUE.
● Switching on: With the firmware function block "MX_Power"/"MC_Power".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 113/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

In order that the firmware function block can detect a FALSE/TRUE tran‐
sition at its Enable input, it must be called at least once with Ena‐
ble=FALSE. This measure is not necessary when switching from the
parameter mode to the operating mode takes place between the call of
"MX_SetControl" and "MC_Power".

The function block "MX_SetControl" supplies error if permanent


control is already active (setting via "P‑0‑1367, PLC configuration").
While switching is running ("Done" and "Error" not yet TRUE), an‐
other switching process can be started with an "Execute" edge.
In the case of program download (no online change) or PLC reset,
temporary control is automatically ceded again.

To be observed for PLCopen motion function blocks as of target


"IndraDrive MP04":
● With temporary control, the secondary PLC operation modes
are used.
● With permanent control, the primary mode of operation and
the secondary operation modes 1-6 are parameterized and
used.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-192: Firmware Function Block "MX_SetControl"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". All outputs, except
for the "PLCControlStat" output, are reset with a falling edge at "Execute".
Independent of "Execute", "PLCControlStat" provides the actual value.
PLCControl BOOL With "PLCControl"=TRUE the internal PLC gets temporary control over the drive
at the next 0-1 edge at "Execute".
With "PLCControl"=FALSE control is ceded to the master communication at the
next 0-1 edge at "Execute".

Fig.1-193: Input Variables of the Firmware Function Block "MX_SetControl"


114/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-196 " Descriptions of "ErrorID" of the Firmware
Function Block "MX_SetControl" in Target "IndraDrive MPH02"" on page 114
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐
(as of MPx03VRS) act cause of the error; see chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
PLCControlStat BOOL With "PLCControlStat"=TRUE the drive-internal PLC has control over the drive.
With "PLCControlStat"=FALSE the master communication has control over the
drive.
Independent of "Execute", "PLCControlStat" provides the actual value.

Fig.1-194: Output Variables of the Firmware Function Block "MX_SetControl"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-195: Input / Output Variables of the Firmware Function Block "MX_SetCon‐


trol"

ErrorID Description

RE‐ Invalid axis reference


SSOURCE_ERROR
ACCESS_ERROR Permanent control has already been set ("P‑0‑1367, PLC
configuration")

Fig.1-196: Descriptions of "ErrorID" of the Firmware Function Block "MX_SetCon‐


trol" in Target "IndraDrive MPH02"
MX_SetDeviceMode
The function block "MX_SetDeviceMode" is used to switch the drive to the pa‐
rameter or operating mode.
If switching is not allowed ("P‑0‑4086, Master communication status", bit 0=0),
the function block returns an error via "Error".
A mode is set by a rising edge of "Execute". Independent of "Execute", the
current status is displayed in the output "ActOperationMode".

During the switching process, "MX_SetDeviceMode" should be


called until the output "Done" or the output "Error" becomes TRUE.
Otherwise, direct switching might not be possible again, as
"MX_SetDeviceMode" then possibly is not in its initial status.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 115/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-197: Firmware Function Block "MX_SetDeviceMode"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". All outputs, except
for the output "ActOperationMode", are reset with a falling edge at "Execute".
Independent of "Execute", the current communication phase is displayed at "Ac‐
tOperationMode".
OperationMode BOOL With "OperationMode"=TRUE the drive is switched to operating mode (phase 4)
with the next 0-1 edge at "Execute".
With "OperationMode"=FALSE the drive is switched to parameter mode
(phase 2) with the next 0-1 edge at "Execute".

Fig.1-198: Input Variables of the Firmware Function Block "MX_SetDeviceMode"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-201 " Descriptions of "ErrorID" of the Firmware
Function Block "MX_SetDeviceMode" in Target "IndraDrive MPH02"" on page
116
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
(as of MPx03VRS) cause of the error; see chapter 1.5.2 "Error Reference Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 28
ActOperationMode BOOL With "ActOperationMode"=TRUE the drive is in operating mode (phase 4).
With "ActOperationMode"=FALSE the drive is in parameter mode (2<=current
phase 4).
Independent of "Execute", the current communication phase is displayed at "Ac‐
tOperationMode".

Fig.1-199: Output Variables of the Firmware Function Block "MX_SetDeviceMode"


116/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-200: Input / Output Variables of the Firmware Function Block "MX_SetDevi‐


ceMode"

ErrorID Description

RE‐ Invalid axis reference


SSOURCE_ERROR
ACCESS_ERROR Phase switch not allowed
‑ or ‑
Switching impossible as parameter faulty

Fig.1-201: Descriptions of "ErrorID" of the Firmware Function Block "MX_SetDevi‐


ceMode" in Target "IndraDrive MPH02"
MX_SetOpMode
The function block "MX_SetOpMode" is used to directly switch the operation
mode of the drive.
The current operation mode is provided independent of "Execute". The primary
operation mode corresponds to the value "0" and the secondary operation
modes correspond to the values "1" to "3" for firmware MPH02VRS and "1" to
"7" for MPx03VRS firmwares.

"MX_SetOpMode" is provided for direct control of the drive via its


operation modes and their parameters. The operation mode that
was set is activated in the following position loop cycle.
If after the switching process the drive is moved with "MX_MoveR‐
elative", for example, an operation mode >3 for MPH02VRS and >7
as of MPx03VRS is implicitly set.
During the switching process, "MX_SetOpMode" should be called
until the "Done" output or the "Error" output becomes TRUE. Oth‐
erwise direct switching might not be possible again, as "MX_Se‐
tOpMode" then possibly is not in its initial status.
The switching process mustn't be activated by several instances at
the same time!
When the PLCopen profile is used for motion control, "MX_SetOp‐
Mode" mustn't be used. The secondary PLC operation modes are
not allowed as "NewOpMode" and internally provided for the
PLCopen profile of the PLC.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 117/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

To be observed as of target "IndraDrive MP04":


● As of this target, the first 6 operation modes have a fixed pa‐
rameter setting with permanent control and mustn't be
changed.
● The 7th secondary operation mode can be freely parameter‐
ized and selected in operation with the function block "MX_Se‐
tOpMode".
● When the function block "MB_PreSetMode" is used, the drive,
after it has been switched on, immediately switches to this
secondary operation mode without shortly remaining in
"Drive Halt" before.
● Active motion function blocks signal "CommandAborted"
when a new operation mode is set with "MX_SetOpMode".
● At the command "MX_SetOpMode", the axis changes from
"AH" to "AF" or "AU".
● Attention: In the multi-axis system MLD-M, the command val‐
ue parameters of the operation modes used by the PLCopen
function blocks have already been configured in the multiplex
channel (CCD process data) for remote axes. These param‐
eters cannot be written any more!

The operation mode mustn't be switched by several instances at


the same time; this is prevented by the system.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-202: Firmware Function Block "MX_SetOpMode"


118/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

NewOpMode WORD The operation mode set at "NewOpMode" is activated by a 0-1 edge at "Exe‐
cute". "NewOpMode" can presently have the following values:
● 0: S‑0‑0032, Primary operation mode
● 1: S‑0‑0033, Secondary operation mode 1
● 2: S‑0‑0034, Secondary operation mode 2
● 3: S‑0‑0035, Secondary operation mode 3
As of target "IndraDrive MP03":
● 4: S‑0‑0284, Secondary operation mode 4
● 5: S‑0‑0285, Secondary operation mode 5
● 6: S‑0‑0286, Secondary operation mode 6
● 7: S‑0‑0287, Secondary operation mode 7
Execute BOOL The function block is activated with a rising edge at "Execute". All outputs, except
for the "ActOpMode" output, are reset with a falling edge at "Execute".
Independent of "Execute", the current operation mode is displayed at "ActOp‐
Mode".

Fig.1-203: Input Variables of the Firmware Function Block "MX_SetOpMode"

Output variable Data type Description

ActOpMode WORD "ActOpMode" signals which operation mode is active in the drive at drive enable.
The output adopts the value set at "NewOpMode".
Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-206 " Descriptions of ErrorID of the Firmware
Function Block MX_SetOpMode in Target IndraDrive MPH02" on page 119
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐
(as of MPx03VRS) act cause of the error; see chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-204: Output Variables of the Firmware Function Block "MX_SetOpMode"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
"Axis1" (local axis or only axis for MLD-M), "Axis2" to "Axis8" (first or last
slave in the order of the list P‑0‑4031, Overview of device addresses)

Fig.1-205: Input / Output Variable of the Firmware Function Block "MX_SetOp‐


Mode"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 119/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Description

RESSOURCE_ERROR Invalid axis reference


ACCESS_ERROR PLC has no control over drive
IN‐ Invalid operation mode
PUT_RANGE_ERROR

Fig.1-206: Descriptions of "ErrorID" of the Firmware Function Block "MX_SetOp‐


Mode" in Target "IndraDrive MPH02"
MB_SetPositionControlMode
The function block "MB_SetPositionControlMode" is used to set the position
loop.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-207: Firmware Function Block "MB_SetPositionControlMode"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". All outputs
are reset with a falling edge at "Execute".
LaglessPositionControl BOOL The value at the "LaglessPositionControl" input influences bit 2 of
"S‑0‑0520, Control word of axis controller":
0: Position control with lag error
1: Lagless position control
120/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


ExternalEncoder BOOL The value at the "ExternalEncoder" input influences bit 0 of "S‑0‑0520,
Control word of axis controller":
0: Control with motor encoder (actual position value-1)
1: Control with external encoder (actual position value-2)
MoveAbsUseCmdPos BOOL The "MoveAbsUseCmdPos" input is only available as of the target
"IndraDrive MP06".
The value at the "MoveAbsUseCmdPos" input influences bit 4 of
"S‑0‑0346, Positioning control word":
0: Last effective target position as dedicated point for relative positioning
command values
1: Current actual position value as dedicated point for relative positioning
command values

Fig.1-208: Input Variables of the Firmware Function Block "MB_SetPositionCon‐


trolMode"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the
task has been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows
the exact cause of the error
* See note below
Fig.1-209: Output Variables of the Firmware Function Block "MB_SetPositionCon‐
trolMode"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
"Axis1" (local axis or only axis for MLD-M), "Axis2" to "Axis8" (first or last
slave in the order of the list "P‑0‑4031, Overview of device addresses")

Fig.1-210: Input / Output Variable of the Firmware Function Block "MB_SetPosi‐


tionControlMode"

1.11.4 "Diagnostic" - Functions for Diagnosis


Overview
● MX_fGetDriveWarning
● MX_fSetDriveError
● MX_fSetDriveWarning
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 121/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

MX_fGetDriveWarning
The firmware function "MX_fGetDriveWarning" allows polling whether a certain
warning diagnosis is active in the drive.
Depending on the value at the input "WarningNo" (1 to 4), the warning mes‐
sages
● E2011 PLC - Warning no. 1
● E2012 PLC - Warning no. 2
● E2013 PLC - Warning no. 3
● E2014 PLC - Warning no. 4
are checked.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-211: Firmware Function "MX_fGetDriveWarning"

Input variable Data type Description

WarningNo DINT Order number of warning to be read


Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-212: Input Variables of the Firmware Function "MX_fGetDriveWarning"

Return value Data type Description

MX_fGetDriveWarning BOOL If the warning to be checked is active in the drive, the function provides TRUE as
return value, otherwise FALSE

Fig.1-213: Return Value of the Firmware Function "MX_fGetDriveWarning"


MX_fSetDriveError
The firmware function "MX_fSetDriveError" triggers an error diagnosis in the
drive.
Depending on the value at the input "ErrorNo" (1 to 4), the errors
● F2011 PLC - Error no. 1
● F2012 PLC - Error no. 2
● F2013 PLC - Error no. 3
● F2014 PLC - Error no. 4
are triggered in the drive.
The error diagnosis can be cleared by executing the function block "MX_Re‐
set" / "MC_Reset".
122/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-214: Firmware Function "MX_fSetDriveError"

Input variable Data type Description

ErrorNo DINT Order number of error to be triggered


Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-215: Input Variables of the Firmware Function "MX_fSetDriveError"

Return value Data type Description

MX_fSetDriveError BOOL If the value of "ErrorNo" is within the allowed range (1 to 4), the function provides
TRUE as return value, otherwise FALSE

Fig.1-216: Return Value of the Firmware Function "MX_fSetDriveError"


MX_fSetDriveWarning
The firmware function "MX_fSetDriveWarning" is used to set or clear a warning
diagnosis in the drive.
Depending on the value at the input "WarningNo" (1 to 4), the warning mes‐
sages
● E2011 PLC - Warning no. 1
● E2012 PLC - Warning no. 2
● E2013 PLC - Warning no. 3
● E2014 PLC - Warning no. 4
are triggered in the drive.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 123/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-217: Firmware Function "MX_fSetDriveWarning"

Input variable Data type Description

SetWarning BOOL TRUE: set warning, FALSE: clear warning


WarningNo DINT Order number of warning to be triggered
Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-218: Input Variables of the Firmware Function "MX_fSetDriveWarning"

Return value Data type Description

MX_fSetDriveWarning BOOL If the value of "WarningNo" is within the allowed range (1 to 4), the function pro‐
vides TRUE as return value, otherwise FALSE

Fig.1-219: Return Value of the Firmware Function "MX_fSetDriveWarning"

1.11.5 "Parameters" - Function Blocks/Functions for Parameters


Overview
● MB_ChangeCamData *4
● MB_ReadListParameter *2
● MB_ReadMaxRealValue *1
● MB_ReadMaxValue *1
● MB_ReadMinRealValue *1
● MB_ReadMinValue *1
● MB_ReadName *1
● MB_ReadParameter *1
● MB_ReadRealListParameter *3
● MB_ReadRealParameter *1
● MB_ReadSercosAttribute *1

● MB_ReadSercosDataStatus *2
● MB_ReadStringParameter *2
● MB_ReadUnit / MX_ReadUnit *1
● MB_WriteListParameter *2

● MB_WriteParameter *1
● MB_WriteRealListParameter *3

● MB_WriteRealParameter *1
● MB_WriteStringParameter *2
● MX_fCheckCmdRequest*2
124/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● MX_fReadParamDINT
● MX_fReadStringParam
● MX_fSetParamLimits*3
● MX_fSetParamName*3
● MX_fSetParamUnit*3
● MX_fWriteParamDINT
● MX_fWriteStringParam
● MX_ReadParamDINT
● MX_SetCmdState *2
● MX_WriteParamDINT
*1 Available as of target "IndraDrive MP03"
*2 Available as of target "IndraDrive MP04"
*3 Available as of target "IndraDrive MP05"
*4 Available as of target "IndraDrive MP06"
MB_ChangeCamData
Brief Description The function block "MB_ChangeCamData" supports loading of cam profiles to
the drive parameters intended for this purpose. At present, drives of the
"Rexroth IndraDrive" product range support 8 cams. 4 cams with a maximum
of 1024 cam elements and 4 cams with a maximum of 128 cam elements.
Beginning at the location in the PLC memory to which the "CamTableAdr"
pointer points, the function block transports the volume of 4-byte data specified
by the "NumberOfElements " input to the cam parameter selected with "Cam‐
TableID".
The table below shows the assignment of the "CamTableID" input, the corre‐
sponding drive parameter and the possible number of cam elements for the
"NumberOfElements" input.
CamTableID Drive parameter NumberOfElements
CAM_TABLE_1 P-0-0072, Cam table 1 0 or 3 to 1024
CAM_TABLE_2 P-0-0092, Cam table 2 0 or 3 to 1024
CAM_TABLE_3 P-0-0780, Cam table 3 0 or 3 to 1024
CAM_TABLE_4 P-0-0781, Cam table 4 0 or 3 to 1024
CAM_TABLE_5 P-0-0782, Cam table 5 0 or 3 to 128
CAM_TABLE_6 P-0-0783, Cam table 6 0 or 3 to 128
CAM_TABLE_7 P-0-0784, Cam table 7 0 or 3 to 128
CAM_TABLE_8 P-0-0785, Cam table 8 0 or 3 to 128
Fig.1-220: Assignment of "CamTableID", Drive Parameter and "NumberOfEle‐
ments"
The individual data to be transmitted may be within the range of ‑799,999,999
to +799,999,999. In the drive, the individual data to be transmitted are converted
to a percentage value with 6 decimal places; i.e. the value to be transmitted is
divided by 1,000,000.

The function block does not check the content of the data to be
transmitted; the user must make sure that the data volume and the
data type (DINT) of the information to be transmitted are correct.

The time required for transmitting cam profiles depends on different factors.
These factors are
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 125/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● Location of the target axis (local axis or remote CCD slave axis)
● Control section which is used
● Number of elements to be transmitted
● Cycle time of the PLC task
● Active CCD cycle time
Typical times required to transmit 1024 cam elements:
Control section Local axis Remote CCD slave axis
1024 * CCD cycle time +
CSH1.1 6 - 15 ms
250ms
1024 * CCD cycle time +
CSB01.1 / CDB01.1 30 - 45 ms
250ms
Fig.1-221: Typical Times Required to Transmit 1024 Cam Elements

The specified times are not absolute times.

When the cam profile is transmitted to a local axis, the PLC program
only continues running when the function block "MB_ChangeCam‐
Data" signals with "Done"=TRUE that it has successfully written the
data, or when it signals with "Error"=TRUE that an error has occur‐
red.

Notes on application:
When the function block "MB_ChangeCamData" is used to write data to a local
axis, a freewheeling PLC task or a cyclic PLC task with a big cycle time should
be used so that the watchdog (F6010) is not generated when the watchdog
monitor has been activated.

In the drive, a cam profile is traveled by means of linear or cubic


spline interpolation.
For cubic spline interpolation, coefficients are calculated when a
cam profile is written; therefore, it takes approx. 5 ms longer to
transmit a cam profile with 1024 elements, compared to the linear
cam interpolation.
The linear cam interpolation is activated via "P-0-0086, Configura‐
tion word synchronous operation modes", bit 7="1".

Drives of the "Rexroth IndraDrive" product range can process two


types of cam formats (see "P-0-0072, Cam table 1").

Interface Description

Fig.1-222: Function Block "MB_ChangeCamData"


126/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL See "Input Signals Execute / Enable" on page 22


CamTableID MC_CAM_ID Number of the cam table to be written (1..8 according to parameters P-0-0072,
P-0-0092, P-0-0780..P-0-0785)
NumberOfElements UINT Number of data points which are to be transmitted to the specified cam table
CamTableAdr POINTER TO DINT Pointer to PLC memory range which contains the data to be transported.
Example: CamTableAdr := ADR(arFeld1)

Fig.1-223: Input Variables of the Firmware Function Block "MB_ChangeCamData"

Output variable Data type Description

Done BOOL With "Done"=TRUE, the function block signals that the cam data were trans‐
mitted
Active BOOL "Active"=TRUE signals that the function block has accepted the processing
command
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-224: Output Variables of the Firmware Function Block "MB_ChangeCamDa‐
ta"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted:
"Axis1" (axis for MLD‑S)
"Axis1" (local axis or only axis for MLD-M), "Axis2" to "Axis8" (first or last slave
in the order of the list "P‑0‑4031, Overview of device addresses")

Fig.1-225: Input / Output Variable of the Firmware Function Block "MB_Change‐


CamData"
MX_fCheckCmdRequest
The firmware function "MX_fCheckCmdRequest" is used to return the com‐
mand input which was preset via the drive parameter "P‑0‑1449, C4900 PLC
command".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 127/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-226: Firmware Function "MX_fCheckCmdRequest"

Input variable Data type Description

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-227: Input Variables of the Firmware Function "MX_fCheckCmdRequest"

Return value Data type Description

MX_fCheckCmdRequest MX_CMD_REQUEST The function "MX_fCheckCmdRequest" can return the following


values:
● MX_CMD_REQ_ERROR: an invalid axis number was trans‐
mitted
● MX_CMD_REQ_STOP: command is to be terminated
● MX_CMD_REQ_BREAK: command is to be interrupted
● MX_CMD_REQ_START: command is to be started

Fig.1-228: Return Value of the Firmware Function "MX_fCheckCmdRequest"


MX_fReadParamDINT
The firmware function "MX_fReadParamDINT" is used to read a parameter
value and return it as DINT.
With this function it is at first impossible to recognize whether the reading of the
parameter was successful or not. The function block "MX_ReadParamDINT" is
suited for this purpose.
For unsigned parameters with 32 bits the return value can simply be converted
with the function "DINT_TO_UDINT".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-229: Firmware Function "MX_fReadParamDINT"


128/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINT At the "Ident" input apply the IDN of the parameter the value of which is to be
or read

MB_IDN (as of
MPx06)
ListElem INT It is possible to read the value of a single parameter, but also the values of list
parameters.
To read a single parameter, apply "0" to "ListElem". For list parameters, the zeroth
element is read with "0", the first element with "1", the second element with "2"
etc.
With "‑1" at "ListElem" it is the actual length, with "‑2" it is the maximum length of
a list parameter which is read
Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-230: Input Variables of the Firmware Function "MX_fReadParamDINT"

Return value Data type Description

MX_fReadParamDINT DINT Provides the value of the element specified with "Ident" and "ListElem".
Note: The value "0" is returned if the parameter or list element cannot be read

Fig.1-231: Return Value of the Firmware Function "MX_fReadParamDINT"


MX_fReadStringParam
With the firmware function "MX_fReadStringParam" it is possible to read a pa‐
rameter the operating data of which has the ASCII format (string).

In addition to "MaxLen" a closing 0-character is copied. The return


value returns the characters actually read (without 0).

When the function is called, the complete text is immediately read. Afterwards,
control goes back to the program.

The reading process can take some time, depending on the text
length. If necessary, a separate task should be used.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-232: Firmware Function "MX_fReadStringParam"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 129/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINT IDN of the parameter


or
MB_IDN (as of
MPx06)
Text STRING(255) Text buffer 255 characters
MaxLen INT Number of characters to be read (without closing 0)
Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-233: Input Variables of the Firmware Function "MX_fReadStringParam"

Return value Data type Description

MX_fReadStringParam INT Returns the characters actually read (without 0)

Fig.1-234: Return Value of the Firmware Function "MX_fReadStringParam"


MX_fSetParamLimits
With the firmware function "MX_fSetParamLimits" it is possible to set the limit
values of the Global Register PLC parameters.

By switching off or by "load defaults procedure for PLC" [C0730


Load def. proc. com. (load defaults procedure for PLC)], the limit
values are set to their default values again.

This function mustn't be called from the system event "Position‐


Loop". When the function is called from "PositionLoop", a PLC
exception occurs and the function returns the value "0".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-235: Firmware Function "MX_fSetParamLimits"


130/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINT A constant from the global variables can be transmitted here
or
MB_IDN (as of
MPx06)
MinValue DINT Minimum value to be set
MaxValue DINT Maximum value to be set

Fig.1-236: Input Variables of the Firmware Function "MX_fSetParamLimits"

Return value Data type Description

MX_fSetParamLimits UINT The function can return the following values:


● 0: Limit values were successfully set
● 1: Error, inadmissible IDN was given

Fig.1-237: Return Value of the Firmware Function "MX_fSetParamLimits"


MX_fSetParamName
With the firmware function "MX_fSetParamName" it is possible to set the names
of the Global Register PLC parameters.

By switching off, the names of the Global Register PLC parameters


are set to their default values again.
When the names of the Global Register PLC parameters were
changed, they are set to the English names by "load defaults pro‐
cedure for PLC" [C0730 Load def. proc. com. (load defaults proce‐
dure for PLC)]. This behavior is due to technical reasons.

This function mustn't be called from the system event "Position‐


Loop". When the function is called from "PositionLoop", a PLC
exception occurs and the function returns the value "0".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-238: Firmware Function "MX_fSetParamName"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 131/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINT A constant from the global variables can be transmitted here
or
MB_IDN (as of
MPx06)
NewName STRING(60) Name to be set (maximum length: 60 characters)

Fig.1-239: Input Variables of the Firmware Function "MX_fSetParamName"

Return value Data type Description

MX_fSetParamName UINT The function can return the following values:


● 0: Name was successfully set
● 1: Error, inadmissible IDN was given

Fig.1-240: Return Value of the Firmware Function "MX_fSetParamName"


MX_fSetParamUnit
With the firmware function "MX_fSetParamUnit" it is possible to set the units of
the Global Register PLC parameters.

By switching off or by "load defaults procedure for PLC" [C0730


Load def. proc. com. (load defaults procedure for PLC)], the units
are set to their default values again.

This function mustn't be called from the system event "Position‐


Loop". When the function is called from "PositionLoop", a PLC
exception occurs and the function returns the value "0".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-241: Firmware Function "MX_fSetParamUnit"

Input variable Data type Description

Ident DINT A constant from the global variables can be transmitted here
or
MB_IDN (as of
MPx06)
NewUnit STRING(20) Unit to be set (maximum length: 20 characters)

Fig.1-242: Input Variables of the Firmware Function "MX_fSetParamUnit"


132/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Return value Data type Description

MX_fSetParamUnit UINT The function can return the following values:


● 0: Unit was successfully set
● 1: Error, inadmissible IDN was given

Fig.1-243: Return Value of the Firmware Function "MX_fSetParamUnit"


MX_fWriteParamDINT
The firmware function "MX_fWriteParamDINT" is used to write data to a pa‐
rameter.
It is possible to write in unbuffered or buffered form.

In the case of buffered writing, the parameter values every time are
transferred to the non-volatile memory. As this takes much calcu‐
lating time, data should only be written in buffered form if necessary.
For list parameters only the last write access should take place with
"WriteBuffered"=TRUE, as the entire list is buffered at each access.
While a parameter is buffered, another access with buffering will fail
(ACCESS_ERROR).

With this function it is at first impossible to recognize whether the writing of the
parameter was successful or not. The function block "MX_WriteParamDINT" is
suited for this purpose.
For unsigned parameters with 32 bits the input value "Value" can be converted
with the function "UDINT_TO_DINT".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-244: Firmware Function "MX_fWriteParamDINT"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 133/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINT IDN of the specified parameter


or
MB_IDN (as of
MPx06)
ListElem INT List element number:
For list parameters starting with "0" and for single parameter always "0"
"‑1" for writing the actual length (only allowed for list parameters)
Value INT Value which is to be written to the selected element
WriteBuffered BOOL "WriteBuffered"=TRUE: Value is buffered; "WriteBuffered"=FALSE: Val‐
ue is not buffered
Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-245: Input Variables of the Firmware Function "MX_fWriteParamDINT"

Return value Data type Description

MX_fWriteParamDINT BOOL Dummy output without significance

Fig.1-246: Return Value of the Firmware Function "MX_fWriteParamDINT"


MX_fWriteStringParam
The firmware function "MX_fWriteStringParam" is used to write data to a text
parameter.
It is possible to write in unbuffered or buffered form.

In the case of buffered writing, the parameter values every time are
transferred to the non-volatile memory. As this takes much calcu‐
lating time, data should only be written in buffered form if necessary.
While a parameter is buffered, another access with buffering will fail
(ACCESS_ERROR).

When the function is called, the complete text is immediately written. After‐
wards, control goes back to the program.

The writing process can take some time, depending on the text
length. If necessary, a separate task should be used.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
134/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-247: Firmware Function "MX_fWriteStringParam"

Input variable Data type Description

Ident DINT IDN of the specified parameter


or
MB_IDN (as of
MPx06)
Text STRING(255) Text string
WriteBuffered BOOL "WriteBuffered"=TRUE: Value is buffered
"WriteBuffered"=FALSE: Value is not buffered
Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-248: Input Variables of the Firmware Function "MX_fWriteStringParam"

Return value Data type Description

MX_fWriteStringParam INT The return value returns the characters actually written (without 0)

Fig.1-249: Return Value of the Firmware Function "MX_fWriteStringParam"


MB_ReadListParameter
With the function block "MB_ReadListParameter" it is possible to read the cur‐
rent value of a list parameter.

The function block "MB_ReadListParameter" can work on the local


axis ("Axis1") and via SERCOS III on remote axes ("Axis2", "Ax‐
is3", ...).

The IDN of the list parameter to be read has to be applied at the "Parameter‐
Number" input. The number of bytes to be read has to be indicated at the
"NoOfBytes" input. The processing of the function block is started with a rising
edge at the "Execute" input ("Execute"=TRUE).

To test the function block "MB_ReadListParameter", the instance


variable "ActivateCounter" can be used. It counts the positive edges
of the "Execute" signal and thereby signals whether the function
block is run with an edge.

Local Axis When the function block is used for a local axis, all list elements of the selected
parameter are immediately read when the function block is called. After the list
elements have been read, control goes back to the program and TRUE is pro‐
vided at the "Done" output.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 135/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

You should observe that the reading process can take some time,
depending on the volume of data to be read; if necessary, you
should use a separate task.
Example: To read all list elements of parameter P‑0‑0072 (1024
long words), approx. 200μs are required with Advanced control
section.

Remote Axes
Up to MPx05V14: Accessing parameters of remote axes is only
possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

When the function block is used for remote axes, the read task is ceded to the
service channel (SERCOS III). Only at a later call can the function block signal
"Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the data vol‐
ume.

As long as the SERCOS ring is not yet in phase 2 - and temporarily


during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-250: Firmware Function Block "MB_ReadListParameter"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT IDN of the parameter to be read
or
MB_IDN (as of
MPx06)
136/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


NoOfBytes UINT The number of bytes to be read has to be indicated at the "NoOfBytes" input.
Example: NoOfBytes:=SIZEOF(arFeld1)
NOTE: When reading parameters of the "IDN" data format, you have to ob‐
serve that as of MPx06 one element contains 4 bytes (MB_IDN)!
ValueAdr POINTER TO BYTE At the "ValueAdr" input indicate the initial address of the field to which the bytes
that have been read are to be written.
Example: ValueAdr := ADR(arFeld1)

Fig.1-251: Input Variables of the Firmware Function Block "MB_ReadListParame‐


ter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the cyclic reading of the data
value of the parameter was successful
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
NoOfRecBytes UINT The "NoOfRecBytes" output signals how many bytes were actually read
* See note below
Fig.1-252: Output Variables of the Firmware Function Block "MB_ReadListPara‐
meter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted:
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V08": "Axis1" (local axis or only axis for MLD-
M), "Axis2" to "Axis8" (first or last slave in the order of the list "P‑0‑4031,
Overview of device addresses")

Fig.1-253: Input / Output Variable of the Firmware Function Block "MB_ReadList‐


Parameter"
MB_ReadMaxRealValue
With the function block "MB_ReadMaxRealValue" it is possible to read the
maximum allowed value of a parameter. The value is returned in REAL format.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 137/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-254: Firmware Function Block "MB_ReadMaxRealValue"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter the maximum
or value of which is to be read

MB_IDN (as of
MPx06)

Fig.1-255: Input Variables of the Firmware Function Block "MB_ReadMaxRealVal‐


ue"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
MaxValue REAL If "Done"=TRUE, "MaxValue" signals the maximum input value of the selected
parameter.
Note: According to the scaling, the input value of the parameter has decimal
places which have to be taken into account and used for calculation
* See note below
Fig.1-256: Output Variables of the Firmware Function Block "MB_ReadMaxReal‐
Value"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
138/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted:
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-257: Input / Output Variable of the Firmware Function Block "MB_ReadMax‐


RealValue"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadMaxValue
With the function block "MB_ReadMaxValue" it is possible to read the maximum
allowed value of a parameter. The value is returned in DINT format.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 139/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-258: Firmware Function Block "MB_ReadMaxValue"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter the maximum
or value of which is to be read

MB_IDN (as of
MPx06)

Fig.1-259: Input Variables of the Firmware Function Block "MB_ReadMaxValue"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
MaxValue DINT If "Done"=TRUE, "MaxValue" signals the maximum input value of the selected
parameter.
Note: According to the scaling, the input value of the parameter has decimal
places which have to be taken into account and used for calculation
* See note below
Fig.1-260: Output Variables of the Firmware Function Block "MB_ReadMaxValue"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
140/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-261: Input / Output Variable of the Firmware Function Block "MB_ReadMax‐


Value"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadMinRealValue
With the function block "MB_ReadMinRealValue" it is possible to read the min‐
imum allowed value of a parameter. The value is returned in REAL format.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 141/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-262: Firmware Function Block "MB_ReadMinRealValue"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter the minimum
or value of which is to be read

MB_IDN (as of
MPx06)

Fig.1-263: Input Variables of the Firmware Function Block "MB_ReadMinRealVal‐


ue"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
MinValue REAL If "Done"=TRUE, "MinValue" signals the minimum input value of the selected
parameter.
Note:According to the scaling, the input value of the parameter has decimal
places which have to be taken into account and used for calculation
* See note below
Fig.1-264: Output Variables of the Firmware Function Block "MB_ReadMinReal‐
Value"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28
142/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted:
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-265: Input / Output Variable of the Firmware Function Block "MB_ReadMin‐


RealValue"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadMinValue
With the function block "MB_ReadMinValue" it is possible to read the minimum
allowed value of a parameter. The value is returned in DINT format.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 143/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-266: Firmware Function Block "MB_ReadMinValue"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter the minimum
or value of which is to be read

MB_IDN (as of
MPx06)

Fig.1-267: Input Variables of the Firmware Function Block "MB_ReadMinValue"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
MinValue DINT If "Done"=TRUE, "MinValue" signals the minimum input value of the selected
parameter.
Note: According to the scaling, the input value of the parameter has decimal
places which have to be taken into account and used for calculation
* See note below
Fig.1-268: Output Variables of the Firmware Function Block "MB_ReadMinValue"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
144/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-269: Input / Output Variable of the Firmware Function Block "MB_ReadMin‐


Value"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadName
With the function block "MB_ReadName" it is possible to read the name of a
parameter.
At the "ParameterNumber" input you have to apply the parameter number of
the parameter the name of which is to be read. The processing of the function
block is started with a rising edge at the "Execute" input. Error-free processing
is signaled by "Done"=TRUE. Incorrect processing is signaled by
"Error"=TRUE. In the case of error, a detailed description of the error is output
at the outputs "ErrorID" and "ErrorIdent".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 145/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-270: Firmware Function Block "MB_ReadName"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter the name of
or which is to be read

MB_IDN (as of
MPx06)

Fig.1-271: Input Variables of the Firmware Function Block "MB_ReadName"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
Name STRING(255) If "Done"=TRUE, "Name" signals the name of the selected parameter.
* See note below
Fig.1-272: Output Variables of the Firmware Function Block "MB_ReadName"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28
146/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-273: Input / Output Variable of the Firmware Function Block "MB_Read‐


Name"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadParameter
With the function block "MB_ReadParameter" it is possible to read the current
value of a parameter. The return value is DINT.

With the function block "MB_ReadParameter", the input variables


are only applied with a 0‑1 edge at the "Enable" input.

List and string parameters cannot be read with the function block.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 147/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-274: Firmware Function Block "MB_ReadParameter"

Input variable Data type Description

Enable BOOL The function block is status-controlled. The command is started with "Ena‐
ble"=TRUE, it is cleared with "Enable"=FALSE
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter (e.g.
or FP_S_0_0052) the current value of which is to be read

MB_IDN (as of
MPx06)

Fig.1-275: Input Variables of the Firmware Function Block "MB_ReadParameter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
Value DINT If "Done"=TRUE, "Value" signals the value of the selected parameter. Accord‐
ing to the scaling, the parameter has decimal places which have to be taken
into account and used for calculation
* See note below
Fig.1-276: Output Variables of the Firmware Function Block "MB_ReadParameter"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28
148/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-277: Input / Output Variable of the Firmware Function Block "MB_ReadPara‐


meter"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadRealListParameter
With the function block "MB_ReadRealListParameter" it is possible to read the
current list of a list parameter.

The function block "MB_ReadRealListParameter" can work on the


local axis ("Axis1") and via SERCOS III on remote axes ("Axis2",
"Axis3", ...).

The IDN of the list parameter to be read has to be applied at the "Parameter‐
Number" input. The number of bytes to be read has to be indicated at the
"NoOfBytes" input. The processing of the function block is started with a rising
edge at the "Execute" input ("Execute"=TRUE).

To test the function block "MB_ReadRealListParameter", the in‐


stance variable "ActivateCounter" can be used. It counts the posi‐
tive edges of the "Execute" signal and thereby signals whether the
function block is run with an edge.

Local Axis When the function block is used for a local axis, all list elements of the selected
parameter are immediately read when the function block is called. After the list
elements have been read, control goes back to the program and TRUE is pro‐
vided at the "Done" output.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 149/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

You should observe that the reading process can take some time,
depending on the volume of data to be read; if necessary, you
should use a separate task.
Example: To read all list elements of parameter P‑0‑0072 (1024
long words), approx. 314μs are required with Advanced control
section.

Remote Axes
Up to MPx05V14: Accessing parameters of remote axes is only
possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

When the function block is used for remote axes, the read task is ceded to the
service channel (SERCOS III). Only at a later call can the function block signal
"Done"=TRUE.
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the data vol‐
ume.

As long as the SERCOS ring is not yet in phase 2 - and temporarily


during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-278: Firmware Function Block "MB_ReadRealListParameter"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset.
ParameterNumber DINT IDN of the parameter to be read
or
MB_IDN (as of
MPx06)
150/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


NoOfBytes UINT The number of bytes to be read has to be indicated at the "NoOfBytes" input
ValueAdr POINTER TO REAL At the "ValueAdr" input indicate the initial address of the field to which the bytes
that have been read are to be written.
Example: ValueAdr := ADR(arFeld1)

Fig.1-279: Input Variables of the Firmware Function Block "MB_ReadRealList‐


Parameter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the cyclic reading of the data
value of the parameter was successful
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
NoOfRecBytes UINT The "NoOfRecBytes" output signals how many bytes were actually read
* See note below
Fig.1-280: Output Variables of the Firmware Function Block "MB_ReadRealList‐
Parameter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted:
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V08": "Axis1" (local axis or only axis for MLD-
M), "Axis2" to "Axis8" (first or last slave in the order of the list "P‑0‑4031,
Overview of device addresses").

Fig.1-281: Input / Output Variable of the Firmware Function Block "MB_ReadReal‐


ListParameter"

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadRealParameter
With the function block "MB_ReadRealParameter" it is possible to read the
current value of a parameter. The return value is REAL.

List and string parameters cannot be read with the function block
"MB_ReadRealParameter".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 151/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

WARNING Up to MPx04V08: Property damage, death or


serious injury by reading parameters of remote
axes!
When the scaling settings in the master and in a remote axis are different, the
travel motion of the remote axis can be wrong (e.g. too fast); this is due to the
fact that up to the firmware MPx04V08 the scaling had been made in accord‐
ance with the setting of the master when parameters of remote axes were read.
As of the firmware MPx04V10, the value of the parameter is scaled in accord‐
ance with the axis of which the parameter is read and which is applied at the
function block.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-282: Firmware Function Block "MB_ReadRealParameter"

Input variable Data type Description

Enable BOOL The function block is status-controlled. The command is started with "Ena‐
ble"=TRUE, it is cleared with "Enable"=FALSE
ParameterNumber DINT At the "ParameterNumber" input apply the IDN of the parameter the current
or value of which is to be read

MB_IDN (as of Any new parameter number will only be applied with the next positive edge at
MPx06) the "Enable" input

Fig.1-283: Input Variables of the Firmware Function Block "MB_ReadRealPara‐


meter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
152/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
Value REAL If "Done"=TRUE, "Value" signals the value of the selected parameter
* See note below
Fig.1-284: Output Variables of the Firmware Function Block "MB_ReadRealPara‐
meter"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-285: Input / Output Variable of the Firmware Function Block "MB_ReadReal‐


Parameter"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadSercosDataStatus
With the function block "MB_ReadSercosDataStatus" it is possible to read the
status of a parameter.
At the "ParameterNumber" input you have to apply the parameter number of
the parameter the status of which is to be read.
List and string parameters cannot be read with the function block.
Error-free processing is signaled by "Done"=TRUE. Incorrect processing is sig‐
naled by "Error"=TRUE. In the case of error, a detailed description of the error
is output at the outputs "ErrorID" and
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 153/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"ErrorIdent".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-286: Firmware Function Block "MB_ReadSercosDataStatus"

Input variable Data type Description

Enable BOOL The function block is status-controlled. The input variables are applied with the
positive edge of "Enable". New input values only take effect via the repeated
positive edge of "Enable".
ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number of
or the parameter the status of which is to be read

MB_IDN (as of
MPx06)

Fig.1-287: Input Variables of the Firmware Function Block "MB_ReadSercosDa‐


taStatus"

Output varia‐ Data type Description


ble

Done BOOL With "Done"=TRUE the function block signals that the processing of
the function block has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has
accepted the processing command, for single axes this output is not
set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
154/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output varia‐ Data type Description


ble
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent"
shows the exact cause of the error
Status MB_SERCOS_DATA_STATUS The output displays the current status of the parameter.
Enum values for "Status" output:

"MB_SERCOS_DATA_NOT_SET": Command has not been set


"MB_SERCOS_DATA_SETTING": Command has been set
"MB_SERCOS_DATA_END_OK": Command completed without error
"MB_SERCOS_DATA_INTERRUPTED": Command interrupted
"MB_SERCOS_DATA_IN_PROCESS": Command being processed
"MB_SERCOS_DATA_BREAK_ERROR": Command aborted with
error
"MB_SERCOS_DATA_DATUM_FAULT": Invalid operating data
* See note below
Fig.1-288: Output Variables of the Firmware Function Block "MB_ReadSercosDa‐
taStatus"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-289: Input / Output Variable of the Firmware Function Block "MB_ReadSer‐


cosDataStatus"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 155/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

MB_ReadSercosAttribute
With the function block "MB_ReadSercosAttribute" it is possible to read the
SERCOS attribute of a parameter.
At the "ParameterNumber" input you have to apply the parameter number of
the parameter the SERCOS attribute of which is to be read. The processing of
the function block is started with a rising edge at the "Execute" input. Error-free
processing is signaled by "Done"=TRUE. Incorrect processing is signaled by
"Error"=TRUE. In the case of error, a detailed description of the error is output
at the outputs "ErrorID" and "ErrorIdent".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-290: Firmware Function Block "MB_ReadSercosAttribute"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number of
or the parameter the SERCOS attribute of which is to be read.

MB_IDN (as of NOTE: Any new parameter number will only be applied with the next positive
MPx06) edge at the "Execute" input.

Fig.1-291: Input Variables of the Firmware Function Block "MB_ReadSercosAttri‐


bute"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the cyclic reading of the
SERCOS attribute is successfully running
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
156/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
Attribute DWORD If "Done"=TRUE, "Attribute" signals the attribute of the selected parameter
* See note below
Fig.1-292: Output Variables of the Firmware Function Block "MB_ReadSercosAt‐
tribute"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-293: Input / Output Variable of the Firmware Function Block "MB_ReadSer‐


cosAttribute"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadUnit / MX_ReadUnit
With the function block "MB_ReadUnit" or "MX_ReadUnit" it is possible to read
the unit of a parameter.
At the "ParameterNumber" input you have to apply the parameter number of
the parameter the unit of which is to be read. The processing of the function
block is started with a rising edge at the "Execute" input. Error-free processing
is signaled by "Done"=TRUE. Incorrect processing is signaled by
"Error"=TRUE. In the case of error, a detailed description of the error is output
at the outputs "ErrorID" and "ErrorIdent".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 157/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-294: Firmware Function Block "MB_ReadUnit" (Looks Like Firmware Func‐


tion Block "MX_ReadUnit", Except for the Function Block Name and the
"ParameterNumber" Input)

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number of
or the parameter the unit of which is to be read

MB_IDN (as of
MPx06)

Fig.1-295: Input Variables of the Firmware Function Block "MB_ReadUnit" /


"MX_ReadUnit"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
Unit STRING(255) If "Done"=TRUE, "Unit" signals the unit of the selected parameter
* See note below
Fig.1-296: Output Variables of the Firmware Function Block "MB_ReadUnit" /
"MX_ReadUnit"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28
158/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-297: Input / Output Variables of the Firmware Function Block "MB_ReadU‐


nit" / "MX_ReadUnit"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_ReadStringParameter
With the function block "MB_ReadStringParameter" it is possible to read a pa‐
rameter the operating data of which has the ASCII format (string).

The function block "MB_ReadStringParameter" can work on the lo‐


cal axis ("Axis1") and via SERCOS III on remote axes ("Axis2",
"Axis3", ...).

At the "ParameterNumber" input you have to apply the parameter number of


the parameter the operating data of which is to be read. The processing of the
function block is started with a rising edge at the "Execute" input.

To test the function block, the instance variable "ActivateCounter"


can be used. It counts the positive edges of the "Execute" signal
and thereby signals whether the function block is run with an edge.

Local Axis When the function block is used for a local axis, all characters of the selected
ASCII parameter are immediately read when the function block is called. After
that, control goes back to the program and TRUE is provided at the "Done"
output.

The reading process can take some time, depending on the text
length. If necessary, a separate task should be used.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 159/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Remote Axes
Up to MPx05V14: Accessing parameters of remote axes is only
possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

When the function block is used for remote axes, the read task is ceded to the
service channel (SERCOS III). Only at a later call can the function block signal
"Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several milliseconds, depending on the text
length.

As long as the SERCOS ring is not yet in phase 2 - and temporarily


during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-298: Firmware Function Block "MB_ReadStringParameter"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number of
the parameter the operating data of which is to be read

Fig.1-299: Input Variables of the Firmware Function Block "MB_ReadStringPara‐


meter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
160/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
Value STRING(255) "Value" provides the operating data of the selected parameter
* See note below
Fig.1-300: Output Variables of the Firmware Function Block "MB_ReadStringPara‐
meter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
"Axis1" (local axis or only axis for MLD-M), "Axis2" to "Axis8" (first or last slave
in the order of the list "P‑0‑4031, Overview of device addresses")

Fig.1-301: Input / Output Variable of the Firmware Function Block "MB_Read‐


StringParameter"
MB_WriteParameter
With the function block "MB_WriteParameter" it is possible to write a defined
value to a parameter. To do this, you have to apply, at the "ParameterNum‐
ber" input, the parameter number of the parameter the value of which is to be
written. The value which is to be written to the parameter has to be applied at
the "Value" input and has to be of the DINT type.

List and string parameters cannot be written with "MB_WritePara‐


meter".

According to the scaling, the parameter has decimal places which


have to be taken into account and used for calculation!
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 161/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Storage behavior of "MB_WriteParameter" in "IndraDrive MP03"


and "IndraDrive MP04" with local axes: Parameter changes are
generally written in unbuffered form! Subsequent storage in the in‐
ternal memory or on the MMC is only possible via "S-0-0293, C2400
Selectively backup working memory procedure command".
Storage behavior of "MB_WriteParameter" as of "IndraDrive
MP05" with local axes: Depending on parameter "S‑0‑0269, Stor‐
age mode", the changed parameter value is stored in the device-
internal, non-volatile memory ("flash") or on the MultiMediaCard
(MMC), either immediately or by executing the command
"S‑0‑0264, C2200 Backup working memory procedure command".
Storage behavior of "MB_WriteParameter" in "IndraDrive MP04" as
of version 10 and "IndraDrive MP05" with remote axes: Depending
on parameter "S‑0‑0269, Storage mode", the changed parameter
value is stored in the device-internal, non-volatile memory ("flash")
or on the MultiMediaCard (MMC), either immediately or by execut‐
ing the command "S‑0‑0264, C2200 Backup working memory pro‐
cedure command".

NOTICE Destruction of the fixed value parameter mem‐


ory by constant activation/execution of the
function block!
When the function block is frequently executed, set "S‑0‑0269, Storage
mode" in such a way that changed parameter values are only stored by exe‐
cuting the command "S‑0‑0264, C2200 Backup working memory procedure
command" in the device-internal, non-volatile memory ("flash") or on the Mul‐
tiMediaCard (MMC).

To test the function block "MB_WriteParameter", the instance var‐


iable "ActivateCounter" can be used. It counts the positive edges of
the "Execute" signal and thereby signals whether the function block
is run with an edge.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-302: Firmware Function Block "MB_WriteParameter"


162/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input, apply the parameter number of the parameter
or to be written

MB_IDN (as of
MPx06)
Value DINT At the "Value" input, apply the value which is to be written to the parameter.
Take the scaling of the selected parameter into account

Fig.1-303: Input Variables of the Firmware Function Block "MB_WriteParameter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-304: Output Variables of the Firmware Function Block "MB_WriteParameter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-305: Input / Output Variable of the Firmware Function Block "MB_WritePara‐


meter"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 163/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_WriteRealListParameter
With the function block "MB_WriteRealListParameter" it is possible to write de‐
fined values to a list parameter.

The function block "MB_WriteRealListParameter" can work on the


local axis ("Axis1") and via SERCOS III on remote axes ("Axis2",
"Axis3", ...).

The IDN of the list parameter to be written has to be applied at the "Parame‐
terNumber" input.

Depending on parameter "S‑0‑0269, Storage mode", the changed


parameter value is stored in the device-internal, non-volatile mem‐
ory ("flash") or on the MultiMediaCard (MMC), either immediately
or by executing the command "S‑0‑0264, C2200 Backup working
memory procedure command".

NOTICE Destruction of the fixed value parameter mem‐


ory by constant activation/execution of the
function block!
When the function block is frequently executed, set "S‑0‑0269, Storage
mode" in such a way that changed parameter values are only stored by exe‐
cuting the command "S‑0‑0264, C2200 Backup working memory procedure
command" in the device-internal, non-volatile memory ("flash") or on the Mul‐
tiMediaCard (MMC).

To test the function block "MB_WriteRealListParameter", the instance


variable "ActivateCounter" can be used. It counts the positive edges
of the "Execute" signal and thereby signals whether the function block
is run with an edge.
The inputs "NoOfBytes" and "ValueAdr" should be used as follows:
Example:
inst_MB_WriteRealListParameter : MB_WriteRealListParameter;
arFeld1 : ARRAY[1..16] OF REAL;
inst_MB_WriteRealListParameter(...,NoOfBytes:=SIZEOF(ar‐
Feld1),ValueAdr:=ADR(arFeld1),...);

Local Axis When the function block is used for a local axis, all list elements of the applied
array are immediately written when the function block is called. After that, con‐
trol goes back to the program and TRUE is provided at the "Done" output.
164/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

You should observe that the writing process can take some time,
depending on the volume of data to be written. If necessary, a sep‐
arate task should be used.
Example: To write all list elements of parameter P‑0‑0072 (1024
long words), approx. 24 ms are required with Advanced control
section.

Remote Axes
Up to MPx05V14: Accessing parameters of remote axes is only
possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

When the function block is used for remote axes, the write request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done"=TRUE.
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the data vol‐
ume.

As long as the SERCOS ring is not yet in phase 2 - and temporarily


during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-306: Firmware Function Block "MB_WriteRealListParameter"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute".
ParameterNumber DINT At the "ParameterNumber" input, apply the IDN of the list parameter to be writ‐
or ten

MB_IDN (as of
MPx06)
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 165/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


NoOfBytes UINT The number of bytes to be written has to be indicated at the "NoOfBytes" input
Example: NoOfBytes := SIZEOF(arFeld1);
Note: As the list elements are stored in a REAL array (REAL data type = 4-
byte), the NoOfBytes is calculated as follows: NoOfBytes = 4 * (number of
elements)
ValueAdr POINTER TO REAL At the "ValueAdr" input indicate the initial address of the field to which the bytes
that have been read are to be written.
Example: ValueAdr := ADR(arFeld1);
Note: The applied field must be of the REAL data type.

Fig.1-307: Input Variables of the Firmware Function Block "MB_WriteRealListPara‐


meter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-308: Output Variables of the Firmware Function Block "MB_WriteRealList‐
Parameter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V08": "Axis1" (local axis or only axis for MLD-
M), "Axis2" to "Axis8" (first or last slave in the order of the list "P‑0‑4031,
Overview of device addresses")

Fig.1-309: Input / Output Variable of the Firmware Function Block "MB_WriteReal‐


ListParameter"
MB_WriteListParameter
With the function block "MB_WriteListParameter" it is possible to write defined
values to a list parameter.

The function block "MB_WriteListParameter" can work on the local


axis ("Axis1") and via SERCOS III on remote axes ("Axis2", "Ax‐
is3", ...).
166/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

The IDN of the parameter to be written has to be applied at the "Parameter‐


Number" input.

Depending on parameter "S‑0‑0269, Storage mode", the changed


parameter value is stored in the device-internal, non-volatile mem‐
ory ("flash") or on the MultiMediaCard (MMC), either immediately
or by executing the command "S‑0‑0264, C2200 Backup working
memory procedure command".

NOTICE Destruction of the fixed value parameter mem‐


ory by constant activation/execution of the
function block!
When the function block is frequently executed, set "S‑0‑0269, Storage
mode" in such a way that changed parameter values are only stored by exe‐
cuting the command "S‑0‑0264, C2200 Backup working memory procedure
command" in the device-internal, non-volatile memory ("flash") or on the Mul‐
tiMediaCard (MMC).

To test the function block "MB_ReadWriteParameter", the instance


variable "ActivateCounter" can be used. It counts the positive edges
of the "Execute" signal and thereby signals whether the function
block is run with an edge.

Local Axis When the function block is used for a local axis, all list elements of the applied
array are immediately written when the function block is called. After that, con‐
trol goes back to the program and TRUE is provided at the "Done" output.

You should observe that the writing process can take some time,
depending on the volume of data to be written; if necessary, you
should use a separate task.
Example: To write all list elements of parameter P‑0‑0072 (1024
long words), approx. 16 ms are required with Advanced control
section.
It is better to write only the actually required elements; if, for exam‐
ple, 8 elements of parameter "P‑0‑0072, Cam table 1" are to be
written (one element of parameter P-0-0072 consists of 4 bytes),
"32" has to be applied to "NoOfBytes" (8*4).

Remote Axes
Up to MPx05V14: Accessing parameters of remote axes is only
possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

When the function block is used for remote axes, the write request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the data vol‐
ume.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 167/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

As long as the SERCOS ring is not yet in phase 2 - and temporarily


during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-310: Firmware Function Block "MB_WriteListParameter"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input, apply the IDN of the list parameter to be writ‐
or ten

MB_IDN (as of
MPx06)
NoOfBytes UINT The number of bytes to be written has to be indicated at the "NoOfBytes" input.
Example: NoOfBytes:=SIZEOF(arFeld1)
NOTE:When writing parameters of the "IDN" data format, you have to observe
that as of MPx06 one element contains 4 bytes (MB_IDN)!
ValueAdr POINTER TO BYTE At the "ValueAdr" input, indicate the address of the field which contains the
data/elements to be written for the list parameter.
Example: ValueAdr := ADR(arFeld1)

Fig.1-311: Input Variables of the Firmware Function Block "MB_WriteListParame‐


ter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
168/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-312: Output Variables of the Firmware Function Block "MB_WriteListPara‐
meter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V08": "Axis1" (local axis or only axis for MLD-
M), "Axis2" to "Axis8" (first or last slave in the order of the list "P‑0‑4031,
Overview of device addresses")

Fig.1-313: Input / Output Variable of the Firmware Function Block "MB_WriteList‐


Parameter"
MB_WriteRealParameter
With the function block "MB_WriteRealParameter" you can write a defined val‐
ue to the parameter belonging to the parameter number. The value which is to
be written to the parameter must be of type DEC_OV, DEC_MV or FLOAT; the
types BIN, HEX, IDN and lists and ASCII cannot be written.

Storage behavior of "MB_WriteRealParameter" in "IndraDrive


MP03" and "IndraDrive MP04" with local axes: Parameter changes
are generally written in unbuffered form! Subsequent storage in the
internal memory or on the MMC is only possible via "S-0-0293,
C2400 Selectively backup working memory procedure command".
Storage behavior of "MB_WriteParameter" as of "IndraDrive
MP05" with local axes: Depending on parameter "S‑0‑0269, Stor‐
age mode", the changed parameter value is stored in the device-
internal, non-volatile memory ("flash") or on the MultiMediaCard
(MMC), either immediately or by executing the command
"S‑0‑0264, C2200 Backup working memory procedure command".
Storage behavior of "MB_WriteRealParameter" in "IndraDrive
MP04" as of version 10 and "IndraDrive MP05" with remote axes:
Depending on parameter "S‑0‑0269, Storage mode", the changed
parameter value is stored in the device-internal, non-volatile mem‐
ory ("flash") or on the MultiMediaCard (MMC), either immediately
or by executing the command "S‑0‑0264, C2200 Backup working
memory procedure command".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 169/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

NOTICE Destruction of the fixed value parameter mem‐


ory by constant activation/execution of the
function block!
When the function block is frequently executed, set "S‑0‑0269, Storage
mode" in such a way that changed parameter values are only stored by exe‐
cuting the command "S‑0‑0264, C2200 Backup working memory procedure
command" in the device-internal, non-volatile memory ("flash") or on the Mul‐
tiMediaCard (MMC).

List and string parameters cannot be written with the function block
"MB_WriteRealParameter"; to write list parameters, please use the
function block "MB_WriteListParameter".

WARNING Up to MPx04V08: Property damage, death or


serious injury by writing parameters of remote
axes!
When the scaling settings in the master and in a remote axis are different, the
travel motion of the remote axis can be wrong (e.g. too fast); this is due to the
fact that up to the firmware MPx04V08 the scaling had been made in accord‐
ance with the setting of the master when parameters of remote axes were
written.
As of the firmware MPx04V10, the value of the parameter is scaled in accord‐
ance with the axis of which the parameter is written and which is applied at the
function block.

CAUTION Up to MPx04V08: Property damage when writ‐


ing parameters of remote axes!
Up to the firmware MPx04V08, when parameters of remote axes had been
written, the scaling was carried out according to the setting of the master which
could be wrong. As of the firmware MPx04V10, the value of the parameter is
scaled in accordance with the axis of which the parameter is written and which
is applied at the function block.

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
170/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-314: Firmware Function Block "MB_WriteRealParameter"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input, apply the IDN of the list parameter to be writ‐
or ten

MB_IDN (as of
MPx06)
Value REAL At the "Value" input, apply the value which is to be written to the parameter.
Take the scaling of the selected parameter into account

Fig.1-315: Input Variables of the Firmware Function Block "MB_WriteRealPara‐


meter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-316: Output Variables of the Firmware Function Block "MB_WriteRealPara‐
meter"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 171/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
As of target "IndraDrive MP04V10":
● "Axis1" (local axis or only axis for MLD-M),
● "Axis2" to "Axis8" (first or last slave in the order of list "P‑0‑4031, Over‐
view of device addresses"). Please observe the notes below!

Fig.1-317: Input / Output Variable of the Firmware Function Block "MB_WriteReal‐


Parameter"

In the case of a remote axis, the task is ceded to the service channel
(SERCOS III). Only at a later call can the function block signal
"Done". Therefore, the resulting times for the function block calls
themselves are always short. The outputs "Done", "Active" and
"Error" have to be cyclically polled. The data transmission can take
several seconds, depending on the load of the service channel.
As long as the SERCOS ring is not yet in phase 2 - and temporarily
during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

Up to MPx05V14: Accessing parameters of remote axes is only


possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

MB_WriteStringParameter
With the function block "MB_WriteStringParameter" it is possible to write a pa‐
rameter the operating data of which has the ASCII format (string).

Depending on parameter "S‑0‑0269, Storage mode", the changed


parameter value is stored in the device-internal, non-volatile mem‐
ory ("flash") or on the MultiMediaCard (MMC), either immediately
or by executing the command "S‑0‑0264, C2200 Backup working
memory procedure command".

NOTICE Destruction of the fixed value parameter mem‐


ory by constant activation/execution of the
function block!
When the function block is frequently executed, set "S‑0‑0269, Storage
mode" in such a way that changed parameter values are only stored by exe‐
cuting the command "S‑0‑0264, C2200 Backup working memory procedure
command" in the device-internal, non-volatile memory ("flash") or on the Mul‐
tiMediaCard (MMC).

The function block "MB_WriteStringParameter" can work on the lo‐


cal axis ("Axis1") and via SERCOS III on remote axes ("Axis2",
"Axis3", ...).
172/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

At the "ParameterNumber" input you have to apply the parameter number of


the parameter the operating data of which is to be written. The processing of
the function block is started with a rising edge at the "Execute" input.

To test the function block, the instance variable "ActivateCounter"


can be used. It counts the positive edges of the "Execute" signal
and thereby signals whether the function block is run with an edge.

Local Axis When the function block is used for a local axis, all characters of the selected
ASCII parameter are immediately written when the function block is called.
When the function is called, the complete text is immediately read. Afterwards,
control goes back to the program.

The writing process can take some time, depending on the text
length. If necessary, a separate task should be used.
Remote Axes
Up to MPx05V14: Accessing parameters of remote axes is only
possible in the MLD-M system mode.
As of MPx05V16 and MPx06: Accessing parameters of remote ax‐
es is possible in the MLD-M system mode, in the CCD basic mode
and in the CCD system mode.

When the function block is used for remote axes, the write request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several milliseconds, depending on the text
length.

As long as the SERCOS ring is not yet in phase 2 - and temporarily


during the transition from phase 3 to phase 4 - it is impossible to
exchange data with remote axes. In this case, the function block
signals an error.

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-318: Firmware Function Block "MB_WriteStringParameter"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 173/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number of
the ASCII parameter the operating data of which is to be written
Value STRING(255) At the "Value" input, apply the value which is to be written to the ASCII pa‐
rameter.

Fig.1-319: Input Variables of the Firmware Function Block "MB_WriteStringPara‐


meter"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-320: Output Variables of the Firmware Function Block "MB_WriteStringPara‐
meter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number; the following global variables can be transmitted
"Axis1" (axis for MLD‑S)
"Axis1" (local axis or only axis for MLD-M), "Axis2" to "Axis8" (first or last slave
in the order of the list "P‑0‑4031, Overview of device addresses")

Fig.1-321: Input / Output Variable of the Firmware Function Block "MB_Write‐


StringParameter"
MX_ReadParamDINT
The function block "MX_ReadParamDINT" is used to read a parameter value
and return it as DINT.
Among other things, the function block gives a feedback as to whether the
reading was successful.
For unsigned parameters with 32 bits the return value can be converted with
the function "DINT_TO_UDINT".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
174/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-322: Firmware Function Block "MX_ReadParamDINT"

Input variable Data type Description

Enable BOOL The function block is activated with "Enable"=TRUE. All outputs are reset with
"Enable"=FALSE
Ident DINT IDN of the parameter
ListElem INT List element number: For list parameters starting with "0" and for single parameter
always "0"
"‑1" for reading the actual length (only allowed for list parameters)
"‑2" for reading the max length (only allowed for list parameters)

Fig.1-323: Input Variables of the Firmware Function Block "MX_ReadParamDINT"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted the
processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-326 " Descriptions of "ErrorID" of the Firmware
Function Block "MX_ReadParamDINT" in Target "IndraDrive MPH02"" on page
175
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐
(as of MPx03VRS) act cause of the error; see chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
Value DINT If the output "Done"=TRUE, "Value" signals the value of the selected element

Fig.1-324: Output Variables of the Firmware Function Block "MX_ReadParam‐


DINT"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 175/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-325: Input / Output Variable of the Firmware Function Block "MX_ReadPar‐


amDINT"

ErrorID Description

RESSOURCE_ERROR Invalid axis reference


ACCESS_ERROR Access not allowed
INPUT_RANGE_ERROR IDN is not available

Fig.1-326: Descriptions of "ErrorID" of the Firmware Function Block "MX_Read‐


ParamDINT" in Target "IndraDrive MPH02"
MX_SetCmdState
With the firmware function block "MX_SetCmdState" it is possible to set the
command status of "P‑0‑1449, C4900 PLC command".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-327: Firmware Function "MX_SetCmdState"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
CmdStatus MX_CMD_STATUS At the "CmdStatus" input, the following values can be transmitted to the func‐
tion block:
● "MX_CMD_NO_ACTIVE": Command has not been set
● "MX_CMD_SETTING": Command has been set
● "MX_CMD_END_OK": Command completed without error
● "MX_CMD_IS_BREAK": Command interrupted
● "MX_CMD_IS_WORK": Command has been set and enabled
● "MX_CMD_BREAK_ERROR": Command aborted with error
176/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description


DiagNo DINT For the case "CmdStatus"==MX_CMD_BREAK_ERROR, a command error
number can be transmitted.
1: C4901 PLC command error no. 1
2: C4902 PLC command error no. 2
3: C4903 PLC command error no. 3
4: C4904 PLC command error no. 4
Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-328: Input Variables of the Firmware Function "MX_SetCmdState"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID * ERROR_CODE "ErrorID" gives a rough error description
ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the
exact cause of the error
* See note below
Fig.1-329: Output Variables of the Firmware Function Block "MX_SetCmdState"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "Error
Reference Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 28

MX_WriteParamDINT
The firmware function block "MX_WriteParamDINT" is used to write a param‐
eter. It is possible to write in unbuffered or buffered form.

In the case of buffered writing, the parameter values every time are
transferred to the non-volatile memory. As this takes much calcu‐
lating time, data should only be written in buffered form if necessary.
For list parameters only the last write access should take place with
"WriteBuffered"=TRUE, as the entire list is buffered at each access.
While a parameter is buffered, another access with buffering will fail
(ACCESS_ERROR).

For unsigned parameters with 32 bits the input value "Value" can simply be
converted with the function "UDINT_TO_DINT".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 177/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

!Changes Summary of changes MPx02 ‑ MPx03: Kind of activation input ("Enable"


or "Execute"); output "Active"
Fig.1-330: Firmware Function Block "MX_WriteParamDINT"

Input variable Data type Description

Execute BOOL The function block is activated with a rising edge at "Execute". All outputs are
(as of MPx03VRS) reset with a falling edge at "Execute".

Enable BOOL For MPH02VRS the function block is status-controlled. The function block is star‐
(only MPH02VRS) ted with "Enable"=TRUE, all outputs are reset with "Enable"=FALSE

Ident DINT IDN of the parameter


or
MB_IDN (as of
MPx06)
ListElem INT With the "ListElem" input you have to specify the element which is to be written.
List element number:
For list parameters starting with "0" and for single parameter always "0".
"-1" for writing the actual length (only allowed for list parameters)
Value DINT At the input "Value", apply the value which is to be written to the parameter. Take
the scaling of the selected parameter into account. According to the scaling, the
parameter has decimal places which have to be taken into account and used for
calculation
WriteBuffered BOOL With "WriteBuffered"=TRUE the value is written in buffered form, if the parameter
has been designed for this purpose. With FALSE the parameter is always written
in unbuffered form

Fig.1-331: Input Variables of the Firmware Function Block "MX_WriteParamDINT"

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted the
processing command, for single axes this output is not set!
Error BOOL With "Error"=TRUE the function block signals that an error is present
178/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description


ErrorID ERROR_CODE "ErrorID" gives a rough error description
Target "IndraDrive MPH02": fig. 1-334 " Descriptions of "ErrorID" of the Firmware
Function Block "MX_WriteParamDINT" in Target "IndraDrive MPH02"" on page
178
Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28
ErrorIdent ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐
(as of MPx03VRS) act cause of the error; see chapter 1.5.2 "Error Reference Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 28

Fig.1-332: Output Variables of the Firmware Function Block "MX_WriteParam‐


DINT"

Input / output variable Data type Description


(VAR_IN_OUT)

Axis AXIS_REF Axis number (only the global variable "Axis1" can be transmitted here)

Fig.1-333: Input / Output Variable of the Firmware Function Block "MX_WritePar‐


amDINT"

ErrorID Description

RESSOURCE_ERROR Invalid axis reference


ACCESS_ERROR Access not allowed
INPUT_INVALID_ERROR Parameter not available

Fig.1-334: Descriptions of "ErrorID" of the Firmware Function Block "MX_Write‐


ParamDINT" in Target "IndraDrive MPH02"

1.11.6 "Scaling" - Functions for Scaling


MX_fDINT_AccTo_REAL
The firmware function "MX_fDINT_AccTo_REAL" converts an acceleration val‐
ue in the fixed point format of data type DINT into a REAL value, according to
the scaling which has been set.
If the axis reference is invalid, 0.0 is returned.
The function can be used for the virtual master axis / master axis encoder and
for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-335: Firmware Function "MX_fDINT_AccTo_REAL"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 179/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Acceleration DINT Acceleration value in fixed-point DINT format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-336: Input Variables of the Firmware Function "MX_fDINT_AccTo_REAL"

Return value Data type Description

MX_fDINT_AccTo_REAL REAL Returns the acceleration value in the REAL format, according to the
scaling which has been set

Fig.1-337: Return Value of the Firmware Function "MX_fDINT_AccTo_REAL"


MX_fDINT_DistTo_REAL
The firmware function "MX_fDINT_DistTo_REAL" converts a position value in
the fixed point format of data type DINT into a REAL value, according to the
scaling which has been set.
If the axis reference is invalid, 0.0 is returned.
The function can be used for the virtual master axis / master axis encoder and
for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-338: Firmware Function "MX_fDINT_DistTo_REAL"

Input variable Data type Description

Distance DINT Position value in fixed-point DINT format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-339: Input Variables of the Firmware Function "MX_fDINT_DistTo_REAL"

Return value Data type Description

MX_fDINT_DistTo_REAL REAL Returns the position value in the REAL format, according to the scaling
which has been set

Fig.1-340: Return Value of the Firmware Function "MX_fDINT_DistTo_REAL"


MX_fDINT_VelTo_REAL
The firmware function "MX_fDINT_VelTo_REAL" converts a velocity value in
the fixed point format of data type DINT into a REAL value, according to the
scaling which has been set.
If the axis reference is invalid, 0 is returned.
180/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

The function can be used for the virtual master axis / master axis encoder and
for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-341: Firmware Function "MX_fDINT_VelTo_REAL"

Input variable Data type Description

Velocity DINT Velocity value in fixed-point DINT format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-342: Input Variables of the Firmware Function "MX_fDINT_VelTo_REAL"

Return value Data type Description

MX_fDINT_VelTo_REAL REAL Returns the velocity value in the REAL format, according to the scaling
which has been set

Fig.1-343: Return Value of the Firmware Function "MX_fDINT_VelTo_REAL"


MX_fREAL_AccTo_DINT
The firmware function "MX_fREAL_AccTo_DINT" converts an acceleration val‐
ue in the REAL format into a fixed-point DINT value, according to the scaling
which has been set.
If the axis reference is invalid, 0.0 is returned.
The function can be used for the virtual master axis / master axis encoder and
for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-344: Firmware Function "MX_fREAL_AccTo_DINT"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 181/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Acceleration REAL Acceleration value in the REAL format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-345: Input Variables of the Firmware Function "MX_fREAL_AccTo_DINT"

Return value Data type Description

MX_fREAL_AccTo_DINT DINT Returns the acceleration value in the fixed-point DINT format, accord‐
ing to the scaling which has been set

Fig.1-346: Return Value of the Firmware Function "MX_fREAL_AccTo_DINT"


MX_fREAL_DistTo_DINT
The firmware function "MX_fREAL_DistTo_DINT" converts a position value in
the REAL format into a fixed-point DINT value, according to the scaling which
has been set.
If the axis reference is invalid, 0 is returned.
The function can be used for the virtual master axis / master axis encoder and
for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-347: Firmware Function "MX_fREAL_DistTo_DINT"

Input variable Data type Description

Distance REAL Position value in the REAL format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-348: Input Variables of the Firmware Function "MX_fREAL_DistTo_DINT"

Return value Data type Description

MX_fDINT_DistTo_REAL DINT Returns the position value in the fixed-point DINT format, according to
the scaling which has been set

Fig.1-349: Return Value of the Firmware Function "MX_fREAL_DistTo_DINT"


MX_fREAL_TorqueRampTo_DINT
The firmware function "MX_fREAL_TorqueRampTo_DINT" converts a torque/
force ramp value in the REAL format into a fixed-point DINT value, according
to the scaling which has been set.
The function can be used for the real axes "Axis1, Axis2, etc.".
182/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-350: Firmware Function "MX_fREAL_TorqueRampTo_DINT"

Input variable Data type Description

TorqueRamp REAL Torque/force ramp value in the REAL format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-351: Input Variables of the Firmware Function "MX_fREAL_TorqueRamp‐


To_DINT"

Return value Data type Description

MX_fREAL_TorqueRampTo_DINT DINT Returns the velocity value in the fixed-point DINT format, according to
the scaling which has been set

Fig.1-352: Return Value of the Firmware Function "MX_fREAL_TorqueRamp‐


To_DINT"
MX_fREAL_TorqueTo_DINT
The firmware function "MX_fREAL_TorqueTo_DINT" converts a torque/force
value in the REAL format into a fixed-point DINT value, according to the scaling
which has been set.
The function can be used for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment as of the Target "IndraDrive MP04""

Fig.1-353: Firmware Function "MX_fREAL_TorqueTo_DINT"

Input variable Data type Description

Torque REAL Torque/force value in the REAL format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-354: Input Variables of the Firmware Function "MX_fREAL_TorqueTo_DINT"


DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 183/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Return value Data type Description

MX_fREAL_TorqueTo_DINT DINT Returns the torque/force value in the fixed-point DINT format, accord‐
ing to the scaling which has been set

Fig.1-355: Return Value of the Firmware Function "MX_fREAL_TorqueTo_DINT"


MX_fREAL_VelTo_DINT
The firmware function "MX_fREAL_VelTo_DINT" converts a velocity value in
the REAL format into a fixed-point DINT value, according to the scaling which
has been set.
If the axis reference is invalid, 0 is returned.
The function can be used for the virtual master axis / master axis encoder and
for the real axes "Axis1, Axis2, etc.".

For the library in which the function is available, see: "Library As‐
signment for the Targets "IndraDrive MPH02" and "IndraDrive
MP03"" or "Library Assignment as of the Target "IndraDrive
MP04""

Fig.1-356: Firmware Function "MX_fREAL_VelTo_DINT"

Input variable Data type Description

Velocity REAL Velocity value in the REAL format


Axis AXIS_REF Axis address: The corresponding axis, e.g. "Axis1" from the global axis
variables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-357: Input Variables of the Firmware Function "MX_fREAL_VelTo_DINT"

Return value Data type Description

MX_fREAL_VelTo_DINT DINT Returns the velocity value in the fixed-point DINT format, according to
the scaling which has been set

Fig.1-358: Return Value of the Firmware Function "MX_fREAL_VelTo_DINT"

1.12 MX_DSP.lib
1.12.1 General Information
The following libraries contain the function block "MX_SynchronControl"; with
"MX_SynchronControl" you can realize the consistent data exchange via the
real-time channel:
184/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Target Library Range

IndraDrive MPH02 DSP_MPH02.lib RTC Control


IndraDrive MP03 DSP_MP03.lib
IndraDrive MP04 MX_DSP.lib
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07

Fig.1-359: Library Names Depending on the Targets

In the IndraDrive targets, functions and data types of the firmware


function block partly differ. Please observe the notes in the descrip‐
tions below, particularly in the description of the inputs/outputs!

1.12.2 MX_SynchronControl
● Controls the real-time channel (e.g. delay when writing command values)
● Synchronous (equidistant) input of command values
● Only "IndraDrive MP03" and "IndraDrive MP04": Internal synchronization
of the drive, if no 1st class master communication is available (only
SERCOS at present)

The control unit presets cyclic command values in the NC clock. If


the command values are of the type which has to be processed by
the drive within one command value input clock, the drive has to
know the point of time at which new command values are available,
as well as the command value input clock, so that the drive can
interpolate the command values.

● Only "IndraDrive MP03" and "IndraDrive MP04": Checks whether MLD-S


synchronizes the drive internally
● Checks and measures the remaining time
– Task structure
– Ticks, conversion to time (µs)
● Information regarding possibly occurred errors
● Checks whether a watchdog was present (MDT data were not calculated
in time - task took too long)
The firmware function block "MX_SynchronControl" is used to control the be‐
havior of a controller task which uses the real-time channel (RTC task).
This function block is optional.
Unless instanciated, command values with firmware MPH02VRS are synchro‐
nously transmitted to the drive immediately after the end of the task. With
firmware MPx03VRS, the command values are transmitted at the latest possi‐
ble point of time [corresponds to first position loop interrupt after RTC task cycle
time – (MPH=500 μs and MPB=1 ms)]. If the task has not been processed by
then, the RTcW command values are not taken into account.
If the function block has been instanciated, its parameters become effective.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 185/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Only one instance is allowed in one project.


To be able to read the RTcR actual values, at least one RTcW var‐
iable has to be used in the project.

The real-time channel is provided to write command values (RTcW_xxxx) and


read actual values (RTcR_xxxx) in a cyclically equidistant way. (At present, the
real-time channel can comprise 4 command values and 4 actual values.)
This is required, for example, when a command value generator is to be realized
with the integrated PLC (MLD-S) and the command values of the generator
have to be processed by the drive within one command value input clock.
Example of Application, Conditions For example, if a virtual master axis generator is to be realized, the drive has
to correctly process the cyclic command value - in this case the virtual master
axis position; two conditions must have been fulfilled for this purpose.
1. The command value input clock must correspond to the NC cycle time.
The cycle time of the controller task or the NC cycle time must be accord‐
ingly adjusted.

If the RTC task has not been processed by the point of time at which
the RTcW command values are to be written, these command val‐
ues are not taken into account. If these command values fail twice
in succession, "F4016 PLC double real-time channel failure" is gen‐
erated (as of "IndraDrive MP03").

As of "IndraDrive MP05": According to the application, it is recom‐


mended that for cyclic command value input, you use one of the
two motion task types ("motion task synchronous to master com‐
munication" or "CCD-synchronous motion task") in connection with
the axis data structure "AxisData" (see MLD-M).
2. The drive must have been internally synchronized.

With the target version "IndraDrive MPH02", only the SERCOS


master communication synchronizes the drive internally.
With the target versions "IndraDrive MP03" and
"IndraDrive MP04", the functionality of "MX_SynchronControl" has
been extended in such a way that MLD‑S can synchronize the drive
internally, too, when no master communication is able to do this;
the "SyncDrive" input and the "DriveIsSync" output are used for this
purpose.
With the target version "IndraDrive MP05", the "SyncDrive" input
and the "DriveIsSync" output do not exist; independent of the mas‐
ter communication, the drive is always synchronized internally.
186/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Summary of Additional "SyncDrive" input, additional "DriveIsSync" output, data type


changes and scaling of "CmdDelay", data type of "ErrorID", "ErrorIdent" output
MPH02→MP0
3/MP04:
Summary of No "SyncDrive" input, no "DriveIsSync" output
changes
MP03/
MP04→MP05:
Fig.1-360: Firmware Function Block "MX_SynchronControl"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 187/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

CmdDelay INT The "CmdDelay" input determines after which time the RTC variables are
(as of IndraDrive MP03) to be written.

WORD With firmware of the "MPH" type (High Performance), the following values
can be written to the input:
(IndraDrive MPH02)
"-1" (only allowed as of target version "IndraDrive MP03"; default value
as of MPx03VRS): The command values are transmitted at the latest
possible point of time (corresponds to first position loop interrupt after
RTC task cycle time ‑ 500 μs)
"0" (default value for IndraDrive MPH02): The command values are trans‐
mitted at the earliest possible point of time (first position loop interrupt
after 500 μs after start of the RTC task)
Other values: "0" to ""cycle time of RTC task"‑1 ms"
Summarized: The command values are applied with the next position loop
interrupt after beginning of RTC task+CmdDelay [ms]+500 μs
With firmware of the "MPB" type (Low Performance), the following values
can be written to the input:
"-1" (only allowed as of target version "IndraDrive MP03"; default value
as of MPx03VRS): The command values are transmitted at the latest
possible point of time (corresponds to first position loop interrupt after
RTC task cycle time ‑ 1 ms)
"0" (default value for IndraDrive MPH02): The command values are trans‐
mitted at the earliest possible point of time (first position loop interrupt
after 1 ms after beginning of RTC task)
Other values: "0" to ""cycle time of RTC task"‑2 ms"
Note: If an odd pos. number of ms is input for "CmdDelay", this value is
internally increased by 1 ms.
Summarized: The command values are applied with the next position loop
interrupt after beginning of RTC task+CmdDelay [ms]+1 ms
Enable BOOL The function block "MX_SynchronControl" is status-controlled.
The function block is activated with "Enable"=TRUE, all outputs are reset
with "Enable"=FALSE.
SyncDrive BOOL You might want to have the drive internally synchronized by MLD‑S; this
(only "IndraDrive MP03" is the case when the master communication currently used is not able to
and "IndraDrive MP04") do this and MLD-S is to input cyclic command values, which the drive is
to process within one command value input clock, for the drive in equi‐
distant form.
With "SyncDrive"=TRUE and "Enable"=TRUE, MLD-S internally synchro‐
nizes the drive when the RTC task time corresponds to the NC cycle time
and the master communication does not internally synchronize the drive.
StatReset BOOL With a positive edge at the "StatReset" input, the statistics outputs "Rest‐
TicksMin", "RestTicksMax", "RestTimeMin", "RestTimeMax" and
"CmdWdg" are reset to their initial value

Fig.1-361: Input Variables of the Firmware Function Block "MX_SynchronControl"


188/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

DriveIsSync BOOL With TRUE at the output, the function block signals that MLD-S internally
(only "IndraDrive MP03" synchronizes the drive; only takes effect in conjunction with the "Syn‐
and "IndraDrive MP04") cDrive" input

Error BOOL With "Error"=TRUE the function block signals that an error is present
ErrorID ERROR_CODE (as of As of the target version IndraDrive MP03, the "ErrorID" output is of the
IndraDrive MP03)* ERROR_CODE type (ENUM value). The ENUM value which is output in
the case of error gives a rough error description.
WORD For the target version IndraDrive MPH02, the "ErrorID" output is of the
(IndraDrive MPH02) WORD type. In the case of error, the error code is output here.
(see ErrorID Reference
List for the Firmware
Function Block
MX_SynchronControl
for IndraDrive MPH02 )
ErrorIdent (as of ERROR_STRUCT The output signals the exact cause of the error.
MPx03VRS)* ERROR_STRUCT contains the following elements: "Table", "Addition‐
al1" and optionally "Additional2".
CmdWdg BOOL "CmdWdg"=TRUE means that the RTC task had not been processed at
the point of time at which the RTcW were supposed to be transmitted
RestTicksAct UDINT Current ticks of the idle task
RestTicksMin UDINT Minimum ticks of the idle task
RestTicksMax UDINT Maximum ticks of the idle task
RestTimeAct UINT Time slices in 1 ms current
RestTimeMin UINT Time slices in 1 ms minimum
RestTimeMax UINT Time slices in 1 ms maximum
* See note below
Fig.1-362: Output Variables of the Firmware Function Block "MX_SynchronCon‐
trol"

For the list of all possible errors, see: chapter 1.5.2 "Error Refer‐
ence Lists for Function Blocks as of Target "IndraDrive MP03"" on
page 28

ErrorID Description

1 Several tasks use variables of the real-time channel


2 Too many real-time variables defined (maximum 4 command values and 4 actual values)
3 Undefined parameters in ident list (internal error)
4 Variable offset value too high (internal error)
5 Incorrect variable type (Bit/Byte or STRUCT; internal error)
6 There is more than one instance of the function block "MX_SynchronControl" existing
7 The value at the "CmdDelay" input is greater than or equal to the task cycle time
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 189/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

ErrorID Description
8 PLC variable not in defined in MDT (internal error)
9 Internal variable access (internal error)

Fig.1-363: "ErrorID" Reference List for the Firmware Function Block "MX_Syn‐
chronControl" for IndraDrive MPH02

1.12.3 Notes on Programming


In preparation

1.13 MX_SysLibMem
1.13.1 General Information
The functions of the library "MX_SysLibMem.lib" are available as of the target
"IndraDrive MP05"; they are used for memory management. The functions can
be used
● to compare two storage locations,
● to initialize or preassign a memory range,
● to copy or shift from one memory to the other or
● to swap1) (processing takes place synchronously).

1.13.2 Functions
The library "MX_SysLibMem.lib" contains the following functions:
● SysMemCmp
● SysMemCpy
● SysMemMove
● SysMemSet
● SysMemSwap

For a detailed description of the corresponding function blocks and


functions, see the IndraLogic help under "SysLibMem".
The section "Notes on Utilization" describes the MLD-specific fea‐
tures.

1.13.3 Notes on Utilization


General Information The library "MX_SysLibMem.lib" only works on the local axis (Axis1).
Functions for the dynamic memory management are not included.

For detailed descriptions of the functions, see the IndraLogic help


under "SysLibMem".

1.14 MX_SysLibDir
1.14.1 General Information
With the functions of the library "MX_SysLibDir.lib" and as of the target
"IndraDrive MP05", it is possible to synchronously access a file directory system
on the target. Directory entries can be read.

1) Interchanging bytes in the memory


190/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1.14.2 Functions
The library "MX_SysLibDir.lib" contains the following functions:
● SysDirOpen
● SysDirRead

For a detailed description of the functions "SysDirOpen" and "Sys‐


DirRead", see the IndraLogic help under "SysLibDir".
The section "Notes on Utilization" describes the MLD-specific fea‐
tures.
The function blocks for editing and creating directories are not sup‐
ported!

1.14.3 Notes on Utilization


General Information Only the MMC directory "User" can be accessed. Any access from the user
program to the root directory is redirected to the MMC directory "User".
When listing the directories, only the content of the "User" directory and possibly
contained subdirectories are displayed. The "User" directory itself is not dis‐
played, as if "User" were a separate partition. Access to the root node from the
user's point of view can be obtained without indicating the directory, with single
"\" and with double "\\" (Windows-compatible).
SysDirOpen When a search is started with "SysDirOpen", it is afterwards necessary to read
with "SysDirRead" until the function does not find any other entry. Otherwise,
"SysDirOpen" does not release the Handle with its internal resources. Another
"SysDirOpen" then is no longer possible. There is a maximum of four Handles
available for "SysDirOpen". When the PLC is reset, possibly still open Handles
are closed.
Possible data when listing files:
● SysDirOpen('MyFile.txt')
● SysDirOpen('MyFile.*')
● SysDirOpen('*.txt')
● SysDirOpen('MyDir\*.txt')
● SysDirOpen('\*.*')
● SysDirOpen('\\*.*')
● ...
SysDirRead After a call of "SysDirRead", which displays a file, this file is blocked for deleting
until the next call of "SysDirRead".

1.15 "MX_SysLibFile" and "MX_SysLibFileAsync"


Functions of the Libraries "MX_Sy‐ MX_SysLibFile.lib MX_SysLibFileAsync.lib
sLibFile" and "MX_SysLibFileA‐
sync" SysFileOpen SysFileOpenAsync
SysFileWrite SysFileWriteAsync
SysFileRead SysFileReadAsync
SysFileClose SysFileCloseAsync
SysFileDelete SysFileDeleteAsync
SysFileCopy SysFileCopyAsync
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 191/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

MX_SysLibFile.lib MX_SysLibFileAsync.lib
SysFileEOF SysFileEOFAsync
SysFileGetPos SysFileGetPosAsync
SysFileGetSize SysFileGetSizeAsync
SysFileGetTime SysFileGetTimeAsync
SysFileRename SysFileRenameAsync
SysFileSetPos SysFileSetPosAsync

Fig.1-364: Functions of the Libraries "MX_SysLibFile.lib" and "MX_SysLibFileA‐


sync.lib"
General Information As of the target "IndraDrive MP05", the functions of the library "MX_SysLib‐
File.lib" support synchronous file access. "Synchronous file access" means that
a function is called and only returns after the output has been completed.
As of the target "IndraDrive MP05", the functions of the library "MX_SysLibFi‐
leAsync.lib" support asynchronous file access. For asynchronous file access,
cyclically oriented functions are used; they accept a task and provide the status
of the task in other calls.
With the functions of the libraries, files can be
● opened,
● closed,
● deleted and
● renamed.
● In addition, it is possible to write data to files or read data from files.
● With other functions it is possible
– to determine the file size or
– the point of time of the last access, and
– to determine or change the current offset.

The content of the libraries "MX_SysLibFile.lib" and "MX_SysLib‐


FileAsync.lib" is a subset of the original libraries "SysLibFile.lib" and
"SysLibFileAsync.lib".
The libraries "MX_SysLibFile.lib" and "MX_SysLibFileAsync.lib"...
● ...do not contain any function for creating or deleting subdir‐
ectories; subdirectories can nevertheless be externally cre‐
ated and used in the drive.
● ...do not contain any function for reading the time stamps, be‐
cause there is no real-time clock in the drive.
When created, files always get the same time stamp
"09.06.2004 14.56" in the drive.
● For detailed descriptions of the libraries "SysLibFile.lib" and
"SysLibFileAsync.lib", see the IndraLogic help.
● The section "Notes on Utilization" describes the MLD-specific
features.
Notes on Utilization Differences From the Descriptions of "SysFileOpen" and "SysFileOpenAsync":
For the syntax and the behavior of the function blocks, the help in IndraLogic
applies. In contrast to the current online help, the following mode applies to the
192/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

functions "SysFileOpen" and "SysFileOpenAsync" in which the file has to be


opened:
● "w" (write) (file is overwritten or created again)
● "r" (read) (file is opened for reading only; if the file does not exist, an error
is returned)
● "rw" (read and write) (file is overwritten; if the file does not exist, an error
is returned)
● "a" (append) (file is opened as with 'w', but data which are written are
appended at the end of the file)
● The "Open" functions do not open the files exclusively so that other access
to the same file is possible.
● Possible data when opening, deleting, copying, ... files:
– SysFileOpen('MyFile.txt')
– SysFileOpen('\MyFile.txt')
– SysFileOpen('\\MyFile.txt')
– SysFileOpen('MyDirectory\MyFile.txt')
● As long as the PLC program is running, the files can be kept open. They
are compulsorily closed however, when the PLC program is reset with
Reset or the MMC is removed. In the latter case, the error "F2006" is gen‐
erated.
● Only the MMC directory "User" can be accessed. Any access from the
user program to the root directory is redirected to the MMC directory
"User".
● "SysFileOpen"/"SysFileOpenAsync" accesses with "w" (write) or
"rw" (read/write) cause the content of the file to be deleted. With "a" (ap‐
pend) it is only possible to write data to the end of the file. It is impossible
to include contents in the middle of a file.

1.16 MX_SysLibIecTasks.lib
The library "MX_SysLibIecTasks.lib" is a subgroup of "SysLibIecTasks.lib";
"SysIECTaskGetConfig" and "SysIECTaskGetInfo" are supported.

1.17 RIL_CommonTypes.lib
The following libraries contain data types and structures most of which are only
used internally:

Target Library

IndraDrive MPH02 CommonTypes.lib


IndraDrive MP03 CommonTypes_MP03.lib
IndraDrive MP04 RIL_CommonTypes.lib
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07

Fig.1-365: Library Names Depending on the Targets


The sections below only describe the data types and structures relevant to the
user.
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 193/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Data Type "ERROR_CODE" "ERROR_CODE" is a data type relevant to the user. With function blocks, the
data type is used for the "ErrorID" output. The Enum value describes the error
which occurred.

The significance of the data type "ERROR_CODE" depends on the


target.

"ERROR_CODE" can have the following values:

"ERROR_CODE" Error number as of Error num‐ Description


IndraDrive MP03 ber MPx02

NONE_ERROR 16#0000 - Error-free status


NONE_ERROR_CODE - 0 Error-free status
INPUT_INVALID_ERROR 16#0001 - Error due to invalid input
INPUT_INVALID_ERROR_CODE - 1 Error due to invalid input
COMMUNICATION_ERROR 16#0002 Error when communication is established or
during communication
COMMUNICATION_ERROR_CODE - 5 Error when communication is established or
during communication
RESOURCE_ERROR 16#0003 - The resource (e.g. a parameter) is not available
RESOURCE_ERROR_CODE - 6 The resource (e.g. a parameter) is not available
ACCESS_ERROR 16#0004 - The resource exists but it cannot be accessed.
Example: You want to write a parameter in
phase 4 which can only be written in phases 2
and 3
ACCESS_ERROR_CODE - 3 An access error has occurred
STATE_MACHINE_ERROR 16#0005 - Current status of state machine prevents or pro‐
hibits further processing
INPUT_RANGE_ERROR 16#0006 - During processing it was detected that unde‐
fined or too high or too low command values
were generated due to one or several input val‐
ues
INPUT_RANGE_ERROR_CODE - 2 During processing it was detected that unde‐
fined or too high or too low command values
were generated due to one or several input val‐
ues
CALCULATION_ERROR 16#0007 - A calculation error has occurred [e.g. division by
"0", or "non" for Float variables (value outside of
value range)]
CALCULATION_ERROR - 4 A calculation error has occurred [e.g. division by
"0", or "non" for Float variables (value outside of
value range)]
DEVICE_ERROR 16#0008 - A higher-level device error has occurred
OTHER_ERROR 16#7FFE - An undefined error has occurred
OTHER_ERROR_CODE - 254 An undefined error has occurred
194/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"ERROR_CODE" Error number as of Error num‐ Description


IndraDrive MP03 ber MPx02
SYSTEM_ERROR 16#7FFF - A system error has occurred
SYSTEM_ERROR_CODE - 255 A system error has occurred

Fig.1-366: Significance of the Data Type "ERROR_CODE" for Firmwares MPx02,


MPx03 and MPx04
Structure "ERROR_STRUCT" "ERROR_STRUCT" is a structure relevant to the user. As of the target
"IndraDrive MP03", the structure is used with function blocks for the "ErrorI‐
dent" output. "ERROR_STRUCT" contains information which describes the
occurred error in detail.
Elements of the structure "ERROR_STRUCT":
● Table
"Table" is of the ENUM type. The ENUM value refers to the list required
for identifying the specific error of "Additional1".
● Additional1
"Additional1" is of the DWORD type. "Additional1" contains the specific
error number and can be used in conjunction with "Additional2" in different
ways, depending on the system.
● Additional2
"Additional2" is of the DWORD type. "Additional2" can contain additional
information. Its content differs depending on the system.

1.18 RIL_SocketComm.lib
The library "RIL_SocketComm.lib" is supported as of the target "IndraDrive
MP05". It contains functions and function blocks which allow using the TCP/
UDP communication.
The library "RIL_SocketComm.lib" is supported by several targets and therefore
is described in the documentation "Basic Libraries, IndraLogic 1x".

1.19 RIL_Utilities
The library "RIL_Utilities.lib" is supported as of the firmware MPx05V04.
The library is supported by several targets and therefore is described in the
documentation "Basic Libraries, IndraLogic 1x".

1.20 RIL_VExUtil.lib
The library "RIL_VExUtil.lib" is supported as of the target "IndraDrive MP05". It
contains a function block allowing safe key-type operation with all Rexroth HMI
devices of the "VEx" type.
The library "RIL_VExUtil.lib" is supported by several targets and therefore is
described in the documentation "Basic Libraries, IndraLogic 1x".

1.21 SysLibCallback.lib
The library "SysLibCallback.lib" is supported as of the target "IndraDrive
MPH02". It contains functions for activating defined callback functions for run‐
time events.
The library is supported by several targets; it is described in the IndraLogic help
under "SysLibCallback.lib".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 195/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

1.22 SysLibSem.lib
The library "SysLibSem.lib" is supported as of the target "IndraDrive MP06". It
contains functions for synchronized data exchange between tasks.
The library is supported by several targets; it is described in the IndraLogic help
under "SysLibSem.lib".

1.23 SysLibSockets
1.23.1 General
The library "SysLibSockets.lib" is available as of the target "IndraDrive
MP05". The functions contained in the library support the access to sockets2)
for communication via TCP/IP and UDP.
By means of the functions contained in the library and as of the target
"IndraDrive MP05", IndraMotion MLD can be programmed as UDP or TCP/IP
server resp. UDP or TCP/IP client.

To keep the programming effort at a low level, using the "RIL_Sock‐


etComm.lib" is recommended for standard TCP/IP or UDP com‐
munication .

1.23.2 Overview of Function Blocks and Functions


For a detailed description of the corresponding function blocks and
functions, see the IndraLogic help under "SyslibSockets".
The section "Notes on Utilization" describes the MLD-specific fea‐
tures.

● SysSockAccept
● SysSockBind
● SysSockClose
● SysSockConnect
● SysSockCreate
● SysSockGetHostByName
● SysSockGetHostName
● SysSockGetLastErrorSync
● SysSockSetOption and SysSockGetOption
● SysSockHtonI, SysSockHtons, SysSockNtohI and SysSockNtohs
● SysSockInetAddr
● SysSockInetNtoa
● SysSockIoctl
● SysSockListen
● SysSockSelect
● SysSockShutdown
TCP-specific:
● SysSockRecv

2) A socket is a bidirectional software interface for interprocess (IPC) or network com‐


munication.
196/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

● SysSockSend
UDP-specific:
● SysSockRecvFrom
● SysSockSendTo

1.23.3 Notes on Utilization


For a detailed description of the corresponding function blocks and
functions, see the IndraLogic help under "SyslibSockets".
This section describes the MLD-specific features.

General Information ● The symbols of the different socket options and maximum values are de‐
fined in the global variables of "SysLibSockets.lib".
● The symbols of the error codes are defined in "MX_Base.lib".
● To write portable software, you should work with the symbols of the con‐
stant definitions of the global variables from "SysLibSockets.lib" and
"MX_Base.lib", not with their numeric values.
● As a maximum, MLD may open 20 sockets (the maximum value
"MAX_OPEN_SYNCSOCKETS" is defined in the global variables of "Sy‐
sLibSockets.lib").
NOTE: It might not be possible to open all 20 sockets, because the drive
already uses these resources.
● The transmit and receive buffer size cannot be changed and has been set
to 1500 bytes (1446 bytes of net data). This means that, for example, 4000
bytes of data to be transmitted will be transmitted as 3 data packages with
1446 bytes and one package with 1108 bytes of net data.
● The timeout for reception cannot be changed and has been set to 10000
ms. For transmission there is no timeout.
● For server applications, it is recommended that you use the port addresses
49.152 to 65.535. (See also "IANA" (Internet Assigned Numbers Authority,
http://www.iana.com)
● For reset and reloading of an MLD program, it is not necessary to write
callback functions. In the case of reset and download, MLD automatically
deletes all sockets it had opened.
● In the "Non Blocking Mode", the error code "ERR_UNAVAILABLE (-51)"
can be sporadically signaled. This error means that a resource is presently
unavailable and the function call has to be repeated.
"SysSockAccept" Before "SysSockAccept", "SysSockListen" must be called. "SysSockListen"
sets a table to accept connection requirements. This table must be ready before
"SysSockAccept" starts blocking and waits for connection attempts.
"SysSockConnect" Generally, "SysSockConnect" may only be called once per socket after "Sys‐
SockCreate".
● Blockingmode: If Connect is impossible, "SysSockConnect" blocks for 1
minute and then returns with the return value =FALSE. The error code can
be read with the function "SysSockGetLastErrorSync".
● Non Blockingmode: If the return value =FALSE and the error code sup‐
plied by "SysSockGetLastErrorSync" ="NU_IS_CONNECTING", it is nec‐
essary to find out via the function "SysSockSelect" whether the socket is
ready for transmission and/or reception.
"SysSockCreate" "SysSockCreate" definitely sets "Blockingmode".
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 197/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Possible transmission parameters:


"diAddressFamily=SOCKET_AF_INET"
"diType=SOCK_STREAM" or "diType=SOCK_DGRAM"
"diProtocol=SOCKET_IPPROTO_TCP" or "diProtocol=SOCKET_IPPRO‐
TO_UDP", when "diType=SOCK_STREAM"
"SysSockGetLastErrorSync" "SysSockGetLasterrorSync" supplies the last detected socket error. Occurring
errors are stored in task-oriented form and read in this way. The transmission
parameter "diSocket" is not evaluated. After the socket error has been read, it
is cleared.

According to the program structure, "SysSockGetLastError" should


be called immediately after an error has been detected, so that the
error code is not overwritten otherwise.
"SysSockSetOption" and "Sys‐
SockGetOption" Correction of the documentation: With "SysSockSetOption", the
option value is not transmitted as a value, as described, but as a
pointer to the value. The pointer must be DWORD.

Supported socket levels:


● SOCKET_SOL
● SOCKET_IPPROTO_IP
● SOCKET_IPPROTO_TCP
● SOCKET_IPPROTO_UDP
● SOCKET_SO_ERROR (only "SysSockGetOption")
Options for "diLevel=SOCKET_SOL"
● "SOCKET_SO_REUSEADDR" (allows linking several addresses to the
same port)
– Optval (int16): Disabled="0", Enabled<>"0".
● "SOCKET_SO_BROADCAST" (allows transmitting broadcast messages)
– Optval (int16): Disabled="0", Enabled<>"0".
● "SOCKET_SO_LINGER" (dwell time when closing the socket)
– Optval (structure SOCKET_LINGER)
● "SOCKET_SO_ERROR" (only "SysSockGetoption")
The behavior described for "SysSockGetLastErrorSync" applies in this
case
Options for "diLevel=SOCKET_IPPROTO_TCP"
● SOCKET_TCP_NODELAY (this option controls the Nagle's algorithm of
the socket)
– Optval (UINT8): Disabled="0", Enabled<>"0".
● SOCKET_SO_KEEPALIVE (this option controls the keep-alive for the
TCP connections of the socket)
– Optval (UINT8): Disabled="0", Enabled<>"0".
Options for "diLevel=SOCKET_IPPROTO_IP"
● There aren't any options supported.
Options for "diLevel=SOCKET_IPPROTO_UDP"
● There aren't any options supported.
198/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

"SysSockIoctl" ● "diCommand=SOCKET_FIONBIO" [sets Blockingmode to the value of the


transmitted argument (piParameter)].
– Blockingmode: "piParameter=SOCKET_SO_BLOCKING"
– Non Blockingmode: "piParameter=SOCKET_SO_NOBLOCKING"
● "diCommand=SOCKET_FIONREAD" [Reads the number of received
bytes which are ready in the socket. The number of received bytes is con‐
tained in the argument ("piParameter").]

Correction of the documentation: The return value of "SysSock‐


Ioctl" is described as BOOL in the description of the function; the
return value actually is of the DINT type and supplies "0" or "1".
"SysSockSelect" ● If "0" is transmitted for the pointer in the case of "ptvTimeout", "SysSock‐
Select" blocks until the request has been fulfilled. If it is desired that the
function returns immediately, it is necessary to write "ptvTimeout.tv_sec"
and "tv_usec"="0".
● "SysSockSelect" returns the number of ready sockets. If the return value
is "-1", an error has occurred. If the number is greater than "0", the trans‐
mitted arrays (e.g. "fdRead") must be checked from "0" to "fd_count".
Sockets which are not ready have been set to "0" in the array. Sockets set
in "fdRead" have received data. They can be read in non-blocking form
with "SysSockRecv".

Reading the error status with "fdExcept" is not supported. At this


place, it is necessary to enter "0".
"SysSockSend" The value of "diBufferSize" may be a maximum of MAX_IP_DA‐
TA_SIZE=65495.
The transmission parameter "diFlags" is not supported. For this parameter, it
is necessary to enter "0".
The return value 0="gracefully closed" is not supported.
"SysSockRecv" The transmission parameter "diFlags" is not supported. For this parameter, it
is necessary to enter "0".
The return value 0="gracefully closed" is not supported.
"SysSockSendTo" The value of "diBufferSize" may be a maximum of MAX_IP_DATA_SIZE=65
495.
The transmission parameters "diFlags" and "diSockAddrSize" are not suppor‐
ted. For these parameters, it is necessary to enter "0".
The return value 0="gracefully closed" is not supported.
"SysSockRecvFrom" The transmission parameters "diFlags" and "diSockAddrSize" are not suppor‐
ted. For these parameters, it is necessary to enter "0".
The return value 0="gracefully closed" is not supported.
"SysSockHtonI", "SysSockHtons", The figure below explains how the byte order of the port is converted to little-
"SysSockNtohI" and "SysSockN‐ endian by "SysSockHtons" or converted to big-endian by "SysSockNtohs".
tohs"
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 199/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Fig.1-367: Converting Byte Orders of the Port


"SysSockShutdown" ● With "diHow=SOCKET_SHUT_RD", the reading connection of the socket
is terminated.
● With "diHow=SOCKET_SHUT_WR", the writing connection of the socket
is terminated.
● With "diHow=SOCKET_SHUT_RDWR", the reading and writing connec‐
tions of the socket are terminated.

1.24 SysLibStr.lib
The library "SysLibStr.lib" is supported as of the target "IndraDrive MPH02". It
contains functions for handling strings.
The library is supported by several targets; it is described in the IndraLogic help
under "SysLibStr.lib".

1.25 Util.lib
The library "Util.lib" is supported as of the target "IndraDrive MPH02". It contains
function blocks that can be used for BCD conversion, bit/byte functions, math‐
ematical auxiliary functions, as controllers, signal generators, function manip‐
ulators and for analog value processing.
The library is supported by several targets; it is described in the IndraLogic help
under "Util.lib".

1.26 For Internal Test Purposes Only!: The Library "MX_Debug.lib"


The functions contained in the library "MX_Debug.lib" are required for internal
test purposes (laboratory).
200/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

WARNING Property damage, death or serious injury by


incorrect control of motors when using func‐
tions from the library "MX_Debug.lib"!
The functions from the library "MX_Debug.lib" are required for internal test pur‐
poses and the user mustn't use them!

1.27 For Program-Internal Use Only!: Functions for Checking or


Signaling Runtime Errors
The following libraries contain functions for checking or signaling runtime errors,
such as division by zero:

Target Library

IndraDrive MP03 CheckRtv_MP03.lib


IndraDrive MP04 MX_CheckRtv.lib
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07

Fig.1-368: Library Names Depending on the Targets


When a new project with the target "IndraDrive" is created, the corresponding
library is automatically included and visible. Exception: The target
"IndraDrive MPH02", the "CheckRtv" library is not available there.

The functions of the "CheckRtv" library are implicitly called by the


PLC program and mustn't be included in a user program!

Operating Principle The functions of the "CheckRtv" library are called at each corresponding action
(e.g. division) and check the access. If access is allowed, the program runs
without restriction. If access is not allowed, a drive error (F6010) is generated
and the PLC is stopped.
See also "Notes on Application" in the Application Manual on Rexroth
IndraMotion MLD.
Functions ● CheckBounds
● CheckDivByte
● CheckDivDWord
● CheckDivReal
● CheckDivWord
● CheckRangeSigned
● CheckRangeUnsigned

1.28 Do Not Use!: Internal Functions, Function Blocks, Data Types


and Structures
The following libraries contain internal functions, function blocks, data types
and structures:
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 201/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Rexroth IndraDrive Firmware Libraries

Target Library

IndraDrive MPH02 Internal_MPH02.lib


IndraDrive MP03 Internal_MP03.lib
IndraDrive MP04 MX_Internal.lib
IndraDrive MP05
IndraDrive MP06
IndraDrive MP07

Fig.1-369: Library Names Depending on the Targets

NOTICE The library "Internal" is an internal, undocu‐


mented interface to the drive
The functions and function blocks of the library "Internal" are internally required
and the user mustn't use them!

When a new project is created, Internal is automatically linked and visible to the
user.
202/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 203/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Appendix

2 Appendix
2.1 Service and Support
Our service helpdesk at our headquarters in Lohr, Germany and our worldwide
service will assist you with all kinds of enquiries. You can reach us around the
clock - even on weekend and on holidays.

Service Hotline
Helpdesk
Worldwide
Phone +49 (0) 9352 40 50 60 Outwith Germany please con‐
tact our sales/service office in
Fax +49 (0) 9352 40 49 41
your area first.
For hotline numbers refer to
E-mail service.svc@boschrexroth.de the sales office addresses on
the Internet.
http://www.boschrexroth.com
Internet You will also find additional notes regarding service, mainte‐
nance (e.g. delivery addresses) and training.

Preparing Information For quick and efficient help please have the following information ready:
● Detailed description of the fault and the circumstances
● Information on the type plate of the affected products, especially type co‐
des and serial numbers
● Your phone, fax numbers and e-mail address so we can contact you in
case of questions.
204/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 205/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Index

Index
A L
AnalyzationNew.lib.............................................. 35 Library
Asynchronous file access................................. 191 CommonTypes ........................................... 192
ATAN2................................................................ 96 Debug ......................................................... 199

C M
CheckBounds.................................................... 200 MB_ChangeCamData....................................... 124
CheckDivByt..................................................... 200 MB_ChangeProfileSet......................................... 37
CheckDivDWord............................................... 200 MB_ChangeProfileStep....................................... 39
CheckDivReal................................................... 200 MB_Command.................................................... 42
CheckDivWord.................................................. 200 MB_GearInPos.................................................... 46
CheckRangeSigned.......................................... 200 MB_Home......................................................... 100
CheckRangeUnsigned...................................... 200 MB_MotionProfile................................................ 49
CheckRtv.......................................................... 200 MB_Phasing........................................................ 52
MB_PhasingSlave............................................... 53
MB_PreSetMode............................................... 102
D MB_ReadListParameter.................................... 134
Data exchange, consistent................................ 183 MB_ReadMaxRealValue................................... 136
Data types MB_ReadMaxValue.......................................... 138
General ........................................................ 34 MB_ReadMinRealValue.................................... 140
MB_IDN ........................................................ 35 MB_ReadMinValue........................................... 142
Diagnostic......................................................... 120 MB_ReadName................................................. 144
diLevel............................................................... 197 MB_ReadParameter......................................... 146
Directory of function block libraries of Rexroth MB_ReadRealListParameter............................ 148
IndraLogic............................................................. 7 MB_ReadRealParameter.................................. 150
Drive control................................................ 36, 100 MB_ReadSercosAttribute.................................. 155
DSP................................................................... 183 MB_ReadSercosDataStatus............................. 152
MB_ReadStringParameter................................ 158
E MB_ReadUnit.................................................... 156
Error.................................................................... 27 MB_SetPositionControlMode............................ 119
ERROR_CODE................................................... 27 MB_Stop............................................................. 55
ERROR_STRUCT............................................... 27 MB_WriteListParameter.................................... 165
Error handling..................................................... 26 MB_WriteParameter.......................................... 160
ErrorID................................................................. 27 MB_WriteRealListParameter............................. 163
ErrorIdent............................................................ 27 MB_WriteRealParameter.................................. 168
MB_WriteStringParameter................................ 171
MC_CamIn.......................................................... 57
F MC_CamOut....................................................... 60
File access MC_GearIn.......................................................... 61
Asynchronous ............................................ 191 MC_GearOut....................................................... 63
Synchronous .............................................. 191 MC_MoveAbsolute.............................................. 64
MC_MoveAdditive............................................... 66
I MC_MoveRelative............................................... 69
INDRV_TABLE.................................................... 34 MC_MoveVelocity............................................... 71
Input signals "Execute" / "Enable"....................... 22 MC_Power........................................................ 103
Internal_MP03.lib.............................................. 201 MC_ReadStatus................................................ 105
Internal_MPH02.lib............................................ 201 MC_Reset......................................................... 107
Internal data types............................................ 200 MC_Stop............................................................. 74
Internal function blocks..................................... 200 MC_TorqueControl.............................................. 77
Internal functions............................................... 200 Means of representation
Internal structures............................................. 200 Conventions of notation ................................. 5
Notations ........................................................ 5
Notes .............................................................. 5
Memory management....................................... 189
MLD_TABLE....................................................... 28
206/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Index

M M
MLDS_TABLE..................................................... 28 MX_WriteParamDINT........................................ 176
MX_Base.lib........................................................ 95
MX_Command.................................................. 109
MX_fCheckCmdRequest................................... 126
P
MX_fDINT_AccTo_REAL.................................. 178 Parameters....................................................... 123
MX_fDINT_DistTo_REAL.................................. 179 Processing commands in a PLCopen function
MX_fDINT_VelTo_REAL................................... 179 block.................................................................... 22
MX_fGetDriveWarning...................................... 121
MX_fGetFreeTicks.............................................. 96 R
MX_fGetHighResTime........................................ 97 Real-time channel............................................. 183
MX_fHighResTimerTicks_to_us.......................... 98 RIL_SocketComm.lib........................................ 194
MX_fReadParamDINT...................................... 127 RIL_VExUtil.lib.................................................. 194
MX_fReadStringParam..................................... 128 Runtime errors
MX_fREAL_AccTo_DINT.................................. 180 Signaling / checking ................................... 200
MX_fREAL_DistTo_DINT.................................. 181
MX_fREAL_TorqueRampTo_DINT................... 181
MX_fREAL_TorqueTo_DINT............................. 182 S
MX_fREAL_VelTo_DINT................................... 183 Scaling.............................................................. 178
MX_fSetDriveError............................................ 121 SERCOS_TABLE................................................ 33
MX_fSetDriveWarning....................................... 122 Serial interface.................................................... 90
MX_fSetParamLimits........................................ 129 Support
MX_fSetParamName........................................ 130 see Service Hotline .................................... 203
MX_fSetParamUnit........................................... 131 Synchronous file access................................... 191
MX_fSysComStatus............................................ 91 SysComClose..................................................... 92
MX_fWriteParamDINT....................................... 132 SysComOpen...................................................... 93
MX_fWriteStringParam..................................... 133 SysComRead...................................................... 93
MX_IECTaskGetLoad......................................... 99 SysComWrite...................................................... 94
MX_Internal.lib.................................................. 201 SysDirOpen....................................................... 190
MX_MoveAbsolute.............................................. 78 SysDirRead....................................................... 190
MX_MoveAdditive............................................... 81 SysFileClose..................................................... 190
MX_MoveRelative............................................... 84 SysFileCloseAsync........................................... 190
MX_MoveVelocity............................................... 87 SysFileCopy...................................................... 190
MX_PositionLoopEventInfo............................... 100 SysFileCopyAsync............................................ 190
MX_Power......................................................... 103 SysFileDelete.................................................... 190
MX_ReadParamDINT....................................... 173 SysFileDeleteAsync.......................................... 190
MX_ReadUnit.................................................... 156 SysFileEOF....................................................... 191
MX_Reset......................................................... 107 SysFileEOFAsync............................................. 191
MX_SetCmdState............................................. 175 SysFileGetPos.................................................. 191
MX_SetControl.................................................. 112 SysFileGetPosAsync........................................ 191
MX_SetDeviceMode......................................... 114 SysFileGetSize................................................. 191
MX_SetOpMode................................................ 116 SysFileGetSizeAsync........................................ 191
MX_Stop............................................................. 89 SysFileGetTime................................................ 191
MX_SynchronControl........................................ 184 SysFileGetTimeAsync....................................... 191
MX_SysComOpenAsync..................................... 91 SysFileOpen..................................................... 190
MX_SysLibCom.lib.............................................. 90 SysFileOpenAsync............................................ 190
MX_SysLibDir................................................... 189 SysFileRead...................................................... 190
MX_SysLibDir.lib SysFileReadAsync............................................ 190
Notes on utilization ..................................... 190 SysFileRename................................................. 191
MX_SysLibFile SysFileRenameAsync....................................... 191
Notes on utilization ..................................... 192 SysFileSetPos................................................... 191
MX_SysLibFile.lib.............................................. 190 SysFileSetPosAsync......................................... 191
MX_SysLibFileAsync.lib.................................... 190 SysFileWrite...................................................... 190
MX_SysLibMem SysFileWriteAsync............................................ 190
Functions .................................................... 189 SysLibCallback.lib............................................. 194
Notes on utilization ..................................... 189 SysLibSem.lib................................................... 195
MX_SysLibMem.lib........................................... 189 SysLibSockets.lib
Notes on utilization ..................................... 196
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 207/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Index

S S
SysLibStr.lib...................................................... 199 SysSockListen.................................................. 195
SysMemCmp.................................................... 189 SysSockloctl...................................................... 195
SysMemCpy...................................................... 189 SysSockNtohI................................................... 195
SysMemMove................................................... 189 SysSockNtohs................................................... 195
SysMemSet....................................................... 189 SysSockRecv.................................................... 195
SysMemSwap................................................... 189 SysSockRecvFrom........................................... 196
SysSockAccept................................................. 195 SysSockSelect.................................................. 195
SysSockBind..................................................... 195 SysSockSend.................................................... 196
SysSockClose................................................... 195 SysSockSendTo............................................... 196
SysSockConnect............................................... 195 SysSockSetOption............................................ 195
SysSockCreate................................................. 195 Socket levels .............................................. 197
SysSockGetHostByName................................. 195 SysSockShutdown............................................ 195
SysSockGetHostName..................................... 195 diHow ......................................................... 199
SysSockGetLastErrorSync............................... 195
SysSockGetOption............................................ 195
Socket levels .............................................. 197
T
SysSockHtonI................................................... 195 TCP/IP communication..................................... 195
SysSockHtons................................................... 195 Tools................................................................... 96
SysSockInetAddr.............................................. 195
SysSockInetNtoa.............................................. 195 U
SysSockIoctl UDP communication......................................... 195
diCommand ................................................ 198
208/209 Bosch Rexroth AG DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P
Rexroth IndraDrive Rexroth IndraMotion MLD Library
DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P Bosch Rexroth AG 209/209
Rexroth IndraDrive Rexroth IndraMotion MLD Library

Notes
R911309224