Professional Documents
Culture Documents
___________________
Preface
1
___________________
Introduction
SIMOTION
PLCopen Blocks
Function Manual
02/2012
2
___________________
Description
___________________
3
Blocks
Troubleshooting PLCopen
4
___________________
blocks
Legal information
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the relevant information is not taken into account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Trademarks
All names identified by are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
Siemens AG
Industry Sector
Postfach 48 48
90026 NRNBERG
GERMANY
Preface
SIMOTION Documentation
An overview of the SIMOTION documentation can be found in a separate list of references.
This documentation is included as electronic documentation in the scope of delivery of
SIMOTION SCOUT. It comprises 10 documentation packages.
The following documentation packages are available for SIMOTION V4.3:
SIMOTION Engineering System
SIMOTION System and Function Descriptions
SIMOTION Service and Diagnostics
SIMOTION IT
SIMOTION Programming
SIMOTION Programming - References
SIMOTION C
SIMOTION P
SIMOTION D
SIMOTION Supplementary Documentation
My Documentation Manager
Click the following link for information on how to compile documentation individually on the
basis of Siemens content and how to adapt this for the purpose of your own machine
documentation:
http://www.siemens.com/mdm
PLCopen Blocks
Function Manual, 02/2012
Preface
Training
Click the following link for information on SITRAIN - Siemens training courses for automation
products, systems and solutions:
http://www.siemens.com/sitrain
FAQs
Frequently Asked Questions can be found in SIMOTION Utilities & Applications, which are
included in the scope of delivery of SIMOTION SCOUT, and in the Service&Support pages
in Product Support:
http://support.automation.siemens.com
Technical support
Country-specific telephone numbers for technical support are provided on the Internet under
Contact:
http://www.siemens.com/automation/service&support
PLCopen Blocks
Table of contents
Preface ...................................................................................................................................................... 3
1
Introduction.............................................................................................................................................. 11
Description............................................................................................................................................... 13
2.1
2.2
Blocks ...................................................................................................................................................... 19
3.1
3.1.1
3.1.2
3.2
3.2.1
3.2.1.1
3.2.1.2
3.2.1.3
3.2.1.4
3.2.1.5
3.2.1.6
3.2.1.7
3.2.1.8
3.2.1.9
3.2.2
3.2.2.1
3.2.2.2
3.2.2.3
3.2.2.4
3.2.2.5
3.2.2.6
3.2.2.7
3.2.2.8
3.2.2.9
3.2.3
3.2.3.1
3.2.3.2
3.2.3.3
3.2.3.4
3.2.3.5
3.2.3.6
3.2.3.7
3.2.3.8
3.2.3.9
3.2.4
3.2.4.1
3.2.4.2
SingleAxis ....................................................................................................................................21
_MC_Power - Enabling/disabling axis..........................................................................................21
Overview ......................................................................................................................................21
Schematic diagram ......................................................................................................................21
Purpose........................................................................................................................................22
Applicable for ...............................................................................................................................22
Requirements...............................................................................................................................22
Input parameters..........................................................................................................................23
Output parameter.........................................................................................................................25
ErrorIDs........................................................................................................................................25
Example .......................................................................................................................................26
_MC_Stop - Stopping axis............................................................................................................27
Overview ......................................................................................................................................27
Schematic diagram ......................................................................................................................27
Purpose........................................................................................................................................27
Applicable for ...............................................................................................................................28
Requirements...............................................................................................................................28
Input parameters..........................................................................................................................29
Output parameter.........................................................................................................................30
ErrorIDs........................................................................................................................................30
Example .......................................................................................................................................31
_MC_Home - Homing axis/clearing absolute value encoder offset .............................................32
Overview ......................................................................................................................................32
Schematic diagram ......................................................................................................................32
Purpose........................................................................................................................................33
Applicable for ...............................................................................................................................34
Requirements...............................................................................................................................34
Input parameters..........................................................................................................................35
Output parameter.........................................................................................................................36
ErrorIDs........................................................................................................................................36
Examples .....................................................................................................................................37
_MC_MoveAbsolute - Absolute positioning of axis ......................................................................40
Overview ......................................................................................................................................40
Schematic diagram ......................................................................................................................40
PLCopen Blocks
Function Manual, 02/2012
Table of contents
3.2.4.3
3.2.4.4
3.2.4.5
3.2.4.6
3.2.4.7
3.2.4.8
3.2.4.9
3.2.5
3.2.5.1
3.2.5.2
3.2.5.3
3.2.5.4
3.2.5.5
3.2.5.6
3.2.5.7
3.2.5.8
3.2.5.9
3.2.6
3.2.6.1
3.2.6.2
3.2.6.3
3.2.6.4
3.2.6.5
3.2.6.6
3.2.6.7
3.2.6.8
3.2.6.9
3.2.7
3.2.7.1
3.2.7.2
3.2.7.3
3.2.7.4
3.2.7.5
3.2.7.6
3.2.7.7
3.2.7.8
3.2.7.9
3.2.8
3.2.8.1
3.2.8.2
3.2.8.3
3.2.8.4
3.2.8.5
3.2.8.6
3.2.8.7
3.2.8.8
3.2.8.9
3.2.9
3.2.9.1
3.2.9.2
3.2.9.3
3.2.9.4
Purpose ....................................................................................................................................... 41
Applicable for .............................................................................................................................. 41
Requirements.............................................................................................................................. 41
Input parameters ......................................................................................................................... 42
Output parameter ........................................................................................................................ 44
ErrorIDs ....................................................................................................................................... 44
Example ...................................................................................................................................... 44
_MC_MoveRelative - Relative positioning of axis ....................................................................... 46
Overview ..................................................................................................................................... 46
Schematic diagram ..................................................................................................................... 46
Purpose ....................................................................................................................................... 47
Applicable for .............................................................................................................................. 47
Requirements.............................................................................................................................. 47
Input parameters ......................................................................................................................... 48
Output parameter ........................................................................................................................ 50
ErrorIDs ....................................................................................................................................... 50
Example ...................................................................................................................................... 50
_MC_MoveVelocity - Traversing axis at a specified velocity ...................................................... 52
Overview ..................................................................................................................................... 52
Schematic diagram ..................................................................................................................... 52
Purpose ....................................................................................................................................... 53
Applicable for .............................................................................................................................. 53
Requirements.............................................................................................................................. 53
Input parameters ......................................................................................................................... 54
Output parameter ........................................................................................................................ 56
ErrorIDs ....................................................................................................................................... 57
Example ...................................................................................................................................... 57
_MC_MoveAdditive - Relative positioning to current target position........................................... 59
Overview ..................................................................................................................................... 59
Schematic diagram ..................................................................................................................... 59
Purpose ....................................................................................................................................... 60
Applicable for .............................................................................................................................. 60
Requirements.............................................................................................................................. 60
Input parameters ......................................................................................................................... 62
Output parameter ........................................................................................................................ 64
ErrorIDs ....................................................................................................................................... 64
Example ...................................................................................................................................... 64
_MC_MoveSuperimposed - Superimposed positioning .............................................................. 66
Overview ..................................................................................................................................... 66
Schematic diagram ..................................................................................................................... 66
Purpose ....................................................................................................................................... 67
Applicable for .............................................................................................................................. 67
Requirements.............................................................................................................................. 67
Input parameters ......................................................................................................................... 68
Output parameter ........................................................................................................................ 70
ErrorIDs ....................................................................................................................................... 70
Example ...................................................................................................................................... 70
_MC_PositionProfile - Traveling through position/time profile .................................................... 72
Overview ..................................................................................................................................... 72
Schematic diagram ..................................................................................................................... 72
Purpose ....................................................................................................................................... 73
Applicable for .............................................................................................................................. 73
PLCopen Blocks
Table of contents
3.2.9.5
3.2.9.6
3.2.9.7
3.2.9.8
3.2.9.9
3.2.10
3.2.10.1
3.2.10.2
3.2.10.3
3.2.10.4
3.2.10.5
3.2.10.6
3.2.10.7
3.2.10.8
3.2.10.9
3.2.11
3.2.11.1
3.2.11.2
3.2.11.3
3.2.11.4
3.2.11.5
3.2.11.6
3.2.11.7
3.2.11.8
3.2.11.9
3.2.12
3.2.12.1
3.2.12.2
3.2.12.3
3.2.12.4
3.2.12.5
3.2.12.6
3.2.12.7
3.2.12.8
3.2.13
3.2.13.1
3.2.13.2
3.2.13.3
3.2.13.4
3.2.13.5
3.2.13.6
3.2.13.7
3.2.13.8
3.2.14
3.2.14.1
3.2.14.2
3.2.14.3
3.2.14.4
3.2.14.5
3.2.14.6
3.2.14.7
3.2.14.8
Requirements...............................................................................................................................73
Input parameters..........................................................................................................................74
Output parameter.........................................................................................................................76
ErrorIDs........................................................................................................................................76
Example .......................................................................................................................................77
_MC_VelocityProfile - Traveling through velocity/time profile......................................................79
Overview ......................................................................................................................................79
Schematic diagram ......................................................................................................................79
Purpose........................................................................................................................................80
Applicable for ...............................................................................................................................80
Requirements...............................................................................................................................80
Input parameters..........................................................................................................................81
Output parameter.........................................................................................................................82
ErrorIDs........................................................................................................................................82
Example .......................................................................................................................................82
_MC_Reset - Resetting errors/alarms on the axis or triggering a restart.....................................84
Overview ......................................................................................................................................84
Schematic diagram ......................................................................................................................84
Purpose........................................................................................................................................84
Applicable for ...............................................................................................................................85
Requirements...............................................................................................................................85
Input parameters..........................................................................................................................86
Output parameter.........................................................................................................................86
ErrorIDs........................................................................................................................................87
Example .......................................................................................................................................87
_MC_ReadActualPosition - Reading actual position of axis ........................................................89
Overview ......................................................................................................................................89
Schematic diagram ......................................................................................................................89
Purpose........................................................................................................................................90
Applicable for ...............................................................................................................................90
Input parameters..........................................................................................................................91
Output parameter.........................................................................................................................92
ErrorIDs........................................................................................................................................92
Example .......................................................................................................................................93
_MC_ReadStatus - Reading an axis status .................................................................................94
Overview ......................................................................................................................................94
Schematic diagram ......................................................................................................................94
Purpose........................................................................................................................................95
Applicable for ...............................................................................................................................95
Input parameters..........................................................................................................................96
Output parameter.........................................................................................................................96
ErrorIDs........................................................................................................................................97
Example .......................................................................................................................................98
_MC_ReadAxisError - Reading an axis error...............................................................................99
Overview ......................................................................................................................................99
Schematic diagram ......................................................................................................................99
Purpose......................................................................................................................................100
Applicable for .............................................................................................................................100
Input parameters........................................................................................................................101
Output parameter.......................................................................................................................101
ErrorIDs......................................................................................................................................102
Example .....................................................................................................................................103
PLCopen Blocks
Function Manual, 02/2012
Table of contents
3.2.15
3.2.15.1
3.2.15.2
3.2.15.3
3.2.15.4
3.2.15.5
3.2.15.6
3.2.15.7
3.2.15.8
3.2.16
3.2.16.1
3.2.16.2
3.2.16.3
3.2.16.4
3.2.16.5
3.2.16.6
3.2.16.7
3.2.16.8
3.2.17
3.2.17.1
3.2.17.2
3.2.17.3
3.2.17.4
3.2.17.5
3.2.17.6
3.2.17.7
3.2.17.8
3.2.18
3.2.18.1
3.2.18.2
3.2.18.3
3.2.18.4
3.2.18.5
3.2.18.6
3.2.18.7
3.2.18.8
_MC_ReadParameter - Reading axis parameter and outputting in data type LREAL.............. 104
Overview ................................................................................................................................... 104
Schematic diagram ................................................................................................................... 104
Purpose ..................................................................................................................................... 105
Applicable for ............................................................................................................................ 105
Input parameters ....................................................................................................................... 105
Output parameter ...................................................................................................................... 106
ErrorIDs ..................................................................................................................................... 107
Example .................................................................................................................................... 108
_MC_ReadBoolParameter - Reading axis parameter and outputting in data type BOOL........ 109
Overview ................................................................................................................................... 109
Schematic diagram ................................................................................................................... 109
Purpose ..................................................................................................................................... 110
Applicable for ............................................................................................................................ 110
Input parameters ....................................................................................................................... 110
Output parameter ...................................................................................................................... 111
ErrorIDs ..................................................................................................................................... 111
Example .................................................................................................................................... 112
_MC_WriteParameter - Writing axis parameter of data type LREAL ........................................ 113
Overview ................................................................................................................................... 113
Schematic diagram ................................................................................................................... 113
Purpose ..................................................................................................................................... 113
Applicable for ............................................................................................................................ 113
Input parameters ....................................................................................................................... 114
Output parameter ...................................................................................................................... 115
ErrorIDs ..................................................................................................................................... 115
Example .................................................................................................................................... 116
_MC_WriteBoolParameter - Writing axis parameter of data type BOOL .................................. 117
Overview ................................................................................................................................... 117
Schematic diagram ................................................................................................................... 117
Purpose ..................................................................................................................................... 117
Applicable for ............................................................................................................................ 117
Input parameters ....................................................................................................................... 118
Output parameter ...................................................................................................................... 119
ErrorIDs ..................................................................................................................................... 119
Example .................................................................................................................................... 120
3.3
3.3.1
3.3.1.1
3.3.1.2
3.3.1.3
3.3.1.4
3.3.1.5
3.3.1.6
3.3.1.7
3.3.1.8
3.3.1.9
3.3.2
3.3.2.1
3.3.2.2
3.3.2.3
3.3.2.4
Table of contents
3.3.2.5
3.3.2.6
3.3.2.7
3.3.2.8
3.3.2.9
3.3.3
3.3.3.1
3.3.3.2
3.3.3.3
3.3.3.4
3.3.3.5
3.3.3.6
3.3.3.7
3.3.3.8
3.3.3.9
3.3.4
3.3.4.1
3.3.4.2
3.3.4.3
3.3.4.4
3.3.4.5
3.3.4.6
3.3.4.7
3.3.4.8
3.3.4.9
3.3.5
3.3.5.1
3.3.5.2
3.3.5.3
3.3.5.4
3.3.5.5
3.3.5.6
3.3.5.7
3.3.5.8
3.3.5.9
Requirements.............................................................................................................................131
Input parameters........................................................................................................................132
Output parameter.......................................................................................................................132
ErrorIDs......................................................................................................................................133
Example .....................................................................................................................................134
_MC_CamIn - Starting camming ................................................................................................135
Overview ....................................................................................................................................135
Schematic diagram ....................................................................................................................135
Purpose......................................................................................................................................136
Applicable for .............................................................................................................................136
Requirements.............................................................................................................................136
Input parameters........................................................................................................................137
Output parameter.......................................................................................................................140
ErrorIDs......................................................................................................................................140
Examples ...................................................................................................................................141
_MC_CamOut - Terminating camming ......................................................................................149
Overview ....................................................................................................................................149
Schematic diagram ....................................................................................................................149
Purpose......................................................................................................................................149
Applicable for .............................................................................................................................150
Requirements.............................................................................................................................150
Input parameters........................................................................................................................150
Output parameter.......................................................................................................................151
ErrorIDs......................................................................................................................................151
Example .....................................................................................................................................152
_MC_Phasing - Changing phase shift between the leading axis and following axis .................153
Overview ....................................................................................................................................153
Schematic diagram ....................................................................................................................153
Purpose......................................................................................................................................154
Applicable for .............................................................................................................................154
Requirements.............................................................................................................................154
Input parameters........................................................................................................................154
Output parameter.......................................................................................................................156
ErrorIDs......................................................................................................................................156
Example .....................................................................................................................................157
3.4
3.4.1
3.4.1.1
3.4.1.2
3.4.1.3
3.4.1.4
3.4.1.5
3.4.1.6
3.4.1.7
3.4.1.8
3.4.1.9
Advanced functions....................................................................................................................158
_MC_Jog - Continuous or incremental jogging ..........................................................................158
Overview ....................................................................................................................................158
Schematic diagram ....................................................................................................................158
Purpose......................................................................................................................................159
Applicable for .............................................................................................................................159
Requirements.............................................................................................................................159
Input parameters........................................................................................................................160
Output parameter.......................................................................................................................162
Function .....................................................................................................................................163
ErrorIDs......................................................................................................................................165
4.2
4.3
PLCopen Blocks
Function Manual, 02/2012
Table of contents
4.4
Query of general errors with the _MC_ReadAxisError function block ...................................... 173
Index...................................................................................................................................................... 177
PLCopen Blocks
10
Introduction
The PLCopen blocks are designed for use in cyclic programs/tasks and enable motion
control programming in a PLC environment. If preferred, they can be used in the LAD/FBD
programming language.
PLCopen blocks are available as standard functions (directly from the command library).
The motion control functions meet the PLCopen specifications in terms of interfaces,
functions and sequence, and are certified according to "PLCopen Compliance Procedure for
Motion Control Library V1.1".
References
More detailed information on technology objects and the effect of PLCopen block input
parameters on these TOs can be found in the following Function Manuals:
TO Axis Electric / Hydraulic, External Encoder
Technology Objects Synchronous Operation, Cam
PLCopen Blocks
Function Manual, 02/2012
11
Introduction
PLCopen Blocks
12
Description
2.1
Function
Description
_MC_Power()
Enabling/disabling axis
_MC_Stop()
_MC_Home()
_MC_MoveAbsolute()
_MC_MoveRelative()
_MC_MoveVelocity()
_MC_MoveAdditive()
_MC_MoveSuperimposed()
_MC_PositionProfile()
_MC_VelocityProfile()
Basic functions
_MC_Reset()
_MC_ReadActualPosition()
_MC_ReadStatus()
_MC_ReadAxisError()
_MC_ReadParameter()
_MC_ReadBoolParameter()
_MC_WriteParameter()
_MC_WriteBoolParameter()
Apart from the standard PLCopen functions, the following additional standard axis function is
included:
_MC_Jog()
PLCopen Blocks
Function Manual, 02/2012
13
Description
2.1 Description of PLCopen blocks
Table 2- 2
Function
Description
_MC_GearIn()
_MC_GearOut()
_MC_CamIn()
_MC_CamOut()
_MC_Phasing()
Table 2- 3
Function
Description
_MC_Power()
_MC_Reset()
_MC_Home()
_MC_ReadActualPosition()
_MC_ReadStatus()
_MC_ReadAxisError()
_MC_ReadParameter()
_MC_ReadBoolParameter()
Other blocks
On the "Utilities & Applications" CD (included in SIMOTION SCOUT scope of delivery) you
will also find a versatile block that can be used for axis control purposes (under
Applications > Converting > Versatile Block for Axis Control).
The FBLineAxis function block serves a wide range of application cases and is, therefore,
classified as versatile. It enables the user to not only control individual axis motions, but also
define axis groups using master/slave relationships, e.g. as a setpoint cascade with closedloop position-controlled axes.
Note
No liability assumed when using FBLineAxis
Siemens AG assumes no liability for any problems or errors which may arise from using
FBLineAxis.
PLCopen Blocks
14
Description
2.2 General rules for the PLCopen FB interface
2.2
Description
The following applies in accordance with the PLCopen specification "Technical Specification,
PLCopen - Technical Committee 2 Task Force, Function blocks for motion control, Version
1.1":
Input parameters
The parameters are used with the rising edge of the "Execute" input parameter. For all
parameters to be modified, it is essential that the input parameter(s) are changed and the
processing/traversing is re-triggered.
Sign rules
The "Velocity", "Acceleration", "Deceleration" and "Jerk" parameters always have positive
values. "Position" and "Distance" can be both positive and negative.
PLCopen Blocks
Function Manual, 02/2012
15
Description
2.2 General rules for the PLCopen FB interface
PLCopen Blocks
16
Description
2.2 General rules for the PLCopen FB interface
PLCopen Blocks
Function Manual, 02/2012
17
Description
2.2 General rules for the PLCopen FB interface
PLCopen Blocks
18
Blocks
3.1
3.1.1
Block instances
In order to use PLCopen blocks, you must create one block instance for each being used.
The data type of the instance corresponds to the block name.
Example
Below you can see how a block instance is structured, using the _MC_MoveAbsolute block
in an ST program by way of example. Optional parameters are converted to comments.
Table 3- 1
VAR
myinst_moveAbsolute : _mc_moveabsolute;
END_VAR
myinst_moveAbsolute(
axis := Hour
// ,execute := 0
// ,position := 0.0
// ,velocity := -1.0
// ,acceleration := -1.0
// ,deceleration := -1.0
// ,jerk := -1.0
// ,direction := USER_DEFAULT
// ,done =>
// ,busy =>
// ,active =>
// ,commandaborted =>
// ,error =>
// ,errorid =>
);
PLCopen Blocks
Function Manual, 02/2012
19
Blocks
3.1 Handling PLCopen blocks
3.1.2
NOTICE
Incompatibility errors during compilation
After upgrading a PLCopen library from V3.2 to V4.2, an LAD/FBD incompatibility error
occurs if you have integrated the new library using a namespace. The operations with the
parameters can no longer be compiled without errors.
As an example, the namespace in this case should be called "L_SAxis".
During compilation, the relevant PLCopen blocks are downloaded to the namespace using
the USELIB L_SAxis AS ns_L_SAxis operation. Therefore, all of the corresponding data
types are also in this namespace. Versions of SIMOTION SCOUT up to V4.0 were faulttolerant in the event of a faulty operation occurring without a namespace having been
specified (e.g. Direction := POSITIVE_DIRECTION). However, SIMOTION SCOUT V4.1
and higher is no longer fault-tolerant and produces a compilation error.
Manual intervention is required when this occurs: all incomplete operations must be
completed using the namespace extension "ns_L_SAxis".
From V4.1, the correct operation for the example above must be as follows:
Direction := ns_L_SAxis.POSITIVE_DIRECTION or
Direction := ns_L_SAxis.mc_direction#POSITIVE_DIRECTION
PLCopen Blocks
20
Blocks
3.2 SingleAxis
3.2
SingleAxis
3.2.1
3.2.1.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.1.2
Schematic diagram
Schematic diagram
Figure 3-1
PLCopen Blocks
Function Manual, 02/2012
21
Blocks
3.2 SingleAxis
3.2.1.3
Purpose
Purpose
The _MC_Power function block enables or disables an Axis technology object or an External
Encoder technology object.
If an active braking is possible before an axis is disabled, it is stopped with the set stop
mode. The parameter StopMode specifies a stop mode for the axis. The stop mode is taken
over with a falling edge at the Enable input.
3.2.1.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
External Encoders
Note
This block can only enable or disable electrical standard axes. The block does not function
for axes with force or pressure control.
3.2.1.5
Requirements
Requirements
No alarms preventing the enable may be present on the TO.
PLCopen Blocks
22
Blocks
3.2 SingleAxis
3.2.1.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
Mode
_MC_EnableMode
ALL
PLCopen Blocks
Function Manual, 02/2012
23
Blocks
3.2 SingleAxis
Parameter
Data type
Initial value
Description
StopMode
_MC_StopMode
WITH_COMMAND_VALUE_ZERO
DisableMode
_MC_DisableMode
ALL
STWBitSet
WORD
Bit0 - ON
Bit1 - No coast stop (no OFF2)
Bit2 - No quick stop (no OFF3)
Bit3 - Enable operation
Bit4 - Enable ramp generator
Bit5 - Unfreeze ramp generator
Bit6 - Enable setpoint
See also Auto-Hotspot.
PLCopen Blocks
24
Blocks
3.2 SingleAxis
3.2.1.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Status
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
StatusMode
3.2.1.8
Bool
FALSE
State of the actual enables in comparison with the setpoint enables; indicates
that the enables specified in 'mode' or 'DisableMode' have been reached.
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
25
Blocks
3.2 SingleAxis
3.2.1.9
Example
The axis is traversed with velocity 50 after the enable. After an error has occurred resulting
in the removal of the axis enable, the error is corrected with _MC_Reset. The axis is enabled
again. The axis is then traversed again with velocity 50 and the enable is removed. The axis
brakes with the ramp set in the StopMode parameter.
B 0 & B 3RZ HU
$ [LV B
( QDEOHB
$ //
: ,7 +B& 2 0
6 WD WX V
$ [LV
6 WDWXVB
% XV\
( Q D E OH
0 RGH
6 WR S 0 R G H
0 $ 1 ' B9 $ /
$FWLYH
$ [LVB
$ [LV
( UURU
( [HB
( [HFXWH
% X V\
( UURU,'
9 HORFLW\
$FWLYH
$ FFHOHUDWLRQ
' H FH OH UD WLR Q
8 (B= ( 5 2
B 0 & B 5 HVHW
3 2 6 ,7 ,9 (
) $ /6 (
$ [LVB
$ [LV
( [HB
( [HFXWH
5 H VWD UW
-HUN
,Q 9 H ORFLW\
& R P P D Q G $ E R UWH G
( UURU
( UUR U,'
'RQH
% XV\
& R P P D Q G $ E R UWH G
( UURU
( UURU,'
( Q DE OHB
6 WDWX VB
(UURUUHVHWGRQH
( [HB
( [HB
(UURU
9 HOR FLW\
W
Figure 3-2
_MC_Power Example
PLCopen Blocks
26
Blocks
3.2 SingleAxis
3.2.2
3.2.2.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.2.2
Schematic diagram
Schematic diagram
Figure 3-3
3.2.2.3
Purpose
Purpose
The function block _MC_Stop terminates all active motion commands on an axis and
decelerates it down to standstill. The function block can be overrided or aborted by another
motion command, i.e. it is not possible to start a motion command.
The function block is terminated (Done equals TRUE) when the axis is stationary and the
input Execute is reset to FALSE. It is then possible again to start a motion command on the
axis.
The input parameters Deceleration and Jerk define the dynamic response of the stop
procedure.
PLCopen Blocks
Function Manual, 02/2012
27
Blocks
3.2 SingleAxis
3.2.2.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
3.2.2.5
Requirements
Requirements
Axis enabled and not in follow-up mode
PLCopen Blocks
28
Blocks
3.2 SingleAxis
3.2.2.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
WARNING
If the function block _MC_Stop is started with a jerk specification not equal to zero during
the acceleration phase of an axis, its velocity can increase to the configured maximum
velocity of the drive in an extreme situation. The axis is only decelerated once acceleration
has been reduced by the jerk.
PLCopen Blocks
Function Manual, 02/2012
29
Blocks
3.2 SingleAxis
3.2.2.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.2.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
30
Blocks
3.2 SingleAxis
3.2.2.9
Example
The axis is started with velocity 50 and then decelerated to velocity 0 with _MC_Stop. A
further call of _MC_MoveVelocity results in an error as the Execute input is set on the
_MC_Stop. After the Execute input on the _MC_Stop is reset, the _MC_MoveVelocity can be
executed again.
$ [LV
( [HB
( [HFXWH
9 HORFLW\
$ FFHOHUDWLRQ
' H FH OH UD WLR Q
,Q9 HORFLW\
,Q9 HOB
% XV\
( UURU
( UURU,'
$ [LVB
$ [LV
'RQH
( [HB
( [H FX WH
% XV\
$FWLYH
& R P P D Q G $ E R UWH G
-HUN
3 2 6 ,7 ,9 (
B 0 & B 6 WR S
$ E R UWB
( UURUB
' H FH OH UD WLR Q
-HUN
' R Q H B
$FWLYH
&RPPDQG$ERU WHG
( UURU
( UUR U,'
) $ /6 (
& X UUH Q W
( [HB
,Q 9 HOB
$ E R UWB
( UUR UB
( [HB
' R Q HB
9 HOR FLW\
W
Figure 3-4
_MC_Stop Example
PLCopen Blocks
Function Manual, 02/2012
31
Blocks
3.2 SingleAxis
3.2.3
3.2.3.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Examples
3.2.3.2
Schematic diagram
Schematic diagram
Figure 3-5
PLCopen Blocks
32
Blocks
3.2 SingleAxis
3.2.3.3
Purpose
Purpose
The function block _MC_Home establishes a positional relationship between the control and
the mechanical system via a measuring system.
The following are supported:
Active and passive homing of an axis
The homing mode is defined at the function block. Parameters for the other data are set
in the "Homing" axis dialog.
Setting a position value
Relative correction/shift of the actual value
Absolute encoder adjustment
PLCopen Blocks
Function Manual, 02/2012
33
Blocks
3.2 SingleAxis
3.2.3.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
External encoders
Restrictions
The parameter HomingMode of the function block _MC_Home only defines the homing
mode. The homing procedure itself is performed in accordance with the configuration of the
encoder on the axis.
Homing mode
Virtual axis
ACTIVE_HOMING
External
Encoders
X 1)
PASSIVE_HOMING
DIRECT_HOMING
DIRECT_HOMING_
RELATIVE
X 2)
X 2)
ENABLE_OFFSET_OF_
ABSOLUTE_ENCODER
3.2.3.5
1)
2)
Requirements
Requirements
Enabling axes or external encoders
PLCopen Blocks
34
Blocks
3.2 SingleAxis
3.2.3.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
External encoder
(externalEncoderType data type)
Position
LREAL
0.0
HomingMode
_MC_HomingMode
ACTIVE_HOMING
PLCopen Blocks
Function Manual, 02/2012
35
Blocks
3.2 SingleAxis
3.2.3.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.3.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
36
Blocks
3.2 SingleAxis
3.2.3.9
Examples
+RPHSRVLWLRQRIIVHW
+RPLQJDSSURDFKYHORFLW\9DSS
+RPLQJHQWU\YHORFLW\9HQWU\
+RPLQJUHGXFHGYHORFLW\9UHG
3KDVH
3KDVH
+RPLQJRXWSXWFDP
UHDFKHG
$[LVLVDW
+RPHSRVLWLRQFRRUGLQDWH
=HURPDUN
RYHUWUDYHOOHG
Figure 3-6
3KDVH
$[LVKRPHG
PLCopen Blocks
Function Manual, 02/2012
37
Blocks
3.2 SingleAxis
$FWXDOSRVLWLRQ
YDOXH;3
$FFHSWLQQH[W,SR
;3WXQLTXH
3RVLWLRQ
3RVLWLRQ
([HFXWH0RGH
([HFXWH0RGH
$[LVVWDWLRQDU\
Figure 3-7
$FWXDOSRVLWLRQ
YDOXH;3
$FFHSWLQQH[W,SR
;3WUDQGRP
$[LVLVPRYLQJ
PLCopen Blocks
38
Blocks
3.2 SingleAxis
B 0 & B 0 R Y H 9 H OR F LW\
$ [LVB
$ [LV
( [HB
( [HFXWH
9 HORFLW\
$ FFHOHUDWLRQ
' H FH OH UD WLR Q
-HUN
3 2 6 ,7 ,9 (
B 0 & B +RP H
$ [LVB
$ [LV
'RQH
( [HB
( [H FX WH
% XV\
$FWLYH
3 R VLWLR Q
& R P P D Q G $ E R UWH G
3 $ 6 6 ,9 (
,Q9 HORFLW\
,Q9 HOB
% XV\
+RPLQJ0 RGH
' R Q HB
$FWLYH
& R P P D Q G $ E R UWH G
( UURU
( UURU
( UURU,'
( UUR U,'
) $ /6 (
& X UUH Q W
( [HB
,Q 9 HOB
( [HB
' R Q HB
9 HOR FLW\
W
3 R VLWLR Q
=HURPDUN
Figure 3-8
PLCopen Blocks
Function Manual, 02/2012
39
Blocks
3.2 SingleAxis
3.2.4
3.2.4.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.4.2
Schematic diagram
Schematic diagram
Figure 3-9
PLCopen Blocks
40
Blocks
3.2 SingleAxis
3.2.4.3
Purpose
Purpose
The function block _MC_MoveAbsolute starts a positioning motion of an axis to an absolute
position.
The dynamic response parameters Velocity, Acceleration, Deceleration and Jerk define the
dynamic response of the motion procedure.
The axis stops after completion of the positioning motion.
An active motion command is overridden by the function block.
With modulo axes, SHORTEST_WAY can be specified as an additional direction of motion.
Note
The state of the "DONE" output depends on the system variable
motionstatedata.motionstate.
3.2.4.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
3.2.4.5
Requirements
Requirements
Axis enabled
Axis homed if the axis configuration data item TypeOfAxis.Homing.referencingNecessary
was set to YES (homing required).
No _MC_Stop active
PLCopen Blocks
Function Manual, 02/2012
41
Blocks
3.2 SingleAxis
3.2.4.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Position
LREAL
0.0
Velocity
LREAL
-1.0
LREAL
-1.0
Deceleration
LREAL
-1.0
PLCopen Blocks
42
Blocks
3.2 SingleAxis
Parameter
Data type
Initial value
Description
Jerk
LREAL
-1.0
Direction
_MC_Direction
USER_DEFAULT
1)
PLCopen Blocks
Function Manual, 02/2012
43
Blocks
3.2 SingleAxis
3.2.4.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.4.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.4.9
Example
Case A:
Two _MC_MoveAbsolute blocks are started in succession.
PLCopen Blocks
44
Blocks
3.2 SingleAxis
Case B:
The second _MC_MoveAbsolute cancels the first _MC_MoveAbsolute block. The target
position results relatively from the position at the start of the second block.
B 0 & B 0 R Y H $ E V R OX WH
B 0 & B 0 R YH$ E VR OX WH
$ [LVB
$ [LV
'RQH
( [HB
( [HFXWH
% XV\
3 RVLWLRQ
$ FWLYH
9 HORFLW\
& R P P D Q G $ E R UWH G
' R Q HB
$ E R UWB
$ [LVB
$ [LV
'RQH
( [HB
( [HFXWH
% XV\
3 RVLWLRQ
$ FWLYH
9 HORFLW\
& R P P D Q G $ E R UWH G
$ FFHOHUDWLRQ
( UURU
$ FFHOHUDWLRQ
( UUR U
' H FH OH UD WLR Q
( UURU,'
' H FH OH UD WLR Q
( UUR U,'
-HUN
3 2 6 ,7 ,9 (
3 2 6 ,7 ,9 (
&DVH$
( [HB
' R Q HB
-HUN
' LUH FWLR Q
&DVH%
$ E R UWB
' R Q HB
( [HB
' R Q HB
9 HOR FLW\
W
3 R VLWLR Q
W
Figure 3-10
_MC_MoveAbsolute Example
PLCopen Blocks
Function Manual, 02/2012
45
Blocks
3.2 SingleAxis
3.2.5
3.2.5.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.5.2
Schematic diagram
Schematic diagram
Figure 3-11
PLCopen Blocks
46
Blocks
3.2 SingleAxis
3.2.5.3
Purpose
Purpose
The function block _MC_MoveRelative positions an axis relative to the actual position of the
axis. If the axis is already in motion when the job is started, the position that is present in the
system at the start of the job processing is used as the start position. It must be taken into
account that there is a response time between the processing of the function block and the
execution of the motion, which depends on the user task in which the function block was
programmed and on the set interpolation cycle clock.
The dynamic response parameters Velocity, Acceleration, Deceleration and Jerk define the
dynamic response of the motion procedure.
The axis stops after completion of the positioning motion.
An active motion command is overridden by the function block.
Note
The state of the "DONE" output depends on the system variable
motionstatedata.motionstate.
3.2.5.4
Applicable for
Application
Positioning axes
Following axes
Path axes
3.2.5.5
Requirements
Requirements
Axis enabled
No _MC_Stop active
PLCopen Blocks
Function Manual, 02/2012
47
Blocks
3.2 SingleAxis
3.2.5.6
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Distance
LREAL
0.0
Velocity
LREAL
-1.0
LREAL
-1.0
PLCopen Blocks
48
Blocks
3.2 SingleAxis
Parameters
Data type
Initial value
Description
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
49
Blocks
3.2 SingleAxis
3.2.5.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.5.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.5.9
Example
Case A:
Two _MC_MoveRelative blocks are started in succession.
PLCopen Blocks
50
Blocks
3.2 SingleAxis
Case B:
The second _MC_MoveRelative cancels the first _MC_MoveRelative block. The target
position results relatively from the position at the start of the second block.
B 0 & B 0 R Y H 5HODWLYH
B 0 & B 0 R YH5HODWLYH
$ [LVB
$ [LV
' RQH
( [HB
( [HFXWH
% XV\
'LVWDQFH
$ FWLYH
9 HORFLW\
& R P P D Q G $ E R UWH G
' R Q HB
$ E R UWB
$ [LVB
$ [LV
'RQH
( [HB
( [H FX WH
% XV\
'LVWDQFH
$ FWLYH
9 H OR FLW\
& R P P D Q G $ E R UWH G
$ FFHOHUDWLRQ
( UURU
$ FFH OH UD WLR Q
( UURU
' H FH OH UD WLR Q
( UURU,'
' H FH OH UD WLR Q
( UUR U,'
-HUN
&DVH$
( [HB
' R Q HB
-HUN
&DVH%
' R Q HB
$ E R UWB
( [HB
' R Q HB
9 HOR FLW\
W
3 R VLWLR Q
W
Figure 3-12
_MC_MoveRelative Example
PLCopen Blocks
Function Manual, 02/2012
51
Blocks
3.2 SingleAxis
3.2.6
3.2.6.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.6.2
Schematic diagram
Schematic diagram
Figure 3-13
PLCopen Blocks
52
Blocks
3.2 SingleAxis
3.2.6.3
Purpose
Purpose
The technology function _MC_MoveVelocity accelerates or decelerates an axis to a set
velocity.
The dynamic response parameters Acceleration, Deceleration and Jerk define the dynamic
response of the motion procedure.
If a velocity override is in effect, then the end velocity is calculated under consideration of the
override. You must take this behavior into account in the user program.
Note
The state of the "DONE" output depends on the system variable
motionstatedata.motionstate.
3.2.6.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
3.2.6.5
Requirements
Requirements
Axis enabled
No _MC_Stop active
PLCopen Blocks
Function Manual, 02/2012
53
Blocks
3.2 SingleAxis
3.2.6.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Velocity
LREAL
-1.0
Acceleration
LREAL
-1.0
Deceleration
LREAL
-1.0
PLCopen Blocks
54
Blocks
3.2 SingleAxis
Parameter
Data type
Initial value
Description
Jerk
LREAL
-1.0
Direction
_MC_Direction
USER_DEFAULT
Current
BOOL
FALSE
PLCopen Blocks
Function Manual, 02/2012
55
Blocks
3.2 SingleAxis
3.2.6.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
InVelocity
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
PLCopen Blocks
56
Blocks
3.2 SingleAxis
Note
When speed setpoint = zero (Velocity = 0.0), the following applies:
InVelocity is set when the axis has reached a standstill, and remains set as long as Execute
= 1.
As soon as InVelocity is set, the command is terminated, i.e. Busy = FALSE. This means
that neither CommandAborted nor Error can be signaled by the function block.
Note
The behavior of the outputs depends on the task in which the block is processed. The
display is only refreshed when the task, in which the block is to be processed, is executed. If
the block is called in a non-cyclic task (e.g. MotionTask), then the BUSY parameter may be
set to TRUE, but the ACTIVE/INVELOCITY parameters may still display FALSE, because
the block, e.g. on the axis, may not be effective yet. Only when the MotionTask is executed
does the display change from ACTIVE to TRUE. In a cyclic task such as the
BackgroundTask, the blocks are processed cyclically and therefore the BUSY and ACTIVE
parameters both display TRUE.
3.2.6.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.6.9
Example
Case A:
An _MC_MoveVelocity block is overridden by another _MC_MoveVelocity block after the end
velocity has been reached (InVelocity = TRUE).
PLCopen Blocks
Function Manual, 02/2012
57
Blocks
3.2 SingleAxis
Case B:
An _MC_MoveVelocity block is overridden by another _MC_MoveVelocity block before the
end velocity has been reached (InVelocity = FALSE).
B 0 & B 0 R Y H 9HORFLW\
$ [LVB
$ [LV
( [HB
( [HFXWH
9 HORFLW\
$ FFHOHUDWLRQ
' H FH OH UD WLR Q
,Q9HORFLW\
326,7,9(
$ [LV
( [HB
( [H FX WH
9 HORFLW\
$ FFHOHUDWLRQ
( UURU
' H FH OH UD WLR Q
( UURU,'
$ERUW B
326,7,9(
)$/6(
&XUUHQW
&DVH$
( [HB
$ [LVB
$ FWLYH
& R P P D Q G $ E R UWH G
'LUHFWLRQ
)$/6(
,Q9HOB
% XV\
-HUN
B 0 & B 0 R YH9HORFLW\
-HUN
,Q9HOB
,Q9HORFLW\
% XV\
$ FWLYH
& R P P D Q G $ E R UWH G
( UURU
( UUR U,'
'LUHFWLRQ
&XUUHQW
&DVH%
W
,Q 9 HOB
$ E R UWB
( [HB
,Q 9 HOB
9 HOR FLW\
W
Figure 3-14
_MC_MoveVelocity Example
PLCopen Blocks
58
Blocks
3.2 SingleAxis
3.2.7
3.2.7.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.7.2
Schematic diagram
Schematic diagram
Figure 3-15
PLCopen Blocks
Function Manual, 02/2012
59
Blocks
3.2 SingleAxis
3.2.7.3
Purpose
Purpose
The function block _MC_MoveAdditive positions an axis relative to the target position of the
active positioning command. The function block enables a correction of the target position of
the previous positioning command by a distance specified at the Distance input.
The dynamic response parameters Velocity, Acceleration, Deceleration and Jerk define the
dynamic response of the motion procedure.
The axis stops after completion of the positioning motion.
An active motion command is overridden by the function block.
Note
The state of the "DONE" output depends on the system variable
motionstatedata.motionstate.
3.2.7.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
3.2.7.5
Requirements
Requirements
Axis enabled
No _MC_Stop active
The axis must be homed if the TypeOfAxis.Homing.referencingNecessary axis configuration
data item has been set to YES (homing required), and
the axis is in motion, or
_MC_MoveAdditive overrides an active motion command (exception:
_MC_MoveVelocity).
PLCopen Blocks
60
Blocks
3.2 SingleAxis
Note
The function block _MC_MoveAdditive behaves like a _MC_MoveRelative function block, if
The axis is stationary at the start of the job or
An active motion command without defined target position is overridden by the function
block. The target position then depends on the position of the axis at the time of the
override and the additional distance to be traversed.
PLCopen Blocks
Function Manual, 02/2012
61
Blocks
3.2 SingleAxis
3.2.7.6
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Distance
LREAL
0.0
Velocity
LREAL
-1.0
LREAL
-1.0
PLCopen Blocks
62
Blocks
3.2 SingleAxis
Parameters
Data type
Initial value
Description
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
63
Blocks
3.2 SingleAxis
3.2.7.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.7.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.7.9
Example
Case A:
Two _MC_MoveAdditive blocks are started in succession.
PLCopen Blocks
64
Blocks
3.2 SingleAxis
Case B:
The second _MC_MoveAdditive cancels the first _MC_MoveAdditive block. The target
position results from the target position of the first block.
B 0 & B 0 R Y H $ G G LWLY H
B 0 & B 0 R Y H $ G G LWLY H
$ [LV B
$ [LV
'RQH
( [H B
( [HFXWH
% XV\
' LVWD Q FH
9 HORFLW\
$ FFHOHUDWLRQ
' H FH OH UD WLR Q
' R Q HB
'RQH
( [H FX WH
% XV\
' LVWDQFH
9 HORFLW\
( UURU
$ FFHOHUDWLRQ
( UURU
( UURU,'
' H FH OH UD WLR Q
( UUR U,'
$ E R UWB
'RQH B
$ FWLYH
& R P P D Q G $ E R UWH G
-HUN
&DVH%
W
$ E R UWB
$ [LV
( [HB
&DVH$
( [HB
$ [LVB
$ FWLYH
& R P P D Q G $ E R UWH G
-HUN
' RQH B
( [HB
' R Q HB
9 HOR FLW\
W
3 R VLWLR Q
W
Figure 3-16
_MC_MoveAdditive Example
PLCopen Blocks
Function Manual, 02/2012
65
Blocks
3.2 SingleAxis
3.2.8
3.2.8.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.8.2
Schematic diagram
Schematic diagram
Figure 3-17
PLCopen Blocks
66
Blocks
3.2 SingleAxis
3.2.8.3
Purpose
Purpose
The function block _MC_MoveSuperImposed starts a positioning motion relative to the active
positioning motion of an axis. This enables a superimposed positioning of an axis, e.g. for
the print-mark correction.
The dynamic response parameters VelocityDiff, Acceleration, Deceleration and Jerk define
the dynamic response of the motion procedure.
An active motion command (main motion) is not overridden by the function block.
An active superimposed positioning motion is overridden by a restart of the function block
_MC_MoveSuperImposed. The remaining distance-to-go of the overridden superimposed
positioning motion is lost.
Note
The state of the "DONE" output depends on the system variable
motionstatedata.motionstate.
3.2.8.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
3.2.8.5
Requirements
Requirements
Axis enabled
No _MC_Stop active
The axis velocity is increased for the superimposed positioning operation. Therefore, the
basic motion of the axis should not be performed with the maximum permissible velocity.
PLCopen Blocks
Function Manual, 02/2012
67
Blocks
3.2 SingleAxis
3.2.8.6
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Distance
LREAL
0.0
Velocity
LREAL
-1.0
LREAL
-1.0
PLCopen Blocks
68
Blocks
3.2 SingleAxis
Parameters
Data type
Initial value
Description
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
69
Blocks
3.2 SingleAxis
3.2.8.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.8.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.8.9
Example
Case A:
An _MC_MoveSuperImposed is started during a relative positioning.
PLCopen Blocks
70
Blocks
3.2 SingleAxis
Case B:
MC_MoveSuperImposed is started again before _MC_MoveSuperImposed is completed.
Case C:
Start _MC_MoveSuperImposed with a stationary axis.
B 0 & B 0 R Y H 5HODWLYH
B 0 & B 0 R Y H 6XSHULPSRVHG
$ [LVB
$ [LV
'RQH
$ [LVB
$ [LV
'RQH
( [HB
( [H FX WH
% X V\
( [HB
( [H FX WH
% X V\
'LVWDQFH
$ FWLYH
'LVWDQFH
$ FWLYH
9 H OR FLW\
& R P P D Q G $ E R UWH G
9 H OR FLW\
& R P P D Q G $ E R UWH G
' R Q HB
$ FFH OH UD WLR Q
( UUR U
$ FFH OH UD WLR Q
( UUR U
' H FH OH UD WLR Q
( UUR U,'
' H FH OH UD WLR Q
( UUR U,'
-H UN
-H UN
( [HB
' R Q HB
' R Q HB
W
&DVH$
&DVH%
&DVH&
( [HB
' R Q HB
9 HOR FLW\
W
Figure 3-18
_MC_MoveSuperimposed Example
PLCopen Blocks
Function Manual, 02/2012
71
Blocks
3.2 SingleAxis
3.2.9
3.2.9.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.9.2
Schematic diagram
Schematic diagram
Figure 3-19
PLCopen Blocks
72
Blocks
3.2 SingleAxis
3.2.9.3
Purpose
Purpose
The function block _MC_PositionProfile traverses an axis along a position profile which is
specified as an s(t) function.
3.2.9.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
3.2.9.5
Requirements
Requirements
Axis enabled
Axis homed if the axis configuration data item TypeOfAxis.Homing.referencingNecessary
was set to YES (homing required).
Position profiles are specified using cams and must be assigned to the axis (in the "Profiles"
axis dialog).
No _MC_Stop active
PLCopen Blocks
Function Manual, 02/2012
73
Blocks
3.2 SingleAxis
3.2.9.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
TimePosition
MC_TP_REF
Execute
BOOL
FALSE
Absolute
BOOL
TRUE
LREAL
-1.0
Acceleration
LREAL
-1.0
PLCopen Blocks
74
Blocks
3.2 SingleAxis
Parameter
Data type
Initial value
Description
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
75
Blocks
3.2 SingleAxis
3.2.9.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.9.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
76
Blocks
3.2 SingleAxis
3.2.9.9
Example
Case A:
Two _MC_PositionProfile blocks are started in succession.
PLCopen Blocks
Function Manual, 02/2012
77
Blocks
3.2 SingleAxis
Case B:
The second _MC_PositionProfile block aborts the motion of the first block.
B0&B3RVLWLRQ3URILOH
$[LVB
&DPB
([HB
$[LV
'RQH
7LPH3RVLWLRQ
%XV\
([HFXWH
$FWLYH
$EVROXWH
&RPPDQG$ERUWHG
9HORFLW\
(UURU
$FFHOHUDWLRQ
(UURU,G
'HFHOHUDWLRQ
-HUN
B0&B3RVLWLRQ3URILOH
'RQHB
$[LVB
&DPB
([HB
$ERUWB
$[LV
'RQH
7LPH3RVLWLRQ
%XV\
([HFXWH
$FWLYH
$EVROXWH
&RPPDQG$ERUWHG
9HORFLW\
(UURU
$FFHOHUDWLRQ
(UURU,G
'HFHOHUDWLRQ
-HUN
&DVH$
&DPB
'RQHB
&DVH%
&DPB
&DPB
&DPB
3RVLWLRQSURILOH
W
([HB
$ERUWB
'RQHB
([HB
'RQHB
W
9HORFLW\
3RVLWLRQ
W
Figure 3-20
_MC_PositionProfile example
PLCopen Blocks
78
Blocks
3.2 SingleAxis
3.2.10
3.2.10.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.10.2
Schematic diagram
Schematic diagram
Figure 3-21
PLCopen Blocks
Function Manual, 02/2012
79
Blocks
3.2 SingleAxis
3.2.10.3
Purpose
Purpose
The function block _MC_VelocityProfile traverses an axis along a velocity profile, which is
specified as a v(t) function.
3.2.10.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
3.2.10.5
Requirements
Requirements
Axis enabled
Velocity profiles are specified using cams and must be assigned to the axis (in the "Profiles"
axis dialog).
No _MC_Stop active
PLCopen Blocks
80
Blocks
3.2 SingleAxis
3.2.10.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
TimeVelocity
MC_TV_REF
Execute
BOOL
FALSE
Acceleration
LREAL
-1.0
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
81
Blocks
3.2 SingleAxis
3.2.10.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
With TRUE, the axis has traversed the specified velocity profile.
With TRUE, the function block has been started.
With TRUE, the command is processed by the command execution,
i.e. the function block has active control over the axis / technology
object. The command is processed in the interpolator.
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.2.10.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.10.9
Example
Case A:
Two _MC_VelocityProfile blocks are started in succession.
PLCopen Blocks
82
Blocks
3.2 SingleAxis
Case B:
The second _MC_VelocityProfile block aborts the motion of the first block.
B0&B9HORFLW\3URILOH
$[LVB
&DPB
([HB
$[LV
'RQH
7LPH9HORFLW\
%XV\
([HFXWH
$FWLYH
$FFHOHUDWLRQ &RPPDQG$ERUWHG
'HFHOHUDWLRQ
(UURU
-HUN
(UURU,G
B0&B9HORFLW\3URILOH
'RQHB
$ERUWB
$[LVB
&DPB
([HB
$[LV
7LPH9HORFLW\
([HFXWH
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
&DVH$
&DPB
&DPB
'RQH
%XV\
$FWLYH
&RPPDQG$ERUWHG
(UURU
(UURU,G
'RQHB
&DVH%
&DPB
&DPB
9HORFLW\SURILOH
W
([HB
$ERUWB
'RQHB
([HB
'RQHB
W
$FFHOHUDWLRQ
9HORFLW\
Figure 3-22
_MC_VelocityProfile example
PLCopen Blocks
Function Manual, 02/2012
83
Blocks
3.2 SingleAxis
3.2.11
3.2.11.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.2.11.2
Schematic diagram
Schematic diagram
Figure 3-23
3.2.11.3
Purpose
Purpose
The function block _MC_Reset resets all errors on an axis or external encoder that can be
acknowledged by means of the software. Fatal errors can be acknowledged via Power off/on
or reloading of the project to the module.
If the Restart input is set, the transferred technology object is re-initialized via _MC_Reset.
Axes that are operated with incremental encoders return to the Not homed mode.
PLCopen Blocks
84
Blocks
3.2 SingleAxis
3.2.11.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
External Encoders
3.2.11.5
Requirements
Requirements
The restart of an axis depends on the condition set with configuration data item
restartAxisCondition.
NOTICE
Set the input Restart to FALSE, only when the errors present on the transferred
technology object are to be acknowledged.
No variables of the technology object are updated during the restart operation!
PLCopen Blocks
Function Manual, 02/2012
85
Blocks
3.2 SingleAxis
3.2.11.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
Restart
BOOL
FALSE
3.2.11.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Done
BOOL
FALSE
Description
Display of the completion of the function block
The alarms have been acknowledged or a restart performed.
Busy
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
PLCopen Blocks
86
Blocks
3.2 SingleAxis
3.2.11.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
3.2.11.9
Example
Case A:
The _MC_Reset block resets active errors/alarms at the axis transferred on input parameter
Axis.
PLCopen Blocks
Function Manual, 02/2012
87
Blocks
3.2 SingleAxis
Case B:
The _MC_Reset block triggers a restart at the axis transferred on input parameter Axis.
B0&B0RYH9HORFLW\
B0&B0RYH9HORFLW\
,Q9HORFLW\
%XV\
$FWLYH
$[LV
([HFXWH
9HORFLW\
$[LVB
([HFXWHB
326,7,9(
)$/6(
$FFHOHUDWLRQ &RPPDQG$ERUWHG
'HFHOHUDWLRQ
-HUN
'LUHFWLRQ
&XUUHQW
(UURU
(UURU,'
$[LVB
([HFXWHB
$ERUW
326,7,9(
)$/6(
,Q9HORFLW\
%XV\
$FWLYH
$[LV
([HFXWH
9HORFLW\
$FFHOHUDWLRQ &RPPDQG$ERUWHG
(UURU
(UURU,'
'HFHOHUDWLRQ
-HUN
'LUHFWLRQ
&XUUHQW
B0&B5HVHW
$[LV
([HFXWHB
5HVWDUW
'RQH
%XV\
$[LV
(QDEOH
5HVWDUW
'RQH
&RPPDQG$ERUWHG
(UURU
(UURU,'
&DVH$
&DVH%
([HFXWHB
W
BGLVDEOH$[LV
$ERUW
([HFXWHB
([HFXWHB
5HVWDUW
'RQH
[
6\VWHPYDULDEOH
HUURU*URXS
9HORFLW\
W
3RVLWLRQ
W
Figure 3-24
_MC_Reset example
PLCopen Blocks
88
Blocks
3.2 SingleAxis
3.2.12
3.2.12.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.12.2
Schematic diagram
Schematic diagram
Figure 3-25
PLCopen Blocks
Function Manual, 02/2012
89
Blocks
3.2 SingleAxis
3.2.12.3
Purpose
Purpose
The function block _MC_ReadActualPosition reads the actual position of an axis or an
external encoder.
As an output value, the block supplies:
The value for the positioningState.actualPosition system variable, in the case of axes
The value for the motionState.position system variable, in the case of external encoders
3.2.12.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
External encoders
PLCopen Blocks
90
Blocks
3.2 SingleAxis
3.2.12.5
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
PLCopen Blocks
Function Manual, 02/2012
91
Blocks
3.2 SingleAxis
3.2.12.6
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Valid
BOOL
FALSE
Display of the validity of the value which can be read at output Position.
Busy
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
Position
3.2.12.7
LREAL
0.0
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
92
Blocks
3.2 SingleAxis
3.2.12.8
Example
The _MC_ReadActualPosition block reads the actual position of the axis transferred on the
Axis input parameter.
B0&B5HDG$FWXDO3RVLWLRQ
$[LV
(QDEOH
$[LV
(QDEOH
9DOLG
%XV\
(UURU
(UURU,G
3RVLWLRQ
Valid
(UURU
3RVLWLRQ2XW
3RVLWLRQ
W
(QDEOH
9DOLG
W
(UURU
3RVLWLRQ2XW
W
72UHVWDUW
W
Figure 3-26
_MC_ReadActualPosition example
PLCopen Blocks
Function Manual, 02/2012
93
Blocks
3.2 SingleAxis
3.2.13
3.2.13.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.13.2
Schematic diagram
Schematic diagram
Figure 3-27
PLCopen Blocks
94
Blocks
3.2 SingleAxis
3.2.13.3
Purpose
Purpose
The function block _MC_ReadStatus reads various states of an axis or an external encoder.
3.2.13.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
External encoders
PLCopen Blocks
Function Manual, 02/2012
95
Blocks
3.2 SingleAxis
3.2.13.5
Input parameters
Input parameters
Parameters Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
3.2.13.6
Output parameter
Output parameter
Table 3- 2
Parameter
Data type
Initial value
Description
Valid
BOOL
FALSE
Display of the validity of the values that can be read at the status
outputs
Busy
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
PLCopen Blocks
96
Blocks
3.2 SingleAxis
Table 3- 3
Parameter
Data type
Initial value
Description
ErrorStop
BOOL
FALSE
Disabled
BOOL
FALSE
Stopping
BOOL
FALSE
StandStill
BOOL
FALSE
DiscreteMotion
BOOL
FALSE
ContinuousMotion
BOOL
FALSE
SynchronizedMotion
BOOL
FALSE
Homing
BOOL
FALSE
ConstantVelocity
BOOL
FALSE
Accelerating
BOOL
FALSE
Decelerating
BOOL
FALSE
Table 3- 4
Parameter
Data type
Initial value
ErrorStop
BOOL
FALSE
Disabled
BOOL
FALSE
StandStill
BOOL
FALSE
Homing
BOOL
FALSE
ConstantVelocity
BOOL
FALSE
Accelerating
BOOL
FALSE
Decelerating
BOOL
FALSE
3.2.13.7
Description
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
97
Blocks
3.2 SingleAxis
3.2.13.8
Example
The _MC_ReadStatus block reads the motion statuses of the axis transferred on the Axis
input parameter during an active positioning command.
B0&B0RYH$EVROXWH
B0&B3RZHU
$[LVB
(QDEOHB
$//
:,7+B&200$1'B
9$/8(B=(52
$[LV
(QDEOH
0RGH
6WRS0RGH
6WDWXV
%XV\
$FWLYH
(UURU
(UURU,'
6WDWXV
$[LVB
([HFXWH
326,7,9(
'RQH
$[LV
%XV\
([HFXWH
$FWLYH
3RVLWLRQ
9HORFLW\ &RPPDQG$ERUWHG
$FFHOHUDWLRQ
(UURU
'HFHOHUDWLRQ
(UURU,'
-HUN
'LUHFWLRQ
B0&B5HDG6WDWXV
9DOLG
%XV\
(UURU
(UURU,'
(UURU6WRS
'LVDEOHG
6WRSSLQJ
6WDQGVWLOO
'LVFUHWH0RWLRQ
&RQWLQXRXV0RWLRQ
6\QFKURQL]HG0RWLRQ
+RPLQJ
&RQVWDQW9HORFLW\
$FFHOHUDWLQJ
'HFHOHUDWLQJ
$[LV
(QDEOHB
(QDEOHB
$[LV
(QDEOH
W
W
'LVDEOHG
(QDEOHB
$FFHOHUDWLQJ
'HFHOHUDWLQJ
([HFXWH
'LVFUHWH0RWLRQ
6WDWXV
'LVDEOHG
'LVFUHWH0RWLRQ
$FFHOHUDWLQJ
'HFHOHUDWLQJ
3RVLWLRQ
W
Figure 3-28
_MC_ReadStatus example
PLCopen Blocks
98
Blocks
3.2 SingleAxis
3.2.14
3.2.14.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.14.2
Schematic diagram
Schematic diagram
Figure 3-29
PLCopen Blocks
Function Manual, 02/2012
99
Blocks
3.2 SingleAxis
3.2.14.3
Purpose
Purpose
The function block _MC_ReadAxisError reads the error status of an axis or an external
encoder. The error status is a 32-bit representation of all alarms present on the technology
object.
3.2.14.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
External encoders
PLCopen Blocks
100
Blocks
3.2 SingleAxis
3.2.14.5
Input parameters
Input parameters
Parameters Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
3.2.14.6
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Valid
BOOL
FALSE
Display of the validity of the value which can be read at output AxisErrorID.
Busy
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
AxisErrorID
DWORD
PLCopen Blocks
Function Manual, 02/2012
101
Blocks
3.2 SingleAxis
3.2.14.7
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
Generally, the following is valid:
The ErrorID on the _MC_... function blocks refer to special block-related errors and to
errors on the axis
The AxisErrorID on the _MC_ReadAxisError function block refers to errors on the axis
See also
Troubleshooting - PLCopen Blocks (Page 167)
Query of general errors with the _MC_ReadAxisError function block (Page 173)
PLCopen Blocks
102
Blocks
3.2 SingleAxis
3.2.14.8
Example
The _MC_ReadAxisError block reads the group error bit string ("errorGroup" system
variable) value of the axis transferred on the Axis input parameter.
B0&B0RYH9HORFLW\
B0&B0RYH9HORFLW\
$[LVB
([HFXWHB
326,7,9(
)$/6(
$[LV
([HFXWH
9HORFLW\
,Q9HORFLW\
%XV\
$FWLYH
$FFHOHUDWLRQ &RPPDQG$ERUWHG
'HFHOHUDWLRQ
-HUN
'LUHFWLRQ
&XUUHQW
(UURU
(UURU,'
$[LVB
([HFXWHB
$ERUW
326,7,9(
)$/6(
$[LV
([HFXWH
9HORFLW\
,Q9HORFLW\
%XV\
$FWLYH
$FFHOHUDWLRQ &RPPDQG$ERUWHG
'HFHOHUDWLRQ
-HUN
'LUHFWLRQ
&XUUHQW
(UURU
(UURU,'
B0&B5HDG$[LV(UURU
$[LV
(QDEOH
([HFXWHB
$ERUW
([HFXWHB
(QDEOH
9DOLG
(UURU
$[LV(UURU,'
725HVHW(UURU
$[LV
(QDEOH
9DOLG
%XV\
(UURU
(UURU,'
$[LV(UURU,'
9DOLG
(UURU
$[LV(UURU,'
W
GLVDEOH$[LV
W
[
72UHVWDUW
9HORFLW\
W
Figure 3-30
_MC_ReadAxisError example
PLCopen Blocks
Function Manual, 02/2012
103
Blocks
3.2 SingleAxis
3.2.15
3.2.15.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.15.2
Schematic diagram
Schematic diagram
Figure 3-31
PLCopen Blocks
104
Blocks
3.2 SingleAxis
3.2.15.3
Purpose
Purpose
The function block _MC_ReadParameter reads values of various parameters of an axis or
external encoder. Each parameter is specified by a number.
3.2.15.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
3.2.15.5
External encoders
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
ParameterNumber
INT
PLCopen Blocks
Function Manual, 02/2012
105
Blocks
3.2 SingleAxis
Description
LREAL
Read
LREAL
Read/Write
LREAL
Read/Write
7 1)
LREAL
Read/Write
typeofaxis.numberofdatasets.dataset_x.dynamicfollowing.minpositiontolerance:
Minimum permissible following error
LREAL
Read/Write
10
LREAL
Read
11
LREAL
Read
12
LREAL
Read/Write
16
LREAL
Read/Write
1)
The "x" in the name "dataset_x" stands for the active data set.
Table 3- 6
Description
10
3.2.15.6
LREAL
Read
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Valid
BOOL
FALSE
Indicates the validity of the value that can be read at output Value
Busy
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
Value
LREAL
0.0
PLCopen Blocks
106
Blocks
3.2 SingleAxis
3.2.15.7
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
107
Blocks
3.2 SingleAxis
3.2.15.8
Example
The _MC_ReadParameter block reads the actual velocity of the axis transferred on the Axis
input parameter.
B0&B5HDG3DUDPHWHU
B0&B0RYH9HORFLW\
$[LVB
([HFXWH
326,7,9(
)$/6(
,Q9HORFLW\
$[LV
%XV\
([HFXWH
$FWLYH
9HORFLW\
$FFHOHUDWLRQ &RPPDQG$ERUWHG
(UURU
'HFHOHUDWLRQ
(UURU,'
-HUN
'LUHFWLRQ
&XUUHQW
$[LV
(QDEOH
$ERUW
$[LV
(QDEOH
3DUDPHWHU1XPEHU
9DOLG
%XV\
(UURU
(UURU,'
9DOXH
9DOLG
(UURU
9DOXH
([HFXWH
W
BGLVDEOH$[LV
$ERUW
(QDEOH
9DOLG
(UURU
9DOXH
72UHVWDUW
9HORFLW\
W
Figure 3-32
_MC_ReadParameter example
PLCopen Blocks
108
Blocks
3.2 SingleAxis
3.2.16
3.2.16.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.16.2
Schematic diagram
Schematic diagram
Figure 3-33
PLCopen Blocks
Function Manual, 02/2012
109
Blocks
3.2 SingleAxis
3.2.16.3
Purpose
Purpose
The function block _MC_ReadBoolParameter reads values of various parameters of an axis
or external encoder. Each parameter is specified by a number. The return value of the
parameter is converted to the data type of the function block (BOOL), i.e. values that are not
of the data type BOOL are converted to FALSE when they are exactly 0 and to TRUE in all
other cases.
3.2.16.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
3.2.16.5
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
ParameterNumber
INT
PLCopen Blocks
110
Blocks
3.2 SingleAxis
Parameter
Data type
Description
BOOL
6 1)
BOOL
1)
The "x" in the name "dataset_x" stands for the active data set.
3.2.16.6
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Valid
BOOL
FALSE
Indicates the validity of the value that can be read at output Value
Busy
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
Value
3.2.16.7
BOOL
FALSE
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
111
Blocks
3.2 SingleAxis
3.2.16.8
Example
The _MC_ReadBoolParameter block reads the monitoring status of the software limit
switches and converts the value read into the Boolean output value displayed.
B0&B0RYH$EVROXWH
B0&B0RYH$EVROXWH
$[LVB
([HFXWHB
326,7,9(
$[LVB
([HFXWHB
326,7,9(
$[LV
'RQH
([HFXWH
%XV\
3RVLWLRQ
$FWLYH
9HORFLW\
&RPPDQG$ERUWHG
$FFHOHUDWLRQ
(UURU
'HFHOHUDWLRQ
(UURU,'
-HUN
'LUHFWLRQ
$[LV
'RQH
([HFXWH
%XV\
3RVLWLRQ
$FWLYH
9HORFLW\ &RPPDQG$ERUWHG
$FFHOHUDWLRQ
(UURU
'HFHOHUDWLRQ
(UURU,'
-HUN
'LUHFWLRQ
B0&B5HDG%RRO3DUDPHWHU
$[LV
(QDEOH
$[LV
(QDEOH
3DUDPHWHU1XPEHU
9DOLG
%XV\
(UURU
(UURU,'
9DOXH
9DOXH
([HFXWHB
([HFXWHB
(QDEOH
9DOXH
6RIWZDUHOLPLWVZLWFK
PRQLWRULQJ
9HORFLW\
3RVLWLRQ
Figure 3-34
_MC_ReadBoolParameter example
PLCopen Blocks
112
Blocks
3.2 SingleAxis
3.2.17
3.2.17.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.17.2
Schematic diagram
Schematic diagram
Figure 3-35
3.2.17.3
Purpose
Purpose
The function block _MC_WriteParameter writes values of various parameters of an axis.
Each axis parameter is specified by a number.
3.2.17.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
PLCopen Blocks
Function Manual, 02/2012
113
Blocks
3.2 SingleAxis
3.2.17.5
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
ParameterNumber
INT
Value
LREAL
0.0
Data type
Description
LREAL
LREAL
LREAL
typeofaxis.numberofdatasets.dataset_x.dynamicfollowing.minpositiontolerance;
typeofaxis.numberofdatasets.dataset_x.dynamicfollowing.maxpositiontolerance:
Minimum or maximum permissible following error
LREAL
12
LREAL
16
LREAL
1) 2)
1)
The "x" in the name "dataset_x" stands for the active data set, i.e. the data item that is combined with parameter 7 is
only changed at this data set.
2)
PLCopen Blocks
114
Blocks
3.2 SingleAxis
3.2.17.6
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Error
BOOL
FALSE
DWORD
3.2.17.7
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
115
Blocks
3.2 SingleAxis
3.2.17.8
Example
The _MC_WriteParameter block changes the maximum permissible acceleration for the axis
transferred on the Axis input parameter.
B0&B0RYH9HORFLW\
B0&B0RYH9HORFLW\
$[LVB
([HFXWHB
326,7,9(
)$/6(
$[LVB
([HFXWHB
326,7,9(
)$/6(
$[LV
,Q9HORFLW\
([HFXWH
%XV\
9HORFLW\
$FWLYH
$FFHOHUDWLRQ &RPPDQG$ERUWHG
'HFHOHUDWLRQ
(UURU
-HUN
(UURU,'
'LUHFWLRQ
&XUUHQW
$[LV
,Q9HORFLW\
([HFXWH
%XV\
9HORFLW\
$FWLYH
$FFHOHUDWLRQ &RPPDQG$ERUWHG
'HFHOHUDWLRQ
(UURU
-HUN
(UURU,'
'LUHFWLRQ
&XUUHQW
B0&B:ULWH3DUDPHWHU
$[LV
([HFXWHB
([HFXWHB
$[LV
([HFXWH
3DUDPHWHU1XPEHU
9DOXH
'RQH
%XV\
(UURU
(UURU,'
'RQH
([HFXWHB
([HFXWHB
'RQH
9HORFLW\
$FFHOHUDWLRQ
Figure 3-36
_MC_WriteParameter example
PLCopen Blocks
116
Blocks
3.2 SingleAxis
3.2.18
3.2.18.1
Overview
Schematic diagram
Purpose
Applicable for
Input parameters
Output parameters
ErrorIDs
Example
3.2.18.2
Schematic diagram
Schematic diagram
Figure 3-37
3.2.18.3
Purpose
Purpose
The function block _MC_WriteBoolParameter writes values of various parameters of an axis.
Each axis parameter is specified by a number.
3.2.18.4
Applicable for
Applications
Drive axes
Positioning axes
Following axes
Path axes
PLCopen Blocks
Function Manual, 02/2012
117
Blocks
3.2 SingleAxis
3.2.18.5
Input parameters
Input parameters
Parameters
Data type
Initial value
Description
Axis
AXIS_REF
Execute
BOOL
FALSE
ParameterNumber
INT
Value
BOOL
FALSE
Data type
Description
BOOL
swlimit.state: Activation of the positive and negative software limit switches (the limit
switches are always activated or deactivated together)
6 1) 2)
BOOL
typeofaxis.numberofdatasets.dataset_x.dynamicfollowing.enable: Activation of
following error monitoring (the change only takes effect after a restart)
The data sets are configured at the corresponding technology object.
Several data sets can be used, in order to (for example):
Change over the encoder used during operation (motor encoder, machine
encoder, etc.)
For more details, refer to the "TO Axis Electric / Hydraulic, External Encoder"
Function Manual.
1)
The "x" in the name "dataset_x" stands for all existing data sets, i.e. the data item that is combined with parameter 6 is
changed in all data sets at the same time.
2)
PLCopen Blocks
118
Blocks
3.2 SingleAxis
3.2.18.6
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Error
BOOL
FALSE
DWORD
3.2.18.7
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
119
Blocks
3.2 SingleAxis
3.2.18.8
Example
The _MC_ WriteBoolParameter block activates software limit switch monitoring for the axis
transferred on the Axis input parameter.
B0&B0RYH$EVROXWH
B0&B0RYH$EVROXWH
$[LVB
([HFXWHB
326,7,9(
$[LVB
([HFXWHB
326,7,9(
'RQH
$[LV
%XV\
([HFXWH
$FWLYH
3RVLWLRQ
9HORFLW\ &RPPDQG$ERUWHG
(UURU
$FFHOHUDWLRQ
(UURU,'
'HFHOHUDWLRQ
-HUN
'LUHFWLRQ
'RQH
$[LV
%XV\
([HFXWH
$FWLYH
3RVLWLRQ
9HORFLW\ &RPPDQG$ERUWHG
(UURU
$FFHOHUDWLRQ
(UURU,'
'HFHOHUDWLRQ
-HUN
'LUHFWLRQ
$ERUW
_MC_WriteBoolParameter
$[LV
([HFXWH
3DUDPHWHU1XPEHU
9DOXH
$[LV
([HFXWHB
758(
([HFXWHB
'RQH
%XV\
(UURU
(UURU,'
'RQH
([HFXWHB
$ERUW
([HFXWHB
'RQH
9HORFLW\
W
3RVLWLRQ
W
Figure 3-38
_MC_WriteBoolParameter example
PLCopen Blocks
120
Blocks
3.3 MultiAxis
3.3
MultiAxis
3.3.1
3.3.1.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Examples
3.3.1.2
Schematic diagram
Schematic diagram
Figure 3-39
PLCopen Blocks
Function Manual, 02/2012
121
Blocks
3.3 MultiAxis
3.3.1.3
Purpose
Purpose
The function block _MC_GearIn starts a gearing between a master and a slave axis.
The dynamic response parameters Velocity, Acceleration, Deceleration, and Jerk define the
dynamic response of the slave axis during synchronization in accordance with time.
The gear ratio is specified as a fraction.
Synchronous operation may be:
relative to the start position or synchronization position
absolute, in relation to the axis zero
By transmitting a new _MC_GearIn command, the gear ratio can be changed during
operation. This operation does not require the master or slave axis to be stopped.
Transitions are executed according to specified acceleration or deceleration values.
The function block can be started when the leading axis is at a standstill, or when it is in
motion.
3.3.1.4
Applicable for
Applications
Master:
Positioning axes
Following axes
Path axes
External Encoders
...
Slave:
Following axes
Path axes with synchronous operation activated
3.3.1.5
Requirements
Requirements
The master is set for use as a potential master value at the synchronous object of the slave
axis.
Master and slave axes are enabled.
No _MC_Stop active on the slave axis
PLCopen Blocks
122
Blocks
3.3 MultiAxis
3.3.1.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Master
AXIS_REF
Slave
AXIS_REF
Execute
BOOL
FALSE
RatioNumerator
DINT
RatioDenominator
DINT
Velocity
LREAL
-1.0
Acceleration
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
123
Blocks
3.3 MultiAxis
Parameter
Data type
Initial value
Description
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PhaseShift
LREAL
0.0
PLCopen Blocks
124
Blocks
3.3 MultiAxis
Parameter
Data type
Initial value
Description
Absolute
BOOL
TRUE
Mode
_MC_GearInMode
USER_DEFAULT
Absolute (userDefault.gearingSettings.typeOfGearing),
RatioNumerator
(userDefault.gearingSettings.defineMode,
userDefault.gearingSettings.numerator), and
RatioDenominator
(userDefault.gearingSettings.defineMode,
userDefault.gearingSettings.denominator)
the synchronization parameters preset at the synchronous
object in the "Preassignment > Gearing" ( system variables
under userdefault.gearingsettings) and "Preassignment >
Dynamic Response" ( system variables under
userdefault.syncdynamics) dialogs are accepted.
IMMEDIATELY_BY_TIME_PROFILE:
Synchronization is performed immediately according to time
taking into account the dynamic response values set on the
function block. Synchronous operation is operated using the
synchronous object settings
1)
SYSTEM_DEFINED corresponds to the shortest distancesetting, although the direction of motion is maintained while
the axis is in motion.
PLCopen Blocks
Function Manual, 02/2012
125
Blocks
3.3 MultiAxis
Note
The gearing direction is preassigned by userDefault.velocityGearingSettings.direction
(Preassignment > Gearing > Direction). The direction can also be inverted, e.g. for
synchronous operation in the opposite direction.
3.3.1.7
Output parameter
Output parameter
Parameter
Data type
Initial value
InGear
BOOL
FALSE
Description
Display of the synchronism of the master and slave axis
With TRUE, the slave axis is in synchronous operation with the master.
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.3.1.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
126
Blocks
3.3 MultiAxis
3.3.1.9
Examples
Example: Gearing
At the master axis, a positioning command is active at 100 mm. Two mutually overriding
_MC_GearIn blocks with different gear ratios establish the gearing between the axes
transferred on the master and slave input parameters.
_MC_GearIn
0DVWHU
6ODYH
([HFXWHB
758(
,00(',$7(/<B%<
B7,0(B352),/(
0DVWHU
,Q*HDU
6ODYH
%XV\
([HFXWH
$FWLYH
5DWLR1XPHUDWRU &RPPDQG$ERUWHG
5DWLR'RPLQDWRU
(UURU
9HORFLW\
(UURU,'
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
3KDVH6KLIW
$EVROXWH
0RGH
_MC_GearIn
,Q*HDUB
$ERUWHG
0DVWHU
6ODYH
([HFXWHB
758(
,00(',$7(/<B%<B
7,0(B352),/(
0DVWHU
,Q*HDU
%XV\
6ODYH
([HFXWH
$FWLYH
5DWLR1XPHUDWRU &RPPDQG$ERUWHG
5DWLR'RPLQDWRU
(UURU
9HORFLW\
(UURU,'
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
3KDVH6KLIW
$EVROXWH
0RGH
,Q*HDUB
1
Execute_1
1
InGear_1
Aborted
0
1
0
Execute_2
1
0
IncGear_2
1
0
100
Master Position
Slave Position
50
t
20
Master Velocity
Slave Velocity
10
t
-10
Figure 3-40
PLCopen Blocks
Function Manual, 02/2012
127
Blocks
3.3 MultiAxis
PLCopen Blocks
128
Blocks
3.3 MultiAxis
B0&B*HDU,Q
,Q*HDU
%XV\
$FWLYH
0DVWHU
6ODYH
([HFXWH
0DVWHU
6ODYH
([HFXWHB
)$/6(
,00(',$7(/<B%<B
7,0(B352),/(
5DWLR1XPHUDWRU
&RPPDQG$ERUWHG
5DWLR'HQRPLQDWRU
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
3KDVH6KLIW
$EVROXWH
0RGH
([HFXWHB
B0&B*HDU,Q
(UURU
(UURU,'
,Q*HDUB
0DVWHU
6ODYH
([HFXWHB
$ERUWHG
758(
,00(',$7(/<B%<B
7,0(B352),/(
,Q*HDUB
(UURU
(UURU,'
([HFXWHB
&RPPDQG$ERUWHG
5DWLR'HQRPLQDWRU
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
3KDVH6KLIW
$EVROXWH
0RGH
$ERUWHG
5DWLR1XPHUDWRU
,Q*HDUB
,Q*HDUB
,Q*HDU
%XV\
$FWLYH
0DVWHU
6ODYH
([HFXWH
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
W
0DVWHU9HORFLW\
W
6ODYH9HORFLW\
Figure 3-41
PLCopen Blocks
Function Manual, 02/2012
129
Blocks
3.3 MultiAxis
3.3.2
3.3.2.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.3.2.2
Schematic diagram
Schematic diagram
Figure 3-42
PLCopen Blocks
130
Blocks
3.3 MultiAxis
3.3.2.3
Purpose
Purpose
The function block _MC_GearOut terminates a gearing and stops the slave axis. The slave
axis is desynchronized in accordance with the presettings at the synchronous object in the
"Preassignment > Gearing" ( system variables under userdefault.gearingsettings) and
"Preassignment > Dynamic Response" ( system variables under
userdefault.syncdynamics) dialogs.
Recommendation
Use the function block when the shutdown procedure is to depend on the position of the
master and/or the slave axis. You can also remove the slave axis from the synchronous
operation with the technology functions _MC_Stop, _MC_MoveRelative, _MC_MoveAdditive,
_MC_MoveAbsolute or _MC_MoveVelocity.
3.3.2.4
Applicable for
Applications
Following axes
Path axes with synchronous operation activated
3.3.2.5
Requirements
Requirements
A gearing must be active on the slave axis. If no synchronous operation is active, the
function block is aborted.
No _MC_Stop active on the slave axis.
PLCopen Blocks
Function Manual, 02/2012
131
Blocks
3.3 MultiAxis
3.3.2.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Slave
AXIS_REF
Execute
BOOL
FALSE
3.3.2.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
PLCopen Blocks
132
Blocks
3.3 MultiAxis
3.3.2.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
133
Blocks
3.3 MultiAxis
3.3.2.9
Example
At the master axis, a positioning command is active at 100 mm. The _MC_GearOut block
terminates gearing of the axis transferred on the slave input parameter.
B0&B*HDU2XW
B0&B*HDU,Q
0DVWHU
6ODYH
([HFXWHB
758(
,00(',$7(/<B%<B
7,0(B352),/(
0DVWHU
6ODYH
([HFXWH
,Q*HDU
%XV\
$FWLYH
5DWLR1XPEHUDWRU &RPPDQG$ERUWHG
5DWLR'HQRPLQDWRU
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
3KDVH6KLIW
$EVROXWH
0RGH
(UURU
(UURU,'
,Q*HDU
6ODYH
([HFXWHB
6ODYH
([HFXWH
'RQH
%XV\
$FWLYH
&RPPDQG$ERUWHG
(UURU
(UURU,'
'RQH
([HFXWHB
,Q*HDU
([HFXWHB
'RQH
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
W
0DVWHU9HORFLW\
6ODYH9HORFLW\
W
Figure 3-43
_MC_GearOut example
PLCopen Blocks
134
Blocks
3.3 MultiAxis
3.3.3
3.3.3.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Examples
3.3.3.2
Schematic diagram
Schematic diagram
Figure 3-44
PLCopen Blocks
Function Manual, 02/2012
135
Blocks
3.3 MultiAxis
3.3.3.3
Purpose
Purpose
The function block _MC_CamIn starts a camming between a master and a slave axis.
The dynamic response parameters Velocity, Acceleration, Deceleration, and Jerk define the
dynamic response of the slave axis during synchronization in accordance with time.
The cam profile can be scaled and/or the position offset.
The specified cam can optionally be run through once or periodically.
Camming can be relative or absolute.
3.3.3.4
Applicable for
Applications
Master:
Positioning axes
Following axes
Path axes
External Encoders
...
Slave:
Following axes
Path axes with synchronous operation activated
3.3.3.5
Requirements
Requirements
When configuring the synchronous object of the slave axis, you must have selected the
required cam and master as potential interconnection objects.
Master and slave axes are enabled.
No _MC_Stop active on the slave axis
PLCopen Blocks
136
Blocks
3.3 MultiAxis
3.3.3.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Master
AXIS_REF
Slave
AXIS_REF
CamTable
MC_CAM_REF
Execute
BOOL
FALSE
MasterOffset
LREAL
0.0
SlaveOffset
LREAL
0.0
MasterScaling
LREAL
1.0
SlaveScaling
LREAL
1.0
MasterAbsolute
BOOL
TRUE
SlaveAbsolute
BOOL
TRUE
CyclicMode
BOOL
TRUE
PLCopen Blocks
Function Manual, 02/2012
137
Blocks
3.3 MultiAxis
Parameter
Data type
Initial value
Description
Velocity
LREAL
-1.0
Acceleration
LREAL
-1.0
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
138
Blocks
3.3 MultiAxis
Parameter
Data type
Initial value
Description
Mode
_MC_CamInMode
USER_DEFAULT
MasterAbsolute
(userDefault.cammingSettings.masterMode),
SlaveAbsolute
(userDefault.cammingSettings.slaveMode) and
CyclicMode
(userDefault.cammingSettings.cammingMode)
the synchronization parameters preset at the synchronous
object in the "Preassignment > Camming" ( system
variables under userdefault.cammingsettings) and
"Preassignment > Dynamic Response" ( system variables
under userdefault.syncdynamics) dialogs are accepted.
IMMEDIATELY_BY_TIME_PROFILE:
Synchronization is performed immediately according to time
taking into account the dynamic response values set on the
function block. Synchronous operation is performed using
the synchronous object settings
1)
SYSTEM_DEFINED corresponds to the shortest distancesetting, although the direction of motion is maintained while
the axis is in motion.
PLCopen Blocks
Function Manual, 02/2012
139
Blocks
3.3 MultiAxis
3.3.3.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
InSync
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
With TRUE, the slave axis is in synchronous operation with the master.
With TRUE, the function block has been started.
Display of the command activity in the function block
With TRUE, the command is processed by the command execution, i.e.
the function block has active control over the axis / technology object.
The command is processed in the interpolator.
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
EndOfProfile
Bool
FALSE
3.3.3.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
140
Blocks
3.3 MultiAxis
3.3.3.9
Examples
Example: Camming
At the master axis, a positioning command is active at 100 mm. Two mutually overriding
_MC_CamIn blocks with different cam profiles establish the camming between the axes
transferred on the master and slave input parameters.
_MC_CamIn
Master
Slave
Cam_1
Execute_1
0
0
1
1
TRUE
TRUE
TRUE
100
20
20
0
IMMEDIATELY_BY_TI
ME_PROFILE
_MC_CamIn
Master
InSync
Slave
Busy
CamTable
Active
Execute
CommandAborted
MasterOffset
Error
SlaveOffset
ErrorID
MasterScaling
SlaveScaling
MasterAbsolute
SlaveAbsolute
CyclicMode
Velocity
Acceleration
Deceleration
Jerk
Mode
InSync_1
Master
Slave
Cam_2
AbortExecute_2
0
0
1
1
TRUE
TRUE
TRUE
100
20
20
0
IMMEDIATELY_BY_TI
ME_PROFILE
Master
InSync
Slave
Busy
CamTable
Active
Execute
CommandAborted
MasterOffset
Error
SlaveOffset
ErrorID
MasterScaling
SlaveScaling
MasterAbsolute
SlaveAbsolute
CyclicMode
Velocity
Acceleration
Deceleration
Jerk
Mode
100
Slave Position
InSync_2
Cam_1
50
Cam_2
50
100
Master Position
1
Execute_1
1
InSync_1
Aborted
Execute_2
1
0
1
0
1
IncSync_2
100
Master Position
Slave Position
t
20
Master Velocity
10
Slave Velocity
t
-10
Figure 3-45
PLCopen Blocks
Function Manual, 02/2012
141
Blocks
3.3 MultiAxis
_MC_CamIn
Master
InSync
Slave
Busy
CamTable
Active
Execute
CommandAborted
MasterOffset
Error
SlaveOffset
ErrorID
MasterScaling
SlaveScaling
MasterAbsolute
SlaveAbsolute
CyclicMode
Velocity
Acceleration
Deceleration
Jerk
Mod
e
InSync_1
Abort-
Master
Slave
Cam
Execute_2
0
10
1
1
TRUE
TRUE
TRUE
100
20
20
0
IMMEDIATELY_BY_TI
ME_PROFILE
Master
InSync
Slave
Busy
CamTable
Active
Execute
CommandAborted
MasterOffset
Error
SlaveOffset
ErrorID
MasterScaling
SlaveScaling
MasterAbsolute
SlaveAbsolute
CyclicMode
Velocity
Acceleration
Deceleration
Jerk
Mod
100
Slave Position
InSync_2
Cam
50
0
50
100
Master Position
1
Execute_1
1
InSync_1
Aborted
Execute_2
1
0
1
IncSync_2
20
10
t
Figure 3-46
PLCopen Blocks
142
Blocks
3.3 MultiAxis
PLCopen Blocks
Function Manual, 02/2012
143
Blocks
3.3 MultiAxis
B0&B&DP,Q
B0&B&DP,Q
0DVWHU
6ODYH
&DP
([HFXWHB
758(
758(
758(
,00(',$7(/<B%<B
7,0( B352),/(
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
,Q6\QFB
0DVWHU
6ODYH
&DP
$ERUWHG ([HFXWHB
758(
758(
758(
,00(',$7(/<B%<B
7,0( B352),/(
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
&DP
6ODYH3RVLWLRQ
,Q6\QFB
0DVWHU3RVLWLRQ
([HFXWHB
,Q6\QFB
$ERUWHG
([HFXWHB
,QF6\QFB
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
W
0DVWHU9HORFLW\
6ODYH9HORFLW\
W
Figure 3-47
PLCopen Blocks
144
Blocks
3.3 MultiAxis
Example: Camming with starting point shift to actual position of slave axis
At the master axis, a positioning command is active at 100 mm. When the first block starts
(Execute_1 = TRUE), the slave axis synchronizes to the master axis in accordance with the
positional relationship PosSlave = PosMaster and then follows this axis.
When the second block starts (Execute_2 = TRUE), the cam starting point is shifted to the
actual position of the slave axis (PosSlave = 48 mm) ( interpretation of slave position relative
to cam starting point). The cam does not change in relation to the master position
( interpretation of master position is absolute in the cam's range of values). Therefore, for
the second block the equation PosSlave = PosMaster + 48 mm applies as the positional
relationship.
In the figure below, in accordance with this positional relationship the position setpoint of the
slave axis is shifted by 48 mm in relation to the master position. Once the master position
setpoint of 100 mm has been reached, the result is a position setpoint of 148 mm
(100 mm + 48 mm = 148 mm) for the slave axis.
PLCopen Blocks
Function Manual, 02/2012
145
Blocks
3.3 MultiAxis
B0&B&DP,Q
0DVWHU
6ODYH
&DPB
([HFXWHB
758(
)$/6(
758(
,00(',$7(/<B%<B
7,0( B352),/(
6ODYH3RVLWLRQ
B0&B&DP,Q
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
0DVWHU
6ODYH
&DP
$ERUWHG ([HFXWHB
758(
)$/6(
758(
,00(',$7(/<B%<B
7,0(B352),/(
,Q6\QFB
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
([HFXWHB 758(
,Q6\QFB
0DVWHU3RVLWLRQ
([HFXWHB
,Q6\QFB
$ERUWHG
([HFXWHB
,QF6\QFB
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
W
0DVWHU9HORFLW\
6ODYH9HORFLW\
W
Figure 3-48
_MC_CamIn example: Camming with starting point shift to actual position of slave axis
PLCopen Blocks
146
Blocks
3.3 MultiAxis
Example: Camming with starting point shift to actual position of master axis
At the master axis, a positioning command is active at 100 mm. When the first block starts
(Execute_1 = TRUE), the cam starting point is shifted to the actual position of the master
axis (PosMaster = 2 mm) ( interpretation of master position relative to cam starting point). For
this reason, the positional relationship between the slave and master positions must be
corrected as follows:
(PosSlave = PosMaster) PosSlave = PosMaster 2 mm.
This results in a 2 mm shift of the slave position in relation to the master position that is
permanent pending further notice.
When the second block is started (Execute_2 = TRUE), the cam starting point is shifted
repeatedly to the actual position of the master axis (PosMaster = 48 mm). Therefore, the
following equation applies for the second block:
(PosSlave = PosMaster 2 mm) PosSlave = PosMaster 48 mm
In accordance with the positional relationship the position setpoint of the slave axis reset to
zero, and in the figure below, is shifted by 48 mm in relation to the master position. Once the
master position setpoint of 100 mm has been reached, the result is a position setpoint of 52
mm (100 mm 48 mm = 52 mm) for the slave axis.
PLCopen Blocks
Function Manual, 02/2012
147
Blocks
3.3 MultiAxis
B0&B&DP,Q
0DVWHU
6ODYH
&DPB
([HFXWHB
)$/6(
758(
758(
,00(',$7(/<B%<B
7,0( B352),/(
B0&B&DP,Q
0DVWHU
6ODYH
&DP
$ERUWHG ([HFXWHB
)$/6(
758(
758(
,00(',$7(/<B%<B
7,0(B352),/(
,Q6\QFB
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
52
46
48
52
([HFXWHB 758(
([HFXWHB
,Q6\QFB
([HFXWHB
758(
6ODYH3RVLWLRQ
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
98 102
148
0DVWHU3RVLWLRQ
,Q6\QFB
$ERUWHG
([HFXWHB
,QF6\QFB
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
48
2
52
46
0DVWHU9HORFLW\
6ODYH9HORFLW\
Figure 3-49
_MC_CamIn example: Camming with starting point shift to actual position of master axis
PLCopen Blocks
148
Blocks
3.3 MultiAxis
3.3.4
3.3.4.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.3.4.2
Schematic diagram
Schematic diagram
Figure 3-50
3.3.4.3
Purpose
Purpose
The function block _MC_CamOut terminates a camming and stops the slave axis. The slave
axis is desynchronized in accordance with the presettings at the synchronous object in the
"Preassignment > Camming" ( system variables under userdefault.cammingsettings) and
"Preassignment > Dynamic Response" ( system variables under
userdefault.syncdynamics) dialogs.
PLCopen Blocks
Function Manual, 02/2012
149
Blocks
3.3 MultiAxis
Recommendation
Use the function block when the shutdown procedure is to depend on the position of the
master and/or the slave axis. You can also remove the slave axis from the synchronous
operation with the technology functions _MC_Stop, _MC_MoveRelative, _MC_MoveAdditive,
_MC_MoveAbsolute or _MC_MoveVelocity.
3.3.4.4
Applicable for
Applications
Following axes
Path axes with synchronous operation activated
3.3.4.5
Requirements
Requirements
A camming must be active on the slave axis. If no synchronous operation is active, the
function block is aborted.
No _MC_Stop active on the slave axis
3.3.4.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Slave
AXIS_REF
Execute
BOOL
FALSE
PLCopen Blocks
150
Blocks
3.3 MultiAxis
3.3.4.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.3.4.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
151
Blocks
3.3 MultiAxis
3.3.4.9
Example
At the master axis, a positioning command is active at 100 mm. The _MC_CamOut block
terminates camming of the axis transferred on the slave input parameter.
B0&B&DP2XW
B0&B&DP,Q
0DVWHU
6ODYH
&DP
([HFXWHB
758(
758(
758(
,00(',$7(/<B%<B
7,0(B352),/(
,Q6\QF
0DVWHU
%XV\
6ODYH
$FWLYH
&DP7DEOH
([HFXWH &RPPDQG$ERUWHG
(UURU
0DVWHU2IIVHW
6ODYH2IIVHW
(UURU,'
0DVWHU6FDOLQJ
6ODYH6FDOLQJ
0DVWHU$EVROXWH
6ODYH$EVROXWH
&\FOLF0RGH
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
0RGH
,Q6\QF
6ODYH
([HFXWHB
6ODYH
([HFXWH
6ODYH3RVLWLRQ
'RQH
%XV\
$FWLYH
&RPPDQG$ERUWHG
(UURU
(UURU,'
'RQH
&DP
0DVWHU3RVLWLRQ
([HFXWHB
,Q6\QF
([HFXWHB
'RQH
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
W
0DVWHU9HORFLW\
6ODYH9HORFLW\
W
Figure 3-51
_MC_CamOut example:
PLCopen Blocks
152
Blocks
3.3 MultiAxis
3.3.5
_MC_Phasing - Changing phase shift between the leading axis and following
axis
3.3.5.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
ErrorIDs
Example
3.3.5.2
Schematic diagram
Schematic diagram
Figure 3-52
PLCopen Blocks
Function Manual, 02/2012
153
Blocks
3.3 MultiAxis
3.3.5.3
Purpose
Purpose
The function block _MC_Phasing shifts the position of the slave axis with respect to the
master.
The effect on a following axis during camming equates to a horizontal cam shift.
The shift can be absolute or relative to the existing offsets.
The dynamic response parameters Velocity, Acceleration, Deceleration and Jerk define the
dynamic response of the motion procedure.
3.3.5.4
Applicable for
Applications
Following axes operating during camming or gearing
Path axes with synchronous operation activated during camming or gearing
3.3.5.5
Requirements
Requirements
No _MC_Stop active on the slave axis
A camming or gearing must be active on the slave axis.
3.3.5.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Master
AXIS_REF
Slave
AXIS_REF
Execute
BOOL
FALSE
PLCopen Blocks
154
Blocks
3.3 MultiAxis
Parameter
Data type
Initial value
Description
PhaseShift
LREAL
1.0
Velocity
LREAL
-1.0
Acceleration
LREAL
-1.0
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
Absolute
BOOL
TRUE
PLCopen Blocks
Function Manual, 02/2012
155
Blocks
3.3 MultiAxis
3.3.5.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
ErrorID
DWORD
3.3.5.8
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
156
Blocks
3.3 MultiAxis
3.3.5.9
Example
At the master axis, a positioning command is active at 100 mm. The _MC_Phasing block
shifts the position of the slave following axis transferred on the slave input parameter.
B0&B*HDU,Q
0DVWHU
6ODYH
([HFXWHB
758(
,00(',$7(/<B%<B
7,0(B352),/(
0DVWHU
6ODYH
([HFXWH
B0&B3KDVLQJ
,Q*HDU
%XV\
$FWLYH
5DWLR1XPEHUDWRU &RPPDQG$ERUWHG
5DWLR'HQRPLQDWRU
9HORFLW\
$FFHOHUDWLRQ
'HFHOHUDWLRQ
-HUN
3KDVH6KLIW
$EVROXWH
0RGH
(UURU
(UURU,'
,Q*HDU
0DVWHU
6ODYH
([HFXWHB
758(
'RQH
0DVWHU
%XV\
6ODYH
$FWLYH
([HFXWH
3KDVH6KLIW &RPPDQG$ERUWHG
(UURU
9HORFLW\
$FFHOHUDWLRQ
(UURU,'
'HFHOHUDWLRQ
-HUN
$EVROXWH
'RQH
([HFXWHB
,Q*HDU
([HFXWHB
'RQH
0DVWHU3RVLWLRQ
6ODYH3RVLWLRQ
W
0DVWHU9HORFLW\
6ODYH9HORFLW\
W
Figure 3-53
_MC_Phasing example
PLCopen Blocks
Function Manual, 02/2012
157
Blocks
3.4 Advanced functions
3.4
Advanced functions
3.4.1
3.4.1.1
Overview
Schematic diagram
Purpose
Applicable for
Requirements
Input parameters
Output parameters
Function
ErrorIDs
3.4.1.2
Schematic diagram
Schematic diagram
Figure 3-54
PLCopen Blocks
158
Blocks
3.4 Advanced functions
3.4.1.3
Purpose
Purpose
The function block _MC_Jog implements a continuous or incremental jogging of an axis.
3.4.1.4
Applicable for
Applications
Positioning axes
Following axes
Path axes
3.4.1.5
Requirements
Requirements
Axis enabled
No _MC_Stop active
PLCopen Blocks
Function Manual, 02/2012
159
Blocks
3.4 Advanced functions
3.4.1.6
Input parameters
Input parameters
Parameter
Data type
Initial value
Description
Axis
AXIS_REF
Enable
BOOL
FALSE
Forward
BOOL
FALSE
Backward
BOOL
FALSE
ModeInc
BOOL
FALSE
Increment
LREAL
0.0
Velocity
LREAL
-1.0
Acceleration
LREAL
-1.0
PLCopen Blocks
160
Blocks
3.4 Advanced functions
Parameter
Data type
Initial value
Description
Deceleration
LREAL
-1.0
Jerk
LREAL
-1.0
PLCopen Blocks
Function Manual, 02/2012
161
Blocks
3.4 Advanced functions
3.4.1.7
Output parameter
Output parameter
Parameter
Data type
Initial value
Description
Done
BOOL
FALSE
Busy
BOOL
FALSE
Active
BOOL
FALSE
CommandAborted
BOOL
FALSE
Error
BOOL
FALSE
Indicates an error
An error has occurred during the command execution. The cause can be
found in the ErrorID.
ErrorID
DWORD
PLCopen Blocks
162
Blocks
3.4 Advanced functions
3.4.1.8
Function
Function
The function block traverses the axis with the parameterized dynamic response values either
continuously or incrementally in a positive or negative direction.
A positive edge at the input parameters Forward or Backward starts the traversing motion; it
is stopped with the negative edge.
When incremental jogging is selected, the axis is stopped by the function block after
traversing the parameterized distance. If the axle is stopped before reaching the
parameterized distance, a restart of the motion completes the residual distance.
When incremental jogging is selected, the direction can only be changed when there is no
remaining distance to be traversed.
Enable
Enable = TRUE: Functionality of the block is processed and traversing motions are
possible; with the transition FALSE/TRUE at Enable, all output parameters are reset
and the distance-to-go is deleted.
Note: Busy is only set with an action.
Enable = FALSE: Stop of the traversing motion - traversing motions no longer
possible; with the transition from Enable = TRUE to Enable = FALSE, the _MC_Stop is
always called internally, irrespective of whether the axis is in motion or not.
Busy/Active
Incremental jogging:
Busy = TRUE / Active = TRUE: Axis moves, distance-to-go != 0
Busy = TRUE / Active = FALSE: Intermediate stop - the axis is stationary, distance-togo != 0
Continuous jogging:
After a positive edge at the input parameter Forward or Backward, Busy = TRUE is
output in the same cycle. Active is only output in the interpolator after activation of the
motion command. This may occur several cycles later.
Continuous jogging
The jogging is started with a positive edge at Forward or Backward. The axis traverses
with continuous jogging as long as the level on one of the two parameters is TRUE.
The motion is stopped with the falling edge.
If the two inputs Forward and Backward are set to TRUE at the same time, no axis
motion is started (Active = FALSE, Busy = FALSE, Done = FALSE), the distance-to-go
is deleted and no error message is generated.
If the input parameter for the opposite direction is also set during the traversing
motion, the traversing motion is stopped, the distance-to-go is deleted and also no
error message is generated.
A positive edge at Forward and a negative edge at Backward in the same cycle results
in a change of direction. The same applies for the reverse situation.
PLCopen Blocks
Function Manual, 02/2012
163
Blocks
3.4 Advanced functions
Incremental jogging
With incremental jogging, the traversing motion is stopped when the distance
parameterized in the input parameter Increment is reached. If a falling edge is
detected at the input parameter Forward (or Backward) before this, the traversing
motion is also stopped.
Behavior with distance-to-go present:
If a distance-to-go is present, i.e., the traversing motion was stopped before reaching
the distance parameterized at the input parameter Increment by a falling edge at
Forward or Backward, this state is signaled with Busy = TRUE, Done = FALSE, Active
= FALSE.
With another positive edge in the same direction of motion, the present distance-to-go
is traversed.
Incremental jogging in the opposite direction with a stopped axis and distance-to-go
present is not possible. To do this, the distance-to-go present must be deleted with
selection of continuous jogging or Enable = 0/1 and incremental jogging selected
again.
Behavior when distance-to-go is zero:
The transition Busy = TRUE to FALSE, Active = TRUE to FALSE and Done = FALSE
to TRUE signals the complete traversing of the selected increment. The distance-to-go
is 0.
Switchover from incremental / continuous jogging
A change of ModeInc during traversing with an active traversing motion results in an axis
stop without error message. If the input parameter ModeInc is changed to continuous
jogging (ModeInc=FALSE), the distance-to-go is deleted.
Override
If the Override = 0 with active, started traversing motion, then there is no traversing
motion and Active is TRUE.
Parameter acceptance
The parameter acceptance of the distances/Increment and the dynamic response
parameters (Velocity, Acceleration, ...) is performed with a rising edge of
Forward/Backward, i.e., a change of Increment, Velocity, Acceleration, Deceleration or
Jerk has no effect during traversing.
Axis not in position control
If jogging is issued and the axis is not in position control, the corresponding error
message of the used PLCopen FB is output.
PLCopen Blocks
164
Blocks
3.4 Advanced functions
3.4.1.9
ErrorIDs
ErrorIDs
The error code contains the number and, when available, the associated reason for the error
that has occurred in the function block. The error number occupies the lower 16 bits of the
error code (see Error codes of the errorID (LOW word) (Page 169)). The error reason, when
available, is also coded as a number and occupies the upper 16 bits of the error code (see
Command abort reason of the errorID (HIGH word) (Page 171)).
Note
ErrorIDs from other blocks possible
During execution of the function block _MC_Jog, the function blocks _MC_MoveVelocity,
_MC_MoveRelative and _MC_Stop are called internally.
If the _MC_Jog is aborted, errorIDs can therefore also be reported from these three function
blocks.
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
Function Manual, 02/2012
165
Blocks
3.4 Advanced functions
PLCopen Blocks
166
PLCopen Blocks
Function Manual, 02/2012
167
PLCopen Blocks
168
4.2
Description
Hex
dec
No error
Command aborted
Unknown command
Insufficient memory
10
11
No object configuration
12
13
14
15
Ambiguous commandId
10
16
11
17
12
18
13
19
14
20
15
21
16
22
17
23
18
24
19
25
1a
26
1b
27
1c
28
1d
29
1e
30
1f
31
PLCopen Blocks
Function Manual, 02/2012
169
Error code
Description
20
32
21
33
22
34
23
35
24
36
25
37
26
38
27
39
28
40
29
41
2a
42
2b
43
2c
44
The command can only not be executed when pressure limiting is active
2d
45
2e
46
2f
47
30
48
2710
10000
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
170
4.3
Description
Hex
dec
No abort reason
Abort by a stop
Acknowledgement delay
No actual value for axis (e.g., encoder or data bus not ready)
10
11
12
13
14
15
10
16
11
17
12
18
13
19
14
20
15
21
16
22
17
23
18
24
19
25
No actual values for slave (e.g., encoder or data bus not ready)
1a
26
1b
27
1c
28
1d
29
1e
30
1f
31
20
32
21
33
22
34
PLCopen Blocks
Function Manual, 02/2012
171
Description
23
35
24
36
25
37
26
38
27
39
No actual values for path axis (e.g., encoder or data bus not ready)
28
40
29
41
2a
42
2b
43
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
172
4.4
PLCopen Blocks
Function Manual, 02/2012
173
System fault
Config fault
User fault
Peripheral fault
Function fault
Function aborted
Reset/restart fault
Following error
10
Dynamic limit
11
Clamping error
12
Software limit
13
Limit switch
14
Sensor fault
15
16
Output limit
17
18
19
20
Following object
21
22
23
Path object
PLCopen Blocks
174
System fault
Config fault
User fault
Peripheral fault
Function fault
Function aborted
Reset/restart fault
14
Sensor fault
15
19
System fault
Config fault
User fault
Peripheral fault
Function fault
Function aborted
Reset/restart fault
Direct sync
Stability
10
Dynamic limit
11
Value ambiguous
PLCopen Blocks
Function Manual, 02/2012
175
System fault
Config fault
User fault
Peripheral fault
Function fault
Function aborted
Reset/restart fault
Interpolation fault
Alarms and, therefore, error states, which switch the controller to STOP mode (e.g. 20001
Internal error), can be evaluated by the _MC_ReadAxisError block in the shutdown task. In
addition to the 32-bit error representation, the TO alarms are also output.
See also
Troubleshooting - PLCopen Blocks (Page 167)
PLCopen Blocks
176
Index
_
_MC_CamIn, 135
Purpose, 136
Schematic diagram, 135
_MC_CamOut, 149
Purpose, 149
Schematic diagram, 149
_MC_GearIn, 121
Purpose, 122
Schematic diagram, 121
_MC_GearOut, 130
Purpose, 131
Schematic diagram, 130
_MC_Home, 32
Purpose, 33
Schematic diagram, 32
_MC_Jog, 158
Purpose, 159
Schematic diagram, 158
_MC_MoveAbsolute, 40
Purpose, 41
Schematic diagram, 40
_MC_MoveAdditive, 59
Purpose, 60
Schematic diagram, 59
_MC_MoveRelative, 46
Purpose, 47
Schematic diagram, 46
_MC_MoveSuperimposed, 66
Purpose, 67
Schematic diagram, 66
_MC_MoveVelocity, 52
Purpose, 53
Schematic diagram, 52
_MC_Phasing, 153
Purpose, 154
Schematic diagram, 153
_MC_PositionProfile, 72
Purpose, 73
Schematic diagram, 72
_MC_Power, 21
Purpose, 22
Schematic diagram, 21
_MC_ReadActualPosition, 89
Purpose, 90
Schematic diagram, 89
_MC_ReadAxisError, 99
Purpose, 100
Schematic diagram, 99
_MC_ReadBoolParameter, 109
Purpose, 110
Schematic diagram, 109
_MC_ReadParameter, 104
Purpose, 105
Schematic diagram, 104
_MC_ReadStatus, 94
Purpose, 95
Schematic diagram, 94
_MC_Reset, 84
Purpose, 84
Schematic diagram, 84
_MC_Stop, 27
Purpose, 27
Schematic diagram, 27
_MC_VelocityProfile, 79
Purpose, 80
Schematic diagram, 79
_MC_WriteBoolParameter, 117
Purpose, 117
Schematic diagram, 117
_MC_WriteParameter, 113
Purpose, 113
Schematic diagram, 113
P
PLCopen, 13
Purpose
_MC_CamIn, 136
_MC_CamOut, 149
_MC_GearIn, 122
_MC_GearOut, 131
_MC_Home, 33
_MC_Jog, 159
_MC_MoveAbsolute, 41
_MC_MoveAdditive, 60
_MC_MoveRelative, 47
_MC_MoveSuperimposed, 67
_MC_MoveVelocity, 53
_MC_Phasing, 154
_MC_PositionProfile, 73
_MC_Power, 22
_MC_ReadActualPosition, 90
PLCopen Blocks
Function Manual, 02/2012
177
Index
_MC_ReadAxisError, 100
_MC_ReadBoolParameter, 110
_MC_ReadParameter, 105
_MC_ReadStatus, 95
_MC_Reset, 84
_MC_Stop, 27
_MC_VelocityProfile, 80
_MC_WriteBoolParameter, 117
_MC_WriteParameter, 113
R
References, 3
S
Schematic diagram
_MC_CamIn, 135
_MC_CamOut, 149
_MC_GearIn, 121
_MC_GearOut, 130
_MC_Home, 32
_MC_Jog, 158
_MC_MoveAbsolute, 40
_MC_MoveAdditive, 59
_MC_MoveRelative, 46
_MC_MoveSuperimposed, 66
_MC_MoveVelocity, 52
_MC_Phasing, 153
_MC_PositionProfile, 72
_MC_Power, 21
_MC_ReadActualPosition, 89
_MC_ReadAxisError, 99
_MC_ReadBoolParameter, 109
_MC_ReadParameter, 104
_MC_ReadStatus, 94
_MC_Reset, 84
_MC_Stop, 27
_MC_VelocityProfile, 79
_MC_WriteBoolParameter, 117
_MC_WriteParameter, 113
PLCopen Blocks
178