Rexroth IndraDrive Firmware Libraries

212
Electric Drives and Controls Pneumatics Service Linear Motion and Assembly Technologies Hydraulics

Transcript of Rexroth IndraDrive Firmware Libraries

Page 1: Rexroth IndraDrive Firmware Libraries

Electric Drivesand Controls Pneumatics Service

Linear Motion and Assembly TechnologiesHydraulics

Page 2: Rexroth IndraDrive Firmware Libraries

Rexroth IndraDriveRexroth IndraMotion MLDLibrary

Library Description

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

RS-3f8ef8b70a6846ac00b4b7d3d98a87cc-4-en-US-3

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

Edition Release Date Notes

DOK-INDRV*-MLD-SYSLIB*-FK01-EN-Pto DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P

2004-08-13 to2010-03-23

See chapter "About ThisDocumentation", margin‐al note "Editions of ThisDocumentation"

Copyright © Bosch Rexroth AG 2010Copying this document, giving it to others and the use or communication of thecontents thereof without express authority, are forbidden. Offenders are liablefor the payment of damages. All rights are reserved in the event of the grant ofa 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 bedeemed to be guaranteed unless expressly confirmed in the contract. All rightsare reserved with respect to the content of this documentation and the availa‐bility of the product.

Published by Bosch Rexroth AGBgm.-Dr.-Nebel-Str. 2 ■ D-97816 Lohr a. MainTelephone +49 (0)93 52/ 40-0 ■ Fax +49 (0)93 52/ 40-48 85http://www.boschrexroth.com/Dept. DCC/EDY1 (SA, BB)

Note This document has been printed on chlorine-free bleached paper.

Title

Type of Documentation

Document Typecode

Internal File Reference

Purpose of Documentation

Record of Revision

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

Page 3: Rexroth IndraDrive Firmware Libraries

Table of ContentsPage

1 Rexroth IndraDrive Firmware Libraries.......................................................................... 51.1 About This Documentation..................................................................................................................... 51.2 General Information................................................................................................................................ 71.3 Libraries.................................................................................................................................................. 81.3.1 Supported Libraries............................................................................................................................. 81.3.2 Library Assignment for the Targets "IndraDrive MPH02" and "IndraDrive MP03"............................... 91.3.3 Library Assignment as of the Target "IndraDrive MP04"................................................................... 121.4 Signal Time Diagrams of Most Frequently Used Inputs and Outputs................................................... 221.5 Error Handling....................................................................................................................................... 261.5.1 General Information........................................................................................................................... 261.5.2 Error Reference Lists for Function Blocks as of Target "IndraDrive MP03"...................................... 281.6 Data Types........................................................................................................................................... 341.6.1 General Data Types.......................................................................................................................... 341.6.2 Selected Data Types of "MX_Base.lib".............................................................................................. 35

MB_IDN.......................................................................................................................................... 351.7 AnalyzationNew.lib............................................................................................................................... 351.8 Iecsfc.lib................................................................................................................................................ 351.9 MX_PLCopen.lib................................................................................................................................... 361.9.1 General Information........................................................................................................................... 361.9.2 Overview of the Function Blocks....................................................................................................... 361.9.3 Function Blocks................................................................................................................................. 37

MB_ChangeProfileSet ................................................................................................................... 37MB_ChangeProfileStep.................................................................................................................. 39MB_Command................................................................................................................................ 42MB_GearInPos............................................................................................................................... 46MB_MotionProfile........................................................................................................................... 49MB_Phasing................................................................................................................................... 52MB_PhasingSlave.......................................................................................................................... 53MB_Stop......................................................................................................................................... 55MC_CamIn...................................................................................................................................... 57MC_CamOut................................................................................................................................... 60MC_GearIn..................................................................................................................................... 61MC_GearOut.................................................................................................................................. 63MC_MoveAbsolute......................................................................................................................... 64MC_MoveAdditive........................................................................................................................... 66MC_MoveRelative.......................................................................................................................... 69MC_MoveVelocity........................................................................................................................... 71MC_Stop......................................................................................................................................... 74MC_TorqueControl......................................................................................................................... 77MX_MoveAbsolute.......................................................................................................................... 78MX_MoveAdditive........................................................................................................................... 81MX_MoveRelative........................................................................................................................... 84MX_MoveVelocity........................................................................................................................... 87MX_Stop......................................................................................................................................... 89

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

Bosch Rexroth AG I/209

Table of Contents

Page 4: Rexroth IndraDrive Firmware Libraries

Page

1.10 MX_SysLibCom.lib................................................................................................................................ 901.10.1 Overview............................................................................................................................................ 901.10.2 MX_fSysComStatus........................................................................................................................... 911.10.3 MX_SysComOpenAsync................................................................................................................... 911.10.4 SysComClose.................................................................................................................................... 921.10.5 SysComOpen.................................................................................................................................... 931.10.6 SysComRead.................................................................................................................................... 931.10.7 SysComWrite..................................................................................................................................... 941.11 MX_Base.lib.......................................................................................................................................... 951.11.1 Introduction........................................................................................................................................ 951.11.2 "Tools" - General Functions and Function Blocks............................................................................. 96

Overview......................................................................................................................................... 96ATAN2............................................................................................................................................ 96MX_fGetFreeTicks.......................................................................................................................... 96MX_fGetHighResTime.................................................................................................................... 97MX_fHighResTimerTicks_to_us...................................................................................................... 98MX_IECTaskGetLoad..................................................................................................................... 99MX_PositionLoopEventInfo.......................................................................................................... 100

1.11.3 "Drive Control" - Function Blocks/Functions for Drive Control......................................................... 100Overview....................................................................................................................................... 100MB_Home..................................................................................................................................... 100MB_PreSetMode.......................................................................................................................... 102MX_Power / MC_Power................................................................................................................ 103MC_ReadStatus........................................................................................................................... 105MX_Reset / MC_Reset................................................................................................................. 107MX_Command.............................................................................................................................. 109MX_SetControl............................................................................................................................. 112MX_SetDeviceMode..................................................................................................................... 114MX_SetOpMode........................................................................................................................... 116MB_SetPositionControlMode........................................................................................................ 119

1.11.4 "Diagnostic" - Functions for Diagnosis............................................................................................. 120Overview....................................................................................................................................... 120MX_fGetDriveWarning.................................................................................................................. 121MX_fSetDriveError........................................................................................................................ 121MX_fSetDriveWarning.................................................................................................................. 122

1.11.5 "Parameters" - Function Blocks/Functions for Parameters.............................................................. 123Overview....................................................................................................................................... 123MB_ChangeCamData................................................................................................................... 124MX_fCheckCmdRequest.............................................................................................................. 126MX_fReadParamDINT.................................................................................................................. 127MX_fReadStringParam................................................................................................................. 128MX_fSetParamLimits.................................................................................................................... 129MX_fSetParamName.................................................................................................................... 130MX_fSetParamUnit....................................................................................................................... 131MX_fWriteParamDINT.................................................................................................................. 132MX_fWriteStringParam................................................................................................................. 133

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

II/209

Table of Contents

Page 5: Rexroth IndraDrive Firmware Libraries

Page

MB_ReadListParameter............................................................................................................... 134MB_ReadMaxRealValue.............................................................................................................. 136MB_ReadMaxValue...................................................................................................................... 138MB_ReadMinRealValue............................................................................................................... 140MB_ReadMinValue....................................................................................................................... 142MB_ReadName............................................................................................................................ 144MB_ReadParameter..................................................................................................................... 146MB_ReadRealListParameter........................................................................................................ 148MB_ReadRealParameter.............................................................................................................. 150MB_ReadSercosDataStatus......................................................................................................... 152MB_ReadSercosAttribute ............................................................................................................ 155MB_ReadUnit / MX_ReadUnit...................................................................................................... 156MB_ReadStringParameter............................................................................................................ 158MB_WriteParameter..................................................................................................................... 160MB_WriteRealListParameter ....................................................................................................... 163MB_WriteListParameter ............................................................................................................... 165MB_WriteRealParameter.............................................................................................................. 168MB_WriteStringParameter............................................................................................................ 171MX_ReadParamDINT................................................................................................................... 173MX_SetCmdState......................................................................................................................... 175MX_WriteParamDINT................................................................................................................... 176

1.11.6 "Scaling" - Functions for Scaling...................................................................................................... 178MX_fDINT_AccTo_REAL.............................................................................................................. 178MX_fDINT_DistTo_REAL ............................................................................................................. 179MX_fDINT_VelTo_REAL .............................................................................................................. 179MX_fREAL_AccTo_DINT ............................................................................................................. 180MX_fREAL_DistTo_DINT ............................................................................................................. 181MX_fREAL_TorqueRampTo_DINT .............................................................................................. 181MX_fREAL_TorqueTo_DINT ....................................................................................................... 182MX_fREAL_VelTo_DINT .............................................................................................................. 183

1.12 MX_DSP.lib......................................................................................................................................... 1831.12.1 General Information......................................................................................................................... 1831.12.2 MX_SynchronControl....................................................................................................................... 1841.12.3 Notes on Programming ................................................................................................................... 1891.13 MX_SysLibMem.................................................................................................................................. 1891.13.1 General Information......................................................................................................................... 1891.13.2 Functions......................................................................................................................................... 1891.13.3 Notes on Utilization.......................................................................................................................... 1891.14 MX_SysLibDir..................................................................................................................................... 1891.14.1 General Information......................................................................................................................... 1891.14.2 Functions......................................................................................................................................... 1901.14.3 Notes on Utilization.......................................................................................................................... 1901.15 "MX_SysLibFile" and "MX_SysLibFileAsync"..................................................................................... 1901.16 MX_SysLibIecTasks.lib....................................................................................................................... 1921.17 RIL_CommonTypes.lib ...................................................................................................................... 1921.18 RIL_SocketComm.lib.......................................................................................................................... 194

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

Bosch Rexroth AG III/209

Table of Contents

Page 6: Rexroth IndraDrive Firmware Libraries

Page

1.19 RIL_Utilities......................................................................................................................................... 1941.20 RIL_VExUtil.lib.................................................................................................................................... 1941.21 SysLibCallback.lib............................................................................................................................... 1941.22 SysLibSem.lib..................................................................................................................................... 1951.23 SysLibSockets.................................................................................................................................... 1951.23.1 General............................................................................................................................................ 1951.23.2 Overview of Function Blocks and Functions.................................................................................... 1951.23.3 Notes on Utilization.......................................................................................................................... 1961.24 SysLibStr.lib........................................................................................................................................ 1991.25 Util.lib.................................................................................................................................................. 1991.26 For Internal Test Purposes Only!: The Library "MX_Debug.lib".......................................................... 1991.27 For Program-Internal Use Only!: Functions for Checking or Signaling Runtime Errors...................... 2001.28 Do Not Use!: Internal Functions, Function Blocks, Data Types and Structures................................. 200

2 Appendix.................................................................................................................... 2032.1 Service and Support........................................................................................................................... 203

Index.......................................................................................................................... 205

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

IV/209

Table of Contents

Page 7: Rexroth IndraDrive Firmware Libraries

1 Rexroth IndraDrive Firmware Libraries1.1 About This Documentation

Editions of This Documentation

Edition Release date Notes

DOK-INDRV*-MLD-SYSLIB*-FK01-EN-P 2004-08-13 Contains descriptions of libraries for target "IndraDriveMPH02"

DOK-INDRV*-MLD-SYSLIB*-FK02-EN-P 2006-10-27 Contains descriptions of libraries for targets "IndraDriveMPH02", "IndraDrive MP03" and "IndraDrive MP04"

DOK-INDRV*-MLD-SYSLIB*-FK03-EN-P 2007-10-30Contains descriptions of libraries for targets "IndraDriveMPH02", "IndraDrive MP03", "IndraDrive MP04" and"IndraDrive MP05"

DOK-INDRV*-MLD-SYSLIB*-FK04-DE-P 2009-11-11

Error corrections and additions.Also contains descriptions of functions and function blocks fortargets "IndraDrive MP06" and "IndraDrive MP07".Contains references to the documentation of the basic libra‐ries for IndraLogic 1x.

DOK-INDRV*-MLD-SYSLIB*-FK05-EN-P 2010-03-23

Table on dependance between parameterization of the axis,functional package and selected function block includedChapters and links on "RIL" and system libraries includedError corrections

Fig.1-1: Record of RevisionsMeans of Representation in This

DocumentationTo make the reading of this documentation easier for you, the table below con‐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‐face

Click Window ▶ Show view ▶ Properties

Buttons and keys... ... are represented in angle brackets Click <Add> orPress <Ctrl>+<Alt>

Important facts which are to be highligh‐ted in the body text

Boldface For remote axes, "Active"=TRUE signalsthat ...

Parameter names, diagnostic messagenames, function designations

Quotation marks "Axis2" to "Axis8" correspond to the re‐mote axes. The addresses contained inthe list "P‑0‑1601, CCD:Addresses ofprojected drives" ...

Fig.1-2: Conventions of NotationAll important notes are highlighted. A symbol tells you what kind of note is usedin the text. The symbols have the following significances:

...DANGER

DANGER indicates a hazardous situation which, if not avoided, will result indeath or serious injury.

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

Bosch Rexroth AG 5/209

Rexroth IndraDrive Firmware Libraries

Page 8: Rexroth IndraDrive Firmware Libraries

...WARNING

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

...CAUTION

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

...NOTICEIn case of non-compliance with this safety instruction, property damage couldoccur.

This box contains important information which you should take intoconsideration.

This symbol highlights useful tips and tricks.

Your Feedback Your experience is important for our improvement processes of products anddocumentations.If you discover mistakes in this documentation or suggest changes, you cansend your feedback to the following e-mail address:[email protected] 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.

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

6/209

Rexroth IndraDrive Firmware Libraries

Page 9: Rexroth IndraDrive Firmware Libraries

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

Reference DocumentationsTitle Kind of documentation Document typecode1) Part number

Rexroth IndraWorksBasic LibrariesIndraLogic 1x

Reference Book DOK-IL*1X*-BASLIB**V09-RE01-EN-P

R911330547

1) In the document typecodes, "xx" is a wild card for the current edition ofthe documentation (example: PR01 is the first edition of a Project Plan‐ning Manual)

Fig.1-4: Documentations – Overview

1.2 General InformationThe PLC programming system Rexroth IndraLogic allows managing differentlibraries.The corresponding hardware must be available to use the different IndraDrivetarget systems as drive-integrated PLC (see Application Manual "RexrothIndraMotion MLD"). In addition, the functional expansion package "IndraMotionMLD" must have been enabled (see also Functional Description of firmware"Enabling of Functional Packages").For operating the IndraDrive target systems as drive-integrated PLC, Rexrothprovides specific function block libraries. After you have installed the PLC pro‐gramming system Rexroth IndraLogic, these libraries are contained in thedirectory● ...\Rexroth\IndraLogic\Targets(target systems IndraDrive MPH02 and

IndraDrive MP03)● ...\Rexroth\IndraWorks\IndraLogic\Targets (as of target system

IndraDrive MP04)

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

Bosch Rexroth AG 7/209

Rexroth IndraDrive Firmware Libraries

Page 10: 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 allowssubsequently 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 withbasic libraries containing fundamental function blocks and definitions/variables.As regards the function blocks, it is possible to create IEC functions/functionblocks or define firmware function blocks according to the library type.As the code of the firmware libraries is contained in the firmware, the functionsof the PLC have to be known at the start time. For this purpose, a header filetemplate 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 possibleinput at the current cursor position in the editor window. In the leftcolumn of the dialog select the desired category of input, in the rightcolumn highlight the desired feature and confirm your selection with"OK".

1.3 Libraries1.3.1 Supported LibrariesLibrary Target Description

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

Iecsfc.lib As of "IndraDrive MPH02" Makes available IEC steps conforming to standard in sequen‐tial language ["Sequential Function Chart" (SFC)]

MX_Base.lib As of "IndraDrive MPH02"

● General Functions● Functional 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)● Axis Structures [for Multi-Axis System (MLD System

Mode)]

MX_CheckRtv.lib As of "IndraDrive MPH02" For Program-Internal Use Only!: Functions for Checking orSignaling Runtime Errors

MX_Debug.lib_int As of "IndraDrive MPH02" For Internal Test Purposes Only (Laboratory)!

MX_DSP.lib As of "IndraDrive MPH02" Function block for realizing a consistent data exchange via thereal-time channel

MX_Internal.lib As of "IndraDrive MPH02" Do Not Use!: Internal Functions, Function Blocks, Data Typesand 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

MX_SysLibDir.lib As of "IndraDrive MPH02" Functions for synchronously accessing a file directory systemon the target

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

8/209

Rexroth IndraDrive Firmware Libraries

Page 11: Rexroth IndraDrive Firmware Libraries

Library Target Description

MX_SysLibFile.lib As of "IndraDrive MPH02" Functions for synchronously accessing files

MX_SysLibFileA‐sync.lib As of "IndraDrive MPH02" Functions for asynchronously accessing files

MX_SysLibIecTasks.lib As of "IndraDrive MP05" Functions for managing IEC tasks

MX_SysLibMem.lib As of "IndraDrive MPH02" Functions for memory management

NetVar‐Udp_LIB_V23.lib As of "IndraDrive MP05" For Program-Internal Use Only!: Functions for Processing

Network Variables

RIL_CommonTypes.lib As of "IndraDrive MPH02" Contains data types and structures most of which are onlyused internally

RIL_SocketComm.lib As of "IndraDrive MPH02" Functions and function blocks which allow using the TCP/UDPcommunication

RIL_Utilities.lib As of "IndraDrive MPH02" Functions and functions blocks for conversions, SERCOS andfor time measurement or time conversion

RIL_VExUtil.lib As of "IndraDrive MPH02" Function block allowing safe key-type operation with all VExdevices

Standard.lib As of "IndraDrive MPH02"Functions and function blocks that are required byIEC 61131‑3 as standard blocks for an IEC programming sys‐tem

SysLibCallback.lib As of "IndraDrive MPH02" System library: Functions for activating defined callback func‐tions for runtime events

SysLibSem.lib As of "IndraDrive MP06" System library: Functions for creating and using semaphoresfor task synchronization

SysLibSockets.lib As of "IndraDrive MP05" System library: Functions supporting the access to sockets forcommunication via TCP/IP and UDP

SysLibStr.lib As of "IndraDrive MPH02" System library: Functions for handling strings

Util.lib As of "IndraDrive MPH02"

Function blocks that can be used for BCD conversion, bit/bytefunctions, mathematical auxiliary functions, as controllers, sig‐nal generators, function manipulators and for analog valueprocessing

1.3.2 Library Assignment for the Targets "IndraDrive MPH02" and "IndraDriveMP03"

Depending on the functional package and the parameterization ofthe axis, not all function blocks are operable (see table " Depend‐ance Between Parameterization of the Axis, Functional Packageand Selected Function Block").

Function block name Description Target Library Range

ATAN2 For the conversion of Cartesian coordi‐nates P(x;y) into polar coordinates P(r;φ),the function is used to determine the angleφ.

IndraDriveMPH02

Base_MPH02.lib Tools

IndraDrive MP03 Base_MP03.lib

MB_ReadMaxRealVal‐ue

With the function block it is possible to readthe maximum allowed value of a parame‐ter. The value is returned in REAL format.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

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

Bosch Rexroth AG 9/209

Rexroth IndraDrive Firmware Libraries

Page 12: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MB_ReadMaxValue With the function block it is possible to readthe maximum allowed value of a parame‐ter. The value is returned in DINT format.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_ReadMinRealVal‐ue

With the function block it is possible to readthe minimum allowed value of a parameter.The value is returned in REAL format.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_ReadMinValue With the function block it is possible to readthe minimum allowed value of a parameter.The value is returned in DINT format.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_ReadName With the function block it is possible to readthe name of a parameter.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_ReadParameter With the function block it is possible to readthe current value of a parameter. The re‐turn value is DINT.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_ReadRealParame‐ter

With the function block it is possible to readthe current value of a parameter. The re‐turn value is REAL.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_ReadSercosAttri‐bute

With the function block it is possible to readthe SERCOS attribute of a parameter.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_WriteParameter With the function block it is possible to writea defined value to a parameter.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MB_WriteRealParame‐ter

With the function block you can write a de‐fined REAL value to the parameter belong‐ing to the parameter number.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MX_Command The function block is used to execute adrive command.

IndraDriveMPH02

Base_MPH02.lib Drive Control

IndraDrive MP03 Base_MP03.lib

MX_fDINT_AccTo_RE‐AL

The firmware function converts an accel‐eration value in the fixed point format ofdata type DINT into a REAL value, accord‐ing to the scaling which has been set.

IndraDriveMPH02

Base_MPH02.lib Scaling

IndraDrive MP03 Base_MP03.lib

