You are on page 1of 596

Preface

1
SIMOTION SIMOTION SCOUT SIMOTION MCC Motion Control Chart

______________
Description

2
______________
Software interface
SIMOTION MCC Source Files and
3
______________
MCC Charts

SIMOTION SCOUT
4
SIMOTION MCC ______________
Programming in MCC
Motion Control Chart
5
Programming and Operating Manual
______________
MCC commands

6
______________
Commissioning (software)

Error Handling and


7
______________
Program Test

A
______________
Appendix

05/2009
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 corresponding 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 device/system may only be set up and used in conjunction with this documentation. Commissioning and
operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes
in this documentation qualified persons are defined as persons who are authorized to commission, ground and
label devices, systems and circuits in accordance with established safety practices and standards.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be adhered to. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of the 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 Copyright © Siemens AG 2009.


Industry Sector Technical data subject to change
Postfach 48 48
90026 NÜRNBERG
GERMANY
Preface

Scope
This document is part of the SIMOTION Programming documentation package.
This document is valid for product version V4.1, Service Pack 4 of SIMOTION SCOUT (the
engineering system of the SIMOTION product family) in conjunction with:
● a SIMOTION device with the following versions of the SIMOTION kernel:
– V4.1 SP4
– V4.1 SP2
– V4.1 SP1
– V4.0
– V3.2
– V3.1
– V3.0
● The relevant version of the following SIMOTION Technology Packages, depending on the
kernel
– Cam
– Path (kernel V4.1 and higher)
– Cam_ext (kernel V3.2 and higher)
– TControl
– Gear, Position and Basic MC (only for kernel V3.0).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 3
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 with the supplied SIMOTION
SCOUT.
The SIMOTION documentation consists of 9 documentation packages containing
approximately 80 SIMOTION documents and documents on related systems (e.g.
SINAMICS).
The following documentation packages are available for SIMOTION V4.1 SP4:
● SIMOTION Engineering System
● SIMOTION System and Function Descriptions
● SIMOTION Service and Diagnostics
● SIMOTION Programming
● SIMOTION Programming - References
● SIMOTION C
● SIMOTION P350
● SIMOTION D4xx
● SIMOTION Supplementary Documentation

Hotline and Internet addresses

Siemens Internet address


The latest information about SIMOTION products, product support, and FAQs can be found
on the Internet at:
● General information:
– http://www.siemens.de/simotion (German)
– http://www.siemens.com/simotion (international)
● Downloading documentation
Further links for downloading files from Service & Support.
http://support.automation.siemens.com/WW/view/en/10805436
● Individually compiling documentation on the basis of Siemens contents with the My
Documentation Manager (MDM), refer to http://www.siemens.com/mdm
My Documentation Manager provides you with a range of features for creating your own
documentation.
● FAQs
You can find information on FAQs (frequently asked questions) by clicking
http://support.automation.siemens.com/WW/view/en/10805436/133000.

SIMOTION MCC Motion Control Chart


4 Programming and Operating Manual, 05/2009
Preface

Additional support
We also offer introductory courses to help you familiarize yourself with SIMOTION.
For more information, please contact your regional Training Center or the main Training
Center in 90027 Nuremberg, Germany.
Information about training courses on offer can be found at:
www.sitrain.com

Technical support
If you have any technical questions, please contact our hotline:

Europe / Africa
Phone +49 180 5050 222 (subject to charge)
Fax +49 180 5050 223
€0.14/min from German wire-line network, mobile phone prices may differ.
Internet http://www.siemens.com/automation/support-request

Americas
Phone +1 423 262 2522
Fax +1 423 262 2200
E-mail mailto:techsupport.sea@siemens.com

Asia / Pacific
Phone +86 1064 757575
Fax +86 1064 747474
E-mail mailto:support.asia.automation@siemens.com

Note
Country-specific telephone numbers for technical support are provided under the following
Internet address:
http://www.automation.siemens.com/partner

Questions about this documentation


If you have any questions (suggestions, corrections) regarding this documentation, please
fax or e-mail us at:

Fax +49 9131- 98 2176


E-mail mailto:docu.motioncontrol@siemens.com

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 5
Contents

Preface ...................................................................................................................................................... 3
1 Description............................................................................................................................................... 21
1.1 Overview ......................................................................................................................................21
1.2 Introduction to MCC (Motion Control Chart) ................................................................................21
1.3 Principles of programming ...........................................................................................................23
1.4 Procedure for programming .........................................................................................................24
2 Software interface.................................................................................................................................... 25
2.1 User interface in MCC editor........................................................................................................25
2.2 Representation of MCC chart and MCC source file in Workbench .............................................25
2.3 Operator input options .................................................................................................................27
2.4 Settings for the MCC editor..........................................................................................................29
2.5 Calling up the online help.............................................................................................................30
3 MCC Source Files and MCC Charts ........................................................................................................ 31
3.1 General ........................................................................................................................................31
3.2 Inserting and managing MCC source files...................................................................................32
3.2.1 Inserting a new MCC source file ..................................................................................................32
3.2.2 Opening existing MCC source files..............................................................................................34
3.2.3 Transferring and compiling an MCC source file...........................................................................34
3.2.4 Closing an open MCC source file ................................................................................................35
3.2.5 Cutting, copying, and deleting an MCC source file......................................................................36
3.2.6 Pasting a cut or copied MCC source file......................................................................................36
3.2.7 Know-how protection for MCC source files..................................................................................36
3.2.8 Exporting and importing an MCC source file ...............................................................................37
3.2.8.1 Exporting an MCC source file as an ST source file .....................................................................37
3.2.8.2 Exporting an MCC source file in XML format...............................................................................38
3.2.8.3 Importing an MCC source file from XML data..............................................................................38
3.2.9 Properties of an MCC source file .................................................................................................39
3.2.9.1 Renaming MCC source files ........................................................................................................39
3.2.9.2 Using test functions......................................................................................................................40
3.2.9.3 Configuring compiler settings.......................................................................................................40
3.3 Inserting and managing MCC charts ...........................................................................................44
3.3.1 Inserting a new MCC chart ..........................................................................................................44
3.3.2 Opening an existing MCC chart ...................................................................................................46
3.3.3 Transferring and compiling an MCC chart ...................................................................................46
3.3.4 Closing an open MCC chart.........................................................................................................46
3.3.5 Cutting, copying, and deleting an MCC chart ..............................................................................46
3.3.6 Pasting a cut or copied MCC chart ..............................................................................................47
3.3.7 Specifying the order of MCC charts in the MCC source file ........................................................47

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 7
Contents

3.3.8 Exporting and importing an MCC chart....................................................................................... 47


3.3.8.1 Exporting an MCC chart in XML format ...................................................................................... 48
3.3.8.2 Importing an MCC chart from XML data ..................................................................................... 48
3.3.8.3 Importing an MCC chart .............................................................................................................. 49
3.3.9 Properties of an MCC chart......................................................................................................... 50
3.3.9.1 Renaming MCC charts................................................................................................................ 50
3.3.9.2 Changing the creation type of the MCC chart............................................................................. 51
3.3.9.3 Changing usability in other charts (export capability) ................................................................. 51
4 Programming in MCC .............................................................................................................................. 53
4.1 Programming an MCC chart ....................................................................................................... 53
4.2 Principles of programming .......................................................................................................... 53
4.2.1 General principles of programming............................................................................................. 53
4.2.2 Simplified example of programming principles ........................................................................... 54
4.3 Managing MCC commands......................................................................................................... 55
4.3.1 inserting commands .................................................................................................................... 55
4.3.2 Representation of commands in the MCC chart ......................................................................... 57
4.3.3 Translating comments................................................................................................................. 58
4.3.4 Numbering of commands ............................................................................................................ 58
4.3.5 Selecting commands................................................................................................................... 59
4.3.6 Hiding and displaying commands ............................................................................................... 59
4.3.7 Copying, deleting, cutting, or pasting commands ....................................................................... 59
4.3.8 Undo/redo.................................................................................................................................... 60
4.3.9 Module creation........................................................................................................................... 60
4.3.9.1 Procedure for creating a module................................................................................................. 61
4.3.9.2 Opening and closing a module ................................................................................................... 62
4.3.9.3 Canceling a module .................................................................................................................... 62
4.3.9.4 Changing the module structure ................................................................................................... 62
4.4 Processing MCC commands....................................................................................................... 63
4.4.1 Assigning command parameters ................................................................................................ 63
4.4.2 Input fields and selection lists ..................................................................................................... 65
4.4.2.1 Input field..................................................................................................................................... 65
4.4.2.2 Selection list (combo box) ........................................................................................................... 65
4.4.2.3 Editable selection list (editable combo box)................................................................................ 66
4.4.2.4 Unit .............................................................................................................................................. 67
4.4.3 Assigning a technology object or a technology object-type variable to a command .................. 67
4.4.3.1 Using a technology object ........................................................................................................... 67
4.4.3.2 Using a technology object-type variable ..................................................................................... 68
4.4.3.3 Updating a command when a technology object has been changed ......................................... 74
4.4.4 Dynamics tab .............................................................................................................................. 75
4.4.5 Expert tab .................................................................................................................................... 79
4.4.6 Transition behavior and step enabling condition......................................................................... 82
4.4.6.1 Transition behavior from the currently active motion command ................................................. 82
4.4.6.2 Delay program execution (step enabling condition).................................................................... 83
4.4.6.3 Example of transition behavior and step enabling condition....................................................... 84
4.4.7 Closing the parameter screen form............................................................................................. 85
4.4.8 Relevant system function, system variable, or command in the ST programming language..... 85
4.4.9 Return values .............................................................................................................................. 86
4.4.9.1 Return value for the system functions of the technology packages ........................................... 86
4.5 General information about variables and data types .................................................................. 88
4.5.1 Overview of variable types .......................................................................................................... 88
4.5.2 Scope of the declarations............................................................................................................ 91
4.5.3 Rules for identifiers ..................................................................................................................... 91

SIMOTION MCC Motion Control Chart


8 Programming and Operating Manual, 05/2009
Contents

4.5.4 Frequently used arrays in declarations........................................................................................92


4.5.4.1 Array length and array element....................................................................................................92
4.5.4.2 Initial value ...................................................................................................................................93
4.5.4.3 Comments....................................................................................................................................93
4.6 Data types ....................................................................................................................................94
4.6.1 General ........................................................................................................................................94
4.6.2 Elementary data types .................................................................................................................94
4.6.2.1 Value range limits of elementary data types................................................................................96
4.6.2.2 General data types.......................................................................................................................97
4.6.2.3 Elementary system data types.....................................................................................................98
4.6.3 Declaring derived data types (UDT) ............................................................................................98
4.6.3.1 Defining user-defined data types (UDT) ......................................................................................98
4.6.3.2 Scope of the data type declaration ..............................................................................................99
4.6.3.3 Defining structures .......................................................................................................................99
4.6.3.4 Defining enumerations ...............................................................................................................100
4.6.4 Technology object data types ....................................................................................................101
4.6.4.1 Description of the technology object data types ........................................................................101
4.6.4.2 Inheritance of the properties for axes ........................................................................................102
4.6.5 System data types .....................................................................................................................102
4.7 Variables ....................................................................................................................................103
4.7.1 Keywords for variable types.......................................................................................................103
4.7.2 Defining variables ......................................................................................................................104
4.7.2.1 Use of global device variables ...................................................................................................104
4.7.2.2 Declaring a unit variable in the source file .................................................................................105
4.7.2.3 Declaring local variables ............................................................................................................107
4.7.3 Time of the variable initialization................................................................................................108
4.7.3.1 Initialization of retentive global variables ...................................................................................109
4.7.3.2 Initialization of non-retentive global variables ............................................................................111
4.7.3.3 Initialization of local variables ....................................................................................................113
4.7.3.4 Initialization of static program variables.....................................................................................114
4.7.3.5 Initialization of instances of function blocks (FBs) .....................................................................115
4.7.3.6 Initialization of system variables of technology objects .............................................................116
4.7.3.7 Version ID of global variables and their initialization during download......................................117
4.8 Access to inputs and outputs (process image, I/O variables)....................................................119
4.8.1 Overview of access to inputs and outputs .................................................................................119
4.8.2 Important features of direct access and process image access................................................120
4.8.3 Direct access and process image of cyclic tasks.......................................................................122
4.8.3.1 Rules for I/O addresses for direct access and the process image of the cyclical tasks ............124
4.8.3.2 Creating I/O variables for direct access or process image of cyclic tasks.................................125
4.8.3.3 Syntax for entering I/O addresses .............................................................................................127
4.8.3.4 Possible data types of I/O variables ..........................................................................................128
4.8.4 Access to fixed process image of the BackgroundTask ............................................................128
4.8.4.1 Absolute access to the fixed process image of the BackgroundTask (absolute PI access)......129
4.8.4.2 Syntax for the identifier for an absolute process image access ................................................130
4.8.4.3 Defining symbolic access to the fixed process image of the BackgroundTask .........................131
4.8.4.4 Possible data types for symbolic PI access...............................................................................132
4.8.4.5 Example: Defining symbolic access to the fixed process image of the BackgroundTask .........132
4.8.4.6 Creating an I/O variable for access to the fixed process image of the BackgroundTask ..........133
4.8.5 Accessing I/O variables .............................................................................................................134
4.9 Connections to other program source files or libraries ..............................................................135
4.9.1 Defining connections..................................................................................................................136
4.9.1.1 Procedure for defining connections to other units (program source files) .................................136
4.9.1.2 Procedure for defining connections to libraries..........................................................................137

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 9
Contents

4.9.2 Using the name space .............................................................................................................. 137


4.10 Subroutine ................................................................................................................................. 139
4.10.1 Inserting a function (FC) or function block (FB) ........................................................................ 142
4.10.2 Inserting a subroutine call into the MCC chart and assigning parameters ............................... 142
4.10.2.1 Overview of parameters for....................................................................................................... 144
4.10.3 Example: Function (FC) ............................................................................................................ 146
4.10.3.1 Creating and programming the function (FC) ........................................................................... 147
4.10.3.2 Subroutine call of function (FC) ................................................................................................ 147
4.10.4 Example: Function block (FB) ................................................................................................... 150
4.10.4.1 Creating and programming the function block (FB) .................................................................. 150
4.10.4.2 Subroutine call of function block (FB) ....................................................................................... 151
4.10.4.3 Creating a function block instance ............................................................................................ 152
4.10.4.4 Programming the subroutine call of the function block ............................................................. 153
4.10.4.5 Accessing the output parameters of the function block retrospectively.................................... 155
4.11 Reference data.......................................................................................................................... 156
4.11.1 Cross reference list ................................................................................................................... 156
4.11.1.1 Creating a cross-reference list .................................................................................................. 156
4.11.1.2 Example: Cross-reference tab in detail view............................................................................. 157
4.11.1.3 Content of the cross-reference list ............................................................................................ 157
4.11.1.4 Working with a cross-reference list ........................................................................................... 159
4.11.1.5 Filtering the cross-reference list................................................................................................ 160
4.11.2 Program structure ..................................................................................................................... 160
4.11.2.1 Example: Program Structure tab in the detail view ................................................................... 161
4.11.2.2 Content of the program structure .............................................................................................. 161
4.11.3 Code attributes.......................................................................................................................... 162
4.11.3.1 Code attribute contents ............................................................................................................. 163
4.12 LAD/FBD/formula ...................................................................................................................... 164
4.12.1 Ladder diagram (LAD)............................................................................................................... 165
4.12.1.1 Description of LAD elements..................................................................................................... 166
4.12.1.2 Opens a branch......................................................................................................................... 167
4.12.1.3 Closing a branch ....................................................................................................................... 167
4.12.2 Function block diagram (FBD) .................................................................................................. 168
4.12.2.1 Description of FBD elements .................................................................................................... 169
4.12.3 Formula ..................................................................................................................................... 170
4.13 Command library and system function...................................................................................... 171
4.13.1 Command library....................................................................................................................... 171
4.13.1.1 Using the command library ....................................................................................................... 172
4.13.2 Using the System function call command ................................................................................. 172
4.13.2.1 Overview of parameters for....................................................................................................... 174
4.14 MCC charts in libraries.............................................................................................................. 176
4.14.1 Using technology packages in libraries..................................................................................... 176
4.14.2 Compiling a library .................................................................................................................... 178
4.15 Print ........................................................................................................................................... 180
5 MCC commands .................................................................................................................................... 183
5.1 Basic commands....................................................................................................................... 183
5.1.1 Wait time ................................................................................................................................... 183
5.1.1.1 Overview of parameters for Wait time....................................................................................... 184
5.1.1.2 Overview of parameters for Wait time - Parameters tab........................................................... 184
5.1.1.3 Overview of parameters for Wait time - Expert tab ................................................................... 184
5.1.1.4 Relevant system functions for Wait time................................................................................... 184

SIMOTION MCC Motion Control Chart


10 Programming and Operating Manual, 05/2009
Contents

5.1.2 Wait for axis ...............................................................................................................................185


5.1.2.1 Overview of parameters for Wait for axis...................................................................................186
5.1.2.2 Axis status..................................................................................................................................187
5.1.2.3 Comparison operators for axis values .......................................................................................187
5.1.2.4 Relevant commands of the ST (Structured Text) programming language for Wait for axis ......188
5.1.3 Wait for signal ............................................................................................................................188
5.1.3.1 Overview of parameters for Wait for signal................................................................................189
5.1.3.2 Relevant commands of the ST (Structured Text) programming language for Wait for
signal..........................................................................................................................................189
5.1.4 Wait for condition .......................................................................................................................190
5.1.4.1 Relevant commands of the ST (Structured Text) programming language for Wait for
condition.....................................................................................................................................194
5.1.5 Module .......................................................................................................................................194
5.1.6 Subroutine call ...........................................................................................................................194
5.1.7 System function call ...................................................................................................................194
5.1.8 Set output...................................................................................................................................195
5.1.8.1 Overview of parameters for Set output ......................................................................................195
5.1.8.2 Relevant commands of the ST (Structured Text) programming language for Set output .........195
5.1.9 Reset output...............................................................................................................................196
5.1.9.1 Overview of parameters for Reset output ..................................................................................196
5.1.9.2 Relevant commands of the ST (Structured Text) programming language for Reset output .....196
5.1.10 Variable assignment ..................................................................................................................197
5.1.11 ST zoom.....................................................................................................................................199
5.1.12 Activate simulation for object .....................................................................................................200
5.1.12.1 Overview of parameters for Activate simulation for object ........................................................200
5.1.12.2 Overview of parameters for Activate simulation for object - Parameters tab ............................201
5.1.12.3 Overview of parameters for Activate simulation for object - Expert tab.....................................201
5.1.12.4 Relevant system functions for Activate simulation for object.....................................................201
5.1.13 Deactivate simulation for object .................................................................................................202
5.1.13.1 Overview of parameters for Deactivate simulation for object ....................................................203
5.1.13.2 Overview of parameters for Deactivate simulation for object - Parameters tab ........................203
5.1.13.3 Overview of parameters for Deactivate simulation for object - Expert tab ................................203
5.1.13.4 Relevant system function for Deactivate simulation for object ..................................................204
5.1.14 Reset object ...............................................................................................................................204
5.1.14.1 Overview of parameters for Reset object ..................................................................................205
5.1.14.2 Overview of parameters for Reset object - Parameters tab ......................................................205
5.1.14.3 Overview of parameters for Reset object - Expert tab...............................................................205
5.1.14.4 Relevant system functions for Reset object...............................................................................206
5.1.15 Change operating mode ............................................................................................................207
5.1.15.1 Overview of parameters for Change operating mode................................................................207
5.1.15.2 Relevant system functions for Change operating mode............................................................208
5.1.15.3 Return value for Change operating mode..................................................................................208
5.1.16 Activate trace .............................................................................................................................208
5.1.17 Comment block ..........................................................................................................................209
5.2 Task commands.........................................................................................................................210
5.2.1 Start task ....................................................................................................................................210
5.2.1.1 Call from the BackgroundTask...................................................................................................211
5.2.1.2 Overview of parameters for Start task .......................................................................................211
5.2.1.3 Relevant system functions for Start task ...................................................................................211
5.2.1.4 Return value for Start task .........................................................................................................211
5.2.2 Interrupt task ..............................................................................................................................212
5.2.2.1 Overview of parameters for Interrupt task .................................................................................213
5.2.2.2 Relevant system functions for Interrupt task..............................................................................213
5.2.2.3 Return value for Interrupt task ...................................................................................................213

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 11
Contents

5.2.3 Continue task ............................................................................................................................ 214


5.2.3.1 Overview of parameters for Continue task................................................................................ 215
5.2.3.2 Relevant system functions for Continue task............................................................................ 215
5.2.3.3 Return value for Continue task ................................................................................................. 215
5.2.4 Reset task ................................................................................................................................. 216
5.2.4.1 Overview of parameters for Reset task..................................................................................... 217
5.2.4.2 Relevant system functions for Reset task................................................................................. 217
5.2.4.3 Return value for Reset task....................................................................................................... 217
5.2.5 Task status ................................................................................................................................ 218
5.2.5.1 Overview of parameters for Task status ................................................................................... 219
5.2.5.2 Relevant system functions for Task status ............................................................................... 219
5.2.6 Determine TaskId...................................................................................................................... 220
5.2.6.1 Overview of parameters for Determine TaskId ......................................................................... 220
5.2.6.2 Relevant system functions for Determine TaskId ..................................................................... 220
5.3 Program structures.................................................................................................................... 221
5.3.1 IF: Program branching .............................................................................................................. 221
5.3.1.1 Note on inserting the IF statement............................................................................................ 222
5.3.1.2 Note on deleting/cutting or copying an IF statement ................................................................ 222
5.3.1.3 Relevant commands of the ST (Structured Text) programming language for IF: Program
branching................................................................................................................................... 222
5.3.2 WHILE: Loop with condition at the start.................................................................................... 223
5.3.2.1 Relevant commands of the ST (Structured Text) programming language for WHILE: Loop
with condition at the start .......................................................................................................... 223
5.3.3 FOR: Loop with fixed number of runs ....................................................................................... 224
5.3.3.1 Overview of parameters for FOR: Loop with fixed number of runs........................................... 224
5.3.3.2 Relevant commands of the ST (Structured Text) programming language for FOR: Loop
with fixed number of runs .......................................................................................................... 225
5.3.4 UNTIL: Loop with condition at the end...................................................................................... 226
5.3.4.1 Relevant commands of the ST (Structured Text) programming language for UNTIL: Loop
with condition at the end ........................................................................................................... 226
5.3.5 CASE: Multiple branching ......................................................................................................... 227
5.3.5.1 Inserting a branch in the CASE statement................................................................................ 227
5.3.5.2 Deleting a branch from the CASE statement ............................................................................ 227
5.3.5.3 Comparison constant in the CASE statement........................................................................... 228
5.3.5.4 Overview of parameters for CASE: Multiple branching ............................................................ 228
5.3.5.5 Relevant commands of the ST (Structured Text) programming language for CASE:
Multiple branching ..................................................................................................................... 228
5.3.6 Go to.......................................................................................................................................... 229
5.3.6.1 Overview of parameters for Go to............................................................................................. 229
5.3.6.2 Relevant commands of the ST (Structured Text) programming language for Go to: ............... 229
5.3.7 Selection.................................................................................................................................... 230
5.3.7.1 Overview of parameters for Selection....................................................................................... 230
5.3.7.2 Relevant commands of the ST (Structured Text) programming language for Selection: ......... 230
5.3.8 Return........................................................................................................................................ 231
5.3.8.1 Relevant commands of the ST (Structured Text) programming language for Return: ............. 231
5.3.9 Exit ............................................................................................................................................ 232
5.3.9.1 Relevant commands of the ST (Structured Text) programming language for Exit: .................. 232
5.3.10 Synchronous start ..................................................................................................................... 233
5.3.10.1 Programming a condition .......................................................................................................... 234
5.3.10.2 Checkbox .................................................................................................................................. 234
5.3.10.3 Insert branch ............................................................................................................................. 235
5.3.10.4 Deleting a branch ...................................................................................................................... 235
5.3.10.5 Permissible commands ............................................................................................................. 236
5.3.10.6 Transition behavior.................................................................................................................... 237
5.3.10.7 Step enabling condition............................................................................................................. 237

SIMOTION MCC Motion Control Chart


12 Programming and Operating Manual, 05/2009
Contents

5.3.10.8 Deleting/cutting or copying.........................................................................................................238


5.3.10.9 Relevant system functions and commands of the ST (Structured Text) programming
language for synchronous start..................................................................................................238
5.4 Communication ..........................................................................................................................239
5.4.1 Acknowledge technology object alarms.....................................................................................239
5.4.1.1 Overview of parameters for Acknowledge technology object alarms ........................................240
5.4.1.2 Overview of parameters for Acknowledge technology object alarms - Parameters tab ............240
5.4.1.3 Overview of parameters for Acknowledge technology object alarms - Expert tab ....................240
5.4.1.4 Relevant system functions for Acknowledge technology object alarms ....................................241
5.4.2 Acknowledge specific technology object alarm .........................................................................242
5.4.2.1 Overview of parameters for Acknowledge specific technology object alarm.............................242
5.4.2.2 Overview of parameters for Acknowledge specific technology object alarm - Parameters
tab ..............................................................................................................................................243
5.4.2.3 Overview of parameters for Acknowledge specific technology object alarm - Expert tab .........243
5.4.2.4 Relevant system functions for Acknowledge specific technology object alarm.........................244
5.4.3 Incoming message.....................................................................................................................245
5.4.3.1 Overview of parameters for Incoming message ........................................................................246
5.4.3.2 Overview of parameters for Incoming message - Parameters tab ............................................246
5.4.3.3 Overview of parameters for Incoming message - Expert tab ....................................................246
5.4.3.4 Relevant system functions for Incoming message ....................................................................247
5.4.4 Outgoing message.....................................................................................................................247
5.4.4.1 Overview of parameters for Outgoing message ........................................................................248
5.4.4.2 Overview of parameters for Outgoing message - Parameters tab ............................................248
5.4.4.3 Overview of parameters for Outgoing message - Expert tab ....................................................248
5.4.4.4 Relevant system functions for Outgoing message ....................................................................249
5.4.5 Establish connection using TCP/IP............................................................................................249
5.4.5.1 Overview of parameters for Establish connection using TCP/IP ...............................................251
5.4.5.2 Relevant system functions for Establish connection using TCP/IP ...........................................252
5.4.5.3 Return value for Establish connection using TCP/IP .................................................................252
5.4.6 Remove connection using TCP/IP .............................................................................................253
5.4.6.1 Overview of parameters for Remove connection using TCP/IP ................................................254
5.4.6.2 Relevant system functions for Remove connection using TCP/IP ............................................254
5.4.7 Send data...................................................................................................................................255
5.4.7.1 Overview of parameters for Send data ......................................................................................257
5.4.7.2 Overview of parameters for Send data - Parameters tab ..........................................................258
5.4.7.3 Overview of parameters for Send data - Expert tab ..................................................................259
5.4.7.4 Querying the command status for Send data with XSend/XReceive protocol ..........................260
5.4.7.5 Structure of destination address of the communications partner, when address is entered
directly (XSend/XReceive protocol) ...........................................................................................260
5.4.7.6 Relevant system functions for Send data ..................................................................................261
5.4.8 Receive data ..............................................................................................................................263
5.4.8.1 Overview of parameters for Receive data .................................................................................265
5.4.8.2 Overview of parameters for Receive data - Parameters tab .....................................................266
5.4.8.3 Overview of parameters for Receive data - Expert tab..............................................................267
5.4.8.4 Querying the command status for Receive data with XSend/XReceive protocol......................267
5.4.8.5 Relevant system functions for Receive data..............................................................................267
5.4.8.6 Return value for Receive data ...................................................................................................268
5.5 Single axis commands ...............................................................................................................270
5.5.1 Switch axis enable .....................................................................................................................270
5.5.1.1 Overview of parameters for Switch axis enable.........................................................................271
5.5.1.2 Overview of parameters for Switch axis enable – Parameters tab ............................................272
5.5.1.3 Overview of parameters for Switch axis enable – Expert tab ....................................................273
5.5.1.4 Meaning of bits of control word 1 (STW1) in accordance with PROFIdrive ..............................274
5.5.1.5 Relevant system function for Switch axis enable.......................................................................275

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 13
Contents

5.5.2 Remove axis enable.................................................................................................................. 276


5.5.2.1 Overview of parameters for Remove axis enable..................................................................... 277
5.5.2.2 Overview of parameters for Remove axis enable – Parameters tab ........................................ 277
5.5.2.3 Overview of parameters for Remove axis enable – Expert tab................................................. 278
5.5.2.4 Relevant system function for Remove axis enable ................................................................... 279
5.5.3 Switch QF axis enable .............................................................................................................. 280
5.5.3.1 Overview of parameters for Switch QF axis enable.................................................................. 281
5.5.3.2 Overview of parameters for Switch QF axis enable – Parameters tab ..................................... 282
5.5.3.3 Overview of parameters for Switch QF axis enable – QF_Parameters tab .............................. 283
5.5.3.4 Overview of parameters for Switch QF axis enable – Expert tab ............................................. 284
5.5.3.5 Relevant system function for Switch QF axis enable................................................................ 285
5.5.4 Remove QF axis enable............................................................................................................ 286
5.5.4.1 Overview of parameters for Remove QF axis enable............................................................... 287
5.5.4.2 Overview of parameters for Remove QF axis enable – Parameters tab .................................. 288
5.5.4.3 Overview of parameters for Remove QF axis enable – QF_Parameters tab ........................... 289
5.5.4.4 Overview of parameters for Remove QF axis enable – Expert tab........................................... 290
5.5.4.5 Relevant system function for Remove QF axis enable............................................................. 291
5.5.5 Speed preset............................................................................................................................. 292
5.5.5.1 Overview of parameters for speed specification ....................................................................... 293
5.5.5.2 Overview of parameters for Speed specification – Parameters tab.......................................... 294
5.5.5.3 Overview of parameters for Speed specification – Dynamic response tab .............................. 295
5.5.5.4 Overview of parameters for Speed specification – Expert tab .................................................. 295
5.5.5.5 Relevant system function for speed specification ..................................................................... 296
5.5.6 Start axis position-controlled ..................................................................................................... 297
5.5.6.1 Overview of parameters for Start axis position-controlled ........................................................ 298
5.5.6.2 Overview of parameters for Start axis position-controlled – Parameters tab............................ 299
5.5.6.3 Overview of parameters for Start axis position-controlled – Dynamic response tab ................ 299
5.5.6.4 Overview of parameters for Start axis position-controlled – Expert tab.................................... 300
5.5.6.5 Relevant system function for Start axis position-controlled ...................................................... 300
5.5.7 Stop axis.................................................................................................................................... 301
5.5.7.1 Overview of parameters for Stop axis....................................................................................... 302
5.5.7.2 Overview of parameters for Stop axis – Parameters tab .......................................................... 303
5.5.7.3 Overview of parameters for Stop axis – Dynamic response tab ............................................... 304
5.5.7.4 Overview of parameters for Stop axis – Expert tab .................................................................. 305
5.5.7.5 Relevant system functions for Stop axis ................................................................................... 306
5.5.8 Continue motion ........................................................................................................................ 307
5.5.8.1 Overview of parameters for Continue motion ........................................................................... 308
5.5.8.2 Overview of parameters for Continue motion - Parameters tab ............................................... 308
5.5.8.3 Overview of parameters for Continue motion - Expert tab........................................................ 308
5.5.8.4 Relevant system function for Continue motion ......................................................................... 309
5.5.9 Home axis ................................................................................................................................. 310
5.5.9.1 Overview of parameters for Home axis..................................................................................... 311
5.5.9.2 Overview of parameters for Home axis – Parameters tab ........................................................ 312
5.5.9.3 Overview of parameters for Home axis – Dynamic response tab............................................. 313
5.5.9.4 Overview of parameters for Home axis – Expert tab ................................................................ 313
5.5.9.5 Relevant system functions for Home axis................................................................................. 314
5.5.9.6 Referencing mode..................................................................................................................... 315
5.5.9.7 Home position offset ................................................................................................................. 316
5.5.10 Position axis .............................................................................................................................. 317
5.5.10.1 Parameter screen form: Position axis ....................................................................................... 318
5.5.10.2 Overview of parameters for Position axis – Parameters tab..................................................... 319
5.5.10.3 Overview of parameters for Position axis – Dynamic response tab.......................................... 320
5.5.10.4 Overview of parameters for Position axis – Expert tab ............................................................. 320
5.5.10.5 Example of positioning .............................................................................................................. 321
5.5.10.6 Relevant system functions for Position axis.............................................................................. 322

SIMOTION MCC Motion Control Chart


14 Programming and Operating Manual, 05/2009
Contents

5.5.11 Travel to fixed endstop...............................................................................................................323


5.5.11.1 Overview of parameters for Travel to fixed endstop ..................................................................324
5.5.11.2 Overview of parameters for Travel to fixed endstop – Parameters tab .....................................324
5.5.11.3 Overview of parameters for Travel to fixed endstop – Expert tab..............................................325
5.5.11.4 Relevant system function for Travel to fixed endstop ................................................................325
5.5.12 Remove fixed endstop ...............................................................................................................326
5.5.12.1 Overview of parameters for Remove fixed endstop...................................................................327
5.5.12.2 Relevant system function for Remove fixed endstop.................................................................328
5.5.13 Switch on torque limitation .........................................................................................................329
5.5.13.1 Overview of parameters for Switch on torque limitation ............................................................330
5.5.13.2 Overview of parameters for Switch on torque limitation – Parameters tab................................331
5.5.13.3 Overview of parameters for Switch on torque limitation – Expert tab ........................................332
5.5.13.4 Relevant system function for Switch on torque limitation ..........................................................332
5.5.14 Deactivate torque limitation........................................................................................................333
5.5.14.1 Overview of parameters for Switch off torque limitation ............................................................334
5.5.14.2 Relevant system function for Switch off torque limitation ..........................................................334
5.5.15 Time-dependent velocity profile .................................................................................................335
5.5.15.1 Overview of parameters for Time-dependent velocity profile ....................................................336
5.5.15.2 Overview of parameters for Time-dependent velocity profile – Profile tab ................................336
5.5.15.3 Overview of parameters for Time-dependent velocity profile – Dynamic response tab ............337
5.5.15.4 Overview of parameters for Time-dependent velocity profile – Expert tab................................337
5.5.15.5 Relevant system function for Time-dependent velocity profile ..................................................338
5.5.16 Time-dependent position profile.................................................................................................339
5.5.16.1 Overview of parameters for Time-dependent position profile....................................................340
5.5.16.2 Overview of parameters for Time-dependent position profile – Profile tab................................340
5.5.16.3 Overview of parameters for Time-dependent position profile – Dynamic response tab ............341
5.5.16.4 Overview of parameters for Time-dependent position profile – Expert tab ...............................341
5.5.16.5 Relevant system function for Time-dependent position profile..................................................342
5.5.17 Shift measuring system..............................................................................................................343
5.5.17.1 Overview of parameters for Shift measuring system .................................................................344
5.5.17.2 Overview of parameters for Shift measuring system – Set actual value tab .............................344
5.5.17.3 Overview of parameters for Shift measuring system – Expert tab.............................................345
5.5.17.4 Relevant system function for Shift measuring system ...............................................................345
5.5.18 Online correction ........................................................................................................................346
5.5.18.1 Overview of parameters for Online correction ...........................................................................347
5.5.18.2 Relevant system function for Online correction .........................................................................347
5.5.19 Set axis parameter.....................................................................................................................348
5.5.19.1 Overview of parameters for Set axis parameter ........................................................................349
5.5.19.2 Example of Set axis parameter..................................................................................................351
5.5.19.3 Relevant system function for Set axis parameter ......................................................................351
5.5.20 Set virtual axis values ................................................................................................................352
5.5.20.1 Overview of parameters for Set virtual axis values....................................................................353
5.5.20.2 Overview of parameters for Set virtual axis values – Parameters tab .......................................353
5.5.20.3 Overview of parameters for Set virtual axis values – Expert tab ...............................................353
5.5.20.4 Relevant system function for Set virtual axis values..................................................................354
5.5.21 Delete command queue.............................................................................................................355
5.5.21.1 Overview of parameters for Delete command queue ................................................................356
5.5.21.2 Example of Delete command queue..........................................................................................356
5.5.21.3 Relevant system function for Delete command queue ..............................................................356
5.5.22 Switch parameter set .................................................................................................................357
5.5.22.1 Overview of parameters for Switch parameter set.....................................................................358
5.5.22.2 Overview of parameters for Switch parameter set – Parameters tab ........................................358
5.5.22.3 Overview of parameters for Switch parameter set – Expert tab ................................................358
5.5.22.4 Relevant system function for Switch parameter set...................................................................359

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 15
Contents

5.6 Commands for external encoders, measuring inputs and output cams ................................... 360
5.6.1 External encoder on .................................................................................................................. 360
5.6.1.1 Overview of parameters for External encoder on ..................................................................... 361
5.6.1.2 Relevant system function for External encoder on ................................................................... 361
5.6.2 External encoder off .................................................................................................................. 362
5.6.2.1 Overview of parameters for External encoder off ..................................................................... 363
5.6.2.2 Relevant system function for External encoder off ................................................................... 363
5.6.3 Synchronize external encoder .................................................................................................. 364
5.6.3.1 Overview of parameters for Synchronize external encoder...................................................... 365
5.6.3.2 Overview of parameters for Synchronize external encoder – Parameters tab ......................... 365
5.6.3.3 Overview of parameters for Synchronize external encoder – Expert tab ................................. 366
5.6.3.4 Relevant system function for Synchronize external encoder.................................................... 366
5.6.4 Encoder monitoring on .............................................................................................................. 367
5.6.4.1 Overview of parameters for Encoder monitoring on ................................................................. 368
5.6.4.2 Overview of parameters for Encoder monitoring on – Parameters tab..................................... 368
5.6.4.3 Overview of parameters for Encoder monitoring on – Expert tab ............................................. 368
5.6.4.4 Relevant system function for Encoder monitoring on ............................................................... 369
5.6.5 Encoder monitoring off .............................................................................................................. 370
5.6.5.1 Overview of parameters for Encoder monitoring off ................................................................. 371
5.6.5.2 Relevant system function for Encoder monitoring off ............................................................... 371
5.6.6 Activate measuring input........................................................................................................... 372
5.6.6.1 Overview of parameters for Activate measuring input .............................................................. 375
5.6.6.2 Overview of parameters for Activate measuring input – Parameters tab ................................. 376
5.6.6.3 Overview of parameters for Activate measuring input – Expert tab.......................................... 377
5.6.6.4 Relevant system functions for Activate measuring input .......................................................... 378
5.6.7 Deactivate measuring input....................................................................................................... 379
5.6.7.1 Overview of parameters for Deactivate measuring input.......................................................... 380
5.6.7.2 Overview of parameters for Deactivate measuring input – Parameters tab ............................. 380
5.6.7.3 Overview of parameters for Deactivate measuring input – Expert tab ..................................... 381
5.6.7.4 Relevant system functions for Deactivate measuring input ...................................................... 381
5.6.8 Synchronize measuring system ................................................................................................ 382
5.6.8.1 Overview of parameters for Synchronize measuring system ................................................... 383
5.6.8.2 Overview of parameters for Synchronize measuring system – Parameters tab....................... 383
5.6.8.3 Overview of parameters for Synchronize measuring system – Expert tab ............................... 384
5.6.8.4 Relevant system function for Synchronize measuring system ................................................. 385
5.6.9 Switch output cam on................................................................................................................ 386
5.6.9.1 Overview of parameters for Switch output cam on ................................................................... 393
5.6.9.2 Overview of parameters for Switch output cam on – Parameters tab ...................................... 394
5.6.9.3 Overview of parameters for Switch output cam on – Expert tab............................................... 396
5.6.9.4 Relevant system functions for Switch output cam on ............................................................... 397
5.6.10 Switch output cam off................................................................................................................ 398
5.6.10.1 Overview of parameters for Switch output cam off ................................................................... 399
5.6.10.2 Overview of parameters for Switch output cam off – Parameters tab ...................................... 399
5.6.10.3 Overview of parameters for Switch output cam off – Expert tab............................................... 400
5.6.10.4 Relevant system functions for Switch output cam off ............................................................... 400
5.6.11 Switch output cam signal .......................................................................................................... 401
5.6.11.1 Overview of parameters for Switch output cam signal.............................................................. 403
5.6.11.2 Overview of parameters for Switch output cam signal – Parameters tab ................................. 404
5.6.11.3 Overview of parameters for Switch output cam signal – Expert tab ......................................... 404
5.6.11.4 Relevant system functions for Switch output cam signal.......................................................... 405
5.6.12 Output cam track On ................................................................................................................. 405
5.6.12.1 Overview of parameters for Output cam track On .................................................................... 408
5.6.12.2 Overview of parameters for Output cam track On – Parameters tab........................................ 409
5.6.12.3 Overview of parameters for Output cam track On – Expert tab ................................................ 411
5.6.12.4 Relevant system function for Output cam track On .................................................................. 411

SIMOTION MCC Motion Control Chart


16 Programming and Operating Manual, 05/2009
Contents

5.6.13 Output cam track Off..................................................................................................................412


5.6.13.1 Overview of parameters for Output cam track Off .....................................................................413
5.6.13.2 Overview of parameters for Output cam track Off – Parameters tab.........................................414
5.6.13.3 Overview of parameters for Output cam track Off – Expert tab.................................................414
5.6.13.4 Relevant system function for Output cam track Off ...................................................................415
5.7 Commands for synchronous operation and camming ...............................................................416
5.7.1 Gearing on .................................................................................................................................416
5.7.1.1 Overview of parameters for Gearing on.....................................................................................418
5.7.1.2 Overview of parameters for Gearing on – Parameters tab ........................................................419
5.7.1.3 Overview of parameters for Gearing on – Synchronization tab .................................................422
5.7.1.4 Overview of parameters for Gearing on – Dynamic response tab.............................................427
5.7.1.5 Overview of parameters for Gearing on – Expert tab ................................................................427
5.7.1.6 Example of Gearing on ..............................................................................................................428
5.7.1.7 Relevant system functions for Gearing on.................................................................................429
5.7.2 Gearing off .................................................................................................................................431
5.7.2.1 Overview of parameters for Gearing off.....................................................................................432
5.7.2.2 Overview of parameters for Gearing off – Desynchronization tab .............................................433
5.7.2.3 Overview of parameters for Gearing off – Dynamic response tab.............................................436
5.7.2.4 Overview of parameters for Gearing off – Expert tab ................................................................436
5.7.2.5 Relevant system function for Gearing off...................................................................................437
5.7.3 Set offset on the gearing............................................................................................................438
5.7.3.1 Overview of parameters for Set offset on the gearing ...............................................................439
5.7.3.2 Overview of parameters for Set offset on the gearing – Parameters tab...................................440
5.7.3.3 Overview of parameters for Set offset on the gearing – Dynamic response tab .......................441
5.7.3.4 Overview of parameters for Set offset on the gearing – Expert tab...........................................441
5.7.3.5 Relevant system function for Set offset on the gearing .............................................................442
5.7.4 Synchronous velocity operation on............................................................................................443
5.7.4.1 Overview of Synchronous velocity operation on........................................................................445
5.7.4.2 Overview of parameters for Synchronous velocity operation on – Parameters tab...................446
5.7.4.3 Overview of parameters for Synchronous velocity operation on – Dynamic response tab .......447
5.7.4.4 Overview of parameters for Synchronous velocity operation on – Expert tab...........................447
5.7.4.5 Example of Synchronous velocity operation on.........................................................................448
5.7.4.6 Relevant system functions for Synchronous velocity operation on ...........................................449
5.7.5 Synchronous velocity operation off............................................................................................450
5.7.5.1 Overview of parameters for Synchronous velocity operation off ...............................................451
5.7.5.2 Overview of parameters for Synchronous velocity operation off – Dynamic response tab .......452
5.7.5.3 Overview of parameters for Synchronous velocity operation off – Expert tab...........................452
5.7.5.4 Relevant system function for Synchronous velocity operation off .............................................453
5.7.6 Cam on.......................................................................................................................................454
5.7.6.1 Overview of parameters for Cam on..........................................................................................456
5.7.6.2 Overview of parameters for Cam on – Parameters tab .............................................................457
5.7.6.3 Overview of parameters for Cam on – Synchronization tab ......................................................459
5.7.6.4 Overview of parameters for Cam on – Dynamic response tab ..................................................465
5.7.6.5 Overview of parameters for Cam on – Expert tab......................................................................465
5.7.6.6 Example of Cam on ...................................................................................................................466
5.7.6.7 Relevant system functions for Cam on ......................................................................................467
5.7.7 Cam off.......................................................................................................................................468
5.7.7.1 Overview of parameters for Cam off..........................................................................................469
5.7.7.2 Overview of parameters for Cam off – Desynchronization tab ..................................................471
5.7.7.3 Overview of parameters for Cam off – Dynamic response tab ..................................................474
5.7.7.4 Overview of parameters for Cam Off – Expert tab.....................................................................474
5.7.7.5 Relevant system function for Cam off........................................................................................475
5.7.8 Set scaling on camming.............................................................................................................476
5.7.8.1 Overview of parameters for Set scaling on camming ................................................................477
5.7.8.2 Overview of parameters for Set scaling on camming – Parameters tab....................................478

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 17
Contents

5.7.8.3 Overview of parameters for Set scaling on camming – Dynamic response tab ....................... 479
5.7.8.4 Overview of parameters for Set scaling on camming – Expert tab ........................................... 479
5.7.8.5 Relevant system function for Set scaling on camming ............................................................. 480
5.7.9 Set offset on camming .............................................................................................................. 481
5.7.9.1 Overview of parameters for Set offset on camming.................................................................. 482
5.7.9.2 Overview of parameters for Set offset on camming – Parameters tab ..................................... 484
5.7.9.3 Overview of parameters for Set offset on camming – Dynamic response tab.......................... 485
5.7.9.4 Overview of parameters for Set offset on camming – Expert tab ............................................. 485
5.7.9.5 Relevant system function for Set offset on camming................................................................ 486
5.7.10 Parameterize cam ..................................................................................................................... 487
5.7.10.1 Overview of parameters for Parameterize cam ........................................................................ 489
5.7.10.2 Overview of parameters for Parameterize cam – Offset tab..................................................... 489
5.7.10.3 Overview of parameters for Parameterize cam – Basic scaling tab ......................................... 490
5.7.10.4 Overview of parameters for Parameterize cam – Range scaling tab ....................................... 490
5.7.10.5 Overview of parameters for Parameterize cam – Expert tab .................................................... 491
5.7.10.6 Relevant system functions for Parameterize cam..................................................................... 491
5.7.11 Switch master setpoint .............................................................................................................. 492
5.7.11.1 Overview of parameters for Switch master setpoint ................................................................. 493
5.7.11.2 Overview of parameters for Switch master setpoint – Parameters tab..................................... 494
5.7.11.3 Overview of parameters for Switch master setpoint – Dynamic response tab ......................... 494
5.7.11.4 Overview of parameters for Switch master setpoint – Expert tab ............................................. 495
5.7.11.5 Relevant system function for Switch master setpoint ............................................................... 495
5.8 Commands for path interpolation.............................................................................................. 496
5.8.1 Traverse path linearly................................................................................................................ 497
5.8.1.1 Overview of parameters for Traverse path linearly................................................................... 498
5.8.1.2 Overview of parameters for Traverse path linearly – Parameters tab ...................................... 499
5.8.1.3 Overview of parameters for Traverse path linearly – Dynamic response tab ........................... 501
5.8.1.4 Overview of parameters for Traverse path linearly – Path-synchronous motion tab ................ 503
5.8.1.5 Overview of parameters for Traverse path linearly – Expert tab............................................... 504
5.8.1.6 Relevant system function for Traverse path linearly................................................................. 505
5.8.2 Traverse path circularly............................................................................................................. 506
5.8.2.1 Overview of parameters for Traverse path circularly ................................................................ 507
5.8.2.2 Overview of parameters for Traverse path circularly – Parameters tab ................................... 508
5.8.2.3 Overview of parameters for Traverse path circularly – Dynamic response tab ........................ 511
5.8.2.4 Overview of parameters for Traverse path circularly – Path-synchronous motion tab ............. 513
5.8.2.5 Overview of parameters for Traverse path circularly – Expert tab............................................ 514
5.8.2.6 Relevant system function for Traverse path circularly .............................................................. 515
5.8.3 Traverse path using polynomials .............................................................................................. 516
5.8.3.1 Overview of parameters for Traverse path using polynomials.................................................. 518
5.8.3.2 Overview of parameters for Traverse path using polynomials – Parameters tab ..................... 519
5.8.3.3 Overview of parameters for Traverse path using polynomials – Dynamic response tab.......... 522
5.8.3.4 Overview of parameters for Traverse path using polynomials – Path-synchronous motion
tab ............................................................................................................................................. 525
5.8.3.5 Overview of parameters for Traverse path using polynomials – Expert tab ............................. 526
5.8.3.6 Relevant system function for Traverse path using polynomials................................................ 527
5.8.4 Stop path motion ....................................................................................................................... 529
5.8.4.1 Overview of parameters for Stop path motion .......................................................................... 530
5.8.4.2 Overview of parameters for Stop path motion – Parameters tab.............................................. 530
5.8.4.3 Overview of parameters for Stop path motion – Dynamic response tab .................................. 531
5.8.4.4 Overview of parameters for Stop path motion – Expert tab ...................................................... 531
5.8.4.5 Relevant system functions for Stop path motion....................................................................... 532
5.8.5 Continue path motion ................................................................................................................ 533
5.8.5.1 Overview of parameters: Continue path motion........................................................................ 534
5.8.5.2 Relevant system function for Continue path motion ................................................................. 535

SIMOTION MCC Motion Control Chart


18 Programming and Operating Manual, 05/2009
Contents

6 Commissioning (software) ..................................................................................................................... 537


6.1 Assigning programs to a task and downloading them to the target system ..............................537
6.1.1 assigning programs to a task .....................................................................................................537
6.1.1.1 Execution levels and tasks in SIMOTION..................................................................................539
6.1.1.2 Task start sequence...................................................................................................................541
6.1.2 Downloading programs to the target system .............................................................................542
7 Error Handling and Program Test .......................................................................................................... 543
7.1 Modes for program testing .........................................................................................................543
7.1.1 Modes of the SIMOTION devices ..............................................................................................543
7.1.2 Important information about the life-sign monitoring..................................................................545
7.1.3 Life-sign monitoring parameters ................................................................................................547
7.2 Monitoring variables in the symbol browser and watch tables ..................................................548
7.2.1 Symbol browser .........................................................................................................................548
7.2.2 Watch tables ..............................................................................................................................551
7.3 Monitoring the program execution .............................................................................................553
7.3.1 Tracking program execution ......................................................................................................553
7.3.2 Tracking single program steps...................................................................................................553
7.4 Program status...........................................................................................................................556
7.5 Program run ...............................................................................................................................558
7.5.1 Program run: Display code location and call path .....................................................................558
7.5.2 Parameter call stack program run..............................................................................................559
7.5.3 Program run toolbar ...................................................................................................................559
7.6 Trace ..........................................................................................................................................560
7.6.1 Activate trace .............................................................................................................................560
7.7 Breakpoints ................................................................................................................................563
7.7.1 General procedure for setting breakpoints ................................................................................563
7.7.2 Setting the debug mode.............................................................................................................564
7.7.3 Define the debug task group......................................................................................................565
7.7.4 Setting breakpoints ....................................................................................................................567
7.7.5 Breakpoints toolbar ....................................................................................................................569
7.7.6 Defining the call path for a single breakpoint.............................................................................570
7.7.7 Defining the call path for all breakpoints....................................................................................572
7.7.8 Activating breakpoints................................................................................................................574
7.7.9 Display call stack .......................................................................................................................576
A Appendix................................................................................................................................................ 577
A.1 Basics of LAD/FBD/Formula for MCC .......................................................................................577
A.1.1 Ladder logic (LAD) for MCC.......................................................................................................577
A.1.2 Function block diagram (FBD) for MCC.....................................................................................581
A.1.3 Formula for MCC .......................................................................................................................584
A.2 Key combinations.......................................................................................................................586
Index...................................................................................................................................................... 589

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 19
Description 1
1.1 Overview
This chapter introduces the MCC (Motion Control Chart) graphical programming language
and also describes the programming principles and procedures involved.

1.2 Introduction to MCC (Motion Control Chart)


MCC is a new graphical programming language, which has been designed to reduce the
complexity of automating production machines.
Many production machines are very complex. They require a control system (SIMOTION)
that is capable of handling motion control and technologies with a wide variety of motion
functions, as well as PLC functions, arithmetic functions, and data management tasks.
MCC is the neutral description tool represented as a flowchart. This flowchart is referred to
as "MCC chart" in this document. MCC provides you with all of the descriptive symbols you
will need to define your automation task quickly and efficiently. It also offers a wide range of
tools for structuring large-scale automation jobs.
With an MCC chart, you can create a program, a function block, or a function that complies
with IEC 61131-3.
An MCC unit can contain no, one, or more than one MCC chart. All the MCC charts
contained in an MCC unit access the same data storage area.

0&&FKDUW

6,027,21 6,027,21
'ULYH$ 'ULYH%

$[LV$$[LV%

Figure 1-1 MCC for automating production machines

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 21
Description
1.2 Introduction to MCC (Motion Control Chart)

Application of MCC
MCC facilitates automation by offering the following features:
● The motion sequences on the machine can be easily programmed and are clearly
defined.
● The programmer's logic is supported.
● Structured programming available through use of subroutines and modular creation of
commands and library functions.
● Wait commands for quick responses to events.
● Simultaneous starting of axes.
● Online functions allow tracking of the program execution (program execution monitoring
and breakpoints).
● Integrated online help.
These features help the inexperienced programmer to achieve results fast and let the
experienced programmer create complex programs more efficiently.

SIMOTION MCC Motion Control Chart


22 Programming and Operating Manual, 05/2009
Description
1.3 Principles of programming

1.3 Principles of programming


The SIMOTION motion control system offers powerful functions for motion control in
production machines. As a graphical programming language, MCC helps you to formulate
process and motion sequences easily by creating a sequence of graphical MCC commands.
The characteristics of every MCC command can be assigned individually. Control structures
such as IF commands make for easy implementation of alternative branches.
The flowchart format makes it easy to follow the logical execution sequence. Furthermore,
each MCC command has its own graphic design, making the functionality of each action
within an MCC chart immediately evident. Consequently, the system greatly facilitates the
programming of automation tasks and enhances readability. Supplementary online functions
enable you to locate errors quickly or simply help you to keep track of the current states.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 23
Description
1.4 Procedure for programming

1.4 Procedure for programming


Let us look at an example of how MCC programming works.

Function
When you press a key, an axis will travel to position 1,000 mm at a velocity of 100 mm/s.
Once this position has been reached, an output is to be set (for example, lamp ON).
This task is now broken down into several subtasks:
● Set axis enable signals
● Wait until the key is pressed
● Traverse axis to position
● Set output when motion ends
An MCC command is available for each of the listed subtasks. Each command is
represented by a rectangular symbol in MCC. The parameters for individual commands
(position = 1000, input = 1.0, etc.) are entered using a command dialog box. This opens
when you double-click the command.
This example deals only with the MCC programming aspect. For this reason, information
about the keys, axis, and lamp should already be available to the control system.



① Set enables:
drive enable, pulse enable, position controller enable
② Wait until the key with input 1.0 is pressed
③ Traverse the axis to position at the specified speed
④ Activate output Q1.1 for a lamp
Figure 1-2 MCC chart for example task

SIMOTION MCC Motion Control Chart


24 Programming and Operating Manual, 05/2009
Software interface 2
2.1 User interface in MCC editor
This chapter describes the various operating features offered by the MCC editor. The user
interface is graphically displayed and described.

2.2 Representation of MCC chart and MCC source file in Workbench


The Workbench is divided into three main windows:
● Project navigator: Displays the project structure
● Working area: Displays the MCC chart or MCC source file and parameter screen forms
● Detail view: Displays the variables, alarms, error messages, etc., depending on which
element is selected in the project navigator

0HQXEDU

7RROEDUV

:RUNLQJDUHD

3URMHFWQDYLJDWRU

'HWDLOYLHZ

Figure 2-1 Workbench view

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 25
Software interface
2.2 Representation of MCC chart and MCC source file in Workbench

For additional information on using the Workbench:


● Maximizing working area and detail view
● Zooming in and out of an MCC chart
● Moving the MCC chart or MCC source file to the foreground
● Hiding and displaying the declaration table
● Zooming in and out of the declaration table

Maximizing working area and detail view


The windows working area and detail view can be set to maximum zoom.
Select View > Maximize Working Area or View > Maximize Detail View from the menu.

Zooming in and out of an MCC chart


The size of an MCC chart, that is, the size of the command symbols, can be altered in the
Zoom Factor box. The zoom factor selected applies to the declaration table and the MCC
chart.
Select a factor from the list, or enter an integer value of your own choice. The changes
always apply to the currently selected MCC chart.

Moving the MCC chart or MCC source file to the foreground


If several MCC charts or MCC source files are open in the working area, they will be
cascaded in most cases. Therefore, only the top window will be visible.
You can use two different methods to move concealed windows to the foreground:
● By selecting the appropriate tab below the working window
● By selecting the appropriate name in the Window menu

Hiding and displaying the declaration table


If you need more space, you can completely hide the declaration table of an MCC chart.
● Double-click the separation line.
In order to display the declaration line again, double-click the separation line again.

Zooming in and out of the declaration table


● Move the pointer over the separation line until it turns into a double line.
● Keep pressing the left mouse button while you move the separation line:
– Up, to zoom out of the declaration area
– Down, to zoom in to the declaration area

SIMOTION MCC Motion Control Chart


26 Programming and Operating Manual, 05/2009
Software interface
2.3 Operator input options

2.3 Operator input options


The MCC editor provides the programmer with a variety of different operator input options.
Alternatives for executing individual operator inputs include the following:
● Via the menu bar
● Via the context menu
● Via the toolbar
● Via keystroke combinations
● Texts and variables can be moved into the input field using a drag-and-drop operation.

Menu bar
There are two separate menu bars for the MCC source file and the MCC chart. Each
contains a complete set of action commands.
The appropriate menu bar is displayed for the active window in the working area.

Context menu
To use the context menu for an object, proceed as follows:
1. Select the appropriate object with the left mouse button (left click).
2. Briefly click the right mouse button.
3. Left-click the appropriate menu item.

Note
In this document, work steps and action commands are executed wherever possible via
the context menu. However, some action commands can only be executed via the menu
bar or toolbar.

Toolbar
The toolbars contain important operator input steps, for example, for saving or for inserting
elements. The toolbars can be positioned as required within the Workbench.
Using the menu View > Toolbars, you can display or hide these.
The MCC editor toolbar contains the full range of MCC commands. The list of commands is
displayed when you place the cursor on the appropriate button (see inserting commands
(Page 55)).

Shortcut
You can input commands quickly in the MCC editor using keystroke combinations. The
keystroke combinations available in the MCC editor are listed in Annex Key combinations
(Page 586).
The online help system is called up with the keystroke combination Shift+F1 or F1.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 27
Software interface
2.3 Operator input options

Drag&drop
Variables can be moved from the detail view (Symbol browser tab) to the input field using a
drag-and-drop operation.
Left-click the line number of the variable you wish to move. The line with the variable is
selected. Keeping the left mouse button depressed, drag the line number into the input field
of the parameter screen form. As soon as you release the left mouse button, the variable will
be inserted at the appropriate position.

6\PERO'HVFULSWLRQ

9DULDEOHFDQ
EHLQVHUWHG
9DULDEOHFDQQRW
EHLQVHUWHG

3UHVVDQGKROG
WKHOHIWKDQG
PRXVHEXWWRQ

Figure 2-2 Inserting a variable using drag-and-drop

SIMOTION MCC Motion Control Chart


28 Programming and Operating Manual, 05/2009
Software interface
2.4 Settings for the MCC editor

2.4 Settings for the MCC editor


You can adjust important properties of the MCC editor to suit your individual requirements.
Select Options > Settings, and the MCC editor tab.
● In the case of conditions or a variable assignment, you can define the valid language
setting on opening. Possible settings are LAD, FBD, or Formula.
● The Display only known types in declaration list check box allows you to choose which
function blocks are displayed as data types in the declaration tables of the MCC source
files and MCC charts.
– When the checkbox is selected, the declaration table contains only function blocks
that are defined in the same MCC unit or in linked source files or libraries (see
Connections to other program sources or to libraries (Page 135)).
– When the check box is cleared, the declaration table contains all function blocks
defined in the project.
● Single-step monitoring can be set globally by enabling the Permit single step checkbox:
– Single-step monitoring is set globally if the checkbox is selected. The effectiveness of
the global setting for an MCC unit depends upon its local compiler settings (Page 41).
See also the description on Effectiveness of local or global compiler settings (see the
SIMOTION ST Programming and Operating Manual).

Figure 2-3 Settings for the MCC editor

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 29
Software interface
2.5 Calling up the online help

2.5 Calling up the online help


The online help can provide assistance for many of the operating steps.
Call up the online help using either the:
● Help menu
– Help topics
– Context-sensitive help
– Getting Started
● Using the Help button in an open parameter screen form
● Using the F1 button for general help
● Using keystroke combination Shift+F1 for context-sensitive help

SIMOTION MCC Motion Control Chart


30 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts 3
This chapter describes how to create and work with an MCC source file containing MCC
charts.

3.1 General
MCC units are assigned to the SIMOTION device on which the MCC charts contained in the
MCC unit will subsequently be run (e.g. SIMOTION C230). They are stored in the project
navigator under the SIMOTION device in the PROGRAMS folder.
MCC charts are the individual program organization units (program, function, function block)
in an MCC unit. They are stored under the MCC unit in the project navigator.

Note
ST source files and LAD/FBD units, etc. are also stored in the PROGRAMS folder under the
SIMOTION device.
For a description of the SIMOTION ST (Structured Text) programming language, refer to the
SIMOTION ST Programming Manual.
For a description of the SIMOTION LAD (Ladder Diagram) and SIMOTION FBD (Function
Block Diagram) programming languages, refer to the SIMOTION LAD/FBD Programming
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 31
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2 Inserting and managing MCC source files

3.2.1 Inserting a new MCC source file


You can insert a new MCC source file in the following ways:
● In the project navigator: in the PROGRAMS folder using the Insert MCC unit element
● Select the PROGRAMS folder in the project navigator and choose the command Insert >
Program > MCC unit in the menu
● Select the PROGRAMS folder in the project navigator and choose the command Insert
new object > MCC unit in the context menu

Procedure
To insert a new MCC source file using the context menu, proceed as follows:
1. Select the PROGRAMS folder of the relevant SIMOTION device in the project navigator.
2. In the context menu, select Insert new object > MCC unit.
3. Enter the name of the MCC source file.
The names of program source files must comply with the rules for identifiers: They consist
of letters (A to Z, a to z), numbers (0 to 9), or single underscores (_) in any order,
whereby the first character must be a letter or an underscore. The letters are not case-
sensitive.
The permissible length of the name depends on the version of the SIMOTION kernel:
– Version V4.1 and higher of the SIMOTION kernel: a maximum of 128 characters
– Version V4.0 and below of the SIMOTION kernel: a maximum of 8 characters
Names must be unique within the SIMOTION device.
4. If necessary, select the Compiler tab and make any local compiler settings (see Local
compiler settings (Page 41)).
5. You can also enter an author, version, and a comment.
6. Click OK to confirm.

NOTICE
When you click OK, the MCC unit will only be transferred to the project. The data,
together with the project, is only saved to the data carrier if you select Project > Save,
Project > Save and compile all or Project > Save and recompile all.

SIMOTION MCC Motion Control Chart


32 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

Figure 3-1 Creation dialog for a new MCC source file

Figure 3-2 New MCC source file (declaration table for the interface and implementation
sections)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 33
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2.2 Opening existing MCC source files


All existing MCC source files are located in the PROGRAMS folder in the project navigator.
To open an MCC source file, do one of the following:
● Double-click the name of the source file
● Select Open in the shortcut menu when the MCC source file is selected.
The MCC source file (declaration table) is opened in the working window. Multiple MCC
source files can be opened.

3.2.3 Transferring and compiling an MCC source file

Procedure:
1. To transfer an MCC source file with its associated MCC charts to the project and start its
compilation, proceed as follows:
2. Make sure that the MCC source file or one of the associated MCC charts is the active
window in the Workbench.
Select one of the following menu commands:
– Transfer and compile button in the MCC source file or MCC editor toolbar
– MCC source file > Transfer and compile menu item or MCC chart > Transfer and
compile menu item
Alternative way of saving and compiling:
● Select the MCC source file or an MCC chart in the project navigator; then, in the shortcut
menu, select Transfer and compile.

NOTICE
Pay attention to the order of the MCC charts in an MCC source file. A subroutine
(function or function block) must be defined before it is used. This is the case when the
MCC chart of the subroutine appears above the chart in which it is used in the project
navigator If necessary, reorder the charts (see Specifying the order of MCC charts in the
MCC source file (Page 47)).
The Transfer and compile command transfers the changes in the MCC source file and
associated MCC charts to the project only. The data, together with the project, is only
saved to the data carrier if you select Project > Save, Project > Save and compile all or
Project > Save and recompile all.

SIMOTION MCC Motion Control Chart


34 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

You can also save (export) an MCC source file outside the project (see Exporting and
importing an MCC source file (Page 37)).
Error messages and warnings relating to compilation are displayed in the Compile/check
output tab in the detail view.

Note
If certain commands (for example, Synchronous Start, Uninterruptible Variable Assignment)
are included in the MCC chart, UserInterruptTask_1 must be configured in the execution
system in order to ensure error-free compilation. You must program the error reactions to
these commands in UserInterruptTask_1.
If you receive an applicable error message, proceed as follows:
1. Insert an MCC chart for a program, and program the appropriate error reactions.
2. Assign the program to UserInterruptTask_1.

MCC source file toolbar


This toolbar contains important command buttons for an MCC source file:

① Accept and compile


② Insert MCC chart
Figure 3-3 MCC unit function bar

3.2.4 Closing an open MCC source file


To close an open MCC source file in the working window, do one of the following:
● Click the x button in the header
● Select the MCC source file > Close menu command
● Select the Window > Close All Windows menu command
If the changes have not yet been saved in the project, you can save or cancel them, or abort
the close operation.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 35
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2.5 Cutting, copying, and deleting an MCC source file


You can cut or copy an MCC source file and all of its associated MCC charts and paste them
under the same or a different SIMOTION device.
An MCC source file that has been deleted cannot be pasted.

Proceed as follows
Follow these steps:
1. Select the MCC source file in the project navigator.
2. In the context menu, select the appropriate item (Cut, Copy, or Delete).

3.2.6 Pasting a cut or copied MCC source file

Procedure
To paste a cut or copied MCC source file, proceed as follows:
1. Under the SIMOTION device, select the PROGRAMS folder.
2. In the context menu, select Insert.
The MCC unit is pasted (with a different name, if necessary).
3. Change the name, if necessary (see Renaming MCC source files (Page 39)).

3.2.7 Know-how protection for MCC source files


You can protect MCC source files from access by unauthorized third parties. Then, a
password must be entered in order to open or view the protected MCC source files and
associated MCC charts.
The SIMOTION online help provides additional information on know-how protection.

Note
MCC charts from know-how-protected MCC units cannot be exported as plain text files (as
an MCC chart or ST source file). However, they can still be exported in XML format.

SIMOTION MCC Motion Control Chart


36 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2.8 Exporting and importing an MCC source file


The export and import functions offer you the option of saving an MCC source file outside
the project on your hard disk so that you can copy it from there into another project.
You can export an MCC source file as a text file for the SIMOTION ST (Structured Text)
programming language. You can either import this file as an ST source file or edit it with any
ASCII editor.
You can also export/import an MCC source file as an encoded XML file.

See also
Exporting an MCC source file as an ST source file (Page 37)
Exporting an MCC source file in XML format (Page 38)
Importing an MCC source file from XML data (Page 38)

3.2.8.1 Exporting an MCC source file as an ST source file

Procedure
You can export an MCC source file as a text file for the SIMOTION ST (Structured Text)
programming language. You can either import this file as an ST source file or edit it with any
ASCII editor.
1. Select the MCC unit in the project navigator.
2. Select the Export as ST command in the context menu.
3. Select the directory and file name.

Note
Text files for the ST programming language cannot be imported as MCC source files.
Know-how-protected MCC units cannot be exported as plain text files (as an ST source
file). However, they can still be exported in XML format.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 37
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2.8.2 Exporting an MCC source file in XML format

Proceed as follows
This operation allows you to save an MCC source file in encoded form in a directory outside
the project.
1. Select the MCC source file in the project navigator.
2. Select Expert > Save Project and Export Object in the context menu.
3. Select the directory for the XML export and confirm withOK.

NOTICE
MCC in SIMOTION SCOUT Version 3.2 and higher permits structures (e.g., multiple
charts in one source file, source-file-internal unit variables) that are not supported in
earlier versions.

Note
Know-how-protected MCC source files can also be exported in XML format. The know-
how protection is retained when the files are imported.

3.2.8.3 Importing an MCC source file from XML data

Procedure
This operation allows you to import MCC units that were exported as encoded files in XML
format.
1. In the project navigator, select the PROGRAMS folder.
2. In the context menu, select the Import object command.
3. Select the XML data to be imported.
The entire project is saved and recompiled.

Note
Individual objects (e.g. MCC units) from a project that was exported as XML data cannot be
imported selectively.

See also
Inserting a new MCC source file (Page 32)

SIMOTION MCC Motion Control Chart


38 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2.9 Properties of an MCC source file

Proceed as follows
The properties of an MCC source file are already defined when you insert it. However, these
properties can be viewed and modified by doing the following:
1. Select the MCC source file in the project navigator.
2. In the shortcut menu, select Properties.

Figure 3-4 Properties of an MCC source file

3.2.9.1 Renaming MCC source files


To rename an MCC source file, proceed as follows:
1. Open the Properties window of the MCC source file.
2. Click .
3. Click OK to confirm.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 39
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

3.2.9.2 Using test functions


You can make use of various test functions (single step or program status) during program
execution by doing the following:
1. Select the Compiler tab.
2. Make the necessary settings (see Local compiler settings (Page 41)).
These functions facilitate debugging of your program.

3.2.9.3 Configuring compiler settings


You can configure the compiler settings as follows:
● Globally for the SIMOTION project, valid for all programming languages, see Global
settings of the compiler (Page 40)
● Locally for an individual MCC unit within the SIMOTION project, see Local settings of the
compiler (Page 41)

Global compiler settings


The global setting are valid for all programming languages within the SIMOTION project.

Procedure
1. Select the menu Tools > Settings.
2. Select the Compiler tab.
3. Define the settings according to the following table.
4. Confirm with OK.

Figure 3-5 Global compiler settings

SIMOTION MCC Motion Control Chart


40 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

Parameter
For a description of the parameters of the global compiler settings, refer to SIMOTION ST
Programming and Operating Manual.

Local compiler settings


Local settings are configured individually for each MCC source file; local settings overwrite
global settings.

Procedure
To select the compiler options, proceed as follows:
1. Open the Properties window for the MCC unit (see Properties of an MCC unit (Page 39)).
2. Select the Compiler tab.
3. Enter settings.
4. Click OK to confirm.

Figure 3-6 Local compiler settings for MCC source files in the Properties window

The current compiler options (the combination of global and local compiler settings which
currently applies) for the program source are displayed on the Additional settings tab. The
compiler options used the last time the program source was compiled can be seen on the
Compilation tab.
(See the SIMOTION ST Programming and Operating Manual.)
The SIMOTION ST Programming and Operating Manual contains additional information on
what the compiler options mean.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 41
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

Table 3- 1 Local compiler settings

Parameter Description
Ignore global settings See the description under Effectiveness of global or local settings (see the SIMOTION ST
Programming and Operating Manual).
Suppress warnings In addition to error messages, the compiler can output warnings. You can set the scope of
the warning messages to be output:
Active: The compiler outputs the warning messages according to the selection in the global
settings of the warning classes. The checkboxes of the warning classes can no longer be
selected.
Inactive: The compiler outputs the warning messages according to the warning classes
(see the SIMOTION ST Programming and Operating Manual) selected.
Warning classes1 Only for Suppress warnings = inactive.
Active: The compiler outputs warning messages of the selected class.
Inactive: The compiler suppresses warning messages of the respective class.
Grey background: The displayed global setting is adopted (only for Ignore global settings =
inactive).
For the meaning of warning classes, see the SIMOTION ST Programming and Operating
Manual.
Note: If "Suppress warnings" is active, the checkboxes can no longer be selected and show
as activated against a gray background.
Selective linking1 Active: Unused code is removed from the executable program.
Inactive: Unused code is retained in the executable program.
Grey background: The displayed global setting is adopted (only for Ignore global settings =
inactive).
Use preprocessor1 Active: The preprocessor is used (see the SIMOTION ST Programming Manual).
Inactive: Preprocessor is not used.
Grey background: The displayed global setting is adopted (only for Ignore global settings =
inactive).
Enable program status1 Active: An additional program code is generated to enable monitoring of program variables
(including local variables) (see Program status (Page 556)).
Inactive: Program status not possible.
Grey background: The displayed global setting is adopted (only for Ignore global settings =
inactive).
Permit language extensions1 Active: Language elements are permitted that do not comply with IEC 61131-3.
• Direct bit access to variables of a bit data type (see the SIMOTION ST Programming
and Operating Manual).
• Accessing the input parameters of a function block when outside the function block (see
the SIMOTION ST Programming and Operating Manual).
• Calling a program while in a different program (see the SIMOTION ST Programming
and Operating Manual).
Inactive: Only language elements are permitted that comply with IEC 61131-3.
Grey background: The displayed global setting is adopted (only for Ignore global settings =
inactive).

SIMOTION MCC Motion Control Chart


42 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.2 Inserting and managing MCC source files

Parameter Description
Only create program Active: The local variables of a program are only stored once in the user memory of the
instance data once1 unit. This setting is required when calling a program while in a different program (see the
SIMOTION ST Programming and Operating Manual).
Inactive: The local variables of a program are stored according to the task assignment in
the user memory of the respective task.
Grey background: The displayed global setting is adopted (only when Ignore global settings
= inactive).
See Memory areas for the variable types (see the SIMOTION ST Programming and
Operating Manual).
For further information, refer to the SIMOTION Basic Functions Function Manual.
Enable OPC-XML Active: Symbol information for the unit variables of the ST source file is available in the
SIMOTION device (required for the _exportUnitDataSet and _importUnitDataSet functions,
see the SIMOTION Basic Functions Function Manual).
Inactive: Symbol information is not created.
Permit single step2 When active, additional program code is generated which enables individual program steps
to be monitored.
This function facilitates debugging of your program.
See Tracking individual program steps (Page 553).
1 Global setting is also possible ( Options > Settings > Compiler menu), see Global compiler settings (Page 40). See also
the description on Effectiveness of global or local compiler settings (see the SIMOTION ST Programming and Operating
Manual).
2 Global setting is also possible ( Options > Settings > MCC Editor menu), see MCC Editor settings (Page 29). See also
the description on Effectiveness of global or local compiler settings (see the SIMOTION ST Programming and Operating
Manual).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 43
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3 Inserting and managing MCC charts


MCC charts are displayed in the project navigator under the respective MCC source file.

3.3.1 Inserting a new MCC chart


You can insert a new MCC chart for an existing MCC unit in any of the following ways (see
Insert new MCC unit (Page 32)):
● In the project navigator: Below an MCC unit using the Insert MCC chart command
● Select the required MCC unit in the project navigator and choose the command Insert >
Program > MCC unit in the menu
● Select the required MCC unit and choose the Insert MCC chart icon in the MCC unit
function bar

Procedure
To insert a new MCC chart using the menu, proceed as follows:
1. The MCC source file must already exist.
2. Select the relevant MCC source file in the project navigator.
3. Select the Insert > Program > MCC chart command from the menu.
4. Enter the name of the MCC chart (see Rules for identifiers (Page 91)).
5. For creation type, select Program. For creation types Function or Function block, see
subroutine (Page 139).
6. Enable the Exportable checkbox if you would also like the program to be available in
other program source files (LAD/FBD, MCC or ST source files) or in the execution system
(see Assigning programs to a task (Page 537)).
7. You can also enter an author, version, and a comment.
8. Click OK to confirm.

NOTICE
When you click OK, the MCC chart will only be transferred to the project. The data,
together with the project, is only saved to the data carrier if you select Project > Save,
Project > Save and compile all or Project > Save and recompile all.

SIMOTION MCC Motion Control Chart


44 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

Figure 3-7 Dialog box for creating a new MCC chart

Figure 3-8 New MCC chart with declaration table and starting and end nodes

See also
Keywords for variable types (Page 103)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 45
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3.2 Opening an existing MCC chart


All existing MCC charts for an MCC source file are located in the project navigator below the
relevant MCC source file.
To open an MCC chart, do one of the following:
● Double-click the name of the chart
● Select Open in the shortcut menu when the MCC chart is selected.
The MCC chart is opened in the working window. Multiple MCC charts can be opened.

3.3.3 Transferring and compiling an MCC chart


You cannot compile an MCC chart independently. The MCC source file is always compiled
with all of its associated MCC charts (see Transferring and compiling an MCC source file
(Page 34)).

3.3.4 Closing an open MCC chart


To close an open MCC chart in the working window, do one of the following:
● Click the x button in the header
● Select the MCC chart > Close menu command
● Select the Window > Close All Windows menu command
If the changes have not yet been saved in the project, you can save or cancel them, or abort
the close operation.

3.3.5 Cutting, copying, and deleting an MCC chart


You can cut or copy an MCC chart and paste it under the same or a different MCC source
file (as well as under a different SIMOTION device).
An MCC chart that has been deleted can no longer be pasted.

Proceed as follows
Follow these steps:
1. Select the MCC chart in the project navigator.
2. In the context menu, select the appropriate item (Cut, Copy, or Delete).

SIMOTION MCC Motion Control Chart


46 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3.6 Pasting a cut or copied MCC chart

Proceed as follows
Proceed as follows to paste a cut or copied MCC chart:
1. Select an MCC source file in the project navigator.
2. In the context menu, select Insert.
The MCC chart is inserted with a different name.
3. Change the name, if necessary (see Renaming MCC charts (Page 50)).

3.3.7 Specifying the order of MCC charts in the MCC source file
The order of the MCC charts in the MCC source file is important for compilation. A POU
(e.g., a function) must be defined before it is used.

Proceed as follows
To change the order:
1. Select an MCC chart in the project navigator.
2. In the shortcut menu, select Up/Down.

3.3.8 Exporting and importing an MCC chart


The export and import functions offer you the option of saving an MCC chart outside the
project on your hard disk so that you can copy it from there into another project.
If you have exported an MCC chart using an older software version, it can be imported and
processed with any of the later software versions.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 47
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3.8.1 Exporting an MCC chart in XML format


This operation allows you to save an MCC chart in encoded form in a directory outside the
project.

Procedure
1. Select the MCC chart in the project navigator.
2. Select the Export as XML command in the context menu.
3. Select the directory for the XML export and confirm withOK.

NOTICE
MCC in SIMOTION SCOUT Version 3.2 and higher permits structures (e.g., multiple
charts in one source file, source-file-internal unit variables) that are not supported in
earlier versions.

Note
Know-how-protected MCC charts can also be exported in XML format. The know-how
protection is retained when the files are imported.

3.3.8.2 Importing an MCC chart from XML data


This operation allows you to import an MCC chart that was exported as a decoded file in
XML format.

Procedure
1. Select the MCC unit in the project navigator.
2. In the context menu, select the Import MCC Chart > From MCC Format command.
3. Select the XML data to be imported.

Note
Individual objects (e.g., MCC charts) that were exported as XML data cannot be imported
selectively.

See also
Inserting a new MCC chart (Page 44)

SIMOTION MCC Motion Control Chart


48 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3.8.3 Importing an MCC chart


This operation imports an MCC chart that was exported as an MCC chart from a project of
an earlier version into an existing MCC source file.

Proceed as follows
1. Select the relevant MCC source file in the project navigator.
2. In the context menu, select Import MCC Chart > From MCC Format.
3. Select the directory and file name (name.mcc).
The dialog window for inserting an MCC chart is displayed.
4. Enter the name of the MCC chart in the project.
If the existing technology objects do not match the MCC chart to be imported, it is possible to
create them later.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 49
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3.9 Properties of an MCC chart

Proceed as follows
The properties of an MCC chart are already defined when you insert it. However, these
properties can be viewed and modified by doing the following:
1. Select the MCC chart in the project navigator.
2. In the shortcut menu, select Properties.

Figure 3-9 Properties of an MCC chart

3.3.9.1 Renaming MCC charts


To change the name of an MCC chart, proceed as follows:
1. Open the Properties window of the MCC chart.
2. Click .
3. Enter the new name for the MCC chart (see Rules for identifiers (Page 91)).
4. Click OK to confirm.

SIMOTION MCC Motion Control Chart


50 Programming and Operating Manual, 05/2009
MCC Source Files and MCC Charts
3.3 Inserting and managing MCC charts

3.3.9.2 Changing the creation type of the MCC chart


To change the creation type of an MCC chart, proceed as follows:
1. Open the Properties window of the MCC chart.
2. Select the new creation type (Program, Function or Function block).
3. Click OK to confirm.

3.3.9.3 Changing usability in other charts (export capability)


To change the export capability of an MCC chart, proceed as follows:
1. Open the Properties window of the MCC chart.
2. If required, select the Exportable check box.
With activated checkbox, the MCC chart can be used in other program sources (e.g.
MCC units, ST source files). A program can be assigned to a task only when this check
box is selected (see assigning programs to a task (Page 537)).
When the check box is cleared, the MCC chart can only be used in the associated MCC
source file.
3. Click OK to confirm.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 51
Programming in MCC 4
4.1 Programming an MCC chart
This chapter contains detailed instructions on how to program in the MCC language.

4.2 Principles of programming

4.2.1 General principles of programming


Every new MCC chart already contains a starting and an end node. You program commands
and instructions between these two nodes. The commands you program are executed from
the starting node in the direction of the end node.

Motion commands
Motion commands are executed based the transition behavior and step enabling conditions
that are selected in the parameter screen forms.
Motion commands can be issued from all tasks.
The overall status of an axis motion is recorded in the system and can be queried at any
time using system variables. A command can be waiting, active, or inactive.

wait commands
Execution of the task is delayed until the programmed event (that is, the condition) occurs.
The program is not executed again cyclically, and the task does not require any processor
time. All other tasks continue to run unaffected.
The events are scanned in the interpolator cycle clock (IPO cycle clock). If the appropriate
event occurs, the highest-priority task in its own level is continued. In the case of
MotionTasks, the subsequent motion command is executed in the following IPO cycle clock.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 53
Programming in MCC
4.2 Principles of programming

4.2.2 Simplified example of programming principles


Axis_3 will move to absolute position 1,000 mm at a velocity of 100 mm/s. As soon as output
1 is switched, axis_3 will move back to position 0 mm.





① Attach transition behavior:


After switching the axis enable, the program switches to the positioning command.
② Delay program execution:
The next command is started when the axis motion has ended.
Figure 4-1 Example of programming principles

SIMOTION MCC Motion Control Chart


54 Programming and Operating Manual, 05/2009
Programming in MCC
4.3 Managing MCC commands

4.3 Managing MCC commands

4.3.1 inserting commands


You can insert commands into the MCC chart using one of the following:
● MCC editor toolbar
● MCC Chart > Insert menu command

MCC editor toolbar


This toolbar contains important programming command buttons (for example, Insert MCC
Chart, Accept and Compile, and Monitor) together with the complete range of commands.
The commands are subdivided into seven command groups.

      

      



① Accept and compile ⑨ Communication


② Program status ⑩ Single axis commands
③ Monitoring ⑪ Commands for external encoders, measuring inputs
and output cams
④ Single-step ⑫ Commands for synchronous operation and camming
⑤ Next step ⑬ Commands for path interpolation
⑥ Basic commands ⑭ Important commands
⑦ Task commands ⑮ Command groups
⑧ Program structures
Figure 4-2 MCC editor toolbar

Each of these groups is represented by a button on the toolbar. The list of commands is
displayed when you move the cursor over the button; you can insert the appropriate
command by clicking it with the left mouse button.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 55
Programming in MCC
4.3 Managing MCC commands

6HOHFWEXWWRQWRRSHQWKHOLVWRIFRPPDQGV

,QVHUWDFRPPDQGIURPWKHFRPPDQGOLVW

Figure 4-3 Inserting a command from the MCC editor toolbar

You can detach the displayed command list using the cursor and place it anywhere on the
screen. It will then be easily accessible while you are creating your program.
If all of the command lists have been detached, every command can be inserted in the MCC
chart with one click. The figure below shows a working window with an MCC chart and
opened command lists.

Figure 4-4 Opened command lists in the Workbench making every command available with one mouse click

SIMOTION MCC Motion Control Chart


56 Programming and Operating Manual, 05/2009
Programming in MCC
4.3 Managing MCC commands

The command that is selected and thus programmed is always inserted after the highlighted
command.

Note
The selection of command groups or command lists available for the MCC editor function bar
depends on which technology packages are currently selected for the SIMOTION device. To
select the required technology packages, highlight the relevant SIMOTION device in the
project navigator and choose the Select Technology Packages command in the context
menu.
For example, the command list Commands for path interpolation is only available as of the
PATH Version 4.1 technology package.

4.3.2 Representation of commands in the MCC chart


Commands are represented as a rectangular block. The starting and end nodes are oval, the
conditions are diamond-shaped. All commands are assigned a symbol that graphically
represents the command function. The commands are also color-coded:

Color Commands
Light blue Basic commands
White Subroutines and module creation
Green Start commands
Red Stop commands
The figure below shows how most of the commands are represented in an MCC chart. The
symbolic representation of commands makes it immediately obvious that axis_1 is being
positioned. You can modify the brief comment if desired.

 

   

① Name of the technology object, e.g., axis ⑤ Positioning the symbol


name
② Marking: ⑥ Hold point set
Command comment present
③ Serial numbers for the command ⑦ Brief comment
④ Marking:
Command has not been parameterized yet
or has been assigned incorrect parameters
Figure 4-5 Representation of a motion command in the MCC chart

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 57
Programming in MCC
4.3 Managing MCC commands

Brief comment
The brief comment is used to document the MCC chart or the command. It is preset with the
name of the relevant command. Clicking the text allows you to change it, if necessary.
There is no maximum text length. The text length that can be displayed on the screen is
dependent on the following factors:
● Font size and type
● Screen resolution

Command comment
You can enter an additional comment for each command:
● Select the required command in the MCC chart.
● In the context menu, select Enter comment.
● Enter the text of the comment in the displayed window.
● Click OK to confirm.
If a command comment is present, a green indicator appears at the top right of the
command.

Comment block
In addition, there is also a separate command for entering comments (see Comment block
(Page 209)).

4.3.3 Translating comments


Brief comments and command comments can be translated into various languages and
displayed.
To do so, use the Project > Language-Dependent Texts menu command. Select MCC
comments as the text source.
The remaining steps are presented in the online help.

4.3.4 Numbering of commands


When a command is inserted, it is automatically assigned a serial number. This number is
unique and is used to identify the command, for example, in the cross-reference list.

Note
The user is not able to change this number.
A number that is freed up after deletion of a command is reassigned only after the MCC
chart has been saved and closed and then reopened.

SIMOTION MCC Motion Control Chart


58 Programming and Operating Manual, 05/2009
Programming in MCC
4.3 Managing MCC commands

4.3.5 Selecting commands


If you wish to copy a command, for example, you must select it beforehand.
You select a command by clicking it. You can select several commands by moving the
cursor over them with the left mouse button depressed. If you wish to select all of the
commands, use Select All in the context menu.
Selected commands are identified by a thick blue border; in addition, the border of the last
selected command flashes.

4.3.6 Hiding and displaying commands


You can hide commands for test purposes; hidden commands are excluded from the code
generation process and are unavailable for selection.
Follow these steps:
1. Select the commands you want to hide.
2. On the shortcut menu, select Mask Out.
If you hide a control structure, all of the commands it contains and their parameters are also
hidden.
To show hidden commands again, proceed as follows:
1. Select the commands you want to show.
2. On the shortcut menu, select Display.

4.3.7 Copying, deleting, cutting, or pasting commands


The functions Copy, Delete etc. can be selected either from the context menu or the Edit
menu.
If you copy or cut a command and then paste it, the programmed parameters are also copied
or cut and pasted. You can also paste the copied command into other MCC charts.
You cannot paste a command that has been deleted.

Note
If you delete a command by mistake, you can undo the delete operation. Select the Edit >
Undo menu command.

If you copy a control structure, all of the commands it contains and their parameters are also
copied. The same applies when Delete, Cut, or Paste is used.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 59
Programming in MCC
4.3 Managing MCC commands

4.3.8 Undo/redo
All actions can be undone in reverse order. Select the Edit > Undo menu command or the
Undo button.

NOTICE
The following actions cannot be undone:
• Save
• Accept and compile

If you want to redo one or more undone actions, use the Edit > Redo menu command or the
Redo button.

4.3.9 Module creation

Modules are used to structure the MCC chart. Modules comprise a number of interrelated
commands that are joined to make one single command. This feature allows even complex
MCC charts to be structured in a clear, easily readable fashion.
A module can contain all types of commands. You can also nest modules and copy them for
multiple use in different charts.
Programming sections to be included in multiple programs (MCC charts) must be swapped
out as subroutines (see Subroutine (Page 139)).

See also
Procedure for creating a module (Page 61)
Opening and closing a module (Page 62)
Canceling a module (Page 62)
Changing the module structure (Page 62)

SIMOTION MCC Motion Control Chart


60 Programming and Operating Manual, 05/2009
Programming in MCC
4.3 Managing MCC commands

4.3.9.1 Procedure for creating a module


You can use two different methods to create a module:
● You can insert an empty module using the appropriate MCC editor toolbar command.
You can then open the module by double-clicking it or using the context menu, and
program the commands.
● You can use the shortcut menu command directly to combine existing commands in the
MCC chart to form a module:
6KRUWFXWPHQX

6HOHFWHGFRPPDQGV
Figure 4-6 Combining existing commands to create a module

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 61
Programming in MCC
4.3 Managing MCC commands

4.3.9.2 Opening and closing a module


The module opens when you double-click the module command or select Zoom in to Module
in the context menu.
Close the module again by selecting Zoom out of module on the shortcut menu.

6KRUWFXWPHQX

Figure 4-7 Opened module

4.3.9.3 Canceling a module


You can cancel the module by selecting Cancel module in the shortcut menu. The
commands previously grouped in the module are then displayed in the MCC chart instead of
the module command.

4.3.9.4 Changing the module structure


If you wish to change the module structure, cancel the existing modules (Page 62) and
create new ones.

SIMOTION MCC Motion Control Chart


62 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

4.4 Processing MCC commands

4.4.1 Assigning command parameters


All commands are assigned parameters in parameter screen forms. The structure of the
parameter screen forms varies depending on the command.

Opening the parameter screen form


To open a parameter screen form, double-click the command or select Parameterize
Command in the context menu. You can open and edit any number of parameter screen
forms from the same or different charts.
Changes in the symbol browser and in the project structure and commissioning are possible
while a parameter screen form is open.

Structure of parameter screen forms for motion commands


The axis that is to be moved or stopped must always be specified in the top half of the box.
The center section contains different input fields and selection lists relating to the axis motion
or stop commands. For reasons of clarity, this section contains several tabs. You need only
assign the parameters in the first tab to obtain an executable command. All of the other tabs
are optional and designed for special settings (such as jerk, acceleration, velocity profile,
etc.).
The lower half of the box contains the settings for the transition behavior of the previous
command and the step enabling condition for the next command.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 63
Programming in MCC
4.4 Processing MCC commands










   

① Register ⑥ Apply the parameter assignment and close


the screen form
② Transition behavior and step enabling ⑦ Editable selection list
condition
③ Online help ⑧ Selection list (combo box)
④ Apply the parameter assignment ⑨ Input field
⑤ Close the screen form (discard the
parameter assignment)
Figure 4-8 Parameter screen form for a motion command

If there are many commands, the layout of the parameter screen form (presentation and
selection options) depends on:
● Configuration data and system variables of the selected technology object (seeExpert tab
(Page 79))
● Entries you have already made in the parameter screen form Read the note about the
table in Selection list (combo box) (Page 65).

Structure of parameter screen forms for conditions and branches


You can program conditions and branches in the MCC editor using the LAD, FBD, or
Formula languages (see LAD/FBD/formula (Page 164)).

SIMOTION MCC Motion Control Chart


64 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

4.4.2 Input fields and selection lists

4.4.2.1 Input field


Each input field must contain one of the following entries:
● Value
In many cases, the entered value is checked for a maximum value that was specified
during configuration of the technology object. This value is displayed in the tooltip.
● Unit variables (of the MCC source file) and global device variables or I/O variables
These can be moved from the symbol browser to the input field with a drag-and-drop
operation (see Formula (Page 170)).
● Local variables of the MCC chart
● Formula
You can drag commands and functions from the command library with a drag-and-drop
operation (see Using the command library (Page 172)).

4.4.2.2 Selection list (combo box)


Combo boxes provide different selection options. Frequently occurring selection options are
listed in the following table below.
In principle, user-defined variables can be applied for the following cases in a combo box:
● as a variable of technology object data type (see Using variable of technology object data
type (Page 68))
● as a variable of enumeration data type:
The variable can be assigned an enumeration element of enumeration data type. The
enumeration data type being used is displayed in the combo box tool tip.
By defining the variable in the declaration table of the MCC source file or MCC charts,
this variable is displayed in the selection list of the combo box as an additional selection
option.
The relevant system function is also shown for every MCC command in the description of
the MCC commands (Page 183). The description of the system function contains a list of
the enumeration elements for the respective enumeration data type; see the Technology
Packages, System Functions Parameter Manual.
If the variable was defined while the parameter screen form for the relevant MCC
command was open, the parameter screen form must be closed and re-opened to enable
the additional selection option to be displayed.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 65
Programming in MCC
4.4 Processing MCC commands

Table 4- 1 Frequently selected options in combo boxes

Selectable options Meaning


Preassigned value The preassigned value in the associated system variable is used.
Preassigned values can be defined during configuration of the
technology object (see online help).
The Set Axis Parameter (Page 348) command is used to change
frequently used preassigned Axis values.
Last programmed The last programmed value is entered.
Last programmed velocity For velocities only:
The last programmed velocity is applied.
For superimposed motion, the velocity of the base motion and the
superimposition are added up.
Current For velocities only:
The active axis velocity is applied. Use for on-the-fly transitions and
substitute motions.

Note
Not all of the options listed here are available in every case.
Note the following regarding the "preassigned value" and "last programmed" selection
options: If the display of additional fields in the parameter screen form depends on this entry,
these fields may not be displayed or some selection options may not be available.

4.4.2.3 Editable selection list (editable combo box)


Editable selection lists are used for inputting values associated with physical variables (such
as position and velocity). They are always linked to a unit of measure.
● Select an entry from the selection options offered (see Selection list (combo box)
(Page 65)).
or
● Enter the value directly in the same way as in an entry field (as a value, variable, or
formula). To do this, select the entry in the selection list and overwrite it.

Note
When you select "%" in the "Unit" selection field: note that the value entered represents a
percentage of the associated preassigned value.

See also
Using a technology object-type variable (Page 68)

SIMOTION MCC Motion Control Chart


66 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

4.4.2.4 Unit
Here you can select what the value in the adjacent editable selection list represents. The
following are available:
● The unit of the physical quantity defined during configuration of the technology object
The value in the adjacent field represents a physical quantity with the indicated unit.
● "%" (percentage)
The value in the adjacent field represents a percentage of the associated preassigned
value.

4.4.3 Assigning a technology object or a technology object-type variable to a command

4.4.3.1 Using a technology object


One or more technology objects (TOs) can be assigned to the command via its parameter
screen form. Either a technology object which is already configured in the project navigation
or a technology object-type variable can be assigned.

Assigning a technology object


A technology object which has already been configured (e.g. a linear axis with an
incremental encoder) can be assigned to a command via its parameter screen form. Specific
configuration data from the technology object is used to influence the design and/or selection
options in the parameter screen form.
This relevant configuration data is displayed on the "Expert" tab in the "TO properties" list
and saved in the command.
By assigning a technology object, the values displayed in the "TO properties" list on the
"Expert" tab are fixed entries in the parameter screen form and cannot be changed.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 67
Programming in MCC
4.4 Processing MCC commands

4.4.3.2 Using a technology object-type variable

Assigning a technology object-type variable


Defining a technology object-type variable only serves to create a reference to a technology
object.
As a place holder for a technology object, the variable can be assigned to a command via its
parameter screen form. A technology object is only assigned to variables during the runtime
of a program.
The variable defaults which influence the design and/or selection options in the parameter
screen form are displayed in the "TO properties" list in the "Expert" (Page 79) tab.
Through the assignment of a variable, the TO properties values shown in the "TO properties"
list in the "Expert" tab are not fixed entries in the parameter screen form and can be changed
in the parameter screen form.
However, these TO properties only appear in the parameter screen form and do not exist as
the configuration data/system variables of a technology object. The command only receives
the configuration data/system variables of a technology object if the technology object is
assigned to the variable during the program runtime.

Example of an absolute encoder


A "posAxis" (positioning axis)-type variable is defined and assigned to the MCC "homing
axis" command via its parameter screen form. An axis which is configured on the SIMOTION
device, with an absolute value encoder, is assigned to the variable as a technology object
during the program runtime. Therefore, the parameter screen form must be adapted
accordingly in the "Expert" (Page 79) tab in order to select the "Absolute encoder
adjustment" or "Absolute encoder calibration with specification of the position value" homing
types.

SIMOTION MCC Motion Control Chart


68 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

Procedure
1. Define a technology object-type variable in the MCC chart declaration table by specifying
the "posAxis" data type (see Description of the technology objects data types
(Page 101)). This means that a positioning axis-type technology object can be assigned
to the variable during the program runtime.

Figure 4-9 Defining a technology object-type variable in the declaration table

2. Drag & drop the "homing axis" into the MCC chart.
3. Double-click on the command.
The parameter screen form opens.
4. Select the defined variable in the "axis" dialog box.
The variable is thus assigned to the command as a place holder for a position axis. Since
a variable has been assigned to the command, and not a technology object, the TO
properties, e.g. the encoder type, can be changed in the "Expert" tab.
5. Select the "Expert" tab.
The variable default settings that influence the parameter screen form (design and/or
selection options) are displayed in the "TO properties" list, for example, the default
"Incremental" appears in the "Value" column for the encoder type, i.e. an incremental
encoder is preset.
Based on the default "Incremental", only the homing types for an incremental encoder are
available for selection in the "Homing type" dialog box in the "Parameter" tab. In order to
select the homing types for an absolute encoder, the encoder type must be changed to
absolute encoder beforehand.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 69
Programming in MCC
4.4 Processing MCC commands

6. In the "TO properties" list, select the entry "Absolute" or "Absolute cyclic" from the pull-
down list under "Value" in the encoder type row.
The encoder type is changed from incremental encoder to absolute encoder.

Figure 4-10 Selecting an absolute encoder via the Expert tab

SIMOTION MCC Motion Control Chart


70 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

7. Select the "Parameters" tab.


The only options available for selection now in the "Homing type" dialog box are the
"Absolute encoder adjustment" or "Absolute encoder calibration with specification of the
position value" homing types.

Figure 4-11 "Absolute encoder adjustment" homing type

Example of time-based cams


An "outputCamType" (cam)-type variable is defined and assigned to the MCC "Switch output
cam on" command via its parameter screen form. A time-based cam on a rotatory axis which
is configured on the SIMOTION device is assigned to the variable as a technology object
during the program runtime. Therefore, the parameter screen form has to be adapted
accordingly in the "Expert" (Page 79) tab.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 71
Programming in MCC
4.4 Processing MCC commands

Procedure
1. Define a technology object-type variable in the MCC chart declaration table by specifying
the "outputCamType" data type (see Description of the technology objects data types
(Page 101)). This means that a "cam"-type technology object can be assigned to the
variable during the program runtime.

Figure 4-12 Defining a technology object-type variable in the declaration table

2. Drag & drop the "Switch output cam on" into the MCC chart.
3. Double-click on the command.
The parameter screen form opens.
4. Select the entry "<Reference>" in the "Axis/encoder" dialog box, as the output cam is
predefined as a reference (variable), and not as a technology object.
Thus, the variable is assigned to the command as a place holder for an output cam in the
"Output cam" dialog box. Since a variable has been assigned to the command, and not a
technology object, the TO properties, e.g. the output cam type, can be changed in the
"Expert" tab.

Figure 4-13 Parameter screen form: Switch output cam on for linear axis and position-based cam

SIMOTION MCC Motion Control Chart


72 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

5. Select the "Expert" tab.


The variable default settings that influence the parameter screen form (design and/or
selection options) are displayed in the "TO properties" list, for example, the default
"Position-based cam" appears in the "Value" column for the output cam type, i.e. a
position-based cam is preset.
6. In the "TO properties" list, select the entry "Time-based cam" from the pull-down list
under "Value" in the output cam type row.
The output cam type is changed from position-based cam to time-based cam.
7. In the "TO properties" list, select the entry "Rotatory axis" from the pull-down list under
"Value" in the axis type row.
The axis type type is changed from linear to rotatory axis.
8. Select the "Parameters" tab.
The information displayed here has changed markedly because the parameters are now
shown for a rotatory axis and for a time-based cam.

Figure 4-14 Parameter screen form: Switch output cam on for rotary axis and time-based cam

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 73
Programming in MCC
4.4 Processing MCC commands

4.4.3.3 Updating a command when a technology object has been changed


When an MCC unit is compiled, the motion commands are checked as to whether the
configuration data for the assigned technology objects saved in the MCC command (relevant
for the parameter screen form) matches the current configuration data.
Compilation will be interrupted in the case of a deviation. The sequential number (block
number) for the relevant MCC command can be taken from the error message.
You can update an MCC command and adapt it to the modified configuration data by
proceeding as follows:
1. Open the relevant MCC command.
An "Update"button is displayed in the header area of the command. A corresponding
warning can also be shown.

Figure 4-15 Updating an MCC command

2. Confirm the warning or click on the "Update" button.


The parameter screen form is adapted to the modified configuration data.
3. In the parameter screen form, check any additional settings and change them if
necessary.
4. Confirm by clicking on OK.

SIMOTION MCC Motion Control Chart


74 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

4.4.4 Dynamics tab


The parameter dialog boxes for most of the motion commands include a Dynamics tab. Here
you can specify the velocity profile type and the associated values for acceleration,
deceleration, and jerk.

Figure 4-16 Dynamics tab for motion commands

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 75
Programming in MCC
4.4 Processing MCC commands

Overview of parameters

Table 4- 2 Overview of parameters for Dynamics tab

Field/Button Explanation/Instruction
Velocity profile The velocity profile is used to specify the transitions between the
individual motion phases. The velocity profile influences the motion
transitions as follows:
• At the start and end of the acceleration phase, the transition to the
constant acceleration or constant velocity phase
• At the start and end of the deceleration phase, the transition to the
constant deceleration or constant velocity phase
Select the velocity profile.
Trapezoidal
A trapezoidal velocity profile is in effect for the command. Only the
acceleration and deceleration can be programmed.
Constant
The velocity profile with smooth acceleration characteristic is in effect for
the command. The change in acceleration/deceleration (jerk) can be
verified.
With the Gearing on command (Gearing on (Page 416)), a constant
velocity profile only takes effect if configuration data
syncingMotion.smoothAbsoluteSynchronization = YES is set.
Preassigned value
Last programmed
See Selection list (combo box) (Page 65)
The system variable for the preassigned value is given together with the
description of each command.
Acceleration The acceleration value during the constant acceleration phase.
Enter the value in the editable selection list (see Editable selection list
(editable combo box) (Page 66)).
Preassigned value
Last programmed
See Selection list (combo box) (Page 65)
The meaning depends on the acceleration model used, which can be
selected via the configuration data
TypeOfAxis.DecodingConfig.directionDynamic:
• Non-direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = NO (default)
The value causes acceleration in the motion of the axis, independent
of the direction of motion.
• Direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = YES
The value causes acceleration when the direction of rotation is
positive and deceleration when the direction of rotation is negative.
For additional information on specifying the acceleration and deceleration
(acceleration model), see the TO Axis Electric/Hydraulic Function Manual.
The system variable for the preassigned value is given together with the
description of each command.

SIMOTION MCC Motion Control Chart


76 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

Field/Button Explanation/Instruction
Deceleration Deceleration value during the constant deceleration phase
Enter the value in the editable selection list (see Editable selection list
(editable combo box) (Page 66)).
Preassigned value
Last programmed
See Selection list (combo box) (Page 65)
The meaning depends on the acceleration model used, which can be
selected via the configuration data
TypeOfAxis.DecodingConfig.directionDynamic:
• Non-direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = NO (default)
The value causes deceleration in the motion of the axis, independent
of the direction of motion.
• Direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = YES
The value causes deceleration when the direction of rotation is
positive and acceleration when the direction of rotation is negative.
For additional information on specifying the acceleration and deceleration
(acceleration model), see the TO Axis Electric/Hydraulic Function Manual.
The system variable for the preassigned value is given together with the
description of each command.
Jerk Only active with constant velocity profile.
Change in acceleration or deceleration
• At acceleration start
• At acceleration end
• At deceleration start
• At deceleration end
The two jerk values for acceleration and deceleration always relate,
irrespective of the acceleration model selected, to the parameter
(acceleration or deceleration) to which they are assigned via the
Dynamics tab.
Enter the value in the editable selection list (Editable selection list
(editable combo box) (Page 66)).
Preassigned value
Last programmed
See Selection list (combo box) (Page 65)
The system variable for the preassigned value is given together with the
description of each command.
Velocity Not always included in the Dynamics tab.
Velocity value during the constant velocity phase
Enter the value in the editable selection list (see Editable selection list
(editable combo box) (Page 66)).
Preassigned value
Last programmed velocity
Current
See Selection list (combo box) (Page 65)
The system variable for the preassigned value is given together with the
description of each command.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 77
Programming in MCC
4.4 Processing MCC commands

Field/Button Explanation/Instruction
Constant traversing time Only for the Start axis position-controlled and Speed specification
commands.
A time limit can be programmed for this command.
• Select the check box if the movement of the axis is to be time limited.
If you do not select the check box, the axis moves until it receives a
new command.
• Enter the duration of the constant motion phase (from the end of
acceleration up to the start of deceleration). At the end of this time, the
axis is decelerated until its speed reaches 0.
If no time is specified, then the axis moves until it receives a new
command.
See also input field (Page 65)
Time for deceleration Only for the Stop Axis command
Duration of braking operation for a quick stop within a defined time period
Enter the value in the editable selection list (selection list (combo box)
(Page 65)).
Preassigned value
Last programmed
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefaultDynamics.stopTime

SIMOTION MCC Motion Control Chart


78 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

4.4.5 Expert tab


The parameter dialog boxes for many motion commands contain an Expert tab. The content
of this tab depends on the motion command:
● You can define the variable for the CommandID.
● You can view configuration data or system variables that affect the parameter screen
form (see Using a variable of the technology object data type (Page 68)).
● You can define the variable to which the return value is written (return variable).

Figure 4-17 Expert tab for motion commands

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 79
Programming in MCC
4.4 Processing MCC commands

Overview of parameters

Table 4- 3 Overview of parameters for Expert tab

Field/Button Explanation/Instruction
CommandID variable The status of many motion commands can be tracked using the unique,
project-wide CommandId.
• If you enter the name of a variable of data type CommandIdType, you
can track the command status with this variable. The variables of this
data type that were declared previously in the MCC source file or MCC
chart are available for selection.
– When the Assign value check box is selected, a unique project-wide
CommandId is automatically generated, stored in the variables, and
transferred to the command.
You can use the stored CommandId to track the command status
until the command has been completed properly or has been
aborted.
– When the Assign value check box is cleared, only the variable is
transferred to the command. You must take steps to ensure that a
unique project-wide CommandId is stored in the variable. You obtain
the CommandId with the _getCommandId system function.
In addition, you can buffer the CommandId in this case so that it is
available even after the command has been completed.
• If you leave the field empty, the CommandID is not assigned to any
variables; this means that you cannot access the CommandID (default).
When the field is empty, the Assign value check box must be selected.
TO properties The technology object configuration data or system variables that affect the
parameter screen form (presentation or selection options) are displayed in
the "TO properties" list (see "TO properties list" table below).
If you have selected a variable of the technology object data type (see
Description of the technology object data types (Page 101)) as the
technology object (e.g. in a library), you can select a value in order to adapt
the parameter screen form to the properties of the technology object (see
Using a variable of the technology object data type (Page 68)).
This selection does not change the configuration data or system variables
of the technology object.
Return variable Many commands are mapped onto one or more system functions
(command steps). These usually have a return value that provides
information to the user on the result of the system function.
For each command step, you can specify a return variable in which the
respective return value is stored:
• When you enter the name of a variable of the specified data type, the
return value of the command step is stored in this variable. The
variables of this data type that were declared previously in the MCC
source file or MCC chart are available for selection.
A reference to the documentation describing the meaning of the
individual values is given for each command.
• If you leave the field empty, the return value of the command step is
assigned to an internal variable that you cannot access (default).
See also Relevant system function, system variable or command in the ST
programming language (Page 85) and Return values. (Page 86)

SIMOTION MCC Motion Control Chart


80 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

Table 4- 4 TO properties list

Field/Button Explanation/Instruction
Parameter Indicates the name of the field for the technology object whose
configuration data or system variables affect the parameter dialog box.
Object Indicates the technology object selected in the parameter dialog box.
Property Name Indicates the configuration datum or system variable affecting the
parameter dialog box.
Plain text Indicates the meaning of the configuration data or system variable.
Value The behavior depends on whether the technology object is defined on the
SIMOTION device or whether it is a variable of the data type of a
technology object:
• If the technology object is defined on the SIMOTION device:
The value defined during configuration is indicated.
• If the technology object is a variable of the data type of a technology
object:
You can select a value from among the values of the enumeration
data type of the configuration datum or the system variable.
The parameter dialog box is presented according to the selected
value.
This selection does not affect the configuration data or system
variables of the technology object.

See also
Gearing on (Page 416)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 81
Programming in MCC
4.4 Processing MCC commands

4.4.6 Transition behavior and step enabling condition


The transition behavior for all motion commands must be indicated by the motion command
that is currently active on the axis. The transition behavior always relates to motion
commands on the same axis irrespective of the program that issued the commands.
You can also program a step enabling condition to the next command in the flow chart.

4.4.6.1 Transition behavior from the currently active motion command


For motion commands, you specify the transition behavior from the command that is
currently active on the axis. The table shows the transition behavior of the currently active
command on the axis (thick line = programmed command, thin line = active command on the
axis):

Transition behavior Graph Description


Substitute The programmed command is executed
immediately. The active command is aborted.
Attach The programmed motion is attached to the active
motion for this axis. Pending commands will be
executed.
Attach, delete pending The programmed motion is attached to the active
command motion for this axis. Pending commands will be
discarded.
Blending The transition from the velocity of the active
command to that of the programmed command
takes place smoothly when deceleration begins in
the active command.
Therefore the active command should be
programmed with step enabling condition Start of
deceleration phase.
Superimpose The programmed and active motions are
superimposed. The command does not affect
superimposed motions that are already active. The
motion is started immediately.

SIMOTION MCC Motion Control Chart


82 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

4.4.6.2 Delay program execution (step enabling condition)


This check box determines when the next command is to be executed. MCC is optimized for
sequential programming; therefore, the default setting for this check box is "active". The next
command in the chart is otherwise executed immediately afterwards, or where appropriate,
not until the command has been entered in the command buffer (see Detailed description in
the "Overview of parameters" under the relevant MCC command).
The table shows the step enabling conditions for the subsequent command (trapezoid =
current command, "MCC chart" symbol = next command):

Wait for ... Graph Description


Entry in motion buffer The next command will be initiated when the current
command has been entered in the command buffer.
Motion start The next command is started when the interpolation for the
Interpolation start currently programmed motion begins.
Acceleration end The next command is started when the acceleration phase
for the active motion ends.
Speed/velocity reached The next command is started when the speed/velocity for
the active motion is reached.
Start of deceleration The next command is started when the deceleration phase
phase for the active motion begins.
Deceleration start
End of setpoint The next command is started when setpoint interpolation for
interpolation the active motion has ended.
Motion is finished The next command is started when the active motion has
Axis stopped been completed (e.g., the minimum dwell time of the actual
value in the configured position window around the target
position has elapsed).
When clamping value is The next command is started when the clamping value for
reached the active motion is reached.
When command is The next command is started when the current command is
completed or aborted completed or aborted.
As soon as torque is The next command is started as soon as torque limiting is
limited triggered.
As soon as torque The next command is started as soon as torque limiting is
limitation is switched off switched off.
Axis synchronized The next command is started when the axis is synchronized
for the active motion.
Axis homed The next command is started when the zero mark is
detected for the active homing motion.

Note
You can query the current status of the axis by means of system variables. For a selection
with corresponding values, see Axis status (Page 187).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 83
Programming in MCC
4.4 Processing MCC commands

4.4.6.3 Example of transition behavior and step enabling condition

7UDQVLWLRQEHKDYLRU $WWDFK
'HOD\SURJUDPH[HFWLRQ 0RWLRQILQLVKHG

7UDQVLWLRQEHKDYLRU $WWDFK
'HOD\SURJUDPH[HFWLRQ 6SHHGUHDFKHG

7UDQVLWLRQEHKDYLRU $WWDFK
'HOD\SURJUDPH[HFWLRQ 0RWLRQILQLVKHG

9HORFLW\WLPHFKDUW
Y
$[LVB

$[LVB $[LVB

W
$[LVBVWDUWVZKHQ$[LVBKDVUHDFKHG
WKHSURJUDPPHGVSHHG

$[LVBVWDUWVZKHQ$[LVBKDVILQLVKHG
LWVPRWLRQ

Figure 4-18 Example of transition behavior and step enabling condition

SIMOTION MCC Motion Control Chart


84 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

Note
The status of a motion command can be queried using the CommandID variables (see
Expert tab (Page 79)). This may be necessary, in particular, if a transition to the next
command is made before a motion has been completed (Delay program execution
parameter is deactivated or set to an appropriate value, such as Motion Start, Velocity
Reached).
The following system functions can be used for this purpose:
• For querying single axis commands:
_getStateOfAxisCommand
_getMotionStateOfAxisCommand
• For querying commands for synchronous operation and camming:
_getStateOfFollowingObjectCommand
_getMotionStateOfFollowingObjectCommand
For a description of the functions, refer to the SIMOTION Cam Technology Package, System
Functions, Parameter Manual.

ST commands can be programmed using the System Function Call (System Function Call
(Page 194)) or ST Zoom (ST Zoom (Page 199)) commands, for example.

4.4.7 Closing the parameter screen form


Click OK to close the parameter dialog box.
The syntax of the assigned command is checked when you close the screen form. Any
errors are displayed.

Note
When a syntax check is performed on an MCC command, the declaration tables in the MCC
chart and the MCC source file are also read. Inconsistent data within the declaration tables
may therefore cause unexpected error messages during parameter assignment.

4.4.8 Relevant system function, system variable, or command in the ST programming


language
Each MCC command is mapped to a system function, an ST programming language
command, or a value assignment to a system variable. This is specified for each MCC
command.
For system function, the way in which the parameters of the MCC command are assigned to
the parameters of the system function is also specified.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 85
Programming in MCC
4.4 Processing MCC commands

4.4.9 Return values


Many commands are mapped onto one or more system functions (command steps). These
usually have a return value that provides information to the user on the result of the system
function.
For these MCC commands, you can specify a return variable in which the respective return
value is stored for each command step in the Expert tab (Expert tab (Page 79))
● When you enter the name of a variable of the specified data type, the return value of the
command step is stored in this variable. The variables of this data type that were
declared previously in the MCC source file or MCC chart are available for selection.
A reference to the documentation describing the meaning of the individual values is given
for each command.
● If you leave the field empty, the return value of the command step is assigned to an
internal variable that you cannot access (default).

4.4.9.1 Return value for the system functions of the technology packages
The return values for the system functions of the Cam, Path and Cam_EXT technology
packages are described in the table.

Table 4- 5 Description of return value for Cam, Path and Cam_EXT technology package functions

Error code Meaning


0 No error
1 Invalid command parameter
2 Invalid range information in command parameters
3 Command aborted
4 Unknown command
5 Command cannot be executed due to current object state
6 Command aborted due to termination of user task
7 Command rejected due to suspension of command interpretation of the addressed
technology object
8 Command aborted due to full command buffer
9 Insufficient memory
10 A connection to a technology object required for this operation does not exist
11 No object configuration
12 The error to be reset cannot be reset due to its configuration
13 Axis is not homed
14 Measurement job on virtual axis not possible
15 Ambiguous commandId
16 Command not implemented
17 Read access denied
18 Write access denied
19 Command argument not supported
20 The cam has already been interpolated and cannot be manipulated
21 The interpolation condition was violated

SIMOTION MCC Motion Control Chart


86 Programming and Operating Manual, 05/2009
Programming in MCC
4.4 Processing MCC commands

Error code Meaning


22 The programmed jerk is 0
23 The alarm to be deleted is not present
24 Command not possible on a virtual axis
25 A synchronized start of this command is not possible
26 Higher-level command was aborted because it is not permitted by the active
command
27 Time exceeded during communication with the drive
28 Actual values are not valid
29 This command cannot be executed when velocity control is active
30 This command cannot be executed when position control is active
31 This command cannot be executed in torque-reduced operation or during travel to
fixed limit stop
32 This command can only be executed when force/pressure control is active
33 This command cannot be executed when force/pressure control is active
34 This command can only be executed when pressure limiting is active
35 Master values are not valid
36 Slave values are not valid
37 No slave value can be determined for a master value
38 No master value can be determined for a slave value
39 This command cannot be executed when synchronous operation is inactive
40 This command cannot be executed because of a synchronization error.
41 The command cannot be executed when gearing or camming is active.
42 This command cannot be executed when camming is inactive
43 This command can only be used for an interpolated cam
44 This command cannot be executed when pressure limiting is active
45 Insufficient interpolation points are available to interpolate the cam
46 The specified path point cannot be reached due to restrictions of the kinematics.
47 Path axis values are not valid.
48 Maximum number of active commands exceeded.
49 Command only possible on a technology object local to the CPU
≥10000 Internal error.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 87
Programming in MCC
4.5 General information about variables and data types

4.5 General information about variables and data types

4.5.1 Overview of variable types


The following table shows all the variable types available for programming with ST.
● System variables of the SIMOTION device and the technology objects
● Global user variables (I/O variables, device-global variables, unit variables)
● Local user variables (variables within a program, a function or a function block)

System variables

Variable type Meaning


System variables of the Each SIMOTION device and technology object has specific system variables. These can be
SIMOTION device accessed as follows:
System variables of • Within the SIMOTION device from all programs
technology objects • From HMI devices
You can monitor system variables in the symbol browser.

SIMOTION MCC Motion Control Chart


88 Programming and Operating Manual, 05/2009
Programming in MCC
4.5 General information about variables and data types

Global user variables

Variable type Meaning


I/O variables You can assign symbolic variable names to the I/O addresses of the SIMOTION device or the
peripherals. This allows you to have the following direct accesses to the I/O:
• Within the SIMOTION device from all programs
• From HMI devices
You create these variables in the symbol browser after you have selected the I/O element in the
project navigator.
You can monitor I/O variables in the symbol browser.
Global device variables User-defined variables which can be accessed by all SIMOTION device programs and HMI
devices.
You create these variables in the symbol browser after you have selected the GLOBAL DEVICE
VARIABLES element in the project navigator.
Global device variables can be defined as retentive. This means that they will remain stored even
when the SIMOTION device power supply is disconnected.
You can monitor global device variables in the symbol browser.
Unit variables User-defined variables that all programs (programs, function blocks, and functions) can access
within a unit (source file).
You declare these variables in the declaration table of the source file:
• In the interface section:
After connection (see Define connections (Page 136)), these variables are also available in
other units (e.g. MCC units, ST source files, and LAD/FBD source files), as well as on HMI
devices (maximum size of the interface section: 64 Kbytes).
• In the implementation section:
You can access these variables only within the source file.
You can declare unit variables as retentive. This means that they will remain stored even when
the SIMOTION device power supply is disconnected.
You can monitor unit variables in the symbol browser.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 89
Programming in MCC
4.5 General information about variables and data types

Local user variables

Variable type Meaning


User-defined variables that can only be accessed within the program/chart (program,
function, function block) in which they were defined.
Variable of a program Variable is declared in a program. The variable can only be accessed within this program. A
(program variable) differentiation is made between static and temporary variables:
• Static variables are initialized according to the memory area in which they are stored.
Specify this memory area by means of a compiler option. By default, the static variables
are initialized depending on the task to which the program is assigned (see SIMOTION
Basic Functions Function Manual).
You can monitor static variables in the symbol browser.
• Temporary variables are initialized every time the program in a task is called.
Temporary variables cannot be monitored in the symbol browser.
Variable of a function Variable is declared in a function (FC). The variable can only be accessed within this
(FC variable) function.
FC variables are temporary; they are initialized each time the FC is called. They cannot be
monitored in the symbol browser.
Variable of a function block Variable is declared in a function (FB). The variable can only be accessed within this
(FB variable) function block. A differentiation is made between static and temporary variables:
• Static variables retain their value when the FB terminates. They are initialized only when
the instance of the FB is initialized; this depends on the variable type with which the
instance of the FB was declared.
You can monitor static variables in the symbol browser.
• Temporary variables lose their value when the FB terminates. The next time the FB is
called, they are reinitialized.
Temporary variables cannot be monitored in the symbol browser.

SIMOTION MCC Motion Control Chart


90 Programming and Operating Manual, 05/2009
Programming in MCC
4.5 General information about variables and data types

4.5.2 Scope of the declarations

Scope of variable and data type declarations according to location of declaration

Location of declaration What can be declared here Scope


Symbol browser • Global device variables The declared variables are valid in all units (e.g., ST
• I/O variables source files, MCC source files, LAD/FBD source files)
of the SIMOTION device. All programs, function
blocks, and functions in all units of the device can
access the variables.
Interface section of the unit1 • Unit variables The declared variables, data types, etc., are valid in
• Data types the entire unit (e.g., ST source file, MCC source file,
• Symbolic accesses to the fixed LAD/FBD source file); all programs, function blocks,
process image of the and functions within the unit can access them.
BackgroundTask In addition, they are also available in other units after
connection (see Define connections (Page 136)).
Implementation section of • Unit variables The declared variables, data types, etc., are valid in
the unit1 • Data types the entire unit (e.g., ST source file, MCC source file,
• Symbolic accesses to the fixed LAD/FBD source file); all programs, function blocks,
process image of the and functions within the source file can access them.
BackgroundTask
POU (program/ • Local variables The declared variables, data types, etc., can only be
function block/ • Data types accessed within the POU in which they were
function)2 • Symbolic accesses to the fixed declared.
process image of the
BackgroundTask
1 MCC and LAD/FBD programming languages: in the declaration table of the respective source file.
2 MCC and LAD/FBD programming languages: in the declaration table of the respective chart/program.

4.5.3 Rules for identifiers


Names for variables, data types, charts/programs must comply with the following rules for
identifiers:
1. They are made up of letters (A to Z, a to z), numbers (0 to 9), and underscores ( _ ).
2. The first character must be a letter or underscore.
3. This can be followed by as many letters, digits or underscores as needed in any order.
4. Exception: You must not use more than one underscore in a row
5. Both upper and lower case letters are allowed. No distinction is made between upper and
lower case notation (thus, for example, Anna and AnNa are regarded as identical).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 91
Programming in MCC
4.5 General information about variables and data types

4.5.4 Frequently used arrays in declarations

4.5.4.1 Array length and array element


An array is a chain of variables of the same type that can be addressed with the same name
and different indices.
You can define the variable as an array [0...N-1] by entering an array length N. You have the
following options for entering the array length:
● You can enter a constant positive integer value.
● You can enter a range of values separated by "..".
● You can enter a constant expression of DINT data type (or of a data type which is
implicitly convertible to DINT).
If the array is empty, a single variable is set up rather than an array.

Example definition of an array in the declaration table

Figure 4-19 Definition of the length of an array

Example of use of array elements in a variable assignment

Figure 4-20 Use of array elements in a variable assignment

SIMOTION MCC Motion Control Chart


92 Programming and Operating Manual, 05/2009
Programming in MCC
4.5 General information about variables and data types

4.5.4.2 Initial value


You can specify an initialization value in this column. You can specify this initialization value
as a constant or an expression. The following are permissible:
● Constants
● Arithmetic operations
● Bit slice and data conversion functions

Table 4- 6 Preassignment of array elements

10(1) 10 array elements [0 to 9] are preset to the same value "1".


1,2,3,4,5 5 array elements [0..4] are preset to different values "1", "2", "3", "4" and "5".
5(3), 5 array elements [0..4] are preset to the same value "3".
10(99),3(7),2(1) 10 array elements [5..14] are preset to the same value "99".
3 array elements [15..17] are preset to the same value "7".
2 array elements [18..19] are preset to the same value "1".

Definition of these initialization values in the declaration table:

Figure 4-21 Definition of the initialization values of an array

Variables with technology object data types are always initialized with TO#NIL.
For variables of data type followingAxis, select the associated synchronous object (variable
of data type followingObjectType).

4.5.4.3 Comments
A comment can be entered in this column. It may contain any characters or special
characters.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 93
Programming in MCC
4.6 Data types

4.6 Data types

4.6.1 General
A data type is used to determine how the value of a variable or constant in a program source
file is to be used.
The following data types are available to the user:
● Elementary data types
● User-defined data types (UDT)
– Enumerators
– Structures (Struct)
● Technology object data types
● System data types

4.6.2 Elementary data types


Elementary data types define the structure of data that cannot be broken down into smaller
units. An elementary data type describes a memory area with a fixed length and stands for
bit data, integers, floating-point numbers, duration, time, date and character strings.
All the elementary data types are listed in the table below:

Table 4- 7 Bit widths and value ranges of the elementary data types

Type Reserv. word Bit width Range of values


Bit data type
Data of this type uses either 1 bit, 8 bits, 16 bits, or 32 bits. The initialization value of a variable of this data type is 0.
Bit BOOL 1 0, 1 or FALSE, TRUE
Byte BYTE 8 16#0 to 16#FF
Word WORD 16 16#0 to 16#FFFF
Double word DWORD 32 16#0 to 16#FFFF_FFFF
Numeric types
These data types are available for processing numeric values. The initialization value of a variable of this data type is 0 (all
integers) or 0.0 (all floating-point numbers).
Short integer SINT 8 -128 to 127 (-2**7 to 2**7-1)
Unsigned short integer USINT 8 0 to 255 (0 to 2**8-1)
Integer INT 16 -32_768 to 32_767 (-2**15 to 2**15-1)
Unsigned integer UINT 16 0 to 65_535 (0 to 2**16-1)
Double integer DINT 32 -2_147_483_648 to 2_147_483_647 (-2**31 to 2**31-1)
Unsigned double UDINT 32 0 to 4_294_96_7295 (0 to 2**32-1)
integer

SIMOTION MCC Motion Control Chart


94 Programming and Operating Manual, 05/2009
Programming in MCC
4.6 Data types

Type Reserv. word Bit width Range of values


Floating-point number REAL 32 -3.402_823_466E+38 to -1.175_494_351E-38,
(per IEEE -754) 0.0,
+1.175_494_351E-38 to +3.402_823_466E+38
Accuracy:
23-bit mantissa (corresponds to 6 decimal places), 8-bit
exponent, 1-bit sign.
Long floating-point LREAL 64 -1.797_693_134_862_315_8E+308 to
number -2.225_073_858_507_201_4E-308,
(in accordance with 0.0,
IEEE-754) +2.225_073_858_507_201_4E-308 to
+1.797_693_134_862_315_8E+308
Accuracy:
52-bit mantissa (corresponds to 15 decimal places), 11-bit
exponent, 1-bit sign.
Time types
These data types are used to represent various date and time values.
Duration in increments TIME 32 T#0d_0h_0m_0s_0ms to T#49d_17h_2m_47s_295ms
of 1 ms Maximum of two digits for the values day, hour, minute,
second and a maximum of three digits for milliseconds
Initialization with T#0d_0h_0m_0s_0ms
Date in increments of 1 DATE 32 D#1992-01-01 to D#2200-12-31
day Leap years are taken into account, year has four digits,
month and day are two digits each
Initialization with D#0001-01-01
Time of day in steps of TIME_OF_DAY 32 TOD#0:0:0.0 to TOD#23:59:59.999
1 ms (TOD) Maximum of two digits for the values hour, minute, second
and maximum of three digits for milliseconds
Initialization with TOD#0:0:0.0
Date and time DATE_AND_TI 64 DT#1992-01-01-0:0:0.0 to DT#2200-12-31-23:59:59.999
ME DATE_AND_TIME consists of the data types DATE and
(DT) TIME
Initialization with DT#0001-01-01-0:0:0.0
String type
Data of this type represents character strings, in which each character is encoded with the specified number of bytes.
The length of the string can be defined at the declaration. Indicate the length in "[" and "]", e.g. STRING[100]. The default
setting consists of 80 characters.
The number of assigned (initialized) characters can be less than the declared length.
String with 1 STRING 8 All characters with ASCII code $00 to $FF are permitted.
byte/character Default ’ ’ (empty string)

NOTICE
During variable export to other systems, the value ranges of the corresponding data types
in the target system must be taken into account.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 95
Programming in MCC
4.6 Data types

See also
Value range limits of elementary data types (Page 96)
General data types (Page 97)
Elementary system data types (Page 98)

4.6.2.1 Value range limits of elementary data types


The value range limits of certain elementary data types are available as constants.

Table 4- 8 Symbolic constants for the value range limits of elementary data types

Symbolic constant Data type Value Hex notation


SINT#MIN SINT -128 16#80
SINT#MAX SINT 127 16#7F
INT#MIN INT -32768 16#8000
INT#MAX INT 32767 16#7FFF
DINT#MIN DINT -2147483648 16#8000_0000
DINT#MAX DINT 2147483647 16#7FFF_FFFF
USINT#MIN USINT 0 16#00
USINT#MAX USINT 255 16#FF
UINT#MIN UINT 0 16#0000
UINT#MAX UINT 65535 16#FFFF
UDINT#MIN UDINT 0 16#0000_0000
UDINT#MAX UDINT 4294967295 16#FFFF_FFFF
T#MIN TIME T#0ms 16#0000_00001
TIME#MIN
T#MAX TIME T#49d_17h_2m_47s_295ms 16#FFFF_FFFF1
TIME#MAX
TOD#MIN TOD TOD#00:00:00.000 16#0000_00001
TIME_OF_DAY#MIN
TOD#MAX TOD TOD#23:59:59.999 16#0526_5BFF1
TIME_OF_DAY#MAX
1 Internal display only

SIMOTION MCC Motion Control Chart


96 Programming and Operating Manual, 05/2009
Programming in MCC
4.6 Data types

4.6.2.2 General data types


General data types are often used for the input and output parameters of system functions
and system function blocks. The subroutine can be called with variables of each data type
that is contained in the general data type.
The following table lists the available general data types:

Table 4- 9 General data types

General data type Data types contained


ANY_BIT BOOL, BYTE, WORD, DWORD
ANY_INT SINT, INT, DINT, USINT, UINT, UDINT
ANY_REAL REAL, LREAL
ANY_NUM ANY_INT, ANY_REAL
ANY_DATE DATE, TIME_OF_DAY (TOD), DATE_AND_TIME (DT)
ANY_ELEMENTARY ANY_BIT, ANY_NUM, ANY_DATE, TIME, STRING
ANY ANY_ELEMENTARY, user-defined data types (UDT), system data types,
data types of the technology objects

Note
You cannot use general data types as type identifiers in variable or type declarations.
The general data type is retained when a user-defined data type (UDT) is derived directly
from an elementary data type (only possible with the SIMOTION ST programming language).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 97
Programming in MCC
4.6 Data types

4.6.2.3 Elementary system data types


In the SIMOTION system, the data types specified in the table are treated similarly to the
elementary data types. They are used with many system functions.

Table 4- 10 Elementary system data types and their use

Identifier Bit width Use


StructAlarmId 32 Data type of the alarmId for the project-wide unique identification of
the messages. The alarmId is used for the message generation.
See Function Manual SIMOTION Basic Functions.
Initialization with STRUCTALARMID#NIL
StructTaskId 32 Data type of the taskId for the project-wide unique identification of the
tasks in the execution system.
See Function Manual SIMOTION Basic Functions.
Initialization with STRUCTTASKID#NIL

Table 4- 11 Symbolic constants for invalid values of elementary system data types

Symbolic constant Data type Significance


STRUCTALARMID#NIL StructAlarmId Invalid AlarmId
STRUCTTASKID#NIL StructTaskId Invalid TaskId

4.6.3 Declaring derived data types (UDT)

4.6.3.1 Defining user-defined data types (UDT)


You can create derived data types in source files and programs:
● Structures
● Enumerations
The scope of the data type declaration depends on the location of the declaration.

SIMOTION MCC Motion Control Chart


98 Programming and Operating Manual, 05/2009
Programming in MCC
4.6 Data types

4.6.3.2 Scope of the data type declaration


You create derived data types in the declaration tables of the source file or the
program/chart. The scope of the data type declaration depends on the location of the
declaration.
● In the Interface (exported declaration) source file section of the declaration table:
The data type is valid for the entire source file; all programs/charts (programs, function
blocks, and functions) within the source file can access the data type.
These variables are also available, if appropriately connected (see Define connections
(Page 136)), in other source files (or other units).
● In the Implementation (source-internal declaration) source file section of the declaration
table:
The data type is valid in the source file; all programs/charts (programs, function blocks,
and functions) within the source file can access the data type.
● In the declaration table of the program:
The data type can only be accessed within the program/chart in which it is declared.

4.6.3.3 Defining structures


You define structures in the declaration tables of the source file or the program/chart. The
scope of the structures depends on the location of the declaration.
To define structures, proceed as follows:
1. Select the declaration table and, if applicable, the section of the declaration table for the
desired scope.
2. Select the Structures tab.
3. Enter the name of the structure.
4. In the same line, enter:
– The name of the first element
– Data type of element
– Additional characteristics (array length, start value).
5. Enter additional elements of the structure in the following lines; leave the Structure name
field empty.
6. Begin the definition of the new structure by entering a new name in the Structure name
field.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 99
Programming in MCC
4.6 Data types

4.6.3.4 Defining enumerations


You define enumerations in the declaration tables of the source file or the program/chart.
The scope (Page 99) of the enumerations depends on the location of the declaration.
To define enumerations, proceed as follows:
1. Select the declaration table and, if applicable, the section of the declaration table for the
desired scope.
2. Select the Enumerations tab.
3. Enter the name of the enumeration.
4. In the same line, enter:
– The name of the first element
– Optionally, the initialization value of the enumeration data type
5. Enter additional elements of the enumeration in the following lines; leave the
Enumeration name field empty.
6. You begin the definition of the new enumeration by entering a new name in the
Enumeration name field.

Example
This example shows the definition of an enumeration data type with the name Color and the
enumeration elements Red, Blue, and Green, as well as the initialization value (initial value)
Green.
If there is no initialization entered during the enumeration definition (data type declaration),
the first value of the enumeration is assigned to the data type. In this example, Red would be
used for the initialization because it is defined as the first enumeration element.

Figure 4-22 Definition of an enumeration data type

SIMOTION MCC Motion Control Chart


100 Programming and Operating Manual, 05/2009
Programming in MCC
4.6 Data types

4.6.4 Technology object data types

4.6.4.1 Description of the technology object data types


You can declare variables with the data type of a technology object (TO). The following table
shows the data types for the available technology objects in the individual technology
packages.
For example, you can declare a variable with the data type posaxis and assign it an
appropriate instance of a position axis. Such a variable is often referred to as a reference.

Table 4- 12 Data types of technology objects (TO data type)

Technology object Data type Contained in the technology


package
Drive axis driveAxis CAM1 2, PATH, CAM_EXT
External encoder externalEncoderType CAM1 2, PATH, CAM_EXT
Measuring input measuringInputType CAM1 2, PATH, CAM_EXT
Output cam outputCamType CAM1 2, PATH, CAM_EXT
Cam track (as of V3.2) _camTrackType CAM, PATH, CAM_EXT
Position axis posAxis CAM1 3, PATH, CAM_EXT
Following axis followingAxis CAM1 4, PATH, CAM_EXT
Following object followingObjectType CAM1 4, PATH, CAM_EXT
Cam camType CAM, PATH, CAM_EXT
Path axis (as of V4.1) _pathAxis PATH, CAM_EXT
Path object (as of V4.1) _pathObjectType PATH, CAM_EXT
Fixed gear (as of V3.2) _fixedGearType CAM_EXT
Addition object (as of V3.2) _additionObjectType CAM_EXT
Formula object (as of V3.2) _formulaObjectType CAM_EXT
Sensor (as of V3.2) _sensorType CAM_EXT
Controller object (as of V3.2) _controllerObjectType CAM_EXT
Temperature channel temperatureControllerType TControl
General data type, ANYOBJECT
to which every TO can be
assigned
1) As of Version V3.1, the BasicMC, Position and Gear technology packages are no longer
contained.
2) For Version V3.0, also contained in the BasicMC, Position and Gear technology packages.
3) For Version V3.0, also contained in the Position and Gear technology packages.
4) For Version V3.0, also contained in the Gear technology package.
You can access the elements of technology objects (configuration data and system
variables) via structures (see SIMOTION Basic Functions Function Manual).

Table 4- 13 Symbolic constants for invalid values of technology object data types

Symbolic constant Data type Meaning


TO#NIL ANYOBJECT Invalid technology object

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 101
Programming in MCC
4.6 Data types

4.6.4.2 Inheritance of the properties for axes


Inheritance for axes means that all of the data types, system variables and functions of the
TO driveAxis are fully included in the TO positionAxis. Similarly, the position axis is fully
included in the TO followingAxis, the following axis in the TO pathAxis. This has, for
example, the following effects:
● If a function or a function block expects an input parameter of the driveAxis data type, you
can also use a position axis or a following axis or a path axis when calling.
● If a function or a function block expects an input parameter of the posAxis data type, you
can also use a following axis or a path axis when calling.

4.6.5 System data types


There are a number of system data types available that you can use without a previous
declaration. And, each imported technology packages provides a library of system data
types.
Additional system data types (primarily enumerator and STRUCT data types) can be found
● In parameters for the general standard functions (see SIMOTION Basic Functions
Function Manual)
● In parameters for the general standard function modules (see SIMOTION Basic
Functions Function Manual)
● In system variables of the SIMOTION devices (see relevant parameter manuals)
● In parameters for the system functions of the SIMOTION devices (see relevant parameter
manuals)
● In system variables and configuration data of the technology objects (see relevant
parameter manuals)
● In parameters for the system functions of the technology objects (see relevant parameter
manuals)

SIMOTION MCC Motion Control Chart


102 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7 Variables
Variables are an important component of programming and provide structure to programs.
They are placeholders which can be assigned values that can be accessed several times in
the program.
Variables have:
● A specific initialization behavior and scope of validity
● A data type and operations which are defined for that data type
User and system variables are differentiated. User variables can be defined by the user.
System variables are provided by the system.

4.7.1 Keywords for variable types


The various keywords for variable types are shown in the following table.

Description of keywords for variable types

Keyword Description Application


Global user variables (declared in the interface or implementation section of the unit1)
VAR_GLOBAL Unit variable; can be accessed by all POUs within the source file. FB, FC, program
If the variable was declared in the interface section, it can be used in
another source file once a connection has been defined in its declaration
table (see Define connections (Page 136)).
VAR_GLOBAL RETAIN Retentive unit variable; retained during power outage. FB, FC, program
VAR_GLOBAL CONSTANT Unit constant; cannot be changed from the program. FB, FC, program
Local user variables (declared within a POU2)
VAR Local variable (static for FB and program, temporary for FC) FB, FC, program
VAR_TEMP Temporary local variable FB, program
VAR_INPUT Input parameters: Local variable; value is supplied from external source FB, FC
and can only be read in the FB or FC.
VAR_OUTPUT Output parameters: Local variable; value is sent to an external FB
destination by the FB. It can be read as an instance variable after being
called by the FB (FB instance name.variable name).
VAR_IN_OUT In/out parameter; the FB or FC accesses this variable directly (by means FB, FC
of a reference) and can change it directly.
VAR CONSTANT Local constant; cannot be changed from the program. FB, FC, program
1 MCC and LAD/FBD programming languages: in the declaration table of the respective source file.
2 MCC and LAD/FBD programming languages: in the declaration table of the respective chart/program.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 103
Programming in MCC
4.7 Variables

4.7.2 Defining variables


Variables are defined in the symbol browser or in the declaration table of the source file or
chart/program. The following table provides an overview of where the relevant variable is
defined.

Definition of variables

Variable type Defined in...


Global device user Symbol browser
variables
unit variable Declaration table of the source file as VAR_GLOBAL, VAR_GLOBAL
RETAIN or VAR_GLOBAL CONSTANT
Local variable Declaration table of the program/chart as:
• VAR, VAR_TEMP, or VAR CONSTANT
• Additionally for function blocks as VAR_INPUT, VAR_OUTPUT,
VAR_IN_OUT
• Additionally for functions as VAR_INPUT, VAR_IN_OUT
I/O variable Symbol browser
Symbolic access to the • Declaration table of the source file
fixed process image of • Declaration table of the program/chart (programs and FB only)
the BackgroundTask

4.7.2.1 Use of global device variables


Global device variables are user-defined variables that you can access from all program
sources (e.g. ST source files, MCC units) of a SIMOTION device.
Global device variables are created in the symbol browser tab of the detail view; to do this,
you must be working in offline mode.
Here is a brief overview of the procedure:
1. In the project navigator of SIMOTION SCOUT, select the GLOBAL DEVICE VARIABLES
element in the SIMOTION device subtree.
2. In the detail view, select the Symbol browser tab and scroll down to the end of the
variable table (empty row).
3. In the last (empty) row of the table, enter or select the following:
– Name of variable
– Data type of variable (only elementary data types are permitted)
4. Optionally, you can make the following entries:
– Selection of Retain checkbox (This declares the variable as retentive, so that its value
will be retained after a power failure.)
– Array length (array size)
– Initial value (if array, for each element)
– Display format (if array, for each element)

SIMOTION MCC Motion Control Chart


104 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

You can now access this variable using the symbol browser or any program of the
SIMOTION device.
In ST source files, you can use a global device variable, just like any other variable.

Note
If you have declared unit variables or local variables of the same name (e.g. var-name),
specify the global device variable with _device.var-name.
An alternative to global device variables is the declaration of unit variables in a separate unit,
which is imported into other units. This has the following advantages:
1. Variable structures can be used.
2. The initialization of the variables during the STOP-RUN transition is possible (via
Program in StartupTask).
3. For newly created global unit variables, a download in RUN is also possible.
Please refer to the SIMOTION Basic Functions Function Manual.

4.7.2.2 Declaring a unit variable in the source file


The unit variable is declared in the source file. The valid range (scope) of the variable is
dependent on the section of the declaration table in which the variable is declared:
● In the interface section of the declaration table (INTERFACE):
The unit variable is valid for the entire source file; all programs/charts (programs, function
blocks, and functions) within the source file can access the unit variable.
In addition, these variables are available on HMI devices and, once connected (see
Define connections (Page 136)), in other source files (or other units), as well.
The total size of all unit variables in the interface section is limited to 64 Kbytes.
● In the implementation section of the declaration table (IMPLEMENTATION):
The unit variable is valid in the source file only; all programs/charts (programs, function
blocks, and functions) within the source file can access the unit variable.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 105
Programming in MCC
4.7 Variables

Proceed as follows; the source file (declaration table) is open (see Open existing program
source file (Page 34)):
1. In the declaration table, select the section for the desired scope.
2. Then select the Parameters tab.
3. Enter:
– Name of the variable
– Variable type
See also: Keywords for variable types (Page 103)
– Data type of the variable
You can select elementary data types (see Elementary data types (Page 94)); other
data types must be entered in the appropriate field.
See also:
Defining structures (Page 99)
Defining enumerations (Page 100)
– Optional array length (to define the array size)
See also: Array length and array element (Page 92)
– Optional initial value (initialization value
See also: Initial value (Page 93)
The variable is now declared and can be used immediately.

Figure 4-23 Example: Declaring a unit variable in the source file

Note
The declaration table of the source file is read each time parameters are assigned for a
command. Inconsistent data within the declaration table can therefore cause unexpected
error messages during parameter assignment.

SIMOTION MCC Motion Control Chart


106 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7.2.3 Declaring local variables


A local variable can only be accessed within the program/chart (program, function, function
block) in which it is declared.
Proceed as follows; the program/chart with the declaration table is open (see Open existing
program source file (Page 34)):
1. In the declaration table, select the Parameter/Variables tab.
2. Enter:
– Name of the variable
– Variable type for variables
See also: Keywords for variable types (Page 103)
– You can select elementary data types (see Elementary data types (Page 94)); other
data types must be entered in the appropriate field.
See also:
Defining structures (Page 99)
Defining enumerations (Page 100)
– Optional array length (to define the array size)
See also: Array length and array element (Page 92)
– Optional initial value (initialization value
See also: Initial value (Page 93)
The variable is now declared and can be used immediately.

Figure 4-24 Example: Declaring a local variable in the chart/program

Note
The declaration table of the program/chart is read each time parameters are assigned for a
command. Inconsistent data within the declaration table can therefore cause unexpected
error messages during parameter assignment.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 107
Programming in MCC
4.7 Variables

4.7.3 Time of the variable initialization


The timing of the variable initialization is determined by:
● Memory area to which the variable is assigned
● Operator actions (e.g. source file download to the target system)
● Execution behavior of the task (sequential, cyclic) to which the program was assigned.
All variable types and the timing of their variable initialization are shown in the following
tables. You will find basic information about tasks in the SIMOTION Basic Functions
Function Manual.
The behavior for variable initialization during download can be set: To do this, as a default
setting select the Options > Settings menu and the Download tab or define the setting during
the current download.

Note
You can upload values of unit variables or global device variables from the SIMOTION
device into SIMOTION SCOUT and save them in XML format.
1. Save the required data segments of the unit variables or global device variables as a data
set with the function _saveUnitDataSet.
2. Use the Save variables function in SIMOTION SCOUT.
You can use the Restore variables function to download these data sets and variables back
to the SIMOTION device.
For more information, refer to the SIMOTION SCOUT Configuration Manual.
This makes it possible, for example, to obtain this data, even if it is initialized by a project
download or if it becomes unusable (e.g. due to a version change of SIMOTION SCOUT).

See also
Initialization of retentive global variables (Page 109)
Initialization of non-retentive global variables (Page 111)
Initialization of local variables (Page 113)
Initialization of static program variables (Page 114)
Initialization of instances of function blocks (FBs) (Page 115)
Initialization of system variables of technology objects (Page 116)
Version ID of global variables and their initialization during download (Page 117)

SIMOTION MCC Motion Control Chart


108 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7.3.1 Initialization of retentive global variables


Retentive variables retain their last value after a loss of power. All other data is reinitialized
when the device is switched on again.
Retentive global variables are initialized:
● When the backup or buffer for retentive data fails.
● When the firmware is updated.
● When a memory reset (MRES) is performed.
● With the restart function (Del. SRAM) in SIMOTION P350.
● By applying the _resetUnitData function (as of kernel V3.2), possible selectively for
different data segments of the retentive data.
● When a download is performed according to the following description.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 109
Programming in MCC
4.7 Variables

Table 4- 14 Initializing retentive global variables during download

Variable type Time of the variable initialization


Retentive global The behavior when downloading depends on the Initialization of all retentive global device variables
device variables and program data setting1:
• Yes2: All retentive global device variables are initialized.
• No3:
– As of version V3.2 of the SIMOTION Kernel:
Separate version ID for retentive global device variables. If the version ID is changed, the
retentive global device variables are initialized.
– Up to Version V3.1 of the SIMOTION kernel:
Joint version ID for all global device variables (retentive and non-retentive). If the version ID is
changed, all global device variables are initialized.
See: Version ID of global variables and their initialization during download (Page 117).
Retentive unit The behavior when downloading depends on the Initialization of all retentive global device variables
variables and program data setting1:
• Yes2: All retentive unit variables (all units) are initialized.
• No3:
– As of version V3.2 of the SIMOTION Kernel:
Separate version ID for each individual data block ( = declaration block)4 of the retentive unit
variables in the interface or implementation section. If the version identification is changed,
only the associated data block will be initialized5.
– Up to Version V3.1 of the SIMOTION kernel:
Common version ID for all unit variables (retentive and non-retentive, in the interface and
implementation section) of a unit. If the version ID is changed, all unit variables of this unit are
initialized.
See: Version ID of global variables and their initialization during download (Page 117).
1Default setting in the Options > Settings menu, Download tab,
or the current setting for the download.
2 The corresponding checkbox is active.
3 The corresponding checkbox is inactive.
4Several data blocks for retentive unit variables in the interface or implementation section can be declared only in the
SIMOTION ST programming language. For the SIMOTION MCC and SIMOTION LAD/FBD programming languages, only
one data block for retentive unit variables will be created in the interface or implementation section.
5 Also for the download in RUN, provided the associated prerequisites have been satisfied and the following attribute has
been specified in the associated declaration block within a pragma (only for the SIMOTION ST programming language):
{ BlockInit_OnChange := TRUE; }.
For the download in RUN, see the SIMOTION Basic Functions Function Manual.

SIMOTION MCC Motion Control Chart


110 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7.3.2 Initialization of non-retentive global variables


Non-retentive global variables lose their value during power outages. They are initialized:
● For the Initialization of retentive global variables (Page 109), e.g. during a firmware
update or general reset (MRES).
● During power up.
● By applying the _resetUnitData function (as of kernel V3.2), possible selectively for
different data segments of the non-retentive data.
● During the download in accordance with the description on the following table.
● Only as of Version V4.1 of the SIMOTION Kernel and for non-retentive unit variables:
For transition to the RUN mode when the associated declaration block within a pragma
specifies the following attribute (only for SIMOTION ST programming language): {
BlockInit_OnDeviceRun := ALWAYS; }

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 111
Programming in MCC
4.7 Variables

Table 4- 15 Initializing non-retentive global variables during download

Variable type Time of the variable initialization


Non-retentive global The behavior when downloading depends on the Initialization of all non-retentive global device
device variables variables and program data setting1:
• Yes2: All non-retentive global device variables are initialized.
• No3:
– As of version V3.2 of the SIMOTION Kernel:
Separate version ID for non-retentive global device variables. If the version ID is changed,
the non-retentive global device variables are initialized.
– Up to Version V3.1 of the SIMOTION kernel:
Joint version ID for all global device variables (retentive and non-retentive). If the version
ID is changed, all global device variables are initialized.
See: Version ID of global variables and their initialization during download (Page 117).
Non-retentive unit The behavior when downloading depends on the Initialization of all non-retentive global device
variables variables and program data setting1:
• Yes2: All non-retentive unit variables (all units) are initialized.
• No3:
– As of version V3.2 of the SIMOTION Kernel:
Separate version ID for each individual data block ( = declaration block)4 of the non-
retentive unit variables in the interface or implementation section. If the version
identification is changed, only the associated data block will be initialized5.
– Up to Version V3.1 of the SIMOTION kernel:
Common version ID for all unit variables (retentive and non-retentive, in the interface and
implementation section) of a unit. If the version ID is changed, all unit variables of this unit
are initialized.
See: Version ID of global variables and their initialization during download (Page 117).
1Default setting in the Options > Settings menu, Download tab,
or the current setting for the download.
2 The corresponding checkbox is active.
3 The corresponding checkbox is inactive.
4Several data blocks for non-retentive unit variables in the interface or implementation section can be declared only in the
SIMOTION ST programming language. For the SIMOTION MCC and SIMOTION LAD/FBD programming languages, only
one data block for non-retentive unit variables will be created in the interface or implementation section.
5 Also for the download in RUN, provided the associated prerequisites have been satisfied and the following attribute has
been specified in the associated declaration block within a pragma (only for the SIMOTION ST programming language):
{ BlockInit_OnChange := TRUE; }.
For the download in RUN, see the SIMOTION Basic Functions Function Manual.

SIMOTION MCC Motion Control Chart


112 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7.3.3 Initialization of local variables


Local variables are initialized:
● For the initialization of retentive unit variables (Page 109).
● For the initialization of non-retentive unit variables (Page 111).
● Also, according to the following description:

Table 4- 16 Initialization of local variables

Variable type Time of the variable initialization


Local program Local variables of programs are initialized differently:
variables • Static variables (VAR) are initialized according to the memory area in which they are stored.
See: Initialization of static program variables (Page 114).
• Temporary variables (VAR_TEMP) are initialized every time the program of the task is called.
Local variables of Local variables of function blocks are initialized differently:
function blocks (FB) • Static variables (VAR, VAR_IN, VAR_OUT) are only initialized when the FB instance is
initialized.
See: Initialization of instances of function blocks (FBs) (Page 115).
• Temporary variables (VAR_TEMP) are initialized every time the FB instance is called.
Local variables of Local variables of functions are temporary and are initialized every time the function is called.
functions (FC)

Note
You can obtain information about the memory requirements of a POU in the local data stack
using the Program Structure (Page 160) function.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 113
Programming in MCC
4.7 Variables

4.7.3.4 Initialization of static program variables


The following versions affect the following static variables:
● Local variables of a unit program declared with VAR
● Function block instances declared with VAR within a unit program, including the
associated static variables (VAR, VAR_INPUT, VAR_OUTPUT).
The initialization behavior is determined by the memory area in which the static variables are
stored. This is determined by the "Create program instance data only once" (Page 40)
compiler option.
● For the deactivated "Create program instance data only once" compiler option (default):
The static variables are stored in the user memory of each task, which is assigned to the
program.
The initialization of the variables thus depends on the execution behavior of the task to
which the program is assigned (see SIMOTION Basic Functions Function Manual):
– Sequential tasks (MotionTasks, UserInterruptTasks, SystemInterruptTasks,
StartupTask, ShutdownTask): The static variables are initialized every time the task is
started.
– Cyclic tasks (BackgroundTask, SynchronousTasks, TimerInterruptTasks): The static
variables are initialized only during transition to RUN mode.
● For the activated "Create program instance data only once" compiler option:
This setting is necessary, for example, if a program is to be called within a program.
The static variables of all programs from the program source (unit) involved are only
stored once in the user memory of the unit.
– They are thus initialized together with the non-retentive unit variables, see Initialization
of non-retentive global variables (Page 111).
– Only as of Version V4.1 of the SIMOTION Kernel:
In addition, they can be initialized during transition to RUN mode. To do this, the
following attribute must be specified in the associated declaration block within a
pragma (only SIMOTION ST programming language):
{ BlockInit_OnDeviceRun := ALWAYS; }.

SIMOTION MCC Motion Control Chart


114 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7.3.5 Initialization of instances of function blocks (FBs)


The initialization of a function block instance (Page 152) is determined by the location of its
declaration:
● Global declaration (within VAR_GLOBAL/END_VAR in the interface of implementation
section):
Initialization as for a non-retentive unit variable, see Initialization of non-retentive global
variables (Page 111).
● Local declaration in a program (within VAR / END_VAR):
Initialization as for static variables of programs, see Initialization of static variables of
programs (Page 114).
● Local declaration in a function block (within VAR / END_VAR):
Initialization as for an instance of this function block.
● Declaration as in/out parameter in a function block or a function (within
VAR_IN_OUT / END_VAR):
For the initialization of the POU, only the reference (pointer) will be initialized with the
instance of the function block remaining unchanged.

Note
You can obtain information about the memory requirements of a POU in the local data
stack using the Program Structure (Page 160) function.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 115
Programming in MCC
4.7 Variables

4.7.3.6 Initialization of system variables of technology objects


The system variables of a technology object are usually not retentive. Depending on the
technology object, a few system variables are stored in the retentive memory area (e.g.
absolute encoder calibration).
The initialization behavior (except in the case of download) is the same as for retentive and
non-retentive global variables. See Initialization of retentive global variables (Page 109) and
Initialization of non-retentive global variables (Page 111).
The behavior during the download is shown below for:
● Non-retentive system variables
● Retentive system variables

Table 4- 17 Initializing technology object system variables during download

Variable type Time of the variable initialization


Non-retentive system Behavior during download, depending on the Initialization of all non-retentive data for technology
variables objects setting1:
• Yes2: All technology objects are initialized.
– All technology objects are restructured and all non-retentive system variables are
initialized.
– All technological alarms are cleared.
• No3: Only technology objects changed in SIMOTION SCOUT are initialized.
– The technology objects in question are restructured and all non-retentive system variables
are initialized.
– All alarms that are pending on the relevant technology objects are cleared.
– If an alarm that can only be acknowledged with Power On is pending on a technology
object that will not be initialized, the download is aborted.
Retentive system Only if a technology object was changed in SIMOTION SCOUT, will its retentive system variables
variables be initialized.
The retentive system variables of all other technology objects are retained (e.g. absolute encoder
calibration).
1Default setting in the Options > Settings menu, Download tab,
or the current setting for the download.
2 The corresponding checkbox is active.
3 The corresponding checkbox is inactive.

SIMOTION MCC Motion Control Chart


116 Programming and Operating Manual, 05/2009
Programming in MCC
4.7 Variables

4.7.3.7 Version ID of global variables and their initialization during download

Table 4- 18 Version ID of global variables and their initialization during download

Data segment As of Version V3.2 of the SIMOTION kernel Up to Version V3.1 of the
SIMOTION kernel
Global device variables
Retentive global • Separate version ID for each data segment of the global • Common version ID for all data
device variables device variables. segments of the global device
• The version identification of the data segment changes variables.
Non-retentive
global device for: • This version ID changes when
variables – Add or remove a variable within the data segment the variable declaration is
changed in a data segment.
– Change of the identifier or the data type of a variable
within the data segment • During downloading2, the rule
is: Initialization of all data
• This version ID does not change on: segments if the version ID
– Changes in the other data segment changes.
– Changes to initialization values1 • Use of the functions for data
• During downloading2, the rule is: Initialization of a data backup not possible.
segment only if its version ID has changed.
• Use of the functions for data backup and initialization
possible.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 117
Programming in MCC
4.7 Variables

Data segment As of Version V3.2 of the SIMOTION kernel Up to Version V3.1 of the
SIMOTION kernel
Unit variables of a unit
Retentive unit • Several data blocks ( = declaration blocks)3 in each data • One data block in each data
variables in the segment possible. segment (also for several
interface section • Own version ID for each data block. declaration blocks)3
Retentive unit • The version identification of the data block changes for: • Common version ID for all
variables in the global declarations in a unit.
– Add or remove a variable in the associated
implementation declaration block • This version ID changes in
section response to the following
– Change of the identifier or the data type of a variable changes:
Non-retentive unit in the associated declaration block
– Variable declaration in a
variables in the – Change of a data type definition (from a separate or data segment
interface section imported4 unit) used in the associated declaration
block – Declaration of global data
Non-retentive unit types in the unit
variables in the – Add or remove declaration blocks within the same
data segment before the associated declaration block – Declaration in the interface
implementation
section of an imported4 unit.
section • This version ID does not change on:
• During downloading2, the rule
– Add or remove declaration blocks in other data is: Initialization of all data
segments segments if the version ID
– Add or remove declaration blocks within the same changes.
data segment after the associated declaration block • Use of the functions for data
– Changes in other data blocks backup only possible for: Non-
– Changes to initialization values1 retentive unit variables in the
interface section
– Changes to data type definitions that are not used in
the associated data block
– Changes to functions
• During downloading2, the rule is: Initialization of a data
block only if its version ID has changed.5
• Functions for data backup and initialization take into
account the version ID of the data blocks.
1 Changed initialization values are not effective until the data block or data segment in question is initialized.
2If Initialization of all retentive global device variables and program data = No and Initialization of all non-retentive global
device variables and program data = No.
In the case of other settings: See the sections "Initialization of retentive global variables (Page 109)" and "Initialization of
non-retentive global variables (Page 111)".
3Several declaration blocks per data segment are possible only in the SIMOTION ST programming language. For the
SIMOTION MCC and SIMOTION LAD/FBD programming languages, only one declaration block per data segment will be
created.
4 The import of units depends on the programming language, refer to the associated section (Page 136).
5Also for the download in RUN, provided the associated prerequisites have been satisfied and the following attribute has
been specified in the associated declaration block within a pragma (only for the SIMOTION ST programming language): {
BlockInit_OnChange := TRUE; }.
For the download in RUN, see the SIMOTION Basic Functions Function Manual.

SIMOTION MCC Motion Control Chart


118 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8 Access to inputs and outputs (process image, I/O variables)

4.8.1 Overview of access to inputs and outputs


SIMOTION provides several possibilities to access the device inputs and outputs of the
SIMOTION device as well as the central and distributed I/O:
● Via direct access with I/O variables
Direct access is used to directly access the corresponding I/O address.
Define an I/O variable (name and I/O address) without assigning a task to it. The entire
address space of the SIMOTION device can be used.
It is preferable to use direct access with sequential programming (in MotionTasks);
access to current input and output values at a particular point in time is especially
important in this case.
Further information: Direct access and process image of the cyclic tasks (Page 122).
● Via the process image of cyclic tasks using I/O variables
The process image of the cyclic tasks is a memory area in the RAM of the SIMOTION
device, on which the whole I/O address space of the SIMOTION device is mirrored. The
mirror image of each I/O address is assigned to a cyclic task and is updated using this
task. The task remains consistent throughout the whole cycle. This process image is
used preferentially when programming the assigned task (cyclic programming).
Define an I/O variable (name and I/O address) and assign a task to it. The entire address
area of the SIMOTION device can be used.
Direct access to this I/O variable is still possible: Specify direct access with _direct.var-
name.
Further information: Direct access and process image of the cyclic tasks (Page 122).
● Using the fixed process image of the BackgroundTask
The process image of the BackgroundTask is a memory area in the RAM of the
SIMOTION device, on which a subset of the I/O address space of the SIMOTION device
is mirrored. The mirror image is refreshed with the BackgroundTask and is consistent
throughout the entire cycle. This process image is used preferentially when programming
the BackgroundTask (cyclic programming).
The address space 0 .. 63 can be used. I/O addresses that are accessed using the
process image of the cyclic task are excluded.
Further information: Access to the fixed process image of the BackgroundTask
(Page 128).
A comparison of the most important properties is contained in "Important properties of direct
access and process image (Page 120)".
You can use I/O variables like any other variable, see "Access I/O variables (Page 134)".

Note
An access via the process image is more efficient than direct access.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 119
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.2 Important features of direct access and process image access

Table 4- 19 Important features of direct access and process image access

Direct access Access to process image of Access to fixed process image


cyclic tasks of the BackgroundTask
Permissible address Entire address range of the SIMOTION device 0 .. 63,
range Exception: I/O variables comprising more than one byte must not except for the addresses used
contain addresses 63 and 64 contiguously (example: PIW63 or in the process image of the
PQD62 are not permitted). cyclic tasks
The addresses used must be present in the I/O and appropriately Addresses that are not present
configured. in the I/O or have not been
configured can also be used.
Assigned task None. Cyclic task for selection: BackgroundTask.
• SynchronousTasks,
• TimerInterruptTasks,
• BackgroundTask.
Updating • Onboard I/O of SIMOTION Update occurs with the An update is made with the
devices C230-2, C240, assigned task: BackgroundTask:
C240 PN, and P350:
• Inputs are read before the • Inputs are read before the
Update occurs in a cycle assigned task is started and BackgroundTask is started
clock of 125 µs. transferred to the process and is transferred to the
• I/O via PROFIBUS DP, input image. process input image.
PROFINET, P-Bus, and • Process output image is • Process output image is
DRIVE-CLiQ as well as written to the outputs after written to the outputs when
Onboard I/O of the D4xx the assigned task has been the BackgroundTask is
SIMOTION devices: completed. complete.
Update occurs in the
position control cycle clock.
Inputs are read at the start of
the cycle clock.
Outputs are written at the end
of the cycle clock.
Consistency – During the entire cycle of the During the entire cycle of the
assigned task. BackgroundTask.
Exception: Direct access to Exception: Direct access to
output occurs. output occurs.
Consistency is only ensured for elementary data types.
When using arrays, the user is responsible for ensuring data
consistency.

SIMOTION MCC Motion Control Chart


120 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

Direct access Access to process image of Access to fixed process image


cyclic tasks of the BackgroundTask
Use Preferred in MotionTasks Preferred in the assigned task Preferred in the
BackgroundTask
Use the absolute Not supported. Possible, with the following
address syntax: e.g. %IW62, %Q63.3.
Declaration as Necessary, for the entire device as an I/O variable in the symbol Possible, but not necessary:
variable browser. • for the entire device as an
Syntax of I/O address: e.g. PIW1022, PQ63.3. I/O variable in the symbol
browser,
• As unit variable,
• As local variable in a
program.
Write protection for Possible; Read only status can Not supported. Not supported.
outputs be selected.
Declaration of arrays Possible. Not supported.
Further information Direct access and process image of the cyclic tasks (Page 122). Access to the fixed process
image of the BackgroundTask
(Page 128).
Responses in the Error during access from user Error during generation of Error during generation of
event of an error program, alternative reactions process image, alternative process image, reaction: CPU
available: reactions available: stop2.
• CPU stop1 • CPU stop2 Exception: If a direct access
• Substitution value • Substitution value has been created at the same
• Last value • Last value address, the behavior set there
applies.
Please refer to the SIMOTION Basic Functions function description.
Access
• In RUN mode Without any restrictions. Without any restrictions. Without any restrictions.
• During Possible with restrictions: Possible with restrictions: Possible with restrictions:
StartupTask • Inputs can be read. • Inputs are read at the start • Inputs are read at the start
• Outputs are not written until of the StartupTask. of the StartupTask.
StartupTask is complete. • Outputs are not written until • Outputs are not written until
StartupTask is complete. StartupTask is complete.
• During Without any restrictions. Possible with restrictions: Possible with restrictions:
ShutdownTask • Inputs retain status of last • Inputs retain status of last
update update
• Outputs are no longer • Outputs are no longer
written. written.
1 Call the ExecutionFaultTask.
2 Call the PeripheralFaultTask.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 121
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.3 Direct access and process image of cyclic tasks

Properties
Direct access to inputs and outputs and access to the process image of the cyclic task
always take place via I/O variables. The entire address range of the SIMOTION device (see
table below) can be used.
A comparison of the most important properties, also in comparison to the fixed process
image of the BackgroundTask (Page 128) is contained in "Important properties of direct
access and process image (Page 120)".

Direct access
The direct access is used to directly access the corresponding I/O address. Direct access is
used primarily for sequential programming (in MotionTasks). The access to the current value
of the inputs and outputs at a specific time is particularly important.
For direct access, you define an I/O variable (Page 125) without assigning it a task.

Note
An access via the process image is more efficient than direct access.

Process image of the cyclic task


The process image of the cyclic tasks is a memory area in the RAM of the SIMOTION
device, on which the whole I/O address space of the SIMOTION device is mirrored. The
mirror image of each I/O address is assigned to a cyclic task and is updated using this task.
The task remains consistent throughout the whole cycle. This process image is used
preferentially when programming the assigned task (cyclic programming). The consistency
during the complete cycle of the task is particularly important.
For the process image of the cyclical task you define an I/O variable (Page 125) and assign
it a task.
Direct access to this I/O variable is still possible: Specify direct access with _direct.var-name.

SIMOTION MCC Motion Control Chart


122 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

Address range of the SIMOTION devices


The address range of the SIMOTION devices depending on the version of the
SIMOTION kernel is contained in the following table. The complete address range can be
used for direct access and process image of the cyclical tasks.

Table 4- 20 Address range of the SIMOTION devices depending on the version of the
SIMOTION kernel

SIMOTION device Address range for SIMOTION Kernel version


V3.0 V3.1, V3.2 As of V4.0
C230-2 0 .. 1023 0 .. 2047 4 0 .. 2047 4
C240 – – 0 .. 4096 4
C240 PN 1 – – 0 .. 4096 5
D410 2 – – 0 .. 16383 4 5
D425 3 – 0 .. 4095 4 0 .. 16383 4 5
D435 0 .. 1023 0 .. 4095 4 0 .. 16383 4 5
D445 3 – 0 .. 4095 4 0 .. 16383 4 5
D445-1 1 – – 0 .. 16383 4 5
P350 0 .. 1023 0 .. 2047 4 0 .. 4095 4
1 Available with V4.1 SP2 HF4 and higher
2 Available with V4.1 and higher
3 Available with V3.2 and higher
4For distributed I/O (over PROFIBUS DP), the transmission volume is restricted to 1024 bytes per
PROFIBUS DP line.
5 For distributed I/O (over PROFINET), the transmission volume is restricted to 4096 bytes per

PROFINET segment.

Note
Observe the rules for I/O addresses for direct access and the process image of the cyclical
tasks (Page 124).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 123
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.3.1 Rules for I/O addresses for direct access and the process image of the cyclical tasks

NOTICE
You must observe the following rules for the I/O variable addresses for direct access and
the process image of the cyclic task (Page 122). Compliance with the rules is checked
during the consistency check of the SIMOTION project (e.g. during the download).
1. Addresses used for I/O variables must be present in the I/O and configured
appropriately in the HW Config.
2. I/O variables comprising more than one byte must not contain addresses 63 and 64
contiguously.
The following I/O addresses are not permitted:
– Inputs: PIW63, PID61, PID62, PID63
– Outputs: PQW63, PQD61, PQD62, PQD63
3. All addresses of an I/O variable comprising more than one byte must be within an
address area configured in HW-config.
4. An I/O address (input or output) can only be used by a single I/O variable of data type
BYTE, WORD or DWORD or an array of these data types. Access to individual bits with
I/O variables of data type BOOL is possible.
5. If several processes (e.g. I/O variable, technology object, PROFIdrive telegram) access
an I/O address, the following applies:
– Only a single process can have write access to an I/O address of an output (BYTE,
WORD or DWORD data type).
Read access to an output with an I/O variable that is used by another process for
write access, is possible.
– All processes must use the same data type (BYTE, WORD, DWORD or ARRAY of
these data types) to access this I/O address. Access to individual bits is possible
irrespective of this.
Please be aware of the following, for example, if you wish to use an I/O variable to
read the PROFIdrive telegram transferred to or from the drive: The length of the I/O
variables must match the length of the telegram.
– Write access to different bits of an address is possible from several processes;
however, write access with the data types BYTE, WORD or DWORD is then not
possible.

Note
These rules do not apply to accesses to the fixed process image of the BackgroundTask
(Page 128). These accesses are not taken into account during the consistency check of the
project (e.g. during download).

SIMOTION MCC Motion Control Chart


124 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.3.2 Creating I/O variables for direct access or process image of cyclic tasks
You create I/O variables for direct access and a process image of the cyclic tasks in the
symbol browser in the detail view; you must be in offline mode to do this.
Here is a brief overview of the procedure:
1. In the project navigator of SIMOTION SCOUT, select the I/O element in the subtree of the
SIMOTION device.
2. In the detail view, select the "Symbol browser" tab and scroll down to the end of the
variable table (empty row).
3. In the last (empty) row of the table, enter or select the following:
– Name of variable.
– I/O address according to the "syntax for entering I/O addresses (Page 127)".
– Optional for outputs:
Activate the "Read only" checkbox if you only want to have read access to the output.
You can then read an output that is already being written by another process (e.g.
output of an output cam, PROFIdrive telegram).
A read-only output variable cannot be assigned to the process image of a cyclic task.
– Data type of the variables in accordance with "Possible data types of the I/O variables
(Page 128)".
4. Optionally, you can also enter or select the following (not for data type BOOL):
– Array length (array size).
– Process image or direct access:
Can only be assigned if the "Read only" checkbox is cleared.
For process image, select the cyclic task to which you want to assign the I/O variable.
To select a task, it must have been activated in the execution system.
For direct access, select the blank entry.
– Strategy for the behavior in an error situation (see SIMOTION Basic Functions
Function Manual).
– Substitute value (if array, for each element).
– Display format (if array, for each element), when you monitor the variable in the
symbol browser.
You can now access this variable using the symbol browser or any program of the
SIMOTION device.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 125
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

NOTICE
Note the following for the process image for cyclic tasks:
• A variable can only be assigned to one task.
• Each byte of an input or output can only be assigned to one I/O variable.
In the case of data type BOOL, please note:
• The process image for cyclic tasks and a strategy for errors cannot be defined. The
behavior defined via an I/O variable for the entire byte is applicable (default: direct
access or CPU stop).
• The individual bits of an I/O variable can also be accessed using the bit access
functions.
Take care when making changes within the I/O variables (e.g. inserting and deleting I/O
variables, changing names and addresses):
• In some cases the internal addressing of other I/O variables may change, making all I/O
variables inconsistent.
• If this happens, all program sources that contain accesses to I/O variables must be
recompiled.

Note
I/O variables can only be created in offline mode. You create the I/O variables in SIMOTION
SCOUT and then use them in your program sources (e.g. ST sources, MCC sources,
LAD/FBD sources).
Outputs can be read and written to, but inputs can only be read.
Before you can monitor and modify new or updated I/O variables, you must download the
project to the target system.

You can use I/O variables like any other variable, see "Access I/O variables (Page 134)".

SIMOTION MCC Motion Control Chart


126 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.3.3 Syntax for entering I/O addresses


For the input of the I/O address for the definition of an I/O variable for direct access or
process image of cyclical tasks (Page 122), use the following syntax. This specifies not only
the address, but also the data type of the access and the mode of access (input/output).

Table 4- 21 Syntax for the input of the I/O addresses for direct access or process image of the cyclic tasks

Data type Syntax for Permissible address range


Input Output Direct access Process image e.g. direct access
D435 V4.1
BOOL PIn.x PQn.x n: 0 .. MaxAddr -1 n: 0 .. 16383
x: 0 .. 7 x: 0 .. 7
BYTE PIBn PQBn n: 0 .. MaxAddr n: 0 .. MaxAddr n: 0 .. 16383
WORD PIWn PQWn n: 0 .. 62 n: 0 .. 62 n: 0 .. 62
64 .. MaxAddr - 1 64 .. MaxAddr - 1 64 .. 16382
DWORD PIDn PQDn n: 0 .. 60 n: 0 .. 60 n: 0 .. 60
64 .. MaxAddr - 3 64 .. MaxAddr - 3 64 .. 16380
n = logical address
x = bit number
MaxAddr = Maximum I/O address of the SIMOTION device depending on the version of the SIMOTION kernel, see
address range of the SIMOTION devices in "direct access and process image of the cyclical tasks
(Page 122)".
1 For data type BOOL, it is not possible to define the process image for cyclic tasks. The behavior defined via an I/O

variable for the entire byte is applicable (default: direct access).

Examples:
Input at logic address 1022, WORD data type: PIW1022.
Output at logical address 63, bit 3, BOOL data type: PQ63.3.

Note
Observe the rules for I/O addresses for direct access and the process image of the cyclical
tasks (Page 124).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 127
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.3.4 Possible data types of I/O variables


The following data types can be assigned to the I/O variables for direct access and process
image of the cyclical tasks (Page 122). The width of the data type must correspond to the
data type width of the I/O address.
If you assign a numeric data type to the I/O variables, you can access these variables as
integer.

Table 4- 22 Possible data types of the I/O variables for direct access and the process image of the
cyclical tasks

Data type of I/O address Possible data types for I/O variables
BOOL (PIn.x, PQn.x) BOOL
BYTE (PIBn, PQBn) BYTE, SINT, USINT
WORD (PIWn, PQWn) WORD, INT, UINT
DWORD (PIDn, PQDn) DWORD, DINT, UDINT
For details of the data type of the I/O address, see also "Syntax for entering I/O addresses
(Page 127)".

4.8.4 Access to fixed process image of the BackgroundTask


The process image of the BackgroundTask is a memory area in the RAM of the SIMOTION
device, on which a subset of the I/O address space of the SIMOTION device is mirrored.
Preferably, it should be used for programming the BackgroundTask (cyclic programming) as
it is consistent throughout the entire cycle.
The size of the fixed process image of the BackgroundTask for all SIMOTION devices is 64
bytes (address range 0 ... 63).
A comparison of the most important properties in comparison to the direct access and
process image of the cyclical tasks (Page 122) is contained in "Important properties of direct
access and process image (Page 120)".

NOTICE
I/O addresses that are accessed with the process image of the cyclic tasks must not be
used. These addresses cannot be read or written to with the fixed process image of the
BackgroundTask.

Note
The rules for I/O addresses for direct access and the process image of the cyclical tasks
(Page 124) do not apply. The accesses to the fixed process image of the BackgroundTask
are not taken into account during the consistency check of the project (e.g. during
download).
Addresses not present in the I/O or not configured in HW Config are treated like normal
memory addresses.

SIMOTION MCC Motion Control Chart


128 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

You can access the fixed process image of the BackgroundTask by means of:
● Using an absolute PI access (Page 129): The absolute PI access identifier contains the
address of the input/output and the data type.
● Using a symbolic PI access (Page 131): You declare a variable that references the
relevant absolute PI access.
– A unit variable
– A static local variable in a program.
● Using an I/O variable (Page 133): In the symbol browser, you define a valid I/O variable
for the entire device that references the corresponding absolute PI access.

NOTICE
Please note that if the inputs and outputs work with the little-endian byte order (e.g. the
integrated digital inputs of SIMOTION devices C230-2, C240, or C240 PN) and the
following conditions are fulfilled:
1. The inputs and outputs are configured to an address 0 .. 62.
2. An I/O variable for direct access (data type WORD, INT or UINT) has been created for
these inputs and outputs.
3. You also access these inputs and outputs via the fixed process image of the
BackgroundTask.
then the following is valid:
• Access with the data type WORD supplies the same result via the I/O variable and the
fixed process image of the BackgroundTask.
• The access to the individual bytes with the _getInOutByte function (see SIMOTION
Basic Functions Function Manual) supplies these in the Little Endian order.
• Access to the individual bytes or bits with the fixed process image of the
BackgroundTask supplies these in the Big Endian order.
For information on the order of the bytes Little Endian and Big Endian: Please refer to the
SIMOTION Basic Functions Function Manual.

4.8.4.1 Absolute access to the fixed process image of the BackgroundTask (absolute PI access)
You make absolute access to the fixed process image of the BackgroundTask (Page 128) by
directly using the identifier for the address (with implicit data type). The syntax of the
identifier (Page 130) is described in the following section.
You can use the identifier for the absolute PI access in the same manner as a normal
variable.

Note
Outputs can be read and written to, but inputs can only be read.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 129
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.4.2 Syntax for the identifier for an absolute process image access
For the absolute access to the fixed process image of the BackgroundTask (Page 129), use
the following syntax. This specifies not only the address, but also the data type of the access
and the mode of access (input/output).
You also use these identifiers:
● For the declaration of a symbolic access to the fixed process image of the
BackgroundTask (Page 131).
● For the creation of an I/O variables for accessing the fixed process image of the
BackgroundTask (Page 133).

Table 4- 23 Syntax for the identifier for an absolute process image access

Data type Syntax for Permissible address range


Input Output
BOOL %In.x %Qn.x n: 0 .. 63 2
or or x: 0 .. 7
%IXn.x1 %QXn.x1
BYTE %IBn %QBn n: 0 .. 63 2

WORD %IWn %QWn n: 0 .. 63 2


DWORD %IDn %QDn n: 0 .. 63 2
n = logical address
x = bit number
1 The syntax %IXn.x or %QXn.x is not permitted when defining I/O variables.
2 Except for the addresses used in the process image of the cyclic tasks.

Examples
Input at logic address 62, WORD data type: %IW62.
Output at logical address 63, bit 3, BOOL data type: %Q63.3.

NOTICE
Addresses that are accessed with the process image of the cyclic tasks must not be used.
These addresses cannot be read or written to with the fixed process image of the
BackgroundTask.

Note
The rules for I/O addresses for direct access and the process image of the cyclical tasks
(Page 124) do not apply. The accesses to the fixed process image of the BackgroundTask
are not taken into account during the consistency check of the project (e.g. during
download).
Addresses not present in the I/O or not configured in HW Config are treated like normal
memory addresses.

SIMOTION MCC Motion Control Chart


130 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.4.3 Defining symbolic access to the fixed process image of the BackgroundTask
You create symbolic access to the fixed process image of the Background Task in the
declaration table of the source file or the MCC chart or LAD/FBD program (only in the case
of programs). The scope of the symbolic process image access is dependent on the location
of the declaration:
● In the interface section of the declaration table of the source file (INTERFACE):
Symbolic process image access behaves like a unit variable; it is valid for the entire
source file; all MCC charts or LAD/FBD programs (programs, function blocks, and
functions) within the source file can access the process image.
In addition, these variables are available on HMI devices and, once connected, in other
source files (or other units), as well.
The total size of all unit variables in the interface section is limited to 64 Kbytes.
● In the implementation section of the declaration table of the source file
(IMPLEMENTATION):
Symbolic process image access behaves like a unit variable; it is only valid in the source
file; all MCC charts or LAD/FBD programs (programs, function blocks, and functions)
within the source file can access it.
● In the declaration table for the MCC chart or LAD/FBD program (only in the case of
programs):
Symbolic process image access behaves like a local variable; it can only be accessed
within the MCC chart or LAD/FBD program in which it is declared.
No symbolic process image access can be declared in functions or function blocks.
Proceed as follows; the source file or the MCC chart or LAD/FBD program (programs only)
with the declaration table is opened:
1. Select the declaration table and, if applicable, the section of the declaration table for the
desired scope.
2. Select the I/O Symbols tab.
3. Enter:
– Name of symbol (variable name)
– For Absolute ID, the identifier of the absolute process image access (Page 130).
– Data type of symbol (Page 132) (this must agree with the length of the process image
access).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 131
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.4.4 Possible data types for symbolic PI access


In the following cases, a data type that differs from that of the absolute PI access can be
assigned to the fixed process image of the BackgroundTask (Page 128). The data type width
must correspond to the data type width of the absolute PI access.
● For the declaration of a symbolic PI access (Page 131).
● For the creation of an I/O variable (Page 133).
If you assign a numeric data type to the symbolic PI access or to the I/O variables, you can
access these variables as integer.

Table 4- 24 Possible data types for symbolic PI access

Data type of the Possible data types of the


absolute PI access symbolic PI access
BOOL (%In.x, %IXn.x, %Qn.x. %QXn.x) BOOL
BYTE (%IBn, %QBn) BYTE, SINT, USINT
WORD (%IWn, %QWn) WORD, INT, UINT
DWORD (%IDn, %PQDn) DWORD, DINT, UDINT
For the data type of the absolute PI access, see also "Syntax for the identifier for an absolute
PI access (Page 130)".

4.8.4.5 Example: Defining symbolic access to the fixed process image of the BackgroundTask

Figure 4-25 Example: Defining symbolic access to the fixed process image of the BackgroundTask

SIMOTION MCC Motion Control Chart


132 Programming and Operating Manual, 05/2009
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.4.6 Creating an I/O variable for access to the fixed process image of the BackgroundTask
You create I/O variables for access to the fixed process image for the background task in the
symbol browser in the detail view; you must be in offline mode to do this.
Here is a brief overview of the procedure:
1. In the project navigator of SIMOTION SCOUT, select the "I/O" element in the subtree of
the SIMOTION device.
2. In the detail view, select the Symbol browser tab and scroll down to the end of the
variable table (empty row).
3. In the last (empty) row of the table, enter or select the following:
– Name of variable.
– Under I/O address, the absolute PI access according to the "syntax for the identifier
for an absolute PI access (Page 130)"
(exception: The syntax %IXn.x or %QXn.x is not permitted for data type BOOL).
– Data type of the I/O variables according to the "possible data types of the symbolic PI
access (Page 132)".
4. Select optionally the display format used to monitor the variable in the symbol browser.
You can now access this variable using the symbol browser or any program of the
SIMOTION device.

Note
I/O variables can only be created in offline mode. You create the I/O variables in SIMOTION
SCOUT and use them in your program sources.
Note that you can read and write outputs but you can only read inputs.
Before you can monitor and modify new or updated I/O variables, you must download the
project to the target system.

You can use I/O variables like any other variable, see "Access I/O variables (Page 134)".

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 133
Programming in MCC
4.8 Access to inputs and outputs (process image, I/O variables)

4.8.5 Accessing I/O variables


You have created an I/O variable for:
● Direct access or process image of the cyclic tasks (Page 122).
● Access to the fixed process image of the BackgroundTask (Page 128).
You can use this I/O variable just like any other variable.

NOTICE
Consistency is only ensured for elementary data types.
When using arrays, the user is responsible for ensuring data consistency.

Note
If you have declared unit variables or local variables of the same name (e.g. var-name),
specify the I/O variable using _device.var-name (predefined namespace, see the
"Predefined namespaces" table in "Namespaces").
It is possible to directly access an I/O variable that you created as a process image of a
cyclic task. Specify direct access with _direct.var-name or _device._direct.var-name.

If you want to deviate from the default behavior when errors occur during variable access,
you can use the _getSafeValue and _setSafeValue functions (see SIMOTION Basic
Functions Function Manual).
For errors associated with access to I/O variables, see SIMOTION Basic Functions Function
Manual.

SIMOTION MCC Motion Control Chart


134 Programming and Operating Manual, 05/2009
Programming in MCC
4.9 Connections to other program source files or libraries

4.9 Connections to other program source files or libraries


In the declaration table of a source file, you can define connections to:
● LAD/FBD units under the same SIMOTION device
● MCC source files under the same SIMOTION device
● ST source files under the same SIMOTION device
● Libraries
This will then allow you to access the following in this source file:
● In the case of connected program sources, the following items which are defined there
– Functions
– Function blocks
– Programs (optional)
– Unit variables
– User-defined data types (structures, enumerations)
– Symbolic accesses to the fixed process image of the BackgroundTask
● In the case of connected libraries, the following items which are defined there
– Functions
– Function blocks
– Programs (optional)
– User-defined data types (structures, enumerations)
Program source files and libraries must be compiled beforehand.
For information about the library concept, see also the SIMOTION ST Programming Manual.

Note
Libraries can be created in all programming languages (MCC, ST, or LAD/FBD).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 135
Programming in MCC
4.9 Connections to other program source files or libraries

4.9.1 Defining connections

4.9.1.1 Procedure for defining connections to other units (program source files)
Connections to other units (program sources) are defined in the declaration table of the
source file. The mode of action of a connection is dependent on the section of the
declaration table in which it is defined.
● In the interface section of the declaration table:
The imported functions, variables, etc., will continue to be exported to other units and to
HMI devices. This can lead to name conflicts.
This setting is necessary, for example, if unit variables are declared in the interface
section of the source file with a data type that is defined in the imported program source
file.
● In the implementation section of the declaration table:
The imported functions, variables, etc. will no longer be exported.
This setting is usually sufficient.
Proceed as follows; the source file (declaration table) is open (see Open existing program
source files (Page 34)):
1. In the declaration table, select the section for the desired mode of action.
2. Select the Connections tab.
3. For the connection type, select: Program/Unit
4. In the same line, select the name of the unit to be connected:
Units (program sources) must be compiled beforehand.

SIMOTION MCC Motion Control Chart


136 Programming and Operating Manual, 05/2009
Programming in MCC
4.9 Connections to other program source files or libraries

4.9.1.2 Procedure for defining connections to libraries


Connections to libraries are defined in the declaration table of the source file.
Proceed as follows; the source file (declaration table) is open (see Open existing program
source files (Page 34)):
1. In the interface section of the declaration table, select the Connections tab.
2. For the connection type, select: Library.
3. In the same line, select the name of the library to be connected.
Libraries must be compiled beforehand.
4. Optionally, you can define a name space for libraries (see Using name space
(Page 137)):
To do this, enter a name under Name space.

Note
When programming the subroutine call command (see Inserting and parameterizing
subroutine calls (Page 142)) with a library function or a library function block, the
connection to the library is automatically entered into the declaration table of the program
source file; the name of the library is assigned as the name space. You can also change
the designation of the name space at a later point in time.

4.9.2 Using the name space


You can optionally assign a name space to every connected library. You define the
designation of the name space when connecting the library (see How to define connections
to libraries (Page 137)).
It is important to specify the name space if the current LAD/FBD program/MCC chart or
program source file contains variables, data types, functions, or function blocks with the
same name as the connected library. The name space will then allow you to specifically
access the variables, data types, functions, or function blocks in the library. This can also
resolve naming conflicts between connected libraries.
If you wish to use variables, data types, functions, or function blocks from the connected
library in a command in the LAD/FBD program/MCC chart, then insert the designation of the
name space in front of the variable name, etc., from the library, separated by a period (for
example, namespace.var_name, namespace.fc_name).
Name spaces are predefined for device-specific and project-specific variables, direct
accesses to I/O variables, and variables of TaskId and AlarmId in the following table: If
necessary, write their designation before the variable name, separated by a period, e.g.
_device.var_name or _task.task_name.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 137
Programming in MCC
4.9 Connections to other program source files or libraries

Table 4- 25 Predefined name spaces

Name space Description


_alarm For AlarmId: The _alarm.name variable contains the AlarmId of the message with
the name identifier – see SIMOTION ST Programming Manual.
_device For device-specific variables (global device user variables, I/O variables, system
variables, and system variables of the SIMOTION device)
_direct By means of direct access to I/O variables.
Local name space for _device. Nesting as in _device._direct.name is permitted.
_project For names of SIMOTION devices in the project; only used with technology objects
on other devices.
With unique project-wide names of technology objects, used also for these names
and their system variables
_task For TaskID: The _task.name variable contains the TaskId of the task with the name
identifier – see SIMOTION ST Programming and Operating Manual.
_to For technology objects as well as their system variables and configuration data –
see SIMOTION ST Programming and Operating Manual.

SIMOTION MCC Motion Control Chart


138 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

4.10 Subroutine
Universal, reusable sections of a program can be created in the form of subroutines.
When a subroutine is called, the program branches from the current task into the subroutine.
The commands in the subroutine are executed. The program then jumps back to the
previously active task.
Subroutines can be called repeatedly, as required, by one or more MCC programs of the
SIMOTION device.

Example of executing a subroutine

&DOOLQJ0&&FKDUW 6XEURXWLQH

3URJUDPIXQFWLRQ )& RUIXQFWLRQEORFN )XQFWLRQ )& IXQFWLRQEORFN )% RU


)% RSWLRQDOSURJUDP

67$57
67$57

(1'

(1'

$SURJUDPFDQEHFDOOHGDVDVXEURXWLQHE\DQRWKHUSURJUDPRUIXQFWLRQ
EORFN )%  SURJUDPLQSURJUDP 6SHFLILFFRPSLOHURSWLRQVPXVWEHVHW
IRUWKLV VHHEHORZ 

Figure 4-26 Execution of a subroutine

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 139
Programming in MCC
4.10 Subroutine

Subroutine as a function (FC), function block (FB), or program (optional)


The creation type of a subroutine can be a function (FC), a function block (FB) or, as an
option, a program ("program in program").
● Function
A function (FC) is a subroutine without static data, that is, all local variables lose their
value when the function has been executed. They are re-initialized when the function is
next started.
Data are transferred to the function using input or in/out parameters; the output of a
function value (return value) is also possible.
● Function block
A function block (FB) is a subroutine with static data, that is, local variables retain their
value after the function block has been executed. Only variables that have been explicitly
declared as temporary lose their value.
An instance has to be defined before using an FB: Define a variable (VAR or
VAR_GLOBAL) and enter the name of the FB as data type. The FB static data is saved in
this instance. You can define several FB instances; each instance is independent from
the others.
The static data of an FB instance remain stored until the instance is next called; they are
reinitialized when the variable type of the FB instance is initialized again (see Initialization
of instances of function blocks (FB) (Page 115)).
Data are transferred to the FB using input parameters or in/out parameters; the data are
returned from the FB using in/out or output parameters.
● Program ("program in program")
You also have the option of calling a program within a different program or a function
block. This requires the following compiler options to be activated (see Global compiler
settings (Page 40) and Local compiler settings (Page 41)):
– "Permit language extensions" for the program source of the calling program or
function block and
– "Only create program instance data once" for the program source of the called
program. The static data of the called program is stored in the user memory of the
program source (unit) of said called program.
Most of the programming work involved in assigning the programs to the tasks can be
performed by calling up programs within another program. In the execution system, only
one associated calling program needs to be assigned to the tasks concerned.
A program is called without parameters or return values.
Further information on calling a program within a program can be found in the ST
Programming and Operating Manual.

SIMOTION MCC Motion Control Chart


140 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

NOTICE
The activated "Only create program instance data once" compiler option causes:
• The static variables of the programs (program instance data) to be stored in the user
memory of the program source (unit) (see the SIMOTION ST Programming and
Operating Manual). This also causes the initialization behavior to change (see the
SIMOTION ST Programming and Operating Manual).
• All called programs with the same name use the same program instance data.

Exchange of information between the subroutine and calling program

Function (FC) and function block (FB) as a subroutine


Information is exchanged between the subroutine and the calling program using transfer
parameters or global variables (e.g. unit variables).
Transfer parameters can be input, input/output or output parameters. They are defined in the
declaration table for the subroutine (MCC chart):
● Input parameters: As variable type VAR_INPUT
● In/out parameter: As variable type VAR_IN_OUT
● Output parameter (for FB only): As variable type VAR_OUTPUT
For functions, a function value can be returned; you specify the data type of the return value
when you insert (create) the function (see Insert function (FC) or function block (FB)
(Page 142)).
You assign current values to the input and/or in/out parameters when you call the subroutine
(FC or FB instance). You may only assign user-defined variables to the in/out parameters of
an FB because the called FB accesses the assigned variables directly and can therefore
change them.
The output parameters of an FB can be read-accessed as often as required in the calling
program.
A function does not formally contain any output parameters, since the result of the function
can in this case be assigned to the return value of the function.
See also the examples of functions (Page 146) and function blocks (Page 150).

Program as subroutine ("program in program")


A program is called without parameters or return values. This means that information can
only be exchanged between the calling program and the called program (subroutine) using
global variables (e.g. unit variables).

See also
Inserting a subroutine call into the MCC chart and assigning parameters (Page 142)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 141
Programming in MCC
4.10 Subroutine

4.10.1 Inserting a function (FC) or function block (FB)


The creation dialog is similar to that of an MCC program:
1. The MCC source file must already exist (see Inserting and managing MCC source files)
2. Select the relevant MCC source file in the project navigator.
3. Select the Insert > Program > MCC chart command from the menu.
The input screen form opens.
– Enter the name of the MCC chart (see Rules for identifiers).
– For the creation type, select Function or Function block.
– With creation type Function only:
– Select the data type of the return value as the return type (<--> for no return value).
– Check the Exportable option if the function or function block is to be used in other
program source files (LAD/FBD, MCC or ST source files).
If the check box is not selected, the MCC chart can only be used in the associated
MCC source file (see also Changing usability in other charts (export capability)).
– You can also enter an author, version, and a comment.
– Click OK to confirm.
4. Program the instructions in the function or function block.
Assign an expression to the return value of a function (= function name) or to the output
parameters of a function block.
5. Accept and compile the MCC source file. The subroutine you have created will then be
displayed in the list.

4.10.2 Inserting a subroutine call into the MCC chart and assigning parameters

The Subroutine call command is available on the MCC editor toolbar (Basic commands
command list).
You can use this command to call:
● Functions or function blocks of the same MCC source file or a different program source
file (e.g., MCC source file, ST source file). A program can be called within a different
program or a function block (FB).
● Library functions or library function blocks from a program library.
● Optional programs (of the same MCC unit or a different program source) or library
programs (from a program library). Specific compiler options must be set for this; see
Parameter overview (Page 144).

SIMOTION MCC Motion Control Chart


142 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

Figure 4-27 Subroutine call for a function

NOTICE
Pay attention to the order of the MCC charts in an MCC source file. A subroutine (function
or function block) must be defined before it is used. This is the case when the MCC chart of
the subroutine appears above the chart in which it is used in the project navigator If
necessary, reorder the charts.
See also: Subroutine call of the function (FC) (Page 147)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 143
Programming in MCC
4.10 Subroutine

4.10.2.1 Overview of parameters for


You can set the following parameters (see table below):

Overview of Subroutine call parameters

Field/Button Explanation/Instructions
Subroutine type Here, select the subroutine type.
Function(default value)
A function is a calculation subroutine that supplies a defined result as a return
value based on the parameter entered. Functions have no memory beyond the
call.
Function block
A function block is a subroutine that can have several return values. A function
block corresponds to a data type. Instances are defined. They have a memory,
that is, they retain instance data of a function block extending over several calls.
Return values of the call can also be scanned in the instance.
Library function
Function from library.
Library function block
Function block from the library
Program ("program in program")
You also have the option of calling a program within a different program or a
function block.
This requires the following compiler options to be activated (see Global compiler
settings (Page 40) and Local compiler settings (Page 41)):
• "Permit language extensions" for the program source of the calling program or
function block and
• "Only create program instance data once" for the program source of the called
program. The static data of the called program is stored in the user memory of
the program source (unit) of said called program. The same program instance
data is used every time the program is called.
A program is called without parameters or return values.
Library program
Program from library. The same restrictions apply as when calling a program.
The static data for the called program is stored once in the user memory of the
device that the library program was called on. The same program instance data is
used every time the program is called on the same device.
Library Only for subroutine type "library function", "library function block", and "library
program".
All libraries available in the project are displayed in the drop-down list box.
Select the library which contains the subroutine.

SIMOTION MCC Motion Control Chart


144 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

Field/Button Explanation/Instructions
Subroutine The selection list displays all of the subroutines available on the SIMOTION
device of the selected subroutine type.
Select the subroutine to be called.
Important:
The functions and function blocks themselves can be created in every available
programming language. They must be available in compiled form in the device. A
connection to the program source (if required) is automatically set up when the
subroutine is selected.
The library functions and library function blocks can be created in every available
programming language. A connection to the library (if required) is automatically
set up when the subroutine is selected.
Return value For subroutine type Function or Library function:
Here, you enter the variable in which the return value is to be stored. The type of
variable must match the return value type.
Type For subroutine type Function or Library function:
The data type of the return value is displayed.
Instance For subroutine type Function block or Library function block:
Here, enter the name of the function block instance. The instance contains the
memory of the function block in the form of instance data.
You define the instance as a variable whose data type is the name of the function
block in one of the following ways:
• In the declaration table of the MCC source file as VAR_GLOBAL
• In the declaration table of the MCC chart as VAR
List of transfer parameters
Name The name of the transfer parameter is displayed here.
On / Off The variable type of the transfer parameter is displayed here.
VAR_INPUT
Input parameter (for functions and function blocks)
VAR_IN_OUT
In/out parameter (for functions and function blocks)
VAR_OUTPUT
Output parameter (for function blocks only)
Data type The data type of the transfer parameter is displayed here.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 145
Programming in MCC
4.10 Subroutine

Field/Button Explanation/Instructions
Value Here, you can assign current variables or values to the transfer parameters:
• Input parameter (variable type VAR_IN):
Here, you enter a variable name or an expression. The assignment of system
variables or I/O variables is permissible; type transformations are possible.
• In/out parameter (variable type VAR_IN):
Enter a variable name; the variable must be directly writable and readable.
System variables of SIMOTION devices and technology objects are not
permitted nor are I/O variables. The data type of the in/out parameter must
correspond to that of the assigned variables; application of type transformation
functions is not possible.
• Output parameter (variable type VAR_OUTPUT – for FB only):
The assignment of an output parameter to a variable in this parameter screen
form is optional; you can also access an output parameter after executing the
function block.
When assigned in this parameter screen form: Enter a variable name. The
data type of the output parameter must correspond to that of the assigned
variables; the application of type transformation functions is not possible.
Comments The comment for the transfer parameters is displayed here.

4.10.3 Example: Function (FC)


You want to create a subroutine with a circumference calculation for a circle. The calculation
is performed in a function (FC). This is named Circumference.
The circle circumference calculation can thus be called as a subroutine by any task.
Formula for circumference calculation: Circumference = PI * 2 * radius
You define the Radius and PI variables in the declaration table of the function.

See also
Creating and programming the function (FC) (Page 147)
Subroutine call of function (FC) (Page 147)

SIMOTION MCC Motion Control Chart


146 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

4.10.3.1 Creating and programming the function (FC)


1. In the PROGRAMS folder in the project navigator, open the MCC unit in which you want
to create the function.
2. In the MCC unit, double-click on the entry Insert MCC chart and enter the following
parameters in the open Insert MCC chart dialog window:
– Enter the name Circumference.
– For creation type, select Function.
– For return type (data type of return value), select REAL.
– Click OK to confirm.
3. In the declaration table, define the input parameter radius and the constant PI (see
figure).
4. Program the variable assignment for the return value (see figure).
5. Accept and compile the MCC source file.
You have now finished programming the Circumference function.

Figure 4-28 Declaring variables (e.g., input parameters) in the MCC chart

Figure 4-29 Programming the Circumference subroutine (e.g., assignment to a return value)

4.10.3.2 Subroutine call of function (FC)


The function (FC) is called from a program in the example.
1. Create an MCC chart as a program in the same MCC source file (see Inserting a new
MCC chart (Page 44)).
2. In the MCC source file or MCC chart, declare the following (see figure):
– The mycircum variable. The return value of the "Circumference" function is assigned
to this variable.
– The myradius variable. This variable contains the radius and is assigned to the input
parameter "Radius" of the "Circumference" function.
Note that the validity range of the variables is dependent on the declaration location (see
Define variables (Page 104)).
3. Insert the Subroutine call command.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 147
Programming in MCC
4.10 Subroutine

4. Assign parameters in the parameter screen form (see figure).


5. Pay attention to the order of the MCC charts in the MCC source file (see figure). The
MCC chart with the function must appear in the project navigator above the chart
containing the program with the subroutine call. If necessary, rearrange the charts by
selecting the relevant MCC chart in the project navigator and selecting the command
Down or Up in the context menu.
6. Accept and compile the MCC source file.
You have now finished programming the subroutine call.



① You can continue to use the myumfang (mycircum) variable in the program.
Figure 4-30 Declaring a variable in the MCC chart

Figure 4-31 Opened parameter screen form for the subroutine call

SIMOTION MCC Motion Control Chart


148 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine




① MCC chart with the function


② MCC chart containing the program with the subroutine call
Figure 4-32 Sequence of the MCC charts

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 149
Programming in MCC
4.10 Subroutine

4.10.4 Example: Function block (FB)


You want to calculate a following error. The calculation is performed in a function block (FB)
named FollError. The following error calculation can thus be called as a subroutine by any
task.
Formula for following error calculation: Difference = Specified position – Actual position
Define the required input and output parameters Set position, Actual position, and Difference
(with the other variables, if necessary) in the MCC chart (function block) or MCC source file.

See also
Creating and programming the function block (FB) (Page 150)
Subroutine call of function block (FB) (Page 151)
Creating a function block instance (Page 152)
Programming the subroutine call of the function block (Page 153)
Accessing the output parameters of the function block retrospectively (Page 155)

4.10.4.1 Creating and programming the function block (FB)


1. In the PROGRAMS folder in the project navigator, open the MCC unit in which you want
to create the function block.
2. In the MCC unit, double-click on the entry Insert MCC chart and enter the following
parameters in the open Insert MCC chart dialog window:
– Enter the name FollError.
– For creation type, select Function block.
– Click OK to confirm.
3. In the declaration table, define the variables (e.g., input and output parameters – see
figure).
4. The following error is calculated in a variable assignment (see figure).
5. Accept and compile the MCC source file.
You have now finished programming the "FollError" function block.

Figure 4-33 Declaring variables (e.g., input and output parameters) in the MCC chart

SIMOTION MCC Motion Control Chart


150 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

)RUPXODODQJXDJH

Figure 4-34 Programming a variable assignment

4.10.4.2 Subroutine call of function block (FB)


In this example, the function block (FB) is called from a program.
1. Create an MCC chart as a program (see Inserting a new MCC chart (Page 44)).
2. Create a function block instance.
– In the MCC source file or MCC chart, declare the instances of the function block along
with the variables.
Note that the validity range of the instance and variables is dependent on the declaration
location (see Define variables (Page 104)).
3. Call the function block:
– Program the Subroutine call command.
4. After executing an instance of the function block, you can access the output parameters
at any location in the calling program.
– Program the Variable assignment command.
5. Accept and compile the program.
You have now finished programming the subroutine call.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 151
Programming in MCC
4.10 Subroutine

4.10.4.3 Creating a function block instance


Before you can use a function block, you must define an instance. Each instance of an FB is
independent of the others; once an instance has ended, its static variables remain stored.
You define the instances of an FB in the declaration table of the MCC source file or MCC
chart. The scope of the instance declaration is dependent on the location of the declaration:
● In the interface section of the declaration table of the MCC source file:
The instance behaves like a unit variable; it is valid for the entire MCC source file; all
MCC charts (programs, function blocks, and functions) within the MCC source file can
access the instance.
In addition, the instance is available on HMI devices and, once connected (see How to
define connections to other units (program source files) (Page 136)), in other MCC units
(or other units), as well.
The total size of all unit variables in the interface section is limited to 64 Kbytes.
● In the implementation section of the declaration table of the MCC source file:
The instance behaves like a unit variable that is valid only for the MCC source file; all
MCC charts (programs, function blocks, and functions) within the MCC source file can
access the instance.
● In the declaration table of the MCC chart (for programs and function blocks only):
The instance behaves like a local variable; it can only be accessed within the MCC chart
in which it is declared.
Proceed as follows; the MCC unit or the MCC chart with the declaration table is open (see
Open existing MCC units (Page 34) or Open existing MCC chart (Page 46)):
1. Select the declaration table and, if applicable, the section of the declaration table for the
desired scope.
2. Select the Parameter tab.
3. Enter or select the following:
– Name of instance (variable name – see Rules for identifiers (Page 91))
– Variable type VAR or VAR_GLOBAL, depending on the declaration location (in MCC
chart or MCC source file, respectively)
– Designation of the function block as data type.

SIMOTION MCC Motion Control Chart


152 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

4. Declare the other variables.

   

① The output parameter Difference is assigned to the variable Result_2 during subsequent
program runtime. You can use the Result_2 variable for other purposes in the program.
② The output parameter Difference is assigned to the variable Result in the subroutine call. You
can use the Result variable for other purposes in the program.
③ Creating an instance
④ Select the required FB as the data type.
The created function blocks are offered as data types in the drop-down list box depending on
the MCC editor settings (Page 29):
• Only function blocks with the same program source or from connected program sources or
libraries
• All function blocks defined in the project

Figure 4-35 Define an instance of the function block and variables in the MCC chart or MCC source
file

4.10.4.4 Programming the subroutine call of the function block


1. Insert the Subroutine Call command in the MCC chart.
2. Program the command as follows:
– For subroutine type, select Function block.
– Select the designation of the function block as the subroutine.
– Enter the instance defined in the declaration table in the Instance field. The input and
in/out parameters of the FB are displayed.
3. Assign the current values to the transfer parameters:
– Input parameters: Variable or expression
– In/out parameter: Directly readable/writable variable
– Output parameter (optional): Variable
You can insert unit and system variables from the detail view using a drag-and-drop
operation.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 153
Programming in MCC
4.10 Subroutine

4. Click OK to confirm.
5. Pay attention to the order of the MCC charts in the MCC source file. The MCC chart with
the function block must appear in the project navigator above the chart containing the
program with the subroutine call. If necessary, rearrange the charts by highlighting the
relevant MCC chart in the project navigator and selecting the command Down or Up in
the context menu.
See also: Subroutine call of the function (FC) (Page 147)

Figure 4-36 Opened parameter screen form for the subroutine call

SIMOTION MCC Motion Control Chart


154 Programming and Operating Manual, 05/2009
Programming in MCC
4.10 Subroutine

4.10.4.5 Accessing the output parameters of the function block retrospectively


After an instance of the function block has been executed, the static variables of the function
block (including the output parameters) are retained. You can access the output parameters
at any point in the calling program.
If you have defined the FB instance as VAR_GLOBAL, you can also access the output
parameter in other MCC charts.
1. Insert the Variable assignment command in the MCC chart.
2. Program the command (see figure).
3. Click OK to confirm.

 

① Name of the FB instance ② Output parameter


Figure 4-37 Programming a variable assignment

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 155
Programming in MCC
4.11 Reference data

4.11 Reference data


The reference data provide you with an overview of:
● on utilized identifiers with information about their declaration and use
(Cross-reference list (Page 156)).
● on function calls and their nesting
(Program structure (Page 160))
● on the memory requirement for various data areas of the program sources
(Code attributes (Page 162))

4.11.1 Cross reference list


The cross-reference list shows all identifiers in program sources (e.g. ST source files, MCC
source files):
● Declared as variables, data types, or program organization units (program, function,
function block)
● Used as previously defined types in declarations
● Used as variables in the statement section of a program organization unit.
You can generate the cross-reference list selectively for:
● An individual program source (e.g. ST source file, MCC source file, LAD/FBD source)
● All program sources of a SIMOTION device
● All program sources and libraries of the project
● Libraries (all libraries, single library)

4.11.1.1 Creating a cross-reference list


To create the cross-reference list:
1. In the project navigator, select the element for which you want to create a cross-reference
list.
2. Select the menu Edit > Reference data > Create.
The cross-reference list is displayed in its own tab in the detail view.

Note
The generated cross-reference list is saved automatically and can be displayed selectively
after selecting the appropriate element in the project navigator. To display the cross-
reference list, select the Edit > Reference data > Display > Cross-Reference List menu
command.
When a cross-reference list is recreated, it is updated selectively (corresponding to the
selected element in the project navigator). Other existing cross-reference data are retained
and displayed, if applicable.

SIMOTION MCC Motion Control Chart


156 Programming and Operating Manual, 05/2009
Programming in MCC
4.11 Reference data

4.11.1.2 Example: Cross-reference tab in detail view

Figure 4-38 Cross-reference tab in detail view

4.11.1.3 Content of the cross-reference list


The cross-reference list contains all the identifiers assigned to the element selected in the
project navigator. The applications for the identifiers are also listed in a table:
Details of how to work with the cross-reference list are described in the section "Working with
the cross-reference list".

Table 4- 26 Meanings of columns and selected entries in the cross-reference list

Column Entry in column Meaning


Name Identifier name
Type Identifier type
Name • Data type of variable (e.g. REAL, INT)
• POU type (e.g. PROGRAM, FUNCTION)
DERIVED Derived data type
DERIVED ANY_OBJECT TO data type
ARRAY … ARRAY data type
ENUM … Enumerator data type
STRUCT … STRUCT data type
Declaration Location of declaration
Name (unit) Declaration in the program source name
Name (LIB) Declaration in the library name
Name (TO) System variable of the technology object name
Name (TP) Declaration in the default library specified:
• Technology package name
• std_fct = IEC library
• device = device-specific library

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 157
Programming in MCC
4.11 Reference data

Column Entry in column Meaning


Name (DV) Declaration on the SIMOTION device name (e.g. I/O variable or global device
variable)
_project Declaration in the project (e.g. technology object)
_device Internal variable on the SIMOTION device (e.g. TaskStartInfo)
_task Task in the execution system
Usage Use of identifier
CALL Call as subroutine
ENUM name As element when declaring the enumerator data type name
I/O Declaration as I/O variable
R Read access
R (TYPE) As data type in a declaration
R/W Read and write access
STRUCT name As component when declaring the structure name
TYPE Declaration as data type or POU
Variable type (e.g. VAR, Declaration as variable of the variable type specified
VAR_GLOBAL)
W Write access
Path specification Path specification for the SIMOTION device or program source
Name SIMOTION device name
Name1/Name2 • Program source name2 on SIMOTION device name1
• Program source name2 in library name1
Name/taskbind.hid Execution system of the SIMOTION device name
Range Range within the SIMOTION device or program source
IMPLEMENTATION Implementation section of the program source
INTERFACE Interface section of the program source
POU type name (e.g. Program organization unit (POU) name within the program source (also MCC
FUNCTION name, chart, LAD/FBD program)
PROGRAM name)
I/O address I/O variable
TASK name Assignment for the task name
_device Global device variable
Language Programming language of the program source
Line/Block Line number of the program source (e.g. ST source file)
With MCC units or MCC charts, the following is also shown:
• Number: serial numbers for the command (block numbers) or
• DT: declaration table

SIMOTION MCC Motion Control Chart


158 Programming and Operating Manual, 05/2009
Programming in MCC
4.11 Reference data

Note
Activated single-step monitoring in MCC programming
Each task is assigned two variables TSI#dwuser_1 and TSI#dwuser_2, which can be written
and read.
When single step monitoring is activated, the compiler uses these variables to control single
step monitoring if at least one MCC chart is assigned to the relevant task. The user then
cannot use these variables, because their contents are overwritten by single step monitoring
and may cause undesirable side effects.

4.11.1.4 Working with a cross-reference list


In the cross-reference list you are able to:
● Sort the column contents alphabetically:
– To do this, click the header of the appropriate column.
● Search for an identifier or entry:
– Click the "Search" button and enter the search term.
● Filter (Page 160) the identifiers and entries displayed.
● Copy contents to the clipboard in order, for example, to paste them into a spread-sheet
program
– Select the appropriate lines and columns.
– Press the CTRL+C shortcut.
● Print the contents ("Project" > "Print" menu).
● Open the referenced program source and position the cursor on the relevant line of the
ST source file (or MCC command or LAD/FBD element):
– Double-click on the corresponding line in the cross-reference list.
or
– Place the cursor in the corresponding line of the cross-reference list and click the "Go
to application" button.
Further details about working with cross-reference lists can be found in the online help.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 159
Programming in MCC
4.11 Reference data

4.11.1.5 Filtering the cross-reference list


You can filter the entries in the cross-reference list so that only relevant entries are
displayed:
1. Click the "Filter settings" button.
The "Filter Setting for Cross References" window will appear.
2. Activate the "Filter active" checkbox.
3. If you also want to display system variables and system functions:
– Deactivate the "Display user-defined variables only" checkbox.
4. Set the desired filter criterion for the relevant columns:
– Select the relevant entry from the drop-down list box or enter the criterion.
– If you want to search for a character string within an entry: Deactivate the "Whole
words only" checkbox.
5. Confirm with "OK."
The contents of the cross-reference list will reflect the filter settings selected.

Note
A filter is automatically activated after the cross-reference list has been created.

4.11.2 Program structure


The program structure contains all the function calls and their nesting within a selected
element.
When the cross-reference list has been successfully created, you can display the program
structure selectively for:
● An individual program source (e.g. ST source file, MCC source file, LAD/FBD source)
● All program sources of a SIMOTION device
● All program sources and libraries of the project
● Libraries (all libraries, single library, individual program source within a library)
Follow these steps:
1. In the project navigator, select the element for which you want to display the program
structure.
2. Select the menu Edit > Reference data > Display > Program structure.
The cross-reference tab is replaced by the program structure tab in the detail view.

SIMOTION MCC Motion Control Chart


160 Programming and Operating Manual, 05/2009
Programming in MCC
4.11 Reference data

4.11.2.1 Example: Program Structure tab in the detail view

Figure 4-39 Example of a program structure

4.11.2.2 Content of the program structure


A tree structure appears, showing:
● as base respectively
– the program organization units (programs, functions, function blocks) declared in the
program source, or
– the execution system tasks used
● below these, the subroutines referenced in this program organization unit or task.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 161
Programming in MCC
4.11 Reference data

For structure of the entries, see table:

Table 4- 27 Elements of the display for the program structure

Element Description
Base List separated by a comma
(declared POU or • Identifier of the program organization unit (POU) or task
task used))
• Identifier of the program source in which the POU or task was declared,
with add-on [UNIT]
• Minimum and maximum stack requirement (memory requirement of the
POU or task on the local data stack), in bytes [Min, Max]
• Minimum and maximum overall stack requirement (memory requirement of
the POU or task on the local data stack including all called POUs), in bytes
[Min, Max]
Referenced POU List separated by a comma:
• Identifier of called POU
• Optionally: Identifier of the program source / technology package in which
the POU was declared:
Add-on (UNIT): User-defined program source
Add-on (LIB): Library
Add-on (TP): System function from technology package
• Only for function blocks: Identifier of instance
• Only for function blocks: Identifier of program source in which the instance
was declared:
Add-on (UNIT): User-defined program source
Add-on (LIB): Library
• Line of (compiled) source in which the POU is called; several lines are
separated by "|".

4.11.3 Code attributes


You can find information on or the memory requirement of various data areas of the program
sources under code attribute.
When the cross-reference list has been successfully created, you can display the code
attributes selectively for:
● An individual program source (e.g. ST source file, MCC source file, LAD/FBD source)
● All program sources of a SIMOTION device
● All program sources and libraries of the project
● Libraries (all libraries, single library, individual program source within a library)
Follow these steps:
1. In the project navigator, select the element for which you want to display the code
attributes.
2. Select the Edit > Reference data > Display > Code attributes menu.
The Cross-references tab is now replaced by the Code attributes tab in the detail view.

SIMOTION MCC Motion Control Chart


162 Programming and Operating Manual, 05/2009
Programming in MCC
4.11 Reference data

4.11.3.1 Code attribute contents


The following are displayed in a table for all selected program source files:
● Identifier of program source file,
● Memory requirement, in bytes, for the following data areas of the program source file:
– Dynamic data: All unit variables (retentive and non-retentive, in the interface and
implementation sections),
– Retain data: Retentive unit variables in the interface and implementation section,
– Interface data: Unit variables (retentive and non-retentive) in the interface section,
● Number of referenced sources.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 163
Programming in MCC
4.12 LAD/FBD/formula

4.12 LAD/FBD/formula
The creation language for a condition or variable assignment is either the ladder logic (LAD)
or function block diagram (FBD) programming language, or a formula according to IEC
61131-3. One of these programming languages can be selected as a standard language for
conditions and variable assignments (see MCC editor settings (Page 29)).
The language can be selected individually for the following commands:
● Variable assignment (see Variable assignment (Page 197))
● Wait for condition (see Wait for condition (Page 190))
● IF program branching (see IF: Program branching (Page 221)
● WHILE loop with condition at start (see WHILE: Loop with condition at the start
(Page 223))
● UNTIL loop with condition at end (see UNTIL: Loop with condition at the end (Page 226))
● Synchronous start (see Synchronous start (Page 233))
You can switch between the different programming languages. A calculation programmed in
LAD or FBD can be expanded in Formula in accordance with IEC 61131-3. However, you
can then only switch back to the LAD or FBD mode of representation if the expression can
be displayed in these languages.

Note
If you have not yet programmed in these languages, you can find a brief description of how
to do so in Appendix B.

Insert variable
You can insert variables from the detail view (Symbol Browser tab) in the appropriate input
field using a drag-and-drop operation.

SIMOTION MCC Motion Control Chart


164 Programming and Operating Manual, 05/2009
Programming in MCC
4.12 LAD/FBD/formula

4.12.1 Ladder diagram (LAD)


If you select the LAD language, an empty ladder diagram is initially opened.
New elements are inserted using the context menu commands or the buttons on the toolbar.
New elements are always inserted after the selected element.
You can select individual elements using the cursor or the keyboard cursor keys. The
selected element is displayed in blue.
Selected elements can be copied, pasted, cut, or deleted using the context menu.

Input screen form for ladder diagram

    

① Toolbar ⑤ Comparator
② Enlarge / reduce the graphical display ⑥ NC contact
③ Closing a branch ⑦ NO contact
④ Opens a branch
Figure 4-40 Input screen form for ladder diagram

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 165
Programming in MCC
4.12 LAD/FBD/formula

4.12.1.1 Description of LAD elements

Description of normally open (NO) contact

NO contact
Description Signal = 1 if the operand has signal status 1. The operand specifies the bit or
Boolean variable whose signal status is queried.
Data types BOOL

Description of normally closed (NC) contact

NC contact
Description Signal = 1 if the operand has signal status 0. The operand specifies the bit or
Boolean variable whose signal status is queried.
Data types BOOL

Description of comparator

Comparison instructions
Description Signal = 1 if the comparison of the two operands is true.
Possible modes of comparison:
= Equal
<> Not equal to
> greater than
< less than
>= greater than or equal to
<= less than or equal to
Data types SINT, INT, DINT, REAL, LREAL, BOOL, BYTE
SINT 8-bit integer comparator, Parameter: Byte
INT 16-bit integer comparator, Parameter: Words
DINT 32-bit integer comparator and time comparator,
Parameter: Double words and times
REAL 32-bit floating-point comparator,
Parameter: Double words
LREAL 64-bit floating-point comparator,
Parameter: 64-bit floating point values

SIMOTION MCC Motion Control Chart


166 Programming and Operating Manual, 05/2009
Programming in MCC
4.12 LAD/FBD/formula

4.12.1.2 Opens a branch

Procedure: Opens a branch

8VHWKHFXUVRUWRVHOHFWWKHSRVLWLRQDWZKLFKWKH
EUDQFKLVWREHRSHQHG

2SHQWKHEUDQFKXVLQJ

7KHEUDQFKLVLQVHUWHGDIWHUWKHVHOHFWHGHOHPHQW

4.12.1.3 Closing a branch

Procedure: Closing a branch

8VHWKHFXUVRUWRVHOHFWWKHSRVLWLRQDWZKLFKWKH
EUDQFKPXVWEHFORVHG

&ORVHWKHEUDQFKXVLQJ

7KHEUDQFKLVFORVHGDIWHUWKHVHOHFWHGHOHPHQW

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 167
Programming in MCC
4.12 LAD/FBD/formula

4.12.2 Function block diagram (FBD)


If you select the FBD language, an empty function block diagram is opened first.
New elements are inserted using the context menu commands or the buttons on the toolbar.
New elements are always inserted after the selected element.
You can select individual elements using the cursor or the keyboard cursor keys. The
selected element is displayed in blue.
Selected elements can be copied, pasted, cut, or deleted using the context menu.

Input screen form for function block diagram

    

① Toolbar ⑤ Comparator
② Enlarge / reduce the graphical display ⑥ OR logic operation
③ Negate input ⑦ AND operation
④ Add input

SIMOTION MCC Motion Control Chart


168 Programming and Operating Manual, 05/2009
Programming in MCC
4.12 LAD/FBD/formula

4.12.2.1 Description of FBD elements

Description of an AND operation

AND operation
Description The AND operation forms the signal states of two or more specified
operands at the inputs of an AND box.
If the signal status of all operands is 1, the condition is fulfilled and the result
of the operation is 1.
If the signal status of one operand is 0, the condition is not fulfilled and the
result of the operation is 0.
Data types BOOL

Description of an OR operation

OR operation
Description The OR operation forms the signal states of two or more specified operands
at the inputs of an OR box.
If the signal status of one operand is 1, the condition is fulfilled and the
operation returns a result of 1.
If the signal status of all operands is 0, the condition is not fulfilled and the
result of the operation is 0.
Data types BOOL

Description of comparator

Comparison instructions
Description See Description of LAD elements
Data types See Description of LAD elements

Description of Add input

Add input
Description An additional input is added to an AND or an OR operation.
Data types ----

Description of Negate input

Negate input
Description Signal is negated.
Data types ----

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 169
Programming in MCC
4.12 LAD/FBD/formula

4.12.3 Formula
A condition or value can be programmed in Formula language.
You can move the operators you need from the Command Library tab in the project
navigator to the input field using a drag-and-drop operation.
The system variables are moved from the Symbol Browser tab in the detail view to the input
field using a drag-and-drop operation (see figure).

Programming a condition in the Formula language

SIMOTION MCC Motion Control Chart


170 Programming and Operating Manual, 05/2009
Programming in MCC
4.13 Command library and system function

4.13 Command library and system function

4.13.1 Command library


The command library is automatically displayed as a project navigator tab if you program the
following commands:
● ST zoom
● System function call

Figure 4-41 Command library tab of the project navigator

Note
You can drag & drop system functions from the command library to the parameter masks
of the "ST zoom" and "System function call" commands.
The command library stays open even when the programming window is closed.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 171
Programming in MCC
4.13 Command library and system function

4.13.1.1 Using the command library


Proceed as follows to insert operands or functions from the command library into a
programming window:
Move the entry from the command library to the entry field of the window using a drag-and-
drop operation.

Figure 4-42 Inserting a command from the command library

4.13.2 Using the System function call command


The System function call command is available on the MCC editor toolbar (Basic commands
command list). This command enables you to use of any system functions and system
function blocks in the MCC chart and to program their call conveniently.
When the command is called, the programmed system function or system function block is
executed. Once the system function or system function block is executed, the execution of
the MCC chart resumes after the command.

System function
The system function can be moved from the command library to the input field using a drag-
and-drop operation or be entered directly.

SIMOTION MCC Motion Control Chart


172 Programming and Operating Manual, 05/2009
Programming in MCC
4.13 Command library and system function

Return value
In the case of a system function, you specify the variable containing the return value of the
function.

Instance
In the case of a system function block, you specify the instance. This instance has been
declared as a variable beforehand (data type is the name of the system function block). See
also Creating a function block instance.

Example of System function call

See also
Overview of parameters for (Page 174)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 173
Programming in MCC
4.13 Command library and system function

4.13.2.1 Overview of parameters for


You can set the following parameters:

Overview of parameters for System function call

Field/Button Meaning/Instruction
System function The desired system function can be selected from the command library.
You can either enter the system function in the field or move it from the project
navigator (command library) to the field using a drag-and-drop operation.
Return value For a system function:
Here, you enter the variable in which the return value is to be stored. The type
of variable must match the return value type.
Type For a system function:
The data type of the return value is displayed.
Instance For a system function block:
Here, you enter the name of the system function block instance. The instance
contains the memory of the function block in the form of instance data. Define
the instance as VAR_GLOBAL in the declaration table of the MCC source file
or VAR in the declaration table of the MCC chart.
List of transfer parameters
Name The name of the transfer parameter is displayed here.
On / Off The variable type of the transfer parameter is displayed here.
VAR_INPUT
Input parameter (for system functions and system function blocks)
VAR_IN_OUT
In/out parameter (for system function blocks only)
VAR_OUTPUT
Output parameter (for system function blocks only)
Data type The data type of the transfer parameter is displayed here.

SIMOTION MCC Motion Control Chart


174 Programming and Operating Manual, 05/2009
Programming in MCC
4.13 Command library and system function

Field/Button Meaning/Instruction
Value Here, you can assign current variables or values to the transfer parameters:
• Input parameter (variable type VAR_INPUT):
Here, you enter a variable name or an expression. The assignment of
system variables or I/O variables is permissible; type transformations are
possible.
Optional input parameters are indicated by an entry in the Default value
column. If no value has been transferred to it, it is automatically assigned
the default value
• In/out parameter (variable type VAR_IN_OUT – for system function blocks
only):
Enter a variable name; the variable must be directly writable and readable.
System variables of SIMOTION devices and technology objects are not
permitted nor are I/O variables. The data type of the in/out parameter must
correspond to that of the assigned variables; application of type
transformation functions is not possible.
• Output parameter (variable type VAR_OUTPUT – for system function
blocks only):
The assignment of an output parameter to a variable in this parameter
screen form is optional; you can also access an output parameter after
executing the function block.
When assigned in this parameter screen form: Enter a variable name. The
data type of the output parameter must correspond to that of the assigned
variables; the application of type transformation functions is not possible.
Default value Here, the default value is displayed for optional input parameters. If no value
has been transferred to an optional input parameter, it is automatically
assigned the default value.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 175
Programming in MCC
4.14 MCC charts in libraries

4.14 MCC charts in libraries


Libraries provide you with user-defined types, unit variables, functions, and function blocks
for use from all SIMOTION devices.
Libraries can be written to in all available programming languages. They can be used in all
program source files (e.g., MCC source files, ST source files).
In order to use a library in an MCC source file, you must link the library in the declaration
table of the MCC unit (with specification of a name space, if necessary) (see How to define
connections to libraries (Page 137)).
You can obtain more details on inserting and managing libraries in the online help.

4.14.1 Using technology packages in libraries


Libraries can also contain the following:
● Commands that act on technology objects
● Access to system variables of technology objects.

NOTICE
Only variables of this data type (see Technology object data types (Page 101)) are
permitted as technology objects.

You specify the SIMOTION device and technology package for which the library is compiled
in the object properties of the library:
1. Select the library in the project navigator.
2. Select the Edit > Object Properties menu command.
3. Select the TPs/TOs tab.
4. Select the SIMOTION devices (including the version number) and the technology
packages for which the library is to be compiled.

NOTICE
To compile a project without errors, observe the rules governing the selection of
SIMOTION devices and technology packages in the following table.

SIMOTION MCC Motion Control Chart


176 Programming and Operating Manual, 05/2009
Programming in MCC
4.14 MCC charts in libraries

Selection of devices and technology packages in a library

Selection Description
Device-independent You must also select:
• The technology packages
• The version number of the selected technology packages
Note:
1. The library is compiled without reference to a SIMOTION device.
For this reason, the following must not be used:
– System functions and system variables of SIMOTION devices
– Version-dependent system functions of the SIMOTION ST
programming language (see SIMOTION ST Programming Manual)
Additional MCC commands are not permitted.
1. The library is compiled precisely to the version selected. The use of
system functions or variables which are not available in the selected
version will result in a compilation error.
2. If a device-independent library is to be made available for another
version it must be copied and inserted under a different name. This copy
must be recompiled with a different version reference.
SIMOTION device Only those technology packages are displayed that are available for all of
including version the selected devices.
(multiple selection Note:
possible)
1. The library is compiled for all of the selected devices and technology
packages (of the selected device versions).
2. The use of system functions or variables which are not available for one
of the selected devices, or the technology package of the respective
device version, will result in a compilation error.
3. The library can only be used for the selected devices and technology
packages. When you use the library in an MCC source file, the following
is therefore checked:
– Whether the library for the SIMOTION device (including version) that
contains the MCC source file to be imported has been compiled.
– Whether the technology package that is used on the SIMOTION
device matches that of the library.
Any inconsistencies will result in compilation errors.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 177
Programming in MCC
4.14 MCC charts in libraries

4.14.2 Compiling a library


In libraries, you can use all MCC commands except for the ones listed in the table below. In
addition, you are not allowed to access some variables; these variables are also listed in this
table.

MCC commands and variable accesses not permitted in libraries

Prohibited commands
In all libraries:
• Following MCC basic commands:
– Set output
– Reset output
– Wait for signal
• Following MCC task command:
– Determine TaskId
• Following MCC communication commands:
– Incoming message
– Outgoing message
• MCC single axis command:
– Set virtual axis values
• ST system functions (when used in the MCC commands System function call, Variable
assignment or ST zoom):
– Task control commands (up to kernel V3.0)
– Commands for runtime measurement of tasks (up to kernel version V3.0)
– Commands for message programming (up to kernel version V3.0)
For more information, refer to the SIMOTION ST Programming Manual.

Additional commands, if the library was compiled on a device-independent basis:


• Following MCC basic commands:
– Activate trace
– Change operating mode
• Following MCC command for program structure:
– Synchronous start
• Following MCC commands for communication:
– Receive data
– Send data
– Remove connection using TCP/IP
– Establish connection using TCP/IP
• System functions of SIMOTION devices (see list manuals for SIMOTION devices).

SIMOTION MCC Motion Control Chart


178 Programming and Operating Manual, 05/2009
Programming in MCC
4.14 MCC charts in libraries

Prohibited variable access


• Unit variables (retentive and non-retentive)
• Global device variables (retentive and non-retentive)
• I/O variables
• Instances of the technology objects and their system variables
• Variables of task names and configured messages (for name spaces _task and _alarm)
• If the library is not device-dependent (i.e. compiled without reference to a SIMOTION device or
SIMOTION Kernel version):
– System variables of SIMOTION devices (see Parameter Manuals for SIMOTION devices)
– Configuration data of technology objects (see Parameter Manual of configuration data for the
relevant SIMOTION technology package)

Compile a library as follows:


1. Select the library in the project navigator.
2. Select the SIMOTION devices and the technology packages for which the library is to be
compiled (Edit > Object properties menu command, TPs/TOs tab – see Using technology
packages in libraries (Page 176))
3. In the context menu, select Accept and compile.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 179
Programming in MCC
4.15 Print

4.15 Print
The MCC source file or MCC chart displayed in the working window can be output to a
printer.
1. Select the Project > Print menu command.
2. In the Print project window, select the print options (see table below):
– When printing an MCC source file:
Select print options for this MCC source file and each MCC chart it contains.
– When printing an MCC chart:
Select print options for this MCC chart.
3. Then, select:
– Print if you want to output the result to the printer immediately
– Print preview if you want to check the print result on the screen before printing

Print options for an MCC source file or MCC chart

Option Significance
Printing a declaration table When this check box is selected, the declaration table of the MCC
(MCC source file and MCC source file or the MCC chart is printed. In the Select column below,
chart) select:
Default column widths
The table will be printed with the default column widths.
Scale column widths to screen
The table is printed with the column widths that were set in the
declaration table window
Print chart When this check box is selected, the selected MCC chart will be
(MCC chart only) printed. Depending on the selected zoom factor, the printout can
have multiple pages.
Printing the index page When this check box is selected, an index page displaying the
(MCC chart only) entire MCC chart on one page and the page boundaries of the
individual pages is also printed. If the printout of the MCC chart
consists of several pages, this will make it easier to read.
Display numbers of adjoining When this check box is selected, the number of the next page will
pages be printed on the margin of each page of a multi-page MCC chart
(MCC chart only) printout.

SIMOTION MCC Motion Control Chart


180 Programming and Operating Manual, 05/2009
Programming in MCC
4.15 Print

Option Significance
Zoom Select a zoom factor for the printout of the MCC chart:
(MCC chart only) Scale graphics to page width
The width of the MCC chart is scaled to the page width. Depending
on the size, the chart may be divided vertically onto several pages.
Scale graphics to page height
The height of the MCC chart is scaled to the page height.
Depending on the size, the chart may be divided horizontally onto
several pages.
Scale graphics to one page
The height and width of the MCC chart are scaled to the page size.
The chart is always presented on one page.
Graphic at 100%
The MCC chart will be printed in its original size. The chart can be
divided onto several pages, both vertically and horizontally.
Apply zoom factor from screen
The MCC chart is printed with the zoom factor setting for its MCC
editor window. The chart can be divided onto several pages, both
vertically and horizontally.
Blank pages If the printout of the MCC chart consists of several pages, blank
(MCC chart only) pages can occur. In the Select column, select select which blank
pages should be printed:
Print all
All blank pages are printed.
Omit at end
Blank pages at the end of a series are not printed. If the Index
page option is selected, the non printed pages are marked with an
X on the index page.
Omit all
All blank pages (even in the middle of a series) are not printed. If
the Index page option is selected, the non printed pages are
marked with an X on the index page.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 181
MCC commands 5
5.1 Basic commands

5.1.1 Wait time

Execution of the task is halted for the programmed time period.

Figure 5-1 Parameter screen form: Wait time

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 183
MCC commands
5.1 Basic commands

5.1.1.1 Overview of parameters for Wait time


You can set the following parameters:

Table 5- 1 Overview of parameters for Wait time

Field/Button Explanation/instructions
Parameters tab See Overview of parameters for Wait time - Parameters tab (Page 184)
Expert tab See Overview of parameters for Wait time - Expert tab (Page 184)

5.1.1.2 Overview of parameters for Wait time - Parameters tab

Table 5- 2 Overview of parameters for Wait time - Parameters tab

Field/Button Explanation/instructions
Time Enter the wait time here as a value or variable of type TIME. Granularity is 1 ms. The
accuracy with which the time setting is applied is dependent on the clock grid in which the
task is executed or, in the case of MotionTasks, on the interpolation cycle clock. If the wait
time is 0, the task is continued without any interruption.
T#0ms (default value)
T#0d_0h_0m_0s_0ms

5.1.1.3 Overview of parameters for Wait time - Expert tab

Table 5- 3 Overview of parameters for Wait time - Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
Data type DINT, the value is always equal to 0.

5.1.1.4 Relevant system functions for Wait time


ST system function: _waitTime.

SIMOTION MCC Motion Control Chart


184 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.2 Wait for axis

Execution of the task is halted until the axis achieves the programmed condition. Possible
conditions are:
● Axis status: A status of the axis determined on the basis of system variables of the axis or
the associated synchronous object (in the case of a synchronous axis)
● Comparison value : Comparison of a value of the axis (such as position, velocity) with a
specified value
If both conditions are selected, they are combined by an AND operation.
The statuses and values of the axis relate to the total motion.
The condition is checked in the interpolator cycle clock. If the condition is fulfilled, the priority
of the MotionTask is temporarily raised. The commands within the shaded area under the
wait command are started in the next IPO cycle clock and executed with the highest priority.
Once the commands in the shaded area have been executed, the priority of the MotionTask
is reset.

Figure 5-2 Parameter screen form: Wait for axis

NOTICE
This command may only be programmed for MotionTasks.

Note
If you want to program a wait condition with axis statuses or axis values other than those
provided in the selection lists:
Use the Wait for condition command and the corresponding system variables of the axis
(see SIMOTION Cam Technology Package, System Variables Parameter Manual).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 185
MCC commands
5.1 Basic commands

5.1.2.1 Overview of parameters for Wait for axis


You can set the following parameters:

Table 5- 4 Overview of parameters for Wait for axis

Field/Button Explanation/instructions
Axis Here, select the axis whose status or value you want to check. You can select from:
• All axes that are configured on the device
• All variables of the MCC chart with the following data types of technology objects (see
Data types of technology objects (Page 101)): driveAxis, posAxis, or followingAxis.
Leading axis / encoder Visible for all synchronous axes.
Notice
The Master axis/encoder selection is required only for synchronous axes with more than
one synchronous object (superimposed synchronous motions).
This input is ignored in the case of synchronous axes with only one synchronous object.
By making this selection, you are indirectly selecting the synchronous object of the main
motion or the superimposed motion.
Axis status Here, you select an axis status as the condition
• Select this check box if you want to evaluate the axis status.
• Select the axis status.
Different options are offered depending on the technology of the selected axis (see
Axis status table (Page 187)).
Comparison value Here, you select comparison of an axis value as the condition.
• Select this check box if you wish to compare an axis value. Possible axis values are
shown in the subsequent selection list.
• Select the axis value that you want to compare.
Different options are offered depending on the technology of the selected axis.
• Select the comparison operators (see Comparison operators for axis values table
(Page 187)).
• Enter the comparison value.
Tolerance Only for comparisons for equality (=) or inequality (<>):
Maximum absolute value of the permitted difference between the selected axis value and
the programmed comparison value that will allow the equality condition to be satisfied.

SIMOTION MCC Motion Control Chart


186 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.2.2 Axis status

Axis status Technology of the axis1 System variable and value


Axis moving at constant D, P, F motionStateData.motionState = CONSTANT_MOVE
velocity
Axis in motion D, P, F motionStateData.motionCommand = IN_MOTION
Axis homed P, F positioningState.homed = YES
Axis at standstill (default D, P, F motionStateData.motionState = STANDSTILL
value) Standstill monitoring is activated
Axis synchronized G syncState = YES (synchronous object)
Accelerating D, P, F motionStateData.motionState = ACCELERATING
Motion is finished D, P, F motionStateData.motionCommand = MOTION_DONE
Axis is in the tolerance window and standstill monitoring is
activated
Rotating D, P, F moveCommand.state <> INACTIVE
The Start axis position-controlled or Speed specification
command is active on the axis.
Synchronous operation active G state = GEARING (synchronous object)
The Gearing on command is active on the axis.
Cam active G state = CAMMING (synchronous object)
The Cam on command is active on the axis.
Quick stop active D, P, F stopEmergencyCommand = ACTIVE
Positioning P, F posCommand.state <> INACTIVE
The Position axis command is active on the axis.
Simulation active D, P, F simulation = ACTIVE
Decelerating D, P, F motionStateData.motionState = DECELERATING
1) Technology of the axis
D: Speed-controlled axis (driveAxis)
P: Positioning axis (posAxis)
G: Synchronous axis (followingAxis)

5.1.2.3 Comparison operators for axis values

Operator Condition satisfied if:


< (default value). Selected axis value is less than the programmed comparison value.
<= Selected axis value is less than or equal to the programmed comparison value.
<> For position values only:
The absolute value of the difference between the selected axis value and the programmed
comparison value is greater than the specified tolerance.
= For position values only:
The absolute value of the difference between the selected axis value and the programmed
comparison value is less than or equal to the specified tolerance.
> Selected axis value is greater than the programmed comparison value.
>= Selected axis value is greater than or equal to the programmed comparison value.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 187
MCC commands
5.1 Basic commands

5.1.2.4 Relevant commands of the ST (Structured Text) programming language for Wait for axis
● EXPRESSION / END_EXPRESSION for formulation of the condition
● WAITFORCONDITION / END_WAITFORCONDITION

5.1.3 Wait for signal

Task execution is halted until the signal status at a digital input or output (BOOL data type)
satisfies the programmed condition:
● Static 1 (TRUE) or 0 (FALSE)
● Rising or falling edge
The condition is checked in the interpolator cycle clock. If the condition is fulfilled, the priority
of the MotionTask is temporarily raised. The commands within the shaded area under the
wait command are started in the next IPO cycle clock and executed with the highest priority.
Once the commands in the shaded area have been executed, the priority of the MotionTask
is reset.
The following access is possible to a digital input/output:
● Direct access and access to the process image of the cyclic task (Page 122) (always
takes place via I/O variables)
● Accesses to the fixed process image of the background task (Page 128) (except for
symbolic accesses declared locally in the declaration table of an MCC chart)

Figure 5-3 Parameter screen form for Wait for signal

NOTICE
This command may only be programmed for MotionTasks.

Note
If you want to program a wait condition with I/O variables or process image accesses
whose data type is not BOOL):
Use the Wait for condition command.

SIMOTION MCC Motion Control Chart


188 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.3.1 Overview of parameters for Wait for signal


You can set the following parameters:

Table 5- 5 Overview of parameters for

Field/Button Explanation/instructions
Input/output Here, you select the digital input or output to be evaluated for the wait condition.
You can select from the following:
• I/O variables with data type BOOL
• Symbolic accesses to the process image of the BackgroundTask with data type BOOL
In addition, you can enter absolute process image accesses (data type BOOL).
Value Here, you can decide whether the condition evaluation is to be edge-triggered or level-triggered.
Rising edge (default value)
The condition is satisfied if the input changes from 0 (FALSE) to 1 (TRUE).
Falling edge
The condition is satisfied if the input changes from 1 (TRUE) to 0 (FALSE).
Level 'FALSE'
The condition is satisfied if the input is static at 0 (FALSE).
Level 'TRUE'
The condition is satisfied if the input is static at 1 (TRUE).

5.1.3.2 Relevant commands of the ST (Structured Text) programming language for Wait for signal
● EXPRESSION / END_EXPRESSION for formulation of the condition
● WAITFORCONDITION / END_WAITFORCONDITION

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 189
MCC commands
5.1 Basic commands

5.1.4 Wait for condition

Execution of the task is halted until the programmed condition is fulfilled.


If the condition is fulfilled, then the priority of the MotionTask is temporarily raised. The
commands within the shaded area under the wait command are started in the next IPO cycle
clock and executed with the highest priority.
Once the commands in the shaded area have been executed, the priority of the MotionTask
is reset.
The condition can be composed of:
● Unit variables of the same MCC source file or imported program source files
● Global device variables
● Constants
● I/O variables and process image accesses (inputs)
● Operators
The expression may not contain:
● Function calls
● Local variables
● Grinding

SIMOTION MCC Motion Control Chart


190 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

Figure 5-4 Parameter screen form: Wait for condition

Note
The Wait command may only be programmed for MotionTasks.
The condition is programmed in the ladder diagram (LAD), function block diagram (FBD),
or Formula languages.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 191
MCC commands
5.1 Basic commands

Example with Wait for condition


Task: A conveyor belt is in operation with several feeders. An additional new feeder must
now be installed and programmed.
The packages will be moved onto the conveyor belt only if a package is present on the
feeder and there is sufficient room for it on the conveyor belt.





① New feeder: ② Conveyor belt:


Driven by axis_2 Driven by axis_1
Figure 5-5 Installing and programming a new feeder

SIMOTION MCC Motion Control Chart


192 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

Solution
The conveyor belt is driven by axis_1 in position-controlled mode. The feeder unit is driven
by axis_2. Two sensors are applied to input1 and input2. These monitor whether a package
is on the feeder unit and whether there is sufficient room for it on the conveyor belt. If both
are true, the feeder belt is moved (positioned relatively).

Figure 5-6 Section of MCC chart with open parameter screen form for Wait for condition command; if packages are on
feeder belt, WHILE loop is executed (Posrel=True).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 193
MCC commands
5.1 Basic commands

5.1.4.1 Relevant commands of the ST (Structured Text) programming language for Wait for
condition
● EXPRESSION / END_EXPRESSION for formulation of the condition
● WAITFORCONDITION / END_WAITFORCONDITION

5.1.5 Module

Several commands are grouped in a module (see Module creation (Page 60)).

5.1.6 Subroutine call

The Subroutine call command enables you to use user-defined functions and function blocks
as well as library functions and library function blocks in the MCC chart and to program their
call conveniently (see Insert and parameterize subroutine call in the MCC chart (Page 142)).
As an option, you can also call user-defined programs ("program in program", see
Subroutine (Page 139)) or library programs.
When the command is called, the programmed function, function block or program is
executed. Once the subroutine has been executed, execution of the MCC chart is resumed
with the subsequent command.

5.1.7 System function call

The System function call command enables you to use any system functions and system
function blocks in the MCC chart and to program their call conveniently (see Using the
system function call command (Page 172)).
When the command is called, the programmed system function or system function block is
executed. Once the system function or system function block is executed, the execution of
the MCC chart resumes after the command.

SIMOTION MCC Motion Control Chart


194 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.8 Set output

This command sets each bit of an output to 1.

Assigned values for Set output command according to data type

Data type Assigned value


(decimal)
BOOL TRUE 1
BYTE (SINT, USINT) 16#FF –1 or 255
WORD (INT, UINT) 16#FFFF –1 or 65535
DWORD (DINT, UDINT) 16#FFFFFFFF –1 or 4294967295
If you wish to assign another value to the output, you must use the Variable assignment
command.

Figure 5-7 Parameter screen form: Set output

5.1.8.1 Overview of parameters for Set output


You can set the following parameters:

Table 5- 6 Overview of parameters for Set output

Field/Button Explanation/instructions
Output Here, you select which output is to have its bits set to 1.
You can select from the following (outputs only):
I/O variables
Symbolic accesses to the process image of the BackgroundTask
In addition, you can enter absolute process image accesses (outputs).
For information about absolute process image access, see Syntax for the identifier for
absolute PI access.

5.1.8.2 Relevant commands of the ST (Structured Text) programming language for Set output
Value assignment to output

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 195
MCC commands
5.1 Basic commands

5.1.9 Reset output

This command sets each bit of an output to 0.

Table 5- 7 Assigned values for Reset output command according to data type

Data type Assigned value


(decimal)
BOOL FALSE 0
BYTE (SINT, USINT) 16#0 0
WORD (INT, UINT) 16#0 0
DWORD (DINT, UDINT) 16#0 0
If you wish to assign another value to the output, you must use the Variable assignment
command.

Figure 5-8 Parameter screen form: Reset output parameter

5.1.9.1 Overview of parameters for Reset output


You can set the following parameters:

Table 5- 8 Overview of parameters for Reset output

Field/Button Explanation/instructions
Output Here, you select which output is to have its bits set to 0.
You can select from the following (outputs only):
• I/O variables
• Symbolic accesses to the process image of the BackgroundTask
In addition, you can enter absolute process image accesses (outputs).

5.1.9.2 Relevant commands of the ST (Structured Text) programming language for Reset output
Value assignment to output

SIMOTION MCC Motion Control Chart


196 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.10 Variable assignment

You can use the Variable assignment command to assign values to user or system
variables. The assignment takes place when the command is executed in the MCC chart.
A variable can be moved from the symbol browser to the input field using drag-and-drop.
Multiple variables can be assigned.

Note
Assignment is programmed in the ladder diagram (LAD), function block diagram (FBD), or
Formula languages.

Figure 5-9 Parameter screen form with Formula language

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 197
MCC commands
5.1 Basic commands

Select this check box if you want the data to be transferred without interruption by other
tasks.

NOTICE
If you select the Uninterruptible assignments check box, you must set up
UserInterruptTask_1 because the MCC calls this in the event of an error. You can program
an error response in this task.

You can assign the following to a variable:


● A value (e.g. a := 10, b := TRUE)
● Another variable (e.g. c := d, e := f)
● A system variable (e.g. axis_1.positioningstate.actualposition)
● An output variable of an FB
● The return value of a function (FC)
● An expression (e.g. n := 2*h+10*m)

SIMOTION MCC Motion Control Chart


198 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.11 ST zoom

You can use this command to insert one or more ST commands in the MCC chart.
Enter the ST commands in the parameter screen form.

Note
Use keystroke combination Ctrl+TAB to enter a tab in the box.

Example with ST zoom

Figure 5-10 Parameter mask: ST zoom

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 199
MCC commands
5.1 Basic commands

5.1.12 Activate simulation for object

With this command, the specified technology objects (axes, output cams, measuring inputs,
synchronous (following) objects, external encoders) are switched to simulation mode. The
setpoint output for axes is suppressed. The output of output cams is not switched.

Figure 5-11 Parameter screen form: Activate simulation for object

5.1.12.1 Overview of parameters for Activate simulation for object


You can set the following parameters:

Table 5- 9 Overview of parameters for Activate simulation for object

Field/Button Explanation/instructions
Parameters tab See Overview of parameters for Activate simulation for object - Parameters tab
(Page 201)
Expert tab See Overview of parameters for Activate simulation for object - Expert tab (Page 201)
Delay program execution Select the check box if execution of the subsequent command is to wait until this
command is finished. If the check box is not selected, the next command is executed
immediately.

SIMOTION MCC Motion Control Chart


200 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.12.2 Overview of parameters for Activate simulation for object - Parameters tab

Table 5- 10 Overview of parameters for Activate simulation for object - Parameters tab

Field/Button Explanation/instructions
Technology object Here you select the technology objects that are to be switched to simulation mode. You
can select several objects simultaneously. The following are available:
• All objects that are defined on the device
• All variables with data types of technology objects declared in the MCC source file or
MCC chart (see Technology object data types (Page 101))

5.1.12.3 Overview of parameters for Activate simulation for object - Expert tab

Table 5- 11 Overview of parameters for Activate simulation for object - Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the Cam
technology package.

5.1.12.4 Relevant system functions for Activate simulation for object


Cam technology package:
● _enableAxisSimulation for speed-controlled axes, positioning axes, synchronous axes,
and path axes
● _enableCamTrackSimulation for output cam tracks
● _enableFollowingObjectSimulation for synchronous objects
● _enableMeasuringInputSimulation for measuring inputs
● _enableOutputCamSimulation for output cams
Path technology package:
● _enablePathObjectSimulation for path objects

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 201
MCC commands
5.1 Basic commands

5.1.13 Deactivate simulation for object

This command switches the specified technology objects (axes, output cams, measuring
inputs, synchronous (following) objects, external encoders) from simulation mode back to
normal mode. The setpoint output for axes is activated and the output cam outputs are
switched again.

Figure 5-12 Parameter screen form: Deactivate simulation for object

Additional information on using the command:


● Overview of parameters for Deactivate simulation for object (Page 203)
● Overview of parameters for Deactivate simulation for object - Parameters tab (Page 203)
● Overview of parameters for Deactivate simulation for object - Expert tab (Page 203)
● Relevant system functions for Deactivate simulation for object (Page 204)

SIMOTION MCC Motion Control Chart


202 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.13.1 Overview of parameters for Deactivate simulation for object

Table 5- 12 Overview of parameters for Deactivate simulation for object

Field/Button Explanation/instructions
Parameters tab See Overview of parameters for Deactivate simulation for object - Parameters tab
(Page 203)
Expert tab See Overview of parameters for Deactivate simulation for object - Expert tab (Page 203)
Delay program execution Select the check box if execution of the subsequent command is to wait until this
command is finished. If the check box is not selected, the next command is executed
immediately.

5.1.13.2 Overview of parameters for Deactivate simulation for object - Parameters tab

Table 5- 13 Overview of parameters for Deactivate simulation for object - Parameters tab

Field/Button Explanation/instructions
Technology object Here, you select the technology objects that are to be switched from simulation mode
back to normal operation. You can select several objects simultaneously. The following
are available:
• All objects that are defined on the device
• All variables with data types of technology objects declared in the MCC source file or
MCC chart (see Technology object data types (Page 101))

5.1.13.3 Overview of parameters for Deactivate simulation for object - Expert tab

Table 5- 14 Overview of parameters for Deactivate simulation for object - Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the Cam
technology package.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 203
MCC commands
5.1 Basic commands

5.1.13.4 Relevant system function for Deactivate simulation for object


Cam technology package:
● _disableAxisSimulation for speed-controlled axes, positioning axes, synchronous axes,
and path axes
● _disableCamTrackSimulation for output cam track
● _disableFollowingObjectSimulation for synchronous objects
● _disableMeasuringInputSimulation for measuring inputs
● _disableOutputCamSimulation for output cams
Path technology package:
● _disablePathObjectSimulation for path objects

5.1.14 Reset object

This command restores a technology object to its initial state.


You should use this command if an axis or a synchronous group is in an imprecisely defined
state as the result of a programming or parameter assignment error.

Figure 5-13 Parameter screen form: Reset object

SIMOTION MCC Motion Control Chart


204 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

Additional information on using the command:


● Overview of parameters for Reset object (Page 205)
● Overview of parameters for Reset object - Parameters tab (Page 205)
● Overview of parameters for Reset object - Expert tab (Page 205)
● Relevant system functions for Reset object (Page 206)

5.1.14.1 Overview of parameters for Reset object

Table 5- 15 Overview of parameters for Reset object

Field/Button Explanation/instructions
Parameters tab See Overview of parameters for Reset object - Parameters tab (Page 205)
Expert tab See Overview of parameters for Reset object - Expert tab (Page 205)

5.1.14.2 Overview of parameters for Reset object - Parameters tab

Table 5- 16 Overview of parameters for Reset object - Parameters tab

Field/Button Explanation/instructions
Technology object Here, you select the axes, cams, etc., to be reset. You can select several objects
simultaneously. The following are available:
• All objects that are defined on the device
• All variables with data types of technology objects declared in the MCC source file or
MCC chart (see Technology object data types (Page 101))

5.1.14.3 Overview of parameters for Reset object - Expert tab

Table 5- 17 Overview of parameters for Deactivate simulation for object - Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the Cam
technology package.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 205
MCC commands
5.1 Basic commands

5.1.14.4 Relevant system functions for Reset object


Cam technology package:
● _resetAxis for speed-controlled axes, positioning axes, synchronous axes and path axes
● _resetCam for cams
● _resetCamTrack for output cam tracks
● _resetExternalEncoder for external encoders
● _resetFollowingObject for synchronous objects
● _resetMeasuringInput for measuring inputs
● _resetOutputCam for output cams
Path technology package:
● _resetPathObject for path objects
Technology package Cam_EXT:
● _resetAdditionObject for addition objects
● _resetControllerObject for controller objects
● _resetFixedGear for fixed gears
● _resetFormulaObject for formula objects
● _resetSensor for sensor objects
TControl technology package:
● _resetTController for temperature channels

SIMOTION MCC Motion Control Chart


206 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.15 Change operating mode

You can use this command to place the SIMOTION device in STOP or STOP U mode.

Note
To place the SIMOTION device into RUN mode again, activate the software switch in
SIMOTION SCOUT or the mode selector on the SIMOTION device.

Figure 5-14 Parameter screen form: Change operating mode

5.1.15.1 Overview of parameters for Change operating mode


You can set the following parameters:

Table 5- 18 Overview of parameters for Change operating mode

Field/Button Explanation/instructions
Operating state STOP
STOP mode is selected.
• Technology objects inactive (enables deleted, no axis motion)
• User program is not executed
• Loading a user program is possible
• All system services are active (communication, etc.)
• All analog and digital outputs set to 0
STOP user program
STOPU mode is selected.
• Technology objects active
• Technology objects can execute jobs for testing and commissioning functions.
• Otherwise identical to STOP mode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 207
MCC commands
5.1 Basic commands

5.1.15.2 Relevant system functions for Change operating mode


System function of SIMOTION device: _changeOperationMode

5.1.15.3 Return value for Change operating mode


None.

5.1.16 Activate trace

This command enables you to log signal characteristics and axis status characteristics (see
Activate trace (Page 560)).

SIMOTION MCC Motion Control Chart


208 Programming and Operating Manual, 05/2009
MCC commands
5.1 Basic commands

5.1.17 Comment block

You can use the comment block to structure the MCC chart and insert a comment anywhere
within the program sequence. The size of the comment block is automatically adjusted to the
size of the comment text. The block is displayed larger than normal command blocks in the
chart.

Example with Comment block

Figure 5-15 Parameter screen form: Comment block

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 209
MCC commands
5.2 Task commands

5.2 Task commands

5.2.1 Start task

This command starts a MotionTask with initialization of data.

NOTICE
If the task is already active, it is stopped and restarted with data initialization.

The task to be started can be selected as follows:


● Using its name (as specified in the execution system)
In this form, the command can not be used in libraries.
● Using a variable of data type StructTaskId
This variable contains the TaskId that you obtained using the TaskID function.
In this form, the command can be used in libraries.

Figure 5-16 Parameter screen form: Start task

Note
This command may only be programmed for MotionTasks.

SIMOTION MCC Motion Control Chart


210 Programming and Operating Manual, 05/2009
MCC commands
5.2 Task commands

5.2.1.1 Call from the BackgroundTask


This command may be issued only once in the BackgroundTask. Otherwise, the selected
MotionTask would be started at the beginning every time the BackgroundTask was
executed.
To prevent this, you can query and evaluate the status of the MotionTask with the Task
status command (see Example of use of the Task status command).

5.2.1.2 Overview of parameters for Start task


You can set the following parameters:

Table 5- 19 Overview of parameters for Start task

Field/Button Explanation/instructions
Task Select the task to be started. You can select from:
• All MotionTasks (not in libraries)
• All variables of data type StructTaskID declared in the MCC source file or MCC chart

5.2.1.3 Relevant system functions for Start task


ST system functions:
● _restartTask (if task is selected by name)
● _restartTaskId (if task is selected by TaskId)

5.2.1.4 Return value for Start task


For ST system function _restartTaskId only:
The return value informs the user about the result of the command call (see description of
the _restartTaskId function in the SIMOTION ST Programming Manual).
Variable _MccRetDWORD with data type DWORD.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 211
MCC commands
5.2 Task commands

5.2.2 Interrupt task

The task is interrupted at its present position.


This command does not stop any axis motions that have already been started from this task.
Any active UserInterruptTask is stopped. If the condition for restarting this UserInterruptTask
is true, it is not started nor is the fulfillment of the condition stored.
The task can be resumed with the Continue task command.
The task to be interrupted can be selected as follows:
● Using its name (as specified in the execution system)
In this form, the command cannot be used in libraries.
● Using a variable of data type StructTaskId
This variable contains the TaskId that you obtained using the TaskId function.
In this form, the command can be used in libraries.

Figure 5-17 Parameter screen form: Interrupt task

Note
The command can be programmed for MotionTasks, UserInterruptTasks, and
TimerInterruptTasks.

SIMOTION MCC Motion Control Chart


212 Programming and Operating Manual, 05/2009
MCC commands
5.2 Task commands

5.2.2.1 Overview of parameters for Interrupt task


You can set the following parameters:

Table 5- 20 Overview of parameters for Interrupt task

Field/Button Explanation/instructions
Task Select the task to be interrupted. You can select from:
• All MotionTasks (not in libraries)
• UserInterruptTasks and TimerInterruptTasks configured on the device (not in libraries)
• All variables of data type StructTaskId declared in the MCC source file or MCC chart

5.2.2.2 Relevant system functions for Interrupt task


ST system functions:
● _suspendTask (if task is selected by name)
● _suspendTaskId (if task is selected by TaskId)

5.2.2.3 Return value for Interrupt task


For ST system function _suspendTaskId only:
The return value informs the user about the result of the command call (see description of
the _suspendTaskId function in the SIMOTION ST Programming Manual).
Variable _MccRetDWORD with data type DWORD.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 213
MCC commands
5.2 Task commands

5.2.3 Continue task

This command continues a task that was interrupted with the Interrupt task command at the
point it was interrupted.
Interrupted motions are not automatically continued. Resumption of interrupted motions must
be programmed explicitly.
The task to be continued can be selected as follows:
● Using its name (as specified in the execution system)
In this form, the command can not be used in libraries.
● Using a variable of data type StructTaskId
This variable contains the TaskId that you obtained using the TaskId function.
In this form, the command can be used in libraries.

Figure 5-18 Parameter screen form: Continue task

Note
The command can be programmed for MotionTasks, UserInterruptTasks, and
TimerInterruptTasks.

SIMOTION MCC Motion Control Chart


214 Programming and Operating Manual, 05/2009
MCC commands
5.2 Task commands

5.2.3.1 Overview of parameters for Continue task


You can set the following parameters:

Table 5- 21 Parameter screen form for Continue task

Field/Button Explanation/instructions
Task Select the task to be continued. You can select from:
• All MotionTasks (not in libraries)
• UserInterruptTasks and TimerInterruptTasks configured on the device (not in libraries)
• All variables of data type StructTaskID declared in the MCC source file or MCC chart

5.2.3.2 Relevant system functions for Continue task


ST system functions:
● _resumeTask (if task is selected by name)
● _resumeTaskId (if task is selected by TaskId)

5.2.3.3 Return value for Continue task


For ST system function _resumeTaskId only:
The return value informs the user about the result of the command call (see description of
the _resumeTaskId function in the SIMOTION ST Programming Manual).
Variable _MccRetDWORD with data type DWORD.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 215
MCC commands
5.2 Task commands

5.2.4 Reset task

This command stops a MotionTask. The task can be restarted with the Start task command
with data initialization.
The task to be reset can be selected as follows:
● Using its name (as specified in the execution system)
In this form, the command can not be used in libraries.
● Using a variable of data type StructTaskId
This variable contains the TaskId that you obtained using the TaskId function.
In this form, the command can be used in libraries.

NOTICE
The Reset task and Start task commands cannot follow each other in direct succession.
Instead, use only the Start task command.

Figure 5-19 Parameter screen form: Reset task

Note
This command may only be programmed for MotionTasks.

SIMOTION MCC Motion Control Chart


216 Programming and Operating Manual, 05/2009
MCC commands
5.2 Task commands

5.2.4.1 Overview of parameters for Reset task

Table 5- 22 Overview of parameters for Reset task

Field/Button Explanation/instructions
Task Select the task to be reset. You can select from:
• All MotionTasks (not in libraries)
• All variables of data type StructTaskID declared in the MCC source file or MCC chart

5.2.4.2 Relevant system functions for Reset task


ST system functions:
● _resetTask (if task is selected by name)
● _resetTaskId (if task is selected by TaskId)

5.2.4.3 Return value for Reset task


For ST system function _resetTaskId only:
The return value informs the user about the result of the command call (see description of
the _resetTaskId function in the SIMOTION ST Programming Manual).
Variable _MccRetDWORD with data type DWORD.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 217
MCC commands
5.2 Task commands

5.2.5 Task status

This command returns the status of a task.


The task can be selected as follows:
● Using its name (as specified in the execution system)
In this form, the command can not be used in libraries.
● Using a variable of data type StructTaskId
This variable contains the TaskId that you obtained using the TaskId function.
In this form, the command can be used in libraries.

Figure 5-20 Parameter screen form: Task status

Note
The command can be programmed for MotionTasks, UserInterruptTasks, and
TimerInterruptTasks.

SIMOTION MCC Motion Control Chart


218 Programming and Operating Manual, 05/2009
MCC commands
5.2 Task commands

5.2.5.1 Overview of parameters for Task status

Table 5- 23 Parameter screen form for Task status

Field/Button Explanation/instructions
Task Select the task whose current state is to be determined. You can select from:
• All MotionTasks (not in libraries)
• UserInterruptTasks and TimerInterruptTasks configured on the device (not in libraries)
• All variables of data type StructTaskID declared in the MCC source file or MCC chart
Return value Here, you enter the return variable of type DWORD in which the task status will be stored
as the command result (see description of the _getStateOfTaskId function in the
SIMOTION ST Programming Manual). This variable must be defined in a declaration table
or the symbol browser.

Example of use of Task status command


In the following example, the task status of a MotionTask is queried to decide whether it can
be started. The relevant bits of the return value are evaluated for this. If the result is positive,
the MotionTask is started.



① The return value of the Task status command is stored in local variable ret_dword with data
type DWORD. It indicates the status of MotionTask_1, which is then evaluated.
Figure 5-21 Example of a query whether a MotionTask can be started

5.2.5.2 Relevant system functions for Task status


ST system functions:
● _getStateOfTask (if task is selected by name)
● _getStateOfTaskId (if task is selected by TaskId)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 219
MCC commands
5.2 Task commands

5.2.6 Determine TaskId

This command generates a project-wide unique TaskId from the name of a task. This TaskId
is assigned to a variable of data type StructTaskId.
This function must not be used in libraries.

Figure 5-22 Parameter screen form: Determine TaskId

Note
The command can be programmed for MotionTasks, UserInterruptTasks, and
TimerInterruptTasks.

5.2.6.1 Overview of parameters for Determine TaskId


You can set the following parameters:

Table 5- 24 Overview of parameters for Determine TaskId

Field/Button Explanation/instructions
Task Select the name of the task whose project-wide unique TaskId is to be determined. You
can select from:
• All MotionTasks
• UserInterruptTasks and TimerInterruptTasks configured on the device
Return value Here, you enter the return variable of type StructTaskId in which the TaskId will be stored.
This variable must be defined in a declaration table or the symbol browser.

5.2.6.2 Relevant system functions for Determine TaskId


ST system functions: _getTaskId.

SIMOTION MCC Motion Control Chart


220 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3 Program structures

5.3.1 IF: Program branching

A specified condition causes the program flow to branch to the TRUE branch or FALSE
branch.
The program flow branches as follows:
● Condition is fulfilled: Execution continues down the TRUE path.
● Condition is not fulfilled: Execution continues down the FALSE path.


 

① Depending on the "flag" variables, either the linear axis or the rotatory axis are started.
② Condition is not fulfilled.
③ Condition is fulfilled.
Figure 5-23 Example of a branch (IF) in a flowchart

Note
The condition is programmed in the ladder diagram (LAD), function block diagram (FBD), or
Formula languages.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 221
MCC commands
5.3 Program structures

5.3.1.1 Note on inserting the IF statement


The IF statement is normally inserted after the selected command. The two branches are
empty.
If two or more commands are selected, the IF statement is inserted before the selected
commands. The selected commands are automatically shifted to the TRUE branch; see
figure below.

6HOHFWHGFRPPDQGV

:KHQWKH,)VWDWHPHQWLVLQVHUWHGWKHSUHYLRXVO\
VHOHFWHGFRPPDQGVDUHVKLIWHGWRWKH758(EUDQFK

Figure 5-24 Inserting the IF statement when several commands are selected

5.3.1.2 Note on deleting/cutting or copying an IF statement


When you delete, cut, or copy an IF statement, the commands assigned in the branches are
also deleted or copied.
If the commands within the control structure are not to be deleted or cut when the structure is
deleted or cut, you must copy them first and repaste them outside the control structure.

5.3.1.3 Relevant commands of the ST (Structured Text) programming language for IF: Program
branching
IF / ELSE / END_IF

SIMOTION MCC Motion Control Chart


222 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3.2 WHILE: Loop with condition at the start

Commands programmed within the loop are executed as long as the loop condition is
fulfilled.
The condition is at the start of the loop.
When the WHILE command is reached, program flow branches as follows:
● Condition is fulfilled: Program runs through loop.
● Condition is not fulfilled: Program continues.

Example of WHILE loop with condition at start

 

① Condition is fulfilled ② Condition is not fulfilled


Figure 5-25 Example of repetition with query at beginning (WHILE) in the flowchart

Note
The condition is programmed in the ladder diagram (LAD), function block diagram (FBD), or
Formula languages.
Refer to the notes regarding pasting, deleting, cutting, or copying of the IF
statement; they apply analogously.

5.3.2.1 Relevant commands of the ST (Structured Text) programming language for WHILE: Loop
with condition at the start
WHILE /END_WHILE

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 223
MCC commands
5.3 Program structures

5.3.3 FOR: Loop with fixed number of runs

The FOR loop repeats a program section for a fixed number of runs. Once the loop has been
run the specified number of times, the program continues.

Figure 5-26 Parameter screen form: FOR statement

5.3.3.1 Overview of parameters for FOR: Loop with fixed number of runs
You can set the following parameters:

Table 5- 25 Overview of parameters for FOR loop with fixed number of runs

Field/Button Explanation/instructions
Variable Enter the count variable for the FOR loop here.
The variable must be of type INT. The variable name can be entered or moved from the
symbol browser using a drag-and-drop operation.
Start Enter the initial value of the count variable here. The count variable is set to the specified
value at the first pass of the loop start. The initial value can be directly entered as a value
or, alternatively, as a formula. Variables can be used. The expression is of type INT.
End Enter the final value of the count variable here. The loop is executed repeatedly until the
count variable exceeds the specified final value. The value can be directly entered as a
value or, alternatively, as a formula. Variables can be used. The expression is of type INT.
Increment Enter the increment here: The count variable is increased by the entered increment each
time the loop is run. The value can be directly entered as a constant or, alternatively, as a
formula. Variables can be used. The expression is of type INT.

SIMOTION MCC Motion Control Chart


224 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

Example of a FOR loop in a program

Figure 5-27 Example of a FOR loop in a program

Note
Refer to the notes regarding pasting, deleting, cutting, or copying of the IF statement; they
apply analogously.

Example of a FOR statement


The program loop is to be executed 10 times. The variable must be defined and be of data
type INT.
The parameter screen form is configured as shown in the figure below.

Figure 5-28 Example of a FOR statement

5.3.3.2 Relevant commands of the ST (Structured Text) programming language for FOR: Loop
with fixed number of runs
FOR / END_FOR

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 225
MCC commands
5.3 Program structures

5.3.4 UNTIL: Loop with condition at the end

The commands programmed within the loop are executed until the loop condition is fulfilled.
The condition is programmed at the end of the loop. For this reason, the commands in the
loop are executed at least once.
When the UNTIL command is reached, program flow branches as follows:
● Condition is not fulfilled: Program runs through loop.
● Condition is fulfilled: Program continues.

Example of UNTIL loop with condition at end

 

① Condition is not fulfilled ② Condition is fulfilled


Figure 5-29 Example of repetition with query at the end (UNTIL) in the flowchart

Note
The condition is programmed in the ladder diagram (LAD), function block diagram (FBD), or
Formula languages.
Refer to the notes regarding pasting, deleting, cutting, or copying of the IF statement; they
apply analogously.

5.3.4.1 Relevant commands of the ST (Structured Text) programming language for UNTIL: Loop
with condition at the end
REPEAT / UNTIL / END_REPEAT

SIMOTION MCC Motion Control Chart


226 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3.5 CASE: Multiple branching

Depending on the value of a variable, several alternative program branches may be


executed. The following variable data types are permitted:
● General data type ANY_INT
● Any enumeration data type

Example of CASE Multiple branching

 

① Comparison value corresponds to one of the programmed constants


② Comparison value does not correspond to any of the programmed constants
Figure 5-30 Description of the variable and ELSE branches

5.3.5.1 Inserting a branch in the CASE statement


After insertion of this command, there are two program branches. To insert additional
branches, proceed as follows:
● To insert a branch in the first position (left):
Select the command, and select Insert branch from the context menu.
● To insert additional branches:
Select the branch, and select Insert branch from the context menu.
The branch is inserted on the right next to the selected branch.

5.3.5.2 Deleting a branch from the CASE statement


To delete a branch, proceed as follows:
1. Delete all commands from the branch.
2. Select the branch.
3. Select Delete empty branch from the context menu.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 227
MCC commands
5.3 Program structures

5.3.5.3 Comparison constant in the CASE statement


Overwrite the default ??? in every branch with a constant of the same data type as the
variable. A value range can also be specified, for example, 1,2,3 or 4 to 10.
It is not possible to overwrite the preassigned value in an ELSE branch.

5.3.5.4 Overview of parameters for CASE: Multiple branching


You can set the following parameters:

Table 5- 26 Overview of parameters for CASE multiple branching

Field/Button Explanation/instructions
Variable Enter a variable of the following data types:
• General data type ANY_INT
• Any enumeration data type
The variable name can be entered or moved from the symbol browser using a drag-and-
drop operation.
The CASE branch whose label is consistent with the variable content is executed. If the
content of the variable does not match any of the constants or constant ranges, then the
ELSE branch is executed.

Note
Refer to the notes regarding pasting, deleting, cutting, or copying of the IF statement; they
apply analogously.

5.3.5.5 Relevant commands of the ST (Structured Text) programming language for CASE:
Multiple branching
CASE / ELSE / END_CASE

SIMOTION MCC Motion Control Chart


228 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3.6 Go to

You can program jumps within an MCC chart using the Go to command. A jump is defined
as a jump label (Go to command) and a jump destination (Selection command), each with
the same name. A circle symbol with a name marks the exit and entry point in each case.
Several exit points with the same name can be programmed, but only one entry point.
The following jumps are illegal:
● Jumps to control structures
● Jumps out of the shaded area after a Wait command
After you have inserted a Go to command, you must enter the name of the jump destination.
For this, double-click inside the circle.

Figure 5-31 Parameter screen form: Go to

5.3.6.1 Overview of parameters for Go to


You can set the following parameters:

Table 5- 27 Overview of parameters for Go to

Field/Button Explanation/instructions
Jump destination ID Enter the name of the jump destination. The name is made up of the following:
• The first character is a letter or underscore symbol
• The remaining characters are letters, underscore symbols, or digits
It is irrelevant whether the letters are upper or lower case. The name must be identical to
the newly assigned name for the jump label – see Selection (Page 230) command.

5.3.6.2 Relevant commands of the ST (Structured Text) programming language for Go to:
GOTO

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 229
MCC commands
5.3 Program structures

5.3.7 Selection

This command is used to identify the entry point for the Go To command. A jump is defined
as a jump label (Go to command) and a jump destination (Selection command), each with
the same name. A circle symbol with a name marks the exit and entry point in each case.
Several exit points with the same name can be programmed, but only one entry point.
The following jumps are illegal:
● Jumps to control structures
● Jumps out of the shaded area after a Wait command
After you have inserted the Selection command, you must enter the name of the jump label.
For this, double-click inside the circle.

Figure 5-32 Parameter screen form: Selection (jump label)

5.3.7.1 Overview of parameters for Selection


You can set the following parameters:

Table 5- 28 Overview of parameters for Selection

Field/Button Explanation/instructions
Jump mark ID Enter the name of the jump label. The name is made up of the following:
• The first character is a letter or underscore symbol
• The remaining characters are letters, underscore symbols, or digits
It is irrelevant whether the letters are upper or lower case. The name must be identical to
the newly assigned name for the jump destination – see Go to (Page 229) command.

5.3.7.2 Relevant commands of the ST (Structured Text) programming language for Selection:
Definition of a jump label

SIMOTION MCC Motion Control Chart


230 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3.8 Return

This command causes the MCC chart (program, function, function block) to end.
When a function or a function block is ended, program execution continues in the higher-
level MCC chart (or program organization unit) after the position where the function or
function block was called.

Example of Return



① The variable assignment is executed after the regular end of the FOR loop, but not after the
execution of the Return command.
Figure 5-33 Example of Return

5.3.8.1 Relevant commands of the ST (Structured Text) programming language for Return:
RETURN

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 231
MCC commands
5.3 Program structures

5.3.9 Exit

This command is permitted in the following program structures (loops):


● WHILE loop with condition at start
● FOR loop with fixed number of runs
● UNTIL loop with condition at end
It enables the loop to be exited at any location regardless of whether or not the abort
condition is satisfied.
The program is continued at the end of the loop.

Example of Exit



① The variable assignment is executed after the execution of the Exit command and the regular
end of the FOR loop.
Figure 5-34 Example of Exit

5.3.9.1 Relevant commands of the ST (Structured Text) programming language for Exit:
EXIT

SIMOTION MCC Motion Control Chart


232 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3.10 Synchronous start

You can use this command to start several commands simultaneously. The permissible
commands are listed in Permissible commands.
The next command is started once all the commands in the branches have been executed
and ended. In addition, details of when a command is ended are entered in Permissible
commands.
To check the correct completion of the synchronous start, you can query whether the
commands, which were started synchronously, have been completed without error via the
group variable _MccRetSyncStart. The group variable is set to not equal to 0 when a
command within the synchronous start had a return value not equal to 0 (see SIMOTION
Basic Functions function manual).
The following MCC sample program shows a synchronous start with two axes and
subsequent query of the group variable _MccRetSyncStart. This is not equal to 0 when a
command within the synchronous start had a return value not equal to 0.
There is no limit to the number of commands started simultaneously nor to the number of
synchronous starts within an MCC chart.
This command should only be used in MotionTasks.

NOTICE
When you use the Synchronous Start command, you must generate the
UserInterruptTask_1 since this is called in the event of an error. You can program an error
response in this task.
The task controller is temporarily shut down during the synchronous start. It is not restarted
until the following conditions are met:
• All single-axis commands and synchronous operation and cam commands in the
branches have been started
• All basic commands in the branches have been completed
Start interruptions by other tasks (except SynchronousTasks) are thus prevented. This can
cause a timeout to occur in cyclic tasks (BackgroundTask, TimerInterruptTasks). This error
can be detected and caught by programming the TimeFaultBackgroundTask or
TimeFaultTask appropriately.
For information about execution levels and tasks, see Execution levels and tasks in
SIMOTION in the SIMOTION ST Programming Manual.

Example: Synchronous start of three commands

Figure 5-35 Synchronous start of three commands

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 233
MCC commands
5.3 Program structures

5.3.10.1 Programming a condition


You can program a condition for the synchronous start. TRUE is the default setting when the
command is called. This causes immediate synchronous start.
Programming a condition corresponds to the Wait for condition command. Consequently,
you must note the following:
The condition can be composed of:
● Unit variables of the same MCC source file or imported program source files
● Global device variables
● Constants
● I/O variables and process image accesses (inputs)
● Operators
The expression may not contain:
● Function calls
● Local variables
● Loops

Note
The condition is programmed in the ladder diagram (LAD), function block diagram (FBD),
or Formula languages.

5.3.10.2 Checkbox
If you select the Start command if condition is fulfilled check box, the commands in the
branches are not executed until the programmed condition is satisfied.

SIMOTION MCC Motion Control Chart


234 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

5.3.10.3 Insert branch


After insertion of this command, there are two program branches. To insert additional
branches, proceed as follows:
● To insert a branch in the first position (left):
Select the command, and select Insert branch from the context menu.
● To insert additional branches:
Select the branch and select Insert branch from the context menu.
The branch is inserted to the right of the selected branch.

5.3.10.4 Deleting a branch


To delete a branch, proceed as follows:
1. Delete all commands from the branch.
2. Select the branch.
3. Select Delete empty branch from the context menu.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 235
MCC commands
5.3 Program structures

5.3.10.5 Permissible commands


The following table lists the commands permitted for the synchronous start.

NOTICE
In the case of single axis commands and synchronous operation and cam commands, the
synchronous start can only be guaranteed if the following two conditions are satisfied:
The commands embedded in the synchronous start must act on different axes.
The axes involved must be on the same ExecutionLevel (IPO or IPO_2).

The following table shows the permissible commands for a synchronous start with
specification of timing for proper completion of commands; timing depends on whether an
additional command is present on the relevant axis.

Table 5- 29 Permissible commands for a synchronous start with specification of timing for proper completion of
commands; timing depends on whether an additional command is present on the relevant axis

Permissible command Timing for proper completion of command


Another command is present No other command is present
Basic commands
Subroutine call - -
Set output - -
Reset output - -
Variable assignment - -
Single axis commands
Homed axis Motion is finished Motion is finished
Start axis position-controlled • With time specification: • With time specification:
End of setpoint interpolation Motion is finished
• Without time specification: • Without time specification:
Infinite Infinite
Speed preset • With time specification: • With time specification:
End of setpoint interpolation Standstill signal of axis
• Without time specification: • Without time specification:
Infinite Infinite
Position axis End of setpoint interpolation Motion is finished
Time-dependent position profile End of setpoint interpolation Motion is finished
Time-dependent velocity profile End of setpoint interpolation • Speed-controlled (axis:
Standstill signal of axis
• Positioning axis or synchronous
axis:
Motion is finished
Stop axis End of setpoint interpolation • Speed-controlled (axis:
Standstill signal of axis
• Positioning axis or synchronous
axis:
Motion is finished

SIMOTION MCC Motion Control Chart


236 Programming and Operating Manual, 05/2009
MCC commands
5.3 Program structures

Permissible command Timing for proper completion of command


Another command is present No other command is present
Commands for synchronous operation and camming
Gearing on Infinite Infinite
Gearing off End of setpoint interpolation End of setpoint interpolation
Cam on • Cyclic cam • Cyclic cam
Infinite Infinite
• Non-cyclic cam • Non-cyclic cam
End of setpoint interpolation End of setpoint interpolation
Cam off End of setpoint interpolation End of setpoint interpolation

5.3.10.6 Transition behavior


All single axis commands and commands for synchronous operation and camming
embedded in the synchronous start are programmed with the Substitute transition behavior.
For the following commands, the Superimpose transition behavior can also be selected:
● Start axis position-controlled
● Speed preset
● Position axis
● Time-dependent position profile
● Time-dependent velocity profile

5.3.10.7 Step enabling condition


For each single axis command or command for synchronous operation and camming
embedded in the synchronous start, the Delay program execution check box is selected. The
user cannot change this setting. This indicates that once the synchronous start is executed,
the MotionTask is placed into the waiting state until the last command enclosed within the
synchronous start has been completed or aborted.
The timing for proper completion of a command depends on whether another axis command
is pending, and is indicated in the table above in the Permissible commands section.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 237
MCC commands
5.3 Program structures

5.3.10.8 Deleting/cutting or copying


When you delete, cut, or copy the synchronous start command, any commands programmed
in the branches are also deleted or copied.

5.3.10.9 Relevant system functions and commands of the ST (Structured Text) programming
language for synchronous start
System functions of SIMOTION devices:
● BEGIN_SYNC / END_SYNC
● _disableScheduler / _enableScheduler
● _startSyncCommands
ST system function:
● _getSyncCommandId
● _waitTime
ST commands:
● EXPRESSION / END_EXPRESSION for formulation of the wait condition
● WAITFORCONDITION / END_WAITFORCONDITION

SIMOTION MCC Motion Control Chart


238 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4 Communication

5.4.1 Acknowledge technology object alarms

This command acknowledges the pending technology alarms on one or more technology
objects.

Figure 5-36 Parameter screen form: Acknowledge technology object alarms

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 239
MCC commands
5.4 Communication

5.4.1.1 Overview of parameters for Acknowledge technology object alarms

Table 5- 30 Overview of parameters for Acknowledge technology object alarms

Field/Button Explanation/instructions
Parameters tab See Overview of parameters for Acknowledge TO alarms - Parameter tab (Page 240)
Expert tab See Overview of parameters for Acknowledge TO alarms - Expert tab (Page 240)

5.4.1.2 Overview of parameters for Acknowledge technology object alarms - Parameters tab

Table 5- 31 Overview of parameters for Acknowledge technology object alarms - Parameters tab

Field/Button Explanation/instructions
Technology object Here, you select the technology objects (axes, cams, etc.) whose alarms are to be
acknowledged. You can select several objects simultaneously. The following are
available:
• All objects that are defined on the device
• All variables with data types of technology objects declared in the MCC source file or
MCC chart (see Technology object data types table).
Acknowledge all alarms Select this check box if all alarms queued on the device are to be acknowledged.

5.4.1.3 Overview of parameters for Acknowledge technology object alarms - Expert tab

Table 5- 32 Overview of parameters for Acknowledge technology object alarms - Expert tab

Field/Button Explanation/instructions
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
DINT data type.
• When the Acknowledge all alarms check box is selected: The return value is always 0.
• When the Acknowledge all alarms check box is cleared: For a description, see Return
value for system functions of the Cam technology package.

SIMOTION MCC Motion Control Chart


240 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.1.4 Relevant system functions for Acknowledge technology object alarms


When the Acknowledge all alarms check box is active:
● System function of SIMOTION devices
– _resetTechnologicalErrors for resetting all objects
When the Acknowledge all alarms check box is cleared:
● Cam technology package:
– _resetAxisError for speed-controlled axes, positioning axes, synchronous axes, and
path axes
– _resetCamError for cams
– _resetCamTrackError for output cam tracks
– _resetExternalEncoderError for external encoders
– _resetFollowingObjectError for synchronous (following) objects
– _resetMeasuringInputError for measuring inputs
– _resetOutputCamError for output cams
● Path technology package:
– _resetPathObjectError for path objects
● Technology package Cam_EXT:
– _resetAdditionObjectError for addition objects
– _resetControllerObjectError for controller objects
– _resetFixedGearError for fixed gear
– _resetFormulaObjectError for formula objects
– _resetSensorError for sensor objects
● TControl technology package:
– _resetTControllerError for temperature channels
Each with parameter errorResetMode = ALL_ERRORS (default)
See also the Acknowledge all alarms field/button in the Overview of parameters for
Acknowledge technology object alarms section.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 241
MCC commands
5.4 Communication

5.4.2 Acknowledge specific technology object alarm

The command acknowledges all alarms or a specific alarm at a technology object.

Figure 5-37 Parameter screen form: Acknowledge specific technology object alarm

5.4.2.1 Overview of parameters for Acknowledge specific technology object alarm


You can set the following parameters:

Table 5- 33 Overview of parameters for Acknowledge specific technology object alarm

Field/Button Explanation/instructions
Technology object Here, you select the technology objects (axes, cams, etc.) whose alarms are to be
acknowledged. You can select several objects simultaneously. The following are
available:
• All objects that are defined on the device
• All variables with data types of technology objects declared in the MCC source file or
MCC chart (see Technology object data types table).
Parameters tab See Overview of parameters for Acknowledge specific TO alarm - Parameter tab
(Page 243)
Expert tab See Overview of parameters for Acknowledge specific TO alarm - Expert tab (Page 243)

SIMOTION MCC Motion Control Chart


242 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.2.2 Overview of parameters for Acknowledge specific technology object alarm - Parameters
tab

Table 5- 34 Overview of parameters for Acknowledge specific technology object alarm - Parameters tab

Field/Button Explanation/instructions
Method of operation Select which alarms on the technology object are to be acknowledged:
Acknowledge all alarms
All alarms on the technology object are acknowledged.
Acknowledge a specific alarm
The alarm specified in the "Alarm No." or "Alarm text" field is acknowledged.
Alarm number Enter the alarm number.
The corresponding text is displayed in the alarm text field.
Alarm text Select the alarm text.
The corresponding number of the alarm is displayed in the alarm number field.

5.4.2.3 Overview of parameters for Acknowledge specific technology object alarm - Expert tab

Table 5- 35 Overview of parameters for Acknowledge specific technology object alarm - Expert tab

Field/Button Explanation/instructions
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the Cam
technology package.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 243
MCC commands
5.4 Communication

5.4.2.4 Relevant system functions for Acknowledge specific technology object alarm
Cam technology package:
● _resetAxisError for speed-controlled axes, positioning axes, synchronous axes, and path
axes
● _resetCamError for cams
● _resetCamTrackError for output cam tracks
● _resetExternalEncoderError for external encoders
● _resetFollowingObjectError for synchronous (following) objects
● _resetMeasuringInputError for measuring inputs
● _resetOutputCamError for output cams
Path technology package:
● _resetPathObjectError for path objects
Technology package Cam_EXT:
● _resetAdditionObjectError for addition objects
● _resetControllerObjectError for controller objects
● _resetFixedGearError for fixed gear
● _resetFormulaObjectError for formula objects
● _resetSensorError for sensor objects
TControl technology package:
● _resetTControllerError for temperature channels
Each with parameter errorResetMode = SPECIFIC_ERROR

SIMOTION MCC Motion Control Chart


244 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.3 Incoming message

This command notifies configured nodes that a message has arrived. Messages are
configured beforehand during message configuration (Project > Messages > Configure menu
command). The message is sent to all of the configured nodes.
See the online help for information about message configuration.
If the specified message is already pending, then there is no change. The message is not
reset.

Figure 5-38 Parameter screen form: Incoming message

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 245
MCC commands
5.4 Communication

5.4.3.1 Overview of parameters for Incoming message


You can set the following parameters:

Table 5- 36 Overview of parameters for Incoming message

Field/Button Explanation/instructions
Alarm Here, you select one of the configured messages. To configure new messages, select
Program -> Configure messages in the project navigator.
Parameters tab See Overview of parameters for Incoming message - Parameter tab (Page 246)
Expert tab See Overview of parameters for Incoming message - Expert tab (Page 246)

5.4.3.2 Overview of parameters for Incoming message - Parameters tab

Table 5- 37 Overview of parameters for Incoming message - Parameters tab

Field/Button Explanation/instructions
Auxiliary value Enter an auxiliary value for the message. Integer numbers, numbers with decimal points,
and positive and negative values are permitted. Variables of type ANY_NUM or ANY_BIT
can also be specified. Although any of the specified data types may be programmed in
theory for the auxiliary value, they must match the type configured for the message.
Acknowledgment Here, you select whether the message can be acknowledged.
Acknowledgeable message (default value)
Acknowledgeable message: When the message arrives, the user must acknowledge it on
the operator panel.
Message not acknowledgeable
Message not acknowledgeable: The message is visible until the program has issued an
outgoing message.

5.4.3.3 Overview of parameters for Incoming message - Expert tab

Table 5- 38 Overview of parameters for Incoming message - Expert tab

Field/Button Explanation/instructions
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DWORD; for a description, see _alarmSId and _alarmSqId functions in the
SIMOTION ST Programming Manual.

SIMOTION MCC Motion Control Chart


246 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.3.4 Relevant system functions for Incoming message


ST system function:
● SIMOTION kernel V3.1 and higher:
– _alarmSId (for non-acknowledgeable message)
– _alarmSqId (for acknowledgeable message)
● Up to SIMOTION kernel V3.0:
– _alarmS (for non-acknowledgeable message)
– _alarmSq (for acknowledgeable message)
each with parameter sig:= TRUE

5.4.4 Outgoing message

This command notifies configured stations that a message is no longer pending. The
message itself is created in the message configuration (Project > Messages > Configure
menu command). Acknowledgeable messages can then be acknowledged on the OP.
See the online help for information about message configuration.

Figure 5-39 Parameter screen form: Outgoing message

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 247
MCC commands
5.4 Communication

5.4.4.1 Overview of parameters for Outgoing message


You can set the following parameters:

Table 5- 39 Overview of parameters for Outgoing message

Field/Button Explanation/instructions
Alarm Here, you select one of the configured messages. To configure new messages, select
Program -> Configure messages in the project navigator.
Parameters tab See Overview of parameters for Outgoing message - Parameter tab (Page 248)
Expert tab See Overview of parameters for Outgoing message - Expert tab (Page 248)

5.4.4.2 Overview of parameters for Outgoing message - Parameters tab

Table 5- 40 Overview of parameters for Outgoing message - Parameters tab

Field/Button Explanation/instructions
Auxiliary value Enter an auxiliary value for the message. Integer numbers, numbers with decimal points,
and positive and negative values are permitted. Variables of type ANY_NUM or ANY_BIT
can also be specified. Although any of the specified data types may be programmed in
theory for the auxiliary value, they must match the type configured for the message.
Acknowledgment Here, you select whether the message can be acknowledged.
Acknowledgeable message (default value)
Acknowledgeable message: If the message has been sent, the user must acknowledge it
on the OP.
Message not acknowledgeable
Message not acknowledgeable: The message is visible until the program has issued an
outgoing message.

5.4.4.3 Overview of parameters for Outgoing message - Expert tab

Table 5- 41 Overview of parameters for Outgoing message - Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in the Overview of parameters for Expert tab table.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DWORD; for a description, see _alarmSId and _alarmSqId functions in the
SIMOTION ST Programming Manual.

SIMOTION MCC Motion Control Chart


248 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.4.4 Relevant system functions for Outgoing message


ST system function:
● SIMOTION kernel V3.1 and higher:
– _alarmSId (for non-acknowledgeable message)
– _alarmSqId (for acknowledgeable message)
● Up to SIMOTION kernel V3.0:
– _alarmS (for non-acknowledgeable message)
– _alarmSq (for acknowledgeable message)
each with parameter sig:= FALSE

5.4.5 Establish connection using TCP/IP

Before you can use the TCP/P protocol of the Send data or Receive data commands, you
must establish the TCP/IP connection for both communication partners:
1. You specify one communications partner as the server.
After the call, the command waits for a connection request at the specified port.
2. You specify the other communications partner as the client and specify the server it is to
access.
After the command is called, a connection to the server addressed by the IP address and
port number is established.
The connection is maintained until it is terminated by the Remove connection using TCP/IP
command.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 249
MCC commands
5.4 Communication

Figure 5-40 Parameter screen form: Establish connection using TCP/IP

SIMOTION MCC Motion Control Chart


250 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.5.1 Overview of parameters for Establish connection using TCP/IP


You can set the following parameters:

Table 5- 42 Overview of parameters for Establish connection using TCP/IP

Field/Button Explanation/instructions
Page Select whether the SIMOTION device is to act as a server or client in the TCP/IP
connection.
The parameter dialog box changes according to the selected value.
Server
The SIMOTION device acts as a server in the TCP/IP connection.
Client
The SIMOTION device acts as a client in the TCP/IP connection.
Parameters for
Page = Server See Overview of parameters for Establish connection using TCP/IP - Parameters for
server
Page = Server See Overview of parameters for Establish connection using TCP/IP - Parameters for client
Delay program execution Select the check box if execution of the subsequent command is to wait until this
command is finished. If the check box is not selected, the next command is executed
immediately.

Table 5- 43 Overview of parameters for Establish connection using TCP/IP - Parameters for server

Field/Button Explanation/instructions
Port number Here, you enter the number of the port where the command waits for a connection
request.
Max. number of parallel Here, you enter the maximum number of parallel connection requests.
connection requests
Return variable Here, you enter the return variable of data type StructRetTcpOpenServer in which the
error message and connection parameters are stored. This variable must be defined in a
declaration table or the symbol browser.
Variable for new connection ID Here, you enter a variable of data type DINT. It contains the new connection ID.
The value is identical with the connection Id component of the return variable.

Table 5- 44 Overview of parameters for Establish connection using TCP/IP - Parameters for client

Field/Button Explanation/instructions
Port number Here, you enter the port number of the client.
IP address of server Here, you enter the IP address of the server.
Port number of the server Here, you enter the port number of the server.
Return variable Here, you enter the return variable of data type StructRetTcpOpenClient in which the error
message and connection parameters are stored. This variable must be defined in a
declaration table or the symbol browser.
Variable for new connection ID Here, you enter a variable of data type DINT. It contains the new connection ID.
The value is identical with the connection Id component of the return variable.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 251
MCC commands
5.4 Communication

5.4.5.2 Relevant system functions for Establish connection using TCP/IP


System function of SIMOTION devices:
● _tcpOpenServer, if Page = Server is selected.
● _tcpOpenClient, if Page = Client is selected.

5.4.5.3 Return value for Establish connection using TCP/IP


The return value informs the user about the result of the command call and contains
important connection parameters.
You must declare the return variable as a variable of the following data types in a declaration
table or the symbol browser and specify it when assigning the command parameters.
● StructRetTcpOpenServer, if Page = Server is selected.
● StructRetTcpOpenClient, if Page = Client is selected.
The following table lists the meaning of the individual elements of these data types.

Table 5- 45 Structure of the return value (TYPE StructRetTcpOpenServer)

Parameter (data type) Meaning/values Values


functionResult Error code < 16#8000: if command execution is
(DINT) okay
>= 16#8000: if an error has occurred
See description for _tcpOpenServer
command in the list manuals for the
SIMOTION devices.
connectionId New connection ID
(DINT)
clientAddress IP address of the connecting client
(ARRAY [0..3] OF USINT)
clientPort Port number of the connecting client
(UINT)

Table 5- 46 Structure of the return value (TYPE StructRetTcpOpenClient)

Parameter (data type) Meaning/values Values


functionResult Error code < 16#8000: if command execution is
(DINT) okay
>= 16#8000: if an error has occurred
See description for _tcpOpenClient
command in the list manuals for the
SIMOTION devices.
connectionId New connection ID
(DINT)

SIMOTION MCC Motion Control Chart


252 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.6 Remove connection using TCP/IP

This command is used to cancel a TCP/IP connection.

Figure 5-41 Parameter screen form: Remove connection using TCP/IP

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 253
MCC commands
5.4 Communication

5.4.6.1 Overview of parameters for Remove connection using TCP/IP


You can set the following parameters:

Table 5- 47 Overview of parameters for Remove connection using TCP/IP

Field/Button Explanation/Instructions
Page Select whether you want to cancel an existing server connection or client connection.
The parameter dialog box changes according to the selected value.
Server
A server connection is canceled.
Client
A client connection is canceled.
Port number Only when Page = Server is selected.
Here, you enter the number of the port where the command waits for a connection
request.
Connection ID: Only when Page = Client is selected.
Here, you enter a variable of data type DINT that contains the connection ID of the
connection to be canceled.
Return variable Enter the return variable from data type DINT in which the error message will be stored.
This variable must be defined in a declaration table or the symbol browser.
< 16#8000: if command execution is okay
>= 16#8000: if an error has occurred
See description for _tcpCloseServer and _tcpCloseConnection functions in the Parameter
Manuals for the SIMOTION devices.
Delay program execution Select the check box if execution of the subsequent command should be delayed until this
command is finished. If the check box is not selected, the next command is executed
immediately.

5.4.6.2 Relevant system functions for Remove connection using TCP/IP


System function of SIMOTION devices:
_tcpCloseServer, if Page = Server is selected.
_tcpCloseConnection, if Page = Client is selected.

SIMOTION MCC Motion Control Chart


254 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.7 Send data

This command sends data to a communications partner (such as a SIMATIC S7 station)


using various protocols.
● XSend/XReceive protocol
The connection to the communications partner is established via PROFIBUS or MPI and
does not have to be configured.
SIMOTION devices can send a maximum of 200 bytes in one unit; the actual user data
length is dependent on the communications partner.
● UDP protocol
The connection is established via Ethernet with the UDP protocol.
SIMOTION devices can send a maximum of 1470 bytes in one unit; the actual user data
length is dependent on the communications partner.
● TCP/IP protocol
The connection is established via Ethernet with the TCP/IP protocol. You must have
configured the TCP/IP connection beforehand. Use the Establish connection using
TCP/IP command.
SIMOTION devices can send a maximum of 4,096 bytes in one unit; the actual user data
length is dependent on the communications partner.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 255
MCC commands
5.4 Communication

Figure 5-42 Parameter screen form: Send data

SIMOTION MCC Motion Control Chart


256 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.7.1 Overview of parameters for Send data


You can set the following parameters:

Table 5- 48 Overview of parameters for Send data

Field/Button Explanation/instructions
Log You can choose between the different protocols here. The parameter dialog box changes,
accordingly.
XSend/XReceive
The connection is established via PROFIBUS or MPI.
UDP
The connection is established via Ethernet, and the UDP protocol is selected.
TCP/IP
The TCP/IP protocol is selected. You must have configured the TCP/IP connection
beforehand. Use the Establish connection using TCP/IP command.
Parameter tab • For Protocol = XSend/XReceive
See Table Overview of parameters for Send data - Parameter tab (Page 258) for
Protocol = Xsend/XReceive
• For Protocol = UDP
See Table Overview of parameters for Send data - Parameter tab (Page 258) for
Protocol = UDP
• For Protocol = TCP/IP
See Table Overview of parameters for Send data - Parameter tab (Page 258) for
Protocol = TCP/IP
Expert tab see Overview of parameters for Send data - Expert tab (Page 259) Overview of
parameters for Send data - Expert tab
Delay program execution Only when Protocol = Xsend/XReceive or Protocol = TCP/IP is selected.
• Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.
If Protocol = UDP is selected, the next command is immediately processed.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 257
MCC commands
5.4 Communication

5.4.7.2 Overview of parameters for Send data - Parameters tab

Table 5- 49 Overview of parameters for Send data - Parameters tab for Protocol = Xsend/XReceive

Field/Button Explanation/Instruction
Job identifier Enter the job identifier here. The data type is UDINT.
Return variable Enter the return variable of data type DINT in which the error message will be stored. This
variable must be defined in a declaration table or the symbol browser.
< 16#8000: if command execution is okay
>= 16#8000: if an error has occurred
See description for _Xsend function in the list manuals for the SIMOTION devices.
Communications partner Here, you select the communications partner to which you wish to send data.
Specify address directly
This setting enables you to enter the communications partner's address directly. Use this
selection if the communications partner is not defined in the project (for example,
SIMATIC S7 stations).
Select device from hardware configuration (default value)
This setting enables you to select a SIMOTION device from the current hardware
configuration.
This setting can not be used in libraries.
Device This selection is only active if Select device from hardware configuration is selected in the
"Communications partner" selection field.
Here, you select the receiving device.
You can choose from all SIMOTION devices that can be reached directly by means of a
PROFIBUS or MPI subnet.
Connection of transmitting This selection is only active if Select device from hardware configuration is selected in the
CPU "Communications partner" selection field.
Here, you select the connection of the transmitting SIMOTION device.
Once the receiving device (communications partner) is selected, the PROFIBUS or MPI
connection of the transmitting SIMOTION device is offered.
Destination address of This selection is active only if Specify address directly is active in the "Communications
communications partner partner" list.
Here, you enter the name of the variable in which the destination address of the
communications partner is stored. You define the variable in a declaration table as
StructXSendDestAddr (Xsend/Xreceive protocol).
Continue connection Here, decide whether the connection should remain after data transfer. Select
"Disconnecting" if the device in question is communicating with a large number of nodes.
Disconnecting (default value)
The connection is discontinued after the data transmission.
Connection remains active
The connection remains active after the data transmission.
Data Enter the communication data here. You can enter up to 200 values. The data type must
be BYTE; furthermore, variables of type BYTE can be entered.

SIMOTION MCC Motion Control Chart


258 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

Table 5- 50 Overview of parameters for Send data - Parameters tab for Protocol = UDP

Field/Button Explanation/Instruction
Port number of sender Here, you enter the port number of the transmitting SIMOTION device.
IP address of receiver Here, you enter the IP address of the receiver.
Port number of receiver Here, you enter the port number of the receiver.
Socket lifetime Here, decide whether the connection should remain after data transfer. Select Disconnect
socket, if the selected device communicates with many nodes.
Socket remains (default value)
The connection remains active after the data transmission.
Close socket
The connection is discontinued after the data transmission.
Data Enter the communication data here. You can enter up to 1470 values. The data type must
be BYTE; furthermore, variables of type BYTE can be entered.

Table 5- 51 Overview of parameters for Send data – Parameters tab for Protocol = TCP/IP

Field/Button Explanation/Instruction
Connection ID Here, you enter the connection ID.
This value was obtained when the TCP/IP connection was established with the Establish
connection using TCP/IP command.
Data Enter the communication data here. You can enter up to 4096 values. The data type must
be BYTE; furthermore, variables of type BYTE can be entered.

5.4.7.3 Overview of parameters for Send data - Expert tab

Table 5- 52 Overview of parameters for Send data – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in the Overview of parameters for Expert tab table.
CommandID variable Only when Protocol = Xsend/XReceive is selected
If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable Only when Protocol = UDP or Protocol = TCP/IP is selected
If you enter the name of a variable of the data type DINT, you can use this variable to find
out the result of the command call.
< 16#8000: if command execution is okay
>= 16#8000: if an error has occurred
See description for _udpSend and _tcpSend functions in the list manuals for the
SIMOTION devices.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 259
MCC commands
5.4 Communication

5.4.7.4 Querying the command status for Send data with XSend/XReceive protocol
When the XSend/XReceive protocol is used, you can query the status of the command on
the basis of the CommandID variable using the _GetStateOfXCommand system function
(see list manuals for SIMOTION devices). This is required, in particular, if the Delay program
execution parameter is deactivated. In this way you can avoid an overflow of the send buffer
due to multiple calls of the command.
ST commands can be programmed using the ST zoom, for example.
You cannot query the command status in the UDP or TCP/IP protocols.

5.4.7.5 Structure of destination address of the communications partner, when address is entered
directly (XSend/XReceive protocol)
When you enter the destination address of the communications partner directly in the
XSend/XReceive protocol, you must declare a variable of data type StructXSendDestAddr in
a declaration table or in the symbol browser.
The following table lists the meaning of the individual elements of these data types.

Table 5- 53 Structure of destination address of the communications partner, when address is entered directly (TYPE
StructXSendDestAddr – XSend/XReceive protocol)

Parameter (data type) Meaning/values Values


deviceId Point of the connection C230-2, C240: 1 for X8
(USINT) 2 for X9
P350: 1 for X101
2 for X102
D410 1 for X21
D4x5: 1 for X126
2 for X136
remoteSubnetIdLength (USINT) Length of the subnet dialog box 0 for MPI, PROFIBUS
remoteStaddrLength (USINT) Length of station address (station 1 for MPI, PROFIBUS
number) of destination system.
nextStaddrLength Length of the router address 0 for MPI, PROFIBUS
(USINT)
remoteSubnetId Subnet mask (irrelevant for
(ARRAY [0..5] OF USINT) MPI, PROFIBUS)
remoteStaddr Station address of target system Station number
(ARRAY [0..5] OF USINT) (actual target address) for MPI, PROFIBUS:
e.g.: remoteStaddr[0] = 25
nextStaddr Router address (irrelevant for
(ARRAY [0..5] OF USINT) MPI, PROFIBUS)

SIMOTION MCC Motion Control Chart


260 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.7.6 Relevant system functions for Send data


System function of SIMOTION devices:
● _Xsend, if Protocol = Xsend/XReceive is selected
● _udpSend, if Protocol = UDP is selected
● _tcpSend, if Protocol = TCP/IP is selected

Overview of parameters for Send data (Xsend- Xreceive protocol), _XSend

Table 5- 54 Parameters (MCC Send data command compared to _XSend system function)

Parameters of the MCC Parameters of the


Send data command _XSend system function
Protocol -
Delay program execution nextCommand
Parameter tab
Job identifier messageld
Return variable -
Communications partner -
Device -
Connection of transmitting PCU -
Destination address of communications partner address
Continue connection communicationmode
Data datalength, data
Expert tab
CommandID variable commandId

Overview of parameters for Send data (TCP/IP protocol), _tcpSend

Table 5- 55 Parameters (MCC Send data command compared to _tcpSend system function)

Parameters of the MCC Parameters of the


Send data command _tcpSend system function
Protocol -
Delay program execution nextCommand
Parameter tab
Connection ID connectionId
Data dataLength, data
Expert tab
Return variable -

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 261
MCC commands
5.4 Communication

Overview of parameters for Send data (TCP/IP protocol), _udpSend

Table 5- 56 Parameters (MCC Send data command compared to _udpSend system function)

Parameters of the MCC Parameters of the


Send data command _udpSend system function
Protocol -
Delay program execution nextCommand
Parameter tab
Port number of sender sourcePort
IP address of receiver destinationAddress
Port number of receiver destinationPort
Data dataLength, data
Expert tab
Return variable -

SIMOTION MCC Motion Control Chart


262 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.8 Receive data

This command is used to receive data from a communications partner (such as a SIMATIC
S7 station) using various protocols.
● XSend/XReceive protocol
The connection to the communications partner is established via PROFIBUS or MPI and
does not have to be configured.
SIMOTION devices can receive a maximum of 200 bytes in one unit; the actual useful
data length is dependent on the communications partner.
● UDP protocol
The connection is established via Ethernet with the UDP protocol.
SIMOTION devices can receive a maximum of 1470 bytes in one unit; the actual useful
data length is dependent on the communications partner.
● TCP/IP protocol
The connection is established via Ethernet with the TCP/IP protocol. You must have
configured the TCP/IP connection beforehand. Use the Establish connection using
TCP/IP command.
SIMOTION devices can receive a maximum of 4096 bytes in one unit; the actual useful
data length is dependent on the communications partner.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 263
MCC commands
5.4 Communication

Figure 5-43 Parameter screen form: Receive data

SIMOTION MCC Motion Control Chart


264 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.8.1 Overview of parameters for Receive data


You can set the following parameters:

Table 5- 57 Overview of parameters for Receive data

Field/Button Explanation/instructions
Log You can choose between the different protocols here. The parameter dialog box changes,
accordingly.
XSend/XReceive
The connection is established via PROFIBUS or MPI.
UDP
The connection is established via Ethernet, and the UDP protocol is selected.
TCP/IP
The TCP/IP protocol is selected. You must have configured the TCP/IP connection
beforehand. Use the Establish connection using TCP/IP command.
Parameter tab • For Protocol = XSend/XReceive
See Table Overview of parameters for Receive data - Parameter tab (Page 266) for
Protocol = XSend/XReceive
• For Protocol = UDP
See Table Overview of parameters for Receive data - Parameter tab (Page 266) for
Protocol = UDP
• For Protocol = TCP/IP
See Table Overview of parameters for Receive data - Parameter tab (Page 266) for
Protocol = TCP/IP
Expert tab See Overview of parameters for Receive data - Expert tab (Page 267)
Delay program execution Only when Protocol = XSend/XReceive or Protocol = TCP/IP is selected.
• Select the check box if execution of the subsequent command is to wait until this
command is finished.
If the check box is not selected, the next command is executed immediately.
Only when Protocol = UDP is selected
• Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
If command has been completed or aborted
The next command is executed after the current command has been completed or
aborted.
Abort
The active command is aborted if the port number is the same as that of the previous
call of the command.
See also Transition behavior and step enabling condition (Page 82)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 265
MCC commands
5.4 Communication

5.4.8.2 Overview of parameters for Receive data - Parameters tab

Table 5- 58 Overview of parameters for Receive data – Parameters tab for Protocol = XSend/XReceive

Field/Button Explanation/Instruction
Job identifier Enter the job identifier here. The data type is UDINT.
Return variable Here, you enter the return variable of type StructRetXReceive in which the data, length,
and error message are stored. This variable must be defined in a declaration table or the
symbol browser.

Table 5- 59 Overview of parameters for Receive data - Parameters tab for Protocol = UDP

Field/Button Explanation/Instruction
Return variable Here, you enter the return variable of type StructRetUdpReceive in which the connection
parameters, length, and error message are stored. This variable must be defined in a
declaration table or the symbol browser.
Port number of receiver Here, you enter the port number of the receiver.
Socket lifetime Here, decide whether the connection should remain after data transfer. Select Disconnect
socket, if the selected device communicates with many nodes.
Socket remains (default value)
The connection remains active after the data transmission.
Close socket
The connection is discontinued after the data transmission.
Received useful data bytes Here, you enter the variable of data type ARRAY[0..1469] OF BYTE in which the received
useful data are stored.
The number of bytes of received useful data is available in the dataLength component of
the return variable.

Table 5- 60 Overview of parameters for Receive data – Parameters tab for Protocol = TCP/IP

Field/Button Explanation/Instruction
Return variable Here, you enter the return variable of type StructRetTcpReceive in which the connection
parameters, length, and error message are stored. This variable must be defined in a
declaration table or the symbol browser.
Connection ID Here, you enter the connection ID.
This value was obtained when the TCP/IP connection was established with the Establish
connection using TCP/IP command.
Received useful data bytes Here, you enter the variable of data type ARRAY[0..4095] OF BYTE in which the received
useful data are stored.
The number of bytes of received useful data is available in the dataLength component of
the return variable.

SIMOTION MCC Motion Control Chart


266 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

5.4.8.3 Overview of parameters for Receive data - Expert tab

Table 5- 61 Overview of parameters for Receive data – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in the Overview of parameters for Expert tab table.
CommandID variable Only when Protocol = Xsend/XReceive is selected
If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.

5.4.8.4 Querying the command status for Receive data with XSend/XReceive protocol
When the XSend/XReceive protocol is used, you can query the status of the command on
the basis of the CommandID variable using the _GetStateOfXCommand system function
(see list manuals for SIMOTION devices). This is required, in particular, if the Delay program
execution parameter is deactivated. In this way you can avoid an overflow of the send buffer
due to multiple calls of the command.
ST commands can be programmed using the ST zoom, for example.
You cannot query the command status in the UDP or TCP/IP protocols.

5.4.8.5 Relevant system functions for Receive data


System function of SIMOTION devices:
● _Xreceive, if Protocol = Xsend/XReceive is selected
● _udpReceive, if Protocol = UDP is selected
● _tcpReceive, if Protocol = TCP/IP is selected

Overview of parameters for Receive data (Xsend- Xreceive protocol), _XReceive

Table 5- 62 Parameters (MCC Receive data command compared to _XReceive system function)

Parameters of the MCC Parameters of the


Receive data command _XReceive system function
Log -
Delay program execution nextCommand
Parameters tab
Job identifier messageld
Return variable -
Expert tab
CommandID variable commandId

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 267
MCC commands
5.4 Communication

Overview of parameters for Receive data (TCP/IP protocol), _tcpReceive

Table 5- 63 Parameters (MCC Receive data command compared to _tcpReceive system function)

Parameters of the MCC Parameters of the


Receive data command _tcpReceive system function
Log -
Delay program execution nextCommand
Parameters tab
Return variable -
Connection ID connectionId
Received useful data bytes receiveVariable
Expert tab
Return variable -

Overview of parameters for Receive data (UDP protocol), _udpReceive

Table 5- 64 Parameters (MCC Receive data command compared to _udpReceive system function)

Parameters of the MCC Parameters of the


Receive data command _udpReceive system function
Log -
Delay program execution nextCommand
Parameters tab
Return variable -
Port number of receiver port
Socket lifetime communicationMode
Received useful data bytes receiveVariable
Expert tab
Return variable -

5.4.8.6 Return value for Receive data


The return value informs the user about the result of the command call and contains
important connection parameters.
You must declare the return variable as a variable of the following data types in a declaration
table or the symbol browser and specify it when assigning the command parameters.
● StructRetXReceive, if Protocol = Xsend/XReceive is selected
● StructRetUdpReceive, if Protocol = UDP is selected
● StructRetTcpReceive, if Protocol = TCP/IP is selected
The following table lists the meaning of the individual elements of these data types.

SIMOTION MCC Motion Control Chart


268 Programming and Operating Manual, 05/2009
MCC commands
5.4 Communication

Table 5- 65 Structure of return value (TYPE StructRetXReceive)

Parameter (data type) Meaning/values Values


functionResult Error code < 16#8000: if command execution is
(DINT) okay
>= 16#8000: if an error has occurred
See description for _Xreceive
command in the list manuals for the
SIMOTION devices.
dataLength Length of received data packet
(UDINT)
data Received data
(ARRAY [0..199] OF BYTE)

Table 5- 66 Structure of the return value (TYPE StructRetUdpReceive)

Parameter (data type) Meaning/values Values


functionResult Error code < 16#8000: if command execution is
(DINT) okay
>= 16#8000: if an error has occurred
See description for the _udpReceive
command in the parameter manuals for
the SIMOTION devices.
sourceAddress IP address of transmitter
(ARRAY [0..3] OF USINT)
sourcePort Port number of transmitter
(UINT)
dataLength Length of received data packet
(UDINT)

Table 5- 67 Structure of the return value (TYPE StructRetTcpReceive)

Parameter (data type) Meaning/values Values


functionResult Error code < 16#8000: if command execution is
(DINT) okay
>= 16#8000: if an error has occurred
See description for the _tcpReceive
command in the parameter manuals for
the SIMOTION devices.
dataLength Length of received data packet
(UDINT)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 269
MCC commands
5.5 Single axis commands

5.5 Single axis commands

5.5.1 Switch axis enable

You use this command to switch the enables on an axis with an electric drive (for axes with a
hydraulic drive, you use the Switch QF-axis enable function).
The force/pressure control can also be enabled or disabled on axes with force/pressure
control.

Figure 5-44 Parameter screen form: Switch axis enable

The following conditions must be satisfied in order to execute motion commands on the axis:
1. Drive enable issued
2. Pulse enabled (power unit enabled)
3. Additional conditions for positioning axes and synchronous axes only: Position controller
enable is issued

SIMOTION MCC Motion Control Chart


270 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

4. Follow-up operation cancelled


Until all conditions are satisfied, the axis remains in follow-up mode (see Follow-up mode for
various axis technologies).
The current status of enables can be accessed via system variables, which are specified in
the description of the respective parameter.

Table 5- 68 Follow-up mode for various axis technologies

Drive axis Position axis


Synchronized axis
Notice
Motion commands for the axis cannot be executed in follow-up mode.
The following applies to position control:
Position control is cancelled.
The actual position value continues to be measured.
The position setpoint is corrected to the current actual position
value.
Note
Once follow-up mode is cancelled, homing of the axis does
not have to be repeated.
Current status for a real axis, indicating whether motion commands can be executed: System
variable: control.
For additional information on axis enables, see the TO Axis Electric/Hydraulic Function
Manual.

5.5.1.1 Overview of parameters for Switch axis enable

Table 5- 69 Overview of parameters for Switch axis enable

Field/Button Meaning/Instruction
Axis In Axis, select the axis for which the axis enable is to be switched.
The list contains:
• All axes with an electric drive that are defined on the relevant device. The axis is
defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of technology object data types (Page 101)) driveAxis, posAxis or
followingAxis.
Parameter tab See Overview of parameters for Switch axis enable – Parameter tab (Page 272)
Expert tab See Overview of parameters for Switch axis enable – Expert tab (Page 273)
Delay program execution Select the check box if you wish the system to delay execution of the following command
in the MCC chart until the command has been completed.
If the check box is not selected, the next command is executed immediately.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 271
MCC commands
5.5 Single axis commands

5.5.1.2 Overview of parameters for Switch axis enable – Parameters tab

Table 5- 70 Overview of parameters for Switch axis enable – Parameters tab

Field/Button Meaning/Instruction
Switch position controller For positioning and synchronous axes only:
enable Select the check box if the position controller enable is to be switched. If the check box is
selected:
• The Switch enables individually according to PROFIdrive profiles check box is
cleared.
• The Switch drive enable and Switch pulse enable check boxes are selected.
If the check box is not selected, the current status of the position controller enable is not
changed.
In the case of virtual axes, the position controller enable is always set, even if this
checkbox has not been activated.
The position controller enable must also be set if only speed-controlled operation has
been selected for a position-controlled axis (see parameter Traversing mode).
Current status of position controller enable for a real axis: System variable:
servoMonitorings.controlState.
Switch enables individually Select the check box if you want to be able to switch enables individually in accordance
according to PROFIdrive with the PROFIdrive profile. If the check box is selected:
profiles • The Switch drive enable and Switch pulse enable check boxes are hidden.
• Seven check boxes are displayed for setting the individual bits of control word 1
(STW1) in accordance with PROFIdrive (see Meaning of bits of control word 1
(STW1) in accordance with PROFIdrive).
– Select the check box if you want to assign the corresponding enable.
– Clear the check box if you want to retain the previous setting (enable assigned or
not assigned) for the corresponding enable.
All enables must be assigned for normal operation of the drive.
If the check box is cleared, the Switch drive enable and Switch pulse enable check boxes
are displayed.
Switch drive enable Only if the Switch enables individually according to PROFIdrive profiles check box is
cleared.
Select the check box if the drive enable is to be switched.
If the check box is not selected, the current status of the drive enable is not changed.
Current status of drive enable for a real axis: System variable:
actorMonitorings.driveState.
Switch pulse enable Only if the Switch enables individually according to PROFIdrive profiles check box is
cleared.
Select the check box if the pulse enable (power enable) is to be switched.
If the check box is not selected, the current status of the pulse enable is not changed.
Current status of pulse enable for a real axis: System variable: actorMonitorings.power.

SIMOTION MCC Motion Control Chart


272 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

Field/Button Meaning/Instruction
Follow-up mode Here, you decide whether the axis is to be switched out of follow-up mode (see Follow-up
mode for various axis technologies).
Do not follow up setpoint (default value)
Follow-up mode is disabled.
Motion commands for the axis can be executed.
In real axes, Do not follow up setpoint is only effective if all the other enables have been
assigned.
Follow up setpoint
Follow-up mode is enabled.
Motion commands for the axis cannot be executed.
Current status for a real axis, indicating whether motion commands can be executed:
System variable: control.
Traversing mode Maintain last setting (default value)
The axis is enabled with the most last set traversing mode (position and speed control).
Enable for speed- and position-controlled operation
The axis is enabled for speed- and position-controlled operation.
This setting cannot be selected for drive axes.
Enable for speed-controlled operation
The axis is enabled for speed-controlled operation.
If only speed-controlled operation is selected for a position-controlled axis the position
controller enable still has to be set.
Set pressure controller enable For axes with force/pressure control only.
Select the check box if you want to enable force/pressure control.
If the check box is not selected, force/pressure control is disabled.

5.5.1.3 Overview of parameters for Switch axis enable – Expert tab

Table 5- 71 Overview of parameters for Switch axis enable – Expert tab

Field/Button Meaning/Instruction
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
TO properties Here, you can adapt the parameter screen form as needed to reflect the effects of axis
configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT, for a description, see Return value for the system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 273
MCC commands
5.5 Single axis commands

5.5.1.4 Meaning of bits of control word 1 (STW1) in accordance with PROFIdrive


The following table indicates the meaning of the bits of control word 1 (STW1) for speed-
controlled drives in accordance with PROFIdrive.

Table 5- 72 Meaning of bits of control word 1 (STW1) in accordance with PROFIdrive

Bit MCC command 'Switch axis enable' MCC command 'Remove axis MCC command 'Switch axis enable'
STW1 enable' / 'Remove axis enable'
Check box selected Check box selected Check box cleared
Enable assigned - the Remove enable - the corresponding the previous setting is retained - the
corresponding bit of the control bit of the control word is set to 0 corresponding bit of the control
word is set to 1 word remains unchanged
0 ON Brakes on the ramp-function Retain
generator (OFF1)
1 Cancel coasting down (no OFF2) Coasting down (OFF2) Retain
2 Cancel quick stop (no OFF3) Quick stop (OFF3) Retain
3 Enable operation Disable operation Retain
4 Enables the ramp-function Disable ramp-function generator Retain
generator
5 Do not freeze ramp-function Freeze ramp-function generator Retain
generator
6 Enable setpoint Disable setpoint Retain

SIMOTION MCC Motion Control Chart


274 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.1.5 Relevant system function for Switch axis enable


Cam technology package:
● _enableAxis

Overview of parameters for Switch axis enable/_enableAxis

Table 5- 73 Parameters (MCC Switch axis enable command compared to _enableAxis system function)

Parameters of the MCC Parameters of the


Switch axis enable command _enableAxis system function
Axis axis
Delay program execution nextCommand
Parameter tab
Switch position controller enable enableMode, servoControlMode
Switch enables individually according to PROFIdrive profiles enableMode, stwbitset
Switch drive enable enableMode
Switch pulse enable enableMode
Follow-up mode servoCommandToActualMode
Traversing mode movingMode
Set pressure controller enable forcecontrolMode
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 275
MCC commands
5.5 Single axis commands

5.5.2 Remove axis enable

You use this command to remove the enables from an axis with an electric drive (for axes
with a hydraulic drive, you use the Remove QF axis enable function).
The force/pressure control can also be disabled or enabled on axes with force/pressure
control.

Figure 5-45 Parameter screen form: Remove axis enable

The following conditions must be satisfied in order to execute motion commands on the axis:
1. Drive enable issued
2. Pulse enabled (power unit enabled)
3. Additional conditions for positioning axes and synchronous axes only: Position controller
enable is issued
4. Follow-up operation cancelled
Until all conditions are satisfied, the axis remains in follow-up mode (see Follow-up mode for
various axis technologies in Switch axis enable (Page 270)).
The current status of enables can be accessed via system variables, which are specified in
the description of the respective parameter (see Overview of parameters for Remove axis
enable (Page 277)).
For additional information on axis enables, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


276 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.2.1 Overview of parameters for Remove axis enable

Table 5- 74 Overview of parameters for Remove axis enable

Field/Button Explanation/instructions
Axis In Axis, select the axis for which the command is to be programmed.
The list contains:
• All axes with an electric drive that are defined on the relevant device. The axis is
defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): driveAxis, posAxis, or followingAxis.
Parameter tab See Overview of parameters for Remove axis enable – Parameter tab (Page 277)
Expert tab See Overview of parameters for Remove axis enable – Expert tab (Page 278)
Delay program execution Select the check box if you wish the system to delay execution of the following command
in the MCC chart until the command has been completed.
If the check box is not selected, the next command is executed immediately.

5.5.2.2 Overview of parameters for Remove axis enable – Parameters tab

Table 5- 75 Overview of parameters for Remove axis enable – Parameters tab

Field/Button Meaning/Instruction
Disable position controller For positioning and synchronous axes only:
Select the check box if the position controller enable is to be removed. If the check box is
selected:
• The Switch enables individually according to PROFIdrive profiles check box is
cleared.
• The Remove drive enable and Remove pulse enable check boxes are selected.
If the check box is not selected, the current status of the position controller enable is not
changed.
In the case of virtual axes, the position controller enable is always set, even if this
checkbox has not been activated.
Current status of position controller enable for a real axis: System variable:
servoMonitorings.controlState.
Switch enables individually Select the check box if you want to be able to switch enables individually in accordance
according to PROFIdrive with the PROFIdrive profile. If the check box is selected:
profiles • The Remove drive enable and Remove pulse enable check boxes are hidden.
• Seven check boxes are displayed for deleting the individual bits of control word 1
(STW1) in accordance with PROFIdrive (see Meaning of bits of control word 1 (STW
1) in accordance with PROFIdrive).
– Enable the check box if you want to remove the corresponding enable.
– Clear the check box if you want to retain the previous setting (enable assigned or
not assigned) for the corresponding enable.
All enables must be assigned for normal operation of the drive.
If the check box is cleared, the Remove drive enable and Remove pulse enable check
boxes are displayed.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 277
MCC commands
5.5 Single axis commands

Field/Button Meaning/Instruction
Disable drive Only if the Switch enables individually according to PROFIdrive profiles check box is
cleared.
Select the check box if the drive enable is to be removed.
If the check box is not selected, the current status of the drive enable is not changed.
Current status of drive enable for a real axis: System variable:
actorMonitorings.driveState.
Disable pulse Only if the Switch enables individually according to PROFIdrive profiles check box is
cleared.
Select the check box if the pulse enable (power enable) is to be removed.
If the check box is not selected, the current status of the pulse enable is not changed.
Current status of drive enable for a real axis: System variable: actorMonitorings.power.
Follow-up mode Here, you decide whether the axis is to be switched into follow-up mode (see Table
Follow-up mode for various axis technologies (Page 270)).
Follow up setpoint (default value)
Follow-up mode is enabled.
Motion commands for the axis cannot be executed.
Do not follow up setpoint
Follow-up mode is disabled.
Motion commands for the axis can be executed.
In real axes, Do not follow up setpoint is only effective if all the other enables have been
assigned.
Current status for a real axis, indicating whether motion commands can be executed:
System variable: control.
Remove position controller For axes with force/pressure control only.
enable Select the check box if you want to disable force/pressure control.
If the check box is not selected, force/pressure control is enabled.

5.5.2.3 Overview of parameters for Remove axis enable – Expert tab

Table 5- 76 Overview of parameters for Remove axis enable – Expert tab

Field/Button Meaning/Instruction
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
TO properties Here, you can adapt the parameter screen form as needed to reflect the effects of axis
configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.

SIMOTION MCC Motion Control Chart


278 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.2.4 Relevant system function for Remove axis enable


Cam technology package:
● _disableAxis

Overview of parameters for Remove axis enable / _disableAxis

Table 5- 77 Parameters (MCC Remove axis enable command compared to _disableAxis system function)

Parameters of the MCC Parameters of the


Remove axis enable command _disableAxis system function
Axis axis
Delay program execution nextCommand
Parameters tab
Disable position controller disableMode, servoControlMode
Switch enables individually according to PROFIdrive profiles disableMode, stwbitset
Disable drive disableMode
Disable pulse disableMode
Follow-up mode servoCommandToActualMode
Remove position controller enable forcecontrolMode
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 279
MCC commands
5.5 Single axis commands

5.5.3 Switch QF axis enable

You use this command to switch the enables on an axis with a hydraulic drive (for axes with
an electric drive, you use the Switch axis enable function).
The force/pressure control can also be enabled or disabled on axes with force/pressure
control.

Figure 5-46 Parameter screen form: Switch QF axis enable

The following conditions must be satisfied in order to execute motion commands on the axis:
1. If the Q-valve (actuator for volumetric flow) is assigned to multiple axes: Access to the Q-
valve is ensured
2. Enable for the Q-valve is issued
3. Additional conditions for axes with force/pressure control by means of a pressure control
valve (F-valve, actuator for force/pressure control):
– If the pressure control valve is assigned to multiple axes: Access to the pressure
control valve is ensured
– Enable for the pressure control valve is issued

SIMOTION MCC Motion Control Chart


280 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

4. Additional conditions for positioning axes and synchronous axes only: Position controller
enable is issued
5. Follow-up operation cancelled
Until all conditions are satisfied, the axis remains in follow-up mode (see Follow-up mode for
various axis technologies).
The current status of enables can be accessed via system variables, which are specified in
the description of the respective parameter (see Overview of parameters for Switch QF axis
enable (Page 281)).
For additional information on axis enables, see the TO Axis Electric/Hydraulic Function
Manual.

5.5.3.1 Overview of parameters for Switch QF axis enable

Table 5- 78 Overview of parameters for Switch QF axis enable

Field/Button Meaning/Instruction
Axis In Axis, select the axis for which the axis enable is to be switched.
The list contains:
• All axes with a hydraulic drive that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC
chart (see Technology object data types (Page 101)): driveAxis, posAxis, or
followingAxis.
Parameter tab See Overview of parameters for Switch QF axis enable – Parameter tab (Page 282)
QF_Parameters tab See Overview of parameters for Switch QF axis enable – QF_parameter tab
(Page 283)
Expert tab See Overview of parameters for Switch QF axis enable – Expert tab (Page 284)
Delay program execution Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the command has been completed.
If the check box is not selected, the next command is executed immediately.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 281
MCC commands
5.5 Single axis commands

5.5.3.2 Overview of parameters for Switch QF axis enable – Parameters tab

Table 5- 79 Overview of parameters for Switch QF axis enable – Parameters tab

Field/Button Explanation/Instructions
Switch position controller enable For positioning and synchronous axes only:
Select the check box if the position controller enable is to be switched.
If the check box is not selected, the position controller enable is removed.
In the case of virtual axes, the position controller enable is always set, even if this
checkbox has not been activated.
Current status of position controller enable for a real axis: System variable:
servoMonitorings.controlState.
Set pressure controller enable For axes with force/pressure control only.
Select the check box if you want to enable force/pressure control.
If the check box is not selected, force/pressure control is disabled.
Follow-up mode Here, you decide whether the axis is to be switched out of follow-up mode (see
Follow-up mode for various axis technologies).
Do not follow up setpoint (default value)
Follow-up mode is disabled.
Motion commands for the axis can be executed.
In real axes, Do not follow up setpoint is only effective if all the other enables have
been assigned.
Follow up setpoint
Follow-up mode is enabled.
Motion commands for the axis cannot be executed.
Current status for a real axis, indicating whether motion commands can be
executed: System variable: control.
Traversing mode Maintain last setting (default value)
The axis is enabled with the most last set traversing mode (position and speed
control).
Enable for speed- and position-controlled operation
The axis is enabled for speed- and position-controlled operation.
This setting cannot be selected for drive axes.
Enable for speed-controlled operation
The axis is enabled for speed-controlled operation.
This setting cannot be used to traverse a hydraulic axis with closed-loop velocity
control using open-loop velocity-control.

SIMOTION MCC Motion Control Chart


282 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.3.3 Overview of parameters for Switch QF axis enable – QF_Parameters tab

Table 5- 80 Overview of parameters for Switch QF axis enable – QF_Parameters tab

Field/Button Explanation/instructions
Access to Q-valve If the Q-valve (actuator for volumetric flow) is assigned to multiple axes:
Here, you select whether or not the axis has access to the Q-valve.
No change in access (default value)
There are no changes in access to the Q-valve
Request valve access
Access to the Q-valve is requested.
Access is blocked for other axes.
Enable valve access
Access to the Q-valve is enabled.
Another axis can access the Q-valve.
Current status for access to the Q-valve for a real axis: System variable:
actorMonitoring.qOutputState.
Set Q-valve enable Here, you select the enables for the Q-valve.
Set enable
Enable for the Q-valve is set
Remove enable
Enable for the Q-valve is removed
No change in enables (default value)
The current enable for the Q-valve is not changed
Current status of enable for the Q-valve for a real axis: Systemvariable
actorMonitoring.driveState.
Up rate limit value The rise of the manipulated variable is limited:
• During a transition from or to a substitute value (requesting or enabling access
to the Q-valve).
• During a characteristic change
Enter the value in the editable selection list.
Preassignment
System variable for preassigned value: userDefaultQFAxis.maxDerivative.QOutput
Access to pressure control valve If the pressure control valve (F-valve, actuator for force/pressure control) is
assigned to multiple axes:
Here, you select whether or not the axis has access to the pressure control valve.
No change in access (default value)
There are no changes in access to the pressure control valve
Request valve access
Access to the pressure control valve is requested.
Access is blocked for other axes.
Enable valve access
Access to the pressure control valve is enabled.
Another axis can access the pressure control valve.
Current status for access to the pressure control valve for a real axis: System
variable: actorMonitoring.fOutputState.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 283
MCC commands
5.5 Single axis commands

Field/Button Explanation/instructions
Set pressure control valve enable Here, you select the enables for the pressure control valve.
Set enable
Enable for the pressure control valve is set
Remove enable
Enable for the pressure control valve is removed
No change in enables (default value)
The current enable for the pressure control valve is not changed
Current status of enable for the pressure control valve for a real axis:
Systemvariable actorMonitoring.fOutputEnable.
Up rate limit value The rise of the manipulated variable is limited:
During a transition from or to a substitute value (requesting or enabling access to
the pressure control valve).
During a characteristic change
Enter the value in the editable selection list.
Preassignment
System variable for preassigned value: userDefaultQFAxis.maxDerivative.FOutput

5.5.3.4 Overview of parameters for Switch QF axis enable – Expert tab

Table 5- 81 Overview of parameters for Switch QF axis enable – Expert tab

Field/Button Meaning/Instruction
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
TO properties Here, you can adapt the parameter screen form as needed to reflect the effects of
axis configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this
variable to find out the result of the command call.

SIMOTION MCC Motion Control Chart


284 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.3.5 Relevant system function for Switch QF axis enable


Cam technology package:
● _enableQFAxis

Overview of parameters for Switch QF axis enable/_enableQFAxis

Table 5- 82 Parameters (MCC Switch QF axis enable command compared to _enableQFAxis system function)

Parameters of the MCC Parameters of the


Switch QF axis enable command _enableQFAxis system function
Axis axis
Delay program execution nextCommand
Parameter tab
Switch position controller enable controlMode
Set pressure controller enable forcecontrolMode
Follow-up mode commandToActualMode
Traversing mode movingMode
QF_Parameters tab
Access to Q-valve qoutput
Set Q-valve enable qoutputenable
Rate limitation value qoutputmaxderivative
Access to pressure limitation valve foutput
Set pressure limitation valve enable foutputenable
Rate limitation value foutputmaxderivative
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 285
MCC commands
5.5 Single axis commands

5.5.4 Remove QF axis enable

You use this command to remove the enables from an axis with a hydraulic drive (for axes
with an electric drive, you use the Remove axis enable function).
The force/pressure control can also be enabled or disabled on axes with force/pressure
control.

Figure 5-47 Parameter screen form: Remove QF axis enable

The following conditions must be satisfied in order to execute motion commands on the axis:
1. If the Q-valve (actuator for volumetric flow) is assigned to multiple axes: Access to the Q-
valve is ensured
2. Enable for the Q-valve is issued
3. Additional conditions for axes with force/pressure control by means of a pressure control
valve (F-valve, actuator for force/pressure control):
– If the pressure control valve is assigned to multiple axes: Access to the pressure
control valve is ensured
– Enable for the pressure control valve is issued

SIMOTION MCC Motion Control Chart


286 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

4. Additional conditions for positioning axes and synchronous axes: Position controller
enable is issued
5. Follow-up operation cancelled
Until all conditions are satisfied, the axis remains in follow-up mode (see Follow-up mode for
various axis technologies).
The current status of enables can be accessed via system variables, which are specified in
the description of the respective parameter (see Overview of parameters for Remove QF
axis enable (Page 287)).
For additional information on axis enables, see the TO Axis Electric/Hydraulic Function
Manual.

5.5.4.1 Overview of parameters for Remove QF axis enable

Table 5- 83 Overview of parameters for Remove QF axis enable

Field/Button Explanation/instructions
Axis In Axis, select the axis for which the axis enable is to be switched.
The list contains:
• All axes with a hydraulic drive that are defined on the relevant device. The axis is
defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): driveAxis, posAxis, or
followingAxis.
Parameter tab See Overview of parameters for Remove QF axis enable – Parameter tab (Page 288)
QF_Parameters tab See Overview of parameters for Remove QF axis enable – QF_parameter tab
(Page 289)
Expert tab See Overview of parameters for Remove QF axis enable – Expert tab (Page 290)
Delay program execution Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the command has been completed.
If the check box is not selected, the next command is executed immediately.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 287
MCC commands
5.5 Single axis commands

5.5.4.2 Overview of parameters for Remove QF axis enable – Parameters tab

Table 5- 84 Overview of parameters for Remove QF axis enable – Parameters tab

Field/Button Explanation/instructions
Disable position controller For positioning and synchronous axes only:
Select the check box if the position controller enable is to be removed.
If the check box is not selected, the position controller enable is switched.
In the case of virtual axes, the position controller enable is always set, even if this check box
has not been activated.
Current status of position controller enable for a real axis: System variable:
servoMonitorings.controlState.
Remove position controller For axes with force/pressure control only.
enable Select the check box if you want to disable force/pressure control.
If the check box is not selected, force/pressure control is enabled.
Follow-up mode Here, you decide whether the axis is to be switched into follow-up mode (see Follow-up
mode for various axis technologies).
Follow up setpoint (default value)
Follow-up mode is enabled.
Motion commands for the axis cannot be executed.
Do not follow up setpoint
Follow-up mode is disabled.
Motion commands for the axis can be executed.
In real axes, Do not follow up setpoint is only effective if all the other enables have been
assigned.
Current status for a real axis, indicating whether motion commands can be executed:
System variable: control.

SIMOTION MCC Motion Control Chart


288 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.4.3 Overview of parameters for Remove QF axis enable – QF_Parameters tab

Table 5- 85 Overview of parameters for Remove QF axis enable – QF_Parameters tab

Field/Button Explanation/instructions
Access to Q-valve If the Q-valve (actuator for volumetric flow) is assigned to multiple axes:
Here, you select whether or not the axis enables access to the Q-valve.
No change in access (default value)
There are no changes in access to the Q-valve
Enable valve access (default value)
Access to the Q-valve is enabled.
Another axis can access the Q-valve.
Current status for access to the Q-valve for a real axis: Systemvariable
actorMonitoring.qOutputState
Set Q-valve enable Here, you select whether the enables for the Q-valve are removed.
Remove enable
Enable for the Q-valve is removed
No change in enables (default value)
The current enable for the Q-valve is not changed
Current status of enable for the Q-valve for a real axis: Systemvariable
actorMonitoring.driveState.
Substitute value for the Q- Here, you select whether a substitute value is to be set for the Q-valve. The substitute value
valve is set is applied if no axis has access to the Q-valve.
Set substitute value
You enter the substitute value in the subsequent input field.
No change in the substitute value (default value)
Substitute value is not changed.
Substitute value Here, you enter the substitute value for the Q-valve.
Up rate limit value The rise of the manipulated variable is limited:
• During a transition from or to a substitute value (requesting or enabling access to the Q-
valve).
• During a characteristic change
Enter the value in the editable selection list.
Default
System variable for preassigned value: userDefaultQFAxis.maxDerivative.QOutput
Access to pressure control If the pressure control valve (F-valve, F-actuator) is assigned to multiple axes:
valve Here, you select whether or not the axis enables access to the pressure control valve.
No change in access (default value)
There are no changes in access to the pressure control valve
Enable valve access
Access to the pressure control valve is enabled.
Another axis can access the pressure control valve.
Current status for access to the pressure control valve for a real axis: System variable:
actorMonitoring.fOutputState.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 289
MCC commands
5.5 Single axis commands

Field/Button Explanation/instructions
Set pressure control valve Here, you select whether the enables for the pressure control valve are removed.
enable Remove enable
Enable for the pressure control valve is removed
No change in enables (default value)
The current enable for the pressure control valve is not changed
Current status of enable for the pressure control valve for a real axis: Systemvariable
actorMonitoring.fOutputEnable.
Substitute value for Here, you select whether a substitute value is to be set for the pressure control valve. The
pressure control valve substitute value is applied if no axis has access to the pressure control valve.
enable Set substitute value
You enter the substitute value in the subsequent input field.
No change in the substitute value (default value)
Substitute value is not changed
Substitute value Here, you enter the substitute value for the pressure control valve.
Up rate limit value The rise of the manipulated variable is limited:
During a transition from or to a substitute value (requesting or enabling access to the
pressure control valve).
During a characteristic change
Enter the value in the editable selection list.
Preassignment
System variable for preassigned value: userDefaultQFAxis.maxDerivative.FOutput

5.5.4.4 Overview of parameters for Remove QF axis enable – Expert tab

Table 5- 86 Overview of parameters for Remove QF axis enable – Expert tab

Field/Button Meaning/Instruction
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
TO properties Here, you can adapt the parameter screen form as needed to reflect the effects of axis
configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.

SIMOTION MCC Motion Control Chart


290 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.4.5 Relevant system function for Remove QF axis enable


Cam technology package:
● _disableQFAxis

Overview of parameters for Remove QF axis enable / _disableQFAxis

Table 5- 87 Parameters (MCC Remove QF axis enable command compared to _disableQFAxis system function)

Parameters of the MCC Parameters of the


Remove QF axis enable command _disableQFAxis system function
Axis axis
Delay program execution nextCommand
Parameters tab
Disable position controller controlMode
Remove position controller enable forcecontrolMode
Follow-up mode commandToActualMode
QF-Parameters tab
Access to Q-valve qoutput
Set Q-valve enable qoutputenable
Substitute value for the Q-valve is set qoutputvaluesetmode
Substitute value qoutputvalue
Up rate limit value qoutputmaxderivativetype, qoutputmaxderivative
Access to pressure control valve foutput
Set pressure control valve enable foutputenable
Substitute value for pressure control valve enable foutputvaluesetmode
Substitute value foutputvalue
Up rate limit value foutputmaxderivativetype, foutputmaxderivative
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 291
MCC commands
5.5 Single axis commands

5.5.5 Speed preset

This command starts an axis in speed-controlled mode.


The axis is accelerated or decelerated to the programmed rotational speed (velocity). Once
this speed is reached, it is held constant.
When the constant motion phase is limited (Constant traversing time parameter in the
Dynamics tab), the axis is decelerated to the set speed of 0 once the specified time has
elapsed.

Figure 5-48 Parameter screen form: Speed specification

For additional information on moving axes, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


292 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.5.1 Overview of parameters for speed specification

Table 5- 88 Overview of parameters for speed specification

Field/Button Meaning/Instruction
Axis In Axis, select which axis the command is being programmed for. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder
in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): driveAxis, posAxis,
or followingAxis.
Parameter tab See Overview of parameters for Speed specification - Parameters tab (Page 294)
Dynamics tab See Overview of parameters for Speed specification - Dynamics tab (Page 295)
Expert tab See Overview of parameters for Speed specification - Expert tab (Page 295)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

See also
Dynamics tab (Page 75)
Editable selection list (editable combo box) (Page 66)
Selection list (combo box) (Page 65)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 293
MCC commands
5.5 Single axis commands

5.5.5.2 Overview of parameters for Speed specification – Parameters tab

Table 5- 89 Overview of parameters for Speed specification – Parameters tab

Field/Button Explanation/Instruction
speed Speed value during the constant speed phase.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Resulting velocity
An existing acceleration or deceleration motion of the axis is ended, taking into account the
jerk parameters in the Dynamic response tab. The axis continues at the resulting velocity. The
programmed transition behavior must be "Substitute".
Current
last speed programmed
Preassigned value (default)
See also Selection list (combo box) (Page 65)
System variable for preassigned value: userDefaultDynamics.velocity
See also Dynamic response tab in the Input fields and selection lists section and the Overview
of parameters for the Dynamic response tab table included in this section.
Direction Select the direction of rotation.
From speed sign
Direction is obtained from speed sign.
Positive
Positive direction
Negative
Negative direction
last direction programmed
Preassigned value (default)
See also Selection list (combo box) (Page 65)
System variable for preassigned value: userDefaultDynamics.direction

SIMOTION MCC Motion Control Chart


294 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.5.3 Overview of parameters for Speed specification – Dynamic response tab

Table 5- 90 Overview of parameters for Speed specification – Dynamic response tab

Field/Button Explanation/Instruction
The Dynamics tab is described in detail in Overview of parameters in the Dynamics tab
(Page 75).
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefaultDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and end of
the respective phase.
System variables for preassigned value: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk
Constant traversing time A time limit can be programmed for the command.
To so so, select the check box and enter the time duration of the constant motion phase.

5.5.5.4 Overview of parameters for Speed specification – Expert tab

Table 5- 91 Overview of parameters for Speed specification – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status with
this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to find
out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 295
MCC commands
5.5 Single axis commands

5.5.5.5 Relevant system function for speed specification


Cam technology package:
● _move

Overview of parameters for speed specification / _move

Table 5- 92 Parameters (MCC Speed specification command compared to _move system function)

Parameters of the MCC Parameters of the


Speed specification command _move system function
movingMode = SPEED_CONTROLLED
Axis axis
Transition behavior mergemode
Delay program execution nextCommand
Parameters tab
speed velocitytype, velocity
Direction direction
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Constant traversing time movetimeouttype, movetimeout
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


296 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.6 Start axis position-controlled

The command starts a position or synchronized axis in position-controlled mode.


The axis is accelerated or decelerated to the programmed velocity. Once this velocity is
reached, it is held constant.
When the constant motion phase is limited (Constant traversing time parameter in the
Dynamics tab), the axis is decelerated to the set velocity of 0 once the specified time has
elapsed.

Figure 5-49 Parameter screen form: Start axis position-controlled

For additional information on moving axes, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 297
MCC commands
5.5 Single axis commands

5.5.6.1 Overview of parameters for Start axis position-controlled

Table 5- 93 Overview of parameters for Start axis position-controlled

Field/Button Explanation/instructions
Axis In Axis, select the axis for which the command is to be programmed. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): posAxis or
followingAxis.
Parameter tab See Overview of parameters for Start axis position-controlled – Parameter tab (Page 299)
Dynamics tab See Overview of parameters for Start axis position-controlled – Dynamics tab
(Page 299)
Expert tab See Overview of parameters for Start axis position-controlled – Expert tab (Page 300)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior and step enabling condition (Page 82)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Transition behavior and step enabling condition (Page 82)

SIMOTION MCC Motion Control Chart


298 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.6.2 Overview of parameters for Start axis position-controlled – Parameters tab

Table 5- 94 Overview of parameters for Start axis position-controlled – Parameters tab

Field/Button Explanation/instructions
Velocity Velocity value during the constant velocity phase.
Enter the value in the editable selection list (see Editable selection list (editable combo
box)).
Resulting velocity
An existing acceleration or deceleration motion of the axis is ended, taking into account
the jerk parameters in the Dynamics tab. The axis continues at the resulting velocity.
Current
Last programmed velocity
Preassigned value (default value)
System variable for preassigned value: userDefaultDynamics.velocity
Direction Select the direction of motion here.
From velocity sign
Direction is obtained from the sign of the velocity.
Negative
Negative direction
Positive
Positive direction
Last programmed direction
Preassigned value (default value)
System variable for preassigned value: userDefaultDynamics.direction

5.5.6.3 Overview of parameters for Start axis position-controlled – Dynamic response tab

Table 5- 95 Overview of parameters for Start axis position-controlled – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefaultDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk
Constant traversing time A time limit can be programmed for the command.
To so so, select the check box and enter the time duration of the constant motion phase.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 299
MCC commands
5.5 Single axis commands

5.5.6.4 Overview of parameters for Start axis position-controlled – Expert tab

Table 5- 96 Overview of parameters for Start axis position-controlled – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.

5.5.6.5 Relevant system function for Start axis position-controlled


Cam technology package:
● _move

Overview of parameters for Start axis position-controlled / _move

Table 5- 97 Parameters (MCC Start axis position-controlled command compared to _move system function)

Parameters of the MCC Parameters of the


Start axis position-controlled command _move system function
movingMode = POSITION_CONTROLLED
Axis axis
Transition behavior mergemode
Delay program execution nextCommand
Parameters tab
Velocity velocitytype, velocity
Direction direction
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Constant traversing time movetimeouttype, movetimeout
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


300 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.7 Stop axis

This command stops the motion of an axis and is effective for all single axis motions. The
motion can be stopped with Normal stop or Quick stop.
● Normal stop: This command acts on all single axis motions (positioning and speed
motions), but not on synchronous motions.
● Quick stop: This command also acts on synchronous motions. In addition, the axis is
disabled with respect to further motion commands; this state can be cancelled with the
commands Remove axis enable or Reset object.

Figure 5-50 Parameter screen form: Stop axis

For additional information on the quick stop function, see the TO Axis Electric/Hydraulic
Function Manual.
For additional information on the normal stop function, see the TO Axis Electric/Hydraulic
Function Manual.
For additional information on the traversing mode, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 301
MCC commands
5.5 Single axis commands

5.5.7.1 Overview of parameters for Stop axis

Table 5- 98 Overview of parameters for Stop axis

Field/Button Explanation/instructions
Axis In Axis, select which axis is to be stopped. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder
in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): driveAxis, posAxis,
or followingAxis.
Parameter tab See Overview of parameters for Stop axis – Parameter tab (Page 303)
Dynamics tab See Overview of parameters for Stop axis – Dynamics tab (Page 304)
Expert tab See Overview of parameters for Stop axis – Expert tab (Page 305)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


302 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.7.2 Overview of parameters for Stop axis – Parameters tab

Table 5- 99 Overview of parameters for Stop axis – Parameters tab

Field/Button Explanation/instructions
Stop mode Select a stop mode here. Only those motions that have been stopped in "normal stop
without abort" mode can be continued with the Continue motion command. No other
motions can be continued.
In the case of a quick stop, the axis is disabled with respect to further motion commands;
this state can be cancelled with the commands Remove axis enable or Reset object.
Normal stop without abort (default value)
The motion specified in the Selection field is stopped with the programmed dynamics
parameters (Dynamics tab – see Overview of parameters for Stop axis - Dynamics tab
(Page 304)). It can be continued with the Continue motion command. No other
commands for the axis may be programmed between the stop command and the
continue command.
The command does not act on synchronous motions.
Normal stop with abort
The motion specified in the Selection field is stopped with the programmed dynamics
parameters (Dynamics tab – see Overview of parameters for Stop axis - Dynamics tab
(Page 304)). The motion cannot be continued.
The command does not act on synchronous motions.
Quick stop at maximum deceleration
The motion is stopped according to interpolation using the maximum dynamic values on
the axis. It cannot be continued.
Quick stop within defined period
The motion can be brought to a standstill in the programmed time. You program the time
in the Time for deceleration parameter in the Dynamics tab. The motion cannot be
continued.
Stopping with preassigned braking ramp
The motion is stopped using the braking ramp in the controller. This is set during
configuration. The motion cannot be continued.
Quick stop with dynamics parameters
The motion is stopped with the programmed dynamics parameters (Dynamics tab – see
Overview of parameters for Stop axis - Dynamics tab (Page 304)). The motion cannot be
continued.
Selection Select whether you want to stop the motion as a whole, only the basic motion, or only the
superimposed motion.
This parameter can only be selected for the following stop modes:
• Normal stop without abort (default value)
• Normal stop with abort
All motions (default value)
All motions of the programmed axis are stopped.
Basic motion
The basic motion is stopped.
Superimposed motion
The superimposed motion is stopped.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 303
MCC commands
5.5 Single axis commands

Field/Button Explanation/instructions
Traversing mode Position-controlled
For positioning and synchronous axes only: Axis is switched from the current traversing
mode (for example, speed control, force control, or torque control) to position control, and
stopped.
Closed-loop speed controlled
Axis is switched from the current traversing mode (for example, position control, force
control, or torque control) to speed control, and stopped. The speed ramp takes effect
immediately; an existing following error does not have to be removed first.
If position-controlled motions are stopped in speed-controlled mode, the axis is disabled
with respect to further motion commands; this state can be cancelled with the commands
Remove axis enable or Reset object.
Last set traversing mode (default value)
Axis is switched from the current traversing mode (for example, position control, speed
control, force control, or torque control) to the last set traversing mode (position or speed
control), and stopped.

5.5.7.3 Overview of parameters for Stop axis – Dynamic response tab

Table 5- 100 Overview of parameters for Stop axis – Dynamic response tab

Field/Button Explanation/Instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for default: userDefaultDynamics.profile
Acceleration The meaning depends on the acceleration model used, which can be selected via the
configuration data TypeOfAxis.DecodingConfig.directionDynamic:
• Non-direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = NO (default value)
The value has no effect.
• Direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = YES
The value causes deceleration when the direction of rotation is negative and has no
effect when the direction of rotation is positive.
The entered value acts during the constant deceleration phase.
For additional information on specifying the acceleration and deceleration (acceleration
model), see the TO Axis Electric/Hydraulic Function Manual.
System variable for default: userDefaultDynamics.positiveAccel

SIMOTION MCC Motion Control Chart


304 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

Field/Button Explanation/Instructions
Deceleration The meaning depends on the acceleration model used, which can be selected via the
configuration data TypeOfAxis.DecodingConfig.directionDynamic:
• Non-direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = NO (default)
The value causes deceleration in the motion of the axis, independent of the direction
of motion.
• Direction-based acceleration model
TypeOfAxis.DecodingConfig.directionDynamic = YES
The value causes deceleration when the direction of rotation is positive and has no
effect when the direction of rotation is negative.
The entered value acts during the constant deceleration phase.
For additional information on specifying the acceleration and deceleration (acceleration
model), see the TO Axis Electric/Hydraulic Function Manual.
System variable for default: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for default: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk
Time for deceleration The entered value determines the duration of the braking operation in the Quick stop
within defined period stop mode.
System variable for default: userDefaultDynamics.stopTime

See also
Dynamics tab (Page 75)

5.5.7.4 Overview of parameters for Stop axis – Expert tab

Table 5- 101 Overview of parameters for Stop axis – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the Cam
technology package.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 305
MCC commands
5.5 Single axis commands

5.5.7.5 Relevant system functions for Stop axis


Cam technology package:
● _stop (for Normal stop without /with abort stop mode)
● _stopEmergency (for Quick stop stop mode)

Overview of parameters for Stop axis, _stop, _stopEmergency

Table 5- 102 Parameters (MCC Stop axis command compared to _stop, _stopEmergency system functions)

Parameters of the MCC Parameters of the


Stop axis command _stop, _stopEmergency system functions
Axis axis
Delay program execution nextCommand
Parameters tab
Stop mode stoppmode, stopdrivemode
Selection stopspecification
Traversing mode movingmode
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Time for deceleration stoptimetype, stoptime
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


306 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.8 Continue motion

This command continues a motion that has been stopped. The following motions can be
continued:
● All speed-controlled motions that were brought to a standstill using the Normal stop
without abort stop mode,
● all position-controlled motions that were brought to a standstill using the Normal stop
without abort stop mode and not in speed-controlled mode.
The axis must not receive any new motion commands between interruption and continuation
of the interrupted motion.

Figure 5-51 Parameter screen form: Continue motion

For additional information on continuing motions, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 307
MCC commands
5.5 Single axis commands

5.5.8.1 Overview of parameters for Continue motion

Table 5- 103 Overview of parameters for Continue motion

Field/Button Explanation/instructions
Axis In Axis, select which axis for which motion is to be continued. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder in
the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)): driveAxis, posAxis, or
followingAxis.
Parameter tab See Overview of parameters for Continue motion - Parameter tab (Page 308)
Expert tab See Overview of parameters for Continue motion - Expert tab (Page 308)

5.5.8.2 Overview of parameters for Continue motion - Parameters tab

Table 5- 104 Overview of parameters for Continue motion - Parameters tab

Field/Button Explanation/instructions
Selection Here, select which axis motion component is to be continued.
All motions (default value)
All motions of the programmed axis are continued.
Basic motion
The basic motion is continued.
Superimposed motion
The superimposed motion is continued.

5.5.8.3 Overview of parameters for Continue motion - Expert tab

Table 5- 105 Overview of parameters for Continue motion - Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

SIMOTION MCC Motion Control Chart


308 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.8.4 Relevant system function for Continue motion


Cam technology package:
● _continue

Overview of parameters for Continue motion, _continue

Table 5- 106 Parameters (MCC Continue motion command compared to _continue system function)

Parameters of the MCC Parameters of the


Continue motion command _continue system function
Axis axis
Parameters tab
Selection continuespecification
Expert tab
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 309
MCC commands
5.5 Single axis commands

5.5.9 Home axis

With a position axis or synchronized axis, the position values that are displayed or entered
refer to the coordinate system of the axis. The coordinate system of the axis must be aligned
to the real physical position of the axis.
If you are using an absolute measuring system, the alignment need only be done once
during commissioning. When commissioning is completed, the position value will be known
when the machine is switched on.
With an incremental measuring system, the alignment must be repeated each time the
machine is switched on. The alignment is achieved via homing.

Note
Traversing commands with relative position specification can always be executed.
The axis can be configured to indicate whether traversing commands with absolute position
specification can also be executed on a non-homed axis. Configuration data:
TypeOfAxis.homing.referencingNecessary.

Figure 5-52 Parameter screen form: Home axis

For additional information on homing, see the TO Axis Electric/Hydraulic Function Manual.

SIMOTION MCC Motion Control Chart


310 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.9.1 Overview of parameters for Home axis

Table 5- 107 Overview of parameters for Home axis

Field/Button Explanation/instructions
Axis In Axis, select which axis is to be homed. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): posAxis or followingAxis.
Parameter tab See Overview of parameters for Home axis – Parameter tab (Page 312)
Dynamics tab See Overview of parameters for Home axis – Dynamics tab (Page 313)
Expert tab See Overview of parameters for Home axis – Expert tab (Page 313)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

See also
Transition behavior and step enabling condition (Page 82)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 311
MCC commands
5.5 Single axis commands

5.5.9.2 Overview of parameters for Home axis – Parameters tab

Table 5- 108 Overview of parameters for Home axis – Parameters tab

Field/Button Meaning/Instruction
Homing type Select among the permitted homing types:
Active homing (default value)
Homing occurs by means of a separate traversing motion of the axis.
The homing mode is specified when you configure the axis during the commissioning
phase.
Passive homing
The homing command itself does not trigger any active traversing motion of the axis.
Rather, homing occurs during the next axis motion.
The homing mode is specified when you configure the axis during the commissioning
phase.
Required settings:
For Home axis: Clear the Delay program execution check box.
For the subsequent command: Select Attach as the transition behavior from the active
command.
Set home position
The value of the home position coordinate is assigned to the current position (actual
value) of the axis. There is no active traversing motion.
Relative home position setting
The value of the home position coordinate is added to the current position (actual value)
of the axis. There is no active traversing motion.
Absolute encoder adjustment
Absolute encoder adjustment is only possible if the axis was configured as an absolute
encoder or a cyclic absolute encoder during commissioning. The offset between the axis
zero point and the encoder zero point is determined by selecting a value for the absolute
encoder offset. There is no active traversing motion.
The adjustment generally only needs to be repeated in exceptional circumstances (see
"Motion Control TO Axis Electric/Hydraulic, External Encoder" function manual).
Absolute encoder adjustment with specification of the position value
Absolute encoder adjustment with specification of the position value is only possible if the
axis was configured as an absolute encoder or a cyclic absolute encoder during
commissioning.
The value of the home position coordinate is assigned to the current position (actual
value) of the axis, and the offset (absolute encoder offset) between the axis zero point
and the encoder zero point is calculated from this. There is no active traversing motion.
The adjustment generally only needs to be repeated in exceptional circumstances (see
"Motion Control TO Axis Electric/Hydraulic, External Encoder" function manual).
Home position coordinates Not when homing type = absolute encoder adjustment.
Coordinates of the home position in the reference system of the axis.
Enter the value in the editable selection list (see Editable selection list (editable combo
box)).
Default value
See Selection list (combo box) table.
System variable for preassigned value: userDefaultHoming.homingPosition

SIMOTION MCC Motion Control Chart


312 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

Field/Button Meaning/Instruction
Homing approach velocity Only when homing type = Active homing.
Velocity at which the axis approaches the homing output cam (only with homing mode
With homing output cam and encoder zero mark or Encoder zero mark only)
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Current
last programmed
default value
See Selection list (combo box) (Page 65).
System variable for preassigned value: userDefaultHoming.homingApproachVelocity

5.5.9.3 Overview of parameters for Home axis – Dynamic response tab

Table 5- 109 Overview of parameters for Home axis – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
The parameters in the Dynamic response tab are evaluated only with homing type Active
homing.
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefaultDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk

5.5.9.4 Overview of parameters for Home axis – Expert tab

Table 5- 110 Overview of parameters for Home axis – Expert tab

Field/Button Meaning/Instruction
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
TO properties Here, you can adapt the parameter screen form as needed to reflect the effects of axis
configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 313
MCC commands
5.5 Single axis commands

5.5.9.5 Relevant system functions for Home axis


Cam technology package:
● _homing

Overview of parameters for Home axis / _homing

Table 5- 111 Parameters (MCC Home axis command compared to _homing system function)

Parameters of the MCC Parameters of the


Home axis command _homing system function
Axis axis
Transition behavior mergeMode
Delay program execution nextCommand
Parameter tab
Homing type homingmode
Home position coordinates homepositiontype, homeposition
Reference point approach velocity velocitytype, velocity
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


314 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.9.6 Referencing mode


Various homing modes are possible for Active homing and Passive homing homing types.
See table below.
You specify the homing modes separately for each encoder system when configuring the
axis.

Table 5- 112 Homing mode for active and passive homing

Referencing mode Description


Active homing Passive homing
Homing occurs by means of a separate The homing command itself does not trigger
traversing motion of the axis. any active traversing motion of the axis.
Configuration data for homing mode: Rather, homing occurs during the next axis
TypeOfAxis.NumberOfEncoders. motion.
Encoder_x.IncHomingEncoder. Configuration data for homing mode:
homingMode. TypeOfAxis.NumberOfEncoders.
Encoder_x.IncHomingEncoder.
passiveHomingMode.
With homing output cam The homing command initiates axis motion After the homing output cam is detected, the
and encoder zero mark towards the homing output cam. next zero mark of the measuring system is
After the homing output cam is crossed, active for synchronization.
the axis moves to the next zero mark of the Once the first zero mark is detected after the
measuring system. Once the first zero homing output cam, synchronization takes
mark is detected, the measuring system is place.
synchronized. The position value of the axis is set to the
The axis is then moved by the amount of value indicated in the home position
the home position offset. coordinates.
The axis is then at the home position. The
position value is set to the value indicated
in the home position coordinates.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 315
MCC commands
5.5 Single axis commands

Referencing mode Description


Active homing Passive homing
External zero mark only The homing command initiates axis motion Once the external zero mark (e.g., homing
towards the external zero mark (e.g., output cam) has been detected,
homing output cam). synchronization with the edge takes place.
Once the external zero mark is crossed, The position value of the axis is set to the
the measuring system is synchronized to value indicated in the home position
the edge of the external zero mark. coordinates.
The axis is then moved by the amount of
the home position offset.
The axis is then at the home position. The
position value is set to the value indicated
in the home position coordinates.
Encoder zero mark only The homing command initiates an axis Once the zero mark is detected,
motion towards the zero mark of the synchronization occurs.
encoder. The position value of the axis is set to the
When the zero mark is crossed, the value indicated in the home position
measuring system of the axis is coordinates.
synchronized to this zero mark.
The axis is then moved by the amount of
the home position offset.
The axis is then at the home position. The
position value is set to the value indicated
in the home position coordinates.

5.5.9.7 Home position offset


If you do not wish the axis to be positioned on the synchronization point after homing, but
traversed further by a defined distance, then you must enter a home position offset.
The home position is then calculated from the position of the zero mark and the amount of
the home position offset.

SIMOTION MCC Motion Control Chart


316 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.10 Position axis

This command moves the defined axis (rotary axis, modulo axis, or linear axis) to a position.
The position value entered can be absolute or relative. Modulo axes can also be positioned
via the "shortest path".
The programmed position must lie within the software limit switches.

Figure 5-53 Parameter screen form: Position axis

For additional information on position axes, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 317
MCC commands
5.5 Single axis commands

5.5.10.1 Parameter screen form: Position axis

Table 5- 113 Parameter screen form: Position axis

Field/Button Explanation/instructions
Axis In Axis, select which axis is to travel to a target position. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): posAxis or
followingAxis.
Parameter tab See Overview of parameters for Position axis – Parameter tab (Page 319)
Dynamics tab See Overview of parameters for Position axis – Dynamics tab (Page 320)
Expert tab See Overview of parameters for Position axis – Expert tab (Page 320)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


318 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.10.2 Overview of parameters for Position axis – Parameters tab

Table 5- 114 Overview of parameters for Position axis – Parameters tab

Field/Button Explanation/instructions
Position The meaning depends on the following type parameter:
• "Absolute" type: End position of the motion
• "Relative" type: Distance traversed during the motion, starting from the current axis position.
Enter the value as a signed floating-point number.
Type Here, you specify the meaning of the programmed position in more detail (see above).
Absolute(default value)
The programmed position value is the end position of the motion.
Relative
The value entered in Position generates the traversing distance of the motion, starting from the
current axis position.
Direction Select the direction of the motion. The direction of the motion must be specified in the following
cases:
• Type of motion (see above) is relative (for all axes).
• Type of motion (see above) is absolute and the axis is a modulo rotary axis.
If a positive or negative direction is programmed, the direction has a higher priority than the
position. The position is approached as an absolute value, a negative absolute value, or as a
function of sign. The velocity sign is determined by the specified direction.
Positive
The direction of motion for the command is in the positive axis direction. With relative motion, the
sign of the position is ignored.
Negative
The direction of motion for the command is in the negative axis direction. With relative motion, the
sign of the position is ignored.
From position (for relative type only)
The direction of motion is determined by the position sign.
Shortest path (for absolute and modulo rotary axis only)
The direction of motion for the present command is the direction in which the programmed target
position can be reached via the shortest path.
Last direction set in the program
See Selection list (combo box) (Page 65)
Velocity Velocity value during the constant velocity phase.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Current
Last programmed velocity
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefaultDynamics.velocity
See also Dynamics tab (Page 75).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 319
MCC commands
5.5 Single axis commands

5.5.10.3 Overview of parameters for Position axis – Dynamic response tab

Table 5- 115 Overview of parameters for Position axis – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefaultDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk

5.5.10.4 Overview of parameters for Position axis – Expert tab

Table 5- 116 Overview of parameters for Position axis – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
TO properties Here, you can adapt the parameter dialog box as needed to reflect the effects of axis
configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


320 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.10.5 Example of positioning


An axis must travel at a velocity of 100 mm/s to the position at 1,000 mm. The position
controller enable must be set for the axis before it can be positioned. The pulse and drive
enables must also be set.

Figure 5-54 Example of positioning

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 321
MCC commands
5.5 Single axis commands

5.5.10.6 Relevant system functions for Position axis


Cam technology package:
● _pos

Overview of parameters for Position axis / _pos

Table 5- 117 Parameters (MCC Position axis command compared to _pos system function)

Parameters of the MCC Parameters of the


Position axis command _pos system function
Axis axis
Transition behavior mergemode
Delay program execution nextCommand
Parameters tab
Position position
Type positioningMode
Direction direction
Velocity velocitytype, velocity
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk, positiveAccelEndJerkType,
positiveAccelEndJerk, negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


322 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.11 Travel to fixed endstop

This command activates


● Monitoring of "Travel to fixed end stop" in parallel to an axis motion activated by a motion
command
● Retention of a clamping torque after reaching the fixed end stop
This process is also referred to as "clamping". The method for detecting that the end stop
has been reached (evaluation of the following error or axis torque) is specified during
configuration.
This command can also be used to switch over the clamping torque during active clamping.

Figure 5-55 Parameter screen form: Travel to fixed end stop

For additional information on traveling to fixed end stop, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 323
MCC commands
5.5 Single axis commands

5.5.11.1 Overview of parameters for Travel to fixed endstop

Table 5- 118 Overview of parameters for Travel to fixed endstop

Field/Button Explanation/Instruction
Axis In Axis, select which axis the command is being programmed for. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): posAxis or
followingAxis.
Parameter tab See Overview of parameters for Travel to fixed end stop – Parameters tab (Page 324)
Expert tab See Overview of parameters for Travel to fixed end stop – Expert tab (Page 325)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
If command has been completed or aborted
The next command is executed after the current command has been completed or
aborted.
If clamping value is reached
The next command is executed as soon as the clamping value is reached.
See also Delay program execution (step enabling condition) (Page 83).

5.5.11.2 Overview of parameters for Travel to fixed endstop – Parameters tab

Table 5- 119 Overview of parameters for Travel to fixed endstop – Parameters tab

Field/Button Explanation/instructions
Clamping value Value to which the torque is limited.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed torque
Preassignment (default value)
See also Selection list (combo box) (Page 65)
System variable for preassigned value: userDefaultClamping.ClampingValue.

SIMOTION MCC Motion Control Chart


324 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.11.3 Overview of parameters for Travel to fixed endstop – Expert tab

Table 5- 120 Overview of parameters for Travel to fixed endstop – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

5.5.11.4 Relevant system function for Travel to fixed endstop


Cam technology package:
● _enableMovingToEndStop

Overview of parameters for Travel to fixed endstop / _enableMovingToEndStop

Table 5- 121 Parameters (MCC Travel to fixed endstop command compared to _enableMovingToEndStop)

Parameters of the MCC Parameters of the


Travel to fixed endstop command _enableMovingToEndStop system function
Axis axis
Delay program execution nextCommand
Parameters tab
Clamping value clampingvaluetype, clampingvalue, torquelimitunit
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 325
MCC commands
5.5 Single axis commands

5.5.12 Remove fixed endstop

This command is used to deactivate monitoring of "Travel to fixed end stop" in parallel with
an axis motion activated by a motion command and to discontinue retention of a clamping
torque after reaching the fixed end stop.
The axis is placed in position-controlled operation.

Figure 5-56 Parameter screen form: Remove fixed end stop

For additional information on traveling to fixed end stop, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


326 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.12.1 Overview of parameters for Remove fixed endstop

Table 5- 122 Overview of parameters for Remove fixed endstop

Field/Button Explanation/Instruction
Axis In Axis, select which axis the command is being programmed for. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): posAxis or
followingAxis.
CommandID variable Enter the name of a variable of data type CommandIdType here. With the help of this
variable, you can, for example, trace back the status of the command.
Variables of data type CommandIdType declared in the MCC source file or MCC chart
are provided for selection.
If you leave the CommandID variable field empty, the CommandID is not assigned to any
variables; this means that you cannot access the CommandID (standard).
See also Overview of parameters for the Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 79).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
If command has been completed or aborted
The next command is executed only after the current command has been completed
or aborted.
See also Delay program execution (step enabling condition) (Page 83).

See also
Return value for the system functions of the technology packages (Page 86)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 327
MCC commands
5.5 Single axis commands

5.5.12.2 Relevant system function for Remove fixed endstop


Cam technology package:
● _disableMovingToEndStop

Overview of parameters for Remove fixed endstop / _disableMovingToEndStop

Table 5- 123 Parameters (MCC Remove fixed endstop command compared to _disableMovingToEndStop system function)

Parameters of the MCC Parameters of the


Remove fixed endstop _disableMovingToEndStop system function
Axis axis
CommandID variable commandId
Return variable –
Delay program execution nextCommand

SIMOTION MCC Motion Control Chart


328 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.13 Switch on torque limitation

This command is used to enable torque limitation in parallel to the motion. The torque
limitation acts immediately.

Figure 5-57 Parameter screen form: Switch on torque limitation

For additional information on torque limitation, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 329
MCC commands
5.5 Single axis commands

5.5.13.1 Overview of parameters for Switch on torque limitation

Table 5- 124 Overview of parameters for Switch on torque limitation

Field/Button Explanation/Instruction
Axis In Axis, select which axis the command is being programmed for. The list contains:
All axes that are defined on the relevant device. The axis is defined in the AXES folder in
the project navigator.
All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101) technology object data types):
driveAxis, posAxis, or followingAxis.
Parameters tab See Overview of parameters for Switch on torque limitation – Parameters tab (Page 331)
Expert tab See Overview of parameters for Switch on torque limitation – Expert tab (Page 332)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
If command has been completed or aborted
The next command is executed after the current command has been completed or
aborted.
As soon as the torque is limited
The next command is executed as soon as limiting is initiated.
As soon as torque limiting is disabled
The next command is executed as soon as limiting is disabled.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


330 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.13.2 Overview of parameters for Switch on torque limitation – Parameters tab

Table 5- 125 Overview of parameters for Switch on torque limitation – Parameters tab

Field/Button Meaning/Instruction
Clamping value Value to which the torque or force is limited.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed
The last torque or force limit programmed is applied.
Preassignment (default limit)
The default torque or force limit is applied.
See also: Selection list (combo box) (Page 65)
System variable for preassigned value: userDefaultTorqueLimiting.torqueLimit.
Units Definition of whether the value in the Clamping value field is interpreted as a torque/force
limit on the load or motor end, whereby the unit (torque, force or pressure) is also
determined indirectly.
Load side
The value in the Clamping value field is interpreted as a torque/force limit on the load
side.
Rotary axis/speed-controlled axis: Torque in the unit of measurement selected on the TO
axis, e.g., Nm
Linear axis: Force/pressure in the unit of measurement selected on the TO axis, e.g., N or
Pa
Motor
The value in the Clamping value field is interpreted as a torque/force limit on the drive
side.
Rotary motor: Torque in the unit of measurement selected on the TO axis, e.g., Nm
Linear motor: Force in the unit of measurement selected on the TO axis, e.g., N
%
We distinguish between the following situations in this context:
Direct entry in the "Clamping value" field
Here, the value entered is interpreted as a percentage.
The default value for the torque or power limit (system variable is
userDefaultTorqueLimiting.torqueLimit) is reduced to this percentage.
This reduced limit value is interpreted as a torque/force limit for the load side.
Selecting "Last programmed" in the "Clamping value" field
Here, selecting % has no effect.
The last programmed torque or force limit is interpreted as the torque/force limit for the
load side.
Selecting "Default" in the "Clamping value" field
Here, selecting % has no effect.
The default value for the torque or force limit (system variable is
userDefaultTorqueLimiting.torqueLimit) is interpreted as the torque/force limit for the load
side.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 331
MCC commands
5.5 Single axis commands

5.5.13.3 Overview of parameters for Switch on torque limitation – Expert tab

Table 5- 126 Overview of parameters for Switch on torque limitation – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

5.5.13.4 Relevant system function for Switch on torque limitation


Cam technology package:
● _enableTorqueLimiting

Overview of parameters for Switch on torque limiting / _enableTorqueLimiting

Table 5- 127 Parameters (MCC Switch on torque limiting command compared to _enableTorqueLimiting system function)

Parameters of the MCC Parameters of the


Switch on torque limiting command _enableTorqueLimiting system function
Axis axis
Delay program execution nextCommand
Parameter tab
Clamping value torquelimittype, torquelimit
Units torquelimitunit
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


332 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.14 Deactivate torque limitation

This command is used to switch off torque limitation superimposed on motion commands.

Figure 5-58 Parameter screen form: Switch off torque limitation

For additional information on torque limitation, see the TO Axis Electric/Hydraulic Function
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 333
MCC commands
5.5 Single axis commands

5.5.14.1 Overview of parameters for Switch off torque limitation

Table 5- 128 Overview of parameters for Switch off torque limitation

Field/Button Explanation/Instruction
Axis In Axis, select which axis the command is being programmed for. The list contains:
All axes that are defined on the relevant device. The axis is defined in the AXES folder in
the project navigator.
All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)): driveAxis, posAxis, or
followingAxis.
CommandID variable Enter the name of a variable of data type CommandIdType here. With the help of this
variable, you can, for example, trace back the status of the command.
Variables of data type CommandIdType declared in the MCC source file or MCC chart
are provided for selection.
If you leave the CommandID variable field empty, the CommandID is not assigned to any
variables; this means that you cannot access the CommandID (standard).
See also Overview of parameters for the Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
If command has been completed or aborted
The next command is executed after the current command has been completed or
aborted.
See also Delay program execution (step enabling condition) (Page 83).

5.5.14.2 Relevant system function for Switch off torque limitation


Cam technology package:
● _disableTorqueLimiting

Overview of parameters for switch off torque limitation / _disableTorqueLimiting

Table 5- 129 Parameters (MCC Switch off torque limitation command compared to _disableTorqueLimiting system function)

Parameters of the MCC Parameters of the


Switch off torque limiting command _disableTorqueLimiting system function
Axis axis
CommandID variable commandId
Return variable –
Delay program execution nextCommand

SIMOTION MCC Motion Control Chart


334 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.15 Time-dependent velocity profile

With this command, the axis moves along a velocity profile preset by a cam. The definition
range (x-axis) of the cam is interpreted as time, the value range (y-axis) as the
corresponding velocity.
The profile is traversed from a selectable starting time to the end of the cam.

Figure 5-59 Parameter screen form: Time-dependent velocity profile

For additional information on the time-dependent velocity profile, see the TO Axis
Electric/Hydraulic Function Manual.
For additional information on the position-related velocity profile, see the TO Axis
Electric/Hydraulic Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 335
MCC commands
5.5 Single axis commands

5.5.15.1 Overview of parameters for Time-dependent velocity profile

Table 5- 130 Overview of parameters for Time-dependent velocity profile

Field/Button Explanation/instructions
Axis In Axis, select the axis that is to move along the velocity profile. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder
in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): driveAxis, posAxis,
or followingAxis.
Profile tab See Overview of parameters for Time-dependent velocity profile – Profile tab (Page 336)
Dynamics tab See Overview of parameters for Time-dependent velocity profile – Dynamics tab
(Page 337)
Expert tab See Overview of parameters for Time-dependent velocity profile – Expert tab (Page 337)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

5.5.15.2 Overview of parameters for Time-dependent velocity profile – Profile tab

Table 5- 131 Overview of parameters for Time-dependent velocity profile – Profile tab

Field/Button Explanation/Instruction
Profile Here, you select the cam that describes the time-dependent velocity profile. The following
are available:
• All cams that are defined on the relevant device. The cams are defined in the CAMS
folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): camType.
Start time Here you define the start time within the cam for profile execution.
If you enter 0.0, the profile is executed from the starting point of the cam.
Enter the value as a floating-point number.
See also input field (Page 65).
Type Here, you determine whether the motion should be performed in a speed-controlled or
position-controlled mode.
Position-controlled(default value)
Motion is position-controlled.
Closed-loop speed controlled
Motion is speed-controlled.

SIMOTION MCC Motion Control Chart


336 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.15.3 Overview of parameters for Time-dependent velocity profile – Dynamic response tab

Table 5- 132 Overview of parameters for Time-dependent velocity profile – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Just like all the parameters in the Dynamics tab, this parameter is only evaluated while
approaching and exiting the profile.
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefaultDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk

5.5.15.4 Overview of parameters for Time-dependent velocity profile – Expert tab

Table 5- 133 Overview of parameters for Time-dependent velocity profile – Expert tab

Field/Button Explanation/instructions
The tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 337
MCC commands
5.5 Single axis commands

5.5.15.5 Relevant system function for Time-dependent velocity profile


Cam technology package:
● _runTimeLockedVelocityProfile

Overview of parameters for Time-dependent velocity profile / _runTimeLockedVelocityProfile

Table 5- 134 Parameters (MCC Time-dependent velocity profile command compared to _runTimeLockedVelocityProfile
system function)

Parameters of the MCC Parameters of the


Time-dependent velocity profile command _runTimeLockedVelocityProfile system function
Axis axis
Transition behavior mergemode
Delay program execution nextCommand
Profile tab
Profile profile
Start time starttime
Type movingmode
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


338 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.16 Time-dependent position profile

With this command, the axis moves along a position profile preset by a cam. The definition
range (x-axis) of the cam is interpreted as time, the value range (y-axis) as the
corresponding position.
The profile is traversed from a selectable starting time to the end of the cam.

Figure 5-60 Parameter screen form: Time-dependent position profile

For additional information on the time-dependent position profile, see the TO Axis
Electric/Hydraulic Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 339
MCC commands
5.5 Single axis commands

5.5.16.1 Overview of parameters for Time-dependent position profile

Table 5- 135 Overview of parameters for Time-dependent position profile

Field/Button Explanation/instructions
Axis In Axis, select the axis that is to move along the position profile. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): posAxis or
followingAxis.
Profile tab See Overview of parameters for Time-dependent position profile – Profile tab (Page 340)
Dynamics tab See Overview of parameters for Time-dependent position profile – Dynamics tab
(Page 341)
Expert tab See Overview of parameters for Time-dependent position profile – Expert tab (Page 341)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

5.5.16.2 Overview of parameters for Time-dependent position profile – Profile tab

Table 5- 136 Overview of parameters for Time-dependent position profile – Profile tab

Field/Button Explanation/Instruction
Profile Here, you select the cam that describes the time-dependent position profile. The following
are available:
• All cams that are defined on the relevant device. The cams are defined in the CAMS
folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): camType.
Start time Here you define the start time within the cam for profile execution.
If you enter 0.0, the profile is executed from the starting point of the cam.
Enter the value as a floating-point number.
See also input field (Page 65).
Type Here you can decide how the positions defined by the cam are approached:
Absolute(default value)
The y-values of the cam represent absolute position values.
Relative
The y-values of the cam represent relative references to the current axis position.

SIMOTION MCC Motion Control Chart


340 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.16.3 Overview of parameters for Time-dependent position profile – Dynamic response tab

Table 5- 137 Overview of parameters for Time-dependent position profile – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Just like all the parameters in the Dynamics tab, this parameter is only evaluated while
approaching and exiting the profile.
Velocity The entered value acts during the constant velocity phase.
System variable for preassigned value: userDefaultDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefaultDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefaultDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value: userDefaultDynamics.positiveAccelStartJerk
userDefaultDynamics.positiveAccelEndJerk userDefaultDynamics.negativeAccelStartJerk
userDefaultDynamics.negativeAccelEndJerk

5.5.16.4 Overview of parameters for Time-dependent position profile – Expert tab

Table 5- 138 Overview of parameters for Time-dependent position profile – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 341
MCC commands
5.5 Single axis commands

5.5.16.5 Relevant system function for Time-dependent position profile


Cam technology package:
● _runTimeLockedPositionProfile

Overview of parameters for Time-dependent position profile / _runTimeLockedPositionProfile

Table 5- 139 Parameters (MCC Time-dependent position profile command compared to _runTimeLockedPositionProfile
system function)

Parameters of the MCC Parameters of the


Time-dependent position profile command _runTimeLockedPositionProfile system function
Axis axis
Transition behavior mergemode
Delay program execution nextCommand
Profile tab
Profile profile
Start time starttime
Type profiledatamode
Dynamics tab
Velocity velocitytype, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


342 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.17 Shift measuring system

This command redefines the actual position. It affects the programming, system variable,
and display. You can choose whether to set either a new actual value or a new setpoint.

Note
The command is not associated with a motion.
Actual value and setpoint can also be altered by a defined amount while the axis is in motion
(in the case of type relative).
Relative motions are not affected.

Figure 5-61 Parameter screen form: Shift measuring system

For additional information on shifting the coordinate system, see the TO Axis
Electric/Hydraulic Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 343
MCC commands
5.5 Single axis commands

5.5.17.1 Overview of parameters for Shift measuring system

Table 5- 140 Overview of parameters for Shift measuring system

Field/Button Explanation/instructions
Axis • Here, select the axis for which the position is to be reset. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis is
defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)): posAxis or followingAxis.

See Overview of parameters for Shift measuring system – Set actual value tab (Page 344)
Set actual value tab
Expert See Overview of parameters for Shift measuring system – Expert tab (Page 345)
tab
Delay program Select the check box if you wish to delay execution of the following command until the current
execution command has been completed. If the check box is not selected, the next command is executed
immediately.

5.5.17.2 Overview of parameters for Shift measuring system – Set actual value tab

Table 5- 141 Overview of parameters for Shift measuring system – Set actual value tab

Field/Button Explanation/Instruction
Position Here, you enter the new position value.
See also input field (Page 65).
Type Here, you select the position type.
Absolute / actual value reference
The programmed position is set as a new actual value, and the setpoint is corrected, taking into
account the following error, and set.
Absolute/setpoint reference (default value)
The programmed position is set as a new setpoint, and the actual value is corrected, taking into
account the following error, and set.
Absolute/setpoint reference of superimposed coordinate system
For superimposed motions: The programmed position is set as a new setpoint of the
superimposed motion, and the actual value is corrected, taking into account the following error,
and set.
Absolute/setpoint reference of basic coordinate system
For superimposed motions: The programmed position is set as the new setpoint of the main
motion, and the actual value is corrected, taking into account the following error, and set.
Relative
The programmed position is added to the current setpoint, actual value.

SIMOTION MCC Motion Control Chart


344 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.17.3 Overview of parameters for Shift measuring system – Expert tab

Table 5- 142 Overview of parameters for Shift measuring system – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

5.5.17.4 Relevant system function for Shift measuring system


Cam technology package:
● _redefinePosition

Overview of parameters for Shift measuring system / _redefinePosition

Table 5- 143 Parameters (MCC Shift measuring system command compared to _redefinePosition system function)

Parameters of the MCC Parameters of the


Shift measuring system command _redefinePosition system function
Axis axis
Delay program execution nextCommand
Set actual value tab
Position position
Type redefineSpecification, redefineMode
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 345
MCC commands
5.5 Single axis commands

5.5.18 Online correction

The correction value you enter for overriding velocity and acceleration acts on currently
active commands and all following commands.

Figure 5-62 Parameter screen form: Online correction

For additional information on online correction (override), see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


346 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.18.1 Overview of parameters for Online correction

Table 5- 144 Overview of parameters for Online correction

Field/Button Explanation/Instruction
Axis Select the axes for which you wish to program an override. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES
folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): driveAxis,
posAxis, or followingAxis.
Velocity override • Select this check box if you want to program a velocity override.
• Enter the override factor here. The current velocity value is corrected by the
specified percentage value.
Units: Percentage
Range of values: 0 - 200
The value acts on all presently active commands as well as on all of the
subsequent commands.
See also Input fields and selection lists (Page 65).
Acceleration override • Select this check box if you want to program an acceleration override.
• Enter the override factor here. The current acceleration value is corrected by the
specified percentage value.
Units: Percentage
Range of values: 1 - 1000
The value acts on all presently active commands as well as on all of the
subsequent commands.
See also Input fields and selection lists (Page 65).

5.5.18.2 Relevant system function for Online correction


System variable for speed-controlled (drive) axis, positioning axis, and synchronous
(following) axis technology objects:
● override.

Adjusts the velocity and acceleration override to correct the current velocity and acceleration
by the specified percentage:

Axis
Velocity override Achse.override.velocity
Acceleration override Achse.override,acceleration

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 347
MCC commands
5.5 Single axis commands

5.5.19 Set axis parameter

This command changes the default parameters (USERDEFAULT) for the specified axis.
The programmed axis parameters go into effect when the relevant parameter is set to the
default value in a subsequent motion command.
The USERDEFAULT value settings made during axis configuration take effect again after:
● Power On
● The Reset object command is made by activating the Initialize system variables
checkbox.

Figure 5-63 Parameter screen form: Set axis parameter

For additional information on setting axis parameters, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


348 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.19.1 Overview of parameters for Set axis parameter

Table 5- 145 Overview of parameters for Set axis parameter

Field/Button Meaning/Instruction
Axis In Axis, select the configured axis for which you wish to set one or more new preassigned
values. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder
in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): driveAxis, posAxis,
or followingAxis.
speed For speed-controlled axes only
Default value for the speed during the constant speed phase.
System variable: userDefaultDynamics.velocity
• Select this check box if you want to alter the preassigned value for the speed.
• Enter the preassigned value (see input field (Page 65)).
See also Overview of parameters in the Dynamics tab (Page 75).
Velocity For positioning and synchronous axes only
Preassigned value for velocity during the constant velocity phase.
System variable: userDefaultDynamics.velocity
• Select this check box if you want to alter the preassigned value for velocity.
• Enter the preassigned value (see input field (Page 65)).
See also Overview of parameters in the Dynamics tab (Page 75).
Velocity profile Preassigned value for the velocity profile
System variable: userDefaultDynamics.profile
The velocity profile is used to specify the transitions between the individual motion
phases. The velocity profile influences the motion transitions as follows:
• At the start and end of the acceleration phase, the transition to the constant
acceleration or constant velocity phase
• At the start and end of the deceleration phase, the transition to the constant
deceleration or constant velocity phase
Proceed as follows to change the preassigned value for the velocity profile:
• Select the check box.
• Select the preassigned value.
Smooth
A velocity profile with smooth acceleration characteristic takes effect for this
command.
Application: Velocity profile with controllable jerk characteristic
Trapezoidal (default value)
A trapezoidal velocity profile takes effect for this command. Acceleration and
deceleration can be specified.
See also Overview of parameters in the Dynamics tab (Page 75).
Acceleration Preassigned value for the acceleration during the constant acceleration phase.
System variable for preassigned value: userDefaultDynamics.positiveAccel
• Select this check box if you want to alter the preassigned value for acceleration.
• Enter the preassigned value (see input field (Page 65)).
See also Overview of parameters in the Dynamics tab (Page 75).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 349
MCC commands
5.5 Single axis commands

Field/Button Meaning/Instruction
Deceleration Preassigned value for deceleration during the constant acceleration phase.
System variable: userDefaultDynamics.negativeAccel
• Select this check box if you want to alter the preassigned value for deceleration.
• Enter the preassigned value (see input field (Page 65)).
See also Overview of parameters in the Dynamics tab (Page 75).
Jerk Preassigned value for the change in acceleration or deceleration
• At acceleration start
System variable: userDefaultDynamics.positiveAccelStartJerk
• At acceleration end
System variable: userDefaultDynamics.positiveAccelEndJerk
• At deceleration start
System variable: userDefaultDynamics.negativeAccelStartJerk
• At deceleration end
System variable: userDefaultDynamics.negativeAccelEndJerk
To change the preassigned value for jerk, proceed as follows:
• Select the relevant check box.
• Enter the preassigned value (see input field (Page 65)).
See also Overview of parameters in the Dynamics tab (Page 75).
Time for deceleration Preassigned value for the duration of the braking operation for a quick stop within a
defined period (see Stop axis).
System variable: userDefaultDynamics.stopTime
• Select the check box if you want to alter the preassigned value for the duration of the
braking operation.
• Enter the preassigned value (see input field (Page 65)).
See also Overview of parameters in the Dynamics tab (Page 75).

SIMOTION MCC Motion Control Chart


350 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.19.2 Example of Set axis parameter









① Velocity set during configuration in USERDEFAULT = 300 m/s.


② A velocity of 500 m/s is programmed as the USERDEFAULT.
③ If all motion commands in the subroutine have been programmed with the preassigned value,
the velocity is 500 m/s.
④ A speed of 200 rpm is programmed. The axis rotates at this speed.
Figure 5-64 Example of Set axis parameter

5.5.19.3 Relevant system function for Set axis parameter


System variable for speed-controlled (drive) axis, positioning axis, and synchronous
(following) axis technology objects:
● userDefaultDynamics

Adjusts the default parameters of the specified axis:

Axis
Velocity Achse.userdefaultdynamics.velocity
Velocity profile Achse.userdefaultdynamics.profil
Time for deceleration Achse.userdefaultdynamics.stopTime
Acceleration Achse.userdefaultdynamics.positiveaccel
Deceleration Achse.userdefaultdynamics.negativeaccel
Jerk at start of acceleration Achse.userdefaultdynamics.positiveaccelstartjerk
Jerk at end of acceleration phase Achse.userdefaultdynamics.positiveaccelendjerk
Jerk at start of deceleration Achse.userdefaultdynamics.negativeaccelstartjerk
Jerk at end of deceleration phase Achse.userdefaultdynamics.negativeaccelandjerk

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 351
MCC commands
5.5 Single axis commands

5.5.20 Set virtual axis values

Use the Set virtual axis values command in order to transfer the position, velocity, and
acceleration values for a real master axis or an encoder to a virtual axis. The axis can then,
for example, be programmed using a positioning command.
The axis values of the virtual axis are set only when the master axis is moving. If the
command is executed when the master axis is stationary, the axis values will not be set until
the master axis is next started.

Figure 5-65 Parameter screen form: Set virtual axis values

For additional information on shifting the coordinate system, see the TO Axis
Electric/Hydraulic Function Manual.

SIMOTION MCC Motion Control Chart


352 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.20.1 Overview of parameters for Set virtual axis values

Table 5- 146 Overview of parameters for Set virtual axis values

Field/Button Explanation/instructions
Virtual axis Here, select the axis to be synchronized. All of the virtual axes of the device that have
positioning or synchronous operation functionality are displayed.
Parameters tab See Overview of parameters for Set virtual axis values – Parameter tab (Page 353)
Expert tab See Overview of parameters for Set virtual axis values – Expert tab (Page 353)
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

5.5.20.2 Overview of parameters for Set virtual axis values – Parameters tab

Table 5- 147 Overview of parameters for Set virtual axis values – Parameters tab

Field/Button Explanation/instructions
Leading axis / encoder Here, select the axis for which the position, velocity, or acceleration is to be transferred to
the virtual axis. The list contains:
• All positioning and synchronous (following) axes and external encoders that are
defined on the relevant device.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): posAxis,
followingAxis, or externalEncoderType.
Reference Here, decide whether the virtual axis is to be synchronized to the setpoints or actual
values of the master axis.
Setpoint
The setpoints of the master axis are accepted for the virtual axis.
Actual value(default value)
The actual values of the master axis are accepted for the virtual axis.

5.5.20.3 Overview of parameters for Set virtual axis values – Expert tab

Table 5- 148 Overview of parameters for Set virtual axis values – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 353
MCC commands
5.5 Single axis commands

5.5.20.4 Relevant system function for Set virtual axis values


Cam technology package:
● _redefinePosition
with parameter redefineSpecification := VIRTUAL_AXIS.

Overview of parameters for Set virtual axis values, _redefinePosition

Table 5- 149 Parameters (MCC Set virtual axis values command compared to _redefinePosition system function)

Parameters of the MCC Parameters of the


Set virtual axis values command _redefinePosition system function
Virtual axis axis
Delay program execution nextCommand
Parameter tab
Leading axis/encoder
Reference Leitachse/Geber.positioningstate.commandposition,
Leitachse/Geber.motionstatedata.commandvelocity,
Leitachse/Geber.positioningstate.actualposition;
Leitachse/Geber.motionstatedata.actualvelocity
Expert tab
CommandID variable commandID
Return variable –

SIMOTION MCC Motion Control Chart


354 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.21 Delete command queue

The command queue is a memory for motion commands that have been issued by the
program, but are not yet active. Commands that have not yet been executed can be deleted
from the command queue.
This command allows commands for an axis to be selectively deleted after the axis has been
stopped or the motion sequence has been modified.

Figure 5-66 Parameter screen form: Delete command queue

For additional information on deleting the command queue (motion buffer), see the TO Axis
Electric/Hydraulic Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 355
MCC commands
5.5 Single axis commands

5.5.21.1 Overview of parameters for Delete command queue

Table 5- 150 Overview of parameters for Delete command queue

Field/Button Explanation/instructions
Axis In Axis, select the axis for which the command is to be programmed. The list contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder in
the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)): driveAxis, posAxis, or
followingAxis.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to find
out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 101).

5.5.21.2 Example of Delete command queue







① Waiting ③ Current command (cannot be deleted)


② Command is deleted
Figure 5-67 Example of a command queue

5.5.21.3 Relevant system function for Delete command queue


Cam technology package:
● _resetMotionBuffer

Overview of parameters for Delete command queue, _resetMotionBuffer

Table 5- 151 Parameters (MCC Delete command queue command compared to _resetMotionBuffer system function)

Parameters of the MCC Parameters of the


Delete command queue command _resetMotionBuffer system function
Axis axis
Return variable –

SIMOTION MCC Motion Control Chart


356 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.22 Switch parameter set

Using this command, you can switch over the active controller data set.
Several data sets can be assigned to one Axis technology object, e.g. for multiple measuring
systems/encoders. You can switch among multiple measuring systems/encoders, for
example, by means of data set changeover. All configured measuring systems are internally
active, and the measured values are updated cyclically.

Figure 5-68 Parameter screen form: Switch parameter set

For additional information on activating data sets, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 357
MCC commands
5.5 Single axis commands

5.5.22.1 Overview of parameters for Switch parameter set

Table 5- 152 Overview of parameters for Switch parameter set

Field/Button Explanation/instructions
Axis Here, select the axis for which the controller data set is to be switched over. The list
contains:
• All axes that are defined on the relevant device. The axis is defined in the AXES folder
in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)): driveAxis, posAxis,
or followingAxis.
Parameters tab See Overview of parameters for Switch parameter set – Parameter tab (Page 358)
Expert tab See Overview of parameters for Switch parameter set – Expert tab (Page 358)
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

5.5.22.2 Overview of parameters for Switch parameter set – Parameters tab

Table 5- 153 Overview of parameters for Switch parameter set – Parameters tab

Field/Button Explanation/instructions
Number of the parameter set Here, select the number of the parameter set that is to be activated. Numbers 1 to 31 are
listed. The value can be entered directly or by means of a variable or a calculation
formula. Use a drag-and-drop operation to move variables from the symbol browser. Use
a drag-and-drop operation to move commands from the command library.

5.5.22.3 Overview of parameters for Switch parameter set – Expert tab

Table 5- 154 Overview of parameters for Set virtual axis values – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


358 Programming and Operating Manual, 05/2009
MCC commands
5.5 Single axis commands

5.5.22.4 Relevant system function for Switch parameter set


Cam technology package:
● _setAxisDataSetActive

Overview of parameters for Switch parameter set, _setAxisDataSetActive

Table 5- 155 Parameters (MCC Switch parameter set command compared to _setAxisDataSetActive system function)

Parameters of the MCC Parameters of the


Switch parameter set command _setAxisDataSetActive system function
Axis axis
Delay program execution nextCommand
Parameters tab
Number of the parameter set datasetnumber
Expert tab
CommandID variable commandID
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 359
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6 Commands for external encoders, measuring inputs and output cams

5.6.1 External encoder on

This command enables the external encoder for recording measured values.

Figure 5-69 Parameter screen form: External encoder on

For additional information on the external encoder, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


360 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.1.1 Overview of parameters for External encoder on

Table 5- 156 Overview of parameters for External encoder on

Field/Button Explanation/instructions
Encoder Here, you select the external encoder. The list contains:
• All encoders that are defined on the relevant device. An external encoder is defined in
the EXTERNAL ENCODERS folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)):
externalEncoderType.
CommandID variable Enter the name of a variable of data type CommandIdType here. With the help of this
variable, you can, for example, trace back the status of the command.
CommandId-type variables declared in the MCC source file or MCC chart are provided for
selection.
If you leave the CommandID variable field empty, the CommandID is not assigned to any
variables; this means that you cannot access the CommandID (standard).
See also Overview of parameters for the Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

5.6.1.2 Relevant system function for External encoder on


Cam technology package:
● _enableExternalEncoder

Overview of parameters for External encoder on / _enableExternalEncoder

Table 5- 157 Parameters (MCC External encoder on command compared to _enableExternalEncoder system function)

Parameters of the MCC Parameters of the


External encoder on command _enableExternalEncoder system function
Encoder externalEncoder
CommandID variable commandId
Return variable –
Delay program execution nextCommand

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 361
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.2 External encoder off

This command disables the external encoder for recording measured values.

Figure 5-70 Parameter screen form: External encoder off

For additional information on the external encoder, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


362 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.2.1 Overview of parameters for External encoder off

Table 5- 158 Overview of parameters for External encoder off

Field/Button Explanation/instructions
Encoder Here, you select the external encoder. The list contains:
• All encoders that are defined on the relevant device. An external encoder is defined in
the EXTERNAL ENCODERS folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)):
externalEncoderType.
CommandID variable Enter the name of a variable of data type CommandIdType here. With the help of this
variable, you can, for example, trace back the status of the command.
CommandId-type variables declared in the MCC source file or MCC chart are provided for
selection.
If you leave the CommandID variable field empty, the CommandID is not assigned to any
variables; this means that you cannot access the CommandID (standard).
See also Overview of parameters for the Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

5.6.2.2 Relevant system function for External encoder off


Cam technology package:
● _disableExternalEncoder

Overview of parameters for External encoder off/_disableExternalEncoder

Table 5- 159 Parameters (MCC External encoder off command compared to _disableExternalEncoder system function)

Parameters of the MCC Parameters of the


External encoder off command _disableExternalEncoder system function
encoders externalEncoder
CommandID variable commandId
Return variable –
Delay program execution nextCommand

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 363
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.3 Synchronize external encoder

This command homes the measuring system.

Figure 5-71 Parameter screen form: Synchronize external encoder

For additional information on the external encoder, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


364 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.3.1 Overview of parameters for Synchronize external encoder

Table 5- 160 Overview of parameters for Synchronize external encoder

Field/Button Explanation/instructions
Encoder Select the external encoder to be synchronized in this field. The list contains:
• All encoders that are defined on the relevant device. An external encoder is defined
in the EXTERNAL ENCODERS folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)):
externalEncoderType.
Parameters tab See Overview of parameters for Synchronize external encoder – Parameter tab
(Page 365)
Expert tab See Overview of parameters for Synchronize external encoder – Expert tab
(Page 366)
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

5.6.3.2 Overview of parameters for Synchronize external encoder – Parameters tab

Table 5- 161 Overview of parameters for Synchronize external encoder – Parameters tab

Field/Button Meaning/Instruction
Homing type Here, you select the homing type.
Set home position (default value)
The home position coordinates are directly set to the current axis coordinates. The
current axis position is assigned to the value of the home coordinates. There is no
active traversing motion.
Passive homing
The next time that the axis moves, the first available zero mark is searched for and the
measuring system is synchronized to this zero mark. There is no active traversing
motion as a result of the homing command.
Absolute encoder adjustment
This selection is available only for absolute value encoders, that is, only for encoders
that have been configured as type "absolute value encoder" or "absolute value
encoder, cyclic absolute".
Home position coordinate Coordinates of the home position in the reference system of the axis.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed home position coordinate
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variables for preassigned value: userDefaultHoming.homePosition

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 365
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.3.3 Overview of parameters for Synchronize external encoder – Expert tab

Table 5- 162 Overview of parameters for Synchronize external encoder – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command
status with this variable.
TO properties Here, you can adapt the parameter dialog box as needed to reflect the effects of
encoder configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable
to find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

5.6.3.4 Relevant system function for Synchronize external encoder


Cam technology package:
● _synchronizeExternalEncoder

Overview of parameters for Synchronize external encoder / _synchronizeExternalEncoder

Table 5- 163 Parameter (MCC Synchronize external encoder command compared to _synchronizeExternalEncoder system
function)

Parameters of the MCC Parameters of the


Synchronize external encoder command _synchronizeExternalEncoder system function
Encoder externalEncoder
CommandID variable commandId
Delay program execution nextCommand
Parameter tab
Homing type synchronizingMode
Home position coordinate syncPositionType, syncPosition
Expert tab
CommandID variable commandId
TO properties –
Return variable –

SIMOTION MCC Motion Control Chart


366 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.4 Encoder monitoring on

This command enables encoder monitoring.


At least two encoder systems must be configured for one axis for this purpose. The
difference between the two encoder systems is monitored; an alarm is generated when the
maximum permissible difference is exceeded.

Figure 5-72 Parameter screen form: Encoder monitoring on

For additional information on the external encoder, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 367
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.4.1 Overview of parameters for Encoder monitoring on

Table 5- 164 Overview of parameters for Encoder monitoring on

Field/Button Explanation/instructions
Axis Here, you select the axis for which encoder monitoring is to be enabled.
At least two encoder systems must have been configured for the selected axis during
commissioning (configuration data TypeOfAxis.NumberOfEncoders.numberOfEncoders >
1).
Parameters tab See Overview of parameters for Encoder monitoring on - Parameter tab (Page 368)
Expert tab See Overview of parameters for Encoder monitoring on - Expert tab (Page 368)

5.6.4.2 Overview of parameters for Encoder monitoring on – Parameters tab

Table 5- 165 Overview of parameters for Encoder monitoring on – Parameters tab

Field/Button Explanation/instructions
Reference measuring Select the reference measuring system from the encoder systems configured for the axis.
system
Measuring system 2 Select the second measuring system from the remaining encoder systems configured for the
axis.
Maximum permissible Maximum permissible difference between the two encoder systems.
difference Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: sensormonitoring.MaximalSensorDifference

5.6.4.3 Overview of parameters for Encoder monitoring on – Expert tab

Table 5- 166 Overview of parameters for Encoder monitoring on – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
TO properties Here, you can adapt the parameter dialog box as needed to reflect the effects of encoder
configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

SIMOTION MCC Motion Control Chart


368 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.4.4 Relevant system function for Encoder monitoring on


Cam technology package:
● _enableMonitoringOfEncoderDifference

Overview of parameters for Encoder monitoring on / _enableMonitoringOfEncoderDifference

Table 5- 167 Parameters (MCC Encoder monitoring on command compared to _enableMonitoringOfEncoderDifference


system function)

Parameters of the MCC Parameters of the


Encoder monitoring on command _enableMonitoringOfEncoderDifference system functions
Axis externalEncoder
Parameter tab
Reference measuring system referenceencodertype, referenceEncoder, encoder
Measuring system 2 –
Maximum permissible difference maximalencoderdifferencetype, maximalencoderdifference
Expert tab
TO properties –
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 369
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.5 Encoder monitoring off

This command disables encoder monitoring.

Figure 5-73 Parameter screen form: Encoder monitoring off

For additional information on the external encoder, see the TO Axis Electric/Hydraulic
Function Manual.

SIMOTION MCC Motion Control Chart


370 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.5.1 Overview of parameters for Encoder monitoring off

Table 5- 168 Overview of parameters for Encoder monitoring off

Field/Button Explanation/instructions
Axis Here, you select the axis for which encoder monitoring is to be disabled.
At least two encoder systems must have been configured for the selected axis during
commissioning (configuration data TypeOfAxis.NumberOfEncoders.numberOfEncoders > 1).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to find
out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

5.6.5.2 Relevant system function for Encoder monitoring off


Cam technology package:
● _disableMonitoringOfEncoderDifference

Overview of parameters for Encoder monitoring off / _disableMonitoringOfEncoderDifference

Table 5- 169 Parameters (MCC Encoder monitoring off command compared to _disableMonitoringOfEncoderDifference
system function)

Parameters of the MCC Parameters of the


Encoder monitoring off command _disableMonitoringOfEncoderDifference system function
Axis axis
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 371
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.6 Activate measuring input

This command activates a measuring input for an axis or external encoder. A change in the
signal (edge) at the configured measuring input (e.g., on the SIMOTION device or drive)
causes the current position value to be saved.
You can select how often the measurement is performed:
● One-time: The measuring process must be reactivated for each new measurement.
Several IPO cycle clocks must be performed between the measurements.
● The measuring accuracy depends on the accuracy of the hardware used. It lies in the
range of microseconds.
● Cyclic: The measurement is made cyclically in the configured processing cycle clock of
the Measuring Input technology object.
Cyclical measuring can only be performed with the following devices:
– TM17 High Feature
– C240 (inputs B1 to B4)
– D4xx (onboard measuring inputs)
– SIMOTION CX32 Controller Extension
– SINAMICS CU310/CU320 Control Units
When using global measuring inputs, you can detect and measure up to two edges in
each processing cycle clock (a maximum of 2 edges every 3 position control cycle clocks
with the D4xx, CX32, and CU3xx devices).
The measured values must be read out by the user program before they are overwritten
by a new measurement, i.e., if possible, in the SynchronousTask that corresponds to the
processing cycle clock of the Measuring Input technology object.
For both types, you can also specify:
● The triggering edge of the input signal (e.g., rising, falling, both)
● A measuring range in which the measured value will be acquired
If the measurement is successful, the measurement result is available in the system
variables below in the next cycle clock:
1. The measured values are stored in system variables measuredValue1 and
measuredValue2 (for meaning, see the table below).
2. With one-time measuring, system variable state has the value TRIGGER_OCCURRED.
3. With cyclic measuring, system variables counterMeasuredValue1 and
counterMeasuredValue2 are incremented by 1 on each measurement result. New results
can be traced immediately and can also be read from non-IPO-synchronous tasks.
The only time these counters are set to 0 is in the event of a system startup or technology
object reset.

SIMOTION MCC Motion Control Chart


372 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Table 5- 170 Content of system variables measuredValue1 and measuredValue2 according to the
measurement and the triggering edge.

Measurement Trigger measuredValue1 measuredValue2


once-only One edge (rising or Measured value 1
falling)
Two edges 1st measured value 2nd measured value
chronologically1 chronologically
Cyclic One edge (rising or 1st measured value 2nd measured value
falling) chronologically2 chronologically34
Two edges Measured value at 1st Measured value at 1st
rising edge2 falling edge4
1. In addition, system variable 'state' has the value TRIGGER_OCCURRED.
2. In addition, system variable counterMeasuredValue1 is incremented by 1.
3. With 2 measured values in the same processing cycle clock.
4. In addition, system variable counterMeasuredValue2 is incremented by 1.

With one-time measuring, the command is active until the measurement result is received or
the command is terminated by the Deactivate measuring input command.
The command is active until it is terminated by the Deactivate measuring input command.
Various response times must be taken into account in the application for the measuring
function, depending on the axis/external encoder connection (onboard C2xx, PROFIBUS
axis), the drive used (611U, MASTERDRIVES MC, SINAMICS), and the processing cycle
clock (IPO, IPO2 or position control cycle clock).
An Excel tool, which provides support when determining these times, is included in the
SIMOTION Utilities & Applications. Depending on the type of measuring input used, you can
determine the response times for the measuring input function and also the lead times for
dynamic switching processes within the measuring range.
SIMOTION Utilities & Applications is provided as part of the SIMOTION SCOUT scope of
delivery.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 373
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-74 Parameter screen form: Activate measuring input

Additional information:
● For information on the Measuring Input technology object, see the Output Cams and
Measuring Inputs Function Manual
● For information on commands on the Measuring Input technology object, see the Output
Cams and Measuring Inputs Function Manual
● For general information on cyclic measuring, see the Output Cams and Measuring Inputs
Function Manual

SIMOTION MCC Motion Control Chart


374 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.6.1 Overview of parameters for Activate measuring input

Table 5- 171 Overview of parameters for Activate measuring input

Field/Button Explanation/Instruction
Axis/encoder Here, you select the axis or external encoder for which the actual value is to be
measured using a measuring input. The list contains:
• All positioning and synchronous (following) axes and external encoders that are
defined on the relevant device.
The measuring inputs associated with the selected axis or external encoder are
automatically identified and displayed in the Measuring input field for selection,
as appropriate.
• <Reference>
You select this entry if the measuring input is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
measuringInput (references to measuring inputs) are available for selection in
the Measuring input field (see also Technology object data types (Page 101)).
Notice
You cannot select references to an axis or external encoder (variables of data type
posAxis, followingAxis, or external Encoder). There is no assignment for the
reference to the associated measuring inputs.
Instead, select the reference to the measuring input directly (variable of data type
measuringInputType).
Measuring input Here, the permissible measuring inputs are displayed according to the selected
Axis/Encoder, where they are available for selection, as appropriate:
• A positioning or synchronous axis or external encoder defined on the device was
selected as the axis/encoder:
The measuring inputs associated with the selected axis/encoder are available
for selection.
If you wish to create a new measuring input, click the Create measuring input
button and enter a new name. The measuring input is created for the technology
object that has been selected in the Axis/Encoder field (not for variables).
The configuration can be changed in the project navigator under the respective
axis or external encoder in the MEASURING INPUTS folder.
• <Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC source file or MCC
chart (see Technology object data types (Page 101)) are available for selection:
measuringInputType
These variables are references to measuring inputs.
Parameter tab See Overview of parameters for Activate measuring input – Parameters tab
(Page 376)
Expert tab See Overview of parameters for Activate measuring input – Expert tab (Page 377)
Delay program execution Only if the Activate cyclic measuring check box is not selected.
• Select the check box if you wish to delay execution of the following command
until the current command has been completed. If the check box is not selected,
the next command is executed immediately.
If the Activate cyclic measuring check box is selected, the next command is always
executed immediately.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 375
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.6.2 Overview of parameters for Activate measuring input – Parameters tab

Table 5- 172 Overview of parameters for Activate measuring input – Parameters tab

Field/Button Explanation/instructions
Activate cyclic measuring Select this check box if the actual values are to be acquired cyclically.
(SIMOTION kernel V4.0 and higher) If the check box is not selected, the actual value is acquired one time.
Edge for cyclic measuring Only if the Activate cyclic measuring check box is selected.
(SIMOTION kernel V4.0 and higher) Here, you select whether the actual position is to be measured at a rising or falling
edge of the measuring input.
All edges
The actual position is measured at both edges of the measuring input.
Rising edges only
The actual position is measured only at a rising edge of the measuring input.
Falling edges only
The actual position is measured only at a falling edge of the measuring input.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.measuredEdgeCyclicMode
Edge Only if the Activate cyclic measuring check box is not selected.
Here, you select whether the actual position is to be measured at a rising or falling
edge of the measuring input.
Falling edge
The actual position is measured at the falling edge of the measuring input.
Both
The actual position is measured at both edges of the measuring input.
Both (starting at rising edge)
The actual position is measured at both edges of the measuring input; the first
measurement takes place at a rising edge.
Both (starting at falling edge)
The actual position is measured at both edges of the measuring input; the first
measurement takes place at a falling edge.
Rising edge
The actual position is measured at the rising edge of the measuring input.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.measuredEdge

SIMOTION MCC Motion Control Chart


376 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Field/Button Explanation/instructions
Activate measuring range Select whether the measuring input is only to be active within a certain measuring
range.
Measurement in specified range
Measured value acquisition only takes place in the range specified by the Start of
measuring range and End of measuring range fields.
Measurement without specified range
Measured value acquisition takes place without range limitation; the Start of
measuring range and End of measuring range fields are not visible.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.measuringRangeMode
Start of measuring range Enter the starting point of the measuring range in the editable selection list.
Preassignment (default value)
Last programmed
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.measuringRangeStartPosition
End of measuring range Enter the end point of the measuring range in the editable selection list.
Preassignment (default value)
Last programmed
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.measuringRangeEndPosition

5.6.6.3 Overview of parameters for Activate measuring input – Expert tab

Table 5- 173 Overview of parameters for Activate measuring input – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79) Overview of
parameters for the Expert tab.
CommandID variable If you enter the name of a CommandId-type variable, you can track the command
status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this
variable to find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 377
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.6.4 Relevant system functions for Activate measuring input


Cam technology package
● _enableMeasuringInput, if the Activate cyclic measuring check box is not selected.
● _enableMeasuringInputCyclic, if the Activate cyclic measuring check box is selected.

Overview of parameters for Activate measuring input / _enableMeasuringInput,


_enableMeasuringInputCyclic

Table 5- 174 Parameters (MCC Activate measuring input command compared to _enableMeasuringInput,
_enableMeasuringInputCyclic system functions)

Parameters of the MCC Parameters of the


Activate measuring input command _enableMeasuringInput, _enableMeasuringInputCyclic
system functions
Axis/encoder –
Measuring input measuringInput
Parameters tab
Activate cyclic measuring Call of _enablemeasuringinput or
_enablemeasuringinputcyclic system function
Edge for cyclic measuring measuredEdgeMode
Activate measuring range measuringRangeMode
Start-of-scale value of measuring range measuringRangeStartPositionType,
measuringRangeStartPosition
Full-scale value of measuring range measuringRangeEndPositionType,
measuringRangeEndPosition
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


378 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.7 Deactivate measuring input

This command disables a measuring input on an axis or external encoder. Measured value
acquisition is disabled.

Figure 5-75 Parameter screen form: Deactivate measuring input

Additional information:
● For information on the Measuring Input technology object, see the Output Cams and
Measuring Inputs Function Manual
● For information on commands on the Measuring Input technology object, see the Output
Cams and Measuring Inputs Function Manual
● For general information on cyclic measuring, see the Output Cams and Measuring Inputs
Function Manual

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 379
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.7.1 Overview of parameters for Deactivate measuring input

Table 5- 175 Overview of parameters for Deactivate measuring input

Field/Button Explanation/Instruction
Axis/encoder Here, you select the axis or external encoder for which the actual value acquisition via a
measuring input is to be ended. The list contains:
All positioning and synchronous (following) axes and external encoders that are defined on
the relevant device.
The measuring inputs associated with the selected axis or external encoder are
automatically identified and displayed in the Measuring input field for selection, as
appropriate.
<Reference>
You select this entry if the measuring input is not defined on the device but rather is
specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type measuringInput
(references to measuring inputs) are available for selection in the Measuring input field (see
also Technology object data types (Page 101)).
Notice
You cannot select references to an axis or external encoder (variables of data type posAxis,
followingAxis, or external Encoder). There is no assignment for the reference to the
associated measuring inputs.
Instead, select the reference to the measuring input directly (variable of data type
measuringInputType).
Parameters tab See Overview of parameters for Deactivate measuring input – Parameters tab (Page 380)
Expert tab See Overview of parameters for Deactivate measuring input – Expert tab (Page 381)

5.6.7.2 Overview of parameters for Deactivate measuring input – Parameters tab

Table 5- 176 Overview of parameters for Deactivate measuring input – Parameters tab

Field/Button Explanation/instructions
Measuring input Here, the permissible measuring inputs are displayed according to the selected
Axis/Encoder, where they are available for selection, as appropriate:
A positioning or synchronous axis or external encoder defined on the the device was
selected as the axis/encoder:
The measuring inputs associated with the selected axis/encoder are available for selection.
<Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC source file or MCC chart (see
Technology object data types (Page 101)) are available for selection: measuringInputType
These variables are references to measuring inputs.

SIMOTION MCC Motion Control Chart


380 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.7.3 Overview of parameters for Deactivate measuring input – Expert tab

Table 5- 177 Overview of parameters for Deactivate measuring input – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

5.6.7.4 Relevant system functions for Deactivate measuring input


Cam technology package:
● _disableMeasuringInput

Overview of parameters for Deactivate measuring input / _disableMeasuringInput

Table 5- 178 Parameters (MCC Deactivate measuring input command compared to _disableMeasuringInput system
function)

Parameters of the MCC Parameters of the


Deactivate measuring input command _disableMeasuringInput system function
Axis/encoder externalEncoder
Parameters tab
Measuring input referenceencodertype, referenceEncoder, encoder
Expert tab
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 381
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.8 Synchronize measuring system

This command synchronizes two measuring systems or returns the difference between the
specified measuring systems.

Figure 5-76 Parameter screen form: Synchronize measuring system

SIMOTION MCC Motion Control Chart


382 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.8.1 Overview of parameters for Synchronize measuring system

Table 5- 179 Overview of parameters for Synchronize measuring system

Field/Button Explanation/instructions
Axis Select the axis whose measuring system is to be switched over. The list contains:
• All positioning and synchronous axes that are defined on the relevant device. The axis
is defined in the AXES folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Description of technology object data types (Page 101)) driveAxis, posAxis or
followingAxis.
Parameter tab See Overview of parameters for Synchronize measuring system – Parameter tab
(Page 383)
Expert tab See Overview of parameters for Synchronize measuring system – Expert tab (Page 384)
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

5.6.8.2 Overview of parameters for Synchronize measuring system – Parameters tab

Table 5- 180 Overview of parameters for Synchronize measuring system – Parameters tab

Field/Button Explanation/instructions
Number of the measuring Measuring system to be selected; possible values are 1 to 8.
system to be synchronized 1 (default value)
Measuring system 1
Use current measuring system Select this check box if the current measuring system is to be used as a reference
as reference measuring system.
Reference measuring system Here, you select the reference measuring system if you do not wish to use the current
measuring system. You can enter a value between 1 and 8. This field is shaded by
default; it is activated only if you clear the check box Use current measuring system as
reference.
1 (default value)
Measuring system 1
Synchronize measuring Select this check box if the measuring systems are to be synchronized with one another.
systems
Read difference between Select this check box if you want the difference between the two measuring systems to
measuring systems be stored in a variable.
Differential variable In this field, a variable of type LREAL can be specified to contain the difference between
measuring systems once the command is executed. This field is only visible, if the "Read
difference between measuring systems" check box is selected.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 383
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.8.3 Overview of parameters for Synchronize measuring system – Expert tab

Table 5- 181 Overview of parameters for Synchronize measuring system – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call and to manage the received data.
Data type DINT, for a description see table below.

Table 5- 182 Structure of the return value (TYPE StructRetEncoderValue)

Parameter / data type Meaning/values Values


functionResult Error code 0: if command execution is okay
(DINT) <> 0: if an error has occurred
See Return value for the system functions
of the technology packages (Page 86).
encoderDifference Difference of specified measuring systems
(LREAL)

SIMOTION MCC Motion Control Chart


384 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.8.4 Relevant system function for Synchronize measuring system


Cam technology package:
● _setAndGetEncoderValue
Based on the Read difference between measuring systems check box, the value from
_MccRetStructRetEncoderValue.encoderDifference is copied to the differential variable.

Overview of parameters for Synchronize measuring system / _setAndGetEncoderValue

Table 5- 183 Parameters (MCC Synchronize measuring system command compared to _setAndGetEncoderValue system
function)

Parameters of the MCC Parameters of the


Synchronize measuring system command _setAndGetEncoderValue system function
Axis axis
Delay program execution nextCommand
Parameters tab
Number of the measuring system to be synchronized encoder
Use current measuring system as reference referenceEncoderType
Reference measuring system referenceEncoderType, referenceEncoder
Synchronize measuring systems mode
Read difference between measuring systems –
Differential variable –
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 385
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.9 Switch output cam on

This command can be used to assign parameters for an output cam and then to switch it on.
An output cam generates position-dependent switching signals for positioning or
synchronous axes or external encoders. The output cam types below are available. You
specify the type during configuration of the output cam:
● Position-based cam
The switching signal occurs between the starting position and end position of the output
cam.
● Time-based output cam
The switching signal is supplied for a specified time period after the starting position is
reached.
● Unidirectional output cam
The switching signal occurs when the axis reaches the starting position; it can only be
reset by switching off the output cam.
Position-based and time-based cams can also be assigned as counter cams.
The switching signal is available in system variable state and, if configured accordingly, also
on a digital output.
The output cam can be switched off:
● With the commands
– Switch output cam off (Page 398) or
– Switch output cam signal (Page 401) ,
● By switching on the same output cam again with different parameters, if necessary
The parameter dialog box displays different parameters depending on the axis type and the
configured output cam type.
Below are the parameter dialog boxes for a rotary axis and a linear axis showing the settings
for different output cam types.

SIMOTION MCC Motion Control Chart


386 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-77 Parameter screen form: Switch output cam on for rotary axis with uni-directional output
cam

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 387
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-78 Parameter screen form: Switch output cam on for rotary axis with position-based cam

SIMOTION MCC Motion Control Chart


388 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-79 Parameter screen form: Switch output cam on for rotary axis with time-based cam

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 389
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-80 Parameter screen form: Switch output cam on for linear axis with uni-directional output
cam

SIMOTION MCC Motion Control Chart


390 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-81 Parameter screen form: Switch output cam on for linear axis with position-based cam

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 391
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-82 Parameter screen form: Switch output cam on for linear axis with time-based cam

For additional information on the Output Cam technology object, see the Output Cams and
Measuring Inputs Function Manual.
For additional information on the commands on the Output Cam technology object, see the
Output Cams and Measuring Inputs Function Manual.

SIMOTION MCC Motion Control Chart


392 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.9.1 Overview of parameters for Switch output cam on

Table 5- 184 Overview of parameters for Switch output cam on

Field/Button Explanation/Instruction
Axis/encoder Here, you select the axis or external encoder to which the output cam to be activated is
associated. The list contains:
• All positioning, synchronous (following), and path axes and external encoders that are
defined on the relevant device.
The output cams associated with the selected axis or external encoder are automatically
identified and displayed in the Output cam field for selection, as appropriate.
• <Reference>
You select this entry if the output cam is not defined on the device but rather is specified as
a reference (variable).
All variables declared in the MCC unit or MCC chart with data type outputCamType
(references to output cams) are available for selection in the Output cam field (see also
Technology object data types (Page 101)).
Notice
You cannot select references to an axis or external encoder (variables of data type posAxis,
followingAxis, pathAxis, or external Encoder). There is no assignment for the reference to the
associated output cams.
Instead, select the reference to the output cam directly (variable of data type outputCamType).
Output cam Here, the permissible output cams are displayed according to the selected Axis/Encoder, where
they are available for selection, as appropriate:
• A positioning, synchronous, or path axis or external encoder defined on the the device was
selected as the axis/encoder:
The output cams associated with the selected axis/encoder are available for selection.
If you wish to create a new output cam, click the Create output cam button and enter a new
name. The output cam is created for the technology object that has been selected in the
Axis/Encoder field (not for variables).
The configuration can be changed in the project navigator under the respective axis or
external encoder in the OUTPUT CAMS folder.
• <Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC source file or MCC chart (see
Technology object data types (Page 101)) are available for selection: outputCamType.
These variables are references to output cams.
Parameter tab See Overview of parameters for Switch output cam on - Parameters tab (Page 394)
Expert tab See Overview of parameters for Switch output cam on - Expert tab (Page 396)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 393
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.9.2 Overview of parameters for Switch output cam on – Parameters tab

Table 5- 185 Overview of parameters for Switch output cam on – Parameters tab

Field/Button Explanation/Instruction
Starting position With position-based cams: switching signal is activated between the starting position and end
position.
With time-based cams and unidirectional output cams: Position at which the switching signal is
activated.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)). The meaning is dependent on the Add switching positions check box.
• Check box cleared: The entered value represents an absolute position.
• Check box selected: The entered value is relative and is added to the last programmed
starting position.
Last programmed position
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.switchOnPosition
End position For position-based cams only: switching signal is activated between the starting position and
end position.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)). The meaning is dependent on the Add switching positions check box.
• Check box cleared: The entered value represents an absolute position.
• Check box selected: The entered value is relative and is added to the last programmed end
position.
Last programmed position
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.switchOffPosition
Add switching positions Select the check box, if you want the entered values for the start position and the end position
to be regarded as relative positions. The values are then added to the last programmed
position each time.
If this check box is cleared, the entered values for the start position and the end position are
regarded as absolute positions.
ON duration ON duration for time-based cams. Once the axis has crossed the starting position, the
switching signal of a time-based cam remains enabled for the programmed ON duration.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Last programmed ON duration
Preassigned value (default value)
See selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.switchOnDuration

SIMOTION MCC Motion Control Chart


394 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Field/Button Explanation/Instruction
Activation time The activation time shifts the switch-on instant of the output cam.
Method of operation:
• Negative value: Output cam activation is moved up. For example, this allows you to
compensate for delay times of digital outputs and connected switching elements.
• Positive value: Output cam activation is delayed.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.activationTime.
Deactivation time The deactivation time shifts the switch-off instant of the output cam.
Method of operation:
• Negative value: Output cam deactivation is moved up. For example, this allows you to
compensate for delay times of digital outputs and connected switching elements.
• Positive value: Output cam deactivation is delayed.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.deactivationTime.
Hysteresis The hysteresis defines a filter range around the switching position. The output signal is not
switched if the axis moves in the hysteresis range around the switching position. This avoids
flickering switching status changes.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Last programmed hysteresis
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.noSwitchingRange
Effective direction Here, select the current effective direction. The output cam only switches when the motion
direction and effective direction are identical.
Enter the value in the editable selection list (see Editable selection list (editable combo box)
(Page 66)).
Both directions
The output cam switches in both axis directions.
Positive
The output cam switches when axis direction is positive.
Negative
The output cam switches when axis direction is negative.
Last programmed effective direction
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.forceDirection.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 395
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Field/Button Explanation/Instruction
Invert Here, you choose whether or not the switching state of the output of the output cam is to be
inverted.
Do not invert (default value)
The output of the output cam is not inverted
Invert
The output of the output cam is inverted
Maintain current switching state
The current setting for inverting the output of the output cam is kept.
Set output cam counter Select this check box if the output cam is to be configured as a counter cam.
If the check box is cleared, the status of the counter cam remains unchanged.
For a counter cam, it can be specified whether the output cam is to be output every time it
switches or every nth time it switches.
Every counter cam has a counter start value and a current counter value. The current counter
value for the output cam is reduced by 1 every time the output cam switches.
• If the current counter value reaches 0, the output cam is output (system variable 'state' and
output of output cam). At the same time, the current counter value is reset to the counter
start value.
• If the current counter value does not reach 0, the output of the output cam is suppressed.
The current counter value and the counter start value both have a preassigned value of 1; the
current values can be queried with system variables counterCamData.actualValue and
counterCamData.startValue.
These values are not reset by the system, e.g., with the Switch output cam off command.
Current counter value Only if the Set output cam counter check box is selected:
Here, you enter the current counter value as an integer.
See also input field (Page 65).
Counter start value Only if the Set output cam counter check box is selected:
Here, you enter the counter start value as an integer.
See also input field (Page 65).

5.6.9.3 Overview of parameters for Switch output cam on – Expert tab

Table 5- 186 Overview of parameters for Switch output cam on – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
TO properties Here, you can adapt the parameter screen form as needed to reflect the effects of axis/encoder
or software output cam configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to find
out the result of the command call.
Data type DINT, for a description, see Return value for the system functions of the technology
packages (Page 86).

SIMOTION MCC Motion Control Chart


396 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.9.4 Relevant system functions for Switch output cam on


Cam technology package:
● _enableOutputCam
● _setOutputCamCounter (if assigned as a counter cam)
Based on the Set output cam counter check box, the _setOutputCamCounter function is
called first.

Overview of parameters for Switch output cam on / _enableOutputCam, _setOutputCamCounter

Table 5- 187 Parameters (MCC Switch output cam on command compared to _enableOutputCam and
_setOutputCamCounter system functions)

Parameters of the MCC Parameters of the


Switch output cam on command _enableOutputCam and _setOutputCamCounter system
functions
Axis/encoder –
Output cam outputCam
Parameter tab
Starting position switchOnPosition
End position switchOffValue
Add switching positions switchOnPositionType, switchOffValueType
ON duration switchOffValue
Activation time activationTimeType, activationTime
Deactivation time deactivationTimeType, deactivationTime
Hysteresis noSwitchingRangeType, noSwitchingRange
Effective direction forceDirection
Invert invertOutput
Set output cam counter Call of _setOutputCamCounter system function
Current counter value actualValue
Counter start value startValueMode, startValue
Expert tab
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 397
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.10 Switch output cam off

This command is used to switch off an output cam that was switched on with the Switch
output cam on command.

Figure 5-83 Parameter screen form: Switch output cam off

For additional information on the Output Cam technology object, see the Output Cams and
Measuring Inputs Function Manual.
For additional information on the commands on the Output Cam technology object, see the
Output Cams and Measuring Inputs Function Manual.

SIMOTION MCC Motion Control Chart


398 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.10.1 Overview of parameters for Switch output cam off

Table 5- 188 Overview of parameters for Switch output cam off

Field/Button Explanation/Instruction
Axis/encoder Here, you select the axis or external encoder to which the output cam to be deactivated is
associated. The list contains:
• All positioning, synchronous (following), and path axes and external encoders that are
defined on the relevant device.
The output cams associated with the selected axis or external encoder are automatically
identified and displayed in the Output cam field for selection, as appropriate.
• <Reference>
You select this entry if the output cam is not defined on the device but rather is specified
as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type outputCamType
(references to output cams) are available for selection in the Output cam field (see also
Technology object data types (Page 101)).
Notice
You cannot select references to an axis or external encoder (variables of data type posAxis,
followingAxis, pathAxis, or external Encoder). There is no assignment for the reference to
the associated output cams.
Instead, select the reference to the output cam directly (variable of data type
outputCamType).
Output cam Here, the permissible output cams are displayed according to the selected Axis/Encoder,
where they are available for selection, as appropriate:
• A positioning, synchronous, or path axis or external encoder defined on the the device
was selected as the axis/encoder:
The output cams associated with the selected axis/encoder are available for selection.
• <Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)) are available for selection:
outputCamType.
These variables are references to output cams.
Parameter tab See Overview of parameters for Switch output cam off - Parameters tab (Page 399)
Expert tab See Overview of parameters for Switch output cam off - Expert tab (Page 400)

5.6.10.2 Overview of parameters for Switch output cam off – Parameters tab

Table 5- 189 Overview of parameters for Switch output cam off – Parameters tab

Field/Button Explanation/instructions
Output cam permanently On Select this check box if you wish the output cam to remain ON permanently after it is
disabled. If the check box is not selected, the output of the output cam is reset when you
disable the output cam.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 399
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.10.3 Overview of parameters for Switch output cam off – Expert tab

Table 5- 190 Overview of parameters for Switch output cam off – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

5.6.10.4 Relevant system functions for Switch output cam off


Cam technology package:
● _disableOutputCam, if the Output cam permanently On check box is not selected.
● _setOutputCamState, if the Output cam permanently On check box is selected.

Overview of parameters for Switch output cam off / _disableOutputCam, _setOutputCamState

Table 5- 191 Parameters (MCC Switch output cam off command compared to _disableOutputCam and
_setOutputCamState system functions)

Parameters of the MCC Parameters of the


Switch output cam off command _disableOutputCam and _setOutputCamState system
functions
Axis/encoder –
Output cam outputCam
Parameters tab
Output cam permanently On Call of _disableOutputCam or _setOutputCamState system
function
Expert tab
Return variable –

SIMOTION MCC Motion Control Chart


400 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.11 Switch output cam signal

This function is available in SIMOTION kernel Version 4.1 and higher.


This command allows you to switch an output cam and set its switching signal to the
specified value. This output cam signal is available in system variable state and, if configured
accordingly, also on a digital output. This terminates any current output cam processing that
was started, for example, with the "Switch output cam on (Page 386)" command.
If the output cam was configured as a high-speed output cam on the relevant devices (e.g.,
SIMOTION D4xx, C240, TM15, TM17 High Feature), the following also applies:
● You can switch the assigned digital output at specific times during the configured
processing cycle clock of the output cam.
● The time offset specified in the command is added to the system-dependent output delay
of the output cam signal (tOutput system variable). The resulting time offset (programmed
time offset + value of tOutput system variable) must be smaller than the duration of the
processing cycle clock.

NOTICE
During a processing cycle clock, the output cam signal can only be switched on and
switched off once. If an attempt is made to switch the output cam on or off more than
once during a processing cycle clock, the values of the last effective command apply.

If the output cam is not configured as a high-speed output cam (output cam without time
stamp, e.g. digital outputs on the SIMOTION C230-2 device), a programmed time offset is
ignored. The tOutput system variable is assigned the value 0.0.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 401
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-84 Parameter screen form: Switch output cam signal

For additional information on the Output Cam technology object, see the Output Cams and
Measuring Inputs Function Manual.
For additional information on exact-time setting of an output and exact-time output cams,
see the Output Cams and Measuring Inputs Function Manual.

SIMOTION MCC Motion Control Chart


402 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.11.1 Overview of parameters for Switch output cam signal

Table 5- 192 Overview of parameters for Switch output cam signal

Field/Button Explanation/instructions
Axis/encoder Here, you select the axis or external encoder to which the output cam to be switched on is
associated. The list contains:
• All positioning, synchronous (following), and path axes and external encoders that are
defined on the relevant device.
The output cams associated with the selected axis or external encoder are automatically
identified and displayed in the Output cam field for selection, as appropriate.
• <Reference>
You select this entry if the output cam is not defined on the device but rather is specified
as a reference (variable).
All variables declared in the MCC source file or MCC chart with data type
outputCamType (references to output cams) are available for selection in the Output cam
field.
Notice
You cannot select references to an axis or external encoder (variables of data type posAxis,
followingAxis, pathAxis, or external Encoder). There is no assignment for the reference to
the associated output cams.
Instead, select the reference to the output cam directly (variable of data type
outputCamType).
Output cam Here, the permissible output cams are displayed according to the selected Axis/Encoder,
where they are available for selection, as appropriate:
• A positioning, synchronous, or path axis or external encoder defined on the the device
was selected as the axis/encoder:
The output cams associated with the selected axis/encoder are available for selection.
• <Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)) are available for selection:
outputCamType.
These variables are references to output cams.
Parameter tab See Overview of parameters for Switch output cam signal - Parameter tab (Page 404)
Expert tab See Overview of parameters for Switch output cam signal - Expert tab (Page 404)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 403
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.11.2 Overview of parameters for Switch output cam signal – Parameters tab

Table 5- 193 Overview of parameters for Switch output cam off – Parameters tab

Field/Button Explanation/instructions
Time offset This parameter is only evaluated if the output cam was configured as a high-speed output
cam on the corresponding hardware (e. g., SIMOTION devices D4xx, C240, TM15,
TM17 High Feature).
Here, you specify the time offset with which you can switch the assigned digital output at
specific times during the configured processing cycle clock of the output cam. The specified
time offset is added to the system-dependent output delay of the output cam signal (tOutput
system variable). The resulting time offset (programmed time offset + value of tOutput
system variable) must be smaller than the duration of the processing cycle clock.
Enter the value as a signed floating-point number.
See Input field (Page 65).
Notice
During a processing cycle clock, the output cam signal can only be switched on one time
and/or switched off one time. If an attempt is made to switch the output cam on or off more
than once during a processing cycle clock, the values of the last effective command apply.
Output cam status How to select the output cam signal (switching signal of the output cam):
Output cam on
The output cam signal is switched on.
Output cam off
The output cam signal is switched off.

5.6.11.3 Overview of parameters for Switch output cam signal – Expert tab

Table 5- 194 Overview of parameters for Switch output cam signal – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT, for a description, see Return value for the system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


404 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.11.4 Relevant system functions for Switch output cam signal


Cam technology package:
● _setOutputCamState

Overview of parameters for Switch output cam signal / _setOutputCamState

Table 5- 195 Parameters (MCC Switch output cam signal command compared to _setOutputCamState system function)

Parameters of the MCC Parameters of the


Switch output cam signal _setOutputCamState system functions
Axis/encoder –
Output cam outputCam
Parameters tab
Time offset timeOffset
Output cam status stateType
Expert tab
Return variable –

5.6.12 Output cam track On

This command is used to assign parameters for an output cam track and then to switch it on.
A cam track provides the switching signal of multiple output cams of the same type (single
output cams) in system variable state. If configured accordingly, the switching signal is also
available on a digital output.
The output cam types below are available for single output cams. You specify the type
during configuration of the output cam:
● Position-based cam
The switching signal occurs between the starting position and end position of a single
output cam.
● Time-based output cam
The switching signal is supplied for a specified time period after the starting position of a
single cam is reached.
● Time-based cam with maximum ON length
The switching signal is supplied for a specified time period after the starting position of a
single cam is reached.
A maximum ON length can also be defined. It limits the duration of the switching signal to
the time it takes to cover this distance

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 405
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

The output cam track can be switched off:


● With the Output cam track Off command
● By switching on the same output cam track again with different parameters, if necessary
Different screen forms are displayed depending on the axis type.

Figure 5-85 Parameter screen form: Output cam track On for a rotary axis

SIMOTION MCC Motion Control Chart


406 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Figure 5-86 Parameter screen form: Output cam track On for a linear axis

For additional information on the Cam Track technology object, see the Output Cams and
Measuring Inputs Function Manual.
For additional information on the commands on the Cam Track technology object, see the
Output Cams and Measuring Inputs Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 407
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.12.1 Overview of parameters for Output cam track On

Table 5- 196 Overview of parameters for Output cam track On

Field/Button Explanation/Instruction
Axis/encoder Here, you select the axis or external encoder to which the output cam track to be
activated is associated. The list contains:
• All positioning and synchronous (following) axes and external encoders that are
defined on the relevant device.
The output cam tracks associated with the selected axis or external encoder are
automatically identified and displayed in the Output cam track field for selection, as
appropriate.
• <Reference>
You select this entry if the output cam track is not defined on the device but rather is
specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type _camTrackType
(references to cam tracks) are available for selection in the Cam track field (see also
Technology object data types (Page 101)).
Notice
You cannot select references to an axis or external encoder (variables of data type
posAxis, followingAxis, or external Encoder). There is no assignment for the reference to
the associated output cam tracks.
Instead, select the reference to the output cam track directly (variable of data type
_camTrackType).
Cam track (camTrackType) Here, the permissible output cam tracks are displayed according to the selected
Axis/Encoder, where they are available for selection, as appropriate:
• A positioning or synchronous axis or external encoder defined on the the device was
selected as the axis/encoder:
The output cam tracks associated with the selected axis/encoder are available for
selection.
If you wish to create a new output cam track, click the Create output cam track button
and enter a new name. The output cam track is created for the technology object that
has been selected in the Axis/Encoder field (not for variables).
The configuration can be changed in the project navigator under the respective axis or
external encoder in the OUTPUT CAMS folder.
• <Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC unit or MCC chart (see
Description of the technology object data types (Page 101)) are available for
selection: _camTrackType.
These variables are references to output cam tracks.
Parameter tab See Overview of parameters for Output cam track on - Parameters tab (Page 409)

SIMOTION MCC Motion Control Chart


408 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Field/Button Explanation/Instruction
Expert tab See Overview of parameters for Output cam track on - Expert tab (Page 411)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
At output cam track end
The next command is executed if the output cam track processing is finished.
When output cam track is activated
The next command is executed as soon as the output cam track is activated.
See also Delay program execution (step enabling condition) (Page 83).

5.6.12.2 Overview of parameters for Output cam track On – Parameters tab

Table 5- 197 Overview of parameters for Output cam track On – Parameters tab

Field/Button Explanation/instructions
Track length Here, you define the length of the output cam track. The individual output cams are
mapped onto the output cam track by converting their position values to modulo values
with respect to the track length.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.camTrackLength.
Axis reference position Here, you specify how the output cam track is mapped onto the axis, i.e., the axis position
starting from which the output cam track is to be output.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.axisReferencePosition.
Activation time The activation time shifts the switch-on instant of the single output cam.
Method of operation:
Negative value: Single output cam activation is moved up. For example, this allows you to
compensate for delay times of digital outputs and connected switching elements.
Positive value: Single output cam activation is delayed.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.activationTime

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 409
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

Field/Button Explanation/instructions
Deactivation time The deactivation time shifts the switch-off instant of the single output cam.
Method of operation:
• Negative value: Single output cam deactivation is moved up. For example, this allows
you to compensate for delay times of digital outputs and connected switching
elements.
• Positive value: Single output cam deactivation is delayed.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.deactivationTime.
Hysteresis The hysteresis defines a filter range around the switching position. The output signal is
not switched if the axis moves in the hysteresis range around the switching position. This
avoids flickering switching status changes.
Enter the value in the editable selection list (see Editable selection list (editable combo
box) (Page 66)).
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.hysteresisRange.
Activation mode Non-cyclical output cam track activation
The output cam track is mapped starting from the axis reference position, output once,
and terminated automatically after it is exited.
Cyclical output cam track activation
The track length of the output cam track starting from the axis reference position is
mapped and cyclically continued/repeated.
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.activationMode.
Start mode The start mode is used to define when the cam track should become effective after
activation or the process for switching between output cam tracks.
With next track cycle
The output cam track processing takes effect at the first cam cycle, i.e., as soon as the
first single cam switches the new track. Up to that point, a time-based cam of the previous
output cam track will be output.
Immediately
The output cam track processing takes effect immediately. If an output cam track is
already active, it is aborted.
Immediately when output cam output is inactive
The output cam track processing takes effect as soon as there are no more active single
output cams of the previous output cam track. An active single output cam of the previous
cam track will be output completely.
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.startMode.

SIMOTION MCC Motion Control Chart


410 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.12.3 Overview of parameters for Output cam track On – Expert tab

Table 5- 198 Overview of parameters for Output cam track On – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
TO properties Here, you can adapt the parameter dialog box as needed to reflect the effects of
axis/encoder or output cam track configuration data or system variables.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

5.6.12.4 Relevant system function for Output cam track On


Cam technology package:
● _enableCamTrack

Overview of parameters for Output cam track On / _enableCamTrack

Table 5- 199 Parameters (MCC Output cam track On command compared to _enableCamTrack system functions)

Parameters of the MCC Parameters of the


Output cam track On command _enableCamTrack system functions
Axis/encoder –
Cam track (camTrackType) camtrack
Delay program execution nextCommand
Parameter tab
Track length camtrackLengthType, camtrackLength
Axis reference position axisReferencePosition
Activation time activationTimeType, activationTime
Deactivation time deactivationTimeType, deactivationTime
Hysteresis hysteresisRangeType, hysteresisRange
Activation mode activationMode
Start mode startMode
Expert tab
CommandID variable commandId
TO properties –
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 411
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.13 Output cam track Off

This command is used to switch off an output cam track that was switched on with the
Output cam track On command.

Figure 5-87 Parameter screen form: Output cam track Off

For additional information on the Cam Track technology object, see the Output Cams and
Measuring Inputs Function Manual.
For additional information on the commands on the Cam Track technology object, see the
Output Cams and Measuring Inputs Function Manual.

SIMOTION MCC Motion Control Chart


412 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.13.1 Overview of parameters for Output cam track Off

Table 5- 200 Overview of parameters for Output cam track Off

Field/Button Explanation/Instruction
Axis/encoder Here, you select the axis or external encoder to which the output cam track to be
deactivated is associated. The list contains:
• All positioning and synchronous (following) axes and external encoders that are
defined on the relevant device.
The output cam tracks associated with the selected axis or external encoder are
automatically identified and displayed in the Measuring input field for selection, as
appropriate.
• <Reference>
You select this entry if the output cam track is not defined on the device but rather is
specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type _camTrackType
(references to cam tracks) are available for selection in the Cam track field (see also
Technology object data types (Page 101)).
Notice
You cannot select references to an axis or external encoder (variables of data type
posAxis, followingAxis, or external Encoder). There is no assignment for the reference to
the associated output cam tracks.
Instead, select the reference to the output cam track directly (variable of data type
_camTrackType).
Cam track (camTrackType) Here, the permissible output cam tracks are displayed according to the selected
Axis/Encoder and are available for selection, as appropriate:
• A positioning or synchronous axis or external encoder defined on the the device was
selected as the axis/encoder:
The output cam tracks associated with the selected axis/encoder are available for
selection.
• <Reference> was selected as the axis/encoder:
All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)) are available for selection:
_camTrackType.
These variables are references to output cam tracks.
Parameter tab See Overview of parameters for Output cam track off - Parameters tab (Page 414)
Expert tab See Overview of parameters for Output cam track off - Expert tab (Page 414)
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed.
If the check box is not selected, the next command is executed immediately.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 413
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.13.2 Overview of parameters for Output cam track Off – Parameters tab

Table 5- 201 Overview of parameters for Output cam track Off – Parameters tab

Field/Button Explanation/instructions
Stop mode The stop mode is used to define the behavior of the output cam track on deactivation.
Immediately
The output cam track processing is deactivated immediately. Any active single cam of the
output cam track is aborted.
Immediately when output cam output is inactive
The output cam track processing is deactivated as soon as there are no more active
single output cams of the output cam track. An active single output cam will be output
completely.
At end of output cam track
The output cam track processing is deactivated as soon as the last single cam of the
track switches. Up to that point, a time-based cam will be output.
The stop mode is used to define when the cam track should become effective after
activation, or how tracks should be changed.
Last programmed
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.startMode.

5.6.13.3 Overview of parameters for Output cam track Off – Expert tab

Table 5- 202 Overview of parameters for Output cam track Off – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


414 Programming and Operating Manual, 05/2009
MCC commands
5.6 Commands for external encoders, measuring inputs and output cams

5.6.13.4 Relevant system function for Output cam track Off


Cam technology package:
● _disableCamTrack

Overview of parameters for Output cam track Off / _disableCamTrack

Table 5- 203 Parameters (MCC Output cam track Off command compared to _disableCamTrack system functions)

Parameters of the MCC Parameters of the


Output cam track Off command _disableCamTrack system function
Axis/encoder –
Cam track (camTrackType) camtrack
Delay program execution nextCommand
Parameters tab
Stop mode stopMode
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 415
MCC commands
5.7 Commands for synchronous operation and camming

5.7 Commands for synchronous operation and camming

5.7.1 Gearing on

Gearing is characterized by a constant gear ratio between a master setpoint (position value
of a leading axis or external encoder) and a slave value (position value of a following axis).
Gearing is thus in positional synchronism.
This transmission ratio (gear ratio) can be specified as the ratio of two integers
(numerator/denominator) or as a decimal number.
An offset in the zero point (a phase displacement) can also be specified.
When gearing is started, the slave value is synchronized to the master setpoint with the
programmed synchronization settings.
The master value can be defined in the command; the master value can be modified later
with the Switch master value.

Figure 5-88 Parameter screen form: Gearing on

SIMOTION MCC Motion Control Chart


416 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Active gearing can be offset both on the side of the master setpoint and on the side of the
slave value. The Set offset on the gearing command is used for this purpose.
Gearing can be ended:
● With the Gearing on command
● By starting another synchronous operation on the same synchronous object, e.g., with
another Gearing on command
● With a canceling single axis command on the following axis

NOTICE
The Stop axis command will only terminate the synchronous operation if Quick stop... was
selected as the Stop mode.

Additional information:
● General information on gearing, see the Technology Objects Synchronous Operation,
Cam Function Manual
● For general information on synchronization, see the Technology Objects Synchronous
Operation, Cam Function Manual
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 417
MCC commands
5.7 Commands for synchronous operation and camming

5.7.1.1 Overview of parameters for Gearing on

Table 5- 204 Overview of parameters for Gearing on

Field/Button Explanation/Instruction
Following axis Here, you select the axis to be synchronized. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in the
AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are automatically
identified and displayed in the Synchronous operation field for selection, as appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but rather is
specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type followingObjectType
(references to synchronous objects) are available for selection in the Synchronous
operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data type).
There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected Following
axis and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous object),
you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC source file or MCC chart (see
Technology object data types (Page 101)) are available for selection: followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Gearing on - Parameters tab (Page 419)
Synchronization tab See Overview of parameters for Gearing on - Synchronization tab (Page 422)
Dynamics tab See Overview of parameters for Gearing on - Dynamics tab (Page 427)
Expert tab See Overview of parameters for Gearing on - Expert tab (Page 427)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of the
command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following command in
the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of the
following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


418 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Example:
See Example of Gearing on (Page 428)

5.7.1.2 Overview of parameters for Gearing on – Parameters tab

Table 5- 205 Overview of parameters for Gearing on – Parameters tab

Field/Button Explanation/Instruction
Reset master value Select this check box if you want to set the master setpoint of the synchronous relationship
(default)
If check box is cleared, a previous master setpoint setting is retained.
Master An entry is required in this field only if the Reset master value check box is selected.
axis/encoder/external Here, you select the axis or external encoder that generates the master setpoint in the
master value synchronous relationship. You can select from:
• All positioning and synchronous axes and external encoders that are available on the
device or a DP master.
• All technology object-type variables declared in the MCC source file or MCC chart (see
Description of the technology object data types (Page 101)): posAxis, followingAxis, or
externalEncoderType.
The master setpoint remains assigned to the synchronous object until a change occurs.
Gear direction Here, you select the effective direction of the gearing.
From sign of gear ratio (default value)
The effective direction of gearing is defined by the sign of the gear ratio.
Opposite direction
The following axis moves in the opposite direction from the leading axis.
Same direction
The following axis moves in the same direction as the leading axis.
Opposite current gearing direction
The gearing direction opposes the current gearing direction.
Current direction
Last programmed direction
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.gearingSettings.direction

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 419
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Gear ratio type The gear ratio is the ratio between the distances covered by the following axis (= numerator)
and the master axis (= denominator), each expressed in the configured units.
Here, you select whether the gear ratio is specified as a fraction (numerator/denominator) or
as a floating-point number.
Fraction (numerator / denominator)
The ratio is specified as a fraction
Floating-point number
The ratio is specified as a floating-point number
Last programmed
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.gearingSettings.defineMode
Gear ratio type Here you select which values are used for the gear ratio
Value entry
The values are entered directly in the parameter dialog box:
• In the Gear ratio numerator/denominator fields, or
• in the Gear ratio field)
Last programmed value
Preassigned value
See Selection list (combo box) (Page 65)
System variables for preassigned value:
• userDefault.gearingSettings.numerator and userDefault.gearingSettings.denominator
or
• userDefault.gearingSettings.ratio
Gear ratio numerator Here, you enter the numerator of the gear ratio as an integer. The unit configured for the
following axis is displayed for your information.
See also input field (Page 65).
Gear ratio denominator Here, you enter the denominator of the gear ratio as an integer. The unit configured for the
leading axis is displayed for your information.
See also input field (Page 65).

SIMOTION MCC Motion Control Chart


420 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Transformation ratio Enter the gear ratio as a floating-point number here.
See also input field (Page 65).
Reference point Here, you select the reference point for gearing.
Gearing takes place relative to axis zero (default value)
Absolute gearing: The linear coupling of the slave value to the master setpoint refers each time
to the axis zero point of the axes involved.
Any offset between the master setpoint and the slave value at the start of gearing is
compensated for during synchronization.
For some of the choices, an offset can be specified in the Start of synchronization field of the
Synchronization tab (see Overview of parameters for Gearing on - Synchronization tab
(Page 422)). This value is retained as a constant phase shift between slave value and master
setpoint after conclusion of the synchronization operation. Otherwise, the phase shift is equal
to 0.
Gearing relative to start position
Relative gearing: The linear coupling of the slave value to the master setpoint refers each time
to the position value of the axes involved at the start of gearing.
Any offset between the master setpoint and the slave value at the start of gearing is not
compensated for during synchronization. This offset is retained as a constant phase shift
between slave value and master setpoint after conclusion of the synchronization operation.
In addition, for some of the choices, an offset can be specified in the Start of synchronization
field of the Synchronization tab (see Overview of parameters for Gearing on - Synchronization
tab (Page 422)). This value acts as a constant phase shift between slave value and master
setpoint after conclusion of the synchronization operation.
Last programmed reference point
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.syncProfile.syncProfileReference

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 421
MCC commands
5.7 Commands for synchronous operation and camming

5.7.1.3 Overview of parameters for Gearing on – Synchronization tab

Table 5- 206 Overview of parameters for Gearing on – Synchronization

Field/Button Explanation/Instruction
Synchronization Here, you select the reference for the synchronization operation.
reference Leading axis
Length-related synchronization: Synchronization occurs (depending on the master axis motion)
within a defined range of the master setpoint (Synchronization length).
• Advantage: Synchronization occurs within an assignable range of the master setpoint.
• Disadvantage: The dynamic response of synchronization is dependent on the change in
the master setpoint (velocity). The dynamic response limits of the following axis are not
taken into account.
Time
Time-related synchronization: Synchronization occurs on the basis of specified dynamic
values. Program the relevant values in the Dynamics tab (see Overview of parameters for
Gearing on - Dynamics tab (Page 427)).
• Advantage: The synchronization operation always takes place with the specified dynamic
values.
• Disadvantage: The master setpoint range in which synchronization occurs cannot be
predicted.
Last programmed setting
Default value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncProfileReference

SIMOTION MCC Motion Control Chart


422 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Start of synchronization Here, you select when synchronization of gearing begins. Additional specifications are required
for many of the choices; these are indicated in the description.
at leading axis position
The gear is enabled at a programmed leading axis position.
Entries are required in the following fields:
• Reference point of leading axis
• Leading axis position
Synchronization occurs with respect to the following values:
• Master setpoint = last programmed leading axis position
• Slave value: depending on the selection in Reference point (see Overview of parameters
for Gearing On – Parameters tab (Page 419)):
– For gearing, relative to axis zero (default value):
Slave value = gear ratio * position of leading axis
– For gearing, relative to start position:
Slave value = current slave value
at master axis position with offset
The gear is enabled at a programmed leading axis position. An offset for the following axis is
additionally programmed.
Entries are required in the following fields:
• Offset of the following axis
• Reference point of leading axis
• Leading axis position
Synchronization occurs with respect to the following values:
• Master setpoint = last programmed leading axis position
• Slave value: See description in the field Offset of the following axis
Synchronize immediately
The gear is enabled immediately
Synchronization occurs with respect to the following values:
• Master setpoint = current master setpoint
• Slave value: depending on the selection in Reference point (see Overview of parameters
for Gearing On – Parameters tab (Page 419))
– For gearing, relative to axis zero (default value):
Slave value = gear ratio * current master setpoint
– For gearing, relative to start position:
Slave value = current slave value
...
(Continued in next row of table)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 423
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Start of synchronization ...
(continued) Synchronize immediately with offset
The gear is enabled immediately An offset for the following axis is additionally programmed.
An entry is required in the following field:
• Offset of the following axis
Synchronization occurs with respect to the following values:
• Master setpoint = current master setpoint
• Slave value: See description in the field Offset of the following axis
At the following axis position
The gear is enabled at a programmed following axis position.
Entries are required in the following fields:
• Reference point of leading axis
• Following axis position
Synchronization occurs with respect to the following values:
• Master setpoint: depending on the selection in Reference point (see Overview of
parameters for Gearing On – Parameters tab (Page 419)):
– For gearing, relative to axis zero (default value):
Master setpoint = position of leading axis / gear ratio
– For gearing, relative to start position:
Master setpoint = current master setpoint
• Slave value = last programmed following axis position
Last programmed setting
Default value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.gearingSettings.synchronizingMode
Offset of the following An entry is required in this field if you have selected the following in the Start of
axis synchronization field:
• at master axis position with offset
• Synchronize immediately with offset
Here, you enter a value that is used to calculate the offset of the following axis for linear
coupling between the master axis and following axis.
Depending on the selection in Reference point (see Overview of parameters for Gearing On –
Parameters tab (Page 419)), the entered value has the following meaning:
• For gearing, relative to axis zero (default value):
Slave value relative to which synchronization occurs
• For gearing, relative to start position:
Additional offset to any offset between the following axis and master axis
Depending on the selection in Reference point (see Overview of parameters for Gearing on –
Parameters tab (Page 419)), the slave value relative to which synchronization occurs is thus:
• For gearing, relative to axis zero (default value):
Slave value = programmed offset
• For gearing, relative to start position:
Slave value = current slave value + programmed offset
See also input field (Page 65).

SIMOTION MCC Motion Control Chart


424 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Reference point of An entry is required in this field if you have selected the following in the Start of
leading axis synchronization field:
• at leading axis position
• at master axis position with offset
• At the following axis position
Here, you select how the programmed position (see the Following axis position or Leading axis
position field) acts relative to the selected synchronization profile.
Synchronize before synchronization position
Synchronization is finished at the programmed position.
Symmetrical
This choice is available only for leading axis synchronization reference.
Synchronization occurs in such a way that the programmed position is located symmetrically
within the synchronization length. At the programmed position, the master axis has covered
half the distance that is required for synchronization.
Synchronize from synchronization position
Synchronization starts at the programmed position.
Last programmed reference point of leading axis
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncPositionReference
Synchronization length An entry is required in this field if you have selected the following in the Synchronization
reference field:
• Leading axis
Enter the synchronization length in the editable selection list.
Last programmed synchronization length
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncLength
Following axis position An entry is required in this field if you have selected the following in the Start of
synchronization field:
• At the following axis position
Here, you enter the following axis position in the editable selection list.
Last programmed following axis position
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.gearingSettings.syncPositionSlave
Leading axis position An entry is required in this field if you have selected the following in the Start of
synchronization field:
• at leading axis position
• at master axis position with offset
Here, you enter the master axis position in the editable selection list.
Last programmed leading axis position
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.gearingSettings.syncPositionMaster

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 425
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Synchronization with An entry can be made in this field if you have selected the following:
look-ahead • In the Start of synchronization field:
(SIMOTION kernel V3.2 – at leading axis position
and higher) – at master axis position with offset
– Synchronize immediately
– Synchronize immediately with offset
– At the following axis position
• In the Reference point of leading axis field (if available):
– Synchronize from synchronization position
Here, you select whether the acceleration or deceleration of the master value is to be taken
into account in synchronization calculations (extended look-ahead):
Standard (default value)
No extended look-ahead
Expanded look ahead
Extended look-ahead is active: Acceleration or deceleration of master setpoint is taken into
account in synchronization calculations
Important: Extended look-ahead requires a lot of computing time.
Synchronization direction Here, you select the motion direction in which the following axis is to be synchronized.
(SIMOTION kernel V3.1 Retain system behavior
and higher) Synchronization occurs over the shortest path without direction specification. In the case of
moving axes, a check is made to determine whether the current motion direction can be
maintained.
Maintain direction of following axis
Synchronization takes place in the direction of motion of the following axis.
Positive
Synchronization occurs in the positive motion direction.
Negative
Synchronization occurs in the negative motion direction.
Shortest path
Synchronization occurs over the shortest path without direction specification.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.gearingSettings.synchronizingDirection

SIMOTION MCC Motion Control Chart


426 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.1.4 Overview of parameters for Gearing on – Dynamic response tab

Table 5- 207 Overview of parameters for Gearing on – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
The parameters in the Dynamics tab are evaluated only for time synchronization reference.
Velocity The entered value acts during the constant velocity phase.
System variable for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefault.syncDynamics.profile
Notice
A constant velocity profile only takes effect if configuration data
syncingMotion.smoothAbsoluteSynchronization = YES is set.
When syncingMotion.smoothAbsoluteSynchronization = NO (default), a trapezoidal velocity
profile is always active.
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and end of
the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk,
userDefault.syncDynamics.positiveAccelEndJerk,
userDefault.syncDynamics.negativeAccelStartJerk,
userDefault.syncDynamics.negativeAccelEndJerk

5.7.1.5 Overview of parameters for Gearing on – Expert tab

Table 5- 208 Overview of parameters for Gearing on – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status with
this variable.
Return variable If you enter the name of a variable of the specified data type for each command step, you can
use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 427
MCC commands
5.7 Commands for synchronous operation and camming

5.7.1.6 Example of Gearing on


An axis (rotaryAxis_1) is to rotate at a velocity of 360 degrees/s. A second axis (synchronous
axis) is to rotate in synchronism using a gear ratio.
The synchronous axis that is to be coupled with rotaryAxis_1 by means of a gear ratio must
be assigned as a synchronous axis in SIMOTION SCOUT.

Figure 5-89 Example: MCC chart for gearing

SIMOTION MCC Motion Control Chart


428 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.1.7 Relevant system functions for Gearing on


Cam technology package:
● _enableGearing
● _setMaster
If the Reset master value check box is selected, the _setMaster system function is called first
before _enableGearing.

Overview of parameters for Gearing on/_enableGearing, _setMaster

Table 5- 209 Parameters (MCC Gearing on command compared to _enableGearing and _setMaster system functions)

Parameters of the MCC Parameters of the


Gearing on command _enableGearing and _setMaster system functions
Following axis –
Synchronous operation followingObject
Transition behavior mergeMode
Delay program execution nextCommand
Parameter tab
Reset master value Call of _setMaster system function
• Up to SIMOTION Kernel Version V4.0 with parameter
transientBehavior = DIRECT
• SIMOTION Kernel Version V4.1 and higher with
parameter transientBehavior =
WITH_NEXT_SYNCHRONIZING
Master axis/encoder/external master value master (system function _setMaster)
Gear direction direction
Type of gear ratio gearingMode
Gear ratio type gearingRatioType
Gear ratio numerator gearingNumerator
Gear ratio denominator gearingDenominator
Gear ratio gearingRatio
Reference point gearingType
Synchronization tab
Synchronization reference syncProfileReference
Start of synchronization synchronizingMode
Offset of the following axis syncPositionSlave
Reference point of leading axis syncPositionReference
Synchronization length syncLengthType
Following axis position syncPositionSlaveType, syncPositionSlave
Leading axis position syncPositionMasterType, syncPositionMaster
Synchronization with look-ahead synchronizingWithLookAhead
Synchronization direction synchronizingDirection

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 429
MCC commands
5.7 Commands for synchronous operation and camming

Parameters of the MCC Parameters of the


Gearing on command _enableGearing and _setMaster system functions
Dynamics tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


430 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.2 Gearing off

This command enables you to terminate gearing that was started with the Gearing on
command. Desynchronization occurs with the programmed desynchronization settings.

Figure 5-90 Parameter screen form: Gearing off

Additional information:
● For general information on gearing, see the Technology Objects Synchronous Operation,
Cam Function Manual
● For general information on synchronization, see the Technology Objects Synchronous
Operation, Cam Function Manual
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 431
MCC commands
5.7 Commands for synchronous operation and camming

5.7.2.1 Overview of parameters for Gearing off

Table 5- 210 Overview of parameters for Gearing off

Field/Button Explanation/Instruction
Following axis Here, you select the axis to be desynchronized. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection,
as appropriate.
• <Reference>
You select this entry if the axis to be desynchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection in
the Synchronous operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected
Following axis and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC source file or MCC chart
(see Description of the technology object data types (Page 101)) are available for
selection: followingObjectType.
These variables are references to synchronous objects.
Desynchronization tab See Overview of parameters for Gearing off – Desynchronization tab (Page 433)
Dynamics tab See Overview of parameters for Gearing off – Dynamics tab (Page 436)
Expert tab see Overview of parameters for Gearing off – Expert tab (Page 436)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

SIMOTION MCC Motion Control Chart


432 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.2.2 Overview of parameters for Gearing off – Desynchronization tab

Table 5- 211 Overview of parameters for Gearing off – Desynchronization tab

Field/Button Meaning/Instruction
Synchronization reference Here you select the reference for the desynchronization operation.
Leading axis
Length-related synchronization: Synchronization occurs (depending on the master axis
motion) within a defined range of the master setpoint (Desynchronization length).
• Advantage: Synchronization occurs within an assignable range of the master setpoint.
• Disadvantage: The dynamic response of synchronization is dependent on the change
in the master setpoint (velocity). The dynamic response limits of the slave axis are not
taken into account.
Time
Time-related synchronization: Synchronization occurs on the basis of specified dynamic
values. Program the relevant values in the Dynamics tab (see Overview of parameters for
Gearing off - Dynamics tab (Page 436)).
• Advantage: The synchronization operation always takes place with the specified
dynamic values.
• Disadvantage: The master setpoint range in which synchronization occurs cannot be
predicted.
Last programmed setting
Default value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncProfileReference
Desynchronization position Here, you select when desynchronization of gearing begins. Additional specifications are
required for some of the choices; these are indicated in the description.
At leading axis value
Gearing is disabled at a programmed master axis position.
Entries are required in the following fields:
• Reference point of desynchronization position
• Leading axis position
Desynchronize immediately
Gearing is disabled immediately
At following axis value
Gearing is disabled at a programmed slave axis position.
Entries are required in the following fields:
• Reference point of desynchronization position
• Following axis position
Last programmed start of desynchronization
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.gearingSettings.syncOffMode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 433
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Meaning/Instruction
Reference point of An entry is required in this field if you have selected the following in the
desynchronization position Desynchronization position field:
• At leading axis value
• At following axis value
Here, you select how the programmed position (see the Following axis position or
Leading axis position field) acts relative to the selected desynchronization profile.
Stop before desynchronization position
Synchronization is finished at the programmed position.
Symmetrical
This choice is available only for leading axis synchronization reference.
Desynchronization occurs in such a way that the programmed position is located
symmetrically within the desynchronization length. At the programmed position, the
master axis has covered half the distance that is required for synchronization.
Stop from desynchronization position
Desynchronization starts at the programmed position.
Last programmed reference point of leading axis position
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncOffPositionReference
Desynchronization length An entry is required in this field if you have selected the following in the Synchronization
reference field:
• Leading axis
Enter the desynchronization length in the editable selection list.
Last programmed desynchronization length
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncOffLength
Following axis position An entry is required in this field if you have selected the following in the
Desynchronization position field:
• At following axis value
Here, you enter the slave axis position in the editable selection list.
Default
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncOffPositions.Slave

SIMOTION MCC Motion Control Chart


434 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Meaning/Instruction
Leading axis position An entry is required in this field if you have selected the following in the
Desynchronization position field:
• At leading axis value
Here, you enter the master axis position in the editable selection list.
Default
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncOffPositions.Master
Synchronization direction Here, you select the motion direction in which the following axis is to be desynchronized.
Retain system behavior
Synchronization occurs over the shortest path without direction specification. In the case
of moving axes, a check is made to determine whether the current motion direction can
be maintained.
Maintain direction of following axis
Synchronization takes place in the direction of motion of the following axis.
Positive
Synchronization occurs in the positive motion direction.
Negative
Synchronization occurs in the negative motion direction.
Shortest path
Synchronization occurs over the shortest path without direction specification.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value:
userdefault.gearingSettings.synchronizingDirection

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 435
MCC commands
5.7 Commands for synchronous operation and camming

5.7.2.3 Overview of parameters for Gearing off – Dynamic response tab

Table 5- 212 Overview of parameters for Gearing off – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
The parameters in the Dynamics tab are evaluated only for time synchronization
reference.
Velocity The entered value acts during the constant velocity phase.
System variables for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.2.4 Overview of parameters for Gearing off – Expert tab

Table 5- 213 Overview of parameters for Gearing off – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


436 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.2.5 Relevant system function for Gearing off


Cam technology package:
● _disableGearing

Overview of parameters for Gearing off / _disableGearing

Table 5- 214 Parameters (MCC Gearing off command compared to _disableGearing system functions)

Parameters of the MCC Parameters of the


Gearing off command _disableGearing system function
Following axis –
Synchronous operation followingObject
Transition behavior mergeMode
Delay program execution nextCommand
Desynchronization tab
Synchronization reference syncProfileReference
Desynchronization position syncOffMode
Reference point of desynchronization position syncOffPositionReference
Desynchronization length syncLengthType
Following axis position syncOffPositionSlaveType, syncOffPositionSlave
Leading axis position syncOffPositionMasterType, syncOffPositionMaster
Synchronization direction synchronizingDirection
Dynamics tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 437
MCC commands
5.7 Commands for synchronous operation and camming

5.7.3 Set offset on the gearing

This command causes an offset in the master axis or following axis range during the gearing
operation. You can use a parameter to determine when the programmed offset is to take
effect (as well as other properties).
● For the active gearing command
and/or
● For subsequent gearing commands
Offsets that act on the active gearing command and offsets that are stored and applied to
subsequent gearing commands can be read from the gearingAdjustment system variable.

Figure 5-91 Parameter screen form: Set offset on the gearing

Additional information:
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual
● For information on scaling and offset, see the Technology Objects Synchronous
Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


438 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.3.1 Overview of parameters for Set offset on the gearing

Table 5- 215 Overview of parameters for Set offset on the gearing

Field/Button Explanation/Instruction
Axis Here, you select the axis for which gearing is to be offset. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection, as
appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but rather
is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type followingObjectType
(references to synchronous objects) are available for selection in the Synchronous
operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected Axis and
are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as an axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as the axis:
All technology object-type variables declared in the MCC source file or MCC chart (see
Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Set offset on the gearing – Parameters tab (Page 440)
Dynamics tab See Overview of parameters for Set offset on the gearing – Dynamics tab (Page 441)
Expert tab See Overview of parameters for Set offset on the gearing – Expert tab (Page 441)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 439
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Effect Here, you select which commands the offset will act on.
On active command (default value)
The offset acts on the active gearing command and remains active until this command is
replaced or desynchronized using the Gearing off command.
The offset value is stored in system variables gearingAdjustment.master.offset or
gearingAdjustment.slave.offset (depending on the range).
on following commands
The active gearing command is executed; the offset is stored and in effect for subsequent
Gearing off commands.
The offset value is stored in system variables gearingAdjustment.defaultValueMaster.offset
or gearingAdjustment.defaultValueSlave.offset (depending on the range).
On active command and following commands
The offset acts on the current gearing command and on all subsequent Gearing on
commands.
The offset value is stored in system variables gearingAdjustment.master.offset and
gearingAdjustment.defaultValueMaster.offset or gearingAdjustment.slave.offset and
gearingAdjustment.defaultValueSlave.offset (depending on the range).
Delay program execution • Select the check box if you wish the system to delay execution of the following command
in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of the
following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

5.7.3.2 Overview of parameters for Set offset on the gearing – Parameters tab

Table 5- 216 Overview of parameters for Set offset on the gearing – Parameters tab

Field/Button Explanation/Instruction
Area Here, you select whether the master axis or following axis range will be offset.
Master range (default value)
The master axis range is offset.
Slave range
The following axis range is offset.
Offset Offset for the selected range.
Enter the value as a signed floating-point number.
See also input field (Page 65).
Mode Select the type of offset.
Absolute(default value)
The offset is applied as an absolute value.
Relative
The offset is relative to the corresponding value in the gearingAdjustments system variable.

SIMOTION MCC Motion Control Chart


440 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.3.3 Overview of parameters for Set offset on the gearing – Dynamic response tab

Table 5- 217 Overview of parameters for Set offset on the gearing – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Velocity The entered value acts during the constant velocity phase.
System variables for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variables for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and end
of the respective phase.
System variables for preassigned value: userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

See also
Expert tab (Page 79)

5.7.3.4 Overview of parameters for Set offset on the gearing – Expert tab

Table 5- 218 Overview of parameters for Set offset on the gearing – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status with
this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 441
MCC commands
5.7 Commands for synchronous operation and camming

5.7.3.5 Relevant system function for Set offset on the gearing


Cam technology package:
● _setGearingOffset

Overview of parameters for Set offset on the gearing / _setGearingOffset

Table 5- 219 Parameters (MCC Set gearing on the offset command compared to _setGearingOffset system function)

Parameters of the MCC Parameters of the


Set offset on the gearing command _setGearingOffset system function
Axis –
Synchronous operation followingObject
Effect activationMode
Delay program execution nextCommand
Parameters tab
Area offsetRange
Offset offsetValue
Mode offsetMode
Dynamics tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


442 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.4 Synchronous velocity operation on

Velocity gearing is characterized by a constant gear ratio between a master value (velocity of
a master axis or external encoder) and a slave value (velocity of a following axis). Unlike
gearing, velocity gearing is not in positional synchronism.
When velocity gearing is started, the slave value is synchronized to the master value with the
programmed dynamic response settings.
The gear ratio is specified as a decimal number.
The master value can be defined in the command; the master value can be modified later
with the Switch master value.

Figure 5-92 Parameter screen form: Velocity gearing On

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 443
MCC commands
5.7 Commands for synchronous operation and camming

Velocity gearing can be terminated:


● With the Velocity gearing Off command
● By starting another synchronous operation on the same synchronous object, e.g. with
another Velocity gearing On command
● With a canceling single axis command on the following axis

NOTICE
The Stop axis command will only terminate velocity gearing if Quick stop... was selected
as the Stop mode.

Additional information:
● For general information on velocity gearing, see the Technology Objects Synchronous
Operation, Cam Function Manual
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


444 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.4.1 Overview of Synchronous velocity operation on

Table 5- 220 Overview of Synchronous velocity operation on

Field/Button Explanation/Instruction
Following axis Here, you select the axis to be synchronized. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection,
as appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection in
the Synchronous operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected
Following axis and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Velocity gearing on - Parameters tab (Page 446)
Dynamics tab See Overview of parameters for Velocity gearing on - Dynamics tab (Page 447)
Expert tab See Overview of parameters for Velocity gearing On - Expert tab (Page 447)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 445
MCC commands
5.7 Commands for synchronous operation and camming

5.7.4.2 Overview of parameters for Synchronous velocity operation on – Parameters tab

Table 5- 221 Overview of parameters for Synchronous velocity operation on – Parameters tab

Field/Button Explanation/Instruction
Reset master value Select this check box if you want to set the master setpoint of the velocity relationship
(default).
If check box is cleared, a previous master setpoint setting is retained.
Master axis/encoder/external An entry is required in this field only if the Reset master value check box is selected.
master value Here, you select the axis or external encoder that generates the master setpoint in the
velocity relationship. You can select from:
• All positioning and synchronous axes and external encoders that are available on the
device or a DP master.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): posAxis, followingAxis, or
externalEncoderType.
The master setpoint remains assigned to the velocity object until a change occurs.
Gear direction Here, you select the effective direction of the gearing.
From sign of gear ratio (default value)
The effective direction of gearing is defined by the sign of the gear ratio.
Opposite direction
The following axis moves in the opposite direction from the leading axis.
Same direction
The following axis moves in the same direction as the leading axis.
Opposite current gearing direction
The gearing direction opposes the current gearing direction.
Current direction
Last programmed direction
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.gearingSettings.direction
Gear ratio type Here you select which values are used for the gear ratio
Value entry
The values are entered directly in the parameter dialog box (in the gear ratio field)
Last programmed value
Preassigned value
See Selection list (combo box) (Page 65)
System variables for preassigned value: userDefault.gearingSettings.ratio
Transformation ratio Enter the gear ratio as a floating-point number here.
See also input field (Page 65).

SIMOTION MCC Motion Control Chart


446 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.4.3 Overview of parameters for Synchronous velocity operation on – Dynamic response tab

Table 5- 222 Overview of parameters for Synchronous velocity operation on – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.4.4 Overview of parameters for Synchronous velocity operation on – Expert tab

Table 5- 223 Overview of parameters for Synchronous velocity operation on – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 447
MCC commands
5.7 Commands for synchronous operation and camming

5.7.4.5 Example of Synchronous velocity operation on


An axis (rotaryAxis_1) is to rotate at a velocity of 360 degrees/s. A second axis (synchronous
axis) is to rotate in synchronism using a gear ratio.
The synchronous axis that is to be coupled with rotaryAxis_1 by means of a gear ratio must
be assigned as a synchronous axis in SIMOTION SCOUT.

Figure 5-93 Example: MCC chart for velocity gearing

SIMOTION MCC Motion Control Chart


448 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.4.6 Relevant system functions for Synchronous velocity operation on


Cam technology package:
● _enableVelocityGearing
● _setMaster

Overview of parameters for Velocity gearing On/_enableVelocityGearing, _setMaster

Table 5- 224 Parameters (MCC Velocity gearing On command compared to _enableVelocityGearing and _setMaster
system functions)

Parameters of the MCC Parameters of the


Velocity gearing On command _enableVelocityGearing and _setMaster system functions
Following axis –
Synchronous operation followingObject
Transition behavior mergeMode
Delay program execution nextCommand
Parameter tab
Reset master value Call of _setMaster system function
• Up to SIMOTION Kernel Version V4.0 with parameter
transientBehavior = DIRECT
• SIMOTION Kernel Version V4.1 and higher with
parameter transientBehavior =
WITH_NEXT_SYNCHRONIZING
Master axis/encoder/external master value master (system function _setMaster)
Gear direction direction
Gear ratio type gearingRatioType
Gear ratio gearingRatio
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 449
MCC commands
5.7 Commands for synchronous operation and camming

5.7.5 Synchronous velocity operation off

This command enables you to terminate gearing that was started with the Velocity gearing
On command. Desynchronization occurs with the programmed dynamic response settings.

Figure 5-94 Parameter screen form: Velocity gearing Off

Additional information:
● For general information on velocity gearing, see the Technology Objects Synchronous
Operation, Cam Function Manual
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


450 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.5.1 Overview of parameters for Synchronous velocity operation off

Table 5- 225 Overview of parameters for Synchronous velocity operation off

Field/Button Explanation/Instruction
Following axis Here, you select the axis to be desynchronized. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection,
as appropriate.
• <Reference>
You select this entry if the axis to be desynchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection in
the Synchronous operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected
Following axis and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Dynamics tab See Overview of parameters for Velocity gearing off - Dynamics tab (Page 452)
Expert tab See Overview of parameters for Velocity gearing off - Expert tab (Page 452)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of
the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 451
MCC commands
5.7 Commands for synchronous operation and camming

5.7.5.2 Overview of parameters for Synchronous velocity operation off – Dynamic response tab

Table 5- 226 Overview of parameters for Synchronous velocity operation off – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75)
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.5.3 Overview of parameters for Synchronous velocity operation off – Expert tab

Table 5- 227 Overview of parameters for Synchronous velocity operation off – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


452 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.5.4 Relevant system function for Synchronous velocity operation off


Cam technology package:
● _disableVelocityGearing

Overview of parameters for Synchronous velocity gearing off / _disableVelocityGearing

Table 5- 228 Parameters (MCC Synchronous velocity operation off command compared to _disableVelocityGearing system
function)

Parameters of the MCC Parameters of the


Synchronous velocity operation off command _disableVelocityGearing system function
Following axis –
Synchronous operation followingObject
Transition behavior mergeMode
Delay program execution nextCommand
Dynamics tab
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 453
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6 Cam on

Camming is characterized by a variable gear ratio between a master value (position value of
a master axis or external encoder) and a slave value (position value of a following axis).
Camming is thus in positional synchronism.
The variable gear ratio is described by a cam (transmission function).
You can adapt the camming functionality to your requirements using various programmable
axis evaluations and cam execution modes.
When camming is started, the slave value is synchronized to the master value with the
programmed synchronization settings. It is also possible to switch to another cam at the end
of an active cam.
The master value can be defined in the command; the master value can be modified later
with the Switch master value.

Figure 5-95 Parameter screen form: Cam on

Active camming can be scaled and offset both on the side of the master value and on the
side of the slave value. This enables a cam to be adjusted individually in its definition and
value range.

SIMOTION MCC Motion Control Chart


454 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

The following commands are used for this purpose.


● Set scaling on camming and
● Set offset on camming
In addition, the cam itself can be scaled and offset with the Parameterize cam command.
Camming can be terminated:
● With the Cam off command
● By starting another synchronous operation on the same synchronous object, e.g. with
another Cam on command
● With a canceling single axis command on the following axis

NOTICE
The Stop axis command will only terminate the synchronous operation if Quick stop...
was selected as the Stop mode.

Additional information:
● For general information on camming, see the Technology Objects Synchronous
Operation, Cam Function Manual
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 455
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6.1 Overview of parameters for Cam on

Table 5- 229 Overview of parameters for Cam on

Field/Button Explanation/Instruction
Following axis Here, you select the axis to be synchronized. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined
in the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for
selection, as appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection
in the Synchronous operation field (see also Technology object data types
(Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected
Following axis and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Cam on - Parameters tab (Page 457)
Synchronization tab See Overview of parameters for Cam on - Synchronization tab (Page 459)
Dynamics tab See Overview of parameters for Cam on - Dynamics tab (Page 465)
Expert tab See Overview of parameters for Cam on - Expert tab (Page 465)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position
of the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command
buffer before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution
of the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


456 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6.2 Overview of parameters for Cam on – Parameters tab

Table 5- 230 Overview of parameters for Cam on – Parameters tab

Field/Button Meaning/Instruction
Reset master value Select this check box if you want to set the master setpoint of the synchronous
relationship (default)
If check box is cleared, a previous master setpoint setting is retained.
Master axis/encoder/external An entry is required in this field only if the Reset master value check box is selected.
master value Here, you select the axis or external encoder that generates the master setpoint in the
synchronous relationship. You can select from:
• All positioning and synchronous axes and external encoders that are available on
the device or a DP master.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): posAxis, followingAxis, or
externalEncoderType.
The master setpoint remains assigned to the synchronous object until a change
occurs.
Cam Here, select the cam that describes the synchronous relationship. The following are
available:
• All cams that are defined on the relevant device. The cams are defined in the
CAMS folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): camType.
Notice
In the latter case, you must set up the relationships (links) between the cam and the
synchronous object of the slave axis in the project navigator. The MCC Editor does
this for standard cases.
Cam direction Here, you select the direction in which the cam is moved when master setpoints are
increasing.
Positive
The cam is executed in the same direction as the change in the master setpoint.
• If the change in the master setpoint is positive, the cam is executed in the direction
of increasing definition range values (to the right).
• If the change in the master setpoint is negative, the cam is executed in the
direction of decreasing definition range values (to the left).
Negative
The cam is executed in the opposite direction as the change in the master setpoint.
• If the change in the master setpoint is positive, the cam is executed in the direction
of decreasing definition range values (to the left).
• If the change in the master setpoint is negative, the cam is executed in the
direction of increasing definition range values (to the right).
Last programmed direction
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.cammingSettings.direction

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 457
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Meaning/Instruction
Evaluation of the leading axis Here, you select whether the master setpoint behaves absolutely or relatively with
respect to the cam.
Absolute
The master setpoint is applied as an absolute value in the definition range of the cam.
Relative
The master setpoint is applied as a relative value (relative to the starting point of
camming) in the definition range of the cam.
Please note that the value for the Offset to cam starting point field (see the parameter
overview for Cam on – Synchronization tab (Page 459)) must be within the cam's
definition range.
Last programmed value
Default (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.cammingSettings.masterMode
Evaluation of the following axis Here, you select whether the slave value behaves absolutely or relatively with respect
to the cam.
Absolute
The slave value can be calculated as an absolute value from the value range of the
cam.
If the cam is processed cyclically (see the Cam processing field), the slave value
begins with the initial value at each new cam cycle.
Relative
The slave value can be calculated as a relative value (relative to the starting point of
camming) from the value range of the cam.
If the cam is processed cyclically (see the Cam processing field), the slave value
continues with the end value of the previous cam cycle at each new cam cycle.
Last programmed value
Default (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.cammingSettings.slaveMode
Processing the cam Here, you select whether the cam is to be processed cyclically.
Cyclic processing
The master setpoints are calculated modulo to the cam length. If the master setpoint
reaches the end point of the definition range of the cam, the cam continues to be
processed with the start value.
Non-cyclic processing
The master setpoints are limited to the definition range of the cam; the cam is
executed once in the definition range.
If the master setpoint reaches the starting point or end point of the definition range of
the cam, the cam is no longer processed. When the master setpoints are passed
through again in the same direction (modulo axis), the slave values do not change.
Last programmed cam mode
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.CammingSettings.cammingMode

SIMOTION MCC Motion Control Chart


458 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6.3 Overview of parameters for Cam on – Synchronization tab

Table 5- 231 Overview of parameters for Cam on – Synchronization tab

Field/Button Explanation/Instruction
Synchronization reference Here, you select the reference for the synchronization operation.
Leading axis
Length-related synchronization: Synchronization occurs (depending on the master axis
motion) within a defined range of the master setpoint (Synchronization length).
• Advantage: Synchronization occurs within an assignable range of the master
setpoint.
• Disadvantage: The dynamic response of synchronization is dependent on the
change in the master setpoint (velocity). The dynamic response limits of the
following axis are not taken into account.
Time
Time-related synchronization: Synchronization occurs on the basis of specified
dynamic values. Program the relevant values in the Dynamics tab (see Overview of
parameters for Cam on - Dynamics tab (Page 465)).
• Advantage: The synchronization operation always takes place with the specified
dynamic values.
• Disadvantage: The master setpoint range in which synchronization occurs cannot
be predicted.
Last programmed setting
Default value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncProfileReference

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 459
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Start of synchronization Here, you select when synchronization of the cam begins. Additional specifications are
required for many of the choices; these are indicated in the description.
at leading axis position
Camming is enabled at a programmed master axis position.
Entries are required in the following fields:
• Reference point of leading axis
• Leading axis position
Synchronization occurs with respect to the following values:
• Master setpoint = last programmed leading axis position
• Slave value: depending on the selection in Evaluation of the following axis (see
Overview of parameters for Cam On – Parameters tab):
– For Absolute:
Slave value is calculated with the cam from the programmed leading axis
position, taking into account:
Evaluation of the leading axis
Processing the cam
Any offset to cam starting point
– For Relative: Slave value = current slave value
at master axis position with offset
Camming is enabled at a programmed master axis position. An offset for the following
axis is additionally programmed.
Entries are required in the following fields:
• Offset of the following axis
• Reference point of leading axis
• Leading axis position
Synchronization occurs with respect to the following values:
• Master setpoint = last programmed leading axis position
• Slave value: depending on the selection in Evaluation of the following axis (see
Overview of parameters for Cam On – Parameters tab):
For Absolute:
Slave value = calculated slave value + programmed offset
The calculated slave value is determined the same way as for the At leading axis
position selection.
For Relative:
Slave value = current slave value + programmed offset

SIMOTION MCC Motion Control Chart


460 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Start of synchronization Synchronize immediately
(continued) Camming is enabled immediately.
Synchronization occurs with respect to the following values:
• Master setpoint = current master setpoint
• Slave value: depending on the selection in Evaluation of the following axis (see
Overview of parameters for Cam On – Parameters tab):
– For Absolute:
Slave value is calculated with the cam from the current master setpoint, taking
into account:
Evaluation of the leading axis
Processing the cam
Any offset to cam starting point
– For Relative:
Slave value = current slave value
Synchronize immediately with offset
Camming is enabled immediately. An offset for the following axis is additionally
programmed.
An entry is required in the following field:
• Offset of the following axis
Synchronization occurs with respect to the following values:
• Master setpoint = current master setpoint
• Slave value: depending on the selection in Evaluation of the following axis (see
Overview of parameters for Cam On – Parameters tab):
– For Absolute:
Slave value = calculated slave value + programmed offset
The calculated slave value is determined the same way as for the Synchronize
immediately selection.
– For Relative:
Slave value = current slave value + programmed offset

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 461
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Start of synchronization At end of cam cycle
(continued) This choice is available only for Evaluation of the leading axis as Relative.
Camming is enabled when both of the following occur:
1. A camming operation of this synchronous object is already active with another cam
2. The master setpoint of the active camming operation reaches the end of the cam or
the cam cycle
This enables a switch from one cam to another at a defined point in time.
An entry is required in the following field:
• Reference point of leading axis
Synchronization occurs with respect to the following values:
• Master setpoint = master setpoint at the end of the cam cycle
• Slave value: depending on the selection in Evaluation of the following axis (see
Overview of parameters for Cam On – Parameters tab):
– For Absolute:
Slave value is calculated with the cam from the master setpoint at the end of
the cam cycle, taking into account:
Processing the cam
Offset in relation to cam starting point
– For Relative:
Slave value = current slave value
Last programmed setting
Default value
See Selection list (combo box) (Page 65)
System variable for preassigned value:
userdefault.cammingSettings.synchronizingMode
Offset of the following axis An entry is required in this field if you have selected the following in the Start of
synchronization field:
• at master axis position with offset
• Synchronize immediately with offset
Here, you enter an offset that will be added to the calculated or current following axis
position.
See also input field (Page 65).

SIMOTION MCC Motion Control Chart


462 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Reference point of leading axis An entry is required in this field if you have selected the following in the Start of
synchronization field:
• at leading axis position
• at master axis position with offset
• At end of cam cycle
Here, you select how the programmed position (see the Leading axis position field)
acts relative to the selected synchronization profile.
Synchronize before synchronization position
Synchronization is finished at the programmed position.
Symmetrical
This choice is available only for leading axis synchronization reference.
Synchronization occurs in such a way that the programmed position is located
symmetrically within the synchronization length. At the programmed position, the
master axis has covered half the distance that is required for synchronization.
Synchronize from synchronization position
Synchronization starts at the programmed position.
Last programmed reference point of leading axis
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncPositionReference
Synchronization length An entry is required in this field if you have selected the following in the
Synchronization reference field:
• Leading axis
The synchronization length is the master setpoint range in which synchronization
occurs. Enter the value in the editable selection list (see Editable selection list (editable
combo box)).
Last programmed synchronization length
Preassigned value
See Selection list (combo box).
System variable for preassigned value: userdefault.syncProfile.syncLength
Offset in relation to cam starting An entry is required in this field if you have selected the following in the Evaluation of
point the leading axis field (see Overview of parameters for Cam on – Parameters tab):
• Relative
The offset to the cam starting point specifies the starting point of the cam within its
definition range. Enter the value in the editable selection list (see Editable selection list
(editable combo box)).
Last programmed starting point
Preassignment (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.cammingSettings.camStartPosition
Following axis position Here, you enter the following axis position in the editable selection list.
Last programmed following axis position
Preassigned value
See Selection list (combo box).
System variable for preassigned value:
userdefault.cammingSettings.syncPositionSlave

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 463
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Leading axis position An entry is required in this field if you have selected the following in the Start of
synchronization field:
• at leading axis position
• at master axis position with offset
Here, you enter the master axis position in the editable selection list.
Last programmed leading axis position
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value:
userdefault.cammingSettings.syncPositionMaster
Synchronization direction Here, you select the motion direction in which the following axis is to be synchronized.
Retain system behavior
Synchronization occurs over the shortest path without direction specification. In the
case of moving axes, a check is made to determine whether the current motion
direction can be maintained.
Maintain direction of following axis
Synchronization takes place in the direction of motion of the following axis.
Positive
Synchronization occurs in the positive motion direction.
Negative
Synchronization occurs in the negative motion direction.
Shortest path
Synchronization occurs over the shortest path without direction specification.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value:
userdefault.cammingSettings.synchronizingDirection

SIMOTION MCC Motion Control Chart


464 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6.4 Overview of parameters for Cam on – Dynamic response tab

Table 5- 232 Overview of parameters for Cam on – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
The parameters in the Dynamic response tab are evaluated only for time
synchronization reference.
Velocity The entered value acts during the constant velocity phase.
System variable for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.6.5 Overview of parameters for Cam on – Expert tab

Table 5- 233 Overview of parameters for Cam on – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type for each command step,
you can use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 465
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6.6 Example of Cam on


An axis (rotaryAxis_1) is to rotate at a velocity of 360 degrees/s. A second axis (synchronous
axis) is to be coupled to rotary axis_1 by means of a cam.
The cam must be created and parameterized in SIMOTION SCOUT. The synchronous axis
that is to be coupled with rotary axis_1 by means of a cam must be assigned as a
synchronous axis in SIMOTION SCOUT.

Figure 5-96 Example: MCC chart for a camming operation

SIMOTION MCC Motion Control Chart


466 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.6.7 Relevant system functions for Cam on


Cam technology package:
● _enableCamming
● _setMaster
If the "Reset master value" check box is selected, the _setMaster system function is called
first before _enableCamming.

Overview of parameters for Cam on/_enableCamming, _setMaster

Table 5- 234 Parameters (MCC Cam on command compared to _enableCamming and _setMaster system functions)

Parameters of the MCC Parameters of the


Cam on command _enableCamming and _setMaster system functions
Following axis –
Synchronous operation followingObject
Transition behavior mergeMode
Delay program execution nextCommand
Parameter tab
Reset master value Call of _setMaster system function
• Up to SIMOTION Kernel Version V4.0 with parameter
transientBehavior = DIRECT
• SIMOTION Kernel Version V4.1 and higher with
parameter transientBehavior =
WITH_NEXT_SYNCHRONIZING
Master axis/encoder/external master value master (system function _setMaster)
Cam cam
Cam direction direction
Evaluation of the master axis masterMode
Evaluation of the following axis slaveRatioType
Processing the cam cammingModer
Synchronization tab
Synchronization reference syncProfileReference
Start of synchronization synchronizingMode
Offset of the following axis syncPositionSlave
Reference point of leading axis syncPositionReference
Synchronization length syncLengthType
Offset to cam starting point camStartPositionMasterType, camStartPositionMaster
Following axis position syncPositionSlaveType, syncPositionSlave
Leading axis position syncPositionMasterType, syncPositionMaster
Synchronization direction synchronizingDirection
Dynamics tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 467
MCC commands
5.7 Commands for synchronous operation and camming

Parameters of the MCC Parameters of the


Cam on command _enableCamming and _setMaster system functions
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

5.7.7 Cam off

This command enables you to terminate camming that was started with the Cam on
command. Desynchronization occurs with the programmed desynchronization settings.

Figure 5-97 Parameter screen form: Cam off

SIMOTION MCC Motion Control Chart


468 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Additional information:
● For general information on camming, see the Technology Objects Synchronous
Operation, Cam Function Manual
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

5.7.7.1 Overview of parameters for Cam off

Table 5- 235 Overview of parameters for Cam off

Field/Button Explanation/Instruction
Following axis Here, you select the axis to be desynchronized. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in the
AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection, as
appropriate.
• <Reference>
You select this entry if the axis to be desynchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type followingObjectType
(references to synchronous objects) are available for selection in the Synchronous
operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected Following
axis and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC source file or MCC chart (see
Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Desynchronization tab See Overview of parameters for Cam off - Desynchronization tab (Page 471)
Dynamics tab See Overview of parameters for Cam off - Dynamics tab (Page 474)
Expert tab See Overview of parameters for Cam off - Expert tab (Page 474)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 469
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axis. The selected behavior determines the position of the
command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following command
in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the command must be entered in the command buffer
before the next command is executed.
• Select the condition that has to be satisfied before the system continues execution of the
following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


470 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.7.2 Overview of parameters for Cam off – Desynchronization tab

Table 5- 236 Overview of parameters for Cam off – Desynchronization tab

Field/Button Meaning/Instruction
Synchronization reference Here you select the reference for the desynchronization operation.
Leading axis
Length-related synchronization: Synchronization occurs (depending on the master axis
motion) within a defined range of the master setpoint (Desynchronization length).
• Advantage: Synchronization occurs within an assignable range of the master
setpoint.
• Disadvantage: The dynamic response of synchronization is dependent on the
change in the master setpoint (velocity). The dynamic response limits of the slave
axis are not taken into account.
Time
Time-related synchronization: Synchronization occurs on the basis of specified
dynamic values. Program the relevant values in the Dynamics tab (see Overview of
parameters for Cam off - Dynamics tab (Page 474)).
• Advantage: The synchronization operation always takes place with the specified
dynamic values.
• Disadvantage: The master setpoint range in which synchronization occurs cannot
be predicted.
Last programmed setting
Default value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncProfileReference
Desynchronization position Here, you select when desynchronization of camming begins. Additional specifications
are required for some of the choices; these are indicated in the description.
At leading axis value
Camming is disabled at a programmed master axis position.
Entries are required in the following fields:
• Reference point of desynchronization position
• Leading axis position
Desynchronize immediately
Camming is disabled immediately.
At following axis value
Camming is disabled at a programmed slave axis position.
Entries are required in the following fields:
• Reference point of desynchronization position
• Following axis position
At end of cam cycle
Camming is disabled if the slave value reaches the end of the cam or the cam cycle.
An entry is required in the following field:
• Reference point of desynchronization position
Last programmed start of desynchronization
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.cammingSettings.syncOffMode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 471
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Meaning/Instruction
Reference point of An entry is required in this field if you have selected the following in the
desynchronization position Desynchronization position field:
• At leading axis value
• At following axis value
• At end of cam cycle
Here, you select how the programmed position (see the Following axis position or
Leading axis field) acts relative to the selected desynchronization profile.
Stop before desynchronization position
Synchronization is finished at the programmed position.
Symmetrical
This choice is available only for leading axis synchronization reference.
Desynchronization occurs in such a way that the programmed position is located
symmetrically within the desynchronization length. At the programmed position, the
master axis has covered half the distance that is required for synchronization.
Stop from desynchronization position
Desynchronization starts at the programmed position.
Last programmed reference point of leading axis position
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value:
userdefault.syncProfile.syncOffPositionReference
Desynchronization length An entry is required in this field if you have selected the following in the
Synchronization reference field:
• Leading axis
Enter the synchronization length in the editable selection list.
Last programmed desynchronization length
Preassigned value
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncProfile.syncOffLength
Following axis position An entry is required in this field if you have selected the following in the
Desynchronization position field:
• At following axis value
Here, you enter the slave axis position in the editable selection list.
Default
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncOffPositions.Slave

SIMOTION MCC Motion Control Chart


472 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Meaning/Instruction
Leading axis position An entry is required in this field if you have selected the following in the
Desynchronization position field:
• At leading axis value
Here, you enter the master axis position in the editable selection list.
Default
See Selection list (combo box) (Page 65)
System variable for preassigned value: userdefault.syncOffPositions.Master
Synchronization direction Here, you select the motion direction in which the following axis is to be
desynchronized.
Retain system behavior
Synchronization occurs over the shortest path without direction specification. In the
case of moving axes, a check is made to determine whether the current motion
direction can be maintained.
Maintain direction of following axis
Synchronization takes place in the direction of motion of the following axis.
Positive
Synchronization occurs in the positive motion direction.
Negative
Synchronization occurs in the negative motion direction.
Shortest path
Synchronization occurs over the shortest path without direction specification.
Preassigned value (default value)
See Selection list (combo box) (Page 65)
System variable for preassigned value:
userdefault.cammingSettings.synchronizingDirection

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 473
MCC commands
5.7 Commands for synchronous operation and camming

5.7.7.3 Overview of parameters for Cam off – Dynamic response tab

Table 5- 237 Overview of parameters for Cam off – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
The parameters in the Dynamic response tab are evaluated only for time
synchronization reference.
Velocity The entered value acts during the constant velocity phase.
System variables for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variables for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.7.4 Overview of parameters for Cam Off – Expert tab

Table 5- 238 Overview of parameters for Cam Off – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command
status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable
to find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


474 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.7.5 Relevant system function for Cam off


Cam technology package:
● _disableCamming

Overview of parameters for Cam off / _disableCamming

Table 5- 239 Parameters (MCC Cam off command compared to _disableCamming system functions)

Parameters of the MCC Parameters of the


Cam off command _disableCamming system function
Following axis –
Synchronous operation followingObject
Transition behavior mergeMode
Delay program execution nextCommand
Desynchronization tab
Synchronization reference syncProfileReference
Desynchronization position syncOffMode
Reference point of desynchronization position syncOffPositionReference
Desynchronization length syncOffLengthType, syncOffLength
Following axis position syncOffPositionSlaveType, syncOffPositionSlave
Leading axis position syncOffPositionMasterType, syncOffPositionMaster
Synchronization direction synchronizingDirection
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 475
MCC commands
5.7 Commands for synchronous operation and camming

5.7.8 Set scaling on camming

This command causes scaling of the master axis or following axis range of the associated
cam during camming. You can use parameters to specify things such as:
● Timing for when scaling becomes effective (immediately/next cam cycle)
● Effectiveness on the active camming command and/or subsequent camming commands
Scaling operations that act on the active camming command as well as scaling operations
that are stored and act on subsequent commands can be read from the cammingAdjustment
system variable.

Figure 5-98 Parameter screen form: Set scaling on camming

Additional information:
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual
● For information on scaling and offset for a cam, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


476 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.8.1 Overview of parameters for Set scaling on camming

Table 5- 240 Overview of parameters for Set scaling on camming

Field/Button Explanation/Instruction
Axis Here, you select the axis for which the cam is to be scaled. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection,
as appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection in
the Synchronous operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected Axis
and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as an axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as the axis:
All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Set scaling on camming – Parameters tab (Page 478)
Dynamics tab See Overview of parameters for Set scaling on camming – Dynamics tab (Page 479)
Expert tab See Overview of parameters for Set scaling on camming – Expert tab (Page 479)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 477
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Effect Here you select the commands on which scaling is active.
On active command (default value)
Scaling acts on the active camming command and remains active until this command is
replaced or desynchronized using the Cam off command.
The scaling factor is stored (depending on the cam range) in system variable
cammingAdjustment.master.scale or cammingAdjustment.slave.scale.
on following commands
The active camming command is executed; the scaling is stored and used for the
following Cam on commands.
The scaling factor is stored (depending on the cam range) in system variable
cammingAdjustment.defaultValueMaster.scale or
cammingAdjustment.defaultValueSlave.scale.
On active command and following commands
The scaling acts on the current camming command and on all following Cam on
commands.
The scaling factor is stored (depending on the cam range) in system variables
cammingAdjustment.master.scale and cammingAdjustment.defaultValueMaster.scale, or
cammingAdjustment.slave.scale and cammingAdjustment.defaultValueSlave.scale.
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

5.7.8.2 Overview of parameters for Set scaling on camming – Parameters tab

Table 5- 241 Overview of parameters for Set scaling on camming – Parameters tab

Field/Button Explanation/Instruction
Area Here, you select whether the leading axis or following axis range of the cam is to be
scaled.
Master range (default value)
The leading axis range of the cam is scaled.
slave range
The following axis range of the cam is scaled.
Offset Scaling factor for the selected range.
Enter the value as a signed floating-point number.
See also input field (Page 65).
Time Here, you select when the scaling takes effect.
Immediately (default value)
The scaling of the selected range goes into effect immediately.
At next cycle
The scaling of the selected range goes into effect at the next cam cycle (only for cyclic
cam).

SIMOTION MCC Motion Control Chart


478 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.8.3 Overview of parameters for Set scaling on camming – Dynamic response tab

Table 5- 242 Overview of parameters for Set scaling on camming – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
Velocity The entered value acts during the constant velocity phase.
System variables for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variables for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.8.4 Overview of parameters for Set scaling on camming – Expert tab

Table 5- 243 Overview of parameters for Set scaling on camming – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 479
MCC commands
5.7 Commands for synchronous operation and camming

5.7.8.5 Relevant system function for Set scaling on camming


Cam technology package:
● _setCammingScale

Overview of parameters for Set scaling on camming / _setCammingScale

Table 5- 244 Parameters (MCC Set scaling on camming command compared to _setCammingScale system function)

Parameters of the MCC Parameters of the


Set scaling on camming command _setCammingScale function
Axis –
Synchronous operation followingObject
Effect activationMode
Delay program execution nextCommand
Parameters tab
Area scalingRange
Offset scaleValue
Instant in time scaleSpecification
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


480 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.9 Set offset on camming

This command causes an offset of the master axis or following axis range of the associated
cam during camming. You can use parameters to specify things such as:
● Timing for when the offset takes effect (immediately/next cam cycle)
● Effectiveness on the active camming command and/or subsequent camming commands
Offsets that act on the active camming command and offsets that are stored and act on
subsequent camming commands can be read from the cammingAdjustment system variable.

Figure 5-99 Parameter screen form: Set offset on camming

Additional information:
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual
● For information on scaling and offset for a cam, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 481
MCC commands
5.7 Commands for synchronous operation and camming

5.7.9.1 Overview of parameters for Set offset on camming

Table 5- 245 Overview of parameters for Set offset on camming

Field/Button Explanation/Instruction
Axis Here, you select the axis for which the cam is to be offset. The following are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection,
as appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection in
the Synchronous operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous objects are displayed according to the selected Axis
and are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as an axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as the axis:
All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Set offset on camming – Parameters tab (Page 484)
Dynamics tab See Overview of parameters for Set offset on camming – Dynamics tab (Page 485)
Expert tab See Overview of parameters for Set offset on camming – Expert tab (Page 485)

SIMOTION MCC Motion Control Chart


482 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Field/Button Explanation/Instruction
Effect Here, you select which commands the offset will act on.
On active command (default value)
The offset acts on the active camming command and remains active until this command
is replaced or desynchronized using the Cam off command.
The offset value is stored in system variable cammingAdjustment.master.offset or
cammingAdjustment.slave.offset (depending on the range of the cam).
on following commands
The active camming command is executed; the offset is stored and used for the following
Cam on commands.
The offset value is stored (depending on the cam range) in system variable
cammingAdjustment.defaultValueMaster.offset or
cammingAdjustment.defaultValueSlave.offset.
On active command and following commands
The offset acts on the current camming command and on all following Cam on
commands.
The offset value is stored in system variables cammingAdjustment.master.offset and
cammingAdjustment.defaultValueMaster.offset or cammingAdjustment.slave.offset and
cammingAdjustment.defaultValueSlave.offset (depending on the range of the cam).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 483
MCC commands
5.7 Commands for synchronous operation and camming

5.7.9.2 Overview of parameters for Set offset on camming – Parameters tab

Table 5- 246 Overview of parameters for Set offset on camming – Parameters tab

Field/Button Explanation/Instruction
Area Here, you select whether the leading axis or following axis range of the cam will be offset.
Master range (default value)
The leading axis range of the cam is offset.
Slave range
The following axis range of the cam is offset.
Offset Offset for the selected range.
Enter the value as a signed floating-point number.
See also input field (Page 65).
Mode Select the type of offset.
Absolute(default value)
The offset is applied as an absolute value.
Relative
The offset is relative to the corresponding value in the cammingAdjustments system
variable.
Time Here, you select when the offset takes effect
Immediately (default value)
The offset of the selected range goes into effect immediately.
At next cycle
The offset of the selected range goes into effect at the next cam cycle (for cyclic cam
only).

SIMOTION MCC Motion Control Chart


484 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.9.3 Overview of parameters for Set offset on camming – Dynamic response tab

Table 5- 247 Overview of parameters for Set offset on camming – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Overview of parameters in the Dynamics tab
(Page 75).
Velocity The entered value acts during the constant velocity phase.
System variables for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variables for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

5.7.9.4 Overview of parameters for Set offset on camming – Expert tab

Table 5- 248 Overview of parameters for Set offset on camming – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you can track the command status
with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 485
MCC commands
5.7 Commands for synchronous operation and camming

5.7.9.5 Relevant system function for Set offset on camming


Cam technology package:
● _setCammingOffset

Overview of parameters for Set offset on camming / _setCammingOffset

Table 5- 249 Parameters (MCC Set offset on camming command compared to _setCammingOffset system function)

Parameters of the MCC Parameters of the


Set offset on camming command _setCammingOffset system function
Axis –
Synchronous operation followingObject
Effect activationMode
Delay program execution nextCommand
Parameters tab
Area offsetRange
Offset offsetValue
Mode offsetMode
Instant in time offsetSpecification
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


486 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.10 Parameterize cam

This command enables a defined electronic cam to be scaled and/or offset.


The master and slave axes can be offset and scaled independently of one another.
Scaling takes place over the complete cam or within a range defined by the starting and end
points. Scaling of the complete cam is referred to below as basic scaling; scaling of a range
is referred to as range scaling. The definition range and value range each have one basic
scaling and two range scalings.
For basic scaling, the zero point of the coordinate axis becomes the scaling point, while for
range scaling the starting point of the specified scaling range is used.
This command enables simultaneous specification of one offset and/or basic scaling plus
one range scaling each for the master and slave axes.

Figure 5-100 Parameter screen form: Parameterize cam for the Offset tab

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 487
MCC commands
5.7 Commands for synchronous operation and camming

Figure 5-101 Parameter screen form: Parameterize cam for the Basic scaling tab

Figure 5-102 Parameter screen form: Parameterize cam for the Range scaling tab

SIMOTION MCC Motion Control Chart


488 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

Additional information:
● For cam fundamentals, see the Technology Objects Synchronous Operation, Cam
Function Manual
● For information on scaling and offset for a cam, see the Technology Objects
Synchronous Operation, Cam Function Manual

5.7.10.1 Overview of parameters for Parameterize cam

Table 5- 250 Overview of parameters for Parameterize cam

Field/Button Explanation/instructions
Cam Here, you select the cam to be offset or scaled. The following are available:
• All cams that are defined on the relevant device. The cams are defined in the CAMS
folder in the project navigator.
• All technology object-type variables declared in the MCC source file or MCC chart (see
Technology object data types (Page 101)): camType.
Offset tab See Overview of parameters for Parameterize cam – Offset tab (Page 489)
Basic scaling tab See Overview of parameters for Parameterize cam – Basic scaling tab (Page 490)
Range scaling tab See Overview of parameters for Parameterize cam – Range scaling tab (Page 490)
Expert tab See Overview of parameters for Parameterize cam – Expert tab (Page 491)

5.7.10.2 Overview of parameters for Parameterize cam – Offset tab

Table 5- 251 Overview of parameters for Parameterize cam – Offset tab

Field/Button Explanation/Instruction
Following axis offset Select this check box if you want to program an offset for the following axis.
Enter the offset for the following axis here.
See also input field (Page 65).
Leading axis offset Select this check box if you want to program an offset for the master axis.
Enter the master axis offset in this box.
See also input field (Page 65).
Calculation Here, you select whether the newly programmed offset is applied absolutely or is added to
the previously active offset.
Absolute(default value)
The programmed value is applied absolutely.
Relative
The programmed value is applied relatively.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 489
MCC commands
5.7 Commands for synchronous operation and camming

5.7.10.3 Overview of parameters for Parameterize cam – Basic scaling tab

Table 5- 252 Overview of parameters for Parameterize cam – Basic scaling tab

Field/Button Explanation/Instruction
Following axis scaling factor Select this check box if you wish to program a scaling factor for the complete slave axis
range.
Here, you enter a scaling factor that is valid for the slave axis, independent of the range.
Using the range scaling, you can also activate scaling factors for individual ranges. These
are superimposed over the complete scaling.
See also input field (Page 65).
Leading axis scaling factor Select this check box if you want to program a scaling factor for the complete range of the
master axis.
Here, you enter a scaling factor that is valid for the master axis, independent of the range.
Using the range scaling, you can also activate scaling factors for individual ranges. These
are superimposed over the complete scaling.
See also input field (Page 65).

5.7.10.4 Overview of parameters for Parameterize cam – Range scaling tab

Table 5- 253 Overview of parameters for Parameterize cam – Range scaling tab

Field/Button Explanation/Instruction
Number of cam range Here, you select the number of the scaling range (1 or 2). If you select the same number for
a subsequent command, you can overwrite the previously programmed values.
Following axis Select this check box in order to program a scaling factor in a specific range of the following
axis.
Start of range (following Here, you enter the following axis position at which scaling starts.
axis) See also input field (Page 65).
End of range (following Here, you enter the following axis position at which scaling ends.
axis) See also input field (Page 65).
Scaling factor (following Here, you enter the scaling factor for the following axis. This is effective within the specified
axis) range.
See also input field (Page 65).
Leading axis Select this check box to program a scaling factor in a specific range of the master axis.
Start of range (leading axis) Here, you enter the position of the master axis at which scaling begins.
See also input field (Page 65).
End of range (leading axis) Here, you enter the position of the master axis at which scaling ends.
See also input field (Page 65).
Scaling factor (leading axis) Here, you enter the scaling factor for the master axis. This is effective within the specified
range.
See also input field (Page 65).

SIMOTION MCC Motion Control Chart


490 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.10.5 Overview of parameters for Parameterize cam – Expert tab

Table 5- 254 Overview of parameters for Parameterize cam – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type for each command step, you
can use this variable to find out the result of the command step.
Data type DINT; for a description, see Return value for system functions of the technology
packages (Page 86).

5.7.10.6 Relevant system functions for Parameterize cam


Cam technology package:
● _setCamOffset
● _setCamScale

Overview of parameters for Parameterize cam / _setCamOffset, _setCamScale

Table 5- 255 Parameters (MCC Parameterize cam command compared to _setCamOffset and _setCamScale system
functions)

Parameters of the MCC Parameters of the


Parameterize cam command _setCammingOffset and _setCamScale system functions
Cam cam
Offset tab
Following axis offset Call of system function _setCamOffset.offsetRange, offset
Leading axis offset Call of system function _setCamOffset.offsetRange, offset
Calculation offsetMode
Basic scaling tab
Following axis scaling factor Call of system function setCamScale.scalingRange, scalingSpecification,
scaleValue
Leading axis scaling factor Call of system function setCamScale.scalingRange, scalingSpecification,
scaleValue
Range scaling tab
Number of cam range specificRangeNumber
Following axis Call of system function setCamScale
Start of range (following axis) specificRangeStartPointType, specificRangeStartPoint
End of range (following axis) specificRangeEndPointType, specificRangeEndPoint
Scaling factor (following axis) scalingRange, scalingSpecification, scaleValue
Leading axis Call of system function setCamScale
Start of range (leading axis) specificRangeStartPointType, specificRangeStartPoint
End of range (leading axis) specificRangeEndPointType, specificRangeEndPoint
Scaling factor (leading axis) scalingRange, scalingSpecification, scaleValue
Expert tab
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 491
MCC commands
5.7 Commands for synchronous operation and camming

5.7.11 Switch master setpoint

This command switches over the master value for an existing synchronous operation
relationship. Switchover is possible when synchronous operation is active.

Figure 5-103 Parameter screen form: Switch master setpoint

Additional information:
● For general information on switching over the master value source, see the Technology
Objects Synchronous Operation, Cam Function Manual
● For the fundamentals of synchronous operation, see the Technology Objects
Synchronous Operation, Cam Function Manual

SIMOTION MCC Motion Control Chart


492 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.11.1 Overview of parameters for Switch master setpoint

Table 5- 256 Overview of parameters for Switch master setpoint

Field/Button Explanation/Instruction
Following axis Here, you select the axis for which the master setpoint is to be switched. The following
are available:
• All synchronous axes that are defined on the relevant device. The axes are defined in
the AXES folder in the project navigator.
The synchronous objects associated with the selected synchronous axis are
automatically identified and displayed in the Synchronous operation field for selection,
as appropriate.
• <Reference>
You select this entry if the axis to be synchronized is not defined on the device but
rather is specified as a reference (variable).
All variables declared in the MCC unit or MCC chart with data type
followingObjectType (references to synchronous objects) are available for selection in
the Synchronous operation field (see also Technology object data types (Page 101)).
Notice
You cannot select any references to a synchronous axis (variable of followingAxis data
type). There is no assignment for the reference to the associated synchronous objects.
Instead, select the reference to the synchronous object directly (variable of data type
followingObjectType)
Synchronous operation Here, the permissible synchronous (following) objects are displayed according to the
selected following axis, where they are available for selection, as appropriate:
• A synchronous axis defined on the device has been selected as a following axis:
The synchronous object associated with the selected following axis is displayed
If more than one synchronous object is available (e.g., superimposed synchronous
object), you can select the synchronous object.
• <Reference> has been selected as a following axis:
All technology object-type variables declared in the MCC unit or MCC chart (see
Technology object data types (Page 101)) are available for selection:
followingObjectType.
These variables are references to synchronous objects.
Parameter tab See Overview of parameters for Switch master setpoint – Parameters tab (Page 494)
Dynamics tab See Overview of parameters for Switch master setpoint – Dynamics tab (Page 494)
Expert tab See Overview of parameters for Switch master setpoint – Expert tab (Page 495)
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 493
MCC commands
5.7 Commands for synchronous operation and camming

5.7.11.2 Overview of parameters for Switch master setpoint – Parameters tab

Table 5- 257 Overview of parameters for Switch master setpoint – Parameters tab

Field/Button Explanation/instructions
Master value Here, you select the axis or external encoder that generates the master setpoint in the
synchronous relationship. You can select from:
• All positioning, synchronous (following), and path axes and external encoders that are
available on the device or a DP master.
• All technology object-type variables declared in the MCC source file or MCC chart
(see Technology object data types (Page 101)): posAxis, followingAxis, pathAxis or
externalEncoderType.
The master setpoint remains assigned to the synchronous object until a change occurs.
Transition behavior Here, you choose how the switchover to the selected master setpoint is to occur.
direct
Selected master setpoint is active immediately
with next synchronization
Selected master setpoint is active the next time the following axis is synchronized.
With programmed dynamic response values
The transition to the selected master setpoint takes place with the values set in the
Dynamics tab (see Overview of parameters for Switch master setpoint – Dynamics tab
(Page 494)).

5.7.11.3 Overview of parameters for Switch master setpoint – Dynamic response tab

Table 5- 258 Overview of parameters for Switch master setpoint – Dynamic response tab

Field/Button Explanation/instructions
The Dynamics tab is described in detail in Dynamics tab (Page 75).
The parameters in the Dynamic response tab are evaluated only for transition behavior
with programmed dynamic response values.
Velocity The entered value acts during the constant velocity phase.
System variables for preassigned value: userDefault.syncDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
System variables for preassigned value: userDefault.syncDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
System variable for preassigned value: userDefault.syncDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
System variables for preassigned value: userDefault.syncDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value:
userDefault.syncDynamics.positiveAccelStartJerk
userDefault.syncDynamics.positiveAccelEndJerk
userDefault.syncDynamics.negativeAccelStartJerk
userDefault.syncDynamics.negativeAccelEndJerk

SIMOTION MCC Motion Control Chart


494 Programming and Operating Manual, 05/2009
MCC commands
5.7 Commands for synchronous operation and camming

5.7.11.4 Overview of parameters for Switch master setpoint – Expert tab

Table 5- 259 Overview of parameters for Switch master setpoint – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Expert tab (Page 79).
CommandID variable If you enter the name of a CommandId-type variable, you
can track the command status with this variable.
Return variable If you enter the name of a variable of the specified data
type, you can use this variable to find out the result of the
command call.
Data type DINT; for a description, see Return value for
system functions of the technology packages (Page 86).

5.7.11.5 Relevant system function for Switch master setpoint


Cam technology package:
● _setMaster

Overview of parameters for Switch master setpoint / _setMaster

Table 5- 260 Parameters (MCC Switch master setpoint command compared to _setMaster system function)

Parameters of the MCC Parameters of the


Switch master value command _setMaster system function
Following axis –
Synchronous operation followingObject
Delay program execution nextCommand
Parameters tab
Master value master
Transition behavior transientBehavior
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 495
MCC commands
5.8 Commands for path interpolation

5.8 Commands for path interpolation


In Version V4.1 and higher of the SIMOTION kernel, SIMOTION provides path interpolation
functions. This functionality enables up to 3 path axes to travel along specified paths. In
addition, a positioning axis can be traversed synchronously with the path.
The Path object technology object (data type _pathObjectType) provides this functionality.
● With the Path object technology object, the following additional technology objects are
interconnected during configuration:
– At least two and up to three axes with the path interpolation technology (path axes -
data type _pathAxis)
– Optionally, one positioning axis (data type posAxis, followingAxis or _pathAxis) that is
traversed synchronously with the path motion. It is thus possible to output the current
length of the path motion on an axis, for example.
– Optionally, one cam (data type camType) in order to specify a special velocity profile
for the path motion
● In addition, the motion inputs (MotionIn) of positioning axes can be interconnected with
the three motion outputs (MotionOut) of the TO path object. This enables outputting of the
three coordinates of the basic coordinate system on axes.
● The path motions are always programmed in a right-handed, rectangular (Cartesian)
coordinate system in accordance with DIN 66217 (basic coordinate system).
● Adaptation of machine kinematics (i.e. axis coordinate system) to the basic coordinate
system is done by means of kinematics transformations. You specify this when
configuring the TO path object.
The following applies to the path motion:
● The paths can comprise individual path segments.
● These individual segments can be the following 2-dimensional or 3-dimensional motions
(interpolations):
– Linear motion: Traverse path linearly (Page 497) command
– Circular motion: Traverse path circularly (Page 506) command
– Polynomial motion: command Traverse path using polynomials (Page 516)
● Blending is used to link individual segments in series to form one complete motion with
no intermediary stop.

SIMOTION MCC Motion Control Chart


496 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.1 Traverse path linearly

This function is available in SIMOTION kernel Version 4.1 and higher.


This command moves the path axes interconnected with the specified path object on a
straight line to an end point. The motion can be carried out in:
● Three dimensions
● Two dimensions in one of the main Cartesian planes
The end point entered can be absolute or relative.

Figure 5-104 Parameter screen form: Traverse path linearly

For the fundamentals of path interpolation, see the TO Path Interpolation Function Manual
For additional information on linear paths, see the TO Path Interpolation Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 497
MCC commands
5.8 Commands for path interpolation

5.8.1.1 Overview of parameters for Traverse path linearly

Table 5- 261 Overview of parameters for Traverse path linearly

Field/Button Explanation/instructions
Path object In Path object, select the path object whose assigned path axes are to be traversed to the
end point. The list contains:
• All path objects that are defined on the relevant device. The path objects are defined
in the PATH OBJECTS folder in the project navigator.
• All variables with the following data type of a technology object declared in the MCC
source file or MCC chart (see Technology object data types (Page 101)):
_pathObjectType.
Parameters tab See Overview of parameters for Traverse path linearly - Parameters tab (Page 499)
Dynamic response tab See Overview of parameters for Traverse path linearly - Dynamic response tab
(Page 501)
Synchronous axis tab See Overview of parameters for Traverse path linearly - Path-synchronous motion tab
(Page 503)
Expert tab See Overview of parameters for Traverse path linearly - Expert tab (Page 504)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the path object or on the axes involved. The selected
behavior determines the position of the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


498 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.1.2 Overview of parameters for Traverse path linearly – Parameters tab

Table 5- 262 Overview of parameters for Traverse path linearly – Parameters tab

Field/Button Explanation/instructions
Path plane Here, you select whether the motion is to be carried out in three dimensions (3D) or two
dimensions (2D).
X-Y-Z
Three-dimensional motion
X-Y main plane
Y-Z main plane
Z-X main plane
Two-dimensional motion in the selected main plane of the basic (Cartesian) coordinate
system. The target coordinate located outside the selected plane is ignored.
Preassigned value (default value)
See Selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.plane
Mode The meaning of the subsequently programmed target coordinates is defined in more
detail here.
Absolute
The programmed target coordinates refer to the zero point of the basic coordinate
system.
Relative
The programmed target coordinates refer to the path position within the basic coordinate
system when the path command is executed (point in time of change).
Preassigned value (default value)
See Selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.mode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 499
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
Target coordinates The end point of the motion is specified here. The meaning depends on the Mode
X, Y, Z parameter (see above):
• Absolute mode: Absolute coordinates with respect to the zero point of the basic
coordinate system.
• Relative mode: Relative coordinates with respect to the path position within the basic
coordinate system when the path command is executed (point in time of change).
Enter the values as signed floating-point numbers.
See Input field (Page 65)
Blending This parameter is evaluated only for:
• Attach transition behavior or
• Attach transition behavior and discard pending command.
With blending, the path segment programmed with this command can be linked to the
previous path segment to form one complete path with no stop. At the transition, the
system provides for a constant path velocity and a constant path acceleration.
Active with dynamic response adaptation
The dynamic response limit values of the individual path axes are also applied in the
blending area. For this reason, the path velocity is nearly reduced to zero at transitions of
path segments during which the pitches or curvatures are not applied smoothly.
Active without dynamic response adaptation
In the blending area, path interpolation takes into account only the scalar dynamic
response limit values of the path (path velocity, path acceleration and jerk). The dynamic
response limit values specific to the axes are first taken into account during movement of
the individual path axes. For this reason, deviations from the path, specific to the axes,
can occur at transitions of path segments during which the pitches or curvatures are not
applied smoothly.
Inactive
The motion programmed with this command does not begin until the setpoint interpolation
of the previous command is complete and its motion has reached the target coordinates.
The path velocity and path acceleration are therefore zero at the transition.
Preassigned value (default value)
See Selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.blending.mode

SIMOTION MCC Motion Control Chart


500 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.1.3 Overview of parameters for Traverse path linearly – Dynamic response tab

Table 5- 263 Overview of parameters for Traverse path linearly – Dynamic response tab

Field/Button Meaning/Instruction
Here, you specify the dynamic response of the path motion.
In standard cases, you define the dynamic response by means of a velocity profile with
the associated values for the velocity, acceleration, deceleration and jerk. A detailed
description of these parameters is provided in Overview of parameters – Dynamics tab
(Page 75).
Optionally, you can select a special velocity profile that is described by a cam.
Velocity The entered value acts during the constant velocity phase.
This parameter is evaluated only when Special velocity profile = No.
System variable for preassigned value: userDefault.pathDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• If Special velocity profile = Yes and when accelerating to the velocity specified in the
special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
The parameters are evaluated only in the following cases:
• When Special velocity profile = No
• If Special velocity profile = Yes and when accelerating to the velocity specified in the
special velocity profile.
System variables for preassigned value:
userDefault.pathDynamics.positiveAccelStartJerk
userDefault.pathDynamics.positiveAccelEndJerk
userDefault.pathDynamics.negativeAccelStartJerk
userDefault.pathDynamics.negativeAccelEndJerk

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 501
MCC commands
5.8 Commands for path interpolation

Field/Button Meaning/Instruction
Dynamic response adaptation Here, you select whether the dynamic response limit values are to be taken into account
during path interpolation.
Inactive
The dynamic response limit values of the individual path axes are not taken into account
during path interpolation. However, they remain active, and an error is triggered if they
are exceeded. This setting should only be selected if it is ensured by other means (e.g.,
an appropriate specific velocity profile) that the limit values will not be exceeded.
Maximum axial dynamic response values without segmentation
The dynamic response limit value of the individual path axes for velocity and acceleration
are taken into account during path interpolation. If a position axis is configured for the
path-synchronous motion, its dynamic response limit values are also included. Path
velocity and path acceleration are adapted for the entire path motion if necessary.
Maximum axial dynamic response values with segmentation
The dynamic response limit value of the individual path axes for velocity and acceleration
are taken into account during path interpolation. If a position axis is configured for the
path-synchronous motion, its dynamic response limit values are also included. The path
motion is divided up into individual segments, as determined by the system, if necessary.
Within each segment, the path velocity and the path acceleration are adapted to the
maximum axial dynamic response limits.
Default
See selection list (combo box) (Page 65).
System variable for default value: userDefault.path.dynamicAdaption
Specific velocity profile Here, you select whether the path dynamic response is specified with the velocity profile
defined above or with a velocity profile that is defined by a cam.
No (default value)
The path dynamic response is specified with the velocity profile defined above with the
parameters: velocity profile, velocity, acceleration, deceleration, and jerk.
Yes
The path dynamic response is specified with a velocity profile that is defined by a cam.
Cam This field is only visible when Special velocity profile = Yes.
Here, you select the cam which defines the velocity profile. The following are available:
• All cams that are defined on the relevant device. The cams are defined in the CAMS
folder in the project navigator.
• All variables with the following technology object data type declared in the MCC unit
or MCC chart (see Technology object data types (Page 101)): camType.
The Profile position at start of path and Profile position at end of path parameters are
used to select an area within the definition range of the cam (x axis) that is mapped by
scaling to the length of the programmed path. The value range (y axis) is interpreted as
the velocity in the unit configured on the path object.
Profile position at start of path These two values determine the area within the definition range of the cam (x axis) that is
Profile position at end of path mapped by scaling to the length of the programmed path.
Enter the values as signed floating-point numbers.
See the input field (Page 65).

SIMOTION MCC Motion Control Chart


502 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.1.4 Overview of parameters for Traverse path linearly – Path-synchronous motion tab

Table 5- 264 Overview of parameters for Traverse path linearly – Path-synchronous motion tab

Field/Button Explanation/instructions
Here, you specify values for the motion of the additional positioning axis that is assigned
to the path object and is traversed synchronously with the path motion.
Mode of path-synchronous Here, you specify how the axis for path-synchronous motion should be traversed with the
motion path motion:
Absolute
The programmed Position of path-synchronous motion is the end point of the path-
synchronous motion.
Relative
The programmed Position of path-synchronous motion is the traversing distance of the
path-synchronous motion.
Output path length
The path length (i.e. the distance covered by the path motion) is outputted linearly,
beginning from zero, as the path-synchronous motion.
Output path length added
The path length (i.e. the distance covered by the path motion) added to the existing value
at the beginning of the path motion is outputted as the path-synchronous motion.
Preassignment
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.w.mode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 503
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
Direction of synchronous path Select the direction of the path-synchronous motion. The direction must be specified in
motion the following cases:
• The Mode of path-synchronous motion is relative
• The axis for the path-synchronous motion is a modulo axis.
Positive
The direction of motion is the positive direction of the axis. With relative motion, the sign
of the position is ignored.
Negative
The direction of motion is the negative direction of the axis. With relative motion, the sign
of the position is ignored.
From position
The direction of motion is determined by the sign of the Position of path-synchronous
motion.
Shortest path
• With relative Mode of path-synchronous motion: The direction of motion is determined
by the sign of the Position of path-synchronous motion.
• For modulo axes: The direction of motion is the direction in which the programmed
target position can be reached via the shortest path.
Preassignment
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.w.direction
Position of path-synchronous This parameter is evaluated only for the following settings for Mode of path-synchronous
motion motion and has different meanings:
• Absolute: End point of the path-synchronous motion.
• Relative: Traversing distance of the path-synchronous motion.
Enter the values as signed floating-point numbers.
See Input field (Page 65)

5.8.1.5 Overview of parameters for Traverse path linearly – Expert tab

Table 5- 265 Overview of parameters for Traverse path linearly – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT, for a description, see Return value for the system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


504 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.1.6 Relevant system function for Traverse path linearly


Path technology package:
● _movePathLinear

Overview of parameters for Traverse path linearly / _movePathLinear

Table 5- 266 Parameters (MCC Traverse path linearly command compared to _movePathLinear system function)

Parameters of the MCC Parameters of the


Traverse path linearly command _movePathLinear system function
Path object pathObject
Transition behavior mergeMode
Delay program execution nextCommand
Parameters tab
Path plane pathPlane
Mode pathMode
Target coordinate X x
Target coordinate Y y
Target coordinate Z z
Blending blendingMode
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Dynamic response adaptation dynamicAdaption
Specific velocity profile specificVelocityProfile
Cam profileReference
Profile position at start of path profileStartPosition
Profile position at end of path profileEndPosition
Synchronous axis tab
Synchronous axis mode wMode
Synchronous axis direction wDirection
Synchronous axis position w
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 505
MCC commands
5.8 Commands for path interpolation

5.8.2 Traverse path circularly

This function is available in SIMOTION kernel Version 4.1 and higher.


This command moves the path axes interconnected with the specified path object on an arc
to an end point. You can define the arc as follows:
● With the end point of the motion and the radius and orientation of the arc (enables only
two-dimensional motion in one of the main Cartesian planes)
● With the center and angle of the arc (enables only two-dimensional motion in one of the
main Cartesian planes)
● With the intermediate and endpoint of the motion (enables three-dimensional or two-
dimensional motion in one of the main Cartesian planes)
The center, intermediate point, and end point can be specified as absolute or relative.

Figure 5-105 Parameter screen form: Traverse path circularly

For the fundamentals of path interpolation, see the TO Path Interpolation Function Manual
For additional information on circular paths, see the TO Path Interpolation Function Manual.

SIMOTION MCC Motion Control Chart


506 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.2.1 Overview of parameters for Traverse path circularly

Table 5- 267 Overview of parameters for Traverse path circularly

Field/Button Explanation/instructions
Path object In Path object, select the path object whose assigned path axes are to be traversed to the
end point. The list contains:
• All path objects that are defined on the relevant device. The path objects are defined
in the PATH OBJECTS folder in the project navigator.
• All variables with the following data type of a technology object declared in the MCC
source file or MCC chart (see Technology object data types (Page 101)):
_pathObjectType.
Parameters tab See Overview of parameters for Traverse path circularly - Parameters tab (Page 508)
Dynamic response tab See Overview of parameters for Traverse path circularly - Dynamic response tab
(Page 511)
Synchronous axis tab See Overview of parameters for Traverse path circularly - Path-synchronous motion tab
(Page 513)
Expert tab See Overview of parameters for Traverse path circularly - Expert tab (Page 514)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the path object or on the axes involved. The selected
behavior determines the position of the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 507
MCC commands
5.8 Commands for path interpolation

5.8.2.2 Overview of parameters for Traverse path circularly – Parameters tab

Table 5- 268 Overview of parameters for Traverse path circularly – Parameters tab

Field/Button Meaning/Instruction
Path plane Here, you select whether the motion is to be carried out in three dimensions (3D) or two
dimensions (2D).
X-Y-Z
Three-dimensional motion
X-Y main plane
Y-Z main plane
Z-X main plane
Two-dimensional motion in the selected main plane of the basic (Cartesian) coordinate
system. The target coordinate located outside the selected plane is ignored.
Preassigned value (default value)
See selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.plane
Mode This parameter is evaluated only for:
• Circle specified using radius, end point, and orientation
• Circle specified using intermediate and end point
The meaning of the subsequently programmed target coordinates is defined in more
detail here.
Absolute
The programmed target coordinates refer to the zero point of the basic coordinate
system.
Relative
The programmed target coordinates refer to the path position within the basic coordinate
system when the path command is executed (point in time of change).
Preassigned value (default value)
See selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.mode
Target coordinates These parameters are evaluated only for:
X, Y, Z • Circle specified using radius, end point, and orientation
• Circle specified using intermediate and end point
The end point of the motion is specified here. The meaning depends on the Mode
parameter (see above):
• Absolute mode: Absolute coordinates with respect to the zero point of the basic
coordinate system.
• Relative mode: Relative coordinates with respect to the path position within the basic
coordinate system when the path command is executed (point in time of change).
Enter the values as signed floating-point numbers.
See the input field (Page 65).

SIMOTION MCC Motion Control Chart


508 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

Field/Button Meaning/Instruction
Blending This parameter is evaluated only for:
• Attach transition behavior or
• Attach transition behavior and discard pending command.
With blending, the path segment programmed with this command can be linked to the
previous path segment to form one complete path with no stop. At the transition, the
system provides for a constant path velocity and a constant path acceleration.
Active with dynamic response adaptation
The dynamic response limit values of the individual path axes are also applied in the
blending area. For this reason, the path velocity is nearly reduced to zero at transitions of
path segments during which the pitches or curvatures are not applied smoothly.
Active without dynamic response adaptation
In the blending area, path interpolation takes into account only the scalar dynamic
response limit values of the path (path velocity, path acceleration and jerk). The dynamic
response limit values specific to the axes are first taken into account during movement of
the individual path axes. For this reason, deviations from the path, specific to the axes,
can occur at transitions of path segments during which the pitches or curvatures are not
applied smoothly.
Inactive
The motion programmed with this command does not begin until the setpoint interpolation
of the previous command is complete and its motion has reached the target coordinates.
The path velocity and path acceleration are therefore zero at the transition.
Preassigned value (default value)
See selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.blending.mode
Circle specified via Here, you select the characteristic values specifying the arc to be traversed.
Radius, end point, and orientation
Only 2D interpolation is possible in the main plane of the coordinate system selected in
the Path plane parameter. The end point specified with the target coordinates is
approached on an arc starting from the current position. You define the arc with its radius
and circular orientation. Note that for the circular orientation, in addition to the direction of
rotation, you must specify whether traversing is to be performed along the large or small
arc.
Center and angle
Only 2D interpolation is possible in the main plane of the coordinate system selected in
the Path plane parameter. Starting from the current position, an arc is traversed. You
define this arc by its center coordinates, the angle, and the circular orientation.
Intermediate and end point
2D and 3D interpolation is possible. The end point specified with the target coordinates is
approached on an arc starting from the current position. You define the arc using an
intermediate point that you specify with its intermediate point coordinates. With 3D
interpolation, you define the path plane through the current position at the beginning of
the path, the intermediate point and the end point.
Preassigned value (default value)
See selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.circularType

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 509
MCC commands
5.8 Commands for path interpolation

Field/Button Meaning/Instruction
Circular orientation This parameter is evaluated only for:
• Circle specified using radius, end point, and orientation
• Circle specified using center and angle
Here, you enter the orientation of the arc.
Positive(default value)
Positive direction of rotation in the selected main plane. For a circle specified using
radius, end point, and orientation, the angle traveled is less than or equal to 180 °.
Negative
Negative direction of rotation in the selected main plane. For a circle specified using
radius, end point, and orientation, the angle traveled is less than or equal to 180 °.
Positive on large arc
Positive direction of rotation in the selected main plane. For a circle specified using
radius, end point, and orientation, the angle traveled is greater than or equal to 180 °.
Negative on large arc
Negative direction of rotation in the selected main plane. For a circle specified using
radius, end point, and orientation, the angle traveled is greater than or equal to 180 °.
Intermediate point mode This parameter is evaluated only for:
• Circle specified using center and angle
• Circle specified using intermediate and end point
The meaning of the subsequently programmed center and intermediate point coordinates
is defined in more detail here.
Absolute
The programmed center and intermediate point coordinates refer to the zero point of the
basic coordinate system.
Relative
The programmed center and intermediate coordinates refer to the path position within the
basic coordinate system when the path command is executed (point in time of change).
As end point coordinate
The setting from the Mode parameter is taken for the programmed center and
intermediate point coordinates.
Preassigned value (default value)
See selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.ijkMode
Center coordinates These parameters are evaluated only for:
Center point coordinates I, J, K • Circle specified using center and angle
• Circle specified using intermediate and end point
Here, you specify the center of the arc and the intermediate point of the circular motion.
The meaning depends on the Intermediate point mode parameter (see above):
• Intermediate point absolute mode: Absolute coordinates with respect to the zero point
of the basic coordinate system.
• Intermediate point relative mode: Relative coordinates with respect to the path
position within the basic coordinate system when the path command is executed
(point in time of change).
Enter the values as signed floating-point numbers.
See selection list (combo box) (Page 65).

SIMOTION MCC Motion Control Chart


510 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

Field/Button Meaning/Instruction
Angle The parameter is evaluated only for circle specification with center point and angle:
Here, you specify the angle of rotation of arc I
Enter the value as a signed floating-point number.
See the input field (Page 65).
Radius The parameter is evaluated only for circle specification with radius, end point, and
orientation:
Here, you specify the radius of the arc.
Enter the value as a signed floating-point number.
See the input field (Page 65).

5.8.2.3 Overview of parameters for Traverse path circularly – Dynamic response tab

Table 5- 269 Overview of parameters for Traverse path circularly – Dynamic response tab

Field/Button Meaning/Instruction
Here, you specify the dynamic response of the path motion.
In standard cases, you define the dynamic response by means of a velocity profile with
the associated values for the velocity. Acceleration, deceleration, and jerk. A detailed
description of these parameters is provided in Overview of parameters – Dynamics tab
(Page 75).
Optionally, you can select a special velocity profile that is described by a cam.
Velocity The entered value acts during the constant velocity phase.
This parameter is evaluated only when Special velocity profile = No.
System variable for preassigned value: userDefault.pathDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.profile
Acceleration The entered value acts during the constant acceleration phase.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.negativeAccel

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 511
MCC commands
5.8 Commands for path interpolation

Field/Button Meaning/Instruction
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
The parameters are evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variables for preassigned value:
userDefault.pathDynamics.positiveAccelStartJerk
userDefault.pathDynamics.positiveAccelEndJerk
userDefault.pathDynamics.negativeAccelStartJerk
userDefault.pathDynamics.negativeAccelEndJerk
Dynamic response adaptation Here, you select whether the dynamic response limit values are to be taken into account
during path interpolation.
Inactive
The dynamic response limit values of the individual path axes are not taken into account
during path interpolation. However, they remain active, and an error is triggered if they
are exceeded. This setting should only be selected if it is ensured by other means (e.g.,
an appropriate specific velocity profile) that the limit values will not be exceeded.
Maximum axial dynamic response values without segmentation
The dynamic response limit value of the individual path axes for velocity and acceleration
are taken into account during path interpolation. If a position axis is configured for the
path-synchronous motion, its dynamic response limit values are also included. Path
velocity and path acceleration are adapted for the entire path motion if necessary.
Maximum axial dynamic response values with segmentation
The dynamic response limit value of the individual path axes for velocity and acceleration
are taken into account during path interpolation. If a position axis is configured for the
path-synchronous motion, its dynamic response limit values are also included. The path
motion is divided up into individual segments, as determined by the system, if necessary.
Within each segment, the path velocity and the path acceleration are adapted to the
maximum axial dynamic limits.
Default
See selection list (combo box) (Page 65).
System variable for default value: userDefault.path.dynamicAdaption
Specific velocity profile Here, you select whether the path dynamic response is specified with the velocity profile
defined above or with a velocity profile that is defined by a cam.
No (default value)
The path dynamic response is specified with the velocity profile defined above with the
parameters: velocity profile, velocity, acceleration, deceleration, and jerk.
Yes
The path dynamic response is specified with a velocity profile that is defined by a cam.

SIMOTION MCC Motion Control Chart


512 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

Field/Button Meaning/Instruction
Cam This field is only visible when Special velocity profile = Yes.
Here, you select the cam which defines the velocity profile. The following are available:
• All cams that are defined on the relevant device. The cams are defined in the CAMS
folder in the project navigator.
• All variables declared in the MCC unit or MCC chart with the following technology
object data type (Description of technology object data types (Page 101)): camType.
The Profile position at start of path and Profile position at end of path parameters are
used to select an area within the definition range of the cam (x axis) that is mapped by
scaling to the length of the programmed path. The value range (y axis) is interpreted as
the velocity in the unit configured on the path object.
Profile position at start of path These two values determine the area within the definition range of the cam (x axis) that is
Profile position at end of path mapped by scaling to the length of the programmed path.
Enter the values as signed floating-point numbers.
See the input field (Page 65).

5.8.2.4 Overview of parameters for Traverse path circularly – Path-synchronous motion tab

Table 5- 270 Overview of parameters for Traverse path circularly – Path-synchronous motion tab

Field/Button Explanation/instructions
Here, you define values the motion of the additional positioning axis that is assigned to
the path object and is traversed synchronously with the path motion.
Mode of path-synchronous Here, you specify how the axis for path-synchronous motion should be traversed with the
motion path motion:
Absolute
The programmed Position of path-synchronous motion is the end point of the path-
synchronous motion.
Relative
The programmed Position of path-synchronous motion is the traversing distance of the
path-synchronous motion.
Output path length
The path length (i.e. the distance covered by the path motion) is outputted linearly,
beginning from zero, as the path-synchronous motion.
Output path length added
The path length (i.e. the distance covered by the path motion) added to the existing value
at the beginning of the path motion is outputted as the path-synchronous motion.
Preassignment
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.w.mode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 513
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
Direction of synchronous path Select the direction of the path-synchronous motion. The direction must be specified in
motion the following cases:
• The Mode of path-synchronous motion is relative
• The axis for the path-synchronous motion is a modulo axis.
Positive
The direction of motion is the positive direction of the axis. With relative motion, the sign
of the position is ignored.
Negative
The direction of motion is the negative direction of the axis. With relative motion, the sign
of the position is ignored.
From position
The direction of motion is determined by the sign of the Position of path-synchronous
motion.
Shortest path
• With relative Mode of path-synchronous motion: The direction of motion is determined
by the sign of the Position of path-synchronous motion.
• For modulo axes: The direction of motion is the direction in which the programmed
target position can be reached via the shortest path.
Preassignment
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.w.direction
Position of path-synchronous This parameter is evaluated only for the following settings for Mode of path-synchronous
motion motion and has different meanings:
• Absolute: End point of the path-synchronous motion.
• Relative: Traversing distance of the path-synchronous motion.
Enter the values as signed floating-point numbers.
See Input field (Page 65)

5.8.2.5 Overview of parameters for Traverse path circularly – Expert tab

Table 5- 271 Overview of parameters for Traverse path circularly – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT, for a description, see Return value for the system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


514 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.2.6 Relevant system function for Traverse path circularly


Path technology package:
● _movePathCircular

Overview of parameters for Traverse path circularly / _movePathCircular

Table 5- 272 Parameters (MCC Traverse path circularly command compared to _movePathCircular system function)

Parameters of the MCC Parameters of the


Traverse path circularly command _movePathCircular system function
Path object pathObject
Transition behavior mergeMode
Delay program execution nextCommand
Parameters tab
Path plane pathPlane
Mode pathMode
Target coordinate X x
Target coordinate Y y
Target coordinate Z z
Blending blendingMode
Circle specified via circularType
Circular orientation circleDirection
Intermediate point mode ijkMode
Center/intermediate point coordinate I i
Center/intermediate point coordinate J j
Center/intermediate point coordinate K k
Angle arc
Radius radius
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Dynamic response adaptation dynamicAdaption
Specific velocity profile specificVelocityProfile
Cam profileReference
Profile position at start of path profileStartPosition
Profile position at end of path profileEndPosition
Synchronous axis tab
Synchronous axis mode wMode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 515
MCC commands
5.8 Commands for path interpolation

Parameters of the MCC Parameters of the


Traverse path circularly command _movePathCircular system function
Synchronous axis direction wDirection
Synchronous axis position w
Expert tab
CommandID variable commandId
Return variable –

5.8.3 Traverse path using polynomials

This function is available in SIMOTION kernel Version 4.1 and higher.


This command moves the path axes interconnected with the specified path object on a path
described by a fifth order polynomial.
P(q)= a0 + a1q + a2q2 + a3q3 + a4q4 +a5q5, where q ∈ [0, 1].
Here the polynomial coefficients a0 to a5 are three-dimensional vectors. You may specify
these in the following ways:
● By calculation from geometric data
In this case you specify the following values:
– Starting point (current position) and end point (target coordinates)
– First geometric derivative (tangential vector) and second geometric derivative
(curvature vector) at the starting point
– First geometric derivative (tangential vector) and second geometric derivative
(curvature vector) at the end point.
You can select how the first and second geometric derivatives are specified at the
starting point:
– With explicit specification of values
– By accepting the corresponding values at the end point of the previous path command
The polynomial coefficients a0 to a5 are calculated from this geometric data.
System functions are available for performing a geometric analysis of paths (e.g.
determining the geometric derivatives at specified points).

SIMOTION MCC Motion Control Chart


516 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

● By direct specification of the polynomial coefficients


In this case you specify the following values:
– The starting point (current position) corresponds to P(0).
– The end point (target coordinates) corresponds to P(1).
– The polynomial coefficients a2, a3, a4 and a5.
The polynomial coefficients a0 and a1 are calculated from this data:
– a0 = P(0)
– a1 = P(1) - P(0) - a2 - a3 - a4 -a5.
The end point entered can be absolute or relative.

Figure 5-106 Parameter screen form: Traverse path using polynomials

For the fundamentals of path interpolation, see the TO Path Interpolation Function Manual
For additional information on polynomial paths, see the TO Path Interpolation Function
Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 517
MCC commands
5.8 Commands for path interpolation

5.8.3.1 Overview of parameters for Traverse path using polynomials

Table 5- 273 Overview of parameters for Traverse path using polynomials

Field/Button Explanation/instructions
Path object In Path object, select the path object whose assigned path axes are to be traversed to the
end point. The list contains:
• All path objects that are defined on the relevant device. The path objects are defined
in the PATH OBJECTS folder in the project navigator.
• All variables with the following data type of a technology object declared in the MCC
source file or MCC chart (see Technology object data types (Page 101)):
_pathObjectType.
Parameters tab See Overview of parameters for Traverse path using polynomials - Parameters tab
(Page 519)
Dynamic response tab See Overview of parameters for Traverse path using polynomials - Dynamic response tab
(Page 522)
Synchronous axis tab See Overview of parameters for Traverse path using polynomials - Path-synchronous
motion tab (Page 525)
Expert tab See Overview of parameters for Traverse path using polynomials - Expert tab (Page 526)
Transition behavior Here, you program the transition behavior between the programmed command and the
command currently active on the axes involved. The selected behavior determines the
position of the command in the command queue.
See also Transition behavior from the currently active motion command (Page 82).
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

SIMOTION MCC Motion Control Chart


518 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.3.2 Overview of parameters for Traverse path using polynomials – Parameters tab

Table 5- 274 Overview of parameters for Traverse path using polynomials – Parameters tab

Field/Button Explanation/instructions
Path plane Here, you select whether the motion is to be carried out in three dimensions (3D) or two
dimensions (2D).
X-Y-Z
Three-dimensional motion
X-Y main plane
Y-Z main plane
Z-X main plane
Two-dimensional motion in the selected main plane of the basic (Cartesian) coordinate
system. The target coordinate located outside the selected plane is ignored.
Preassigned value (default value)
See Selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.plane
Mode The meaning of the subsequently programmed target coordinates is defined in more
detail here.
Absolute
The programmed target coordinates refer to the zero point of the basic coordinate
system.
Relative
The programmed target coordinates refer to the path position within the basic coordinate
system when the path command is executed (point in time of change).
current axis position and specify the (straight) traversing path.
Preassigned value (default value)
See .
System variable for preassigned value: userDefault.path.mode
Target coordinates The end point of the motion is specified here. The meaning depends on the Mode
X, Y, Z parameter (see above):
• Absolute mode: Absolute coordinates with respect to the zero point of the basic
coordinate system.
• Relative mode: Relative coordinates with respect to the path position within the basic
coordinate system when the path command is executed (point in time of change).
Enter the values as signed floating-point numbers.
See

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 519
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
Blending This parameter is evaluated only for:
• Attach transition behavior or
• Attach transition behavior and discard pending command.
With blending, the path segment programmed with this command can be linked to the
previous path segment to form one complete path with no stop. At the transition, the
system provides for a constant path velocity and a constant path acceleration.
Active with dynamic response adaptation
Path interpolation takes into account the dynamic response limit values of the individual
path axes in the blending area as well. For this reason, the path velocity is nearly reduced
to zero at transitions of path segments during which the pitches or curvatures are not
applied smoothly.
Active without dynamic response adaptation
In the blending area, path interpolation takes into account only the scalar dynamic
response limit values of the path (path velocity, path acceleration and jerk). The dynamic
response limit values specific to the axes are first taken into account during movement of
the individual path axes. For this reason, deviations from the path, specific to the axes,
can occur at transitions of path segments during which the pitches or curvatures are not
applied smoothly.
Inactive
The motion programmed with this command does not begin until the setpoint interpolation
of the previous command is complete and its motion has reached the target coordinates.
The path velocity and path acceleration are therefore zero at the transition.
Preassigned value (default value)
See .
System variable for preassigned value: userDefault.blending.mode

SIMOTION MCC Motion Control Chart


520 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
Polynomial specified via Here you select how the fifth order polynomial that describes the motion path is specified.
Explicit specification of starting point data
The polynomial is calculated from geometric data. Specify explicitly:
• Starting point (current position) and end point (target coordinates)
• First geometric derivative (tangential vector) and second geometric derivative
(curvature vector) at the starting point
• First geometric derivative (tangential vector) and second geometric derivative
(curvature vector) at the end point.
System functions are available for performing a geometric analysis of paths (e.g.
determining the geometric derivatives at specified points).
Attach continuously
The polynomial is calculated from geometric data. Specify explicitly:
• Starting point (current position) and end point (target coordinates)
• First geometric derivative (tangential vector) and second geometric derivative
(curvature vector) at the end point.
The first geometric derivative (tangential vector) and the second geometric derivative
(curvature vector) at the starting point (current position) are set equal to the geometric
derivatives at the end point of the previous path command. If the geometric derivatives
cannot be determined in the start point (if no current motion is available), the command is
not executed and error message 50002 "Calculation of the geometry element not
possible, reason 3" is outputted.
System functions are available for performing a geometric analysis of paths (e.g.
determining the geometric derivatives at specified points).
Direct specification of the polynomial coefficients
Specify the polynomial coefficients explicitly through the following values:
• Starting point P(0) (current position).
• End point P(1) (target coordinates).
• Polynomial coefficients a2, a3, a4 and a5.
The polynomial coefficients a0 and a1 are calculated from this data:
• a0 = P(0)
• a1 = P(1) - P(0) - a2 - a3 - a4 -a5.
Preassigned value (default value)
See .
System variable for preassigned value: userDefault.path.polynomialMode
1. First geometric derivative at This parameter is evaluated only with polynomial specification via explicit specification of
the starting point the starting point data.
X, Y, Z Here, you specify the first geometric derivative (tangential vector) at the starting point
(current position).
Enter the values as signed floating-point numbers.
See
2. Second geometric derivative This parameter is evaluated only with polynomial specification via explicit specification of
at the starting point the starting point data.
X, Y, Z Here, you specify the second geometric derivative (curvature vector) at the starting point
(current position).
Enter the values as signed floating-point numbers.
See

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 521
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
1. First geometric derivative at This parameter is evaluated only with polynomial specification via explicit specification of
the end point the starting point data and attach continuously.
X, Y, Z Here, you specify the first geometric derivative (tangential vector) at the end point (target
coordinates).
Enter the values as signed floating-point numbers.
See
2. Second geometric derivative This parameter is evaluated only with polynomial specification via explicit specification of
at the end point the starting point data and Attach continuously.
X, Y, Z Here, you specify the second geometric derivative (curvature vector) at the end point
(target coordinates).
Enter the values as signed floating-point numbers.
See
Coefficient a2 These parameters are evaluated only with polynomial specification via direct specification
X, Y, Z of the polynomial coefficients.
Coefficient a3 Here you specify the coefficients a2, a3, a4 and a5 of the fifth order polynomial.
X, Y, Z Enter the values as signed floating-point numbers.
Coefficient a4 See
X, Y, Z
Coefficient a5
X, Y, Z

See also
Input field (Page 65)

5.8.3.3 Overview of parameters for Traverse path using polynomials – Dynamic response tab

Table 5- 275 Overview of parameters for Traverse path using polynomials – Dynamic response tab

Field/Button Explanation/Instruction
Here, you specify the dynamic response of the path motion.
In standard cases, you define the dynamic response by means of a velocity profile with
the associated values for the velocity. Acceleration, deceleration, and jerk. A detailed
description of these parameters is provided in Overview of parameters – Dynamics tab
(Page 75).
Optionally, you can select a special velocity profile that is described by a cam.
Velocity The entered value acts during the constant velocity phase.
This parameter is evaluated only when Special velocity profile = No.
System variable for preassigned value: userDefault.pathDynamics.velocity
Velocity profile In this field, you define the transitions between the individual motion phases.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.profile

SIMOTION MCC Motion Control Chart


522 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/Instruction
Acceleration The entered value acts during the constant acceleration phase.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.positiveAccel
Deceleration The entered value acts during the constant deceleration phase.
The parameter is evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variable for preassigned value: userDefault.pathDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
The parameters are evaluated only in the following cases:
• When Special velocity profile = No
• When Special velocity profile = Yes and when accelerating to the velocity specified in
the special velocity profile.
System variables for preassigned value:
userDefault.pathDynamics.positiveAccelStartJerk
userDefault.pathDynamics.positiveAccelEndJerk
userDefault.pathDynamics.negativeAccelStartJerk
userDefault.pathDynamics.negativeAccelEndJerk
Dynamic response adaptation Here, you select whether the dynamic response limit values are to be taken into account
during path interpolation.
Inactive
The dynamic response limit values of the individual path axes are not taken into account
during path interpolation. However, they remain active, and an error is triggered if they
are exceeded. This setting should only be selected if it is ensured by other means (e.g.,
an appropriate specific velocity profile) that the limit values will not be exceeded.
Maximum axial dynamic response values without segmentation
The dynamic response limit value of the individual path axes for velocity and acceleration
are taken into account during path interpolation. If a positioning axis is configured for the
path-synchronous motion, its dynamic response values are also included. Path velocity
and path acceleration are adapted for the entire path motion if necessary.
Maximum axial dynamic response values with segmentation
The dynamic response limit value of the individual path axes for velocity and acceleration
are taken into account during path interpolation. If a positioning axis is configured for the
path-synchronous motion, its dynamic response values are also included. The path
motion is divided up into individual segments, as determined by the system, if necessary.
Within each segment, the path velocity and the path acceleration are adapted to the
maximum axial dynamic limits.
Preassigned value
See selection list (combo box) (Page 65).
System variable for preassigned value: userDefault.path.dynamicAdaption

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 523
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/Instruction
Specific velocity profile Here, you select whether the path dynamic response is specified with the velocity profile
defined above or with a velocity profile that is defined by a cam.
No(default value)
The path dynamic response is specified with the velocity profile defined above with the
parameters: velocity profile, velocity, acceleration, deceleration, and jerk.
Yes
The path dynamic response is specified with a velocity profile that is defined by a cam.
Cam This field is only visible when Special velocity profile = Yes.
Here, you select the cam which defines the velocity profile. The following are available:
• All cams that are defined on the relevant device. The cams are defined in the CAMS
folder in the project navigator.
• All technology object-type variables declared in the MCC unit or MCC chart (see
Technology object data types (Page 101)): camType.
The Profile position at start of path and Profile position at end of path parameters are
used to select an area within the definition range of the cam (x axis) that is mapped by
scaling to the length of the programmed path. The value range (y axis) is interpreted as
the velocity in the unit configured on the path object.
Profile position at start of path These two values determine the area within the definition range of the cam (x axis) that is
Profile position at end of path mapped by scaling to the length of the programmed path.
Enter the values as signed floating-point numbers.
See the input field (Page 65).

SIMOTION MCC Motion Control Chart


524 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.3.4 Overview of parameters for Traverse path using polynomials – Path-synchronous motion
tab

Table 5- 276 Overview of parameters for Traverse path using polynomials – Path-synchronous motion tab

Field/Button Explanation/instructions
Here, you define values the motion of the additional positioning axis that is assigned to
the path object and is traversed synchronously with the path motion.
Mode of path-synchronous Here, you specify how the axis for path-synchronous motion should be traversed with the
motion path motion:
Absolute
The programmed Position of path-synchronous motion is the end point of the path-
synchronous motion.
Relative
The programmed Position of path-synchronous motion is the traversing distance of the
path-synchronous motion.
Output path length
The path length (i.e. the distance covered by the path motion) is outputted linearly,
beginning from zero, as the path-synchronous motion.
Output path length added
The path length (i.e. the distance covered by the path motion) added to the existing value
at the beginning of the path motion is outputted as the path-synchronous motion.
Preassignment
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.w.mode

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 525
MCC commands
5.8 Commands for path interpolation

Field/Button Explanation/instructions
Direction of synchronous path Select the direction of the path-synchronous motion. The direction must be specified in
motion the following cases:
• The Mode of path-synchronous motion is relative
• The axis for the path-synchronous motion is a modulo axis.
Positive
The direction of motion is the positive direction of the axis. With relative motion, the sign
of the position is ignored.
Negative
The direction of motion is the negative direction of the axis. With relative motion, the sign
of the position is ignored.
From position
The direction of motion is determined by the sign of the Position of path-synchronous
motion.
Shortest path
• With relative Mode of path-synchronous motion: The direction of motion is determined
by the sign of the Position of path-synchronous motion.
• For modulo axes: The direction of motion is the direction in which the programmed
target position can be reached via the shortest path.
Preassignment
See Selection list (combo box) (Page 65)
System variable for preassigned value: userDefault.w.direction
Position of path-synchronous This parameter is evaluated only for the following settings for Mode of path-synchronous
motion motion and has different meanings:
• Absolute: End point of the path-synchronous motion.
• Relative: Traversing distance of the path-synchronous motion.
Enter the values as signed floating-point numbers.
See Input field (Page 65)

5.8.3.5 Overview of parameters for Traverse path using polynomials – Expert tab

Table 5- 277 Overview of parameters for Traverse path using polynomials – Expert tab

Field/Button Explanation/instructions
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT, for a description, see Return value for the system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


526 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.3.6 Relevant system function for Traverse path using polynomials


Path technology package:
● _movePathPolynomial

Overview of parameters for Traverse path using polynomials / _movePathPolynomial

Table 5- 278 Parameters (MCC Traverse path using polynomials command compared to _movePathPolynomial system
function)

Parameters of the MCC Parameters of the


Traverse path using polynomials command _movePathPolynomial system function
Path object pathObject
Transition behavior mergeMode
Delay program execution nextCommand
Parameters tab
Path plane pathPlane
Mode pathMode
Target coordinate X x
Target coordinate Y y
Target coordinate Z z
Blending blendingMode
Polynomial specified via polynomialMode
First derivative at starting point X vector1x
First derivative at starting point Y vector1y
First derivative at starting point Z vector1z
Second derivative at starting point X vector2x
Second derivative at starting point Y vector2y
Second derivative at starting point Z vector2z
First derivative at end point X Dependent on Polynomial specified via parameter:
• With Explicit specification of starting point data: vector3x
• With Attach continuously: vector1x
First derivative at end point Y Dependent on Polynomial specified via parameter:
• With Explicit specification of starting point data: vector3y
• With Attach continuously: vector1y
First derivative at end point Z Dependent on Polynomial specified via parameter:
• With Explicit specification of starting point data: vector3z
• With Attach continuously: vector1z
Second derivative at end point X Dependent on Polynomial specified via parameter:
• With Explicit specification of starting point data: vector4x
• With Attach continuously: vector2x
Second derivative at end point Y Dependent on Polynomial specified via parameter:
• With Explicit specification of starting point data: vector4y
• With Attach continuously: vector2y

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 527
MCC commands
5.8 Commands for path interpolation

Parameters of the MCC Parameters of the


Traverse path using polynomials command _movePathPolynomial system function
Second derivative at end point Z Dependent on Polynomial specified via parameter:
• Explicit specification of starting point data: vector4z
• Attach continuously: vector2z
Coefficient a2 X vector1x
Coefficient a2 Y vector1y
Coefficient a2 Z vector1z
Coefficient a3 X vector2x
Coefficient a3 Y vector2y
Coefficient a3 Z vector2z
Coefficient a4 X vector3x
Coefficient a4 Y vector3y
Coefficient a4 Z vector3z
Coefficient a5 X vector4x
Coefficient a5 Y vector4y
Coefficient a5 Z vector4z
Dynamic response tab
Velocity velocityType, velocity
Velocity profile velocityProfile
Acceleration positiveAccelType, positiveAccel
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelStartJerkType, positiveAccelStartJerk,
positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Dynamic response adaptation dynamicAdaption
Specific velocity profile specificVelocityProfile
Cam profileReference
Profile position at start of path profileStartPosition
Profile position at end of path profileEndPosition
Synchronous axis tab
Synchronous axis mode wMode
Synchronous axis direction wDirection
Synchronous axis position w
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


528 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.4 Stop path motion

This function is available in SIMOTION kernel Version 4.1 and higher.


This command stops the current path motion (including the path-synchronous motion) with
the programmed dynamic response parameters (deceleration ramp). You can choose
whether the motion is aborted:
● Stop without abort: The motion can be resumed with the Continue path motion
(Page 533) command.
● Stop with abort: The motion cannot be continued.
The last calculated positions of each path axis and the synchronous axis (setpoint values)
are stored in the abortPosition system variable.

Figure 5-107 Parameter screen form: Stop path motion

For the fundamentals of path interpolation, see the TO Path Interpolation Function Manual
For additional information on stopping and continuing path motion, see the TO Path
Interpolation Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 529
MCC commands
5.8 Commands for path interpolation

5.8.4.1 Overview of parameters for Stop path motion

Table 5- 279 Overview of parameters for Stop path motion

Field/Button Explanation/instructions
Path object In Path object, select the path object whose assigned axes (path axes and synchronous
axis) are to be stopped. The list contains:
• All path objects that are defined on the relevant device. The path objects are defined
in the PATH OBJECTS folder in the project navigator.
• All variables with the following data type of a technology object declared in the MCC
source file or MCC chart (see Technology object data types (Page 101)):
_pathObjectType.
Parameters tab See Overview of parameters for Stop path motion - Parameters tab (Page 530)
Dynamic response tab See Overview of parameters for Stop path motion - Dynamic response tab (Page 531)
Expert tab See Overview of parameters for Stop path motion - Expert tab (Page 531)
Stop behavior Specifies when the command takes effect relative to the motion.
Stop path immediately
The active path motion is substituted immediately. All motion commands still pending in
the command buffer are deleted.
Stop at the end of the path command.
Not relevant.
Delay program execution • Select the check box if you wish the system to delay execution of the following
command in the MCC chart until the selected condition has been satisfied.
If the check box is not selected, the next command is executed immediately.
• Select the condition that has to be satisfied before the system continues execution of
the following command in the MCC chart.
See also Delay program execution (step enabling condition) (Page 83).

5.8.4.2 Overview of parameters for Stop path motion – Parameters tab

Table 5- 280 Overview of parameters for Stop path motion – Parameters tab

Field/Button Explanation/instructions
Stop mode Select a stop mode here. The path motion is stopped with the programmed dynamic
response parameters (Dynamic response tab (Page 531)). The last calculated positions
(setpoint values) of the path axes and the synchronous axis assigned to the path object
are stored in the abortPosition system variable.
Stop without abort (default value)
The motion can be continued with the Continue path motion command.
Stop with abort
The motion cannot be continued.

SIMOTION MCC Motion Control Chart


530 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.4.3 Overview of parameters for Stop path motion – Dynamic response tab

Table 5- 281 Overview of parameters for Stop path motion – Dynamic response tab

Field/Button Explanation/instructions
The Dynamic response tab is described in detail in Overview of parameters for Dynamic
response tab (Page 75).
Velocity profile In this field, you define the transitions between the individual motion phases.
System variable for preassigned value: userDefault.pathDynamics.profile
Deceleration The entered value acts during the constant deceleration phase.
System variable for preassigned value: userDefault.pathDynamics.negativeAccel
Jerk The entered value limits the change in the acceleration or deceleration at the start and
end of the respective phase.
System variables for preassigned value: userDefault.pathDynamics.positiveAccelEndJerk
userDefault.pathDynamics.negativeAccelStartJerk
userDefault.pathDynamics.negativeAccelEndJerk

5.8.4.4 Overview of parameters for Stop path motion – Expert tab

Table 5- 282 Overview of parameters for Stop path motion – Expert tab

Field/Button Explanation/Instruction
The Expert tab is described in detail in Overview of parameters for Expert tab (Page 79).
CommandID variable If you enter the name of a variable of data type CommandIdType, you can track the
command status with this variable.
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 531
MCC commands
5.8 Commands for path interpolation

5.8.4.5 Relevant system functions for Stop path motion


Path technology package:
● _stopPath

Overview of parameters for Stop path motion / _stopPath

Table 5- 283 Parameters (MCC Stop path motion command compared to _stopPath system function)

Parameters of the MCC Parameters of the


Stop path motion command _stopPath system function
Path object pathObject
Stop behavior mergeMode
Delay program execution nextCommand
Parameters tab
Stop mode stopMode
Dynamic response tab
Velocity profile velocityProfile
Deceleration negativeAccelType, negativeAccel
Jerk positiveAccelEndJerkType, positiveAccelEndJerk,
negativeAccelStartJerkType, negativeAccelStartJerk,
negativeAccelEndJerkType, negativeAccelEndJerk
Expert tab
CommandID variable commandId
Return variable –

SIMOTION MCC Motion Control Chart


532 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.5 Continue path motion

This function is available in SIMOTION kernel Version 4.1 and higher.


This command continues a path motion that has been stopped. It is only possible to continue
path motions that were stopped with the Stop without abort stop mode.
During the time between the interruption and the continuation, the path object and all axes
(path axes and axes for path-synchronous motion) assigned to it are not permitted to receive
any new motion commands.
The dynamic response parameters of the interrupted command are used when the motion is
continued.

Figure 5-108 Parameter screen form: Continue path motion

For the fundamentals of path interpolation, see the TO Path Interpolation Function Manual
For additional information on stopping and continuing path motion, see the TO Path
Interpolation Function Manual.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 533
MCC commands
5.8 Commands for path interpolation

5.8.5.1 Overview of parameters: Continue path motion

Table 5- 284 Overview of parameters: Continue path motion

Field/Button Explanation/Instruction
Path object In Path object, select the path object for which the motion of the assigned axes (path
axes and synchronous axis) is to be continued. The list contains:
• All path objects that are defined on the relevant device. The path objects are defined
in the PATH OBJECTS folder in the project navigator.
• All variables with the following data type of a technology object declared in the MCC
unit or MCC chart (see Technology object data types (Page 101)): _pathObjectType.
CommandID variable Enter the name of a variable of data type CommandIdType here. With the help of this
variable, you can, for example, trace back the status of the command.
Variables of data type CommandIdType declared in the MCC source file or MCC chart
are provided for selection.
If you leave the CommandID variable field empty, the CommandID is not assigned to any
variables; this means that you cannot access the CommandID (standard).
See also Overview of parameters for the Expert tab (Page 79).
Return variable If you enter the name of a variable of the specified data type, you can use this variable to
find out the result of the command call.
Data type DINT; for a description, see Return value for system functions of the
technology packages (Page 86).
Delay program execution Select the check box if you wish to delay execution of the following command until the
current command has been completed. If the check box is not selected, the next
command is executed immediately.

SIMOTION MCC Motion Control Chart


534 Programming and Operating Manual, 05/2009
MCC commands
5.8 Commands for path interpolation

5.8.5.2 Relevant system function for Continue path motion


Path technology package:
● _continuePath

Overview of parameters for Continue path motion, _continuePath

Table 5- 285 Parameters (MCC Continue path motion command compared to _continuePath system function)

Parameters of the MCC Parameters of the


Continue path motion command _continuePath system function
Path object pathObject
CommandID variable commandId
Return variable –
Delay program execution nextCommand

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 535
Commissioning (software) 6
6.1 Assigning programs to a task and downloading them to the target
system

6.1.1 assigning programs to a task


Programs must be assigned to a task before they can be downloaded to the target system
(the SIMOTION device).
Various tasks are made available by SIMOTION, each with different priorities or system
responses (e.g. during initialization). The Execution levels and tasks in SIMOTION table
contains a brief description of the available tasks.
For further information, refer to the SIMOTION Motion Control Basic Functions Description of
Functions.

Note
Programs need only be assigned to a task once; this assignment is retained if the program is
recompiled.

Assigning programs to a task:


1. In the project navigator double-click the EXECUTION SYSTEM object below the required
SIMOTION device.
The window for configuring the execution system is displayed. See figure below.
2. Select the required task (e.g. MotionTask_1) from the left pane.
3. Select the Program assignment tab.
4. Select the program to be assigned from the Programs list.
5. Click the >> button.
6. Select the Task Configuration tab, and specify any other required settings for the task
there.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 537
Commissioning (software)
6.1 Assigning programs to a task and downloading them to the target system

Figure 6-1 Configure execution system

Figure 6-2 Assigning a program to a motion task

SIMOTION MCC Motion Control Chart


538 Programming and Operating Manual, 05/2009
Commissioning (software)
6.1 Assigning programs to a task and downloading them to the target system

6.1.1.1 Execution levels and tasks in SIMOTION

Table 6- 1

Execution level Description


Time-controlled Cyclic tasks:
automatically restarted once assigned programs have been executed.
• SynchronousTasks Tasks are started periodically, synchronous with specified system
cycle clock.
• ServoSynchronousTask: Synchronous with position-control cycle
clock
• IPOsynchronousTask: Synchronous with interpolator cycle clock
IPO
• IPOsynchronousTask_2: Synchronous with interpolator cycle
clock IPO_2
• PWMsynchronousTask: Synchronous with PWM cycle clock
(for TControl technology package)
• InputSynchronousTask_1: Synchronous with Input1 cycle clock
(for TControl technology package)
• InputSynchronousTask_2: Synchronous with Input2 cycle clock
(for TControl technology package)
• PostControlTask_1: Synchronous with Control1 cycle clock
(for TControl technology package)
• PostControlTask_2: Synchronous with Control2 cycle clock
(for TControl technology package)
• TimerInterruptTasks Tasks are started periodically in a fixed time frame. This time frame
must be a multiple of interpolator cycle clock IPO.
Interrupts Sequential tasks:
executed once after start and then terminated.
• SystemInterruptTasks Started when a system event occurs:
• ExecutionFaultTask: Error processing a program
• PeripheralFaultTask: Error on I/O
• TechnologicalFaultTask: Error on the technology object
• TimeFaultBackgroundTask: BackgroundTask timeout
• TimeFaultTask: TimerInterruptTask timeout
• UserInterruptTasks They are started when a user-defined event occurs.
Round robin MotionTasks and BackgroundTasks share the free time remaining
after execution of the higher-priority system and user tasks. The
proportion of the two levels can be assigned.
• MotionTasks Sequential tasks:
executed once after start and then terminated. Start takes place:
• Explicitly via a task control command in a program assigned to
another task.
• Automatically when RUN mode is attained if the corresponding
attribute was set during task configuration.
The priority of a MotionTask can be temporarily increased using the
Wait for... functions (see Wait for axis (Page 185) , Wait for signal
(Page 188) , Wait for condition (Page 190)).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 539
Commissioning (software)
6.1 Assigning programs to a task and downloading them to the target system

Execution level Description


• BackgroundTask Cyclic task:
automatically restarted once assigned programs have been executed.
The task cycle time depends on the runtime.
StartupTask Task is executed once when there is a transition from STOP or STOP
U mode to RUN mode.
SystemInterruptTasks are started by their triggering system event.
ShutdownTask Task is executed once when there is a transition from RUN mode to
STOP or STOP U mode.
STOP or STOP U mode is reached by:
• Activating the operating mode switch
• Calling the relevant system function, for example, MCC Change
operating mode command
• Occurrence of a fault with the appropriate error response
SystemInterruptTasks and PeripheralFaultTasks are started by their
triggering system event.
For information on behavior of sequential and cyclic tasks:
• During initialization of local program variables:
See Initialization of local variables (Page 113).
• In the event of processing errors in the program:
Please refer to the SIMOTION Basic Functions Function Manual.
For information about access options for the process image and I/O variables:
Please refer to Important features of direct access and process image (Page 120).

SIMOTION MCC Motion Control Chart


540 Programming and Operating Manual, 05/2009
Commissioning (software)
6.1 Assigning programs to a task and downloading them to the target system

6.1.1.2 Task start sequence


When the StartupTask is completed, RUN mode is reached.
The following tasks are then started:
● SynchronousTasks
● TimerInterruptTasks
● BackgroundTask
● MotionTasks with startup attribute.

Note
The sequence in which these tasks are first started after RUN mode has been reached
does not conform to the task priorities.

Figure 6-3 Task configuration for a MotionTask

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 541
Commissioning (software)
6.1 Assigning programs to a task and downloading them to the target system

6.1.2 Downloading programs to the target system


The program has to be downloaded into the target system, together with the technology
objects etc., before being executed.
To download the program to the target system, proceed as follows:
1. Select Project > Save and recompile all
The project is locally saved on the hard disk and compiled, with due regard for all
dependencies.
2. Select the Project > Check consistency menu command to check the project for
consistency.
This is not necessary if the option Check consistency before loading is activated in menu
option Options > Settings in the Download tab (the default for this option is to be
activated). This means that the consistency check is performed automatically during
Download to target system.
3. Select the Project > Connect to target system menu command or click .
The Online mode is activated.
4. Select the Target system > Download to target system menu command or click .
The project data (including the sample program) and the data of the hardware
configuration are downloaded to the RAM of the target system.
For more information about downloading a program to the target system, see the SIMOTION
Basic Functions Function Manual.

SIMOTION MCC Motion Control Chart


542 Programming and Operating Manual, 05/2009
Error Handling and Program Test 7
7.1 Modes for program testing

7.1.1 Modes of the SIMOTION devices


Various SIMOTION device modes are available for program testing.
How to select the mode of a SIMOTION device:
1. Highlight the SIMOTION device in the project navigator.
2. Select the "Test mode" context menu.
3. Select the required mode (see following table).
If you have selected "Debug mode":
– Accept the safety information.
– Parameterize the sign-of-life monitoring.
Observe the following section: Important information about the life-sign monitoring
(Page 545).
4. Confirm with "OK".
The SIMOTION device switches to the selected mode.
When the SIMOTION device switches to "Debug mode":
– A connection to the target system will be established automatically (online mode) if
SIMOTION SCOUT is currently in offline mode.
– The activated debug mode is indicated in the status bar.
– The breakpoints toolbar (Page 569) is displayed.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 543
Error Handling and Program Test
7.1 Modes for program testing

Table 7- 1 Modes of a SIMOTION device

Setting Meaning
Process mode Program execution on the SIMOTION device is optimized for maximum system performance.
The following diagnostic functions are available, although they may have only restricted
functionality because of the optimization for maximum system performance:
• Monitor variables in the symbol browser (Page 548) or a watch table (Page 551).
• Program status (Page 556) (only restricted):
– Restricted monitoring of variables (e.g. variables in loops, return values for system
functions).
– As of version V4.0 of the SIMOTION kernel:
No more than one program source (e.g. ST source, MCC source, LAD/FBD source) can
be monitored per task.
– Up to version V3.2 of the SIMOTION kernel:
No more than one program source (e.g. ST source, MCC source, LAD/FBD source) can
be monitored.
• Trace tool (only restricted) with measuring functions for drives and function generator, see
online help:
– No more than one trace on each SIMOTION device.
Test mode The diagnostic functions of the process mode are available to the full extent:
• Monitor variables in the symbol browser (Page 548) or a watch table (Page 551).
• Program status (Page 556):
– Monitoring of all variables possible.
– As of version V4.0 of the SIMOTION kernel:
Several program sources (e.g. ST sources, MCC sources, LAD/FBD sources) can be
monitored per task.
– Up to version V3.2 of the SIMOTION kernel:
No more than one program source (e.g. ST source, MCC source, LAD/FBD source) can
be monitored per task.
• Trace tool with measuring functions for drives and function generator, see online help:
– No more than four traces on each SIMOTION device.

Note
Runtime and memory utilization increase as the use of diagnostic functions increases.
Debug mode This mode is available in SIMOTION kernel as of V3.2.
In addition to the diagnostic functions of the test mode, you can use the following functions:
• Breakpoints
Within a program source file, you can set breakpoints (Page 563). When an activated
breakpoint is reached, selected tasks will be stopped.
• Controlling MotionTasks
In the "Task Manager" tab of the device diagnostics, you can use task control commands for
MotionTasks, see the SIMOTION Basic Functions Function Manual.
No more than one SIMOTION device of the project can be switched to debug mode.
SIMOTION SCOUT is in online mode, i.e. connected with the target system.
Observe the following section: Important information about the life-sign monitoring (Page 545).

SIMOTION MCC Motion Control Chart


544 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.1 Modes for program testing

7.1.2 Important information about the life-sign monitoring.

WARNING
You must observe the appropriate safety regulations.
Use the debug mode or a control panel only with the life-sign monitoring function activated
with a suitably short monitoring time! Otherwise, if problems occur in the communication
link between the PC and the SIMOTION device, the axis may start moving in an
uncontrollable manner.
The function is released exclusively for commissioning, diagnostic and service purposes.
The function should generally only be used by authorized technicians. The safety
shutdowns of the higher-level control have no effect.
Therefore, there must be an EMERGENCY STOP circuit in the hardware. The appropriate
measures must be taken by the user.

Accept safety notes


After selecting the debug mode or a control panel, you must accept the safety notes. You
can set the parameters for the life-sign monitoring.
Proceed as follows:
1. Click the Settings button.
The "Debug settings" window opens.
2. Read there, as described in the following section, the safety notes and parameterize the
life-sign monitoring.

Parameterizing the life-sign monitoring


In the Life-sign monitoring parameterization window, proceed as described below:
1. Read the warning!
2. Click the Safety notes button to open the window with the detailed safety notes.
3. Do not make any changes to the defaults for life-sign monitoring.
Changes should only be made in special circumstances and in observance of all danger
warnings.
4. Click Accept to confirm you have read the safety notes and have correctly parameterized
the life-sign monitoring.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 545
Error Handling and Program Test
7.1 Modes for program testing

NOTICE
Pressing the spacebar or switching to a different Windows application causes:
• In debug mode for activated breakpoints:
– The SIMOTION device switches to STOP mode.
– The outputs are deactivated (ODIS).
• For controlling an axis or a drive using the control panel (control priority for the PC):
– The axis or the drive is brought to a standstill.
– The enables are reset.

WARNING
This function is not guaranteed in all operating modes. Therefore, there must be an
EMERGENCY STOP circuit in the hardware. The appropriate measures must be taken by
the user.

SIMOTION MCC Motion Control Chart


546 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.1 Modes for program testing

7.1.3 Life-sign monitoring parameters

Table 7- 2 Life-sign monitoring parameter description

Field Description
Life-sign monitoring The SIMOTION device and SIMOTION SCOUT regularly exchange life-
sign signals to ensure a correctly functioning connection. If the exchange
of the life-sign is interrupted longer than the set monitoring time, the
following response occurs:
• In debug mode for activated breakpoints:
– The SIMOTION device switches to STOP mode.
– The outputs are deactivated (ODIS).
• For controlling an axis or a drive using the control panel (control
priority for the PC):
– The axis is brought to a standstill.
– The enables are reset.
The following parameterizations are possible:
• Active check box:
If the check box is selected, life-sign monitoring is active.
The deactivation of the life-sign monitoring is not always possible.
• Monitoring time:
Enter the timeout.

Prudence
Do not make any changes to the defaults for life-sign monitoring, if
possible.
Changes should only be made in special circumstances and in
observance of all danger warnings.
Safety information Please observe the warning!
Click the button to obtain further safety information.
See: Important information about the life-sign monitoring (Page 545)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 547
Error Handling and Program Test
7.2 Monitoring variables in the symbol browser and watch tables

7.2 Monitoring variables in the symbol browser and watch tables

7.2.1 Symbol browser

Features
In the symbol browser, you can view and, if necessary, change the name, data type, and
variable values. In particular, you can: see the following variables:
● Unit variables and static variables of a program or function block
● System variables of a SIMOTION device or a technology object
● I/O variables or global device variables.
For these variables, you can:
● View a snapshot of the variable values
● Monitor variable values as they change
● Change (modify) variable values
However, the symbol browser can only display/modify the variable values if the project has
been loaded in the target system and a connection to the target system has been
established.

Using the symbol browser


Prerequisites
● Make sure that a connection to the target system has been established and a project has
been downloaded to the target system (see Download programs to the target system
(Page 542)).
● You can run the user program, but you do not have to. If the program is not run, you only
see the initial values of the variables.
The procedure depends on the memory area in which the variables to be monitored are
stored.

SIMOTION MCC Motion Control Chart


548 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.2 Monitoring variables in the symbol browser and watch tables

Variables in the user memory of the unit or in the retentive memory


In the symbol browser, you can monitor the variables contained in the user memory of the
unit or in the retentive memory:
● Retentive and non-retentive unit variables of the interface section of a program source
(unit)
● Retentive and non-retentive unit variables of the implementation section of a program
source (unit)
● Static variables of the function blocks whose instances are declared as unit variables.
● In addition, if the program source (unit) has been compiled with the "Create program
instance data only once" compiler option (Page 40):
– Static variables of the programs.
– Static variables of the function blocks whose instances are declared as static variables
of programs.
Follow these steps:
1. Select the program source file in the project navigator.
2. In the detail view, click the Symbol browser tab.
In the symbol browser, you can see all the variables of the program source contained in the
user memory of the unit or in the retentive memory.
● All unit variables of the program source.
● Only if the program source has been compiled with the "Create program instance data
only once" compiler option: The programs of the program source and below their static
variables (including instances of function blocks).

Variables in the user memory of the task


You can use the symbol browser to monitor the variables contained in the user memory of
the associated task:
If the program source (unit) was compiled without the compiler option (Page 40) "Create
program instance data only once" (default), the user memory of the task to which the
program was assigned contains the following variables:
● Static variables of the programs.
● Static variables of the function blocks whose instances are declared as static variables of
programs.
Follow these steps:
1. In the project navigator of SIMOTION SCOUT, select the EXECUTION SYSTEM element
in the subtree of the SIMOTION device.
2. In the detail view, click the Symbol browser tab.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 549
Error Handling and Program Test
7.2 Monitoring variables in the symbol browser and watch tables

The symbol browser shows all tasks used in the execution system together with the
assigned programs. The associated variables contained in the user memory of the task are
listed below.

Note
You can monitor temporary variables (together with unit variables and static variables) with
Program status (see Program status (Page 556)).

System variables and global device variables


You can also monitor the following variables in the symbol browser:
● System variables of SIMOTION devices
● System variables of technology objects
● I/O variables
● Global device variables
Follow these steps:
1. Select the appropriate element in the SIMOTION SCOUT project navigator.
2. In the detail view, click the Symbol browser tab.
The corresponding variables are displayed in the symbol browser.

Status and controlling variables


In the Status value column, the current variable values are displayed and periodically
updated.
You can change the value of one or several variables. Proceed as follows for the variables to
be changed:
1. Enter a value in the Control value column.
2. Activate the check box in this column
3. Click the Immediate control button.
The values you entered are written to the selected variables.

NOTICE
Note when you change the values of several variables:
The values are written sequentially to the variables. It can take several milliseconds until
the next value is written. The variables are changed from top to bottom in the symbol
browser. There is therefore no guarantee of consistency.

SIMOTION MCC Motion Control Chart


550 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.2 Monitoring variables in the symbol browser and watch tables

Fix the display of the symbol browser


You can fix the display of the symbol browser for the active object:
● To do so, click the Retain display icon in the right upper corner of the symbol browser.
The displayed symbol changes to .
The variables of this object are still displayed and updated in the symbol browser even if
another object is selected in the project navigator.
● To remove the display, click the icon again. The displayed symbol changes back to .

Display invalid floating-point numbers


Invalid floating-point numbers are displayed as follows in the symbol browser (independently
of the SIMOTION device):

Table 7- 3 Display invalid floating-point numbers

Display Meaning
1.#QNAN Invalid bit pattern in accordance with IEEE 754 (NaN Not a Number) There is no
-1.#QNAN distinction between signaling NaN (NaNs) and quiet NaN (NaNq).
1.#INF Bit pattern for + infinity in accordance with IEEE 754
-1.#INF Bit pattern for – infinity in accordance with IEEE 754
-1.#IND Bit pattern for indeterminate

7.2.2 Watch tables

Characteristics
With the symbol browser you see only the variables of an object within the project. With
program status you see only the variables in certain MCC commands.
With watch tables, in contrast, you can monitor selected variables from different sources as a
group (e.g. program sources, technology objects, SINAMICS drives - even on different
devices).
You can see the data type of the variables in offline mode. You can view and modify the
value of the variables in online mode.

Creating a watch table


Procedure for creating a watch table and assigning variables:
1. In the project navigator, select the Monitor folder.
2. Select Insert > Watch table to create a watch table, and enter the name of the watch
table. A watch table with this name appears in the Monitor folder.
3. In the project navigator, click the object from which you want to move variables to the
watch table.
4. In the symbol browser, select the corresponding variable line by clicking its number in the
left column.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 551
Error Handling and Program Test
7.2 Monitoring variables in the symbol browser and watch tables

5. From the context menu, select Add to watch table and the appropriate watch table, e.g.
Watch table_1.
6. If you click the watch table, you will see in the detail view of the Watch table tab that the
selected variable is now in the watch table.
7. Repeat steps 3 to 6 to monitor the variables of various objects.
If you are connected to the target system, you can monitor the variable contents.

Status and controlling variables


In the Status value column, the current variable values are displayed and periodically
updated.
You can change the value of one or several variables. Proceed as follows for the variables to
be changed:
1. Enter a value in the Control value column.
2. Activate the checkbox in this column
3. Click the Immediate control button.
The values you entered are written to the selected variables.

NOTICE
Note when you change the values of several variables:
The values are written sequentially to the variables. It can take several milliseconds until
the next value is written. The variables are changed from top to bottom in the watch table.
There is therefore no guarantee of consistency.

Fix the display of the watch table


You can fix the display of the active watch table:
● To do so, click the Retain display icon in the right upper corner of the Watch table tab
in the detail view. The displayed symbol changes to .
This watch table is still displayed even if another one is selected in the project navigator.
● To remove the display, click the icon again. The displayed symbol changes back
to .

SIMOTION MCC Motion Control Chart


552 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.3 Monitoring the program execution

7.3 Monitoring the program execution

7.3.1 Tracking program execution


Tracking the program execution does not affect the actual execution of the program, but
does increase the communication load. This has an impact on the execution of MotionTasks
and the BackgroundTask.
Program execution tracking can be switched on and off during program operation.
When program execution monitoring is activated, the current active command is shown in
yellow. The parameter screen forms of the active MCC chart can be opened and read, but
no changes can be made.

Starting the program execution monitoring


Program execution tracking can only be started for MCC charts that contain a program and
are assigned to precisely one task.
The MCC chart must be open.
● Select the MCC chart > Monitor menu command.
MCC charts with functions and function blocks that are called by the program can also be
monitored. To do so, open the relevant charts, as well.

Stopping the program execution monitoring


Program execution monitoring is stopped using the MCC-Chart > Monitor menu command.

7.3.2 Tracking single program steps


Single-step tracking has no influence on the program execution itself, but it does extend the
execution time of the program. This function can be switched on and off during program
operation.
Only MCC charts that are created as a program and assigned to exactly one task can be
monitored in single-step mode.
The program is suspended until the user activates the next program step. The next
command to be executed is highlighted in pale blue. After initiation of the next single step,
this command is executed as an active command and remains highlighted in pale blue until
the execution of the command has been completed. The next command to be executed then
turns pale blue, and the program is suspended again.

NOTICE
As the execution time of the program is extended, the time watchdog must be adapted
accordingly for cyclical tasks (TimerInterruptTask, BackgroundTask) or, if necessary,
switched off.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 553
Error Handling and Program Test
7.3 Monitoring the program execution

Jumps in functions and function blocks can also be monitored if single-step tracking is
enabled in their MCC charts. The relevant MCC chart is then opened when the function or
function block is called.

Note
Single-step tracking in functions and function blocks is only possible if single-step tracking is
also enabled in the calling MCC chart.
Single-step tracking is not possible within the Synchronous start (Page 233) command.

The parameter screen forms of the active MCC chart can be opened and read, but no
changes can be made.

Note
Two variables are assigned to every task, TSI#dwuser_1 and TSI#dwuser_2, which can be
read and written.
If single-step tracking is enabled, these variables are used by the compiler to control single-
step tracking if there is at least one MCC chart assigned to the task. These variables may
then not be used by the user because these contents may be overwritten by the single-step
tracking or unwelcome side effects may occur.

Enabling single-step tracking


Proceed as follows in order to activate single-step tracking for an MCC unit:
1. Open the Properties window for the MCC unit (see Properties of an MCC unit (Page 50)).
2. Enable the Permit single step check box in the Compiler tab (see Local compiler settings
(Page 41)) and click OK to confirm.
3. Select the MCC unit in the project navigator and select Save and compile in the context
menu.
4. Download the programs to the target system.

Starting single-step tracking


Single-step tracking can only be started for MCC charts that are assigned to one (and only
one) task. The MCC chart must be open.
1. Select the MCC chart > Single step menu.
2. You can Initiate the next single step in one of the following ways:
– By clicking the Next step button in the MCC toolbar,
– By selecting the MCC chart > Next step menu command, or
– By selecting the Next step command on the shortcut menu in the project navigator.

SIMOTION MCC Motion Control Chart


554 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.3 Monitoring the program execution

Note
The program stays in single-step mode if the SIMOTION device goes offline or the MCC
chart is closed.

Note
Program status and single-step tracking
If you have activated program status (Page 556) and single-step tracking, the monitored
variables from a command are only updated once the next single step has been triggered,
i.e. not until you have changed from this command to the next command to be processed.

Stopping single-step tracking


Single-step tracking is stopped using the MCC chart > Single step menu command.

Disabling single-step tracking


1. First, stop the "Single Step" function.
2. Open the Properties window for the MCC unit (see Properties of an MCC unit (Page 50)).
3. Disable the Permit single step check box in the Compiler tab (see Local compiler settings
(Page 41)) and click OK to confirm.
4. Recompile the program and download it to the target system.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 555
Error Handling and Program Test
7.4 Program status

7.4 Program status


Program status can be used to monitor variables for the following commands:
● IF: Program branching (see IF: Program branching (Page 221)
● WHILE: Loop with condition at start (see WHILE: Loop with condition at the start
(Page 223))
● UNTIL: Loop with condition at end (see UNTIL: Loop with condition at the end
(Page 226))
● Variable assignment (see Variable assignment (Page 197))
● ST zoom (see ST zoom (Page 199))
The values of the following variables are displayed:
● Variables with elementary data type (INT, REAL, etc.)
● Individual elements of a structure, provided an assignment is given
● Individual elements of an array, provided an assignment is given
● Variables with enumeration data types

Note
The following variables cannot be displayed for the IF, WHILE, UNTIL or "variable
assignment" commands when the LAD or FBD programming language is used:
• Local variables
• Enumeration/constant values and hexadecimal and binary values
Due to the restricted buffer capacity and the requirement for minimum runtime tampering,
the following variables cannot be displayed:
• Complete arrays
• Complete structures
However, individual array elements or individual structure elements are displayed if an
assignment is made in the MCC chart.
Program status requires additional CPU resources.

Preparing program status


Before you can work with program status, additional code must be generated during
compilation:
1. Select the SIMOTION device, and select Test mode on the context menu.
2. Select Test mode.
Program status is available in this mode without restrictions (see SIMOTION device
modes (Page 543)).
3. Open the Properties window for the MCC unit (see Properties of an MCC unit (Page 39)).
4. Activate the Permit program status check box in the Compiler tab (see Local compiler
settings (Page 41)).
5. Compile the MCC source file (MCC source file > Accept and compile menu command).
6. Download the programs to the target system.

SIMOTION MCC Motion Control Chart


556 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.4 Program status

Starting the Status program


The relevant MCC chart must be open. To start program status, proceed as follows.
1. Open the commands for which you want to monitor variables (IF, WHILE, UNTIL, variable
assignment or ST Zoom commands).
2. Start program status (MCC chart > Program status menu command).
You can open more than one command at a time, but you will only be able to monitor the
variables in the active window (that is, the window in the foreground).

Note
Program status and single-step tracking
If you have activated program status and single-step tracking (see Tracking single steps in
the program (Page 553)), the monitored variables from a command are only updated once
the next single step has been triggered, i.e. not until you have changed from this command
to the next command to be processed.

Stopping program status


The program status function is stopped using the MCC chart > Program status menu
command.

Disabling program status


Disabling program status frees up CPU resources.
1. First, stop the program status function (see Stopping program status).
2. Deactivate the Permit program status check box in the Properties dialog box for the MCC
unit in the Compiler tab (see Properties of an MCC unit (Page 39)).
3. Select the SIMOTION device, and select Test mode in the context menu.
4. Select Process mode.
5. This operating mode is optimized for maximum performance of program execution (see
SIMOTION device modes (Page 543)).
6. Recompile the program and download it to the target system.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 557
Error Handling and Program Test
7.5 Program run

7.5 Program run

7.5.1 Program run: Display code location and call path


You can display the position in the code (e.g. line of an ST source file) that a MotionTask is
currently executing along with its call path.
Follow these steps:
1. Click the "Show program run" button on the Program run toolbar.
The "Program run call stack (Page 559)" window opens.
2. Select the desired MotionTask.
3. Click the "Update" button.
The window shows:
● The position in the code being executed (e.g. line of the ST source file) stating the
program source and the POU.
● Recursively positions in the code of other POUs that call the code position being
executed.
The following names are displayed for the SIMOTION RT program source files:

Table 7- 4 SIMOTION RT program source files

Name Meaning
taskbind.hid Execution system
stdfunc.pck IEC library
device.pck Device-specific library
tp-name.pck Library of the tp-name technology package,
e.g. cam.pck for the library of the CAM technology package

SIMOTION MCC Motion Control Chart


558 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.5 Program run

7.5.2 Parameter call stack program run


You can display the following for all configured tasks:
● the current code position in the program code (e.g. line of an ST source file)
● the call path of this code position

Table 7- 5 Parameter description call stack program run

Field Description
Selected CPU The selected SIMOTION device is displayed.
Refresh Clicking the button reads the current code positions from the
SIMOTION device and shows them in the open window.
Calling task Select the task for which you want to determine the code position
being executed.
All configured tasks of the execution system.
Current code position The position being executed in the program code (e.g. line of an ST
source file) is displayed (with the name of the program source file,
line number, name of the POU).
is called by The code positions that call the code position being executed within
the selected task are shown recursively (with the name of the
program source file, line number, name of the POU, and name of the
function block instance, if applicable).
For names of the SIMOTION RT program sources, refer to the table in "Program run
(Page 558)".

7.5.3 Program run toolbar


You can display the position in the code (e.g. line of an ST source file) that a MotionTask is
currently executing along with its call path with this toolbar.

Table 7- 6 Program run toolbar

Symbol Meaning
Display program run
Click this button to open the Program run call stack window. In this window, you can
display the currently active code position with its call path.
See: Program run: Display code position and call path (Page 558)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 559
Error Handling and Program Test
7.6 Trace

7.6 Trace
Trace allows you to log and graphically display the characteristics of signals and axis states.
You must configure the data that you wish to record in the SIMOTION Trace tool (for
description, see the online help).

7.6.1 Activate trace

Figure 7-1 Trace trigger

This command can be used to log the characteristics of signals and axis states at a defined
position in the program.
In order for trace recording to start when the command is run, the trace must already have
been started in the trace tool by clicking the button. Additional details about working with
the trace tool can be found in the online help.
System variable traceState[n].tracestate on the SIMOTION device can be used to query
whether the trace is still in progress or has already finished. You can monitor this variable in
the symbol browser if you have selected the SIMOTION device in the project navigator.
If another trace recording is required after the current one has finished, the trace will need to
be started again by clicking the button.

Overview of parameters
You can set the following parameters:

Field/Button Explanation/Instruction
Trace Trigger 1 Trace is started when the following condition is satisfied:
"Trigger with TraceTrigger 1 program call".
Trace Trigger 2 Trace is started when the following condition is satisfied:
"Trigger with TraceTrigger 2 program call".

SIMOTION MCC Motion Control Chart


560 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.6 Trace

Example of Activate trace


The simultaneous starting of two axes (axis_1 and axis_2) will be recorded.

Figure 7-2 Trace recording of a synchronous start of two axes

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 561
Error Handling and Program Test
7.6 Trace

Figure 7-3 Trace recording of synchronous start

Relevant system variable for Activate trace


System variable of SIMOTION device: TraceControl

SIMOTION MCC Motion Control Chart


562 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

7.7 Breakpoints

7.7.1 General procedure for setting breakpoints


You can set breakpoints within a POU of a program source (e.g. ST source, MCC chart,
LAD/FBD source). On reaching an activated breakpoint, the task in which the POU with the
breakpoint is called is stopped. If the breakpoint that initiated the stopping of the tasks is
located in a program or function block, the values of the static variables for this POU are
displayed in the "Variables status" tab of the detail display. Temporary variables (also in/out
parameters for function blocks) are not displayed. You can monitor static variables of other
POUs or unit variables in the symbol browser.

Requirement:
● The program source with the POU (e.g. ST source file, MCC chart, LAD/FBD program) is
open.

Proceed as follows
Follow these steps:
1. Select "Debug mode" for the associated SIMOTION device, see Set debug mode
(Page 564).
2. Specify the debug task group, see Specifying the debug task group (Page 565).
3. Set breakpoints, see Setting breakpoints (Page 567).
4. Define the call path, see Defining a call path for a single breakpoint (Page 570).
5. Activate the breakpoints, see Activating breakpoints (Page 574).

See also
Breakpoints toolbar (Page 569)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 563
Error Handling and Program Test
7.7 Breakpoints

7.7.2 Setting the debug mode

WARNING
You must observe the appropriate safety regulations.
Use the debug mode only with activated life-sign monitoring (Page 545) with a suitably
short monitoring time! Otherwise, if problems occur in the communication link between the
PC and the SIMOTION device, the axis may start moving in an uncontrollable manner.
The function is released exclusively for commissioning, diagnostic and service purposes.
The function should generally only be used by authorized technicians. The safety
shutdowns of the higher-level control have no effect!
Therefore, there must be an EMERGENCY STOP circuit in the hardware. The appropriate
measures must be taken by the user.

To set the debug mode, proceed as follows:


1. Highlight the SIMOTION device in the project navigator.
2. Select Test mode from the context menu.
3. Select Debugmode (Page 569).
4. Accept the safety information
5. Parameterize the sign-of-life monitoring.
See also section: Important information about the life-sign monitoring (Page 545).
6. Confirm with OK.
If no connection has been established with the target system (offline mode), the online
mode will be established automatically.
The activated debug mode is indicated in the status bar.
The breakpoints toolbar (Page 569) is displayed.

Note
You cannot change the program sources in debug mode!

NOTICE
Pressing the spacebar or switching to a different Windows application causes in debug
mode for activated breakpoints:
• The SIMOTION device switches to STOP mode.
• The outputs are deactivated (ODIS).

WARNING
This function is not guaranteed in all operating modes. Therefore, there must be an
EMERGENCY STOP circuit in the hardware. The appropriate measures must be taken by
the user.

SIMOTION MCC Motion Control Chart


564 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

See also
Modes of the SIMOTION devices (Page 543)

7.7.3 Define the debug task group


On reaching an activated breakpoint, all tasks that are assigned to the debug task group are
stopped.

Requirement
● The relevant SIMOTION device is in debug mode.

Proceed as follows
How to assign a task to the debug task group:
1. Highlight the relevant SIMOTION device in the project navigator.
2. Select Debug task group from the context menu.
The Debug Task group window opens.
3. Select the tasks to be stopped on reaching the breakpoint:
– If you only want to stop individual tasks (in RUN mode): Activate the Debug task group
selection option.
Assign all tasks to be stopped on reaching a breakpoint to the Tasks to be stopped
list.
– If you only want to stop individual tasks (in HALT mode): Activate the All tasks
selection option.
In this case, also select whether the outputs and technology objects are to be released
again after resumption of program execution.

NOTICE
Note the different behavior when an activated breakpoint is reached, see the following
table.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 565
Error Handling and Program Test
7.7 Breakpoints

Table 7- 7 Behavior at the breakpoint depending on the tasks to be stopped in the debug task group.

Properties Tasks to be stopped


Single selected tasks All tasks
(debug task group)
Behavior on reaching the breakpoint
Operating mode RUN STOP
Stopped tasks Only tasks in the debug task group All tasks
Outputs Active Deactivated (ODIS activated)
Technology Closed-loop control active No closed-loop control (ODIS activated)
Runtime measurement of the Active for all tasks Deactivated for all tasks
tasks
Time monitoring of the tasks Deactivated for tasks in the debug task Deactivated for all tasks
group
Real-time clock Continues to run Continues to run
Behavior on resumption of program execution
Operating mode RUN RUN
Started tasks All tasks in the debug task group All tasks
Outputs Active The behavior of the outputs and the
Technology Closed-loop control active technology objects depends on the
'Continue' activates the outputs (ODIS
deactivated) checkbox.
• Active: ODIS will be deactivated. All
outputs and technology objects are
released.
• Inactive: ODIS remains activated. All
outputs and technology objects are
only released after another download
of the project.

Note
You can only make changes to the debug task group if no breakpoints are active.

Proceed as follows:
1. Set breakpoints (see Setting breakpoints (Page 567)).
2. Define the call path (see Defining a call path for a single breakpoint (Page 570)).
3. Activate the breakpoints (see Activating breakpoints (Page 574)).

SIMOTION MCC Motion Control Chart


566 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

7.7.4 Setting breakpoints

Requirements:
1. The program source with the POU (e.g. ST source file, MCC chart, LAD/FBD program) is
open.
2. The relevant SIMOTION device is in debug mode,
see Setting debug mode (Page 564).
3. The debug task group is defined, see Defining the debug task group (Page 565).

Proceed as follows
How to set a breakpoint:
1. Select the code location where no breakpoint has been set:
– SIMOTION ST: Place the cursor on a line in the ST source file that contains a
statement.
– SIMOTION MCC: Select an MCC command in the MCC chart (except module or
comment block).
– SIMOTION LAD/FBD: Set the cursor in a network of the LAD/FBD program.
2. Alternative:
– Select the Debug > Set/remove breakpoint menu command (shortcut F9).
– Click the button in the Breakpoints toolbar.
To remove a breakpoint, proceed as follows:
1. Select the code position with the breakpoint.
2. Alternative:
– Select the Debug > Set/remove breakpoint menu command (shortcut F9).
– Click the button in the Breakpoints toolbar.
To remove all breakpoints (in all program sources) of the SIMOTION device, proceed as
follows:
● Alternative:
– Select the Debug > Remove all breakpoints menu command (shortcut CTRL+F5).
– Click the button in the Breakpoints toolbar.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 567
Error Handling and Program Test
7.7 Breakpoints

Note
You cannot set breakpoints:
• For SIMOTION ST: In lines that contain only comment.
• For SIMOTION MCC: On the module or comment block commands.
• For SIMOTION LAD/FBD: Within a network.
• At code locations in which other debug points (e.g. trigger points) have been set.
You can list the debug points in all program sources of the SIMOTION device in the debug
table:
• Click the button for "debug table" in the Breakpoints toolbar.
In the debug table, you can also remove all breakpoints (in all program sources) of the
SIMOTION device:
• Click the button for "Clear all breakpoints".
Set breakpoints remain saved also after leaving the "debug mode", they are displayed only
in debug mode.

You can use the program status (Page 556) diagnosis functions and breakpoints together in
a program source file or POU. However, the following restrictions apply depending on the
program languages:
● SIMOTION ST: For Version V3.2 of the SIMOTION Kernel, the (marked) ST source file
lines to be tested with program status must not contain a breakpoint.
● SIMOTION MCC and LAD/FBD: The commands of the MCC chart (or networks of the
LAD/FBD program) to be tested with program status must not contain a breakpoint.

Proceed as follows
1. Define the call path, see Defining a call path for a single breakpoint (Page 570).
2. Activate the breakpoints, see Activating breakpoints (Page 574).

SIMOTION MCC Motion Control Chart


568 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

7.7.5 Breakpoints toolbar


This toolbar contains important operator actions for setting and activating breakpoints:

Table 7- 8 Breakpoints toolbar

Symbol Meaning
Set/remove breakpoint
Click this icon to set at breakpoint for the selected code position or to remove an
existing breakpoint.
See: Setting breakpoints (Page 567).
Activate/deactivate breakpoint
Click this icon to activate or deactivate the breakpoint at the selected code position.
See: Activating breakpoints (Page 574).
Edit the call path
Click this icon to define the call path for the breakpoints:
• If a code position with breakpoint is selected: The call path for this breakpoint.
• If a code position without breakpoint is selected: The call path for all breakpoints
of the POU.
See: Defining the call path for a single breakpoint (Page 570), Defining the call path
for all breakpoints (Page 572).
Activate all breakpoints
Click this icon to activate all breakpoints in the current program source or POU (e.g.
ST source file, MCC chart, LAD/FBD program).
See: Activating breakpoints (Page 574).
Deactivate all breakpoints
Click this icon to deactivate all breakpoints in the current program source or POU
(e.g. ST source file, MCC chart, LAD/FBD program).
See: Activating breakpoints (Page 574).
Remove all breakpoints
Click this icon to remove all breakpoints in the current program source or POU (e.g.
ST source file, MCC chart, LAD/FBD program).
See: Setting breakpoints (Page 567).
Debug table
Click this icon to display the debug table.
See: Debug table parameters.
Display call stack
Click this icon after reaching an activated breakpoint to:
• View the call path at the current breakpoint.
• View the code positions at which the other tasks of the debug task group have
been stopped together with their call path.
See: Displaying the call stack (Page 576).
Resume
Click this icon to continue the program execution after reaching an activated
breakpoint.
See: Activating breakpoints (Page 574), Displaying the call stack (Page 576).

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 569
Error Handling and Program Test
7.7 Breakpoints

7.7.6 Defining the call path for a single breakpoint

Requirements:
1. The program source with the POU (e.g. ST source file, MCC chart, LAD/FBD program) is
open.
2. The relevant SIMOTION device is in debug mode,
see Setting debug mode (Page 564).
3. The debug task group is defined, see Defining the debug task group (Page 565).
4. Breakpoint is set, see Setting breakpoints (Page 567).

Proceed as follows
To define the call path for a single breakpoint, proceed as follows:
1. Select the code location where a breakpoint has already been set:
– SIMOTION ST: Set the cursor in an appropriate line of the ST source.
– SIMOTION MCC: Select an appropriate command in the MCC chart.
– SIMOTION LAD/FBD: Set the cursor in an appropriate network of the LAD/FBD
program.
2. Click the button for "edit call path" in the Breakpoints toolbar.
In the Call path / task selection breakpoint window, the marked code position is displayed
(with the name of the program source file, line number, name of the POU).
3. Select the task in which the user program (i.e. all tasks in the debug task group) will be
stopped when the selected breakpoint is reached.
The following are available:
– All calling locations starting at this call level
The user program will always be started when the activated breakpoint in any task of
the debug task group is reached.
– The individual tasks from which the selected breakpoint can be reached.
The user program will be stopped only when the breakpoint in the selected task is
reached. The task must be in the debug task group.
The specification of a call path is possible.

SIMOTION MCC Motion Control Chart


570 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

4. Only for functions and function blocks: Select the call path, i.e. the code position to be
called (in the calling POU).
The following are available:
– All calling locations starting at this call level
No call path is specified. The user program is always stopped at the activated
breakpoint if the POU in the selected tasks is called.
– Only when a single task is selected: The code positions to be called within the
selected task (with the name of the program source, line number, name of the POU).
The call path is specified. The user program will be stopped at the activated
breakpoint only when the POU is called from the selected code position.
If the POU of the selected calling code position is also called from other code
positions, further lines are displayed successively in which you proceed similarly.
5. If the breakpoint is only to be activated after the code position has been reached several
times, select the number of times.

Note
You can also define the call path to the individual breakpoints in the debug table:
1. Click the button for "debug table" in the Breakpoints toolbar.
The "Debug table" window opens.
2. Click the appropriate button in the "Call path" column.
3. Proceed in the same way as described above:
– Specify the task.
– Define the call path (only for functions and function blocks).
– Specify the number of passes after which the breakpoint is to be activated.

Proceed as follows:
● Activate the breakpoints, see Activating breakpoints (Page 574).

Note
You can use the "Display call stack (Page 576)" function to view the call path at a current
breakpoint and the code positions at which the other tasks of the debug task group were
stopped.

See also
Defining the call path for all breakpoints (Page 572)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 571
Error Handling and Program Test
7.7 Breakpoints

7.7.7 Defining the call path for all breakpoints


With this procedure, you can:
● Select a default setting for all future breakpoints in a POU (e.g. MCC chart, LAD/FBD
program or POU in an ST source file).
● Accept and compare the call path for all previously set breakpoints in this POU.

Requirements
● The program source with the POU (e.g. ST source file, MCC chart, LAD/FBD program) is
open.
● The relevant SIMOTION device is in debug mode,
see Setting debug mode (Page 564).
● The debug task group is defined, see Defining the debug task group (Page 565).

Proceed as follows
To define the call path for all future breakpoints of a POU, proceed as follows:
1. Select the code location where no breakpoint has been set:
– SIMOTION ST: Set the cursor in an appropriate line of the ST source.
– SIMOTION MCC: Select an appropriate command in the MCC chart.
– SIMOTION LAD/FBD: Set the cursor in an appropriate network of the LAD/FBD
program.
2. Click the button for "edit call path" in the Breakpoints toolbar.
In the "Call path / task selection all breakpoints for each POU" window, the marked code
position is displayed (with the name of the program source file, line number, name of the
POU).
3. Select the task in which the user program (i.e. all tasks in the debug task group) will be
stopped when a breakpoint in this POU is reached.
The following are available:
– All calling locations starting at this call level
The user program will always be started when an activated breakpoint of the POU in
any task of the debug task group is reached.
– The individual tasks from which the selected breakpoint can be reached.
The user program will be stopped only when a breakpoint in the selected task is
reached. The task must be in the debug task group.
The specification of a call path is possible.

SIMOTION MCC Motion Control Chart


572 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

4. Only for functions and function blocks: Select the call path, i.e. the code position to be
called (in the calling POU).
The following are available:
– All calling locations starting at this call level
No call path is specified. The user program is always stopped at an activated
breakpoint when the POU in the selected tasks is called.
– Only when a single task is selected: The code positions to be called within the
selected task (with the name of the program source, line number, name of the POU).
The call path is specified. The user program will be stopped at an activated breakpoint
only when the POU is called from the selected code position.
If the selected calling code position is in turn called by other code positions, further
lines are displayed successively in which you proceed similarly.
5. If a breakpoint is only to be activated after the code position has been reached several
times, select the number of times.
6. If you want to accept and compare this call path for all previously set breakpoints in this
POU:
– Click Accept.

Proceed as follows:
● Activate the breakpoints, see Activating breakpoints (Page 574).

Note
You can use the "Display call stack (Page 576)" function to view the call path at a current
breakpoint and the code positions at which the other tasks of the debug task group were
stopped.

See also
Defining the call path for a single breakpoint (Page 570)

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 573
Error Handling and Program Test
7.7 Breakpoints

7.7.8 Activating breakpoints


Breakpoints must be activated if they are to have an effect on program execution.

Requirements
1. The program source with the POU (e.g. ST source file, MCC chart, LAD/FBD program) is
open.
2. The relevant SIMOTION device is in debug mode,
see Setting debug mode (Page 564).
3. The debug task group is defined, see Defining the debug task group (Page 565).
4. Breakpoints are set, see Setting breakpoints (Page 567).
5. Call paths are defined, see Defining a call path for a single breakpoint (Page 570).

Activating breakpoints
How to activate a single breakpoint:
1. Select the code location where a breakpoint has already been set:
– SIMOTION ST: Set the cursor in an appropriate line of the ST source.
– SIMOTION MCC: Select an appropriate command in the MCC chart.
– SIMOTION LAD/FBD: Set the cursor in an appropriate network of the LAD/FBD
program.
2. Alternative:
– Select the Debug > Activate/deactivate breakpoint menu command (shortcut F12).
– Click the button in the Breakpoints toolbar.
To activate all breakpoints (in all program sources) of the SIMOTION device, proceed as
follows:
● Alternative:
– Select the Debug > Activate all breakpoints menu command.
– Click the button in the Breakpoints toolbar.

Note
Breakpoints of all program sources of the SIMOTION device can also be activated and
deactivated in the debug table:
1. Click the button for "debug table" in the Breakpoints toolbar.
The "Debug table" window opens.
2. Perform the action below, depending on which breakpoints you want to activate or
deactivate:
– Single breakpoints: Check or clear the corresponding checkboxes.
– All breakpoints (in all program sources): Click the corresponding button.

SIMOTION MCC Motion Control Chart


574 Programming and Operating Manual, 05/2009
Error Handling and Program Test
7.7 Breakpoints

Behavior at the activated breakpoint


On reaching an activated breakpoint (possibly using the selected call path (Page 570)), all
tasks assigned to the debug task group will be stopped. The behavior depends on the tasks
in the debug task group and is described in "Defining a debug task group (Page 565)". The
breakpoint is highlighted.
If the breakpoint that initiated the stopping of the tasks is located in a program or function
block, the values of the static variables for this POU are displayed in the "Variables status"
tab of the detail display. Temporary variables (also in/out parameters for function blocks) are
not displayed. You can monitor static variables of other POUs or unit variables in the symbol
browser (Page 548).
You can use the "Display call stack (Page 576)" function to:
● View the call path at the current breakpoint.
● View the code positions with the call path at which the other tasks of the debug task
group have been stopped.

Resuming program execution


How to resume program execution:
● Alternative:
– Select the Debug > Continue menu command (shortcut CTRL+F8).
– Click the button on the Breakpoint toolbar to "Continue".

Deactivate breakpoints
To deactivate a single breakpoint, proceed as follows:
1. Select the code position with the activated breakpoint.
2. Alternative:
– Select the Debug > Activate/deactivate breakpoint menu command (shortcut F12).
– Click the button in the Breakpoints toolbar.
To deactivate all breakpoints (in all program sources) of the SIMOTION device, proceed as
follows:
● Alternative:
– Select the Debug > Deactivate all breakpoints menu command.
– Click the button in the Breakpoints toolbar.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 575
Error Handling and Program Test
7.7 Breakpoints

7.7.9 Display call stack


You can use the "Display call stack" function to:
● View the call path at the current breakpoint.
● View the code positions with the call path at which the other tasks of the debug task
group have been stopped.

Requirement
The user program is stopped at an activated breakpoint, i.e. the tasks of the debug task
group (Page 565) have been stopped.

Proceed as follows
To call the "Display call stack" function, proceed as follows:
● Click the button for "display call stack" in the Breakpoints toolbar.
The "Breakpoint call stack" dialog opens. The current call path (including the calling task
and the number of the set passes) is displayed.
The call path cannot be changed.
To use the "Display call stack" function, proceed as follows:
1. Keep the "Breakpoint call stack" dialog open.
2. To display the code position at which the other task was stopped, proceed as follows:
– Select the appropriate task. All tasks of the debug task group can be selected.
The code position, including the call path, is displayed. If the code position is contained in
a user program, the program source with the POU (e.g. ST source file, MCC chart,
LAD/FBD program) will be opened and the code position marked.
3. How to resume program execution:
– Click the button for "resume" (Ctrl+F8 shortcut) in the Breakpoint toolbar.
When the next activated breakpoint is reached, the tasks of the debug task group will be
stopped again. The current call path, including the calling task, is displayed.
4. Click "OK" to close the "Breakpoint call stack" dialog.
For names of the SIMOTION RT program sources, refer to the table in "Program run
(Page 558)".

SIMOTION MCC Motion Control Chart


576 Programming and Operating Manual, 05/2009
Appendix A
A.1 Basics of LAD/FBD/Formula for MCC

A.1.1 Ladder logic (LAD) for MCC


The LAD graphical programming language represents the program in the form of a circuit
diagram. LAD enables you to track the flow of signals easily.

Note
You can switch between LAD and FBD provided that the programmed functions can be
displayed in both languages.

The ladder diagram (LAD) for MCC has a limited set of operations.
The following operations are available in MCC:
● NO contact
● NC contact
● Comparator (CMP)
● Open/close branch
Every logic operation queries the signal status (0 or 1) of an electrical contact. The result is
then stored or used to execute another operation.

NO contact

This operation can be programmed to scan the signal status of a contact:


● Signal status=0: Contact is open.
● Signal status=1: Contact is closed.
The logic operation can be executed in a series connection or a parallel connection:

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 577
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

● In a series connection, the operation gates the result of its signal state scan according to
the AND truth table.
● In a parallel connection, the operation gates the result of its signal state scan according to
the OR truth table.
,,



,

Figure A-1 Example of Normally open contact in a parallel circuit

① The result of gating the three NO contacts is 1 if:


%I 0.0 is closed AND %I 0.1 is closed
OR
%I 0.2 is closed

NC contact

This operation can be programmed to scan the signal status of a contact:


● Signal status=0: Contact is closed.
● Signal status=1: Contact is open.
The logic operation can be executed in a series connection or a parallel connection:
● In a series connection, the operation gates the result of its signal state scan according to
the AND truth table.
● In a parallel connection, the operation gates the result of its signal state scan according to
the OR truth table.
,,



,

Figure A-2 Example of Normally closed contact in a parallel circuit

① The result of gating the three NC contacts is 1 if:


%I 0.0 is open AND %I 0.1 is open
OR
%I 0.2 is open

SIMOTION MCC Motion Control Chart


578 Programming and Operating Manual, 05/2009
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

Comparator

&PS
!

This operation performs a comparison operation on integers or floating-point numbers.


Input 1 and Input 2 are compared according to the comparison type (see figure). If the result
of the comparison is "true", then the result is "1" (otherwise "0").
There is no negation of the comparison result as this can be achieved by the opposite
comparison operation in each case.

&PS
!
&RPSDULVRQW\SHV

,QSXWHTXDOV,QSXW

!,QSXWGRHVQRWHTXDO,QSXW

!,QSXWLVJUHDWHUWKDQ,QSXW

,QSXWLVOHVVWKDQ,QSXW

! ,QSXWLVJUHDWHUWKDQRUHTXDOWR,QSXW

 ,QSXWLVOHVVWKDQRUHTXDOWR,QSXW

Figure A-3 Possible comparison types

You can use one of two different addressing methods:


● Direct addressing with constant as operand
● Variable addressing with variable as operand
, &PS




E
Figure A-4 Example of direct and variable addressing

① The result is 1 if the following conditions are fulfilled:


%I 0.0 is closed AND the constant 50 is equal to variable b

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 579
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

Open/close branch

You can open and close parallel branches to fork the current flow. All operands and
branches must be interlinked. Each branch must contain at least one operand.

Example of NO contact operations in a parallel circuit


The result is 0 or 1 depending on the position of the contacts (see figure).

,,
7KHUHVXOWLVLIWKHIROORZLQJ
FRQGLWLRQVDSSO\

, ,LVFORVHG
,LVFORVHG
,LVRSHQ

,,
7KHUHVXOWLVLIWKHIROORZLQJ
FRQGLWLRQVDSSO\
, ,LVFORVHG
,LVRSHQ
,LVFORVHG

,,
7KHUHVXOWLVLIWKHIROORZLQJ
FRQGLWLRQVDSSO\
, ,LVFORVHG
,LVFORVHG
,LVFORVHG

&RQGXFWLQJ

Figure A-5 Example of NO contact operations in a parallel circuit

SIMOTION MCC Motion Control Chart


580 Programming and Operating Manual, 05/2009
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

A.1.2 Function block diagram (FBD) for MCC


Function block diagram (FBD) is a graphical programming language that represents logic
using the graphical logic symbols normally associated with Boolean algebra.

Note
You can switch between LAD and FBD provided that the programmed functions can be
displayed in both languages.

The following operations are available in MCC:


● AND operation
● OR logic operation
● Inverted input
● Comparator
● AND operation before OR operation
OR operation before AND operation
Every logic operation queries the signal status (0 or 1) of an electrical contact. The result is
then stored or used to execute another operation.

AND operation

The signal statuses of two or more operands are scanned:


If the signal status of all operands is 1, the condition is fulfilled, otherwise the result of the
operation is 0.

,

, 

① The result is 1 if the following condition is fulfilled:


%I 1.0 = 1 AND %I 1.1 = 1
Figure A-6 Example of an AND operation

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 581
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

OR logic operation

ุ

The signal statuses of two or more operands are scanned:


The condition is fulfilled if one operand has signal status "1", otherwise the result is "0".

ุ

,

, 

Example of an OR operation
① The result is 1 if the following condition is fulfilled:
%I 1.0 = 1 OR %I 1.1 = 1

Inverted input
The signal status of the input is inverted by a dot at an operator input.

ุ

,

, 

① The result is 1 if the following condition is fulfilled:


%I 1.0 = 0 OR %I 1.1 = 1
Figure A-7 Example of an OR operation with an inverted input

Comparator

&PS
!

This operation performs a comparison operation on integers or floating-point numbers.


Input 1 and Input 2 are compared according to the comparison type (see figure). If the result
of the comparison is "true", then the result is "1" (otherwise "0").
There is no negation of the comparison result as this can be achieved by the opposite
comparison operation in each case.

SIMOTION MCC Motion Control Chart


582 Programming and Operating Manual, 05/2009
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

&PS
!
&RPSDULVRQW\SHV

,QSXWHTXDOV,QSXW

!,QSXWGRHVQRWHTXDO,QSXW

!,QSXWLVJUHDWHUWKDQ,QSXW

,QSXWLVOHVVWKDQ,QSXW

! ,QSXWLVJUHDWHUWKDQRUHTXDOWR,QSXW

 ,QSXWLVOHVVWKDQRUHTXDOWR,QSXW

Figure A-8 Possible comparison types

You can use one of two different addressing methods:


● Direct addressing with constant as operand
● Variable addressing with variable as operand
&PS



E 

Figure A-9 Example of direct and variable addressing

① Constant 50 is the actual value at which Input 1 of the box should work. Constant 50 is the
direct operand of the box.
Input 2 is to work with the value of the variable b. Variable b is a direct operand.

AND operation before OR operation


OR operation before AND operation
With the AND before OR logic operation, it is possible to scan the result of a signal status
scan according to the OR truth table.
The result is "1" if at least one AND operation is fulfilled.


,

, ุ


,

,

① The result of the operation is 1 if at least one AND operation is fulfilled.


Figure A-10 Example of an AND before OR operation

With the OR before AND operation, it is possible to query the result of a signal state scan
according to the AND truth table.
The result is "1" if all OR operations are fulfilled.

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 583
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

ุ
,

,

ุ
,

,

① The result of the operation is "1" if both OR operations are fulfilled.


Figure A-11 Example of an OR before AND operation

A.1.3 Formula for MCC


Formula is a text-based, high-level language that essentially complies with IEC 61131-3 in
terms of language definition. It is suitable among other things for programming formula
calculations and complex optimization algorithms.
System functions and operators can be moved from the command library to the
programming window using a drag-and-drop operation.

Note
You can switch from Formula to LAD or FBD and vice versa provided that the programmed
functions can be displayed in the other language.

Simple examples
The two examples illustrate an AND operation and an OR operation.

Table A- 1 Example of an AND operation (keyword AND)

Instruction Description
%I0.0 AND a = 50 The result is 1 if input 0.0 is closed and variable a
has a value of 50.

Table A- 2 Example of an AND operation (keyword AND)

Instruction Description
%I0.0 OR %I0.1 The result is 1 if input 0.0 or input 0.1 is closed.

SIMOTION MCC Motion Control Chart


584 Programming and Operating Manual, 05/2009
Appendix
A.1 Basics of LAD/FBD/Formula for MCC

Querying a system variable


Formula is often used for scanning system variables; refer to the following example:

Table A- 3 Example of an AND operation (keyword AND)

Instruction Description
Axis_1.positioningstate.homed = YES The result = 1, if the axis has reached its homing
position and is therefore homed.

Figure A-12 Scan whether an axis has been homed

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 585
Appendix
A.2 Key combinations

A.2 Key combinations


The following key combinations are available:
Table A- 4 Shortcuts

Shortcut Significance
When MCC source file is open
Ctrl+F4 Closes the active MCC source file.
Ctrl+B Accepts and compiles the active MCC unit
Alt+Enter Displays the properties of the active MCC unit for editing
Ctrl+R Inserts an MCC chart in the MCC unit
Ctrl+P Prints the MCC charts contained in the MCC unit
When an MCC chart is open
Ctrl+F4 Closes the active MCC chart.
Ctrl+B Accepts and compiles the MCC unit from the active MCC chart
Alt+Enter Displays the properties of the active MCC chart for editing
Ctrl+P Prints the active MCC chart
↑ Selects the preceding command in the MCC chart
↓ Selects the next command in the MCC chart.
← Selects the command to the left of the currently selected command (parallel
branching).
→ Selects the command to the right of the currently selected command (parallel
branching).
Ctrl+K With a command selected, opens the brief comment box
Ctrl+P Prints the active MCC chart
Ctrl+Z Close the brief comment box
Pos1 Selects the left-hand branch (e.g. in a CASE statement)
End Selects the right-hand branch (e.g. in a CASE statement)
Ctrl+Pos1 Selects the first command in the MCC chart
Ctrl+End Selects the last command in the MCC chart
Pg up Moves the visible contents of the working area upwards by a distance of one
window
Pg down Moves the visible contents of the working area downwards by a distance of
one window
Edit menu
Ctrl+Z Undoes the last action (except: Save).
Ctrl+Y Restores the action that was last undone.
Ctrl+X Cuts a command
Ctrl+C Copies a command
Ctrl+V Inserts a command
Del Deletes selected commands in the MCC chart.
Alt+Enter Displays the properties of the active/selected object for editing.
Enter Opens the selected object.
Ctrl+A Highlights all the objects in the current window.
Ctrl+B Saves and compiles the active/selected object.

SIMOTION MCC Motion Control Chart


586 Programming and Operating Manual, 05/2009
Appendix
A.2 Key combinations

Shortcut Significance
Window menu
Ctrl+Shift+F5 Arranges all windows open in this application evenly from top to bottom in tile
formation
Ctrl+Shift+F3 Arranges all windows open in this application evenly from left to right in tile
formation
Alt+F4 Closes all windows and ends the application.
View menu
Ctrl+F11 Maximizes working area
Ctrl+F12 Maximizes detail view
Ctrl+Num+ Enlarges the contents of the working area.
Ctrl+Num- Reduces the contents of the working area.
F5 Updates the view
LAD and FBD:
A number of MCC commands provide a limited command range for the LAD and FBD graphic
programming languages (see LAD/FBD/Formula (Page 164)).
The following shortcuts apply to both LAD and FBD.
Cursor keys With a selected operator: Navigation between the individual operators
When an edit field is open: Navigates between individual operands
Del Deletes an operator
Tab / Shift+Tab Jumps forward to next button / input field / jumps back to previous button /
input field
Pg up Reduces (zooms) display
Pg down Enlarges (zooms) display
Pos1 Zooms to 100%
End Zooms to total view
Return Opens the edit field of the current operand or confirms the entry made in the
edit field
Esc Aborts the entry while edit field is open
Alt+I Inserts a new variable
(only active with variable assignment for the MCC command)
Alt+D Deletes a variable
(only active with variable assignment for the MCC command)
Within LAD: The following shortcuts only apply to the LAD programming language.
Alt+C Inserts an NO contact
Alt+N Inserts an NC contact
Alt+V Inserts a comparator
Alt+P Opens a branch
Alt+L Closes a branch
Within FBD: The following shortcuts only apply to the FBD programming language.
Alt+A Inserts an AND
Alt+O Inserts an OR
Alt+B Adds an input
Alt+N Negates an input
Alt+V Inserts a comparator

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 587
Index
remove, 567
Set, 567
_ Toolbar, 569
BYTE, 94
_additionObjectType, 101
_camTrackType, 101
_controllerObjectType, 101
C
_device, 134
_direct, 119, 122, 134 Call path
_fixedGearType, 101 Breakpoint, 570, 572
_formulaObjectType, 101 Call stack, 576
_getSafeValue Program run, 558
Application, 134 camType, 101
_MccRetSyncStart, 233 Close
_sensorType, 101 MCC source file, 35
_setSafeValue Closing the parameter screen form, 85
Application, 134 Code attributes, 162
Combo box
Selection list, 65
A Self-defined selection options, 65
CommandID
acceleration model
Variable, 79
Direction-based, 75, 76, 77
Commands
Non-direction-based, 75, 76, 77
Assigning a technology object, 67
ANY, 97
Assigning a technology object-type variable, 68
ANY_BIT, 97
Copying, 59
ANY_DATE, 97
cutting, 59
ANY_ELEMENTARY, 97
deleting, 59
ANY_INT, 97
Hide and Display, 59
ANY_NUM, 97
Inserting, 55, 59
ANY_REAL, 97
Numbering, 58
ANYOBJECT, 101
programming, 63
Array element
representing, 57
Initial value, 93
selecting, 59
Initialization value, 93
Comment, 58
Axis enable
Commissioning
electric drive, 270, 276
Execution levels and tasks, 539
Hydraulic drive, 280, 286
Commissioning (software)
Loading a project to the target system, 542
Compiling
B
Library, 178
Basic commands, 183 MCC chart, 46
Bit data types, 94 MCC source file, 34
BOOL, 94 Connections
Breakpoint, 563 Defining, 135
Activating, 574 to LAD/FBD programs, 135
Call path, 570, 572 To libraries, 135
Call stack, 576 to MCC charts, 135
Deactivating, 575 to ST source files, 135

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 589
Index

CONSTANT, 103 Detail display


Constants Maximize, 26
Time specifications, 95 DINT, 94
Context menu, 27 DINT#MAX, 96
Cross-reference list, 156 DINT#MIN, 96
Displayed data, 157 Direct access, 119, 122
Filtering, 160 Features, 120
Generating, 156 Download
Single step monitoring (MCC), 157 Effect on variable initialization, 108
Sorting, 159 Drag&drop, 28
TSI#dwuser_1, 157 driveAxis, 101
TSI#dwuser_2, 157 DT, 95
Cyclic program execution DWORD, 94
Effect on I/O access, 119
Effect on variable initialization, 108
Cyclic program processing E
Effect on I/O access, 122, 128
Elementary data types
Overview, 94
Enumerations
D
Defining, 100
Data types Example, 100
Bit data type, 94 Example, 54
elementary, 94 Execution system
Enumeration, 65 Execution levels and tasks, 539
Inheritance, 102 Export
Numeric, 94 MCC charts in program source files, 51
STRING, 95 MCC source file as an ST source file, 37
Technology object, 65, 101 MCC source file in XML format, 38, 48
Time, 95 externalEncoderType, 101
DATE, 95
DATE_AND_TIME, 95
Debug mode, 544, 564 F
Declaration
FBD, 164
Scope, 91
Features
Declaration area, 26
MCC chart, 50
declaration table
MCC source file, 39
Comment, 93
Floating-point number
Defining enumerations, 100
Data types, 94
Defining structures, 99
followingAxis, 101
Implementation section, 99
followingObjectType, 101
Initial value, 93
Formula, 164, 170
Initialization value, 93
Fundamentals, 584
Interface section, 99
Function
Scope of derived data types, 99
Creating, 147
Deleting
Example, 146
MCC chart, 46
Inserting, 142
MCC source file, 36
Programming, 147
Derived data type
Function block
Defining enumerations, 100
Inserting, 142
Defining structures, 99
Function chart, 168
Scope, 99
Fundamentals, 581
UDT, 98

SIMOTION MCC Motion Control Chart


590 Programming and Operating Manual, 05/2009
Index

G M
Global device user variables MCC
Defining, 104 Introduction, 21
Group variable MCC chart
_MccRetSyncStart, 233 Accept, 46
assigning programs to a task, 537
changing the creation type, 51
I closing, 46
Compiling, 46
I/O variable
defining order, 47
create, 125, 133
deleting, 46
Creating, 125, 133
downloading task to the target system, 537
Direct access, 119, 122
Editor, 55
Process image, 119, 122
exporting, 37, 47
Process image of the BackgroundTask, 129
exporting to program source files, 51
Identifiers
Features, 50
Rules for assigning names, 91
Importing, 37, 47
Importing
importing as MCC, 49
MCC chart as MCC, 49
Inserting, 44
MCC source file from XML data, 38
inserting commands, 55
MCC unit from XML data, 48
monitoring program execution, 553
Inheritance
moving to the foreground, 26
For technology objects, 102
Opening, 46
Initialization
Rename, 50
Time of the variable initialization, 108
representation in the Workbench, 25
Input field, 65
representing commands, 57
INT, 94
single step monitoring, 554
INT#MAX, 96
State, 556
INT#MIN, 96
Toolbar, 55
Integer
Tracking program execution, 553
Data types, 94
using in program source files, 51
using test functions, 40
wait commands, 53
K
zoom out/zoom in, 26
Know-how protection, 36 MCC command
Acknowledge specific technology object alarm, 242
Acknowledge technology object alarms, 239
L Activate measuring input, 372
Activate simulation for object, 200
LAD, 164
Activate trace, 208, 560
Ladder diagram, 165
Cam off, 468
Closing a branch, 167
Cam on, 454
description of elements, 166, 169
CASE statement, 227
Fundamentals, 577
Change operating mode, 207
Opens a branch, 167
Comment block, 209
Library, 176
Continue motion, 307
Compiling, 178
Continue path motion, 533
Technology package, 176
Continue task, 214
LREAL, 95
Deactivate measuring input, 379
Deactivate simulation for object, 202
Deactivate torque limitation, 333
Delete command queue, 355

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 591
Index

Determine TaskId, 220 Switch parameter set, 357


Encoder monitoring off, 370 Switch QF axis enable, 280
Encoder monitoring on, 367 Synchronize external encoder, 364
Establish connection using TCP/IP, 249 Synchronize measuring system, 382
Exit, 232 Synchronous start, 233
External encoder off, 362 Synchronous velocity operation off, 450
External encoder on, 360 Synchronous velocity operation on, 443
FOR statement, 224 System function call, 194
Gearing off, 431 Task status, 218
Gearing on, 416 Time-dependent position profile, 339
Go to, 229 Time-dependent velocity profile, 335
Home axis, 310 Travel to fixed endstop, 323
IF statement, 221 Traverse path circularly, 506
Incoming message, 245 Traverse path linearly, 497
Interrupt task, 212 Traverse path using polynomials, 516
Module, 60, 194 UNTIL statement, 226
Online correction, 346 Variable assignment, 197
Outgoing message, 247 Wait for axis, 185
Output cam track Off, 412 Wait for condition, 190
Output cam track On, 405 Wait for signal, 188
Parameterize cam, 487 Wait time, 183
Position axis, 317 WHILE statement, 223
Receive data, 263 MCC editor
Remove axis enable, 276 Shortcut, 27
Remove connection using TCP/IP, 253 MCC source file
Remove fixed endstop, 326 Accept, 34
Remove QF axis enable, 286 closing, 35
Reset object, 204 Compiling, 34
Reset output, 196 cutting, 36
Reset task, 216 deleting, 36
Return, 231 exporting as an ST source file, 37
Selection, 230 exporting in XML format, 38, 48
Send data, 255 Features, 39
Set axis parameter, 348 Inserting, 32, 36
Set offset on camming, 481 Know-how protection, 36
Set offset on the gearing, 438 Opening, 34
Set output, 195 Toolbar, 35
Set scaling on camming, 476 MCC unit
Set virtual axis values, 352 importing from XML data, 38, 48
Shift measuring system, 343 Rename, 39
Speed preset, 292 measuringInputType, 101
ST zoom, 199 Menu bar, 27
Start axis position-controlled, 297 Mode
Start task, 210 Debug mode, 544, 564
Stop axis, 301 Test mode, 544
Stop path motion, 529 Module creation, 60
Subroutine call, 142, 172, 194
Switch axis enable, 270
Switch master setpoint, 492 N
Switch on torque limitation, 329
Name space, 137
Switch output cam off, 398
New
Switch output cam on, 386
I/O variable, 125, 133
Switch output cam signal, 401

SIMOTION MCC Motion Control Chart


592 Programming and Operating Manual, 05/2009
Index

MCC chart, 44 Expert, 79


MCC source file, 32 Rename
Numeric data types, 94 MCC chart, 50
MCC unit, 39
RETAIN, 103
O reuse
MCC chart, 46
Open
MCC source file, 34
MCC chart, 46
RUN
MCC source file, 34
Effect on variable initialization, 108
Operating mode
Process mode, 544
Operator input options, 27
S
outputCamType, 101
Scope of the declarations, 91
Selection list, 65
P Combo box, 65
Editable, 66
posAxis, 101
Self-defined selection options, 65
Preprocessor
Sequential program execution
Activating, 42
Effect on I/O access, 119, 122
Using, 42
Effect on variable initialization, 108
Principles of programming, 54
Settings, 29
Print, 180
Shortcut
Process image
MCC editor, 27
Cyclic tasks, 122
Single axis commands, 310
Features, 120
single step monitoring
principle and use, 119, 128
Switch on, 554
Process image of the BackgroundTask, 119
TSI#dwuser_1, 553
Process image of the cyclic tasks, 119
TSI#dwuser_2, 553
Process mode, 544
SINT, 94
Program
SINT#MAX, 96
see MCC chart, 34, 46
SINT#MIN, 96
Program run, 558
ST
Toolbar, 559
_alarm, 138
Program status
_alarmS, 247, 249
Starting and stopping, 557
_alarmSId, 247, 249
Summary, 556
_alarmSq, 247, 249
Program structure, 160
_alarmSqId, 247, 249
Programming
_device, 138
Principle, 23
_direct, 138
Proceed as follows, 24
_disableAxis, 279
Project
_disableAxisSimulation, 204
Download, 542
_disableCamTrack, 415
_disableCamTrackSimulation, 204
_disableFollowingObjectSimulation, 204
R
_disableMeasuringInput, 381
REAL, 95 _disableMeasuringInputSimulation, 204
Reference, 101 _disableMonitoringOfEncoderDifference, 371
Reference data, 156 _disableOutputCam, 400
References, 4 _disablePathObjectSimulation, 204
Registers _disableQFAxis, 291
Dynamic response, 75 _disableScheduler, 238

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 593
Index

_enableAxis, 275 _resetSensor, 206


_enableAxisSimulation, 201 _resetSensorError, 241, 244
_enableCamming, 467 _resetTask, 217
_enableCamTrack, 411 _resetTaskId, 217
_enableCamTrackSimulation, 201 _resetTController, 206
_enableExternalEncoder, 361 _resetTControllerError, 241, 244
_enableFollowingObjectSimulation, 201 _resetTechnologicalErrors, 241
_enableGearing, 429 _restartTask, 211
_enableMeasuringInput, 378 _restartTaskId, 211
_enableMeasuringInputCyclic, 378 _resumeTask, 215
_enableMeasuringInputSimulation, 201 _resumeTaskId, 215
_enableMonitoringOfEncoderDifference, 369 _setAndGetEncoderValue, 385
_enableOutputCam, 397 _setCamOffset, 491
_enableOutputCamSimulation, 201 _setMaster, 279, 285, 291, 296, 300, 306, 309, 314,
_enablePathObjectSimulation, 201 325, 328, 332, 338, 342, 347, 351, 354, 356, 359,
_enableQFAxis, 285 429, 449, 468
_enableScheduler, 238 _setOutputCamCounter, 397
_enableTorqueLimiting, 332 _setOutputCamState, 400, 405
_enableVelocityGearing, 449 _startSyncCommands, 238
_getStateOfTask, 219 _stop, 306
_getStateOfTaskId, 219 _stopEmergency, 306
_GetStateOfXCommand, 260, 267 _suspendTask, 213
_getSyncCommandId, 238 _suspendTaskId, 213
_getTaskId, 220 _task, 138
_homing, 314 _tcpCloseConnection, 254
_move, 296, 300 _tcpCloseServer, 254
_project, 138 _tcpOpenClient, 252
_redefinePosition, 345, 354 _tcpOpenServer, 252
_resetAdditionObject, 206 _tcpReceive, 269
_resetAdditionObjectError, 241, 244 _tcpSend, 261
_resetAxis, 206 _to, 138
_resetAxisError, 241, 244 _udpReceive, 269
_resetCam, 206 _udpReceive, 267
_resetCamError, 241, 244 _udpSend, 261
_resetCamTrack, 206 _waitTime, 184, 238
_resetCamTrackError, 241, 244 _Xreceive, 269
_resetControllerObject, 206 _Xreceive, 267
_resetControllerObjectError, 241, 244 _Xsend, 261
_resetExternalEncoder, 206 BEGIN_SYNC, 238
_resetExternalEncoderError, 241, 244 END_EXPRESSION, 188, 189, 194, 238
_resetFixedGear, 206 END_SYNC, 238
_resetFixedGearError, 241, 244 END_WAITFORCONDITION, 188, 189, 194, 238
_resetFollowingObject, 206 EXPRESSION, 188, 189, 194, 238
_resetFollowingObjectError, 241, 244 tcpReceive, 267
_resetFormulaObject, 206 Value assignments, 195, 196
_resetFormulaObjectError, 241, 244 WAITFORCONDITION, 188, 189, 194, 238
_resetMeasuringInput, 206 Step enabling condition, 82
_resetMeasuringInputError, 241, 244 STOP to RUN
_resetMotionBuffer, 356 Effect on variable initialization, 108
_resetOutputCam, 206 STRING, 95
_resetOutputCamError, 241, 244 StructAlarmId, 98
_resetPathObject, 206 STRUCTALARMID#NIL, 98
_resetPathObjectError, 241, 244 StructTaskId, 98

SIMOTION MCC Motion Control Chart


594 Programming and Operating Manual, 05/2009
Index

STRUCTTASKID#NIL, 98 MCC source file, 35


Structures Trace, 560
Defining, 99 "Activate trace" command, 560
Subroutine, 139 Transition behavior, 82
Call, 142 TSI#dwuser_1
information exchange, 141 Cross-reference list, 157
inserting in MCC chart, 142 single step monitoring, 553
programming, 142 TSI#dwuser_2
Symbol browser, 548 Cross-reference list, 157
Synchronous start single step monitoring, 553
Group variable _MccRetSyncStart, 233
System data types, 102
System function U
Call, 172
UDINT, 94
inserting in MCC chart, 172
UDINT#MAX, 96
programming, 172
UDINT#MIN, 96
System functions
UINT, 94
Inheritance, 102
UINT#MAX, 96
System variables
UINT#MIN, 96
Inheritance, 102
using test functions
MCC chart, 40
USINT, 94
T
USINT#MAX, 96
T#MAX, 96 USINT#MIN, 96
T#MIN, 96
Task
Cyclic tasks, 539 V
Effect on variable initialization, 108
VAR, 103
Execution levels, 539
VAR CONSTANT, 103
Sequential tasks, 539
VAR_GLOBAL, 103
Technology object
VAR_GLOBAL CONSTANT, 103
Assignment to a command, 67
VAR_GLOBAL RETAIN, 103
Data type, 101
VAR_IN_OUT, 103
Inheritance, 102
VAR_INPUT, 103
Variable as a reference, 68
VAR_OUTPUT, 103
Technology package
VAR_TEMP, 103
in library, 176
Variable assignment, 197
Test mode, 544
Variable types, 88
TIME, 95
Keywords, 103
Time types
Variables, 103
Overview, 95
Assignment, 197
TIME#MAX, 96
Defining, 104
TIME#MIN, 96
Initial value, 93
TIME_OF_DAY, 95
Initialization value, 93
TIME_OF_DAY#MAX, 96
Local, 107
TIME_OF_DAY#MIN, 96
Process image, 119, 128
TO#NIL, 101
Reference to a technology object, 68
TOD, 95
Reference to a technology object: Example of an
TOD#MAX, 96
absolute encoder, 68
TOD#MIN, 96
Reference to a technology object: Example of time-
Toolbar, 27
based cams, 71
MCC editor, 55
timing of initialization, 108

SIMOTION MCC Motion Control Chart


Programming and Operating Manual, 05/2009 595
Index

unit variable, 105


Watch tables, 551

W
wait commands
MCC chart, 53
Watch tables, 551
WORD, 94
Work area
Maximize, 26

SIMOTION MCC Motion Control Chart


596 Programming and Operating Manual, 05/2009

You might also like