Rexroth IndraDrive - Library Description PDF
Rexroth IndraDrive - Library Description PDF
and Controls
Hydraulics
Rexroth IndraDrive
Rexroth IndraMotion MLD
Library
Library Description
Pneumatics
Service
R911309224
Edition 02
Title
Rexroth IndraDrive
Rexroth IndraMotion MLD
Library
Type of Documentation
Document Typecode
Internal File Reference
Purpose of Documentation
Library Description
DOK-INDRV*-MLD-SYSLIB*-FK02-EN-P
RS-3f8ef8b70a6846ac00b4b7d3d98a87cc-1-en-US-2
This documentation describes the functions, function blocks and data types
contained in the target systems
IndraDrive MPH02,
IndraDrive MP04,
Copyright
Edition
Release Date
Notes
DOK-INDRV*-MLD-SYSLIB*-FK01-EN-P 13.08.04
Contains descriptions of
libraries for target system
IndraDrive MPH02
DOK-INDRV*-MLD-SYSLIB*-FK02-EN-P 27.10.06
Contains descriptions of
libraries for target sys
tems IndraDrive MPH02,
IndraDrive MP03 and
IndraDrive MP04
Validity
Published by
The specified data is for product description purposes only and may not be
deemed to be guaranteed unless expressly confirmed in the contract. All rights
are reserved with respect to the content of this documentation and the availa
bility of the product.
Bosch Rexroth AG
Bgm.-Dr.-Nebel-Str. 2 D-97816 Lohr a. Main
Telephone +49 (0)93 52/ 40-0 Fax +49 (0)93 52/ 40-48 85
http://www.boschrexroth.com/
Dept. BRC/EDY1 (SA, BB)
Note
I/II
Table of Contents
Table of Contents
Page
1
1.1
1.2
1.3
1.4
1.4.1
1.4.2
1.5
1.6
1.6.1
1.6.2
1.6.3
1.7
1.7.1
1.7.2
1.7.3
II/II
Table of Contents
Page
1.7.4
1.7.5
1.8
1.9
1.9.1
1.9.2
1.9.3
1.10
1.11
1.12
MX_Command ............................................................................................................................... 67
MX_SetControl .............................................................................................................................. 70
MX_SetDeviceMode ...................................................................................................................... 72
MX_SetOpMode ............................................................................................................................ 74
MB_SetPositionControlMode ......................................................................................................... 76
Functions for Diagnosis..................................................................................................................... 77
Overview......................................................................................................................................... 77
MX_fGetDriveWarning ................................................................................................................... 77
MX_fSetDriveError ......................................................................................................................... 78
MX_fSetDriveWarning ................................................................................................................... 79
Function Blocks/Functions for Parameters........................................................................................ 80
Overview......................................................................................................................................... 80
MX_fCheckCmdRequest ............................................................................................................... 81
MX_fReadParamDINT ................................................................................................................... 81
MX_fReadStringParam .................................................................................................................. 82
MX_fWriteParamDINT ................................................................................................................... 83
MX_fWriteStringParam .................................................................................................................. 84
MB_ReadListParameter ................................................................................................................ 85
MB_ReadMaxRealValue ............................................................................................................... 87
MB_ReadMaxValue ....................................................................................................................... 88
MB_ReadMinRealValue ................................................................................................................ 90
MB_ReadMinValue ........................................................................................................................ 91
MB_ReadName ............................................................................................................................. 93
MB_ReadParameter ...................................................................................................................... 94
MB_ReadRealParameter ............................................................................................................... 96
MB_ReadSercosDataStatus .......................................................................................................... 97
MB_ReadSercosAttribute .............................................................................................................. 99
MB_ReadUnit / MX_ReadUnit ..................................................................................................... 101
MB_ReadStringParameter ........................................................................................................... 102
MB_WriteParameter .................................................................................................................... 104
MB_WriteListParameter ............................................................................................................... 106
MB_WriteRealParameter ............................................................................................................. 108
MB_WriteStringParameter ........................................................................................................... 110
MX_ReadParamDINT .................................................................................................................. 112
MX_SetCmdState ........................................................................................................................ 114
MX_WriteParamDINT .................................................................................................................. 115
"CommonTypes" Library .................................................................................................................... 117
Real-Time Channel for Consistent Data Exchange............................................................................ 119
General Information......................................................................................................................... 119
MX_SynchronControl....................................................................................................................... 119
Notes on Programming ................................................................................................................... 124
For Internal Test Purposes Only!: Debug Library .............................................................................. 124
For Program-Internal Use Only!: Functions for Checking or Signaling Run Time Errors .................. 124
Do Not Use!: Internal Functions, Function Blocks, Data Types and Structures................................. 125
Index.......................................................................................................................... 127
1/128
1.1
To 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...
...are represented step by step in bold Click Window Show view Properties
letters
Fig.1-1:
Conventions of notation
All important notes are highlighted. A symbol tells you what kind of note is used
in the text. The symbols have the following significances:
...
DANGER
...
WARNING
...
CAUTION
This box contains important information which you should take into
consideration.
This symbol highlights useful tips and tricks.
2/128
Fig.1-2:
1.2
General Information
The PLC programming system Rexroth IndraLogic allows managing different
libraries.
The corresponding hardware must be available to use the different IndraDrive
target systems as drive-integrated PLC (see Application Manual "Rexroth
IndraMotion MLD"). In addition, the functional expansion package "IndraMotion
MLD" must have been enabled (see also Functional Description of firmware
"Enabling of Functional Packages").
For operating the IndraDrive target systems as drive-integrated PLC, Rexroth
provides specific function block libraries. After you have installed the PLC pro
gramming system Rexroth IndraLogic, these libraries are contained in the
directory
...\Rexroth\IndraWorks\IndraLogic\Targets
IndraDrive MP04)
(as
of
target
system
3/128
1.3
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command (positive edge at "Execute", "ExecuteLock" or "Ena
ble").
The "Active" signal can be delayed at the start of the function block,
as possibly required pre-processing has not been completed.
"Active" becomes FALSE when "Done", "CommandAborted" or "Error" become
TRUE. For status-controlled function blocks, "Active" becomes FALSE when
"Enable" is reset.
For single axes, "Active" is not set!
4/128
5/128
Fig.1-3:
6/128
7/128
Fig.1-4:
8/128
Fig.1-5:
Output Signal "CommandAborted"
The output "CommandAborted" 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 output "CommandAborted" remains
TRUE for one cycle when the input "Execute" had been FALSE at the point of
time at which "CommandAborted" was set to TRUE. If the input
"Execute"=TRUE when "CommandAborted" is set, "CommandAborted" re
mains TRUE until "Execute" is set to FALSE.
For status-controlled function blocks, the output "CommandAborted" is reset
when the "Enable" input is reset.
1.4
Error Handling
1.4.1
General Information
According to their target system, the function blocks have two or three outputs
which contain information in case an error occurs:
"Error",
9/128
Error
"ErrorID" and
ErrorID
The output "ErrorID" is of the type ERROR_CODE. When an error has occurred
at the function block, the error classification can be seen at output "ErrorID".
The output values of "ErrorID" have to be interpreted differently ac
cording to the respective target system!
The type ERROR_CODE has been defined in the "CommonTypes" library of
the respective target system.
ErrorIdent
"Table",
"Additional1" and
"Additional2".
The structure and its elements have been defined in the "Common
Types" library of the target system.
Element
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 system "IndraDrive MP04")] has to
be used to decode the error code of element "Additional1"
Additional1
DWORD
The element "Additional1" contains the error code for specification of the occurred
error
Additional2
DWORD
Fig.1-6:
1.4.2
Elements of ERROR_STRUCT
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 system
"IndraDrive MP04" it refers to the error table "MLD_TABLE". (Only the name
has changed, the contents are identical.)
10/128
16#00000000
When there isn't any error present, the element "Table" has the value
"NO_TABLE_USED"
INPUT_INVALID_ERROR
16#00000001
RESOURCE_ERROR
16#00000001
ACCESS_ERROR
16#00000002
The function block used may only have one instance in the system (e.g.:
"MX_SynchronControl")
STATE_MACHINE_ERROR
16#00000003
STATE_MACHINE_ERROR
16#00000004
ACCESS_ERROR
16#00000005
MLD has neither permanent nor temporary control over the indicated (lo
cal) axis
ACCESS_ERROR
16#00000006
RESOURCE_ERROR
16#00000007
INPUT_RANGE_ERROR
16#00000008
INPUT_RANGE_ERROR
16#00000009
INPUT_RANGE_ERROR
16#00000009
INPUT_RANGE_ERROR
16#00000010
INPUT_RANGE_ERROR
16#00000010
STATE_MACHINE_ERROR
16#00000011
STATE_MACHINE_ERROR
16#00000012
INPUT_RANGE_ERROR
16#00000013
STATE_MACHINE_ERROR
16#00000014
11/128
ACCESS_ERROR
16#00000020
Several tasks use the same instance of a function block, this is not allowed
As of target system "IndraDrive MP04": "Additional2" displays the index
of the second task
STATE_MACHINE_ERROR
16#00000021
An additive motion command was started which is not allowed in this axis
status
OTHER_ERROR
16#00000199
ACCESS_ERROR
16#00000200
ACCESS_ERROR
16#00000201
ACCESS_ERROR
16#00000202
INPUT_INVALID_ERROR
16#00000203
OTHER_ERROR
16#00000204
ACCESS_ERROR
16#00000205
INPUT_INVALID_ERROR
16#00000206
As of target system "IndraDrive MP04": the data pointer at the input of the
function block is invalid (incorrect alignment or invalid address)
ACCESS_ERROR
16#00000207
SYSTEM_ERROR
16#00000208
SYSTEM_ERROR
16#00000209
ACCESS_ERROR
16#00000210
ACCESS_ERROR
16#00000211
RESOURCE_ERROR
16#00000250
RESOURCE_ERROR
16#00000251
NC cycle time (S-0-0001) does not match MLD task cycle time
INPUT_RANGE_ERROR
16#00000252
RESOURCE_ERROR
16#00000253
RESOURCE_ERROR
16#00000254
CALCULATION_ERROR
16#00000255
CALCULATION_ERROR
16#00000256
RESOURCE_ERROR
16#00000257
ACCESS_ERROR
16#00000300
ACCESS_ERROR
16#00000301
STATE_MACHINE_ERROR
16#00000320
12/128
STATE_MACHINE_ERROR
16#00000321
ACCESS_ERROR
16#00000322
DEVICE_ERROR
16#00000350
INPUT_RANGE_ERROR
16#00000370
INPUT_RANGE_ERROR
16#00000371
INPUT_RANGE_ERROR
16#00000380
Fig.1-7:
SERCOS_TABLE
INDRV_TABLE
1.5
Bit size
Description
BOOL
BYTE
WORD
16
DWORD
32
CHAR
ASCII code
INT
16
DINT
32
REAL
32
TIME
32
DATE
32
TIME_OF_DAY,
TOD
32
Fig.1-8:
Data types
1.6
1.6.1
General Information
The following libraries contain IEC function blocks for drive control:
13/128
Library
IndraDrive MPH02
MXMotion_MPH02.lib
IndraDrive MP03
MXMotion_MP03.lib
IndraDrive MP04
MX_PLCopen.lib
Fig.1-9:
General Properties
"ErrorID"
ACCESS_ERROR
16#00000006
RESOURCE_ERROR
16#00000007
Fig.1-10:
1.6.2
Generally valid errors of motion function blocks, taken from error table
MLDS_TABLE / MLD_TABLE for function blocks as of target "IndraDrive
MP03"
MB_ChangeProfileStep
MB_GearInPos
MB_MotionProfile *1
MB_Phasing
MB_PhasingSlave
MB_Stop
MC_CamIn
MC_CamOut
MC_GearIn
MC_GearOut
MC_MoveAbsolute
MC_MoveAdditive
MC_MoveRelative
*1
MC_MoveVelocity
*1
MC_Stop
MX_MoveAbsolute
MX_MoveAdditive
MX_MoveRelative
MX_MoveVelocity
*1
*1
*1
*1
*1
*1
*1
*1
*1
*1
*1
*1
14/128
MX_Stop
*2
1.6.3
Function Blocks
MB_ChangeProfileStep
The firmware function block "MB_ChangeProfileStep" is used to change the
four parameters which define a segment of a motion profile set; these param
eters are
distance,
mode.
The step which is to be changed is defined by the values at the inputs "Set
Number" and "StepNumber".
The units for the function block inputs "Distance" and "SlaveAxisVelocity" are
defined by the scaling parameters of the axis (S-0-0076, S-0-0044).
The input "StepMode" defines the kind of step.
The output "Done" is set when the changed profile was checked. The output
"CheckOk" is set depending on the result of the check. If "CheckOk"=FALSE,
a discrepancy has been detected.
Target system
Library
Range
IndraDrive MP04V12
MX_PLCOpen.lib
Motion
Fig.1-11:
Library assignment
Fig.1-12:
Input variable
Data type
Description
Execute
BOOL
SetNumber
UINT
15/128
Data type
Description
StepNumber
UINT
MasterAxisInitialPos
REAL
Distance
REAL
SlaveAxisVelocity
REAL
StepMode
MC_STEP_MODE
Fig.1-13:
REST_IN_REST_POLY5 (0)
REST_IN_REST_INCLINEDSINE (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)
Output variable
Data type
Description
Done
BOOL
Active
BOOL
16/128
Data type
Description
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
CheckOk
BOOL
Fig.1-14:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
Axis
AXIS_REF
Fig.1-15:
MB_GearInPos
With the function block "MB_GearInPos" it is possible to realize a motion of the
slave axis which is phase synchronous to the master axis.
Synchronization (absolute/relative) of the slave axis to the master
axis only takes place with a rising edge at "Execute", when currently
there hasn't any instance of "MB_GearInPos" been active with the
same slave axis.
A synchronous position command value for the slave axis is determined from
the position of the master axis. At the input "Master" select the master axis; you
can choose from the following axes:
Fig.1-16:
With the input "StartMode" you select whether, by activating the function block
"MB_GearInPos", the actual position value of the axis is to be adjusted to the
17/128
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-17:
Library assignment
Fig.1-18:
Input variable
Data type
Description
Execute
BOOL
RatioNumerator
UINT
RatioDenominator
UINT
MasterFineadjust
REAL
18/128
Data type
Description
SyncMode
MC_SYNC_DIRECTION
StartMode
MC_START_MODE
Fig.1-19:
Output variable
Data type
Description
InSync
BOOL
With the output value TRUE the function block signals that the slave axis
is synchronous.
"InSync" corresponds to P-0-0115, bit 12 of the parameterized axis.
For this application, bit 12 of P-0-0115 corresponds to bit 8 "synchroni
zation mode in synchronization" of parameter "P-0-0089, Status word for
synchronous operating modes".
Active
BOOL
With "Active"=TRUE the function block signals that it determines the axis
motion.
"Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Fig.1-20:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
19/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Master
Slave
AXIS_REF
VmAxisExt=P_0_0053
RmAxis=P_0_0052
Fig.1-21:
MB_MotionProfile
The function block "MB_MotionProfile" realizes an electronic cam shaft func
tion. The cam shafts are analytically defined by the parameters which belong
to the operating mode "electronic motion profile". A synchronous position com
mand value for the slave axis is determined from the position of the master axis.
At the input "Master" select the master axis; you can choose from the following
axes:
Fig.1-22:
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-23:
Library assignment
20/128
Fig.1-24:
Input variable
Data type
Description
Execute
BOOL
RatioNumerator
UINT
RatioDenominator
UINT
MasterFineadjust
REAL
SetSelection
UINT
RelativePositioning
BOOL
P-0-0088, bit10:
FALSE = fixed (absolute) position reference,
TRUE = relative positioning.
SyncMode
MC_SYNC_DIRECTION
StartMode
MC_START_MODE
Fig.1-25:
21/128
Data type
Description
InSync
BOOL
With the output value TRUE the function block signals that the slave axis
is synchronous.
"InSync" corresponds to P-0-0115, bit12 of the parameterized axis and
SetSelection(P-0-0088.9) = ActiveSet(P-0-0089.3).
For this application, bit 12 of P-0-0115 corresponds to bit 8 "synchroni
zation mode in synchronization" of parameter "P-0-0089, Status word for
synchronous operating modes".
Active
BOOL
With "Active"=TRUE the function block signals that it determines the axis
motion.
"Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
ActiveSet
UINT
P-0-0089, bit3: the output displays the number of the active motion profile
set.
*
Fig.1-26:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Master
AXIS_REF
Fig.1-27:
MB_Phasing
The function block "MB_Phasing" allows realizing an offset to the master axis
which is connected as input to a synchronization function block ("MC_CamIn"
or "MC_GearInPos").
22/128
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-28:
Library assignment
Fig.1-29:
Input variable
Data type
Description
Execute
BOOL
PhaseShift
REAL
Velocity
REAL
Acceleration
REAL
Fig.1-30:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that PhaseShift has
been reached (acknowledged by bit 6 of "P00089, Status word for syn
chronous operating modes")
Active
BOOL
With TRUE the input "Active" signals that the preset value has not yet been
reached
CommandAborted
BOOL
Error
BOOL
23/128
Data type
Description
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-31:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Axis2 to Axis8 correspond to the remote axes. The remote axes contained in
the list "P-0-1601, CCD: addresses of projected drives" correspond to the order
according to Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)
Fig.1-32:
MB_PhasingSlave
With the function block "MB_PhasingSlave" it is possible to adjust the slave axis
by a position offset. The adjustment only takes effect with active synchroniza
tion function block ("MC_CamIn", "MB_GearInPos" or "MB_MotionProfile").
Moving to the new value for the position offset (input "PhaseShift") takes place
in consideration of the values for velocity (input "Velocity") and acceleration
(input "Acceleration") provided at the function block.
The scaling parameters of the axis ("S00044, Velocity data scaling type";
"S00076, Position data scaling type"; "S00160, Acceleration data scaling
type") define the units for the inputs "PhaseShift", "Velocity" and "Acceleration".
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-33:
Library assignment
24/128
Fig.1-34:
Input variable
Data type
Description
Execute
BOOL
PhaseShift
REAL
Velocity
REAL
Acceleration
REAL
Fig.1-35:
Output variable
Data type
Description
Done
BOOL
Active
BOOL
With "Active"=TRUE the function block signals that it contributes to the axis
motion
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-36:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
25/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Axis2 to Axis8 correspond to the remote axes. The remote axes contained in
the list "P-0-1601, CCD: addresses of projected drives" correspond to the order
according to Axis2 to Axis8 (Axis2 acts on the drive of list element 0 of
P-0-1601)
Fig.1-37:
MB_Stop
The firmware function block "MB_Stop" is used to bring the drive to the status
STOP.
With the rising edge at "ExecuteLock" the stopping process is started.
If the PLC does not have control over the drive, an error is returned.
As long as the input "ExecuteLock" is TRUE, no other motion function block
can be started. For this purpose, the drive is brought to the status "AH" (Drive
Halt). Further command triggering is only possible when the axis is in standstill.
With "ExecuteLock"=FALSE the drive remains in "AH".
With the deceleration set at "Deceleration" the drive is brought to standstill.
When several instances are called in a project by "MC_Stop" or "MB_Stop", it
is always the last instance which takes effect; exception: an active "MC_Stop"
cannot be interrupted by an "MB_Stop".
"MC_Stop" has higher priority than "MB_Stop"; this means that a running
"MC_Stop" cannot be aborted by an "MB_Stop".
Via the function block "MB_Stop" it is also possible to bring
"P-0-0759, Virtual master axis, actual velocity value" to standstill via
a defined ramp. For this purpose, the master axis generator has to
be activated via "P-0-0917, Control word of master axis generator",
bit 0=1. To convert the virtual actual position value (P-0-0758) to
the internal virtual master axis position (VmAxisInt, "P-0-0761, Mas
ter axis position for slave axis") the parameter P-0-0758 must be
written to parameter "P-0-0916, Master axis format converter signal
selection".
See also Functional Description of firmware "Master Axis Genera
tor"
To test the function block the instance variable "ActivateCounter"
can be used. It counts the positive edges of the "ExecuteLock" sig
nal and thereby signals whether the function block is run with edge.
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-38:
Library assignment
26/128
Fig.1-39:
Input variable
Data type
Description
ExecuteLock
BOOL
Deceleration
REAL
This input sets the deceleration. The deceleration which is set is written to
parameter S00372, Drive Halt acceleration bipolar
Fig.1-40:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE (S-0-0331, bit 0=1) the firmware function block signals
that the drive has stopped. Only when the input "ExecuteLock" is TRUE is
the output "Done" generated
Active
BOOL
CommandAborted
BOOL
Error
BOOL
With "Error"=TRUE the function block signals that an error is present; the
kind of deceleration depends on the error
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-41:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
27/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: addresses of projected drives" correspond to
the order according to Axis2 to Axis8 (Axis2 acts on the drive of list element
0 of P-0-1601)
VmAxisInt corresponds to the virtual master axis generator
Fig.1-42:
MC_CamIn
With the function block "MC_CamIn" it is possible to realize an electronic cam
shaft.
Synchronization (absolute/relative) of the slave axis to the master
axis takes place with a rising edge at the input "Execute", but only
when currently there hasn't any instance of "MC_CamIn" been ac
tive with the same slave axis.
The parameters influenced by the input values take immediate ef
fect (cam shaft, gear and distance).
When an instance of "MC_CamIn" had been active with the same
slave axis at the time of the rising edge at the input "Execute", syn
chronization is not repeated. The position of the master axis is
directly converted to a position of the slave axis (fixed connection
to the master axis) The input values (gear, distance, cam shaft) take
effect depending on the configuration of "P-0-0086, Configuration
word synchronous operating modes".
A synchronous position command value for the slave axis is determined from
the position of the master axis. At the input "Master" select the master axis; you
can choose from the following axes:
Fig.1-43:
With the calculated profile access angle the profile selected at the input "Cam
TableID" is accessed and a percentage is taken from it. This profile value is
multiplied with the position value at the input "CamShaftDistance" and provides
the synchronous position command value.
With the input "StartMode" you select whether, by activating the function block
"MC_CamIn", the actual position value of the axis is to be adjusted to the syn
chronous position command value (synchronization) with parameterized ve
locity ("P00143, Synchronization velocity") and acceleration ("P00142,
28/128
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-44:
Library assignment
Fig.1-45:
Input variable
Data type
Description
Execute
BOOL
RatioNumerator
UINT
RatioDenominator
UINT
MasterFineadjust
REAL
CamShaftDistance
REAL
SyncMode
MC_SYNC_DIRECTION
29/128
Data type
Description
StartMode
MC_START_MODE
CamTableID
MC_CAM_ID
Fig.1-46:
Output variable
Data type
Description
InSync
BOOL
With "InSync"=TRUE the function block signals that the slave axis is syn
chronous.
"InSync" corresponds to
Active
BOOL
"CamTableID"="CamActiveID" and
With "Active"=TRUE the function block signals that it determines the axis
motion.
"Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
CamActiveID
Fig.1-47:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
30/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Master
Slave
AXIS_REF
VmAxisExt=P-0-0053
RmAxis=P-0-0052
Fig.1-48:
MC_CamOut
The firmware function block "MC_CamOut" is used to terminate an active syn
chronization function block. Transition to velocity control takes place. The actual
velocity value available with a rising Execute edge is taken as velocity com
mand value.
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-49:
Library assignment
Fig.1-50:
Input variable
Data type
Description
Execute
BOOL
Fig.1-51:
31/128
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 output "Active" signals that it determines the axis motion.
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-52:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Slave
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: addresses of projected drives" correspond to
the order according to Axis2 to Axis8 (Axis2 acts on the drive of list element
0 of P-0-1601)
Fig.1-53:
MC_GearIn
With the function block "MC_GearIn" it is possible to realize a motion of the
slave axis which is velocity synchronous to the master axis.
When the function block is activated, the slave axis accelerates to the synchro
nous velocity with the acceleration set in "P00142, 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-54:
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-55:
Library assignment
32/128
Fig.1-56:
Input variable
Data type
Description
Execute
BOOL
RatioNumerator
UINT
RatioDenominator
UINT
MasterFineadjust
REAL
Fig.1-57:
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, Device control: status word", bit 12:
"command value reached" of the parameterized axis. For this application,
this bit corresponds to bit 8 "synchronization mode in synchronization" of
parameter "P-0-0089, Status word for synchronous operating modes".
Active
BOOL
With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Fig.1-58:
33/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Master
Slave
AXIS_REF
VmAxisExt=P-0-0053
RmAxis=P-0-0052
Fig.1-59:
MC_GearOut
The firmware function block "MC_GearOut" is used to terminate an active syn
chronization function block. Transition to velocity control takes place. The actual
velocity value available with a rising Execute edge is taken as velocity com
mand value.
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-60:
Library assignment
Fig.1-61:
Input variable
Data type
Description
Execute
BOOL
Fig.1-62:
34/128
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 output "Active" signals that it determines the axis motion.
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-63:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Slave
Axis2 to Axis8 correspond to the remote axes. The remote axes contained
in the list "P-0-1601, CCD: addresses of projected drives" correspond to
the order according to Axis2 to Axis8 (Axis2 acts on the drive of list element
0 of P-0-1601)
Fig.1-64:
MC_MoveAbsolute
The firmware function block "MC_MoveAbsolute" is used to move the drive to
a preset absolute position. Internally the operating mode "drive-controlled po
sitioning" is activated for this purpose. Make the settings of the position loop
(with/without lag error, actual position value 1/2) with the function block
"MB_SetPositionControlMode".
For permanent control and remote axes the secondary operation mode 3 and
its parameters are used. For temporary control the secondary PLC operation
mode 11 and its parameters are used.
The target position has to be preset at the input "Position". Via the inputs "Ve
locity", "Acceleration" and "Deceleration" you have to set how the drive moves
to the target position (motion profile).
Via the firmware function block "MC_MoveAbsolute" the parameter
"P-0-0758, Virtual master axis, actual position value" of the master
axis generator can be positioned in absolute form, too. For this pur
pose, the master axis generator has to be activated via "P-0-0917,
Control word of master axis generator", bit 0=1. To convert the vir
tual actual position value (P-0-0758) to the internal virtual master
axis position (VmAxisInt, "P-0-0761, Master axis position for slave
axis") the parameter P-0-0758 must be written to parameter
"P-0-0916, Master axis format converter signal selection".
See also Functional Description of firmware "Master Axis Genera
tor" and "Master Axis Format Converter"
35/128
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-65:
Library assignment
Fig.1-66:
Fig.1-67:
Input variable
Data type
Description
Execute
BOOL
Position
REAL
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-68:
36/128
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the absolute
target position has been reached. The processing is completed until the
next 0-1 edge at the "Execute" input. When a 1-0 edge is applied to the
"Execute" input before the firmware function block signals that it has been
completed ("Done"=TRUE), the output "Done" is set to TRUE for one call
when the motion target has been reached and the processing of the firm
ware function block has not been interrupted by an error or another firm
ware function block.
Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Active
BOOL
With "Active"=TRUE the function block signals that it determines the axis
motion.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-69:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-70:
MC_MoveAdditive
The firmware function block "MC_MoveAdditive" is used to move the drive in
relative form by a distance in addition to the target position. Th new target po
sition results from the old target position, plus a distance. The distance is
determined by the input "Distance". The inputs "Velocity", "Acceleration" and
"Deceleration" determine the motion profile.
37/128
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-71:
Library assignment
Fig.1-72:
S-0-0282, Positioning
command value
S-0-0259, Positioning
Velocity
S-0-0260, Positioning
Acceleration
38/128
S-0-0346, Positioning
control word
Fig.1-73:
Input variable
Data type
Description
Execute
BOOL
With a rising edge at "Execute" the data at the inputs are applied to the
firmware function block; processing starts.
With a falling edge, all outputs are cleared.
The firmware function block remains active until one of the two
outputs"Done" and "Error" is set to TRUE. The status persists for one call
before the outputs are reset
Distance
REAL
At the input "Distance" the relative distance must be preset; the new target
position results from the old target position and the value set at the input
"Distance".
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-74:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the target po
sition has been reached. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func
tion block has not been interrupted by an error or another firmware function
block.
Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Active
BOOL
CommandAborted
BOOL
Error
BOOL
39/128
Data type
Description
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-75:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-76:
MC_MoveRelative
The firmware function block "MC_MoveRelative" is used to move the drive in
relative form by a distance, starting from the current actual position.
Internally the operating mode "drive-controlled positioning" is activated for this
purpose. Make the settings of the position loop (with/without lag error, actual
position value 1/2) with the function block "MB_SetPositionControlMode".
For permanent control and remote axes the secondary operation mode 3 and
its parameters are used. For temporary control the secondary PLC operation
mode 11 and its parameters are used.
The relative distance to be moved has to be preset at the input "Distance". Via
the inputs "Velocity", "Acceleration" and "Deceleration" you have to set the mo
tion profile (determines how the relative distance is traveled).
Via the firmware function block "MC_MoveRelative" the parameter
"P-0-0758, Virtual master axis, actual position value" of the master
axis generator can be moved in relative form by a distance starting
from the current virtual actual position. For this purpose, the master
axis generator has to be activated via "P-0-0917, Control word of
master axis generator", bit 0=1. To convert the virtual actual position
value (P-0-0758) to the internal virtual master axis position (VmAx
isInt, "P-0-0761, Master axis position for slave axis") the parameter
P-0-0758 must be written to parameter "P-0-0916, Master axis for
mat converter signal selection".
See also Functional Description of firmware "Master Axis Genera
tor" and "Master Axis Format Converter"
40/128
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-77:
Library assignment
Fig.1-78:
Fig.1-79:
Input variable
Data type
Description
Execute
BOOL
Distance
REAL
At the input "Distance" you have to preset the relative distance which is to
be traveled starting from the current actual position.
The number of possible decimal places depends on the parameterized
scaling (see drive documentation). If the applied value has more decimal
places, they are cut off
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-80:
41/128
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the preset dis
tance has been traveled. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func
tion block has not been interrupted by an error or another firmware function
block.
Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Active
BOOL
With TRUE the output "Active" signals that it determines the axis motion.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-81:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-82:
MC_Stop
The firmware function block "MC_Stop" is used to bring the drive to the status
STOP.
With the rising edge of "Execute" the stopping process is started.
If the PLC does not have control over the drive, an error is returned.
When the firmware function block "MC_Stop" is activated via a rising edge at
the "Execute" input, the drive goes to the status "AH" (Drive Halt). Further com
42/128
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-83:
Library assignment
Fig.1-84:
43/128
Data type
Description
Execute
BOOL
Slave axis ("Axis1" to "Axis8"): With a rising edge at "Execute" the drive is
switched to "AH".
Master axis generator ("VmAxisInt"): With a rising edge at "Execute" the
master axis generator is brought to the positioning mode "halt" ("P-0-0760,
Virtual master axis, positioning control word", bit1 and bit2 to "1").
See also "Input Signals "Execute" / "Enable" " on page 3
Deceleration
REAL
This input sets the deceleration. The deceleration which is set is written to
parameter "S00372, Drive Halt acceleration bipolar" of the slave axis (real
axis) or parameter "P-0-0772, Virtual master axis, positioning deceleration"
of the virtual master axis generator.
Fig.1-85:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the axis has
stopped.
Slave axis (real axis): When S-0-0331, bit 0 = 1
Virtual master axis generator ("VmAxisInt"): When the absolute value of
P-0-0759 is smaller than P-0-0912
Active
BOOL
CommandAborted
BOOL
Error
BOOL
With "Error"=TRUE the function block signals that an error is present; the
kind of deceleration depends on the error
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-86:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-87:
"Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
44/128
MC_MoveVelocity
The firmware function block "MC_MoveVelocity" is used to preset a velocity for
the drive. As the drive moves in velocity control, the firmware function block can
be used for open-loop drives, too.
For permanent control and remote axes the primary mode of operation and its
parameters are used. For temporary control the secondary PLC operation
mode 8 and its parameters are used.
If they are scaling-dependent and unless otherwise described, the
units of the inputs which define the drive motion are taken from the
scaling parameters.
If this is not taken into consideration, the drive error "F2064 Incor
rect cmd value direction master axis generator" is triggered.
This parameter only takes effect with modulo scaling of the virtual
master axis generator.
Target system
Library
Range
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-88:
Library assignment
45/128
Fig.1-89:
Fig.1-90:
Input variable
Data type
Description
Execute
BOOL
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-91:
46/128
Data type
Description
InVelocity
BOOL
Active
BOOL
With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
CommandAborted
BOOL
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-92:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-93:
MX_MoveAbsolute
The firmware function block "MX_MoveAbsolute" is used to move the drive to
a preset absolute position. For this purpose, the secondary PLC operation
mode "drive-controlled positioning without lag error with motor encoder" is in
47/128
Fig.1-94:
Target system
Library
Range
IndraDrive MPH02
MXMotion_MPH02.lib
IndraDrive MP03
MXMotion_MP03.lib
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-95:
Library assignment
48/128
Fig.1-96:
Input variable
Data type
Description
Execute
BOOL
see chapter 1.3 "Signal Time Diagrams of Most Frequently Used Inputs
and Outputs" on page 3
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
"S00282, Positioning command value" must be known.
With preferred scaling (see Functional Description of firmware "Scaling
Types") the parameter has 4 decimal places.
Example:If the drive is to be moved to a target position of 100.25, the value
1002500 must be written at "Position".
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-97:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the absolute
target position has been reached. The processing is completed until the
next 0-1 edge at the "Execute" input. When a 1-0 edge is applied to the
"Execute" input before the firmware function block signals that it has been
completed ("Done"=TRUE), the output "Done" is set to TRUE for one call
when the motion target has been reached and the processing of the firm
ware function block has not been interrupted by an error or another firm
ware function block.
Real axis: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Virtual master axis generator (VmAxisInt): The output is set to TRUE when
bit 2 is set in parameter "P-0-0768, Virtual master axis, positioning status".
Active
BOOL
With "Active"=TRUE the function block signals that it determines the axis
motion. "Active" remains TRUE until "CommandAborted" or Error" is set.
49/128
Data type
Description
CommandAborted
BOOL
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 9
(as of MPx03VRS)
Fig.1-98:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-99:
ErrorID
Description
RESSOURCE_ERROR
ACCESS_ERROR_CODE
Fig.1-100:
MX_MoveAdditive
The firmware function block "MX_MoveAdditive" is used to move the drive in
relative form by a distance in addition to the target position. Th new target po
sition results from the old target position, plus a distance. The distance is
50/128
Library
Range
IndraDrive MPH02
MXMotion_MPH02.lib
IndraDrive MP03
MXMotion_MP03.lib
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-101:
Library assignment
Fig.1-102:
The corresponding PLC mode parameters are used as internal command val
ues instead of the usual operating mode parameters. They can be read for
diagnostic purposes:
51/128
Fig.1-103:
Input variable
Data type
Description
Execute
BOOL
see chapter 1.3 "Signal Time Diagrams of Most Frequently Used Inputs
and Outputs" on page 3
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 "S00282, Positioning command value" must be known.
With preferred scaling (see Functional Description of firmware "Scaling
Types") the parameter has 4 decimal places. Example: If the drive is to be
moved by a distance of 100.25, the value 1002500 must be written at
"Distance"
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-104:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the target po
sition has been reached. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func
tion block has not been interrupted by an error or another firmware function
block.
Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Active
BOOL
CommandAborted
BOOL
52/128
Data type
Description
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent **
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 9
(as of MPx03VRS)
Fig.1-105:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-106:
ErrorID
Description
RESSOURCE_ERROR_CODE
ACCESS_ERROR_CODE
Fig.1-107:
MX_MoveRelative
The firmware function block "MX_MoveRelative" is used to move the drive in
relative form by a distance, starting from the current actual position. For this
purpose, the secondary PLC operation mode "drive-controlled positioning with
out lag error with motor encoder" is internally activated (see Functional De
scription of firmware "Drive-Controlled Positioning").
53/128
Fig.1-108:
Target system
Library
Range
IndraDrive MPH02
MXMotion_MPH02.lib
IndraDrive MP03
MXMotion_MP03.lib
IndraDrive MP04
MX_PLCopen.lib
Motion
Fig.1-109:
Library assignment
54/128
Fig.1-110:
Input variable
Data type
Description
Execute
BOOL
Distance
DINT
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-111:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the firmware function block signals that the preset dis
tance has been traveled. The processing is completed until the next 0-1
edge at the "Execute" input. When a 1-0 edge is applied to the "Execute"
input before the firmware function block signals that it has been completed
("Done"=TRUE), the output "Done" is set to TRUE for one call when the
motion target has been reached and the processing of the firmware func
tion block has not been interrupted by an error or another firmware function
block.
Real axes: The output is set to TRUE when bit 2 is set in parameter
"S-0-0437, Positioning status word".
Active
BOOL
With TRUE the output "Active" signals that it determines the axis motion.
CommandAborted
BOOL
55/128
Data type
Description
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 9
(as of MPx03VRS)
Fig.1-112:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"Axis1" (axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-113:
ErrorID
Description
RESSOURCE_ERROR_CODE
ACCESS_ERROR_CODE
Fig.1-114:
MX_MoveVelocity
The firmware function block "MX_MoveVelocity" is used to preset a velocity for
the drive; for this purpose, the secondary PLC operating mode "velocity control
with motor encoder" is internally activated.
As the drive moves in velocity control, the firmware function block
can be used for open-loop drives, too.
56/128
Library
Range
IndraDrive MPH02
MXMotion_MPH02.lib
IndraDrive MP03
MXMotion_MP03.lib
Fig.1-115:
Library assignment
Fig.1-116:
Input variable
Data type
Description
Execute
BOOL
Velocity
REAL
Acceleration
REAL
Deceleration
REAL
Fig.1-117:
Output variable
Data type
Description
InVelocity
BOOL
Active
BOOL
With TRUE the output "Active" signals that the drive was switched to the
corresponding secondary PLC operation mode and processes the input
command values (drive follows input). When the firmware function block
signals "InVelocity"=TRUE, "CommandAborted"=TRUE or "Error"=TRUE,
the output is set to FALSE again
57/128
Data type
Description
CommandAborted
BOOL
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 9
Fig.1-118:
Input / output variable
Data type
Description
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
(VAR_IN_OUT)
Axis
Fig.1-119:
ErrorID
Description
RESSOURCE_ERROR_CODE
ACCESS_ERROR_CODE
Fig.1-120:
MX_Stop
The firmware function block "MX_Stop" is used to bring the drive to the status
STOP.
Functional Principle
With the rising edge of "Execute" the stopping process is started. "Done" signals
standstill.
Currently running positioning processes go to the status MCFB_ABORTED,
that is they are signaling CommandAborted := TRUE.
With the deceleration value parameterized in "S00372, Drive Halt acceleration
bipolar" the drive is brought to standstill.
With the duration of the TRUE level of "Execute", the drive can be kept in status
STOP; during that time no other motion function block can be started.
The "Execute" input acts on the "AH" signal in a level-oriented way so that the
drive remains in status "AH" and therefore does not allow motion.
When the "Execute" input goes to FALSE again, the drive remains in the PLC
mode "drive-controlled positioning" (with "halt") until it is moved again with an
other function block.
58/128
Library
Range
IndraDrive MPH02
MXMotion_MPH02.lib
IndraDrive MP03
MXMotion_MP03.lib
Fig.1-121:
Library assignment
Fig.1-122:
Input variable
Data type
Description
Execute
BOOL
Fig.1-123:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE (S-0-0331, bit 0=1) the firmware function block signals
that the drive has stopped. Only when the input "Execute" is TRUE is the
output "Done" generated
Active
BOOL
The output "Active" signals with TRUE that the drive has accepted the
command and starts processing. Feedbacks of the operating mode are
valid as of that point of time.
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Fig.1-124:
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for
Function Blocks as of Target "IndraDrive MP03"" on page 9
59/128
Data type
Description
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
(VAR_IN_OUT)
Axis
Fig.1-125:
ErrorID
Description
RESSOURCE_ERROR_CODE
ACCESS_ERROR_CODE
Fig.1-126:
1.7
"Base" Libraries
1.7.1
Introduction
general functions,
axis structures [for multi-axis system (MLD system mode)] are contained.
Target system
IndraDrive MPH02
IndraDrive MP03
IndraDrive MP04
Fig.1-127:
Library
Base_MPH02.lib
Base_MP03.lib
MX_Base.lib
When a new project with an IndraDrive target system is created, the corre
sponding "Base" library is automatically included in the project and visible.
Namespace
All function blocks of the "Base" libraries begin with the prefix "MX_", "MC_" or
"MB_". "MX" represents function blocks which have been specifically program
med for the drive PLC. "MC" represents system-independent, 100-percent
PLCopen function blocks. "MB" represents system-independent function block
with motion-oriented functionalities. "MB" function blocks have not been
PLCopen-certified but are based on this standard.
Functions begin with the prefix "MX_f".
Public data types normally start with "MX_" and are capitalized. Internal data
types start with "INT_MX_" and are capitalized.
1.7.2
General Functions
Overview
ATAN2
MX_fGetFreeTicks
60/128
MX_fGetHighResTime
MX_fHighResTimerTicks_to_us
MX_fGetFreeTicks
The firmware function "MX_fGetFreeTicks" is used to determine the time of the
last PLC time slice still available to the PLC. This PLC time slice is that part of
a millisecond which remains after the drive controller and control tasks have
been processed.
Timer ticks are returned which can be converted into microseconds with the
function "MX_fHighResTimerTicks_to_us".
When a free-running task is active, 0 is always returned in this case
because this task works for the whole time slice.
If "MX_fGetFreeTicks" is called in a task which has a clock slower
than 1 ms, only the available time of the last ms time slice is dis
played.
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Tools
IndraDrive MP03
Base_MP03.lib
Tools
IndraDrive MP04
MX_Base.lib
Tools
Fig.1-128:
Library assignment
Fig.1-129:
Input variable
Data type
Description
Dummy
INT
Fig.1-130:
Return value
Data type
Description
MX_fGetFreeTicks
DINT
Returns timer ticks. The timer ticks can be converted to s with the function
"MX_fHighResTimerTicks_to_us"
Fig.1-131:
MX_fGetHighResTime
The firmware function "MX_fGetHighResTime" returns a growing timer value
with high resolution.
Timer ticks are returned which can be converted into microseconds with the
function "MX_fHighResTimerTicks_to_us".
61/128
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Tools
IndraDrive MP03
Base_MP03.lib
Tools
IndraDrive MP04
MX_Base.lib
Tools
Fig.1-132:
Library assignment
Fig.1-133:
Input variable
Data type
Description
Dummy
INT
Fig.1-134:
Return value
Data type
Description
MX_fGetHighResTime
DINT
Returns timer ticks. The timer ticks can be converted to s with the function
"MX_fHighResTimerTicks_to_us"
Fig.1-135:
MX_fHighResTimerTicks_to_us
The firmware function "MX_fHighResTimerTicks_to_us" is used to convert tim
er ticks to microseconds and return the value as REAL.
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Tools
IndraDrive MP03
Base_MP03.lib
Tools
IndraDrive MP04
MX_Base.lib
Tools
Fig.1-136:
Library assignment
Fig.1-137:
Input variable
Data type
Description
HighResTimerTicks
UDINT
Fig.1-138:
62/128
Data type
Description
MX_fHighResTimerTicks_to_us
REAL
Fig.1-139:
1.7.3
Overview
MB_PreSetMode
MX_Power / MC_Power
MX_Reset / MC_Reset
MX_Command
MX_SetControl
MX_SetDeviceMode
MX_SetOpMode
MB_SetPositionControlMode
MB_PreSetMode
With the function block "MB_PreSetMode" the axis can be prepared for com
mand triggering before power is switched on (PreSetMode / preselecting op
erating modes).
"MB_PreSetMode" already commands the axis with the corresponding data,
but the axis only starts when power is switched on with "MC_Power" and then
directly follows the input values.
"MB_PreSetMode" can only be activated int the operating mode
without power and without error. After activation with a rising "Ex
ecute" edge it is allowed to activate a motion function block (such
as "MC_MoveVelocity") or "MX_SetOpMode".
The following points exemplify a typical sequence when using the function block
"MB_PreSetMode":
1. Switch drive on
2. Switch or wait until drive in operating mode ("bb")
3. Activate "MB_PreSetMode" with rising "Execute" edge
4. Start a motion function block (in "Ab")
5. Switch power on with "MC_Power"
The axis immediately starts moving in the desired way.
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Drive Control
Fig.1-140:
Library assignment
63/128
Fig.1-141:
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-142:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that it has been successfully
processed
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Value
DINT
When the output "Done"=TRUE, "Value" displays the value of the selected
element
*
Fig.1-143:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-144:
"Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
MX_Power / MC_Power
When the internal PLC has permanent or temporary control over the drive, drive
enable can be activated with this function block. Independent of the "Enable"
input, the "Status" output returns the current drive status.
The function block "MX_Power" or "MC_Power" sets the PLC-internal signal
"ON" to TRUE and thereby switches the drive on.
64/128
Library
Range
IndraDrive MPH02
MX_Power
Base_MPH02.lib
Drive Control
IndraDrive MP03
MX_Power
Base_MP03.lib
Drive Control
IndraDrive MP04
MC_Power
MX_Base.lib
Drive Control
Fig.1-145:
Library assignment
Fig.1-146:
Input variable
Data type
Description
Enable
BOOL
Via the "Enable" input drive enable can be set for the drive. For safety reasons,
the input takes effect in edge-controlled form. Drive enable is set with a rising
edge and with a falling edge it is removed again.
Fig.1-147:
Output variable
Data type
Description
Status
BOOL
When the output "Status"=TRUE, drive enable is active and the drive is under
torque. Independent of the "Enable" input, the "Status" output returns the cur
rent drive status. To do this, the combination "drive in control and no error" is
internally checked. Output status := (P115.14 AND P115.15 AND NOT
P115.13).
The "Status" output therefore goes to FALSE in the case of drive errors
Error
BOOL
65/128
Data type
Description
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 9
Fig.1-148:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"MX_Power":
"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 according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-149:
ErrorID
Description
RESSOURCE_ERROR
ACCESS_ERROR
STATE_MACHINE_ERROR
Fig.1-150:
MX_Reset / MC_Reset
The function block "MX_Reset" or "MC_Reset" is used to reset drive errors with
the command "S00099, C0500 Reset class 1 diagnostics".
In order that the function block can correctly complete the reset command it has
to be cyclically called until it signals "Done"=TRUE or "Error" in the case of error.
66/128
Library
Range
IndraDrive MPH02
MX_Reset
Base_MPH02.lib
Drive Control
IndraDrive MP03
MX_Reset
Base_MP03.lib
Drive Control
IndraDrive MP04
MC_Reset
MX_Base.lib
Drive Control
Fig.1-151:
Library assignment
Fig.1-152:
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-153:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error
BOOL
67/128
Data type
Description
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.4.2 "Reference Error Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 9
Fig.1-154:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
"MX_Reset":
"MC_Reset":
"Axis1" (local axis for MLD-S, local axis or only axis for MLD-M)
"Axis2" to "Axis8" correspond to the remote axes. The remote axes con
tained in the list "P-0-1601, CCD: addresses of projected drives" corre
spond to the order according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-155:
ErrorID
Description
RESSOURCE_ER
ROR
ACCESS_ERROR
Fig.1-156:
MX_Command
The function block "MX_Command" is used to execute a drive command.
With the "Enable" input the command is activated or deactivated. If TRUE is
provided at the input, the command is started by writing "3" (dec.). In the case
of FALSE, the command is aborted/terminated by writing "0".
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Drive Control
IndraDrive MP03
Base_MP03.lib
Drive Control
IndraDrive MP04
MX_Base.lib
Drive Control
Fig.1-157:
Library assignment
68/128
Fig.1-158:
Fig.1-159:
69/128
Data type
Description
Enable
BOOL
CmdIdent
DINT
Fig.1-160:
Output variable
Data type
Description
CmdStatus
MX_CMD_STATUS
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error; see chapter 1.4.2 "Reference Error Lists for Function
Blocks as of Target "IndraDrive MP03"" on page 9
Fig.1-161:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
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 according to "Axis2" to "Axis8" ("Axis2" acts on the
drive of list element 0 of P-0-1601)
Fig.1-162:
70/128
Description
EINGANGS_RANGE_ERROR_CODE
ACCESS_ERROR
Fig.1-163:
MX_SetControl
The function block "MX_SetControl" is used to switch control between master
communication and PLC; this makes sense when the axis is first controlled via
a master communication and the internal PLC is to continue controlling the axis
in a certain situation (e.g. error).
When the axis generally is to be moved with the internal PLC, per
manent control should be activated.
With "PLCControl"=TRUE the PLC gets control over the drive , with
"PLCControl"=FALSE the external master communication gets control over the
drive.
The signals "Drive Halt" (AH), "Drive on" (ON) and the operating mode selection
are switched. With PLC control the signals "AH" and "ON" are only operated
internally. The signal "Drive Halt" is controlled by the function block "MX_Stop"
or by stopping the PLC. The signal "ON" can be controlled with the function
block "MX_Power".
If the corresponding function blocks are not used, the internal signals are set
to TRUE.
When switching to temporary control, the internal "ON" signal is set to TRUE.
To switch control and switch off the drive it is first necessary to get control with
"MX_SetControl" and then switch the drive off.
The function block "MX_SetControl" supplies error if permanent
control is already active (setting via "P01367, 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
system "IndraDrive MP04":
71/128
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Drive Control
IndraDrive MP03
Base_MP03.lib
Drive Control
IndraDrive MP04
MX_Base.lib
Drive Control
Fig.1-164:
Library assignment
Fig.1-165:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". All outputs, except
for the output "PLCControlStat", are reset with a falling edge at "Execute".
Independent of "Execute", "PLCControlStat" provides the actual value.
PLCControl
BOOL
With "PLCControl"=TRUE the internal PLC gets temporary control over the drive
at the next 0-1 edge at "Execute".
With "PLCControl"=FALSE control is ceded to the master communication at the
next 0-1 edge at "Execute".
Fig.1-166:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.4.2 "Reference Error Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 9
BOOL
With "PLCControlStat"=TRUE the drive-internal PLC has control over the drive.
With "PLCControlStat"=FALSE the master communication has control over the
drive.
(as of MPx03VRS)
PLCControlStat
Fig.1-167:
72/128
Data type
Description
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
(VAR_IN_OUT)
Axis
Fig.1-168:
ErrorID
Description
RESSOURCE_ER
ROR
ACCESS_ERROR
Fig.1-169:
MX_SetDeviceMode
The function block "MX_SetDeviceMode" is used to switch the drive to the pa
rameter or operating mode.
If switching is not allowed ("P04086, Master communication status", bit 0=0),
the function block returns an error via "Error".
A mode is set by a rising edge of "Execute". Independent of "Execute" the cur
rent status is displayed in the output "ActOperationMode".
During the switching process "MX_SetDeviceMode" should be
called until the output "Done" or the output "Error" becomes TRUE.
Otherwise direct switching might not be possible again, as
"MX_SetDeviceMode" then possibly is not in its initial status.
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Drive Control
IndraDrive MP03
Base_MP03.lib
Drive Control
IndraDrive MP04
MX_Base.lib
Drive Control
Fig.1-170:
Library assignment
Fig.1-171:
73/128
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". All outputs, except
for the output "ActOperationMode", are reset with a falling edge at "Execute".
Independent of "Execute", the current communication phase is displayed at "Ac
tOperationMode".
OperationMode
BOOL
Fig.1-172:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.4.2 "Reference Error Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 9
BOOL
(as of MPx03VRS)
ActOperationMode
Fig.1-173:
Input / output variable
Data type
Description
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
(VAR_IN_OUT)
Axis
Fig.1-174:
ErrorID
Description
RESSOURCE_ER
ROR
ACCESS_ERROR
Fig.1-175:
74/128
MX_SetOpMode
The function block "MX_SetOpMode" is used to directly switch the operating
mode of the drive.
The current operating mode is provided independent of "Execute". The primary
mode of operation corresponds to the value "0" and the secondary operation
modes correspond to the values "1" to "3" for firmware MPH02VRS and "1" to
"7" for MPx03VRS firmwares.
"MX_SetOpMode" is provided for direct control of the drive via its
operating modes and their parameters. The operating mode that
was set is activated in the following position loop cycle.
If after the switching process the drive is moved with "MX_MoveR
elative", for example, an operating mode >3 for MPH02VRS and >7
as of MPx03VRS is implicitly set.
During the switching process "MX_SetOpMode" should be called
until the output "Done" or the output "Error" becomes TRUE. Oth
erwise direct switching might not be possible again, as "MX_Se
tOpMode" then possibly is not in its initial status.
The switching process mustn't be activated by several instances at
the same time!
When the PLCopen profile is used for motion control, "MX_SetOp
Mode" mustn't be used. The secondary PLC operation modes are
not allowed as "NewOpMode" and internally provided for the
PLCopen profile of the PLC.
To be observed as of target system "IndraDrive MP04":
The operating mode mustn't be switched by several instances at the same time.
75/128
Library
Range
IndraDrive MPH02
Base_MPH02.lib
Drive Control
IndraDrive MP03
Base_MP03.lib
Drive Control
IndraDrive MP04
MX_Base.lib
Drive Control
Fig.1-176:
Library assignment
Fig.1-177:
Input variable
Data type
Description
NewOpMode
WORD
Execute
BOOL
The function block is activated with a rising edge at "Execute". All outputs, except
for the output "ActOpMode", are reset with a falling edge at "Execute".
Independent of "Execute", the current communication phase is displayed at "Ac
tOpMode".
Fig.1-178:
Output variable
Data type
Description
ActOpMode
WORD
"ActOpMode" signals which operating mode is active in the drive at drive enable.
The output adopts the value set at "NewOpMode".
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Error
BOOL
76/128
Data type
Description
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.4.2 "Reference Error Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 9
Fig.1-179:
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-180:
ErrorID
Description
RESSOURCE_ERROR
ACCESS_ERROR
INPUT_RANGE_ER
ROR
Fig.1-181:
MB_SetPositionControlMode
The function block "MB_SetPositionControlMode" with the inputs "LaglessPo
sitionControl" and "ExternalEncoder" is used to set the position loop.
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Drive Control
Fig.1-182:
Library assignment
Fig.1-183:
77/128
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". All outputs
are reset with a falling edge at "Execute".
LaglessPositionControl
BOOL
ExternalEncoder
BOOL
Fig.1-184:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the
task has been successfully completed
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-185:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-186:
1.7.4
Overview
MX_fGetDriveWarning
MX_fSetDriveError
MX_fSetDriveWarning
MX_fGetDriveWarning
The firmware function "MX_fGetDriveWarning" allows polling whether a certain
warning diagnosis is active in the drive.
78/128
are checked.
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-187:
Library assignment
Fig.1-188:
Input variable
Data type
Description
WarningNo
DINT
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-189:
Return value
Data type
Description
MX_fGetDriveWarning
BOOL
If the warning to be checked is active in the drive, the function provides TRUE as
return value, otherwise FALSE
Fig.1-190:
MX_fSetDriveError
The firmware function "MX_fSetDriveError" triggers an error diagnosis in the
drive.
Depending on the value at the input "ErrorNo" (1 to 4) the errors
79/128
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-191:
Library assignment
Fig.1-192:
Input variable
Data type
Description
ErrorNo
DINT
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-193:
Return value
Data type
Description
MX_fSetDriveError
BOOL
If the value of "ErrorNo" is within the allowed range (1 to 4), the function provides
TRUE as return value, otherwise FALSE
Fig.1-194:
MX_fSetDriveWarning
The firmware function "MX_fSetDriveWarning" is used to set or clear a warning
diagnosis in the drive.
Depending on the value at the input "WarningNo" (1 to 4) the warning messages
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-195:
Library assignment
80/128
Fig.1-196:
Input variable
Data type
Description
SetWarning
BOOL
WarningNo
DINT
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-197:
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-198:
1.7.5
Overview
MX_fCheckCmdRequest*2
MX_fReadParamDINT
MX_fReadStringParam
MX_fWriteParamDINT
MX_fWriteStringParam
MB_ReadListParameter *2
MB_ReadMaxRealValue *1
MB_ReadMaxValue *1
MB_ReadMinRealValue *1
MB_ReadMinValue *1
MB_ReadName *1
MB_ReadParameter *1
MB_ReadRealParameter *1
MB_ReadSercosAttribute *1
MB_ReadSercosDataStatus*2
MB_ReadStringParameter *2
MB_ReadUnit *1
MB_WriteListParameter *2
MB_WriteParameter *1
MB_WriteRealParameter *1
81/128
MB_WriteStringParameter *2
MX_ReadParamDINT
MX_SetCmdState *2
MX_WriteParamDINT
*1
MX_fCheckCmdRequest
The firmware function "MX_fCheckCmdRequest" is used to return the com
mand input which was preset via the drive parameter "P01449, C4900 PLC
command".
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Fig.1-199:
Library assignment
Fig.1-200:
Input variable
Data type
Description
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-201:
Return value
Data type
Description
MX_fCheckCmdRequest
MX_CMD_REQUEST
Fig.1-202:
MX_fReadParamDINT
The firmware function "MX_fReadParamDINT" is used to read a parameter
value and return it as DINT.
With this function it is at first impossible to recognize whether the reading of the
parameter was successful or not. The function block "MX_ReadParamDINT" is
suited for this purpose.
For unsigned parameters with 32 bits the return value can simply be converted
with the function "DINT_TO_UDINT".
82/128
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-203:
Library assignment
Fig.1-204:
Input variable
Data type
Description
Ident
DINT
At the input "Ident" apply the IDN of the parameter the value of which is to be
read (e.g. FP_S_0_0052)
ListElem
INT
It is possible to read the value of a single parameter, but also the values of list
parameters.
To read a single parameter, apply "0" to "ListElem". For list parameters, the zeroth
element is read with "0", the first element with "1", the second element with "2", ...
With "-1" at "ListElem" it is the actual length, with "-2" it is the maximum length of
a list parameter which is read
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-205:
Return value
Data type
Description
MX_fReadParamDINT
DINT
Provides the value of the element specified with "Ident" and "ListElem".
Note: "0" is returned if the parameter or list element cannot be read
Fig.1-206:
MX_fReadStringParam
With the firmware function "MX_fReadStringParam" it is possible to read a pa
rameter the operating data of which has the ASCII format (string).
In addition to "MaxLen" a closing 0-character is copied. The return
value returns the characters actually read (without 0).
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-207:
Library assignment
83/128
Fig.1-208:
Input variable
Data type
Description
Ident
DINT
Text
STRING(255)
MaxLen
INT
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-209:
Return value
Data type
Description
MX_fReadStringParam
INT
Fig.1-210:
MX_fWriteParamDINT
The firmware function "MX_fWriteParamDINT" is used to write data to a pa
rameter.
It is possible to write in unbuffered or buffered form.
In the case of buffered writing, the parameter values every time are
transferred to the non-volatile memory. As this takes much calcu
lating time, data should only be written in buffered form if necessary.
For list parameters only the last write access should take place with
"WriteBuffered"=TRUE, as the entire list is buffered at each access.
While a parameter is buffered, another access with buffering will fail
(ACCESS_ERROR).
With this function it is at first impossible to recognize whether the writing of the
parameter was successful or not. The function block "MX_WriteParamDINT" is
suited for this purpose.
For unsigned parameters with 32 bits the input value "Value" can simply be
converted with the function "UDINT_TO_DINT".
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-211:
Library assignment
84/128
Fig.1-212:
Input variable
Data type
Description
Ident
DINT
ListElem
INT
Value
INT
WriteBuffered
BOOL
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-213:
Return value
Data type
Description
MX_fWriteParamDINT
BOOL
Fig.1-214:
MX_fWriteStringParam
The firmware function "MX_fWriteStringParam" is used to write data to a text
parameter.
It is possible to write in unbuffered or buffered form.
In the case of buffered writing, the parameter values every time are
transferred to the non-volatile memory. As this takes much calcu
lating time, data should only be written in buffered form if necessary.
While a parameter is buffered, another access with buffering will fail
(ACCESS_ERROR).
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-215:
Library assignment
85/128
Fig.1-216:
Input variable
Data type
Description
Ident
DINT
Text
STRING(255)
Text string
WriteBuffered
BOOL
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-217:
Return value
Data type
Description
MX_fWriteStringParam
INT
Fig.1-218:
MB_ReadListParameter
With the function block "MB_ReadListParameter" it is possible to read the cur
rent value of a list parameter.
The function block "MB_ReadListParameter" can work on the local
axis ("Axis1") and via SERCOS III on remote axes ("Axis2", "Ax
is3", ...).
The IDN of the list parameter to be read has to be applied at the input "Param
eterNumber". The number of bytes to be read has to be indicated at the input
"NoOfBytes". The processing of the function block is started with a rising edge
at the input "Execute" ("Execute"=TRUE).
To test the function block "MB_ReadListParameter" the instance
variable "ActivateCounter" can be used. It counts the positive edges
of the "Execute" signal and thereby signals whether the function
block is run with edge.
Local Axis
When the function block is used for a local axis, all list elements of the selected
parameter are immediately read when the function block is called. After the list
elements have been read, the control goes back to the program and TRUE is
provided at the output "Done".
86/128
When the function block is used for remote axes, the read request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the amount of
data.
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Fig.1-219:
Library assignment
Fig.1-220:
Input variable
Data type
Description
Enable
BOOL
ParameterNumber
DINT
NoOfBytes
UINT
ValueAdr
POINTER TO BYTE At the input "ValueAdr" indicate the initial address of the field to which the bytes
that have been read are to be written.
Example: ValueAdr := ADR(arFeld1)
Fig.1-221:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the cyclic reading of the data
value of the parameter was successful
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
87/128
Data type
Description
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
NoOfRecBytes
UINT
The output "NoOfRecBytes" signals how many bytes were actually read
*
Fig.1-222:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-223:
MB_ReadMaxRealValue
With the function block "MB_ReadMaxRealValue" it is possible to read the
maximum allowed value of a parameter. The value is returned in REAL format.
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-224:
Library assignment
Fig.1-225:
88/128
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-226:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
MaxValue
REAL
Fig.1-227:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-228:
MB_ReadMaxValue
With the function block "MB_ReadMaxValue" it is possible to read the maximum
allowed value of a parameter. The value is returned in DINT format.
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-229:
Library assignment
89/128
Fig.1-230:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-231:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
MaxValue
DINT
Fig.1-232:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
90/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-233:
MB_ReadMinRealValue
With the function block "MB_ReadMinRealValue" it is possible to read the min
imum allowed value of a parameter. The value is returned in REAL format.
Target system
Library
Area
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-234:
Library assignment
Fig.1-235:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-236:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
91/128
Data type
Description
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
MinValue
REAL
Fig.1-237:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-238:
MB_ReadMinValue
With the function block "MB_ReadMinValue" it is possible to read the minimum
allowed value of a parameter. The value is returned in DINT format.
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-239:
Library assignment
92/128
Fig.1-240:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-241:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
MinValue
DINT
Fig.1-242:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
93/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-243:
MB_ReadName
With the function block "MB_ReadName" it is possible to read the name of a
parameter.
At the input "ParameterNumber" you have to apply the parameter number of
the parameter the name of which is to be read. The processing of the function
block is started with a rising edge at the "Execute" input. Error-free processing
is signaled by "Done"=TRUE. Incorrect processing is signaled by
"Error"=TRUE. In the case of error, a detailed description of the error is output
at the outputs "ErrorID" and "ErrorIdent".
Target system
Library
Area
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-244:
Library assignment
Fig.1-245:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-246:
94/128
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Name
STRING(255)
Fig.1-247:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-248:
MB_ReadParameter
With the function block "MB_ReadParameter" it is possible to read the current
value of a parameter. The return value is DINT.
With the function block "MB_ReadParameter", the input variables
are only applied with a 0-1 edge at the "Enable" input.
List and string parameters cannot be read with the function block.
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
Drive Control / Pa
rameter
IndraDrive MP04
MX_Base.lib
Drive Control / Pa
rameter
Fig.1-249:
Library assignment
95/128
Fig.1-250:
Input variable
Data type
Description
Enable
BOOL
ParameterNumber
DINT
Fig.1-251:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Value
DINT
Fig.1-252:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
96/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-253:
MB_ReadRealParameter
With the function block "MB_ReadRealParameter" it is possible to read the
current value of a parameter. The return value is REAL.
List and string parameters cannot be read with the function block
"MB_ReadRealParameter".
When parameters of remote axes are read, the scaling is carried out according
to the setting of the master which can be wrong. This is probably corrected in
MPx04V08.
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
Drive Control / Pa
rameter
IndraDrive MP04
MX_Base.lib
Drive Control / Pa
rameter
Fig.1-254:
Library assignment
Fig.1-255:
97/128
Data type
Description
Enable
BOOL
ParameterNumber
DINT
At the input "ParameterNumber" apply the IDN of the parameter the current
value of which is to be read.
Any new parameter number will only be applied with the next positive edge at
the "Enable" input
Fig.1-256:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Value
REAL
Fig.1-257:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-258:
MB_ReadSercosDataStatus
With the function block "MB_ReadSercosDataStatus" it is possible to read the
status of a parameter.
At the input "ParameterNumber" you have to apply the parameter number of
the parameter the status of which is to be read.
List and string parameters cannot be read with the function block.
Error-free processing is signaled by "Done"=TRUE. Incorrect processing is sig
naled by "Error"=TRUE. In the case of error, a detailed description of the error
is output at the outputs "ErrorID" and "ErrorIdent".
98/128
Area
IndraDrive MP04
MB_ReadSercosDa MX_Base.lib
taStatus
Drive Control / Pa
rameter
Fig.1-259:
Library assignment
Fig.1-260:
Input variable
Data type
Description
Enable
BOOL
The function block is status-controlled. The input variables are applied with the
positive edge of "Enable". New input values only take effect via the repeated
positive edge of "Enable".
ParameterNumber
DINT
Fig.1-261:
Output varia
ble
Data type
Description
Done
BOOL
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has
accepted the processing command, for single axes this output is not
set!
Error
BOOL
ErrorID *
ERROR_CODE
99/128
Data type
Description
ErrorIdent *
ERROR_STRUCT
Status
MB_SERCOS_DATA_STATUS
Fig.1-262:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-263:
MB_ReadSercosAttribute
With the function block "MB_ReadSercosAttribute" it is possible to read the
SERCOS attribute of a parameter.
At the input "ParameterNumber" you have to apply the parameter number of
the parameter the SERCOS attribute of which is to be read. The processing of
the function block is started with a rising edge at the "Execute" input. Error-free
processing is signaled by "Done"=TRUE. Incorrect processing is signaled by
"Error"=TRUE. In the case of error, a detailed description of the error is output
at the outputs "ErrorID" and "ErrorIdent".
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
Drive Control / Pa
rameter
IndraDrive MP04
MX_Base.lib
Drive Control / Pa
rameter
Fig.1-264:
Library assignment
100/128
Fig.1-265:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-266:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the cyclic reading of the
SERCOS attribute is successfully running
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Attribute
DWORD
Fig.1-267:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
101/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-268:
MB_ReadUnit / MX_ReadUnit
With the function block "MB_ReadUnit" or "MX_ReadUnit" it is possible to read
the unit of a parameter.
At the input "ParameterNumber" you have to apply the parameter number of
the parameter the unit of which is to be read. The processing of the function
block is started with a rising edge at the "Execute" input. Error-free processing
is signaled by "Done"=TRUE. Incorrect processing is signaled by
"Error"=TRUE. In the case of error, a detailed description of the error is output
at the outputs "ErrorID" and "ErrorIdent".
Target system
Library
Range
IndraDrive MP03
MX_ReadUnit
Base_MP03.lib
IndraDrive MP04
MB_ReadUnit
MX_Base.lib
Fig.1-269:
Library assignment
Fig.1-270:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-271:
102/128
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Unit
DINT
Fig.1-272:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-273:
MB_ReadStringParameter
With the function block "MB_ReadStringParameter" it is possible to read a pa
rameter the operating data of which has the ASCII format (string).
The function block "MB_ReadStringParameter" can work on the lo
cal axis ("Axis1") and via SERCOS III on remote axes ("Axis2",
"Axis3", ...).
At the input "ParameterNumber" you have to apply the parameter number of
the parameter the operating data of which is to be read. The processing of the
function block is started with a rising edge at the "Execute" input.
To test the function block the instance variable "ActivateCounter"
can be used. It counts the positive edges of the "Execute" signal
and thereby signals whether the function block is run with edge.
Local Axis
When the function block is used for a local axis, all characters of the selected
ASCII parameter are immediately read when the function block is called.
Remote Axes
When the function block is used for remote axes, the read request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
103/128
Library
Range
IndraDrive MP04
MX_Base.lib
Drive Control / Pa
rameter
Fig.1-274:
Library assignment
Fig.1-275:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Fig.1-276:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Value
STRING(255)
Fig.1-277:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
104/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-278:
MB_WriteParameter
With the function block "MB_WriteParameter" it is possible to write a defined
value to a parameter. To do this, at the input "ParameterNumber" you have to
apply the parameter number of the parameter the value of which is to be written.
The value which is to be written to the parameter has to be applied at the input
"Value" and be of type DINT.
List and string parameters cannot be written with "MB_WritePara
meter".
According to the scaling, the parameter has decimal places which
have to be taken into account and used for calculation
Storage behavior of "MB_WriteParameter" in "IndraDrive MP03"
and "IndraDrive MP04" with local axes: Parameter changes are
generally written in unbuffered form! Subsequent storage in the in
ternal memory or on the MMC is only possible via "S-0-0293, C2400
Selectively backup working memory procedure command".
Storage behavior of "MB_WriteParameter" in "IndraDrive MP04" as
of version 10 with remote axes: Depending on parameter
"S00269, Storage mode", the changed parameter value is stored
in the device-internal, non-volatile memory ("flash") or on the Mul
tiMediaCard (MMC), either immediately or by executing the com
mand "S00264, C2200 Backup working memory procedure
command".
When the function block is frequently executed, set "S00269, Storage mode"
in such a way that changed parameter values are only stored by executing the
command "S00264, C2200 Backup working memory procedure command" in
the device-internal, non-volatile memory ("flash") or on the MultiMediaCard
(MMC).
To test the function block "MB_WriteParameter" the instance vari
able "ActivateCounter" can be used. It counts the positive edges of
the "Execute" signal and thereby signals whether the function block
is run with edge.
105/128
Library
Range
IndraDrive MP03
Base_MP03.lib
Drive Control / Pa
rameter
IndraDrive MP04
MX_Base.lib
Drive Control / Pa
rameter
Fig.1-279:
Library assignment
Fig.1-280:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Value
DINT
At the input "Value", apply the value which is to be written to the parameter.
Take the scaling of the selected parameter into account
Fig.1-281:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-282:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
106/128
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-283:
MB_WriteListParameter
With the function block "MB_WriteListParameter" it is possible to write defined
values to a list parameter.
The function block "MB_WriteListParameter" can work on the local
axis ("Axis1") and via SERCOS III on remote axes ("Axis2", "Ax
is3", ...).
The IDN of the list parameter to be written has to be applied at the input "Pa
rameterNumber".
Depending on parameter "S00269, Storage mode", the changed
parameter value is stored in the device-internal, non-volatile mem
ory ("flash") or on the MultiMediaCard (MMC), either immediately
or by executing the command "S00264, C2200 Backup working
memory procedure command".
CAUTION
When the function block is used for a local axis, all list elements of the applied
array are immediately written when the function block is called. After that the
control goes back to the program and TRUE is provided at the output "Done".
107/128
When the function block is used for remote axes, the write request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several seconds, depending on the amount of
data.
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Fig.1-284:
Library assignment
Fig.1-285:
Input variable
Data type
Description
Enable
BOOL
ParameterNumber
DINT
At the input "ParameterNumber", apply the IDN of the list parameter to be writ
ten
NoOfBytes
UINT
ValueAdr
POINTER TO BYTE At the input "ValueAdr" indicate the initial address of the field to which the bytes
that have been read are to be written.
Example: ValueAdr := ADR(arFeld1)
Fig.1-286:
108/128
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-287:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-288:
MB_WriteRealParameter
With the function block "MB_WriteRealParameter" you can write a defined val
ue to the parameter belonging to the parameter number. The value which is to
be written to the parameter must be of type REAL.
Storage behavior of "MB_WriteRealParameter" in "IndraDrive
MP03" and "IndraDrive MP04" with local axes: Parameter changes
are generally written in unbuffered form! Subsequent storage in the
internal memory or on the MMC is only possible via "S-0-0293,
C2400 Selectively backup working memory procedure command".
Storage behavior of "MB_WriteRealParameter" in "IndraDrive
MP04" as of version 10 with remote axes: Depending on parameter
"S00269, Storage mode", the changed parameter value is stored
in the device-internal, non-volatile memory ("flash") or on the Mul
tiMediaCard (MMC), either immediately or by executing the com
mand "S00264, C2200 Backup working memory procedure
command".
109/128
CAUTION
List and string parameters cannot be written with the function block
"MB_WriteRealParameter". For writing list parameters please use
the function block "MB_WriteListParameter".
CAUTION
Target system
Library
Range
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-289:
Library assignment
Fig.1-290:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
At the input "ParameterNumber", apply the IDN of the list parameter to be writ
ten
Value
REAL
At the input "Value", apply the value which is to be written to the parameter.
Take the scaling of the selected parameter into account
Fig.1-291:
110/128
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-292:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-293:
MB_WriteStringParameter
With the function block "MB_WriteStringParameter" it is possible to write a pa
rameter the operating data of which has the ASCII format (string).
Depending on parameter "S00269, Storage mode", the changed
parameter value is stored in the device-internal, non-volatile mem
ory ("flash") or on the MultiMediaCard (MMC), either immediately
or by executing the command "S00264, C2200 Backup working
memory procedure command".
When the function block is frequently executed, set "S00269, Storage mode"
in such a way that changed parameter values are only stored by executing the
command "S00264, C2200 Backup working memory procedure command" in
the device-internal, non-volatile memory ("flash") or on the MultiMediaCard
(MMC).
The function block "MB_WriteStringParameter" can work on the lo
cal axis ("Axis1") and via SERCOS III on remote axes ("Axis2",
"Axis3", ...).
111/128
When the function block is used for a local axis, all characters of the selected
ASCII parameter are immediately written when the function block is called.
Remote Axes
When the function block is used for remote axes, the write request is ceded to
the service channel (SERCOS III). Only at a later call can the function block
signal "Done".
The outputs "Done", "Active" and "Error" have to be cyclically polled.
The data transmission can take several milliseconds, depending on the text
length.
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Fig.1-294:
Library assignment
Fig.1-295:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". With a falling
edge, all outputs are reset
ParameterNumber
DINT
Value
STRING(255)
At the input "Value", apply the value which is to be written to the ASCII pa
rameter.
Fig.1-296:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted
the processing command, for single axes this output is not set!
112/128
Data type
Description
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-297:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
Input / output variable
Data type
Description
AXIS_REF
(VAR_IN_OUT)
Axis
Fig.1-298:
MX_ReadParamDINT
The function block "MX_ReadParamDINT" is used to read a parameter value
and return it as DINT.
Among other things, the function block gives a feedback as to whether the
reading was successful.
For unsigned parameters with 32 bits the return value can be converted with
the function "DINT_TO_UDINT".
Target system
Library
Range
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-299:
Library assignment
113/128
Fig.1-300:
Input variable
Data type
Description
Enable
BOOL
The function block is activated with "Enable"=TRUE. All outputs are reset with
"Enable"=FALSE
Ident
DINT
ListElem
INT
List element number: for list parameters starting with "0" and for single parameter
always "0"
"-1" for reading the actual length (only allowed for list parameters)
"-2" for reading the maximum length (only allowed for list parameters)
Fig.1-301:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted the
processing command, for single axes this output is not set!
Error
BOOL
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.4.2 "Reference Error Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 9
DINT
When the output "Done"=TRUE, "Value" displays the value of the selected ele
ment
(as of MPx03VRS)
Value
Fig.1-302:
114/128
Data type
Description
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
(VAR_IN_OUT)
Axis
Fig.1-303:
ErrorID
Description
RESSOURCE_ERROR
ACCESS_ERROR
INPUT_RANGE_ERROR
Fig.1-304:
MX_SetCmdState
With the firmware function block "MX_SetCmdState" it is possible to set the
command status of "P01449, C4900 PLC command".
Target system
Library
Range
IndraDrive MP04
MX_Base.lib
Fig.1-305:
Library assignment
Fig.1-306:
Input variable
Data type
Description
Enable
BOOL
CmdStatus
MX_CMD_STATUS
At the input "CmdStatus", the following values can be transmitted to the func
tion block:
115/128
Data type
Description
DiagNo
DINT
Axis
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
Fig.1-307:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task
has been successfully completed
Error
BOOL
ErrorID *
ERROR_CODE
ErrorIdent *
ERROR_STRUCT
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the
exact cause of the error
Fig.1-308:
NOTE: Here you can find the list of all possible errors: chapter 1.4.2
"Reference Error Lists for Function Blocks as of Target "IndraDrive
MP03"" on page 9
MX_WriteParamDINT
The firmware function block "MX_WriteParamDINT" is used to write a param
eter. It is possible to write in unbuffered or buffered form.
In the case of buffered writing, the parameter values every time are
transferred to the non-volatile memory. As this takes much calcu
lating time, data should only be written in buffered form if necessary.
For list parameters only the last write access should take place with
"WriteBuffered"=TRUE, as the entire list is buffered at each access.
While a parameter is buffered, another access with buffering will fail
(ACCESS_ERROR).
For unsigned parameters with 32 bits the input value "Value" can simply be
converted with the function "UDINT_TO_DINT".
Target system
Library
Area
IndraDrive MPH02
Base_MPH02.lib
IndraDrive MP03
Base_MP03.lib
IndraDrive MP04
MX_Base.lib
Fig.1-309:
Library assignment
116/128
!Changes
Fig.1-310:
Input variable
Data type
Description
Execute
BOOL
The function block is activated with a rising edge at "Execute". All outputs are
reset with a falling edge at "Execute".
BOOL
Ident
DINT
ListElem
INT
With the input "ListElem" you have to specify the element which is to be written.
(as of MPx03VRS)
Enable
(only MPH02VRS)
DINT
At the input "Value", apply the value which is to be written to the parameter. Take
the scaling of the selected parameter into account. According to the scaling, the
parameter has decimal places which have to be taken into account and used for
calculation
WriteBuffered
BOOL
Fig.1-311:
Output variable
Data type
Description
Done
BOOL
With "Done"=TRUE the function block signals that the processing of the task has
been successfully completed
Active
BOOL
For remote axes, "Active"=TRUE signals that the function block has accepted the
processing command, for single axes this output is not set!
Error
BOOL
117/128
Data type
Description
ErrorID
ERROR_CODE
ErrorIdent
ERROR_STRUCT
(as of MPx03VRS)
Via the elements Table, Additional1 and Additional2, "ErrorIdent" gives the exact
cause of the error; see chapter 1.4.2 "Reference Error Lists for Function Blocks
as of Target "IndraDrive MP03"" on page 9
Fig.1-312:
Input / output variable
Data type
Description
AXIS_REF
Axis number (only the global variable "Axis1" can be transmitted here)
(VAR_IN_OUT)
Axis
Fig.1-313:
ErrorID
Description
RESSOURCE_ERROR
ACCESS_ERROR
INPUT_INVALID_ERROR
Fig.1-314:
1.8
"CommonTypes" Library
The following libraries contain data types and structures most of which are only
used internally:
Target system
Library
IndraDrive MPH02
CommonTypes.lib
IndraDrive MP03
CommonTypes_MP03.lib
IndraDrive MP04
RIL_CommonTypes.lib
Fig.1-315:
The sections below only describe the data types and structures relevant to the
user.
Data Type "ERROR_CODE"
118/128
Error number as of
IndraDrive MP03
NONE_ERROR
16#0000
Error-free status
NONE_ERROR_CODE
Error-free status
INPUT_INVALID_ERROR
16#0001
INPUT_INVALID_ERROR_CODE
COMMUNICATION_ERROR
16#0002
COMMUNICATION_ERROR_CODE
RESOURCE_ERROR
16#0003
RESOURCE_ERROR_CODE
ACCESS_ERROR
16#0004
ACCESS_ERROR_CODE
STATE_MACHINE_ERROR
16#0005
INPUT_RANGE_ERROR
16#0006
INPUT_RANGE_ERROR_CODE
CALCULATION_ERROR
16#0007
CALCULATION_ERROR
DEVICE_ERROR
16#0008
OTHER_ERROR
16#7FFE
OTHER_ERROR_CODE
254
SYSTEM_ERROR
16#7FFF
SYSTEM_ERROR_CODE
255
Fig.1-316:
Structure "ERROR_STRUCT"
119/128
Table
"Table" is of the ENUM type. The ENUM value refers to the list required
for identifying the specific error of "Additional1".
Additional1
"Additional1" is of the DWORD type. "Additional1" contains the specific
error number and can be used in conjunction with "Additional2" in different
ways, depending on the system.
Additional2
"Additional2" is of the DWORD type. "Additional2" can contain additional
information. Its content differs depending on the system.
1.9
1.9.1
General Information
The following libraries contain the function block "MX_SynchronControl"; with
"MX_SynchronControl" you can realize the consistent data exchange via the
real-time channel:
Target system
Library
Range
IndraDrive MPH02
DSP_MPH02.lib
RTC Control
IndraDrive MP03
DSP_MP03.lib
RTC Control
IndraDrive MP04
MX_DSP.lib
RTC Control
Fig.1-317:
1.9.2
MX_SynchronControl
Control of the real-time channel (e.g. delay when writing command values)
task structure
120/128
Control whether a watchdog was present (MDT data were not calculated
in time - task took too long)
For example, if a virtual master axis generator is to be realized, the drive has
to correctly process the cyclic command value - in this case the virtual master
axis position ; two conditions must have been fulfilled for this purpose.
1. The command value input clock must correspond to the NC cycle time.
The cycle time of the controller task or the NC cycle time must be accord
ingly adjusted.
If the RTC task has not been processed by the point of time at
which the RTcW command values are to be written, these
command values are not taken into account. If these com
mand values fail twice in succession, "F4016 PLC double realtime channel failure" is generated (as of IndraDrive MP03).
2. The drive must have been internally synchronized.
With the target version IndraDrive MPH02, only the SERCOS
master communication synchronizes the drive internally.
As of target version IndraDrive MP03, the functionality of
"MX_SynchronControl" has been extended in such a way that
MLD-S can synchronize the drive internally, too, when no
master communication is able to do this; the input "SyncDrive"
and the output "DriveIsSync" are used for this purpose.
121/128
Fig.1-318:
122/128
Data type
CmdDelay
INT
Description
The input "CmdDelay" determines after which time the RTC variables are
(as of IndraDrive MP03) to be written.
With firmware of the "MPH" type (High Performance), the following values
WORD
can be written to the input:
(IndraDrive MPH02)
"-1" (only allowed as of target version IndraDrive MP03; default value as
of MPx03VRS): the command values are transmitted at the latest possible
point of time (corresponds to first position loop interrupt after RTC task
cycle time 500 s)
"0" (default value for IndraDrive MPH02): the command values are trans
mitted at the earliest possible point of time (first position loop interrupt
after 500 s after beginning of RTC task)
Other values: "0" to ""cycle time of RTC task"1 ms"
Summarized: the command values are applied with the next position loop
interrupt after beginning of RTC task+CmdDelay [ms]+500 s
With firmware of the "MPB" type (Low Performance), the following values
can be written to the input:
"-1" (only allowed as of target version IndraDrive MP03; default value as
of MPx03VRS): the command values are transmitted at the latest possible
point of time (corresponds to first position loop interrupt after RTC task
cycle time 1 ms)
"0" (default value for IndraDrive MPH02): the command values are trans
mitted at the earliest possible point of time (first position loop interrupt
after 1 ms after beginning of RTC task)
Other values: "0" to ""cycle time of RTC task"2 ms"
Note: If an odd pos. number of ms is input for "CmdDelay", this value is
internally increased by 1 ms.
Summarized: the command values are applied with the next position loop
interrupt after beginning of RTC task+CmdDelay [ms]+1 ms
Enable
BOOL
SyncDrive
BOOL
You might want to have the drive internally synchronized by MLD-S; this
is the case when the master communication used currently is not able to
do this and MLD-S is to input cyclic command values, which the drive is
to process within one command value input clock, for the drive in equi
distant form.
BOOL
With a positive edge at the input "StatReset", the statistics outputs "Rest
TicksMin", "RestTicksMax", "RestTimeMin", "RestTimeMax" and
"CmdWdg" are reset to their initial value
Fig.1-319:
123/128
Data type
Description
DriveIsSync
BOOL
With TRUE at the output, the function block signals that MLD-S internally
synchronizes the drive; only takes effect in conjunction with the input
"SyncDrive"
Error
BOOL
ErrorID
ERROR_CODE (as of
IndraDrive MP03)
WORD
(IndraDrive MPH02)
For the target version IndraDrive MPH02, the output "ErrorID" is of the
WORD type. In the case of error, the error code is output here.
ErrorIdent (as of
MPx03VRS)
ERROR_STRUCT
CmdWdg
BOOL
"CmdWdg"=TRUE means that the RTC task had not been processed at
the point of time at which the RTcW were supposed to be transmitted
RestTicksAct
UDINT
RestTicksMin
UDINT
RestTicksMax
UDINT
RestTimeAct
UINT
RestTimeMin
UINT
RestTimeMax
UINT
Fig.1-320:
ErrorID
ErrorIdent,
ErrorIdent,
Table
Additional1
MLDS_TABLE
16#00000002
MLDS_TABLE
16#00000250
MLDS_TABLE
16#00000251
MLDS_TABLE
16#00000254
INPUT_RANGE_ERROR
MLDS_TABLE
16#00000252
CALCULATION_ERROR
MLDS_TABLE
16#00000255
MLDS_TABLE
16#00000256
INDRV_TABLE
16#000F4016
RESOURCE_ERROR
DEVICE_ERROR
Fig.1-321:
Description
ErrorID
Description
Too many real-time variables defined (maximum 4 command values and 4 actual values)
124/128
Description
There is more than one instance of the function block MX_SynchronControl existing
The value at the input "CmdDelay" is greater than or equal to the task cycle time
Fig.1-322:
1.9.3
Notes on Programming
In preparation
1.10
The functions of this library are required for internal test purposes and
the user mustn't use them!
CAUTION
1.11
Library
IndraDrive MP03
CheckRtv_MP03.lib
IndraDrive MP04
MX_CheckRtv.lib
Fig.1-323:
Wen a new project with the target system "IndraDrive" target system is created,
the corresponding library is automatically included and visible. Exception: The
target system IndraDrive MPH02 which does not require the "CheckRtv" library.
The functions of the "CheckRtv" library are implicitly called by the
PLC program and mustn't be included in a user program!
Operating Principle
The functions of the "CheckRtv" library are called at each corresponding action
(e.g. division) and check the access. If access is allowed, the program runs
without restriction. If access is not allowed, a drive error (F6010) is generated
and the PLC is stopped.
See also "Notes on Use" in the Application Manual on Rexroth IndraMotion
MLD.
Functions
CheckBounds
CheckDivByte
125/128
1.12
CheckDivDWord
CheckDivReal
CheckDivWord
CheckRangeSigned
CheckRangeUnsigned
Library
IndraDrive MPH02
Internal_MPH02.lib
IndraDrive MP03
Internal_MP03.lib
IndraDrive MP04
MX_Internal.lib
Fig.1-324:
127/128
Index
Index
C
CheckBounds 124
CheckDivByte 124
CheckDivDWord 125
CheckDivReal 125
CheckDivWord 125
CheckRangeSigned 125
CheckRangeUnsigned 125
CheckRtv 124
Error 9
ERROR_CODE 9
ERROR_STRUCT 9
Error handling 8
ErrorID 9
ErrorIdent 9
INDRV_TABLE 12
Input signals "Execute" / "Enable" 3
Internal_MP03.lib 125
Internal_MPH02.lib 125
Internal data types 125
Internal function blocks 125
Internal functions 125
Internal structures 125
Library
CommonTypes 117
Debug 124
MB_ChangeProfileStep 14
MB_GearInPos 16
MB_Phasing 21
MB_PhasingSlave 23
MB_PreSetMode 62
MB_ReadListParameter 85
MB_ReadMaxRealValue 87
MB_ReadMaxValue 88
MB_ReadMinRealValue 90
MB_ReadMinValue 91
MB_ReadName 93
MB_ReadParameter 94
MB_ReadRealParameter 96
MB_ReadSercosAttribute 99
MB_ReadSercosDataStatus 97
MB_ReadStringParameter 102
MB_ReadUnit 101
MB_SetPositionControlMode 76
MB_Stop 25
MB_WriteListParameter 106
MB_WriteParameter 104
MB_WriteRealParameter 108
MB_WriteStringParameter 110
MC_CamIn 27
MC_CamOut 30
MC_GearIn 31
MC_GearOut 33
MC_MoveAbsolute 34
MC_MoveAdditive 36
MC_MoveRelative 39
MC_MoveVelocity 44
MC_Power 63
MC_Reset 65
MC_Stop 41
Means of representation
Conventions of notation 1
Notations 1
Notes 1
MLD_TABLE 9
MLDS_TABLE 9
MX_Command 67
MX_fCheckCmdRequest 81
MX_fGetDriveWarning 77
MX_fGetFreeTicks 60
MX_fGetHighResTime 60
MX_fHighResTimerTicks_to_us 61
MX_fReadParamDINT 81
MX_fReadStringParam 82
MX_fSetDriveError 78
MX_fSetDriveWarning 79
MX_fWriteParamDINT 83
MX_fWriteStringParam 84
MX_Internal.lib 125
MX_MoveAbsolute 46
MX_MoveAdditive 49
MX_MoveRelative 52
MX_MoveVelocity 55
MX_Power 63
MX_ReadParamDINT 112
MX_ReadUnit 101
MX_Reset 65
MX_SetCmdState 114
MX_SetControl 70
MX_SetDeviceMode 72
MX_SetOpMode 74
MX_Stop 57
MX_SynchronControl 120
MX_WriteParamDINT 115
128/128
Index
SERCOS_TABLE 12
Tools 59
Notes
Bosch Rexroth AG
Electric Drives and Controls
P.O. Box 13 57
97803 Lohr, Germany
Bgm.-Dr.-Nebel-Str. 2
97816 Lohr, Germany
Phone +49 (0)93 52-40-50 60
Fax
+49 (0)93 52-40-49 41
[email protected]
www.boschrexroth.com
R911309224
Printed in Germany
DOK-INDRV*-MLD-SYSLIB*-FK02-EN-P