MX_fDINT_DistTo_RE‐AL

The firmware function converts a positionvalue in the fixed point format of data typeDINT into a REAL value, according to thescaling which has been set.

IndraDriveMPH02

Base_MPH02.lib Scaling

IndraDrive MP03 Base_MP03.lib

MX_fDINT_VelTo_RE‐AL

The firmware function converts a velocityvalue in the fixed point format of data typeDINT into a REAL value, according to thescaling which has been set.

IndraDriveMPH02

Base_MPH02.lib Scaling

IndraDrive MP03 Base_MP03.lib

MX_fGetFreeTicks The function is used to determine the timeof the last PLC time slice still available tothe PLC. This PLC time slice is that part ofa millisecond which remains after the drivecontroller and control tasks have been pro‐cessed.

IndraDriveMPH02

Base_MPH02.lib Tools

IndraDrive MP03 Base_MP03.lib

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

10/209

Rexroth IndraDrive Firmware Libraries

Page 13: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MX_fGetDriveWarning The firmware function allows pollingwhether a certain warning diagnosis is ac‐tive in the drive.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Diagnostic

IndraDrive MP03 Base_MP03.lib

MX_fGetHighResTime The function returns a growing timer valuewith high resolution.

IndraDriveMPH02

Base_MPH02.lib Tools

IndraDrive MP03 Base_MP03.lib

MX_fReadParamDINT The firmware function is used to read a pa‐rameter value and return it as DINT.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Parameter

IndraDrive MP03 Base_MP03.lib

MX_fReadStringParam With the firmware function it is possible toread a parameter the operating data ofwhich has the ASCII format (string).

IndraDriveMPH02

Base_MPH02.lib Drive Control /Parameter

IndraDrive MP03 Base_MP03.lib

MX_fREAL_Ac‐cTo_DINT

The firmware function converts an accel‐eration value in the REAL format into afixed-point DINT value, according to thescaling which has been set.

IndraDriveMPH02

Base_MPH02.lib Scaling

IndraDrive MP03 Base_MP03.lib

MX_fREAL_Dis‐tTo_DINT

The firmware function converts a positionvalue in the REAL format into a fixed-pointDINT value, according to the scaling whichhas been set.

IndraDriveMPH02

Base_MPH02.lib Scaling

IndraDrive MP03 Base_MP03.lib

MX_fREAL_Vel‐To_DINT

The firmware function converts a velocityvalue in the REAL format into a fixed-pointDINT value, according to the scaling whichhas been set.

IndraDriveMPH02

Base_MPH02.lib Scaling

IndraDrive MP03 Base_MP03.lib

MX_fSetDriveError The firmware function triggers an error di‐agnosis in the drive.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Diagnostic

IndraDrive MP03 Base_MP03.lib

MX_fSetDriveWarning The firmware function is used to set or cleara warning diagnosis in the drive.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Diagnostic

IndraDrive MP03 Base_MP03.lib

MX_fWriteParamDINT The firmware function is used to write datato a parameter.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Parameter

IndraDrive MP03 Base_MP03.lib

MX_fWriteStringParam The firmware function is used to write datato a text parameter.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Parameter

IndraDrive MP03 Base_MP03.lib

MX_MoveAbsolute The function block is used to move thedrive to a preset absolute position.

IndraDriveMPH02

MXMo‐tion_MPH02.lib

Single Axis Mo‐tion

IndraDrive MP03 MXMo‐tion_MP03.lib

MX_MoveAdditive The function block is used to move thedrive in relative form by a distance in addi‐tion to the target position.

IndraDriveMPH02

MXMo‐tion_MPH02.lib

Single Axis Mo‐tion

IndraDrive MP03 MXMo‐tion_MP03.lib

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

Bosch Rexroth AG 11/209

Rexroth IndraDrive Firmware Libraries

Page 14: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MX_MoveRelative The function block is used to move thedrive in relative form by a distance, startingfrom the current actual position.

IndraDriveMPH02

MXMo‐tion_MPH02.lib

Single Axis Mo‐tion

IndraDrive MP03 MXMo‐tion_MP03.lib

MX_MoveVelocity The function block is used to preset a ve‐locity for the drive.

IndraDriveMPH02

MXMo‐tion_MPH02.lib

Single Axis Mo‐tion

IndraDrive MP03 MXMo‐tion_MP03.lib

MC_Power When the internal PLC has permanent ortemporary control over the drive, drive en‐able can be activated with this functionblock.

IndraDriveMPH02

Base_MPH02.lib Drive Control

MX_PowerIndraDrive MP03 Base_MP03.lib

MX_ReadParamDINT The function block is used to read a pa‐rameter value and return it as DINT.

IndraDriveMPH02

Base_MPH02.lib Drive Control

IndraDrive MP03 Base_MP03.lib

MX_ReadUnit With the function block it is possible to readthe unit of a parameter.

IndraDrive MP03 Base_MP03.lib Drive Control /Parameter

MX_Reset The function block is used to reset driveerrors with the command "S‑0‑0099,C0500 Reset class 1 diagnostics".

IndraDriveMPH02

Base_MPH02.lib Drive Control

IndraDrive MP03 Base_MP03.lib

MX_SetDeviceMode The function block is used to switch thedrive to the parameter or operating mode.

IndraDriveMPH02

Base_MPH02.lib Drive Control

IndraDrive MP03 Base_MP03.lib

MX_SetOpMode The function block is used to directly switchthe operation mode of the drive.

IndraDriveMPH02

Base_MPH02.lib Drive Control

IndraDrive MP03 Base_MP03.lib

MX_SetControl The function block is used to switch controlbetween master communication and PLC.

IndraDriveMPH02

Base_MPH02.lib Drive Control

IndraDrive MP03 Base_MP03.lib

MX_Stop The function block is used to bring the driveto the status STOP.

IndraDriveMPH02

MXMo‐tion_MPH02.lib

Single Axis Mo‐tion

IndraDrive MP03 MXMo‐tion_MP03.lib

MX_WriteParamDINT The function block is used to write a pa‐rameter. It is possible to write in unbufferedor buffered form.

IndraDriveMPH02

Base_MPH02.lib Drive Control /Parameter

IndraDrive MP03 Base_MP03.lib

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

1.3.3 Library Assignment as of the Target "IndraDrive MP04"Depending on the functional package and the parameterization ofthe axis, not all function blocks are operable (see table " Depend‐ance Between Parameterization of the Axis, Functional Packageand Selected Function Block").

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

12/209

Rexroth IndraDrive Firmware Libraries

Page 15: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

ATAN2 For the conversion of Cartesian coordi‐nates P(x;y) into polar coordinates P(r;φ),the function is used to determine the angleφ.

IndraDrive MP04 MX_Base.lib Tools

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ChangeCamData The function block supports loading of camprofiles to the drive parameters intendedfor this purpose.

IndraDrive MP06 MX_Base.lib Drive Control /ParameterIndraDrive MP07

MB_ChangeProfileSet The function block is used to apply the datawhich describe the set of a motion profile.

IndraDrive MP05 MX_PLCOpen.lib

Motion

IndraDrive MP06

IndraDrive MP07

MB_ChangeProfile‐Step

The function block is used to change thefour parameters which define a segment ofa motion profile set.

IndraDriveMP04V12

MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_Command The function block is used to execute, mon‐itor and abort commands.

IndraDrive MP06 MX_PLCOpen.lib

Motion

IndraDrive MP07

MB_GearInPos With the function block it is possible to re‐alize a motion of the slave axis which isphase synchronous to the master axis.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_Home With the function block it is possible to carryout the "drive-controlled homing proce‐dure" in the selected axis.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_MotionProfile The function block realizes an electroniccam function.

IndraDrive MP04 MX_PLCopen.lib Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_Phasing The function block allows realizing an off‐set to the master axis which is connectedas input to a synchronization function block("MC_CamIn" or "MC_GearInPos").

IndraDrive MP04 MX_PLCopen.lib Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_PhasingSlave With the function block it is possible to ad‐just the slave axis by a position offset.

IndraDrive MP04 MX_PLCopen.lib Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

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

Bosch Rexroth AG 13/209

Rexroth IndraDrive Firmware Libraries

Page 16: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MB_PreSetMode With the function block the axis can be pre‐pared for command triggering before pow‐er is switched on (PreSetMode / preselect‐ing operation modes).

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadListParame‐ter

With the function block it is possible to readthe current value of a list parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadMaxRealVal‐ue

With the function block it is possible to readthe maximum allowed value of a parame‐ter. The value is returned in REAL format.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadMaxValue With the function block it is possible to readthe maximum allowed value of a parame‐ter. The value is returned in DINT format.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadMinRealVal‐ue

With the function block it is possible to readthe minimum allowed value of a parameter.The value is returned in REAL format.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadMinValue With the function block it is possible to readthe minimum allowed value of a parameter.The value is returned in DINT format.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadName With the function block it is possible to readthe name of a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadParameter With the function block it is possible to readthe current value of a parameter. The re‐turn value is DINT.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadRealList‐Parameter

With the function block it is possible to readthe current list of a list parameter.

IndraDrive MP05 MX_Base.lib Drive Control /ParameterIndraDrive MP06

IndraDrive MP07

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

14/209

Rexroth IndraDrive Firmware Libraries

Page 17: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MB_ReadRealParame‐ter

With the function block it is possible to readthe current value of a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadSercosAttri‐bute

With the function block it is possible to readthe SERCOS attribute of a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadSercosDa‐taStatus

With the function block it is possible to readthe status of a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadStringPara‐meter

With the function block it is possible to reada parameter the operating data of whichhas the ASCII format (string).

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_ReadUnit With the function block it is possible to readthe unit of a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_SetPositionCon‐trolMode

The function block is used to set the posi‐tion loop.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_Stop The function block is used to bring the driveto the status STOP.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

MB_WriteListParame‐ter

With the function block it is possible to writedefined values to a list parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_WriteParameter With the function block it is possible to writea defined value to a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

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

Bosch Rexroth AG 15/209

Rexroth IndraDrive Firmware Libraries

Page 18: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MB_WriteRealList‐Parameter

With the function block it is possible to writedefined values to a list parameter.

IndraDrive MP05 MX_Base.lib Drive Control /ParameterIndraDrive MP06

IndraDrive MP07

MB_WriteRealParame‐ter

With the function block you can write a de‐fined REAL value to the parameter belong‐ing to the parameter number.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MB_WriteStringPara‐meter

With the function block it is possible to writea parameter the operating data of whichhas the ASCII format (string).

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_CamIn With the function block it is possible to re‐alize an electronic cam.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_CamOut The function block is used to terminate anactive synchronization function block.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_GearIn With the function block it is possible to re‐alize a motion of the slave axis which isvelocity-synchronous to the master axis.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_GearOut The function block is used to terminate anactive synchronization function block.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_MoveAbsolute The function block is used to move thedrive to a preset absolute position.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_MoveAdditive The function block is used to move thedrive in relative form by a distance in addi‐tion to the target position.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

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

16/209

Rexroth IndraDrive Firmware Libraries

Page 19: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MC_MoveRelative The function block is used to move thedrive in relative form by a distance, startingfrom the current actual position.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_MoveVelocity The function block is used to preset a ve‐locity for the drive.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_Power When the internal PLC has permanent ortemporary control over the drive, drive en‐able can be activated with this functionblock.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_ReadStatus The function block reads the current statusof the axis and outputs it in decoded form.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_Reset The function block is used to reset driveerrors with the command "S‑0‑0099,C0500 Reset class 1 diagnostics".

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_Stop The function block is used to bring the driveto the status STOP.

IndraDrive MP04 MX_PLCopen.lib Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MC_TorqueControl The function block is used to activate theoperation mode "torque/force control"; thedrive follows the command value input.

IndraDrive MP05 MX_PLCopen.lib Motion

IndraDrive MP06

IndraDrive MP07

MX_Command The function block is used to execute adrive command.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fCheckCmdRe‐quest

The firmware function is used to return thecommand input which was preset via thedrive parameter "P‑0‑1449, C4900 PLCcommand".

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

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

Bosch Rexroth AG 17/209

Rexroth IndraDrive Firmware Libraries

Page 20: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MX_fDINT_AccTo_RE‐AL

The firmware function converts an accel‐eration value in the fixed point format ofdata type DINT into a REAL value, accord‐ing to the scaling which has been set.

IndraDrive MP04 MX_Base.lib Scaling

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fDINT_DistTo_RE‐AL

The firmware function converts a positionvalue in the fixed point format of data typeDINT into a REAL value, according to thescaling which has been set.

IndraDrive MP04 MX_Base.lib Scaling

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fDINT_VelTo_RE‐AL

The firmware function converts a velocityvalue in the fixed point format of data typeDINT into a REAL value, according to thescaling which has been set.

IndraDrive MP04 MX_Base.lib Scaling

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fGetDriveWarning The firmware function allows pollingwhether a certain warning diagnosis is ac‐tive in the drive.

IndraDrive MP04 MX_Base.lib Drive Control /DiagnosticIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fGetFreeTicks The function is used to determine the timeof the last PLC time slice still available tothe PLC. This PLC time slice is that part ofa millisecond which remains after the drivecontroller and control tasks have been pro‐cessed.

IndraDrive MP04 MX_Base.lib Tools

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fGetHighResTime The function returns a growing timer valuewith high resolution.

IndraDrive MP04 MX_Base.lib Tools

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fHighResTimer‐Ticks_to_us

The function is used to convert timer ticksinto microseconds and return the value asREAL.

IndraDrive MP04 MX_Base.lib Tools

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fReadParamDINT The firmware function is used to read a pa‐rameter value and return it as DINT.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fReadStringParam With the firmware function it is possible toread a parameter the operating data ofwhich has the ASCII format (string).

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

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

18/209

Rexroth IndraDrive Firmware Libraries

Page 21: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MX_fREAL_Ac‐cTo_DINT

The firmware function converts an accel‐eration value in the REAL format into afixed-point DINT value, according to thescaling which has been set.

IndraDrive MP04 MX_Base.lib Scaling

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fREAL_Dis‐tTo_DINT

The firmware function converts a positionvalue in the REAL format into a fixed-pointDINT value, according to the scaling whichhas been set.

IndraDrive MP04 MX_Base.lib Scaling

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fSetDriveError The firmware function triggers an error di‐agnosis in the drive.

IndraDrive MP04 MX_Base.lib Drive Control /DiagnosticIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fSetDriveWarning The firmware function is used to set or cleara warning diagnosis in the drive.

IndraDrive MP04 MX_Base.lib Drive Control /DiagnosticIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fSetParamLimits With the firmware function it is possible toset the limit values of the Global RegisterPLC parameters.

IndraDrive MP05 MX_Base.lib Drive Control /ParameterIndraDrive MP06

IndraDrive MP07

MX_fSetParamName With the firmware function it is possible toset the names of the Global Register PLCparameters.

IndraDrive MP05 MX_Base.lib Drive Control /ParameterIndraDrive MP06

IndraDrive MP07

MX_fSetParamUnit With the firmware function it is possible toset the limit values of the Global RegisterPLC parameters.

IndraDrive MP05 MX_Base.lib Drive Control /ParameterIndraDrive MP06

IndraDrive MP07

MX_fSysComStatus With the firmware function it is possible topoll the status of the opened port.

IndraDrive MP05 MX_SysLib‐Com.lib

Function blocks

IndraDrive MP06

IndraDrive MP07

MX_fREAL_TorqueR‐ampTo_DINT

The firmware function converts a torque/force ramp value in the REAL format into afixed-point DINT value, according to thescaling which has been set.

IndraDrive MP05 MX_Base.lib Scaling

IndraDrive MP06

IndraDrive MP07

MX_fREAL_Torque‐To_DINT

The firmware function converts a torque/force value in the REAL format into a fixed-point DINT value, according to the scalingwhich has been set.

IndraDrive MP05 MX_Base.lib Scaling

IndraDrive MP06

IndraDrive MP07

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

Bosch Rexroth AG 19/209

Rexroth IndraDrive Firmware Libraries

Page 22: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MX_fREAL_Vel‐To_DINT

The firmware function converts a velocityvalue in the REAL format into a fixed-pointDINT value, according to the scaling whichhas been set.

IndraDrive MP04 MX_Base.lib Scaling

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fWriteParamDINT The firmware function is used to write datato a parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_fWriteStringParam The firmware function is used to write datato a text parameter.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_IECTaskGetLoad The function block is used to activate theextended runtime measurement and dis‐plays information on the task load.

IndraDrive MP05 MX_Base.lib Tools

IndraDrive MP06

IndraDrive MP07

MX_MoveAbsolute The function block is used to move thedrive to a preset absolute position.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_MoveAdditive The function block is used to move thedrive in relative form by a distance in addi‐tion to the target position.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_MoveRelative The function block is used to move thedrive in relative form by a distance, startingfrom the current actual position.

IndraDrive MP04 MX_PLCOpen.lib

Motion

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_SysComOpenA‐sync

The firmware function block is used toasynchronously open the communicationchannel of a serial interface.

IndraDrive MP05 MX_SysLib‐Com.lib

Function blocks

IndraDrive MP06

IndraDrive MP07

MX_ReadParamDINT The function block is used to read a pa‐rameter value and return it as DINT.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

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

20/209

Rexroth IndraDrive Firmware Libraries

Page 23: Rexroth IndraDrive Firmware Libraries

Function block name Description Target Library Range

MX_SetCmdState With the firmware function block it is pos‐sible to set the command status of"P‑0‑1449, C4900 PLC command".

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_SetDeviceMode The function block is used to switch thedrive to the parameter or operating mode.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_SetControl The function block is used to switch controlbetween master communication and PLC.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_SetOpMode The function block is used to directly switchthe operation mode of the drive.

IndraDrive MP04 MX_Base.lib Drive Control

IndraDrive MP05

IndraDrive MP06

IndraDrive MP07

MX_WriteParamDINT The function block is used to write a pa‐rameter. It is possible to write in unbufferedor buffered form.

IndraDrive MP04 MX_Base.lib Drive Control /ParameterIndraDrive MP05

IndraDrive MP06

IndraDrive MP07

SysComClose The firmware function is used to close thecommunication channel of a serial inter‐face (COM Port).

IndraDrive MP05 MX_SysLib‐Com.lib

Function blocks

IndraDrive MP06

IndraDrive MP07

SysComOpen The firmware function is used to open thecommunication channel of a serial inter‐face.

IndraDrive MP05 MX_SysLib‐Com.lib

Function blocks

IndraDrive MP06

IndraDrive MP07

SysComRead The firmware function is used to read datafrom the serial interface.

IndraDrive MP05 MX_SysLib‐Com.lib

Function blocks

IndraDrive MP06

IndraDrive MP07

SysComWrite The firmware function is used to write datato the serial interface.

IndraDrive MP05 MX_SysLib‐Com.lib

Function blocks

IndraDrive MP06

IndraDrive MP07

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

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

Bosch Rexroth AG 21/209

Rexroth IndraDrive Firmware Libraries

Page 24: Rexroth IndraDrive Firmware Libraries

1.4 Signal Time Diagrams of Most Frequently Used Inputs andOutputs

Function blocks according to PLCopen use input and output signals with fixedfunctions.

Input Signals "Execute" / "Enable" To trigger the processing of a function block or to activate it, a function blockhas an "Execute" input, an "ExecuteLock" input or an "Enable" input. All threeinputs 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 arecollected and at the same time the command triggering of a one-time executionof 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 therepeated positive edge of "Execute". When command triggering has not yetbeen 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 thenew values.

The activation input "ExecuteLock" behaves like the "Execute" input. But aslong 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 loopfunction blocks), this has to be explicitly documented and marked at the functionblock input.

Output Signal "Active" For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 FALSEwhen "Enable" is reset.

For single axes, "Active" is not set!

Output Signal "Done" Function blocks which have an administrative task ("MC_Power", ...) or motionfunction blocks (such as "MC_MoveAbsolute", "MC_MoveRelative", ...) whichend in the "standstill" state, signal via the "Done" output that their task has beencompleted and are no longer active after they have been executed; in otherwords: 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 whenthe "Execute" input had been FALSE at the point of time at which "Done" was

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

22/209

Rexroth IndraDrive Firmware Libraries

Page 25: Rexroth IndraDrive Firmware Libraries

set to TRUE. If the input "Execute"=TRUE when "Done" is set, "Done" remainsTRUE 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 processingstarts again.

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

Bosch Rexroth AG 23/209

Rexroth IndraDrive Firmware Libraries

Page 26: 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 interruptedFig.1-7: Signal-Time Behavior of Status-Controlled Function Blocks (With "En‐

able" Input); for Single Axes, the "Active" Output is not Set!

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

24/209

Rexroth IndraDrive Firmware Libraries

Page 27: 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 interruptedFig.1-8: Signal-Time Behavior of Edge-Controlled Function Blocks (With "Exe‐

cute" Input); for Single Axes, the "Active" Output is not Set!

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

Bosch Rexroth AG 25/209

Rexroth IndraDrive Firmware Libraries

Page 28: 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 fulfilledand which are aborted only by "MC_Stop" or another function block beingcalled. 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 interruptedFig.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 remainsTRUE for one cycle when the "Execute" input had been FALSE at the point oftime at which "CommandAborted" was set to TRUE. If the input "Exe‐cute"=TRUE when "CommandAborted" is set, "CommandAborted" remainsTRUE until "Execute" is set to FALSE.For status-controlled function blocks, the "CommandAborted" output is resetwhen the "Enable" input is reset.

1.5 Error Handling1.5.1 General Information

According to their target, the function blocks have two or three outputs whichcontain information in case an error occurs:● "Error",● "ErrorID" and

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

26/209

Rexroth IndraDrive Firmware Libraries

Page 29: 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 notrequired.For edge-controlled function blocks, the output "Error" remains TRUE for onecycle when the input "Execute" had been FALSE at the point of time at whichthe 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 theinput "Enable" is set to FALSE.

ErrorID The output "ErrorID" is of the type ERROR_CODE. When an error has occurredat 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 ofthe 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 thefollowing 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 usedto 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

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

Bosch Rexroth AG 27/209

Rexroth IndraDrive Firmware Libraries

Page 30: Rexroth IndraDrive Firmware Libraries

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

When monitoring in IndraLogic, you can select via the right mousekey whether binary data types (BYTE, WORD, DWORD) are to bedisplayed in a decimal, hexadecimal or binary form. The activatedselection 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 namehas changed, the contents are identical.)

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

"ErrorID" "ErrorIdent", Ele‐ment "Addition‐al1" (hexadeci‐mal)

"ErrorIdent", Ele‐ment "Addition‐al2"

Description

- 16#00000000 Transmitted axisnumber

When there isn't any error present, the element "Ta‐ble" has the value "NO_TABLE_USED"

INPUT_INVALID_ERROR 16#00000001 Transmitted axisnumber

As of target "IndraDrive MPx04", version 12: Selectedfunction is not available for this axis

RESOURCE_ERROR 16#00000001 Transmitted axisnumber

Invalid axis reference / undefined axis.As of target "IndraDrive MP04": Indicated axis (alsoslave axis) is not available

ACCESS_ERROR 16#00000002 Transmitted axisnumber

The function block used may only have one instancein the system (e.g.: "MX_SynchronControl")

STATE_MACHINE_ERROR 16#00000003 Transmitted axisnumber

Drive is not in operating status "bb" / communicationphase 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 axisnumber

Drive is not in operating status "Ab"

ACCESS_ERROR 16#00000005 Transmitted axisnumber

MLD has neither permanent (P-0-1367) nor temporarycontrol over the indicated (local) axis

STATE_MACHINE_ERROR 16#00000006 Transmitted axisnumber

Drive is torque-free / not under torque. Drive wasswitched off externally

RESOURCE_ERROR 16#00000007 Transmitted axisnumber

Function block not possible with current functionalpackage / 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 axisnumber

Only up to target "IndraDrive MP03": The velocitytransmitted at "Velocity" input is "0"

INPUT_RANGE_ERROR 16#00000009 Transmitted axisnumber

Only up to target "IndraDrive MP03": Parameterizedacceleration (positioning acceleration) is "0"

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

28/209

Rexroth IndraDrive Firmware Libraries

Page 31: Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ment "Addition‐al1" (hexadeci‐mal)

"ErrorIdent", Ele‐ment "Addition‐al2"

Description

INPUT_RANGE_ERROR 16#00000009 Transmitted axisnumber

Only up to target "IndraDrive MP03": The accelerationtransmitted at "Acceleration" input is "0"

INPUT_RANGE_ERROR 16#00000010 Transmitted axisnumber

Only up to target "IndraDrive MP03": The decelerationtransmitted at "Deceleration" input is "0"

STATE_MACHINE_ERROR 16#00000011 Transmitted axisnumber

As of target "IndraDrive MPx04": After the activationwith "MB_PreSetMode" there was an attempt to switchon with "MC_Power" without motion command trigger‐ing

STATE_MACHINE_ERROR 16#00000012 Transmitted axisnumber

An instance of "MB_Stop" tries to command an axiswhile an instance of "MC_Stop" is active

INPUT_RANGE_ERROR 16#00000013 Transmitted axisnumber

As of target "IndraDrive MPx04": The "CamTableID"input is not within the valid range (1 .. 8)

STATE_MACHINE_ERROR 16#00000014 Transmitted axisnumber

MLD is in "ErrorStop" state.Remedy: Execute "MC_Reset"

STATE_MACHINE_ERROR 16#00000015 Transmitted axisnumber

As of MPx05V14.Activation of "MC_Power". The enable signal "Driv‐eEnable" in the axis control word (P-0-0116, bit14) ismissing

ACCESS_ERROR 16#00000016 Transmitted axisnumber

MLD in slave axis has permanent control. Therefore,the MLD-M master cannot control the slave

ACCESS_ERROR 16#00000020 As of target"IndraDrive MP04": Index of thesecond task

Several tasks use the same instance of a functionblock, this is not allowed

STATE_MACHINE_ERROR 16#00000021 Transmitted axisnumber

An additive motion command was started which is notallowed in this axis status

OTHER_ERROR 16#00000199 Transmitted axisnumber

Internal processing error (undefined status)

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 anASCII parameter

ACCESS_ERROR 16#00000202 Parameter IDN With this function block it is impossible to read/write alist parameter

INPUT_INVALID_ERROR 16#00000203 Parameter IDN Parameter IDN does not belong to any command

OTHER_ERROR 16#00000204 Transmitted axisnumber

Internal processing error (string too short)

ACCESS_ERROR 16#00000205 Parameter IDN As of target "IndraDrive MPx04": The required numberof bytes is smaller than the actual length of the list

INPUT_INVALID_ERROR 16#00000206 Transmitted axisnumber

As of target "IndraDrive MPx04": Invalid pointer at theinput of the function block (address of the applied arrayis outside of the PLC range)

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

Bosch Rexroth AG 29/209

Rexroth IndraDrive Firmware Libraries

Page 32: Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ment "Addition‐al1" (hexadeci‐mal)

"ErrorIdent", Ele‐ment "Addition‐al2"

Description

ACCESS_ERROR 16#00000207 Parameter IDN With this function block it is only possible to processASCII parameters

CCD_ERROR 16#00000208 16#00000200 Too many simultaneous read/write tasks on remoteaxes

SYSTEM_ERROR 16#00000208 Transmitted axisnumber

Internal CCD system error; error number see "Addi‐tional2"

SYSTEM_ERROR 16#00000209 Transmitted axisnumber

Internal CoSeMa system error; error number see "Ad‐ditional2"

ACCESS_ERROR 16#00000210 99 Reset command S‑0‑0099 incorrectly executed

ACCESS_ERROR 16#00000211 Transmitted axisnumber

"MC_Reset" cannot reset the error (timeout)

RESOURCE_ERROR 16#00000220 Transmitted axisnumber

No external encoder available

RESOURCE_ERROR 16#00000250 Transmitted axisnumber

Master communication synchronizes the drive

RESOURCE_ERROR 16#00000251 Transmitted axisnumber

NC cycle time (S-0-0001) does not match MLD taskcycle time

INPUT_RANGE_ERROR 16#00000252 Transmitted axisnumber

The "CmdDelay" input is greater than the maximumvalue

RESOURCE_ERROR 16#00000253 Transmitted axisnumber

The real-time channel may only use one MLD task

RESOURCE_ERROR 16#00000254 Transmitted axisnumber

Too many real-time variables used.At present, there are 4 RTcW_ variables and 4 RTcR_variables allowed

CALCULATION_ERROR 16#00000255 Transmitted axisnumber

Internal error (variable offset too great)

CALCULATION_ERROR 16#00000256 Transmitted axisnumber

Internal error (incorrect variable access)

RESOURCE_ERROR 16#00000257 Transmitted axisnumber

As of target "IndraDrive MPx04": Real-time channelactual values but no command values defined

ACCESS_ERROR 16#00000258 Transmitted axisnumber

Synchronous motion task (CCD / master communica‐tion) of the type "triggered by external event" does notsupport local real-time channel

ACCESS_ERROR 16#00000259 Transmitted axisnumber

The local real-time channel has not been configuredfor the task

ACCESS_ERROR 16#00000300 Transmitted axisnumber

MLD already has permanent control. Additionallyswitching to temporary control does not make sense

ACCESS_ERROR 16#00000301 Transmitted axisnumber

Temporary control is impossible with virtual slave

ACCESS_ERROR 16#00000302 Transmitted axisnumber

Manual mode active, temporary control impossible

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

30/209

Rexroth IndraDrive Firmware Libraries

Page 33: Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ment "Addition‐al1" (hexadeci‐mal)

"ErrorIdent", Ele‐ment "Addition‐al2"

Description

STATE_MACHINE_ERROR 16#00000320 Transmitted axisnumber

Master communication internally synchronizes thedrive / does not allow phase switch (P‑0‑4086, bit 0=0)

STATE_MACHINE_ERROR 16#00000321 Transmitted axisnumber

As of target "IndraDrive MPx04": Drive initialization notyet completed (incl. reaching of target phase)In the case of master communication with analog orparallel interface, it is necessary to wait until the auto‐matic phase switch to "P4" is over. When a transitioncommand error occurs during this first phase switch,you have to wait for 10 s; only then is it allowed to inputthe phase with the function block "MX_SetDevice‐Mode"

ACCESS_ERROR 16#00000322 Transmitted axisnumber

A transition command was started or cleared from adifferent device

DEVICE_ERROR 16#00000350 Transmitted axisnumber

Unknown secondary operation mode ("NewOp‐Mode">7 was set)

RESSOURCE_ERROR 16#00000355 Transmitted axisnumber

Axis applied at the "Master" input is not a valid masteraxis

INPUT_RANGE_ERROR 16#00000370 Incorrect"CmdState"

As of target "IndraDrive MPx04": Invalid "CmdState"input (wrong enum value)

INPUT_RANGE_ERROR 16#00000371 Incorrect"CmdState"

As of target "IndraDrive MPx04": "CmdState" not al‐lowed, e.g. "CmdState"="MX_CMD_NO_ACTIVE"while "P‑0‑1449, C4900 PLC command"="3"

INPUT_RANGE_ERROR 16#00000380 Incorrect diag‐nostic messagenumber

As of target "IndraDrive MPx04": Invalid input of diag‐nostic message number (N<1 or N>4)

ACCESS_ERROR 16#00000400 Parameter IDN The indicated parameter cannot be read / written withthis function block. For example, parameter of datatype HEX or BIN with "MB_WriteRealParameter"

ACCESS_ERROR 16#00000401 Parameter IDN With this function block it is impossible to read/write aFLOAT parameter.PLC registers (e.g. P-0-1370) can be configured asFLOAT.

INPUT_RANGE_ERROR 16#00000402 Transmitted axisnumber

The applied parameter value does not fit in the dataformat of the parameter

INPUT_INVALID_ERROR 16#00000403 Transmitted axisnumber

For the function block "MB_ReadListParameter" or"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 axisnumber

For the function block "MB_ReadListParameter" or"MB_WriteListParameter", the address applied at the"ValueAdr" input is not DWORD-compatible (4Byte);i.e. the address cannot be divided by 4.

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

Bosch Rexroth AG 31/209

Rexroth IndraDrive Firmware Libraries

Page 34: Rexroth IndraDrive Firmware Libraries

"ErrorID" "ErrorIdent", Ele‐ment "Addition‐al1" (hexadeci‐mal)

"ErrorIdent", Ele‐ment "Addition‐al2"

Description

INPUT_INVALID_ERROR 16#00000405 Transmitted axisnumber

Only up to MPx05V08: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 axisnumber

A deactivated axis was addressed.

ACCESS_ERROR 16#00000421 Transmitted axisnumber

The service channel is not available, because a phaseswitch (PM→OM) is taking place just now.

ACCESS_ERROR 16#00000422 Transmitted axisnumber

The service channel is no longer available (phase < 2).

ACCESS_ERROR 16#00000423 Transmitted axisnumber

Double address assignment. At least 2 axes have thesame SERCOS address.

SYSTEM_ERROR 16#00000424 Transmitted axisnumber

Queue error. Too many tasks were transmitted to anaxis.

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(1)

P-0-0045,bit 14/15(2)

P-0-0075(3)

Positioning block mode(MX_MoveRelative /MC_MoveRelative,MX_MoveAbsolute /MC_MoveAbsolute,MX_MoveAdditive /MC_MoveAdditive,MB_Jog)

Torque/force control(MC_TorqueControl)

Velocity synchroniza‐tion

(MC_GearIn)

Position synchroniza‐tion(Phase synchroniza‐tion, electronic cam,MotionProfile:MC_CamIn,MB_GearInPos,MB_MotionProfile)

0x00000001

- -- - -

-

0x00000021

- -- - + -

0x00000002

0b00 - + + - -

0b01 - - - - -

0b10 + - - -

0b11 0 - - - -

>0 + - - -

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

32/209

Rexroth IndraDrive Firmware Libraries

Page 35: Rexroth IndraDrive Firmware Libraries

P-0-2003(1)

P-0-0045,bit 14/15(2)

P-0-0075(3)

Positioning block mode(MX_MoveRelative /MC_MoveRelative,MX_MoveAbsolute /MC_MoveAbsolute,MX_MoveAdditive /MC_MoveAdditive,MB_Jog)

Torque/force control(MC_TorqueControl)

Velocity synchroniza‐tion

(MC_GearIn)

Position synchroniza‐tion(Phase synchroniza‐tion, electronic cam,MotionProfile:MC_CamIn,MB_GearInPos,MB_MotionProfile)

0x00000022

0b00 - + + + +

0b01 - - - + -

0b10 - + - + +

0b11 0 - - + -

>0 + - + +

- Function block is not operable+ Function block is operable1 P-0-2003, Selection of functional packages2 P-0-0045, Control word of current controller3 "P-0-0075, Encoder type 2 (optional encoder)"; is only evaluated as of

the following firmwares: MPx06V14, MPx07V10, MPx17Fig.1-12: Dependance Between Parameterization of the Axis, Functional Pack‐

age and Selected Function BlockSERCOS_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)

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

Bosch Rexroth AG 33/209

Rexroth IndraDrive Firmware Libraries

Page 36: 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 theMDT 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, operationmode, 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 CodesINDRV_TABLE "INDRV_TABLE" actually is not a table, but refers to the documen‐

tation "Troubleshooting Guide"; in this documentation, the errornumber (diagnostic message number) provides information oncause and remedy.

1.6 Data Types1.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

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

34/209

Rexroth IndraDrive Firmware Libraries

Page 37: 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,TOD

32 Time in steps of 1ms: hour (0‑23), min. (0‑59), second(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 inSERCOS III coding; i.e. users normally still use the FP constants. If they hadused 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.libThe library "AnalyzationNew.lib" is supported as of the target "IndraDriveMPH02". It contains function blocks for the analysis of expressions.The library is supported by several targets; it is described in the IndraLogic helpunder "AnalyzationNew.lib".

1.8 Iecsfc.libThe library "Iecsfc.lib" is supported as of the target "IndraDrive MPH02". Itmakes available IEC steps conforming to standard in sequential language ["Se‐quential Function Chart" (SFC)].The library is supported by several targets.

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

Bosch Rexroth AG 35/209

Rexroth IndraDrive Firmware Libraries

Page 38: Rexroth IndraDrive Firmware Libraries

1.9 MX_PLCopen.lib1.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 TargetsGeneral 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 (floatingpoint).

"ErrorID" "ErrorIdent", Ele‐ment "Addition‐al1"

Description

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

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

Fig.1-16: Generally Valid Errors of Motion Function Blocks, Taken From ErrorTable 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

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

36/209

Rexroth IndraDrive Firmware Libraries

Page 39: 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 BlocksMB_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 thedata are contained.

The number of elements in each of the 4 lists must be at least ashigh 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 thechanged profile was checked. The output "CheckOk" is set depending on theresult of the check. If "CheckOk"=TRUE, no discrepancy was detected.The data transmitted with this function block are stored in volatile form. Thisfunction 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""

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

Bosch Rexroth AG 37/209

Rexroth IndraDrive Firmware Libraries

Page 40: 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 set0: 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 stepsEach 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 velocityVelocity 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 stepsMaster 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 TOMC_STEP_MODE

Pointer to an array with the modes of the steps● 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 forset 0, bit 14 for set 1)

Active BOOL With "Active"=TRUE, the data transfer is active

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

38/209

Rexroth IndraDrive Firmware Libraries

Page 41: 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 forset 0, bit 15 for set 1)

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable Data type Description

Axis AXIS_REF Axis1 for MLD-SAxis1 for MLD-M is the local axisAxis2 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 thedrive of list element 0 of P-0-1601)

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

MB_ChangeProfileStepThe firmware function block "MB_ChangeProfileStep" is used to change thefour 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" aredefined 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""

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

Bosch Rexroth AG 39/209

Rexroth IndraDrive Firmware Libraries

Page 42: 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 set0: 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 changedEach motion profile set can consist of up to 8 motion steps1: Motion step1 / list element 0 (from P-0-0705 to P-0-0708 or P-0-0712to P-0-0715)2: Motion step2 / list element 1 (from P-0-0705 to P-0-0708 or P-0-0712to P-0-0715)...8: Motion step8 / list element 7 (from P-0-0705 to P-0-0708 or P-0-0712to P-0-0715)

MasterAxisInitialPos REAL Setting of master axis initial position of selected motion step in degreesP-0-0705, List of master axis initial positions, set 0P-0-0712, List of master axis initial positions, set 1

Distance REAL Setting of slave axis distance of motion stepP-0-0707, List of distances, set 0P-0-0714, List of distances, set 1

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

40/209

Rexroth IndraDrive Firmware Libraries

Page 43: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

SlaveAxisVelocity REAL Setting of slave axis velocity within motion stepP-0-0708, List of slave axis velocities, set 0P-0-0715, List of slave axis velocities, set 1

StepMode MC_STEP_MODE Definition of processing mode of selected motion stepP-0-0706, List of motion laws, set 0P-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 14for 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 15for set 1)

* See note belowFig.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"" onpage 28

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

Bosch Rexroth AG 41/209

Rexroth IndraDrive Firmware Libraries

Page 44: Rexroth IndraDrive Firmware Libraries

Input / output variable Data type Description

Axis AXIS_REF Axis1 for MLD-SAs of MPx04: Axis1 for MLD-M is the local axisAxis2 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 listelement 0 of P-0-1601)

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

MB_CommandBrief Description The function block MB_Command is used to execute, monitor and abort com‐

mands.Interface Description

Fig.1-25: Function Block MB_CommandInterface 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)

Cancel BOOL Command execution is aborted (one-time, edge-con‐trolled)

KeepActive BOOL Keep activation of command active upon execution(permanent, status-controlled)

ParameterNum‐ber

DINTorMB_IDN (as of MPx06)

Command

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

42/209

Rexroth IndraDrive Firmware Libraries

Page 45: Rexroth IndraDrive Firmware Libraries

Name Type Comment

VAR_OUTPUT Done BOOL Command successfully completed and reset

Active BOOL Command execution active

CommandAbor‐ted BOOL Command successfully aborted and reset

Error BOOL Error during command execution

ErrorID ERROR_CODE With "Error" output set, this output contains a roughclassification of the error

ErrorIdent ERROR_STRUCTWith "Error" output set, this output contains detailed in‐formation on the errorSee "Error Handling" on page 45

CommandExe‐cuted BOOL Command successfully completed

CommandStatus MB_SERCOS_DATA_STA‐TUS Status of the command execution

Fig.1-26: Interface Variables Function Block MB_CommandSignal-Time Diagram

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

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

Bosch Rexroth AG 43/209

Rexroth IndraDrive Firmware Libraries

Page 46: 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"

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

44/209

Rexroth IndraDrive Firmware Libraries

Page 47: 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 commanddefined via the "ParameterNumber" input. Generally, the command is auto‐matically reset when processing has been completed. The command must bespecified in the parameter IDN format in accordance with the SERCOS stand‐ard. Apart from this direct specification, it is possible to use a predefinedconstant from the global variables of the basic library (e.g. "ML_Base.lib") or aconversion function from the "RIL_Utilities.lib" library. Depending on the com‐mand itself, the command execution can be aborted via the "Cancel" input atany time. The "KeepActive" input allows keeping the command active upon itsexecution. 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 oraborted. The "Active" output and the corresponding data at the "Command‐Status" output show the active processing of the command. The current statusof 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 errorclassification (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 itcan 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 othererrors.

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

Bosch Rexroth AG 45/209

Rexroth IndraDrive Firmware Libraries

Page 48: Rexroth IndraDrive Firmware Libraries

ErrorID Additional1 Additional2 Description

INPUT_RANGE_ERROR,16#0006

16#0002 16#0001 Invalid input- The function block MB_Command does not supportretriggering of the command execution.

INPUT_RANGE_ERROR,16#0006

16#0002 16#0002 Invalid input- Control commands do not support the inputs Cancelor KeepActive.

INPUT_RANGE_ERROR,16#0006

16#0002 16#0003 Invalid input- The ParameterNumber input does not contain any val‐id command.

DEVICE_ERROR,16#0008

16#1701 16#0000 Error during command execution (control)

STATE_MACHINE_ERROR,16#0005

16#0006 16#???? Invalid status of the state machine16#???? specifies the invalid status

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

ErrorID Additional1 Additional2 Description

DEVICE_ERROR,16#0008

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

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

MB_GearInPosWith the function block "MB_GearInPos" it is possible to realize a motion of theslave axis which is phase synchronous to the master axis.The slave axis can be a real axis or (as of "IndraDrive MP05") the internal virtualmaster axis (VmAxisInt).When the slave axis is a real axis, a synchronous position command value forthe slave axis is determined from the position of the master axis. Select themaster 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 asslave axis, this axis mustn't be master axis at the same time.

In principle, the synchronous position command value "XSync" is determinedaccording 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 synchronizationprocess is to take place. Velocity adjustment is carried out (relative synchroni‐zation) and in the case of absolute synchronization, position adjustment is

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

46/209

Rexroth IndraDrive Firmware Libraries

Page 49: Rexroth IndraDrive Firmware Libraries

carried out, too. This means that the actual values (velocity and position) areadjusted to the command values calculated from the master position. When theStartMode "0" or "1" has been set, the synchronization process only takes placeat the first positive edge at "Execute". Another positive edge only causes thedata 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, Synchronizationacceleration, 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 slaveaxis.

When the function block "MB_GearInPos" is active, the positionloop of the drive is active, too, for real axes. Make the settings ofthe 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)

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

Bosch Rexroth AG 47/209

Rexroth IndraDrive Firmware Libraries

Page 50: 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 fineadjust, 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 distance1:= Positive direction2:= Negative direction

StartMode MC_START_MODE "P‑0‑0155, Synchronization mode", bit 1 or "P-0-0919, Synchronizationmode, secondary master" (as of IndraDrive MP05)0:= Absolute synchronization only at first execution1:= Relative synchronization only at first execution2:= Absolute synchronization at every execution (as of IndraDriveMP04V12)3:= Relative synchronization at every execution (as of IndraDriveMP04V12)

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 axisis 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, Virtualmaster axis, positioning status" (as of IndraDrive MP05)

Active BOOL With "Active"=TRUE the function block signals that it determines the axismotion."Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion 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" showsthe exact cause of the error

* See note belowFig.1-36: Output Variables of the Firmware Function Block "MB_GearInPos"

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

48/209

Rexroth IndraDrive Firmware Libraries

Page 51: Rexroth IndraDrive Firmware Libraries

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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-MAxis2 to Axis8 correspond to the remote axes. The remote axes containedin the list "P-0-1601, CCD: Addresses of projected drives" correspond tothe order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 ofP-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_MotionProfileThe function block "MB_MotionProfile" realizes an electronic cam function. Thecams are analytically defined by the parameters which belong to the operationmode "electronic motion profile". A synchronous position command value forthe slave axis is determined from the position of the master axis.Select the master axis at the "Master" input; you can choose from the followingaxes:● 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 accessangle (P-0-0227) is first determined according to the equation below:

Fig.1-38: Table Access AngleWith the table access angle as an argument, a synchronous position commandvalue is calculated by means of a 5th order polynomial.At the "StartMode" input, you have to set in which mode the synchronizationprocess is to take place. Velocity adjustment is carried out (relative synchroni‐zation) and in the case of absolute synchronization, position adjustment iscarried out, too. This means that the actual values (velocity and position) areadjusted to the command values calculated from the master position. When theStartMode "0" or "1" has been set, the synchronization process only takes placeat the first positive edge at "Execute". Another positive edge only causes thedata at the input of the function block to be applied.

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

Bosch Rexroth AG 49/209

Rexroth IndraDrive Firmware Libraries

Page 52: Rexroth IndraDrive Firmware Libraries

As of "IndraDrive MP04V12": If the synchronization process is to take place atevery positive edge at "Execute", the StartMode "2" or "3" can be set.For the synchronization process, the parameters "P‑0‑0143, Synchronizationvelocity" and "P‑0‑0142, Synchronization acceleration" take effect.

When the function block "MB_MotionProfile" is active, the positionloop of the drive is active, too. Make the settings of the position loop(with/without lag error, actual position value 1/2) with the functionblock "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 - denominatorP‑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.

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

50/209

Rexroth IndraDrive Firmware Libraries

Page 53: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

SyncMode MC_SYNC_DIRECTION "P‑0‑0154, Synchronization direction":0:= Shortest distance1:= Positive direction2:= Negative direction

StartMode MC_START_MODE "P‑0‑0155, Synchronization mode", bit 10:= Absolute synchronization only at first execution1:= Relative synchronization only at first execution2:= Absolute synchronization at every execution (as of "IndraDriveMP04V12")3:= Relative synchronization at every execution (as of "IndraDriveMP04V12")

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 axisis synchronous."InSync" corresponds to P-0-0115, bit12 of the parameterized axis andSetSelection(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 wordsynchronization modes".

Active BOOL With "Active"=TRUE the function block signals that it determines the axismotion."Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion 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" showsthe exact cause of the error

ActiveSet UINT P-0-0089, bit3: The output displays the number of the active motion profileset.

* See note belowFig.1-41: Output Variables of the Firmware Function Block "MB_MotionProfile"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

Bosch Rexroth AG 51/209

Rexroth IndraDrive Firmware Libraries

Page 54: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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_0053RmAxis = P_0_0052

Slave AXIS_REF Axis1 for MLD-S or local axis for MLD-MAxis2 to Axis8 correspond to the remote axes. The remote axes containedin the list "P-0-1601, CCD: Addresses of projected drives" correspond tothe order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 ofP-0-1601)

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

MB_PhasingThe function block "MB_Phasing" allows realizing an offset to the master axiswhich 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

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

52/209

Rexroth IndraDrive Firmware Libraries

Page 55: 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 hasbeen 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 beenreached

CommandAborted BOOL The output "CommandAborted" is set to TRUE, when the firmware functionblock has not yet signaled with "Done"=TRUE that it has been completedand the firmware function block was aborted with another motion functionblock

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 theexact cause of the error

* See note belowFig.1-45: Output Variables of the Firmware Function Block "MB_Phasing"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

Axis AXIS_REF Axis1 for MLD-S or local axis for MLD-MAxis2 to Axis8 correspond to the remote axes. The remote axes contained inthe list "P-0-1601, CCD: addresses of projected drives" correspond to the orderaccording to Axis2 to Axis8 (Axis2 acts on the drive of list element 0 ofP-0-1601)

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

MB_PhasingSlaveWith the function block "MB_PhasingSlave" it is possible to adjust the slave axisby 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 placein 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 scalingtype") 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""

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

Bosch Rexroth AG 53/209

Rexroth IndraDrive Firmware Libraries

Page 56: 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 axismotion

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 theexact cause of the error

* See note belowFig.1-49: Output Variables of the Firmware Function Block "MB_PhasingSlave"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

54/209

Rexroth IndraDrive Firmware Libraries

Page 57: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

Axis AXIS_REF Axis1 for MLD-S or local axis for MLD-MAxis2 to Axis8 correspond to the remote axes. The remote axes contained inthe list "P-0-1601, CCD: Addresses of projected drives" correspond to the orderof 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_StopThe firmware function block "MB_Stop" is used to bring the drive to the statusSTOP.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 blockcan be started. For this purpose, the drive is brought to the status "AH" (DriveHalt). 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, itis 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 viaa defined ramp. For this purpose, the master axis generator has tobe activated via "P-0-0917, Control word of master axis generator",bit 0=1. To convert the virtual actual position value (P-0-0758) intothe internal virtual master axis position (VmAxisInt, "P-0-0761, Mas‐ter axis position for slave axis"), the parameter P-0-0758 must bewritten to parameter "P-0-0916, Master axis format converter signalselection".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""

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

Bosch Rexroth AG 55/209

Rexroth IndraDrive Firmware Libraries

Page 58: 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 toparameter "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 signalsthat the drive has stopped. Only when the input "ExecuteLock" is TRUE isthe output "Done" generated

Active BOOL With "Active"=TRUE the firmware function block signals that it determinesthe axis motion

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anotherfunction 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; thekind 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 theexact cause of the error

* See note belowFig.1-53: Output Variables of the Firmware Function Block "MB_Stop"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

56/209

Rexroth IndraDrive Firmware Libraries

Page 59: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

Axis AXIS_REF Axis1 for MLD-S or local axis for MLD-MAxis2 to Axis8 correspond to the remote axes. The remote axes containedin the list "P-0-1601, CCD: addresses of projected drives" correspond tothe order according to Axis2 to Axis8 (Axis2 acts on the drive of list element0 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_CamInWith the function block "MC_CamIn" it is possible to realize an electronic cam.A synchronous position command value for the slave axis is determined fromthe position of the master axis. Select the master axis at the "Master"input; youcan 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 multipliedwith 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 synchronizationprocess is to take place. Velocity adjustment is carried out (relative synchroni‐zation) and in the case of absolute synchronization, position adjustment iscarried out, too. This means that the actual values (velocity and position) areadjusted 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" hasbeen set, the synchronization process only takes place at the first positive edgeat "Execute". Another positive edge only causes the data at the input of thefunction block to be applied. The input values (gear, distance, cam) then takeeffect 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 atevery positive edge at "Execute", the StartMode "2" or "3" can be set. The inputvalues (gear, distance, cam) therewith take effect immediately, independent ofP-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 tobe set at the "SyncMode" input.

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

Bosch Rexroth AG 57/209

Rexroth IndraDrive Firmware Libraries

Page 60: Rexroth IndraDrive Firmware Libraries

When the function block "MC_CamIn" is active, the position loop ofthe 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 afalling 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 distance1:= Positive direction2:= Negative direction

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

58/209

Rexroth IndraDrive Firmware Libraries

Page 61: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

StartMode MC_START_MODE "P‑0‑0155, Synchronization mode", bit 10:= Absolute synchronization only at first execution1:= Relative synchronization only at first execution2:= Absolute synchronization at every execution (as of IndraDriveMP04V12)3:= Relative synchronization at every execution (as of IndraDriveMP04V12)

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 axismotion."Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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" showsthe exact cause of the error

CamActiveID Number of the cam active in the function block

* See note belowFig.1-58: Output Variables of the Firmware Function Block "MC_CamIn"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

Bosch Rexroth AG 59/209

Rexroth IndraDrive Firmware Libraries

Page 62: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 containedin the list "P-0-1601, CCD: Addresses of projected drives" correspond tothe order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 ofP-0-1601)

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

MC_CamOutThe firmware function block "MC_CamOut" is used to terminate an active syn‐chronization function block. Transition to velocity control takes place. The actualvelocity 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.

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

60/209

Rexroth IndraDrive Firmware Libraries

Page 63: 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" showsthe exact cause of the error

* See note belowFig.1-62: Output Variables of the Firmware Function Block "MC_CamOut"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

Slave AXIS_REF "VmAxisInt" (P-0-0761, Master axis position for slave axis) (as ofIndraDrive 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 listelement 0 of P-0-1601)

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

MC_GearInWith the function block "MC_GearIn" it is possible to realize a motion of theslave 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""

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

Bosch Rexroth AG 61/209

Rexroth IndraDrive Firmware Libraries

Page 64: 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" ofparameter "P-0-0089, Status word synchronization modes".

Active BOOL With "Active"=TRUE the function block signals that it determines the axismotion. "Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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" showsthe exact cause of the error

* See note belowFig.1-67: Output Variables of the Firmware Function Block "MC_GearIn"

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

62/209

Rexroth IndraDrive Firmware Libraries

Page 65: Rexroth IndraDrive Firmware Libraries

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 containedin the list "P-0-1601, CCD: Addresses of projected drives" correspond tothe order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 ofP-0-1601)

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

MC_GearOutThe firmware function block "MC_GearOut" is used to terminate an active syn‐chronization function block. Transition to velocity control takes place for realaxes. The actual velocity value available with a rising "Execute" edge is takenas 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"

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

Bosch Rexroth AG 63/209

Rexroth IndraDrive Firmware Libraries

Page 66: 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" showsthe exact cause of the error

* See note belowFig.1-71: Output Variables of the Firmware Function Block "MC_GearOut"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

Slave AXIS_REF "VmAxisInt" (P-0-0761, Master axis position for slave axis) (as ofIndraDrive 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 listelement 0 of P-0-1601)

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

MC_MoveAbsoluteThe firmware function block "MC_MoveAbsolute" is used to move the drive toa 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 andits parameters are used. For temporary control the secondary PLC operationmode 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 movesto 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 masteraxis 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 masteraxis position (VmAxisInt, "P-0-0761, Master axis position for slaveaxis") 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"

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

64/209

Rexroth IndraDrive Firmware Libraries

Page 67: 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‐ue

P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐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 valueacceptance

P-0-0760, Virtual master axis, position‐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"

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

Bosch Rexroth AG 65/209

Rexroth IndraDrive Firmware Libraries

Page 68: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the absolutetarget position has been reached. The processing is completed until thenext 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 beencompleted ("Done"=TRUE), the output "Done" is set to TRUE for one callwhen 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 axismotion.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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 theexact cause of the error

* See note belowFig.1-76: Output Variables of the Firmware Function Block "MC_MoveAbsolute"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 thedrive 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_MoveAdditiveThe firmware function block "MC_MoveAdditive" is used to move the drive inrelative form by a distance in addition to the target position. The new targetposition results from the old target position, plus a distance. The distance isdetermined by the "Distance" input. The inputs "Velocity", "Acceleration" and"Deceleration" determine the motion profile.

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

66/209

Rexroth IndraDrive Firmware Libraries

Page 69: Rexroth IndraDrive Firmware Libraries

Internally the operation mode "drive-controlled positioning" is activated. Makethe 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 andits parameters are used. For temporary control the secondary PLC operationmode 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 masteraxis generator can be moved in relative form by a distance in ad‐dition to the current target position. For this purpose, the masteraxis generator has to be activated via "P-0-0917, Control word ofmaster axis generator", bit 0=1. To convert the virtual actual positionvalue (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, Masteraxis 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‐ue

P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐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 Rexroth IndraDrive Rexroth IndraMotion MLD Library

Bosch Rexroth AG 67/209

Rexroth IndraDrive Firmware Libraries

Page 70: 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 valueacceptance

P-0-0760, Virtual master axis, position‐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 thefirmware 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 callbefore the outputs are reset

Distance REAL At the input "Distance" the relative distance must be preset; the new targetposition 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-1edge 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 themotion target has been reached and the processing of the firmware func‐tion block has not been interrupted by an error or another firmware functionblock.● 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 determinesthe axis motion

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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 theexact cause of the error

* See note belowFig.1-81: Output Variables of the Firmware Function Block "MC_MoveAdditive"

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

68/209

Rexroth IndraDrive Firmware Libraries

Page 71: Rexroth IndraDrive Firmware Libraries

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 thedrive 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_MoveRelativeThe firmware function block "MC_MoveRelative" is used to move the drive inrelative form by a distance, starting from the current actual position.Internally the operation mode "drive-controlled positioning" is activated for thispurpose. Make the settings of the position loop (with/without lag error, actualposition value 1/2) with the function block "MB_SetPositionControlMode".For permanent control and remote axes the secondary operation mode 3 andits parameters are used. For temporary control the secondary PLC operationmode 11 and its parameters are used.The relative distance to be moved has to be preset at the input "Distance". Viathe 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 masteraxis generator can be moved in relative form by a distance startingfrom the current virtual actual position. For this purpose, the masteraxis generator has to be activated via "P-0-0917, Control word ofmaster axis generator", bit 0=1. To convert the virtual actual positionvalue (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, Masteraxis 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""

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

Bosch Rexroth AG 69/209

Rexroth IndraDrive Firmware Libraries

Page 72: 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‐ue

P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐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 valueacceptance

P-0-0760, Virtual master axis, position‐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 tobe traveled starting from the current actual position.The number of possible decimal places depends on the parameterizedscaling (see drive documentation). If the applied value has more decimalplaces, 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"

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

70/209

Rexroth IndraDrive Firmware Libraries

Page 73: 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-1edge 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 themotion target has been reached and the processing of the firmware func‐tion block has not been interrupted by an error or another firmware functionblock.● 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 anothermotion function block was activated or a drive error was present. A driveerror 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 theexact cause of the error

* See note belowFig.1-86: Output Variables of the Firmware Function Block "MC_MoveRelative"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 thedrive 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_MoveVelocityThe firmware function block "MC_MoveVelocity" is used to preset a velocity forthe drive. As the drive moves in velocity control, the firmware function block canbe used for open-loop drives, too.For permanent control and remote axes the primary mode of operation and itsparameters are used. For temporary control the secondary PLC operationmode 8 and its parameters are used.

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

Bosch Rexroth AG 71/209

Rexroth IndraDrive Firmware Libraries

Page 74: Rexroth IndraDrive Firmware Libraries

If they are scaling-dependent and unless otherwise described, theunits of the inputs which define the drive motion are taken from thescaling 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 canbe preset for the virtual master axis generator, too. For this purpose,the master axis generator has to be activated via "P-0-0917, Controlword of master axis generator", bit 0=1. To convert the virtual actualposition value (P-0-0758) into the internal virtual master axis posi‐tion (VmAxisInt, "P-0-0761, Master axis position for slave axis") theparameter 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 selectedaxis: "VmAxisInt" "P-0-0769, Virtual master axis, command valuemode". For the function block "MC_MoveVelocity" the parameterhas 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 virtualmaster axis generator.

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

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

72/209

Rexroth IndraDrive Firmware Libraries

Page 75: 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, positioningvelocity

P-0-1203, Ramp 2 pitch P-0-1461, PLC Ramp 2 pitch P-0-0771, Virtual master axis, positioningacceleration

P-0-1213, Deceleration ramp 2 P-0-1463, PLC Deceleration ramp 2 P-0-0772, Virtual master axis, positioningdeceleration

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 dependson 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 theapplied 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 theapplied value has more decimal places, they are cut off

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

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

Bosch Rexroth AG 73/209

Rexroth IndraDrive Firmware Libraries

Page 76: 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 appliedto the "Execute" input before the firmware function block signals that it hasreached the command velocity ("InVelocity"=TRUE), the output "InVeloci‐ty" is set to TRUE for one call if the actual velocity corresponds to thecommand velocity.● Real axes: "Axis1" etc.

InVelocity = "P-0-0115, Device control: status word", bit 12 of theparameterized 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 axismotion. "Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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 theexact cause of the error

* See note belowFig.1-91: Output Variables of the Firmware Function Block "MC_MoveVelocity"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 thedrive 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_StopThe firmware function block "MC_Stop" is used to bring the drive to the statusSTOP.With the rising edge of "Execute" the stopping process is started.

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

74/209

Rexroth IndraDrive Firmware Libraries

Page 77: 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 atthe "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 axisis 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 thelast instance which takes effect. An active "MC_Stop" cannot be interrupted byan "MB_Stop".When an instance is called with an edge at "Execute", other instances whencalled (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 isrun 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 viaa defined ramp (defined via "Deceleration" input). For this purpose,the master axis generator has to be activated via "P‑0‑0917, Controlword of master axis generator", bit0=1. To convert the virtual actualposition 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 signalselection".See also Functional Description of firmware "Master AxisGenerator" 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"

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

Bosch Rexroth AG 75/209

Rexroth IndraDrive Firmware Libraries

Page 78: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Execute BOOL Slave axis ("Axis1" to "Axis8"): With a rising edge at "Execute" the drive isswitched to "AH".Master axis generator ("VmAxisInt"): With a rising edge at "Execute" themaster 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 toparameter "S‑0‑0372, Drive Halt acceleration bipolar" of the slave axis (realaxis) or parameter "P‑0‑0772, Virtual master axis, positioningdeceleration" 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 hasstopped.Slave axis (real axis): When S‑0‑0331, bit0=1Virtual master axis generator ("VmAxisInt"): When the absolute value ofP‑0‑0759 is smaller than P‑0‑0912

Active BOOL With "Active"=TRUE the firmware function block signals that it determinesthe 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; thekind 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" showsthe exact cause of the error

* See note belowFig.1-95: Output Variables of the Firmware Function Block "MC_Stop"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 projecteddrives" correspond to the order of "Axis2" to "Axis8" ("Axis2" acts onthe 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"

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

76/209

Rexroth IndraDrive Firmware Libraries

Page 79: Rexroth IndraDrive Firmware Libraries

MC_TorqueControlThe 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 parameterS-0-0080, Torque/force command value P-0-1465, PLC Torque/force command valueS-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 thefunction 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

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

Bosch Rexroth AG 77/209

Rexroth IndraDrive Firmware Libraries

Page 80: 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 theexact cause of the error

* See note belowFig.1-100: Output Variables of the Firmware Function Block "MC_CamOut"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 containedin the list "P-0-1601, CCD: addresses of projected drives" correspond tothe order according to Axis2 to Axis8 (Axis2 acts on the drive of list element0 of P-0-1601)

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

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

As of MPx04 the operation mode "drive-controlled positioning" isinternally 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 operationmode 3 and its parameters are used. For temporary control, thesecondary 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 movesto 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 fordiagnostic purposes:

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

S-0-0282, Positioning command val‐ue

P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐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

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

78/209

Rexroth IndraDrive Firmware Libraries

Page 81: 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 valueacceptance

P-0-0760, Virtual master axis, position‐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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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 Inputsand 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 "ScalingTypes"), the parameter has 4 decimal places.Example:If the drive is to be moved to a target position of 100.25°, the value1002500 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"

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

Bosch Rexroth AG 79/209

Rexroth IndraDrive Firmware Libraries

Page 82: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the firmware function block signals that the absolutetarget position has been reached. The processing is completed until thenext 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 beencompleted ("Done"=TRUE), the output "Done" is set to TRUE for one callwhen 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 whenbit 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 axismotion. "Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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 descriptionTarget "IndraDrive MPH02": fig. 1-107 " Descriptions of "ErrorID" of theFirmware Function Block "MX_MoveAbsolute" in Target "IndraDriveMPH02"" on page 81Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives theexact cause of the error; see chapter 1.5.2 "Error Reference Lists forFunction Blocks as of Target "IndraDrive MP03"" on page 28

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

Input / output variable(VAR_IN_OUT)

Data type Description

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 thedrive 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"

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

80/209

Rexroth IndraDrive Firmware Libraries

Page 83: 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_MoveAdditiveThe firmware function block "MX_MoveAdditive" is used to move the drive inrelative 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 isdetermined 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" isinternally 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 operationmode 3 and its parameters are used. For temporary control, thesecondary 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 adistance in addition to the current target position. For this purpose,the master axis generator has to be activated via "P-0-0917, Controlword of master axis generator", bit0=1. To convert the virtual actualposition value (P-0-0758) into the internal virtual master axis posi‐tion (VmAxisInt, "P-0-0761, Master axis position for slave axis"), theparameter 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

Bosch Rexroth AG 81/209

Rexroth IndraDrive Firmware Libraries

Page 84: 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 fordiagnostic purposes:

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

S‑0‑0282, Positioning command val‐ue

P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐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 valueacceptance

P-0-0760, Virtual master axis, position‐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 Inputsand 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 "ScalingTypes"), the parameter has 4 decimal places. Example: If the drive is to bemoved 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"

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

82/209

Rexroth IndraDrive Firmware Libraries

Page 85: 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-1edge 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 themotion target has been reached and the processing of the firmware func‐tion block has not been interrupted by an error or another firmware functionblock.● 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 determinesthe axis motion

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion function block was activated or a drive error was present. A driveerror 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 descriptionTarget "IndraDrive MPH02": fig. 1-113 " Descriptions of "ErrorID" of theFirmware Function Block "MX_MoveAdditive" in Target "IndraDriveMPH02"" on page 84Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent **(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" showsthe exact cause of the error; see chapter 1.5.2 "Error Reference Lists forFunction Blocks as of Target "IndraDrive MP03"" on page 28

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

Input / output variable(VAR_IN_OUT)

Data type Description

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 listelement 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"

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

Bosch Rexroth AG 83/209

Rexroth IndraDrive Firmware Libraries

Page 86: 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_MoveRelativeThe firmware function block "MX_MoveRelative" is used to move the drive inrelative form by a distance, starting from the current actual position. For thispurpose, 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 operationmode 3 and its parameters are used. For temporary control, thesecondary PLC operation mode 11 and its parameters are used.

The relative distance to be moved has to be preset at the input "Distance". Viathe 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 fordiagnostic purposes:

Via the firmware function block "MX_MoveRelative", the parameter"P-0-0758, Virtual master axis, actual position value" of the masteraxis generator can be moved in relative form by a distance startingfrom the current virtual actual position. For this purpose, the masteraxis generator has to be activated via "P-0-0917, Control word ofmaster axis generator", bit 0=1. To convert the virtual actual positionvalue (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, Masteraxis format converter signal selection".See also Functional Description of firmware "Master Axis Genera‐tor" and "Master Axis Format Converter"

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

84/209

Rexroth IndraDrive Firmware Libraries

Page 87: Rexroth IndraDrive Firmware Libraries

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

S-0-0282, Positioning command val‐ue

P-0-1450, PLC Positioning command value P-0-0766, Virtual master axis, position‐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 valueacceptance

P-0-0760, Virtual master axis, position‐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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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 fixedpoint 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 "ScalingTypes"), the parameter has 4 decimal places. Example: If the drive is to bemoved 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

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

Bosch Rexroth AG 85/209

Rexroth IndraDrive Firmware Libraries

Page 88: 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-1edge 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 themotion target has been reached and the processing of the firmware func‐tion block has not been interrupted by an error or another firmware functionblock.● 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 anothermotion function block was activated or a drive error was present. A driveerror 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 descriptionTarget "IndraDrive MPH02": fig. 1-119 " Descriptions of "ErrorID" of theFirmware Function Block "MX_MoveRelative" in Target "IndraDriveMPH02"" on page 87Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives theexact cause of the error; see chapter 1.5.2 "Error Reference Lists forFunction Blocks as of Target "IndraDrive MP03"" on page 28

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

Input / output variable(VAR_IN_OUT)

Data type Description

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 thedrive 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"

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

86/209

Rexroth IndraDrive Firmware Libraries

Page 89: 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_MoveVelocityThe firmware function block "MX_MoveVelocity" is used to preset a velocity forthe drive; for this purpose, the secondary PLC operating mode "velocity controlwith motor encoder" is internally activated.

As the drive moves in velocity control, the firmware function blockcan 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 nevercompletes the processing. "InVelocity" keeps being displayed aslong 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 fordiagnostic purposes:

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

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

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

Bosch Rexroth AG 87/209

Rexroth IndraDrive Firmware Libraries

Page 90: 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 appliedto the "Execute" input before the firmware function block signals that it hasreached the command velocity ("InVelocity"=TRUE), the output "InVeloci‐ty" is set to TRUE for one call if the actual velocity corresponds to thecommand velocity

Active BOOL With TRUE the output "Active" signals that the drive was switched to thecorresponding secondary PLC operation mode and processes the inputcommand values (drive follows input). When the firmware function blocksignals "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 functionblock 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 descriptionTarget "IndraDrive MPH02": fig. 1-124 " Descriptions of "ErrorID" of theFirmware Function Block "MX_MoveVelocity" in Target "IndraDriveMPH02"" on page 89Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives theexact cause of the error; see chapter 1.5.2 "Error Reference Lists forFunction Blocks as of Target "IndraDrive MP03"" on page 28

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

Input / output variable(VAR_IN_OUT)

Data type Description

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"

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

88/209

Rexroth IndraDrive Firmware Libraries

Page 91: 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_StopThe firmware function block "MX_Stop" is used to bring the drive to the statusSTOP.

Functional Principle With the rising edge of "Execute" the stopping process is started. "Done" signalsstandstill.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 accelerationbipolar" the drive is brought to standstill.With the duration of the TRUE level of "Execute", the drive can be kept in statusSTOP; 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 thedrive remains in status "AH" and therefore does not allow motion.When the "Execute" input goes to FALSE again, the drive remains in the PLCmode "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 "IndraDriveMP03"".

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

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

Bosch Rexroth AG 89/209

Rexroth IndraDrive Firmware Libraries

Page 92: 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 signalsthat the drive has stopped. Only when the input "Execute" is TRUE is theoutput "Done" generated

Active BOOL The output "Active" signals with TRUE that the drive has accepted thecommand and starts processing. Feedbacks of the operating mode arevalid 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 descriptionTarget "IndraDrive MPH02": fig. 1-129 " Descriptions of "ErrorID" of theFirmware Function Block "MX_Stop" in Target "IndraDrive MPH02"" onpage 90Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives theexact cause of the error; see chapter 1.5.2 "Error Reference Lists forFunction Blocks as of Target "IndraDrive MP03"" on page 28

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

Input / output variable(VAR_IN_OUT)

Data type Description

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" inTarget "IndraDrive MPH02"

1.10 MX_SysLibCom.lib1.10.1 Overview

The library contains functions for the access to a serial interface:● MX_fSysComStatus● MX_SysComOpenAsync● SysComClose● SysComOpen

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

90/209

Rexroth IndraDrive Firmware Libraries

Page 93: Rexroth IndraDrive Firmware Libraries

● SysComRead● SysComWrite

1.10.2 MX_fSysComStatusWith the firmware function "MX_fSysComStatus" it is possible to poll the statusof 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_SysComOpenAsyncThe 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""

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

Bosch Rexroth AG 91/209

Rexroth IndraDrive Firmware Libraries

Page 94: 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 Inputsand 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 toselect 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 hasbeen successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted theprocessing 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 exactcause of the error; see chapter 1.5.2 "Error Reference Lists for Function Blocksas of Target "IndraDrive MP03"" on page 28

Handle DWORD When "Done"=TRUE, the Port Handle is applied at "Handle" for transmission tothe 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 SysComCloseThe firmware function "SysComClose" is used to close the communicationchannel 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""

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

92/209

Rexroth IndraDrive Firmware Libraries

Page 95: 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 SysComOpenThe firmware function "SysComOpen" is used to open the communicationchannel 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 selectthe 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 viathe 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 SysComReadThe firmware function "SysComRead" is used to read data from the serial in‐terface.

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

Bosch Rexroth AG 93/209

Rexroth IndraDrive Firmware Libraries

Page 96: 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 SysComWriteThe 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"

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

94/209

Rexroth IndraDrive Firmware Libraries

Page 97: 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 betaken.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.lib1.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 LibraryIndraDrive MPH02 Base_MPH02.libIndraDrive MP03 Base_MP03.libIndraDrive MP04

MX_Base.libIndraDrive MP05IndraDrive MP06IndraDrive MP07

Fig.1-148: Library Names Depending on the TargetsWhen 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-percentPLCopen function blocks. "MB" represents system-independent function blockwith motion-oriented functionalities. "MB" function blocks have not beenPLCopen-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 datatypes start with "INT_MX_" and are capitalized.

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

Bosch Rexroth AG 95/209

Rexroth IndraDrive Firmware Libraries

Page 98: Rexroth IndraDrive Firmware Libraries

1.11.2 "Tools" - General Functions and Function BlocksOverview

● ATAN2● MX_fGetFreeTicks● MX_fGetHighResTime● MX_fHighResTimerTicks_to_us● MX_IECTaskGetLoad*1

● MX_PositionLoopEventInfo*1

*1 Available as of target "IndraDrive MP05"

ATAN2For the conversion of Cartesian coordinates P(x;y) into polar coordinatesP(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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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_fGetFreeTicksThe firmware function "MX_fGetFreeTicks" is used to determine the time of thelast PLC time slice still available to the PLC. This PLC time slice is that part ofa millisecond which remains after the drive controller and control tasks havebeen processed.Timer ticks are returned that can be converted into microseconds with the func‐tion "MX_fHighResTimerTicks_to_us".

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

96/209

Rexroth IndraDrive Firmware Libraries

Page 99: Rexroth IndraDrive Firmware Libraries

● When a freewheeling task is active, "0" is always returned inthis case because this task works for the whole time slice.

● If "MX_fGetFreeTicks" is called in a task which has a clockslower than 1 ms, only the available time of the last ms timeslice is displayed.

● When a cyclic task takes more time to be processed than thecycle time which was set, "MX_fGetFreeTicks" always returnsthe value "0".

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

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_fGetHighResTimeThe firmware function "MX_fGetHighResTime" returns a growing timer valuewith 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

Bosch Rexroth AG 97/209

Rexroth IndraDrive Firmware Libraries

Page 100: 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_usThe 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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"

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

98/209

Rexroth IndraDrive Firmware Libraries

Page 101: Rexroth IndraDrive Firmware Libraries

MX_IECTaskGetLoadThe function block "MX_IECTaskGetLoad" is used to activate the extendedruntime 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. Itcan 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 calculatingtime. The maximum task load is also measured, if the function blockis 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 whichis to be displayed

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

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

Bosch Rexroth AG 99/209

Rexroth IndraDrive Firmware Libraries

Page 102: 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 taskElements 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 useby Bosch Rexroth staff.

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

● 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_HomeWith 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-absoluteencoders.In the homing parameter, details for carrying out the homing procedure have tobe 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""

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

100/209

Rexroth IndraDrive Firmware Libraries

Page 103: 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 axismotion. "Active" remains TRUE until "CommandAborted" or Error" is set.

CommandAborted BOOL With "CommandAborted"=TRUE the function block signals that anothermotion 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" givesthe exact cause of the error

* See note belowFig.1-166: Output Variables of the Firmware Function Block "MB_Home"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 containedin the list "P-0-1601, CCD: addresses of projected drives" correspond tothe 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"

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

Bosch Rexroth AG 101/209

Rexroth IndraDrive Firmware Libraries

Page 104: Rexroth IndraDrive Firmware Libraries

MB_PreSetModeWith 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 thendirectly follows the input values.

"MB_PreSetMode" can only be activated in the operating modewithout power and without error. After activation with a rising "Ex‐ecute" edge it is allowed to activate a motion function block (suchas "MC_MoveVelocity") or "MX_SetOpMode".

The following points exemplify a typical sequence when using the function block"MB_PreSetMode":

1. Switch drive on2. Switch or wait until drive in operating mode ("bb")3. Activate "MB_PreSetMode" with rising "Execute" edge4. 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 fallingedge, 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 thetask 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

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

102/209

Rexroth IndraDrive Firmware Libraries

Page 105: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

ErrorIdent * ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives theexact cause of the error

Value DINT When the output "Done"=TRUE, "Value" displays the value of the selectedelement

* See note belowFig.1-170: Output Variables of the Firmware Function Block "MB_PreSetMode"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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" actson 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_PowerWhen the internal PLC has permanent or temporary control over the drive, driveenable 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); whenseveral edges are generated (e.g. "TRUE ‑ FALSE ‑ TRUE"), thisdelay 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" outputprovides 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.

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

Bosch Rexroth AG 103/209

Rexroth IndraDrive Firmware Libraries

Page 106: Rexroth IndraDrive Firmware Libraries

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

Fig.1-172: Firmware Function Block "MX_Power" (Looks Like Firmware FunctionBlock "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 risingedge 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 undertorque. Independent of the "Enable" input, the "Status" output returns the cur‐rent drive status. For this purpose, the combination "drive in control and noerror" is internally checked. Output status := (P115.14 AND P115.15 AND NOTP115.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 descriptionTarget "IndraDrive MPH02": fig. 1-176 " Descriptions of "ErrorID" of the Firm‐ware Function Block "MX_Power" in Target "IndraDrive MPH02"" on page105As of target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows theexact cause of the error; see chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

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

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

104/209

Rexroth IndraDrive Firmware Libraries

Page 107: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 listelement 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_ReadStatusWith the function block "MC_ReadStatus" it is possible to read the current statusof 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 arepeated 0/1 transition at "Enable".

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 Rexroth IndraDrive Rexroth IndraMotion MLD Library

Bosch Rexroth AG 105/209

Rexroth IndraDrive Firmware Libraries

Page 108: 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" showsthe 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"

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

106/209

Rexroth IndraDrive Firmware Libraries

Page 109: 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 belowFig.1-179: Output Variables of the Firmware Function Block "MC_ReadStatus"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 containedin the list "P-0-1601, CCD: Addresses of projected drives" correspond tothe order of Axis2 to Axis8 (Axis2 acts on the drive of list element 0 ofP-0-1601)

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

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

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 triggeranother reset with a positive edge at "Execute".

For the function block "MX_Reset" (only targets"IndraDrive MPH02" and "IndraDrive MP03"), the Motion Control isin 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 remainsunchanged.

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

Bosch Rexroth AG 107/209

Rexroth IndraDrive Firmware Libraries

Page 110: 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 alater call can the function block signal "Done". Therefore, the re‐sulting times for the function block calls themselves are alwaysshort. The outputs "Done" and "Error" have to be cyclically polled.The data transmission can take several seconds, depending on theload of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

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

Fig.1-181: Firmware Function Block "MX_Reset" (Looks Like Firmware FunctionBlock "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 hasbeen successfully completed

Error BOOL With "Error"=TRUE the function block signals that an error is present

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

108/209

Rexroth IndraDrive Firmware Libraries

Page 111: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

ErrorID ERROR_CODE "ErrorID" gives a rough error descriptionTarget "IndraDrive MPH02": fig. 1-185 " Descriptions of "ErrorID" of the FirmwareFunction Block "MX_Reset" in Target "IndraDrive MPH02"" on page 109Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exactcause of the error; see chapter 1.5.2 "Error Reference Lists for Function Blocksas 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(VAR_IN_OUT)

Data type Description

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 thedrive 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‐SSOURCE_ERROR

Invalid axis reference

ACCESS_ERROR Drive refuses "Reset" command

Fig.1-185: Descriptions of "ErrorID" of the Firmware Function Block "MX_Reset" inTarget "IndraDrive MPH02"

MX_CommandThe function block "MX_Command" is used to execute a drive command.The command is activated or deactivated with the "Enable" input. If TRUE isprovided at the input, the command is started by writing "3" (dec.). In the caseof 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

Bosch Rexroth AG 109/209

Rexroth IndraDrive Firmware Libraries

Page 112: Rexroth IndraDrive Firmware Libraries

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

Fig.1-187: Executing a Drive Command

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

110/209

Rexroth IndraDrive Firmware Libraries

Page 113: 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 transmissioncan take several seconds, depending on the load of the servicechannel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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 DINTorMB_IDN (as ofMPx06)

IDN of the command

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 descriptionTarget "IndraDrive MPH02": fig. 1-191 " Descriptions of "ErrorID" of the Firm‐ware Function Block "MX_Command" in Target "IndraDrive MPH02"" on page112As of target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for Func‐tion Blocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows theexact cause of the error; see chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

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

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

Bosch Rexroth AG 111/209

Rexroth IndraDrive Firmware Libraries

Page 114: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 listelement 0 of P-0-1601)

Note: The input is only applied at a rising edge of the Enable input. If severalaxes 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_SetControlThe function block "MX_SetControl" is used to switch control between mastercommunication and PLC; this makes sense when the axis is first controlled viaa master communication and the internal PLC is to continue controlling the axisin 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 selectionare switched. With PLC control, the signals "AH" and "ON" are only operatedinternally. 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 functionblock "MX_Power".If the corresponding function blocks are not used, the internal signals are setto 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".

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

112/209

Rexroth IndraDrive Firmware Libraries

Page 115: 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 theparameter mode to the operating mode takes place between the call of"MX_SetControl" and "MC_Power".

The function block "MX_SetControl" supplies error if permanentcontrol 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 andused.

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

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, exceptfor 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 driveat the next 0-1 edge at "Execute".With "PLCControl"=FALSE control is ceded to the master communication at thenext 0-1 edge at "Execute".

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

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

Bosch Rexroth AG 113/209

Rexroth IndraDrive Firmware Libraries

Page 116: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing of the task hasbeen successfully completed

Error BOOL With "Error"=TRUE the function block signals that an error is present

ErrorID ERROR_CODE "ErrorID" gives a rough error descriptionTarget "IndraDrive MPH02": fig. 1-196 " Descriptions of "ErrorID" of the FirmwareFunction Block "MX_SetControl" in Target "IndraDrive MPH02"" on page 114Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐act cause of the error; see chapter 1.5.2 "Error Reference Lists for FunctionBlocks 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 thedrive.Independent of "Execute", "PLCControlStat" provides the actual value.

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

Input / output variable(VAR_IN_OUT)

Data type Description

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‐SSOURCE_ERROR

Invalid axis reference

ACCESS_ERROR Permanent control has already been set ("P‑0‑1367, PLCconfiguration")

Fig.1-196: Descriptions of "ErrorID" of the Firmware Function Block "MX_SetCon‐trol" in Target "IndraDrive MPH02"

MX_SetDeviceModeThe 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", thecurrent status is displayed in the output "ActOperationMode".

During the switching process, "MX_SetDeviceMode" should becalled 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

114/209

Rexroth IndraDrive Firmware Libraries

Page 117: 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, exceptfor 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 hasbeen successfully completed

Error BOOL With "Error"=TRUE the function block signals that an error is present

ErrorID ERROR_CODE "ErrorID" gives a rough error descriptionTarget "IndraDrive MPH02": fig. 1-201 " Descriptions of "ErrorID" of the FirmwareFunction Block "MX_SetDeviceMode" in Target "IndraDrive MPH02"" on page116Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exactcause of the error; see chapter 1.5.2 "Error Reference Lists for Function Blocksas 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<=currentphase 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"

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

Bosch Rexroth AG 115/209

Rexroth IndraDrive Firmware Libraries

Page 118: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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‐SSOURCE_ERROR

Invalid axis reference

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_SetOpModeThe function block "MX_SetOpMode" is used to directly switch the operationmode of the drive.The current operation mode is provided independent of "Execute". The primaryoperation mode corresponds to the value "0" and the secondary operationmodes 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 itsoperation modes and their parameters. The operation mode thatwas 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 >7as of MPx03VRS is implicitly set.During the switching process, "MX_SetOpMode" should be calleduntil 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 atthe same time!When the PLCopen profile is used for motion control, "MX_SetOp‐Mode" mustn't be used. The secondary PLC operation modes arenot allowed as "NewOpMode" and internally provided for thePLCopen profile of the PLC.

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

116/209

Rexroth IndraDrive Firmware Libraries

Page 119: 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 bechanged.

● 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 thissecondary 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 PLCopenfunction blocks have already been configured in the multiplexchannel (CCD process data) for remote axes. These param‐eters cannot be written any more!

The operation mode mustn't be switched by several instances atthe 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

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

Bosch Rexroth AG 117/209

Rexroth IndraDrive Firmware Libraries

Page 120: 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 3As 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, exceptfor 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 hasbeen successfully completed

Error BOOL With "Error"=TRUE the function block signals that an error is present

ErrorID ERROR_CODE "ErrorID" gives a rough error descriptionTarget "IndraDrive MPH02": fig. 1-206 " Descriptions of ErrorID of the FirmwareFunction Block MX_SetOpMode in Target IndraDrive MPH02" on page 119Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐act cause of the error; see chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

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

Input / output variable(VAR_IN_OUT)

Data type Description

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 lastslave 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"

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

118/209

Rexroth IndraDrive Firmware Libraries

Page 121: Rexroth IndraDrive Firmware Libraries

ErrorID Description

RESSOURCE_ERROR Invalid axis reference

ACCESS_ERROR PLC has no control over drive

IN‐PUT_RANGE_ERROR

Invalid operation mode

Fig.1-206: Descriptions of "ErrorID" of the Firmware Function Block "MX_SetOp‐Mode" in Target "IndraDrive MPH02"

MB_SetPositionControlModeThe function block "MB_SetPositionControlMode" is used to set the positionloop.

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 outputsare 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 error1: Lagless position control

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

Bosch Rexroth AG 119/209

Rexroth IndraDrive Firmware Libraries

Page 122: 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 positioningcommand values1: Current actual position value as dedicated point for relative positioningcommand 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 thetask 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" showsthe exact cause of the error

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 lastslave 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 DiagnosisOverview

● MX_fGetDriveWarning● MX_fSetDriveError● MX_fSetDriveWarning

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

120/209

Rexroth IndraDrive Firmware Libraries

Page 123: Rexroth IndraDrive Firmware Libraries

MX_fGetDriveWarningThe firmware function "MX_fGetDriveWarning" allows polling whether a certainwarning 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. 4are checked.

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

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 asreturn value, otherwise FALSE

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

MX_fSetDriveErrorThe firmware function "MX_fSetDriveError" triggers an error diagnosis in thedrive.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. 4are triggered in the drive.The error diagnosis can be cleared by executing the function block "MX_Re‐set" / "MC_Reset".

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

Bosch Rexroth AG 121/209

Rexroth IndraDrive Firmware Libraries

Page 124: Rexroth IndraDrive Firmware Libraries

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

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 providesTRUE as return value, otherwise FALSE

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

MX_fSetDriveWarningThe firmware function "MX_fSetDriveWarning" is used to set or clear a warningdiagnosis 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. 4are triggered in the drive.

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

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

122/209

Rexroth IndraDrive Firmware Libraries

Page 125: 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 ParametersOverview

● 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

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

Bosch Rexroth AG 123/209

Rexroth IndraDrive Firmware Libraries

Page 126: 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_ChangeCamDataBrief 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 maximumof 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 specifiedby 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 NumberOfElementsCAM_TABLE_1 P-0-0072, Cam table 1 0 or 3 to 1024CAM_TABLE_2 P-0-0092, Cam table 2 0 or 3 to 1024CAM_TABLE_3 P-0-0780, Cam table 3 0 or 3 to 1024CAM_TABLE_4 P-0-0781, Cam table 4 0 or 3 to 1024CAM_TABLE_5 P-0-0782, Cam table 5 0 or 3 to 128CAM_TABLE_6 P-0-0783, Cam table 6 0 or 3 to 128CAM_TABLE_7 P-0-0784, Cam table 7 0 or 3 to 128CAM_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,999to +799,999,999. In the drive, the individual data to be transmitted are convertedto a percentage value with 6 decimal places; i.e. the value to be transmitted isdivided by 1,000,000.

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

The time required for transmitting cam profiles depends on different factors.These factors are

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

124/209

Rexroth IndraDrive Firmware Libraries

Page 127: 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 timeTypical times required to transmit 1024 cam elements:

Control section Local axis Remote CCD slave axis

CSH1.1 6 - 15 ms 1024 * CCD cycle time +250ms

CSB01.1 / CDB01.1 30 - 45 ms 1024 * CCD cycle time +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 programonly continues running when the function block "MB_ChangeCam‐Data" signals with "Done"=TRUE that it has successfully written thedata, 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 localaxis, a freewheeling PLC task or a cyclic PLC task with a big cycle time shouldbe used so that the watchdog (F6010) is not generated when the watchdogmonitor has been activated.

In the drive, a cam profile is traveled by means of linear or cubicspline interpolation.For cubic spline interpolation, coefficients are calculated when acam profile is written; therefore, it takes approx. 5 ms longer totransmit a cam profile with 1024 elements, compared to the linearcam 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 twotypes of cam formats (see "P-0-0072, Cam table 1").

Interface Description

Fig.1-222: Function Block "MB_ChangeCamData"

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

Bosch Rexroth AG 125/209

Rexroth IndraDrive Firmware Libraries

Page 128: 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 processingcommand

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 theexact cause of the error

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 slavein 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_fCheckCmdRequestThe firmware function "MX_fCheckCmdRequest" is used to return the com‐mand input which was preset via the drive parameter "P‑0‑1449, C4900 PLCcommand".

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

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

126/209

Rexroth IndraDrive Firmware Libraries

Page 129: 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 followingvalues:● 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_fReadParamDINTThe firmware function "MX_fReadParamDINT" is used to read a parametervalue and return it as DINT.With this function it is at first impossible to recognize whether the reading of theparameter was successful or not. The function block "MX_ReadParamDINT" issuited for this purpose.For unsigned parameters with 32 bits the return value can simply be convertedwith the function "DINT_TO_UDINT".

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

Fig.1-229: Firmware Function "MX_fReadParamDINT"

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

Bosch Rexroth AG 127/209

Rexroth IndraDrive Firmware Libraries

Page 130: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINTorMB_IDN (as ofMPx06)

At the "Ident" input apply the IDN of the parameter the value of which is to beread

ListElem INT It is possible to read the value of a single parameter, but also the values of listparameters.To read a single parameter, apply "0" to "ListElem". For list parameters, the zerothelement 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 ofa 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_fReadStringParamWith 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 returnvalue 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 textlength. 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

Fig.1-232: Firmware Function "MX_fReadStringParam"

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

128/209

Rexroth IndraDrive Firmware Libraries

Page 131: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINTorMB_IDN (as ofMPx06)

IDN of the parameter

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_fSetParamLimitsWith the firmware function "MX_fSetParamLimits" it is possible to set the limitvalues of the Global Register PLC parameters.

By switching off or by "load defaults procedure for PLC" [C0730Load def. proc. com. (load defaults procedure for PLC)], the limitvalues 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 PLCexception 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"

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

Bosch Rexroth AG 129/209

Rexroth IndraDrive Firmware Libraries

Page 132: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINTorMB_IDN (as ofMPx06)

A constant from the global variables can be transmitted here

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_fSetParamNameWith the firmware function "MX_fSetParamName" it is possible to set the namesof the Global Register PLC parameters.

By switching off, the names of the Global Register PLC parametersare set to their default values again.When the names of the Global Register PLC parameters werechanged, 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 PLCexception 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"

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

130/209

Rexroth IndraDrive Firmware Libraries

Page 133: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINTorMB_IDN (as ofMPx06)

A constant from the global variables can be transmitted here

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_fSetParamUnitWith the firmware function "MX_fSetParamUnit" it is possible to set the units ofthe Global Register PLC parameters.

By switching off or by "load defaults procedure for PLC" [C0730Load def. proc. com. (load defaults procedure for PLC)], the unitsare 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 PLCexception 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 DINTorMB_IDN (as ofMPx06)

A constant from the global variables can be transmitted here

NewUnit STRING(20) Unit to be set (maximum length: 20 characters)

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

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

Bosch Rexroth AG 131/209

Rexroth IndraDrive Firmware Libraries

Page 134: 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_fWriteParamDINTThe 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 aretransferred 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 theparameter was successful or not. The function block "MX_WriteParamDINT" issuited for this purpose.For unsigned parameters with 32 bits the input value "Value" can be convertedwith the function "UDINT_TO_DINT".

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

Fig.1-244: Firmware Function "MX_fWriteParamDINT"

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

132/209

Rexroth IndraDrive Firmware Libraries

Page 135: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

Ident DINTorMB_IDN (as ofMPx06)

IDN of the specified parameter

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_fWriteStringParamThe firmware function "MX_fWriteStringParam" is used to write data to a textparameter.It is possible to write in unbuffered or buffered form.

In the case of buffered writing, the parameter values every time aretransferred 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 textlength. 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

Bosch Rexroth AG 133/209

Rexroth IndraDrive Firmware Libraries

Page 136: Rexroth IndraDrive Firmware Libraries

Fig.1-247: Firmware Function "MX_fWriteStringParam"

Input variable Data type Description

Ident DINTorMB_IDN (as ofMPx06)

IDN of the specified parameter

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_ReadListParameterWith 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 localaxis ("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 risingedge at the "Execute" input ("Execute"=TRUE).

To test the function block "MB_ReadListParameter", the instancevariable "ActivateCounter" can be used. It counts the positive edgesof the "Execute" signal and thereby signals whether the functionblock is run with an edge.

Local Axis When the function block is used for a local axis, all list elements of the selectedparameter are immediately read when the function block is called. After the listelements have been read, control goes back to the program and TRUE is pro‐vided at the "Done" output.

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

134/209

Rexroth IndraDrive Firmware Libraries

Page 137: 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, youshould use a separate task.Example: To read all list elements of parameter P‑0‑0072 (1024long words), approx. 200μs are required with Advanced controlsection.

Remote Axes Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

When the function block is used for remote axes, the read task is ceded to theservice 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 temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

IDN of the parameter to be read

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

Bosch Rexroth AG 135/209

Rexroth IndraDrive Firmware Libraries

Page 138: 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 bytesthat 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 datavalue of the parameter was successful

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

NoOfRecBytes UINT The "NoOfRecBytes" output signals how many bytes were actually read

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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_ReadMaxRealValueWith the function block "MB_ReadMaxRealValue" it is possible to read themaximum 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

136/209

Rexroth IndraDrive Firmware Libraries

Page 139: 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter the maximumvalue of which is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

MaxValue REAL If "Done"=TRUE, "MaxValue" signals the maximum input value of the selectedparameter.Note: According to the scaling, the input value of the parameter has decimalplaces which have to be taken into account and used for calculation

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

Bosch Rexroth AG 137/209

Rexroth IndraDrive Firmware Libraries

Page 140: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadMaxValueWith the function block "MB_ReadMaxValue" it is possible to read the maximumallowed 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

138/209

Rexroth IndraDrive Firmware Libraries

Page 141: 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter the maximumvalue of which is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

MaxValue DINT If "Done"=TRUE, "MaxValue" signals the maximum input value of the selectedparameter.Note: According to the scaling, the input value of the parameter has decimalplaces which have to be taken into account and used for calculation

* See note belowFig.1-260: Output Variables of the Firmware Function Block "MB_ReadMaxValue"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

Bosch Rexroth AG 139/209

Rexroth IndraDrive Firmware Libraries

Page 142: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadMinRealValueWith 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

140/209

Rexroth IndraDrive Firmware Libraries

Page 143: 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter the minimumvalue of which is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

MinValue REAL If "Done"=TRUE, "MinValue" signals the minimum input value of the selectedparameter.Note:According to the scaling, the input value of the parameter has decimalplaces which have to be taken into account and used for calculation

* See note belowFig.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"" onpage 28

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

Bosch Rexroth AG 141/209

Rexroth IndraDrive Firmware Libraries

Page 144: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadMinValueWith the function block "MB_ReadMinValue" it is possible to read the minimumallowed 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

142/209

Rexroth IndraDrive Firmware Libraries

Page 145: 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter the minimumvalue of which is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

MinValue DINT If "Done"=TRUE, "MinValue" signals the minimum input value of the selectedparameter.Note: According to the scaling, the input value of the parameter has decimalplaces which have to be taken into account and used for calculation

* See note belowFig.1-268: Output Variables of the Firmware Function Block "MB_ReadMinValue"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

Bosch Rexroth AG 143/209

Rexroth IndraDrive Firmware Libraries

Page 146: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadNameWith the function block "MB_ReadName" it is possible to read the name of aparameter.At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the name of which is to be read. The processing of the functionblock is started with a rising edge at the "Execute" input. Error-free processingis signaled by "Done"=TRUE. Incorrect processing is signaled by"Error"=TRUE. In the case of error, a detailed description of the error is outputat the outputs "ErrorID" and "ErrorIdent".

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

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

144/209

Rexroth IndraDrive Firmware Libraries

Page 147: 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter the name ofwhich is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

Name STRING(255) If "Done"=TRUE, "Name" signals the name of the selected parameter.

* See note belowFig.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"" onpage 28

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

Bosch Rexroth AG 145/209

Rexroth IndraDrive Firmware Libraries

Page 148: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadParameterWith the function block "MB_ReadParameter" it is possible to read the currentvalue of a parameter. The return value is DINT.

With the function block "MB_ReadParameter", the input variablesare 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

146/209

Rexroth IndraDrive Firmware Libraries

Page 149: 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 DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter (e.g.FP_S_0_0052) the current value of which is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact 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 takeninto account and used for calculation

* See note belowFig.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"" onpage 28

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

Bosch Rexroth AG 147/209

Rexroth IndraDrive Firmware Libraries

Page 150: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadRealListParameterWith the function block "MB_ReadRealListParameter" it is possible to read thecurrent list of a list parameter.

The function block "MB_ReadRealListParameter" can work on thelocal 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 risingedge 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 thefunction block is run with an edge.

Local Axis When the function block is used for a local axis, all list elements of the selectedparameter are immediately read when the function block is called. After the listelements have been read, control goes back to the program and TRUE is pro‐vided at the "Done" output.

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

148/209

Rexroth IndraDrive Firmware Libraries

Page 151: 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, youshould use a separate task.Example: To read all list elements of parameter P‑0‑0072 (1024long words), approx. 314μs are required with Advanced controlsection.

Remote Axes Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

When the function block is used for remote axes, the read task is ceded to theservice 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 temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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 fallingedge, all outputs are reset.

ParameterNumber DINTorMB_IDN (as ofMPx06)

IDN of the parameter to be read

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

Bosch Rexroth AG 149/209

Rexroth IndraDrive Firmware Libraries

Page 152: 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 bytesthat 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 datavalue of the parameter was successful

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

NoOfRecBytes UINT The "NoOfRecBytes" output signals how many bytes were actually read

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 onlypossible 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 modeand in the CCD system mode.

MB_ReadRealParameterWith the function block "MB_ReadRealParameter" it is possible to read thecurrent value of a parameter. The return value is REAL.

List and string parameters cannot be read with the function block"MB_ReadRealParameter".

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

150/209

Rexroth IndraDrive Firmware Libraries

Page 153: Rexroth IndraDrive Firmware Libraries

Up to MPx04V08: Property damage, death orserious injury by reading parameters of remoteaxes!

WARNING

When the scaling settings in the master and in a remote axis are different, thetravel motion of the remote axis can be wrong (e.g. too fast); this is due to thefact 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 thefunction block.

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

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 DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input apply the IDN of the parameter the currentvalue of which is to be readAny new parameter number will only be applied with the next positive edge atthe "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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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

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

Bosch Rexroth AG 151/209

Rexroth IndraDrive Firmware Libraries

Page 154: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows theexact cause of the error

Value REAL If "Done"=TRUE, "Value" signals the value of the selected parameter

* See note belowFig.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"" onpage 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadSercosDataStatusWith the function block "MB_ReadSercosDataStatus" it is possible to read thestatus of a parameter.At the "ParameterNumber" input you have to apply the parameter number ofthe 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 erroris output at the outputs "ErrorID" and

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

152/209

Rexroth IndraDrive Firmware Libraries

Page 155: 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 thepositive edge of "Enable". New input values only take effect via the repeatedpositive edge of "Enable".

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the status of which is to be read

Fig.1-287: Input Variables of the Firmware Function Block "MB_ReadSercosDa‐taStatus"

Output varia‐ble

Data type Description

Done BOOL With "Done"=TRUE the function block signals that the processing ofthe function block has been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block hasaccepted the processing command, for single axes this output is notset!

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 Rexroth IndraDrive Rexroth IndraMotion MLD Library

Bosch Rexroth AG 153/209

Rexroth IndraDrive Firmware Libraries

Page 156: Rexroth IndraDrive Firmware Libraries

Output varia‐ble

Data type Description

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 witherror"MB_SERCOS_DATA_DATUM_FAULT": Invalid operating data

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

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

154/209

Rexroth IndraDrive Firmware Libraries

Page 157: Rexroth IndraDrive Firmware Libraries

MB_ReadSercosAttributeWith the function block "MB_ReadSercosAttribute" it is possible to read theSERCOS attribute of a parameter.At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the SERCOS attribute of which is to be read. The processing ofthe function block is started with a rising edge at the "Execute" input. Error-freeprocessing is signaled by "Done"=TRUE. Incorrect processing is signaled by"Error"=TRUE. In the case of error, a detailed description of the error is outputat the outputs "ErrorID" and "ErrorIdent".

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

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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the SERCOS attribute of which is to be read.NOTE: Any new parameter number will only be applied with the next positiveedge 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 theSERCOS attribute is successfully running

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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

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

Bosch Rexroth AG 155/209

Rexroth IndraDrive Firmware Libraries

Page 158: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows theexact cause of the error

Attribute DWORD If "Done"=TRUE, "Attribute" signals the attribute of the selected parameter

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadUnit / MX_ReadUnitWith the function block "MB_ReadUnit" or "MX_ReadUnit" it is possible to readthe unit of a parameter.At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the unit of which is to be read. The processing of the functionblock is started with a rising edge at the "Execute" input. Error-free processingis signaled by "Done"=TRUE. Incorrect processing is signaled by"Error"=TRUE. In the case of error, a detailed description of the error is outputat the outputs "ErrorID" and "ErrorIdent".

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

156/209

Rexroth IndraDrive Firmware Libraries

Page 159: Rexroth IndraDrive Firmware Libraries

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

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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the unit of which is to be read

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

Unit STRING(255) If "Done"=TRUE, "Unit" signals the unit of the selected parameter

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

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

Bosch Rexroth AG 157/209

Rexroth IndraDrive Firmware Libraries

Page 160: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_ReadStringParameterWith 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 ofthe parameter the operating data of which is to be read. The processing of thefunction 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" signaland 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 selectedASCII parameter are immediately read when the function block is called. Afterthat, control goes back to the program and TRUE is provided at the "Done"output.

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

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

158/209

Rexroth IndraDrive Firmware Libraries

Page 161: Rexroth IndraDrive Firmware Libraries

Remote Axes Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

When the function block is used for remote axes, the read task is ceded to theservice 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 textlength.

As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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 fallingedge, all outputs are reset

ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number ofthe 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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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

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

Bosch Rexroth AG 159/209

Rexroth IndraDrive Firmware Libraries

Page 162: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

ErrorIdent * ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows theexact cause of the error

Value STRING(255) "Value" provides the operating data of the selected parameter

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 slavein 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_WriteParameterWith the function block "MB_WriteParameter" it is possible to write a definedvalue 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 bewritten. The value which is to be written to the parameter has to be applied atthe "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 whichhave to be taken into account and used for calculation!

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

160/209

Rexroth IndraDrive Firmware Libraries

Page 163: Rexroth IndraDrive Firmware Libraries

Storage behavior of "MB_WriteParameter" in "IndraDrive MP03"and "IndraDrive MP04" with local axes: Parameter changes aregenerally written in unbuffered form! Subsequent storage in the in‐ternal memory or on the MMC is only possible via "S-0-0293, C2400Selectively backup working memory procedure command".Storage behavior of "MB_WriteParameter" as of "IndraDriveMP05" 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" asof version 10 and "IndraDrive MP05" with remote axes: Dependingon parameter "S‑0‑0269, Storage mode", the changed parametervalue 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".

Destruction of the fixed value parameter mem‐ory by constant activation/execution of thefunction block!

NOTICE

When the function block is frequently executed, set "S‑0‑0269, Storagemode" in such a way that changed parameter values are only stored by exe‐cuting the command "S‑0‑0264, C2200 Backup working memory procedurecommand" 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 ofthe "Execute" signal and thereby signals whether the function blockis run with an edge.

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

Fig.1-302: Firmware Function Block "MB_WriteParameter"

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

Bosch Rexroth AG 161/209

Rexroth IndraDrive Firmware Libraries

Page 164: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

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

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input, apply the parameter number of the parameterto be written

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

* See note belowFig.1-304: Output Variables of the Firmware Function Block "MB_WriteParameter"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

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

162/209

Rexroth IndraDrive Firmware Libraries

Page 165: Rexroth IndraDrive Firmware Libraries

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_WriteRealListParameterWith 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 thelocal 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 changedparameter value is stored in the device-internal, non-volatile mem‐ory ("flash") or on the MultiMediaCard (MMC), either immediatelyor by executing the command "S‑0‑0264, C2200 Backup workingmemory procedure command".

Destruction of the fixed value parameter mem‐ory by constant activation/execution of thefunction block!

NOTICE

When the function block is frequently executed, set "S‑0‑0269, Storagemode" in such a way that changed parameter values are only stored by exe‐cuting the command "S‑0‑0264, C2200 Backup working memory procedurecommand" in the device-internal, non-volatile memory ("flash") or on the Mul‐tiMediaCard (MMC).

To test the function block "MB_WriteRealListParameter", the instancevariable "ActivateCounter" can be used. It counts the positive edgesof the "Execute" signal and thereby signals whether the function blockis 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 appliedarray 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.

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

Bosch Rexroth AG 163/209

Rexroth IndraDrive Firmware Libraries

Page 166: 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 (1024long words), approx. 24 ms are required with Advanced controlsection.

Remote Axes Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

When the function block is used for remote axes, the write request is ceded tothe service channel (SERCOS III). Only at a later call can the function blocksignal "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 temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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 DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input, apply the IDN of the list parameter to be writ‐ten

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

164/209

Rexroth IndraDrive Firmware Libraries

Page 167: 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" inputExample: 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 ofelements)

ValueAdr POINTER TO REAL At the "ValueAdr" input indicate the initial address of the field to which the bytesthat 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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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_WriteListParameterWith the function block "MB_WriteListParameter" it is possible to write definedvalues to a list parameter.

The function block "MB_WriteListParameter" can work on the localaxis ("Axis1") and via SERCOS III on remote axes ("Axis2", "Ax‐is3", ...).

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

Bosch Rexroth AG 165/209

Rexroth IndraDrive Firmware Libraries

Page 168: 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 changedparameter value is stored in the device-internal, non-volatile mem‐ory ("flash") or on the MultiMediaCard (MMC), either immediatelyor by executing the command "S‑0‑0264, C2200 Backup workingmemory procedure command".

Destruction of the fixed value parameter mem‐ory by constant activation/execution of thefunction block!

NOTICE

When the function block is frequently executed, set "S‑0‑0269, Storagemode" in such a way that changed parameter values are only stored by exe‐cuting the command "S‑0‑0264, C2200 Backup working memory procedurecommand" in the device-internal, non-volatile memory ("flash") or on the Mul‐tiMediaCard (MMC).

To test the function block "MB_ReadWriteParameter", the instancevariable "ActivateCounter" can be used. It counts the positive edgesof the "Execute" signal and thereby signals whether the functionblock is run with an edge.

Local Axis When the function block is used for a local axis, all list elements of the appliedarray 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, youshould use a separate task.Example: To write all list elements of parameter P‑0‑0072 (1024long words), approx. 16 ms are required with Advanced controlsection.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 bewritten (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 onlypossible 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 modeand in the CCD system mode.

When the function block is used for remote axes, the write request is ceded tothe service channel (SERCOS III). Only at a later call can the function blocksignal "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.

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

166/209

Rexroth IndraDrive Firmware Libraries

Page 169: Rexroth IndraDrive Firmware Libraries

As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input, apply the IDN of the list parameter to be writ‐ten

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 observethat 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 thedata/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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe processing command, for single axes this output is not set!

Error BOOL With "Error"=TRUE the function block signals that an error is present

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

Bosch Rexroth AG 167/209

Rexroth IndraDrive Firmware Libraries

Page 170: 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 theexact cause of the error

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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_WriteRealParameterWith the function block "MB_WriteRealParameter" you can write a defined val‐ue to the parameter belonging to the parameter number. The value which is tobe written to the parameter must be of type DEC_OV, DEC_MV or FLOAT; thetypes BIN, HEX, IDN and lists and ASCII cannot be written.

Storage behavior of "MB_WriteRealParameter" in "IndraDriveMP03" and "IndraDrive MP04" with local axes: Parameter changesare generally written in unbuffered form! Subsequent storage in theinternal 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 "IndraDriveMP05" 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 "IndraDriveMP04" as of version 10 and "IndraDrive MP05" with remote axes:Depending on parameter "S‑0‑0269, Storage mode", the changedparameter value is stored in the device-internal, non-volatile mem‐ory ("flash") or on the MultiMediaCard (MMC), either immediatelyor by executing the command "S‑0‑0264, C2200 Backup workingmemory procedure command".

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

168/209

Rexroth IndraDrive Firmware Libraries

Page 171: Rexroth IndraDrive Firmware Libraries

Destruction of the fixed value parameter mem‐ory by constant activation/execution of thefunction block!

NOTICE

When the function block is frequently executed, set "S‑0‑0269, Storagemode" in such a way that changed parameter values are only stored by exe‐cuting the command "S‑0‑0264, C2200 Backup working memory procedurecommand" 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 thefunction block "MB_WriteListParameter".

Up to MPx04V08: Property damage, death orserious injury by writing parameters of remoteaxes!

WARNING

When the scaling settings in the master and in a remote axis are different, thetravel motion of the remote axis can be wrong (e.g. too fast); this is due to thefact 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 werewritten.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 thefunction block.

Up to MPx04V08: Property damage when writ‐ing parameters of remote axes!

CAUTION

Up to the firmware MPx04V08, when parameters of remote axes had beenwritten, the scaling was carried out according to the setting of the master whichcould be wrong. As of the firmware MPx04V10, the value of the parameter isscaled in accordance with the axis of which the parameter is written and whichis applied at the function block.

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

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

Bosch Rexroth AG 169/209

Rexroth IndraDrive Firmware Libraries

Page 172: 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 fallingedge, all outputs are reset

ParameterNumber DINTorMB_IDN (as ofMPx06)

At the "ParameterNumber" input, apply the IDN of the list parameter to be writ‐ten

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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

* See note belowFig.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"" onpage 28

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

170/209

Rexroth IndraDrive Firmware Libraries

Page 173: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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 callsthemselves are always short. The outputs "Done", "Active" and"Error" have to be cyclically polled. The data transmission can takeseveral seconds, depending on the load of the service channel.As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals an error.

Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

MB_WriteStringParameterWith 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 changedparameter value is stored in the device-internal, non-volatile mem‐ory ("flash") or on the MultiMediaCard (MMC), either immediatelyor by executing the command "S‑0‑0264, C2200 Backup workingmemory procedure command".

Destruction of the fixed value parameter mem‐ory by constant activation/execution of thefunction block!

NOTICE

When the function block is frequently executed, set "S‑0‑0269, Storagemode" in such a way that changed parameter values are only stored by exe‐cuting the command "S‑0‑0264, C2200 Backup working memory procedurecommand" 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", ...).

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

Bosch Rexroth AG 171/209

Rexroth IndraDrive Firmware Libraries

Page 174: Rexroth IndraDrive Firmware Libraries

At the "ParameterNumber" input you have to apply the parameter number ofthe parameter the operating data of which is to be written. The processing ofthe 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" signaland 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 selectedASCII 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 textlength. If necessary, a separate task should be used.

Remote Axes Up to MPx05V14: Accessing parameters of remote axes is onlypossible 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 modeand in the CCD system mode.

When the function block is used for remote axes, the write request is ceded tothe service channel (SERCOS III). Only at a later call can the function blocksignal "Done".The outputs "Done", "Active" and "Error" have to be cyclically polled.The data transmission can take several milliseconds, depending on the textlength.

As long as the SERCOS ring is not yet in phase 2 - and temporarilyduring the transition from phase 3 to phase 4 - it is impossible toexchange data with remote axes. In this case, the function blocksignals 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"

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

172/209

Rexroth IndraDrive Firmware Libraries

Page 175: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

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

ParameterNumber DINT At the "ParameterNumber" input you have to apply the parameter number ofthe 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 taskhas been successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has acceptedthe 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 theexact cause of the error

* See note belowFig.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 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

Input / output variable(VAR_IN_OUT)

Data type Description

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 slavein 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_ReadParamDINTThe function block "MX_ReadParamDINT" is used to read a parameter valueand return it as DINT.Among other things, the function block gives a feedback as to whether thereading was successful.For unsigned parameters with 32 bits the return value can be converted withthe function "DINT_TO_UDINT".

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

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

Bosch Rexroth AG 173/209

Rexroth IndraDrive Firmware Libraries

Page 176: 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 parameteralways "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 hasbeen successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted theprocessing 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 descriptionTarget "IndraDrive MPH02": fig. 1-326 " Descriptions of "ErrorID" of the FirmwareFunction Block "MX_ReadParamDINT" in Target "IndraDrive MPH02"" on page175Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐act cause of the error; see chapter 1.5.2 "Error Reference Lists for FunctionBlocks 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"

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

174/209

Rexroth IndraDrive Firmware Libraries

Page 177: Rexroth IndraDrive Firmware Libraries

Input / output variable(VAR_IN_OUT)

Data type Description

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_SetCmdStateWith the firmware function block "MX_SetCmdState" it is possible to set thecommand 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 fallingedge, 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

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

Bosch Rexroth AG 175/209

Rexroth IndraDrive Firmware Libraries

Page 178: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

DiagNo DINT For the case "CmdStatus"==MX_CMD_BREAK_ERROR, a command errornumber can be transmitted.1: C4901 PLC command error no. 12: C4902 PLC command error no. 23: C4903 PLC command error no. 34: 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 taskhas 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 theexact cause of the error

* See note belowFig.1-329: Output Variables of the Firmware Function Block "MX_SetCmdState"

NOTE: For the list of all possible errors, see: chapter 1.5.2 "ErrorReference Lists for Function Blocks as of Target "IndraDriveMP03"" on page 28

MX_WriteParamDINTThe 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 aretransferred 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 beconverted 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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

176/209

Rexroth IndraDrive Firmware Libraries

Page 179: 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(as of MPx03VRS)

BOOL The function block is activated with a rising edge at "Execute". All outputs arereset with a falling edge at "Execute".

Enable(only MPH02VRS)

BOOL For MPH02VRS the function block is status-controlled. The function block is star‐ted with "Enable"=TRUE, all outputs are reset with "Enable"=FALSE

Ident DINTorMB_IDN (as ofMPx06)

IDN of the parameter

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. Takethe scaling of the selected parameter into account. According to the scaling, theparameter has decimal places which have to be taken into account and used forcalculation

WriteBuffered BOOL With "WriteBuffered"=TRUE the value is written in buffered form, if the parameterhas been designed for this purpose. With FALSE the parameter is always writtenin 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 hasbeen successfully completed

Active BOOL For remote axes, "Active"=TRUE signals that the function block has accepted theprocessing command, for single axes this output is not set!

Error BOOL With "Error"=TRUE the function block signals that an error is present

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

Bosch Rexroth AG 177/209

Rexroth IndraDrive Firmware Libraries

Page 180: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

ErrorID ERROR_CODE "ErrorID" gives a rough error descriptionTarget "IndraDrive MPH02": fig. 1-334 " Descriptions of "ErrorID" of the FirmwareFunction Block "MX_WriteParamDINT" in Target "IndraDrive MPH02"" on page178Target "IndraDrive MP03": chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

ErrorIdent(as of MPx03VRS)

ERROR_STRUCT Via the elements: Table, Additional1 and Additional2, "ErrorIdent" shows the ex‐act cause of the error; see chapter 1.5.2 "Error Reference Lists for FunctionBlocks as of Target "IndraDrive MP03"" on page 28

Fig.1-332: Output Variables of the Firmware Function Block "MX_WriteParam‐DINT"

Input / output variable(VAR_IN_OUT)

Data type Description

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 ScalingMX_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 tothe 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 andfor 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

Fig.1-335: Firmware Function "MX_fDINT_AccTo_REAL"

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

178/209

Rexroth IndraDrive Firmware Libraries

Page 181: 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 axisvariables "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 thescaling which has been set

Fig.1-337: Return Value of the Firmware Function "MX_fDINT_AccTo_REAL"

MX_fDINT_DistTo_REALThe firmware function "MX_fDINT_DistTo_REAL" converts a position value inthe fixed point format of data type DINT into a REAL value, according to thescaling 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 andfor 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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 axisvariables "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 scalingwhich 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 inthe fixed point format of data type DINT into a REAL value, according to thescaling which has been set.If the axis reference is invalid, 0 is returned.

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

Bosch Rexroth AG 179/209

Rexroth IndraDrive Firmware Libraries

Page 182: Rexroth IndraDrive Firmware Libraries

The function can be used for the virtual master axis / master axis encoder andfor 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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 axisvariables "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 scalingwhich 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 scalingwhich 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 andfor 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

Fig.1-344: Firmware Function "MX_fREAL_AccTo_DINT"

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

180/209

Rexroth IndraDrive Firmware Libraries

Page 183: 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 axisvariables "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 inthe REAL format into a fixed-point DINT value, according to the scaling whichhas been set.If the axis reference is invalid, 0 is returned.The function can be used for the virtual master axis / master axis encoder andfor 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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 axisvariables "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 tothe 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, accordingto the scaling which has been set.The function can be used for the real axes "Axis1, Axis2, etc.".

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

Bosch Rexroth AG 181/209

Rexroth IndraDrive Firmware Libraries

Page 184: 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 axisvariables "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 tothe scaling which has been set

Fig.1-352: Return Value of the Firmware Function "MX_fREAL_TorqueRamp‐To_DINT"

MX_fREAL_TorqueTo_DINTThe firmware function "MX_fREAL_TorqueTo_DINT" converts a torque/forcevalue in the REAL format into a fixed-point DINT value, according to the scalingwhich 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 axisvariables "AxisAddressing" of "MX_Base.lib", can be transmitted here

Fig.1-354: Input Variables of the Firmware Function "MX_fREAL_TorqueTo_DINT"

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

182/209

Rexroth IndraDrive Firmware Libraries

Page 185: 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 inthe REAL format into a fixed-point DINT value, according to the scaling whichhas been set.If the axis reference is invalid, 0 is returned.The function can be used for the virtual master axis / master axis encoder andfor 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 "IndraDriveMP03"" or "Library Assignment as of the Target "IndraDriveMP04""

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 axisvariables "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 tothe scaling which has been set

Fig.1-358: Return Value of the Firmware Function "MX_fREAL_VelTo_DINT"

1.12 MX_DSP.lib1.12.1 General Information

The following libraries contain the function block "MX_SynchronControl"; with"MX_SynchronControl" you can realize the consistent data exchange via thereal-time channel:

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

Bosch Rexroth AG 183/209

Rexroth IndraDrive Firmware Libraries

Page 186: 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 firmwarefunction 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 (onlySERCOS at present)

The control unit presets cyclic command values in the NC clock. Ifthe command values are of the type which has to be processed bythe drive within one command value input clock, the drive has toknow the point of time at which new command values are available,as well as the command value input clock, so that the drive caninterpolate the command values.

● Only "IndraDrive MP03" and "IndraDrive MP04": Checks whether MLD-Ssynchronizes 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. Withfirmware MPx03VRS, the command values are transmitted at the latest possi‐ble point of time [corresponds to first position loop interrupt after RTC task cycletime – (MPH=500 μs and MPB=1 ms)]. If the task has not been processed bythen, the RTcW command values are not taken into account.If the function block has been instanciated, its parameters become effective.

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

184/209

Rexroth IndraDrive Firmware Libraries

Page 187: 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) andread actual values (RTcR_xxxx) in a cyclically equidistant way. (At present, thereal-time channel can comprise 4 command values and 4 actual values.)This is required, for example, when a command value generator is to be realizedwith the integrated PLC (MLD-S) and the command values of the generatorhave 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 hasto correctly process the cyclic command value - in this case the virtual masteraxis 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 whichthe RTcW command values are to be written, these command val‐ues are not taken into account. If these command values fail twicein 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 thetwo motion task types ("motion task synchronous to master com‐munication" or "CCD-synchronous motion task") in connection withthe axis data structure "AxisData" (see MLD-M).

2. The drive must have been internally synchronized.

With the target version "IndraDrive MPH02", only the SERCOSmaster communication synchronizes the drive internally.With the target versions "IndraDrive MP03" and"IndraDrive MP04", the functionality of "MX_SynchronControl" hasbeen extended in such a way that MLD‑S can synchronize the driveinternally, too, when no master communication is able to do this;the "SyncDrive" input and the "DriveIsSync" output are used for thispurpose.With the target version "IndraDrive MP05", the "SyncDrive" inputand the "DriveIsSync" output do not exist; independent of the mas‐ter communication, the drive is always synchronized internally.

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

Bosch Rexroth AG 185/209

Rexroth IndraDrive Firmware Libraries

Page 188: Rexroth IndraDrive Firmware Libraries

Summary ofchangesMPH02→MP03/MP04:

Additional "SyncDrive" input, additional "DriveIsSync" output, data typeand scaling of "CmdDelay", data type of "ErrorID", "ErrorIdent" output

Summary ofchangesMP03/MP04→MP05:

No "SyncDrive" input, no "DriveIsSync" output

Fig.1-360: Firmware Function Block "MX_SynchronControl"

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

186/209

Rexroth IndraDrive Firmware Libraries

Page 189: Rexroth IndraDrive Firmware Libraries

Input variable Data type Description

CmdDelay INT(as of IndraDrive MP03)WORD(IndraDrive MPH02)

The "CmdDelay" input determines after which time the RTC variables areto be written.With firmware of the "MPH" type (High Performance), the following valuescan be written to the input:"-1" (only allowed as of target version "IndraDrive MP03"; default valueas of MPx03VRS): The command values are transmitted at the latestpossible point of time (corresponds to first position loop interrupt afterRTC 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 interruptafter 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 loopinterrupt after beginning of RTC task+CmdDelay [ms]+500 μsWith firmware of the "MPB" type (Low Performance), the following valuescan be written to the input:"-1" (only allowed as of target version "IndraDrive MP03"; default valueas of MPx03VRS): The command values are transmitted at the latestpossible point of time (corresponds to first position loop interrupt afterRTC 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 interruptafter 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 isinternally increased by 1 ms.Summarized: The command values are applied with the next position loopinterrupt 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 resetwith "Enable"=FALSE.

SyncDrive(only "IndraDrive MP03"and "IndraDrive MP04")

BOOL You might want to have the drive internally synchronized by MLD‑S; thisis the case when the master communication currently used is not able todo this and MLD-S is to input cyclic command values, which the drive isto 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 timeand 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"

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

Bosch Rexroth AG 187/209

Rexroth IndraDrive Firmware Libraries

Page 190: Rexroth IndraDrive Firmware Libraries

Output variable Data type Description

DriveIsSync(only "IndraDrive MP03"and "IndraDrive MP04")

BOOL With TRUE at the output, the function block signals that MLD-S internallysynchronizes the drive; only takes effect in conjunction with the "Syn‐cDrive" input

Error BOOL With "Error"=TRUE the function block signals that an error is present

ErrorID ERROR_CODE (as ofIndraDrive MP03)*

As of the target version IndraDrive MP03, the "ErrorID" output is of theERROR_CODE type (ENUM value). The ENUM value which is output inthe case of error gives a rough error description.

WORD(IndraDrive MPH02)(see ErrorID ReferenceList for the FirmwareFunction BlockMX_SynchronControlfor IndraDrive MPH02 )

For the target version IndraDrive MPH02, the "ErrorID" output is of theWORD type. In the case of error, the error code is output here.

ErrorIdent (as ofMPx03VRS)*

ERROR_STRUCT The output signals the exact cause of the error.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 atthe 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 belowFig.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"" onpage 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

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

188/209

Rexroth IndraDrive Firmware Libraries

Page 191: 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 ProgrammingIn preparation

1.13 MX_SysLibMem1.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 canbe 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 FunctionsThe library "MX_SysLibMem.lib" contains the following functions:● SysMemCmp ● SysMemCpy● SysMemMove ● SysMemSet ● SysMemSwap

For a detailed description of the corresponding function blocks andfunctions, see the IndraLogic help under "SysLibMem".The section "Notes on Utilization" describes the MLD-specific fea‐tures.

1.13.3 Notes on UtilizationGeneral 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 helpunder "SysLibMem".

1.14 MX_SysLibDir1.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 systemon the target. Directory entries can be read.

1) Interchanging bytes in the memory

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

Bosch Rexroth AG 189/209

Rexroth IndraDrive Firmware Libraries

Page 192: Rexroth IndraDrive Firmware Libraries

1.14.2 FunctionsThe 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 UtilizationGeneral 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 possiblycontained subdirectories are displayed. The "User" directory itself is not dis‐played, as if "User" were a separate partition. Access to the root node from theuser'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 readwith "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 Handlesavailable for "SysDirOpen". When the PLC is reset, possibly still open Handlesare 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 deletinguntil the next call of "SysDirRead".

1.15 "MX_SysLibFile" and "MX_SysLibFileAsync"Functions of the Libraries "MX_Sy‐

sLibFile" and "MX_SysLibFileA‐sync"

MX_SysLibFile.lib MX_SysLibFileAsync.lib

SysFileOpen SysFileOpenAsync

SysFileWrite SysFileWriteAsync

SysFileRead SysFileReadAsync

SysFileClose SysFileCloseAsync

SysFileDelete SysFileDeleteAsync

SysFileCopy SysFileCopyAsync

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

190/209

Rexroth IndraDrive Firmware Libraries

Page 193: 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 thata 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 statusof 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-specificfeatures.

Notes on Utilization Differences From the Descriptions of "SysFileOpen" and "SysFileOpenAsync":For the syntax and the behavior of the function blocks, the help in IndraLogicapplies. In contrast to the current online help, the following mode applies to the

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

Bosch Rexroth AG 191/209

Rexroth IndraDrive Firmware Libraries

Page 194: Rexroth IndraDrive Firmware Libraries

functions "SysFileOpen" and "SysFileOpenAsync" in which the file has to beopened:● "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. Theyare compulsorily closed however, when the PLC program is reset withReset 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 theuser 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 impossibleto include contents in the middle of a file.

1.16 MX_SysLibIecTasks.libThe 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 onlyused 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 TargetsThe sections below only describe the data types and structures relevant to theuser.

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

192/209

Rexroth IndraDrive Firmware Libraries

Page 195: Rexroth IndraDrive Firmware Libraries

Data Type "ERROR_CODE" "ERROR_CODE" is a data type relevant to the user. With function blocks, thedata type is used for the "ErrorID" output. The Enum value describes the errorwhich occurred.

The significance of the data type "ERROR_CODE" depends on thetarget.

"ERROR_CODE" can have the following values:

"ERROR_CODE" Error number as ofIndraDrive MP03

Error num‐ber MPx02

Description

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 orduring communication

COMMUNICATION_ERROR_CODE - 5 Error when communication is established orduring 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 inphase 4 which can only be written in phases 2and 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 valueswere 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 valueswere 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 ofvalue range)]

CALCULATION_ERROR - 4 A calculation error has occurred [e.g. division by"0", or "non" for Float variables (value outside ofvalue 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

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

Bosch Rexroth AG 193/209

Rexroth IndraDrive Firmware Libraries

Page 196: Rexroth IndraDrive Firmware Libraries

"ERROR_CODE" Error number as ofIndraDrive MP03

Error num‐ber MPx02

Description

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 theoccurred error in detail.Elements of the structure "ERROR_STRUCT":● Table

"Table" is of the ENUM type. The ENUM value refers to the list requiredfor identifying the specific error of "Additional1".

● Additional1"Additional1" is of the DWORD type. "Additional1" contains the specificerror number and can be used in conjunction with "Additional2" in differentways, depending on the system.

● Additional2"Additional2" is of the DWORD type. "Additional2" can contain additionalinformation. Its content differs depending on the system.

1.18 RIL_SocketComm.libThe library "RIL_SocketComm.lib" is supported as of the target "IndraDriveMP05". It contains functions and function blocks which allow using the TCP/UDP communication.The library "RIL_SocketComm.lib" is supported by several targets and thereforeis described in the documentation "Basic Libraries, IndraLogic 1x".

1.19 RIL_UtilitiesThe library "RIL_Utilities.lib" is supported as of the firmware MPx05V04.The library is supported by several targets and therefore is described in thedocumentation "Basic Libraries, IndraLogic 1x".

1.20 RIL_VExUtil.libThe library "RIL_VExUtil.lib" is supported as of the target "IndraDrive MP05". Itcontains a function block allowing safe key-type operation with all Rexroth HMIdevices of the "VEx" type.The library "RIL_VExUtil.lib" is supported by several targets and therefore isdescribed in the documentation "Basic Libraries, IndraLogic 1x".

1.21 SysLibCallback.libThe library "SysLibCallback.lib" is supported as of the target "IndraDriveMPH02". 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 helpunder "SysLibCallback.lib".

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

194/209

Rexroth IndraDrive Firmware Libraries

Page 197: Rexroth IndraDrive Firmware Libraries

1.22 SysLibSem.libThe library "SysLibSem.lib" is supported as of the target "IndraDrive MP06". Itcontains functions for synchronized data exchange between tasks.The library is supported by several targets; it is described in the IndraLogic helpunder "SysLibSem.lib".

1.23 SysLibSockets1.23.1 General

The library "SysLibSockets.lib" is available as of the target "IndraDriveMP05". 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/IPserver 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 FunctionsFor a detailed description of the corresponding function blocks andfunctions, 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.

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

Bosch Rexroth AG 195/209

Rexroth IndraDrive Firmware Libraries

Page 198: Rexroth IndraDrive Firmware Libraries

● SysSockSend UDP-specific:● SysSockRecvFrom ● SysSockSendTo

1.23.3 Notes on UtilizationFor a detailed description of the corresponding function blocks andfunctions, 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 drivealready uses these resources.

● The transmit and receive buffer size cannot be changed and has been setto 1500 bytes (1446 bytes of net data). This means that, for example, 4000bytes of data to be transmitted will be transmitted as 3 data packages with1446 bytes and one package with 1108 bytes of net data.

● The timeout for reception cannot be changed and has been set to 10000ms. For transmission there is no timeout.

● For server applications, it is recommended that you use the port addresses49.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 writecallback functions. In the case of reset and download, MLD automaticallydeletes 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 presentlyunavailable 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 canbe 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 isready for transmission and/or reception.

"SysSockCreate" "SysSockCreate" definitely sets "Blockingmode".

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

196/209

Rexroth IndraDrive Firmware Libraries

Page 199: 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. Occurringerrors are stored in task-oriented form and read in this way. The transmissionparameter "diSocket" is not evaluated. After the socket error has been read, itis cleared.

According to the program structure, "SysSockGetLastError" shouldbe called immediately after an error has been detected, so that theerror 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 apointer 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 thiscase

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

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

Bosch Rexroth AG 197/209

Rexroth IndraDrive Firmware Libraries

Page 200: Rexroth IndraDrive Firmware Libraries

"SysSockIoctl" ● "diCommand=SOCKET_FIONBIO" [sets Blockingmode to the value of thetransmitted argument (piParameter)].– Blockingmode: "piParameter=SOCKET_SO_BLOCKING"– Non Blockingmode: "piParameter=SOCKET_SO_NOBLOCKING"

● "diCommand=SOCKET_FIONREAD" [Reads the number of receivedbytes 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; thereturn 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 thefunction returns immediately, it is necessary to write "ptvTimeout.tv_sec"and "tv_usec"="0".

● "SysSockSelect" returns the number of ready sockets. If the return valueis "-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 setin "fdRead" have received data. They can be read in non-blocking formwith "SysSockRecv".

Reading the error status with "fdExcept" is not supported. At thisplace, 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, itis necessary to enter "0".The return value 0="gracefully closed" is not supported.

"SysSockRecv" The transmission parameter "diFlags" is not supported. For this parameter, itis 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=65495.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","SysSockNtohI" and "SysSockN‐

tohs"

The figure below explains how the byte order of the port is converted to little-endian by "SysSockHtons" or converted to big-endian by "SysSockNtohs".

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

198/209

Rexroth IndraDrive Firmware Libraries

Page 201: 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.libThe library "SysLibStr.lib" is supported as of the target "IndraDrive MPH02". Itcontains functions for handling strings.The library is supported by several targets; it is described in the IndraLogic helpunder "SysLibStr.lib".

1.25 Util.libThe library "Util.lib" is supported as of the target "IndraDrive MPH02". It containsfunction 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 helpunder "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 internaltest purposes (laboratory).

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

Bosch Rexroth AG 199/209

Rexroth IndraDrive Firmware Libraries

Page 202: Rexroth IndraDrive Firmware Libraries

Property damage, death or serious injury byincorrect control of motors when using func‐tions from the library "MX_Debug.lib"!

WARNING

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 orSignaling 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 TargetsWhen a new project with the target "IndraDrive" is created, the correspondinglibrary 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 thePLC 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 runswithout restriction. If access is not allowed, a drive error (F6010) is generatedand the PLC is stopped.See also "Notes on Application" in the Application Manual on RexrothIndraMotion MLD.

Functions ● CheckBounds● CheckDivByte● CheckDivDWord● CheckDivReal● CheckDivWord● CheckRangeSigned● CheckRangeUnsigned

1.28 Do Not Use!: Internal Functions, Function Blocks, Data Typesand Structures

The following libraries contain internal functions, function blocks, data typesand structures:

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

200/209

Rexroth IndraDrive Firmware Libraries

Page 203: 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

The library "Internal" is an internal, undocu‐mented interface to the drive

NOTICE

The functions and function blocks of the library "Internal" are internally requiredand the user mustn't use them!

When a new project is created, Internal is automatically linked and visible to theuser.

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

Bosch Rexroth AG 201/209

Rexroth IndraDrive Firmware Libraries

Page 204: Rexroth IndraDrive Firmware Libraries

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

202/209

Page 205: Rexroth IndraDrive Firmware Libraries

2 Appendix2.1 Service and Support

Our service helpdesk at our headquarters in Lohr, Germany and our worldwideservice will assist you with all kinds of enquiries. You can reach us around theclock - even on weekend and on holidays.

HelpdeskService HotlineWorldwide

Phone +49 (0) 9352 40 50 60 Outwith Germany please con‐tact our sales/service office inyour area first.For hotline numbers refer tothe sales office addresses onthe Internet.

Fax +49 (0) 9352 40 49 41

E-mail [email protected]

Internethttp://www.boschrexroth.comYou 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.

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

Bosch Rexroth AG 203/209

Appendix

Page 206: Rexroth IndraDrive Firmware Libraries

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

204/209

Page 207: Rexroth IndraDrive Firmware Libraries

IndexAAnalyzationNew.lib.............................................. 35Asynchronous file access................................. 191ATAN2................................................................ 96

CCheckBounds.................................................... 200CheckDivByt..................................................... 200CheckDivDWord............................................... 200CheckDivReal................................................... 200CheckDivWord.................................................. 200CheckRangeSigned.......................................... 200CheckRangeUnsigned...................................... 200CheckRtv.......................................................... 200

DData exchange, consistent................................ 183Data types

General ........................................................ 34MB_IDN ........................................................ 35

Diagnostic......................................................... 120diLevel............................................................... 197Directory of function block libraries of RexrothIndraLogic............................................................. 7Drive control................................................ 36, 100DSP................................................................... 183

EError.................................................................... 27ERROR_CODE................................................... 27ERROR_STRUCT............................................... 27Error handling..................................................... 26ErrorID................................................................. 27ErrorIdent............................................................ 27

FFile access

Asynchronous ............................................ 191Synchronous .............................................. 191

IINDRV_TABLE.................................................... 34Input signals "Execute" / "Enable"....................... 22Internal_MP03.lib.............................................. 201Internal_MPH02.lib............................................ 201Internal data types............................................ 200Internal function blocks..................................... 200Internal functions............................................... 200Internal structures............................................. 200

LLibrary

CommonTypes ........................................... 192Debug ......................................................... 199

MMB_ChangeCamData....................................... 124MB_ChangeProfileSet......................................... 37MB_ChangeProfileStep....................................... 39MB_Command.................................................... 42MB_GearInPos.................................................... 46MB_Home......................................................... 100MB_MotionProfile................................................ 49MB_Phasing........................................................ 52MB_PhasingSlave............................................... 53MB_PreSetMode............................................... 102MB_ReadListParameter.................................... 134MB_ReadMaxRealValue................................... 136MB_ReadMaxValue.......................................... 138MB_ReadMinRealValue.................................... 140MB_ReadMinValue........................................... 142MB_ReadName................................................. 144MB_ReadParameter......................................... 146MB_ReadRealListParameter............................ 148MB_ReadRealParameter.................................. 150MB_ReadSercosAttribute.................................. 155MB_ReadSercosDataStatus............................. 152MB_ReadStringParameter................................ 158MB_ReadUnit.................................................... 156MB_SetPositionControlMode............................ 119MB_Stop............................................................. 55MB_WriteListParameter.................................... 165MB_WriteParameter.......................................... 160MB_WriteRealListParameter............................. 163MB_WriteRealParameter.................................. 168MB_WriteStringParameter................................ 171MC_CamIn.......................................................... 57MC_CamOut....................................................... 60MC_GearIn.......................................................... 61MC_GearOut....................................................... 63MC_MoveAbsolute.............................................. 64MC_MoveAdditive............................................... 66MC_MoveRelative............................................... 69MC_MoveVelocity............................................... 71MC_Power........................................................ 103MC_ReadStatus................................................ 105MC_Reset......................................................... 107MC_Stop............................................................. 74MC_TorqueControl.............................................. 77Means of representation

Conventions of notation ................................. 5Notations ........................................................ 5Notes .............................................................. 5

Memory management....................................... 189MLD_TABLE....................................................... 28

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

Bosch Rexroth AG 205/209

Index

Page 208: Rexroth IndraDrive Firmware Libraries

MMLDS_TABLE..................................................... 28MX_Base.lib........................................................ 95MX_Command.................................................. 109MX_fCheckCmdRequest................................... 126MX_fDINT_AccTo_REAL.................................. 178MX_fDINT_DistTo_REAL.................................. 179MX_fDINT_VelTo_REAL................................... 179MX_fGetDriveWarning...................................... 121MX_fGetFreeTicks.............................................. 96MX_fGetHighResTime........................................ 97MX_fHighResTimerTicks_to_us.......................... 98MX_fReadParamDINT...................................... 127MX_fReadStringParam..................................... 128MX_fREAL_AccTo_DINT.................................. 180MX_fREAL_DistTo_DINT.................................. 181MX_fREAL_TorqueRampTo_DINT................... 181MX_fREAL_TorqueTo_DINT............................. 182MX_fREAL_VelTo_DINT................................... 183MX_fSetDriveError............................................ 121MX_fSetDriveWarning....................................... 122MX_fSetParamLimits........................................ 129MX_fSetParamName........................................ 130MX_fSetParamUnit........................................... 131MX_fSysComStatus............................................ 91MX_fWriteParamDINT....................................... 132MX_fWriteStringParam..................................... 133MX_IECTaskGetLoad......................................... 99MX_Internal.lib.................................................. 201MX_MoveAbsolute.............................................. 78MX_MoveAdditive............................................... 81MX_MoveRelative............................................... 84MX_MoveVelocity............................................... 87MX_PositionLoopEventInfo............................... 100MX_Power......................................................... 103MX_ReadParamDINT....................................... 173MX_ReadUnit.................................................... 156MX_Reset......................................................... 107MX_SetCmdState............................................. 175MX_SetControl.................................................. 112MX_SetDeviceMode......................................... 114MX_SetOpMode................................................ 116MX_Stop............................................................. 89MX_SynchronControl........................................ 184MX_SysComOpenAsync..................................... 91MX_SysLibCom.lib.............................................. 90MX_SysLibDir................................................... 189MX_SysLibDir.lib

Notes on utilization ..................................... 190MX_SysLibFile

Notes on utilization ..................................... 192MX_SysLibFile.lib.............................................. 190MX_SysLibFileAsync.lib.................................... 190MX_SysLibMem

Functions .................................................... 189Notes on utilization ..................................... 189

MX_SysLibMem.lib........................................... 189

MMX_WriteParamDINT........................................ 176

PParameters....................................................... 123Processing commands in a PLCopen functionblock.................................................................... 22

RReal-time channel............................................. 183RIL_SocketComm.lib........................................ 194RIL_VExUtil.lib.................................................. 194Runtime errors

Signaling / checking ................................... 200

SScaling.............................................................. 178SERCOS_TABLE................................................ 33Serial interface.................................................... 90Support

see Service Hotline .................................... 203Synchronous file access................................... 191SysComClose..................................................... 92SysComOpen...................................................... 93SysComRead...................................................... 93SysComWrite...................................................... 94SysDirOpen....................................................... 190SysDirRead....................................................... 190SysFileClose..................................................... 190SysFileCloseAsync........................................... 190SysFileCopy...................................................... 190SysFileCopyAsync............................................ 190SysFileDelete.................................................... 190SysFileDeleteAsync.......................................... 190SysFileEOF....................................................... 191SysFileEOFAsync............................................. 191SysFileGetPos.................................................. 191SysFileGetPosAsync........................................ 191SysFileGetSize................................................. 191SysFileGetSizeAsync........................................ 191SysFileGetTime................................................ 191SysFileGetTimeAsync....................................... 191SysFileOpen..................................................... 190SysFileOpenAsync............................................ 190SysFileRead...................................................... 190SysFileReadAsync............................................ 190SysFileRename................................................. 191SysFileRenameAsync....................................... 191SysFileSetPos................................................... 191SysFileSetPosAsync......................................... 191SysFileWrite...................................................... 190SysFileWriteAsync............................................ 190SysLibCallback.lib............................................. 194SysLibSem.lib................................................... 195SysLibSockets.lib

Notes on utilization ..................................... 196

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

206/209

Index

M

Page 209: Rexroth IndraDrive Firmware Libraries

SSysLibStr.lib...................................................... 199SysMemCmp.................................................... 189SysMemCpy...................................................... 189SysMemMove................................................... 189SysMemSet....................................................... 189SysMemSwap................................................... 189SysSockAccept................................................. 195SysSockBind..................................................... 195SysSockClose................................................... 195SysSockConnect............................................... 195SysSockCreate................................................. 195SysSockGetHostByName................................. 195SysSockGetHostName..................................... 195SysSockGetLastErrorSync............................... 195SysSockGetOption............................................ 195

Socket levels .............................................. 197SysSockHtonI................................................... 195SysSockHtons................................................... 195SysSockInetAddr.............................................. 195SysSockInetNtoa.............................................. 195SysSockIoctl

diCommand ................................................ 198

SSysSockListen.................................................. 195SysSockloctl...................................................... 195SysSockNtohI................................................... 195SysSockNtohs................................................... 195SysSockRecv.................................................... 195SysSockRecvFrom........................................... 196SysSockSelect.................................................. 195SysSockSend.................................................... 196SysSockSendTo............................................... 196SysSockSetOption............................................ 195

Socket levels .............................................. 197SysSockShutdown............................................ 195

diHow ......................................................... 199

TTCP/IP communication..................................... 195Tools................................................................... 96

UUDP communication......................................... 195

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

Bosch Rexroth AG 207/209

Index

S

Page 210: Rexroth IndraDrive Firmware Libraries

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

208/209

Page 211: Rexroth IndraDrive Firmware Libraries

Notes

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

Bosch Rexroth AG 209/209