mc simotion mcc programming manual

549
SIMOTION SIMOTION SCOUT SIMOTION MCC Motion Control Chart _ _____________ _ _____________ _ _____________ _ _____________ _ _____________ _ _____________ _ _____________ _ _____________ Preface Description 1 Software interface 2 MCC Source Files and MCC Charts 3 Programming in MCC 4 MCC commands 5 Commissioning (software) 6 Error Handling and Program Test 7 Appendix A SIMOTION SIMOTION MCC Motion Control Chart Programming and Operating Manual 08/2008

Upload: andyp-dhakal

Post on 21-Jan-2016

141 views

Category:

Documents


15 download

DESCRIPTION

mcc chart

TRANSCRIPT

Page 1: MC SIMOTION MCC Programming Manual

SIMOTION SIMOTION SCOUT SIMOTION MCC Motion Control Chart

________________________________________________________________________________________________________________

Preface

Description 1

Software interface 2

MCC Source Files and MCC Charts

3

Programming in MCC 4

MCC commands 5

Commissioning (software) 6

Error Handling and Program Test

7

Appendix A

SIMOTION

SIMOTION MCC Motion Control Chart

Programming and Operating Manual

08/2008

Page 2: MC SIMOTION MCC Programming Manual

Safety Guidelines Safety Guidelines 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.

Prescribed Usage Note the following:

WARNING This device may only be used for the applications described in the catalog or the technical description and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as careful operation and maintenance.

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 Industry Sector Postfach 48 48 90327 NÜRNBERG GERMANY

Copyright © Siemens AG 2008. Technical data subject to change

Page 3: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 3

Preface

Scope This document is part of the SIMOTION Programming documentation package. This document is valid for product version V4.1 Service Pack 2 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 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).

Page 4: MC SIMOTION MCC Programming Manual

Preface

SIMOTION MCC Motion Control Chart 4 Programming and Operating Manual, 08/2008

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 SP2: ● SIMOTION Engineering System ● SIMOTION System and Function Descriptions ● SIMOTION Diagnostics ● SIMOTION Programming ● SIMOTION Programming - References ● SIMOTION C ● SIMOTION P350 ● SIMOTION D4xx ● SIMOTION Supplementary Documentation

Hotline and Internet addresses

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 Internet http://www.siemens.com/automation/support-request

Americas Phone +1 423 262 2522 Fax +1 423 262 2200 E-mail mailto:[email protected]

Asia / Pacific Phone +86 1064 719 990 Fax +86 1064 747 474 E-mail mailto:[email protected]

Page 5: MC SIMOTION MCC Programming Manual

Preface

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 5

Note Country-specific telephone numbers for technical support are provided under the following Internet address: http://www.siemens.com/automation/service&support Calls are subject to charge, e.g. 0.14 €/min. on the German landline network. Tariffs of other phone companies may differ.

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 63315 E-mail mailto:[email protected]

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)

● Product support: – http://support.automation.siemens.com/WW/view/en/10805436

Additional support We also offer introductory courses to help you familiarize yourself with SIMOTION. Please contact your regional training center or our main training center at D-90027 Nuremberg, phone +49 (911) 895 3202. Information about training courses on offer can be found at: www.sitrain.com

Page 6: MC SIMOTION MCC Programming Manual
Page 7: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 7

Contents Preface ...................................................................................................................................................... 3 1 Description............................................................................................................................................... 21

1.1 Overview ......................................................................................................................................21 1.2 Introduction to MCC (Motion Control Chart) ................................................................................21 1.3 Principles of programming ...........................................................................................................22 1.4 Procedure for programming .........................................................................................................23

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 .................................................................................................................28 2.4 Settings for the MCC editor..........................................................................................................30 2.5 Calling up the online help.............................................................................................................31

3 MCC Source Files and MCC Charts ........................................................................................................ 33 3.1 General ........................................................................................................................................33 3.2 Inserting and managing MCC source files...................................................................................33 3.2.1 Inserting a new MCC source file ..................................................................................................33 3.2.2 Opening existing MCC source files..............................................................................................36 3.2.3 Transferring and compiling an MCC source file...........................................................................36 3.2.4 Closing an open MCC source file ................................................................................................37 3.2.5 Cutting, copying, and deleting an MCC source file......................................................................38 3.2.6 Pasting a cut or copied MCC source file......................................................................................38 3.2.7 Know-how protection for MCC source files..................................................................................38 3.2.8 Exporting and importing an MCC source file ...............................................................................39 3.2.8.1 Exporting an MCC source file as an ST source file .....................................................................39 3.2.8.2 Exporting an MCC source file in XML format...............................................................................40 3.2.8.3 Importing an MCC source file from XML data..............................................................................40 3.2.9 Properties of an MCC source file .................................................................................................41 3.2.9.1 Renaming MCC source files ........................................................................................................41 3.2.9.2 using test functions ......................................................................................................................41 3.2.9.3 Configuring compiler settings.......................................................................................................42 3.3 Inserting and managing MCC charts ...........................................................................................45 3.3.1 Inserting a new MCC chart ..........................................................................................................45 3.3.2 Opening an existing MCC chart ...................................................................................................47 3.3.3 Transferring and compiling an MCC chart ...................................................................................47 3.3.4 Closing an open MCC chart.........................................................................................................47 3.3.5 Cutting, copying, and deleting an MCC chart ..............................................................................47 3.3.6 Pasting a cut or copied MCC chart ..............................................................................................48 3.3.7 Specifying the order of MCC charts in the MCC source file ........................................................48 3.3.8 Exporting and importing an MCC chart........................................................................................48

Page 8: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart 8 Programming and Operating Manual, 08/2008

3.3.8.1 Exporting an MCC chart in XML format ...................................................................................... 49 3.3.8.2 Importing an MCC chart from XML data ..................................................................................... 49 3.3.8.3 Importing an MCC chart .............................................................................................................. 50 3.3.9 Properties of an MCC chart......................................................................................................... 50 3.3.9.1 Renaming MCC charts................................................................................................................ 51 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................................................................................................................... 58 4.3.6 Hiding and displaying commands ............................................................................................... 59 4.3.7 Copying, deleting, cutting, or pasting commands ....................................................................... 59 4.3.8 Undo/redo.................................................................................................................................... 59 4.3.9 Module creation........................................................................................................................... 60 4.3.9.1 Procedure for creating a module................................................................................................. 60 4.3.9.2 Opening and closing a module ................................................................................................... 61 4.3.9.3 Canceling a module .................................................................................................................... 61 4.3.9.4 Changing the module structure................................................................................................... 61 4.4 Processing MCC commands....................................................................................................... 62 4.4.1 Assigning command parameters ................................................................................................ 62 4.4.2 Input fields and selection lists ..................................................................................................... 64 4.4.2.1 Input field..................................................................................................................................... 64 4.4.2.2 Selection list (combo box) ........................................................................................................... 64 4.4.2.3 Editable selection list (editable combo box)................................................................................ 66 4.4.2.4 Unit .............................................................................................................................................. 66 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 ..................................................................................... 67 4.4.4 Dynamics tab .............................................................................................................................. 73 4.4.5 Expert tab.................................................................................................................................... 76 4.4.6 Transition behavior and step enabling condition......................................................................... 79 4.4.6.1 Transition behavior from the currently active motion command ................................................. 79 4.4.6.2 Delay program execution (step enabling condition).................................................................... 80 4.4.6.3 Example of transition behavior and step enabling condition....................................................... 81 4.4.7 Closing the parameter screen form............................................................................................. 82 4.4.8 Relevant system function, system variable, or command in the ST programming language..... 82 4.4.9 Return values .............................................................................................................................. 82 4.4.9.1 Return value for the system functions of the technology packages ........................................... 83 4.5 General information about variables and data types .................................................................. 85 4.5.1 Overview of variable types.......................................................................................................... 85 4.5.2 Scope of the declarations............................................................................................................ 87 4.5.3 Rules for identifiers ..................................................................................................................... 87 4.5.4 Frequently used arrays in declarations ....................................................................................... 88 4.5.4.1 Array length and array element................................................................................................... 88

Page 9: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 9

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

Page 10: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart 10 Programming and Operating Manual, 08/2008

4.10.1 Inserting a function (FC) or function block (FB) ........................................................................ 135 4.10.2 Inserting a subroutine call into the MCC chart and assigning parameters ............................... 135 4.10.2.1 Overview of parameters for....................................................................................................... 137 4.10.3 Example: Function (FC) ............................................................................................................ 138 4.10.3.1 Creating and programming the function (FC) ........................................................................... 139 4.10.3.2 Subroutine call of function (FC) ................................................................................................ 139 4.10.4 Example: Function block (FB)................................................................................................... 142 4.10.4.1 Creating and programming the function block (FB) .................................................................. 142 4.10.4.2 Subroutine call of function block (FB) ....................................................................................... 143 4.10.4.3 Creating a function block instance ............................................................................................ 143 4.10.4.4 Programming the subroutine call of the function block ............................................................. 144 4.10.4.5 Accessing the output parameters of the function block retrospectively.................................... 146 4.11 Reference data.......................................................................................................................... 147 4.11.1 Cross reference list ................................................................................................................... 147 4.11.1.1 Creating a cross-reference list .................................................................................................. 147 4.11.1.2 Example: Cross-reference tab in detail view............................................................................. 148 4.11.1.3 Content of the cross-reference list ............................................................................................ 148 4.11.1.4 Working with a cross-reference list ........................................................................................... 149 4.11.2 Program structure ..................................................................................................................... 150 4.11.2.1 Example: Program Structure tab in the detail view................................................................... 150 4.11.2.2 Content of the program structure .............................................................................................. 151 4.11.3 Code attributes.......................................................................................................................... 152 4.11.3.1 Code attribute contents ............................................................................................................. 152 4.12 LAD/FBD/formula ...................................................................................................................... 153 4.12.1 Ladder diagram (LAD)............................................................................................................... 153 4.12.1.1 Description of LAD elements..................................................................................................... 155 4.12.1.2 Opens a branch......................................................................................................................... 156 4.12.1.3 Closing a branch ....................................................................................................................... 156 4.12.2 Function block diagram (FBD) .................................................................................................. 157 4.12.2.1 Description of FBD elements .................................................................................................... 158 4.12.3 Formula ..................................................................................................................................... 159 4.13 Command library and system function...................................................................................... 160 4.13.1 Command library....................................................................................................................... 160 4.13.1.1 Using the command library ....................................................................................................... 161 4.13.1.2 User functions and function blocks ........................................................................................... 162 4.13.2 Using the System function call command................................................................................. 162 4.13.2.1 Overview of parameters for....................................................................................................... 164 4.14 MCC charts in libraries.............................................................................................................. 165 4.14.1 Using technology packages in libraries..................................................................................... 165 4.14.2 Compiling a library .................................................................................................................... 167 4.15 Print ........................................................................................................................................... 169

5 MCC commands .................................................................................................................................... 171 5.1 Basic commands....................................................................................................................... 171 5.1.1 Wait time ................................................................................................................................... 171 5.1.1.1 Overview of parameters for Wait time....................................................................................... 172 5.1.1.2 Overview of parameters for Wait time - Parameters tab........................................................... 172 5.1.1.3 Overview of parameters for Wait time - Expert tab................................................................... 172 5.1.1.4 Relevant system functions for Wait time................................................................................... 172 5.1.2 Wait for axis .............................................................................................................................. 173 5.1.2.1 Overview of parameters for Wait for axis.................................................................................. 174 5.1.2.2 Axis status................................................................................................................................. 175 5.1.2.3 Comparison operators for axis values ...................................................................................... 175

Page 11: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 11

5.1.2.4 Relevant commands of the ST (Structured Text) programming language for Wait for axis ......176 5.1.3 Wait for signal ............................................................................................................................176 5.1.3.1 Overview of parameters for Wait for signal................................................................................177 5.1.3.2 Relevant commands of the ST (Structured Text) programming language for Wait for

signal..........................................................................................................................................177 5.1.4 Wait for condition .......................................................................................................................177 5.1.4.1 Relevant commands of the ST (Structured Text) programming language for Wait for

condition.....................................................................................................................................180 5.1.5 Module .......................................................................................................................................181 5.1.6 Subroutine call ...........................................................................................................................181 5.1.7 System function call ...................................................................................................................181 5.1.8 Set output...................................................................................................................................182 5.1.8.1 Overview of parameters for Set output ......................................................................................182 5.1.8.2 Relevant commands of the ST (Structured Text) programming language for Set output .........182 5.1.9 Reset output...............................................................................................................................183 5.1.9.1 Overview of parameters for Reset output ..................................................................................183 5.1.9.2 Relevant commands of the ST (Structured Text) programming language for Reset output .....183 5.1.10 Variable assignment ..................................................................................................................184 5.1.11 ST zoom.....................................................................................................................................184 5.1.12 Activate simulation for object .....................................................................................................185 5.1.12.1 Overview of parameters for Activate simulation for object ........................................................185 5.1.12.2 Overview of parameters for Activate simulation for object - Parameters tab ............................186 5.1.12.3 Overview of parameters for Activate simulation for object - Expert tab.....................................186 5.1.12.4 Relevant system functions for Activate simulation for object.....................................................186 5.1.13 Deactivate simulation for object .................................................................................................187 5.1.13.1 Overview of parameters for Deactivate simulation for object ....................................................188 5.1.13.2 Overview of parameters for Deactivate simulation for object - Parameters tab ........................188 5.1.13.3 Overview of parameters for Deactivate simulation for object - Expert tab ................................188 5.1.13.4 Relevant system function for Deactivate simulation for object ..................................................188 5.1.14 Reset object ...............................................................................................................................189 5.1.14.1 Overview of parameters for Reset object ..................................................................................189 5.1.14.2 Overview of parameters for Reset object - Parameters tab ......................................................190 5.1.14.3 Overview of parameters for Reset object - Expert tab...............................................................190 5.1.14.4 Relevant system functions for Reset object...............................................................................190 5.1.15 Change operating mode ............................................................................................................191 5.1.15.1 Overview of parameters for Change operating mode................................................................191 5.1.15.2 Relevant system functions for Change operating mode............................................................191 5.1.15.3 Return value for Change operating mode..................................................................................192 5.1.16 Activate trace .............................................................................................................................192 5.1.17 Comment block ..........................................................................................................................192 5.2 Task commands.........................................................................................................................193 5.2.1 Start task ....................................................................................................................................193 5.2.1.1 Call from the BackgroundTask...................................................................................................193 5.2.1.2 Overview of parameters for Start task .......................................................................................194 5.2.1.3 Relevant system functions for Start task ...................................................................................194 5.2.1.4 Return value for Start task .........................................................................................................194 5.2.2 Interrupt task ..............................................................................................................................194 5.2.2.1 Overview of parameters for Interrupt task .................................................................................195 5.2.2.2 Relevant system functions for Interrupt task..............................................................................195 5.2.2.3 Return value for Interrupt task ...................................................................................................195 5.2.3 Continue task .............................................................................................................................196 5.2.3.1 Overview of parameters for Continue task ................................................................................196 5.2.3.2 Relevant system functions for Continue task.............................................................................197 5.2.3.3 Return value for Continue task ..................................................................................................197 5.2.4 Reset task ..................................................................................................................................197

Page 12: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart 12 Programming and Operating Manual, 08/2008

5.2.4.1 Overview of parameters for Reset task..................................................................................... 198 5.2.4.2 Relevant system functions for Reset task................................................................................. 198 5.2.4.3 Return value for Reset task....................................................................................................... 198 5.2.5 Task status................................................................................................................................ 199 5.2.5.1 Overview of parameters for Task status ................................................................................... 199 5.2.5.2 Relevant system functions for Task status ............................................................................... 200 5.2.6 Determine TaskId...................................................................................................................... 201 5.2.6.1 Overview of parameters for Determine TaskId ......................................................................... 201 5.2.6.2 Relevant system functions for Determine TaskId ..................................................................... 201 5.3 Program structures.................................................................................................................... 202 5.3.1 IF: Program branching .............................................................................................................. 202 5.3.1.1 Note on inserting the IF statement............................................................................................ 203 5.3.1.2 Note on deleting/cutting or copying an IF statement ................................................................ 203 5.3.1.3 Relevant commands of the ST (Structured Text) programming language for IF: Program

branching................................................................................................................................... 203 5.3.2 WHILE: Loop with condition at the start.................................................................................... 204 5.3.2.1 Relevant commands of the ST (Structured Text) programming language for WHILE: Loop

with condition at the start .......................................................................................................... 204 5.3.3 FOR: Loop with fixed number of runs ....................................................................................... 205 5.3.3.1 Overview of parameters for FOR: Loop with fixed number of runs........................................... 205 5.3.3.2 Relevant commands of the ST (Structured Text) programming language for FOR: Loop

with fixed number of runs .......................................................................................................... 206 5.3.4 UNTIL: Loop with condition at the end...................................................................................... 207 5.3.4.1 Relevant commands of the ST (Structured Text) programming language for UNTIL: Loop

with condition at the end ........................................................................................................... 207 5.3.5 CASE: Multiple branching ......................................................................................................... 208 5.3.5.1 Inserting a branch in the CASE statement................................................................................ 208 5.3.5.2 Deleting a branch from the CASE statement ............................................................................ 209 5.3.5.3 Comparison constant in the CASE statement........................................................................... 209 5.3.5.4 Overview of parameters for CASE: Multiple branching ............................................................ 209 5.3.5.5 Relevant commands of the ST (Structured Text) programming language for CASE:

Multiple branching ..................................................................................................................... 209 5.3.6 Go to.......................................................................................................................................... 210 5.3.6.1 Overview of parameters for Go to............................................................................................. 210 5.3.6.2 Relevant commands of the ST (Structured Text) programming language for Go to: ............... 210 5.3.7 Selection.................................................................................................................................... 211 5.3.7.1 Overview of parameters for Selection....................................................................................... 211 5.3.7.2 Relevant commands of the ST (Structured Text) programming language for Selection: ......... 211 5.3.8 Return........................................................................................................................................ 212 5.3.8.1 Relevant commands of the ST (Structured Text) programming language for Return: ............. 212 5.3.9 Exit ............................................................................................................................................ 213 5.3.9.1 Relevant commands of the ST (Structured Text) programming language for Exit: .................. 213 5.3.10 Synchronous start ..................................................................................................................... 214 5.3.10.1 Programming a condition .......................................................................................................... 215 5.3.10.2 Checkbox .................................................................................................................................. 215 5.3.10.3 Insert branch ............................................................................................................................. 216 5.3.10.4 Deleting a branch ...................................................................................................................... 216 5.3.10.5 Permissible commands ............................................................................................................. 216 5.3.10.6 Transition behavior.................................................................................................................... 218 5.3.10.7 Step enabling condition............................................................................................................. 218 5.3.10.8 Deleting/cutting or copying........................................................................................................ 218 5.3.10.9 Relevant system functions and commands of the ST (Structured Text) programming

language for synchronous start................................................................................................. 218 5.4 Communication ......................................................................................................................... 219

Page 13: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 13

5.4.1 Acknowledge technology object alarms.....................................................................................219 5.4.1.1 Overview of parameters for Acknowledge technology object alarms........................................219 5.4.1.2 Overview of parameters for Acknowledge technology object alarms - Parameters tab ............220 5.4.1.3 Overview of parameters for Acknowledge technology object alarms - Expert tab ....................220 5.4.1.4 Relevant system functions for Acknowledge technology object alarms ....................................220 5.4.2 Acknowledge specific technology object alarm .........................................................................221 5.4.2.1 Overview of parameters for Acknowledge specific technology object alarm.............................222 5.4.2.2 Overview of parameters for Acknowledge specific technology object alarm - Parameters

tab ..............................................................................................................................................222 5.4.2.3 Overview of parameters for Acknowledge specific technology object alarm - Expert tab.........222 5.4.2.4 Relevant system functions for Acknowledge specific technology object alarm.........................223 5.4.3 Incoming message.....................................................................................................................224 5.4.3.1 Overview of parameters for Incoming message ........................................................................224 5.4.3.2 Overview of parameters for Incoming message - Parameters tab ............................................225 5.4.3.3 Overview of parameters for Incoming message - Expert tab ....................................................225 5.4.3.4 Relevant system functions for Incoming message ....................................................................225 5.4.4 Outgoing message.....................................................................................................................226 5.4.4.1 Overview of parameters for Outgoing message ........................................................................226 5.4.4.2 Overview of parameters for Outgoing message - Parameters tab ............................................227 5.4.4.3 Overview of parameters for Outgoing message - Expert tab ....................................................227 5.4.4.4 Relevant system functions for Outgoing message ....................................................................227 5.4.5 Establish connection using TCP/IP............................................................................................228 5.4.5.1 Overview of parameters for Establish connection using TCP/IP ...............................................229 5.4.5.2 Relevant system functions for Establish connection using TCP/IP ...........................................230 5.4.5.3 Return value for Establish connection using TCP/IP.................................................................230 5.4.6 Remove connection using TCP/IP.............................................................................................231 5.4.6.1 Overview of parameters for Remove connection using TCP/IP ................................................231 5.4.6.2 Relevant system functions for Remove connection using TCP/IP ............................................232 5.4.7 Send data...................................................................................................................................232 5.4.7.1 Overview of parameters for Send data ......................................................................................234 5.4.7.2 Overview of parameters for Send data - Parameters tab ..........................................................235 5.4.7.3 Overview of parameters for Send data - Expert tab ..................................................................236 5.4.7.4 Querying the command status for Send data with XSend/XReceive protocol ..........................237 5.4.7.5 Structure of destination address of the communications partner, when address is entered

directly (XSend/XReceive protocol) ...........................................................................................237 5.4.7.6 Relevant system functions for Send data ..................................................................................238 5.4.8 Receive data ..............................................................................................................................240 5.4.8.1 Overview of parameters for Receive data .................................................................................241 5.4.8.2 Overview of parameters for Receive data - Parameters tab .....................................................242 5.4.8.3 Overview of parameters for Receive data - Expert tab..............................................................243 5.4.8.4 Querying the command status for Receive data with XSend/XReceive protocol......................243 5.4.8.5 Relevant system functions for Receive data..............................................................................243 5.4.8.6 Return value for Receive data ...................................................................................................244 5.5 Single axis commands ...............................................................................................................246 5.5.1 Switch axis enable .....................................................................................................................246 5.5.1.1 Overview of parameters for Switch axis enable.........................................................................247 5.5.1.2 Overview of parameters for Switch axis enable – Parameters tab ............................................248 5.5.1.3 Overview of parameters for Switch axis enable – Expert tab ....................................................249 5.5.1.4 Meaning of bits of control word 1 (STW1) in accordance with PROFIdrive ..............................249 5.5.1.5 Relevant system function for Switch axis enable.......................................................................250 5.5.2 Remove axis enable ..................................................................................................................251 5.5.2.1 Overview of parameters for Remove axis enable......................................................................252 5.5.2.2 Overview of parameters for Remove axis enable – Parameters tab .........................................253 5.5.2.3 Overview of parameters for Remove axis enable – Expert tab .................................................254 5.5.2.4 Relevant system function for Remove axis enable....................................................................254

Page 14: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart 14 Programming and Operating Manual, 08/2008

5.5.3 Switch QF axis enable .............................................................................................................. 255 5.5.3.1 Overview of parameters for Switch QF axis enable.................................................................. 256 5.5.3.2 Overview of parameters for Switch QF axis enable – Parameters tab ..................................... 257 5.5.3.3 Overview of parameters for Switch QF axis enable – QF_Parameters tab .............................. 257 5.5.3.4 Overview of parameters for Switch QF axis enable – Expert tab ............................................. 259 5.5.3.5 Relevant system function for Switch QF axis enable................................................................ 259 5.5.4 Remove QF axis enable............................................................................................................ 260 5.5.4.1 Overview of parameters for Remove QF axis enable............................................................... 261 5.5.4.2 Overview of parameters for Remove QF axis enable – Parameters tab .................................. 262 5.5.4.3 Overview of parameters for Remove QF axis enable – QF_Parameters tab ........................... 263 5.5.4.4 Overview of parameters for Remove QF axis enable – Expert tab........................................... 264 5.5.4.5 Relevant system function for Remove QF axis enable............................................................. 265 5.5.5 Speed preset............................................................................................................................. 266 5.5.5.1 Overview of parameters for speed specification....................................................................... 267 5.5.5.2 Overview of parameters for Speed specification – Parameters tab.......................................... 268 5.5.5.3 Overview of parameters for Speed specification – Dynamic response tab .............................. 268 5.5.5.4 Overview of parameters for Speed specification – Expert tab .................................................. 269 5.5.5.5 Relevant system function for speed specification..................................................................... 269 5.5.6 Start axis position-controlled..................................................................................................... 270 5.5.6.1 Overview of parameters for Start axis position-controlled ........................................................ 271 5.5.6.2 Overview of parameters for Start axis position-controlled – Parameters tab............................ 271 5.5.6.3 Overview of parameters for Start axis position-controlled – Dynamic response tab ................ 272 5.5.6.4 Overview of parameters for Start axis position-controlled – Expert tab.................................... 272 5.5.6.5 Relevant system function for Start axis position-controlled ...................................................... 273 5.5.7 Stop axis.................................................................................................................................... 274 5.5.7.1 Overview of parameters for Stop axis....................................................................................... 275 5.5.7.2 Overview of parameters for Stop axis – Parameters tab .......................................................... 276 5.5.7.3 Overview of parameters for Stop axis – Dynamic response tab............................................... 278 5.5.7.4 Overview of parameters for Stop axis – Expert tab .................................................................. 279 5.5.7.5 Relevant system functions for Stop axis ................................................................................... 279 5.5.8 Continue motion ........................................................................................................................ 280 5.5.8.1 Overview of parameters for Continue motion ........................................................................... 281 5.5.8.2 Overview of parameters for Continue motion - Parameters tab ............................................... 281 5.5.8.3 Overview of parameters for Continue motion - Expert tab........................................................ 281 5.5.8.4 Relevant system function for Continue motion ......................................................................... 282 5.5.9 Home axis ................................................................................................................................. 283 5.5.9.1 Overview of parameters for Home axis..................................................................................... 284 5.5.9.2 Overview of parameters for Home axis – Parameters tab ........................................................ 285 5.5.9.3 Overview of parameters for Home axis – Dynamic response tab............................................. 286 5.5.9.4 Overview of parameters for Home axis – Expert tab ................................................................ 286 5.5.9.5 Relevant system functions for Home axis................................................................................. 287 5.5.9.6 Referencing mode..................................................................................................................... 287 5.5.9.7 Home position offset ................................................................................................................. 288 5.5.10 Position axis .............................................................................................................................. 289 5.5.10.1 Parameter screen form: Position axis ....................................................................................... 290 5.5.10.2 Overview of parameters for Position axis – Parameters tab..................................................... 291 5.5.10.3 Overview of parameters for Position axis – Dynamic response tab.......................................... 292 5.5.10.4 Overview of parameters for Position axis – Expert tab ............................................................. 292 5.5.10.5 Example of positioning .............................................................................................................. 293 5.5.10.6 Relevant system functions for Position axis.............................................................................. 293 5.5.11 Travel to fixed endstop.............................................................................................................. 294 5.5.11.1 Overview of parameters for Travel to fixed endstop ................................................................. 295 5.5.11.2 Overview of parameters for Travel to fixed endstop – Parameters tab .................................... 295 5.5.11.3 Overview of parameters for Travel to fixed endstop – Expert tab............................................. 296 5.5.11.4 Relevant system function for Travel to fixed endstop ............................................................... 296

Page 15: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 15

5.5.12 Remove fixed endstop ...............................................................................................................297 5.5.12.1 Overview of parameters for Remove fixed endstop...................................................................298 5.5.12.2 Relevant system function for Remove fixed endstop.................................................................298 5.5.13 Switch on torque limitation .........................................................................................................299 5.5.13.1 Overview of parameters for Switch on torque limitation ............................................................300 5.5.13.2 Overview of parameters for Switch on torque limitation – Parameters tab................................301 5.5.13.3 Overview of parameters for Switch on torque limitation – Expert tab........................................301 5.5.13.4 Relevant system function for Switch on torque limitation ..........................................................302 5.5.14 Deactivate torque limitation........................................................................................................303 5.5.14.1 Overview of parameters for Switch off torque limitation ............................................................304 5.5.14.2 Relevant system function for Switch off torque limitation ..........................................................304 5.5.15 Time-dependent velocity profile .................................................................................................305 5.5.15.1 Overview of parameters for Time-dependent velocity profile ....................................................306 5.5.15.2 Overview of parameters for Time-dependent velocity profile – Profile tab ................................306 5.5.15.3 Overview of parameters for Time-dependent velocity profile – Dynamic response tab ............307 5.5.15.4 Overview of parameters for Time-dependent velocity profile – Expert tab................................307 5.5.15.5 Relevant system function for Time-dependent velocity profile ..................................................308 5.5.16 Time-dependent position profile.................................................................................................309 5.5.16.1 Overview of parameters for Time-dependent position profile....................................................310 5.5.16.2 Overview of parameters for Time-dependent position profile – Profile tab................................310 5.5.16.3 Overview of parameters for Time-dependent position profile – Dynamic response tab ............311 5.5.16.4 Overview of parameters for Time-dependent position profile – Expert tab ...............................311 5.5.16.5 Relevant system function for Time-dependent position profile..................................................312 5.5.17 Online correction........................................................................................................................313 5.5.17.1 Overview of parameters for Online correction ...........................................................................314 5.5.17.2 Relevant system function for Online correction .........................................................................314 5.5.18 Set axis parameter.....................................................................................................................315 5.5.18.1 Overview of parameters for Set axis parameter ........................................................................316 5.5.18.2 Example of Set axis parameter..................................................................................................318 5.5.18.3 Relevant system function for Set axis parameter ......................................................................318 5.5.19 Set virtual axis values ................................................................................................................319 5.5.19.1 Overview of parameters for Set virtual axis values....................................................................320 5.5.19.2 Overview of parameters for Set virtual axis values – Parameters tab.......................................320 5.5.19.3 Overview of parameters for Set virtual axis values – Expert tab ...............................................320 5.5.19.4 Relevant system function for Set virtual axis values..................................................................321 5.5.20 Delete command queue.............................................................................................................322 5.5.20.1 Overview of parameters for Delete command queue ................................................................322 5.5.20.2 Example of Delete command queue..........................................................................................323 5.5.20.3 Relevant system function for Delete command queue ..............................................................323 5.5.21 Switch parameter set .................................................................................................................324 5.5.21.1 Overview of parameters for Switch parameter set.....................................................................325 5.5.21.2 Overview of parameters for Switch parameter set – Parameters tab........................................325 5.5.21.3 Overview of parameters for Switch parameter set – Expert tab ................................................325 5.5.21.4 Relevant system function for Switch parameter set...................................................................326 5.6 Commands for external encoders, measuring inputs and output cams ....................................327 5.6.1 External encoder on...................................................................................................................327 5.6.1.1 Overview of parameters for External encoder on ......................................................................328 5.6.1.2 Relevant system function for External encoder on ....................................................................328 5.6.2 External encoder off...................................................................................................................329 5.6.2.1 Overview of parameters for External encoder off ......................................................................330 5.6.2.2 Relevant system function for External encoder off ....................................................................330 5.6.3 Synchronize external encoder ...................................................................................................331 5.6.3.1 Overview of parameters for Synchronize external encoder.......................................................332 5.6.3.2 Overview of parameters for Synchronize external encoder – Parameters tab ..........................332 5.6.3.3 Overview of parameters for Synchronize external encoder – Expert tab ..................................333

Page 16: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart 16 Programming and Operating Manual, 08/2008

5.6.3.4 Relevant system function for Synchronize external encoder.................................................... 333 5.6.4 Encoder monitoring on .............................................................................................................. 334 5.6.4.1 Overview of parameters for Encoder monitoring on ................................................................. 334 5.6.4.2 Overview of parameters for Encoder monitoring on – Parameters tab..................................... 335 5.6.4.3 Overview of parameters for Encoder monitoring on – Expert tab............................................. 335 5.6.4.4 Relevant system function for Encoder monitoring on ............................................................... 335 5.6.5 Encoder monitoring off .............................................................................................................. 336 5.6.5.1 Overview of parameters for Encoder monitoring off ................................................................. 337 5.6.5.2 Relevant system function for Encoder monitoring off ............................................................... 337 5.6.6 Activate measuring input........................................................................................................... 338 5.6.6.1 Overview of parameters for Activate measuring input .............................................................. 340 5.6.6.2 Overview of parameters for Activate measuring input – Parameters tab ................................. 341 5.6.6.3 Overview of parameters for Activate measuring input – Expert tab.......................................... 343 5.6.6.4 Relevant system functions for Activate measuring input .......................................................... 343 5.6.7 Deactivate measuring input....................................................................................................... 344 5.6.7.1 Overview of parameters for Deactivate measuring input.......................................................... 345 5.6.7.2 Overview of parameters for Deactivate measuring input – Parameters tab ............................. 345 5.6.7.3 Overview of parameters for Deactivate measuring input – Expert tab ..................................... 346 5.6.7.4 Relevant system functions for Deactivate measuring input ...................................................... 346 5.6.8 Shift measuring system............................................................................................................. 347 5.6.8.1 Overview of parameters for Shift measuring system ................................................................ 348 5.6.8.2 Overview of parameters for Shift measuring system – Set actual value tab ............................ 348 5.6.8.3 Overview of parameters for Shift measuring system – Expert tab............................................ 349 5.6.8.4 Relevant system function for Shift measuring system .............................................................. 349 5.6.9 Synchronize measuring system ................................................................................................ 350 5.6.9.1 Overview of parameters for Synchronize measuring system ................................................... 351 5.6.9.2 Overview of parameters for Synchronize measuring system – Parameters tab....................... 351 5.6.9.3 Overview of parameters for Synchronize measuring system – Expert tab ............................... 352 5.6.9.4 Relevant system function for Synchronize measuring system ................................................. 352 5.6.10 Switch output cam on................................................................................................................ 353 5.6.10.1 Overview of parameters for Switch output cam on ................................................................... 357 5.6.10.2 Overview of parameters for Switch output cam on – Parameters tab ...................................... 358 5.6.10.3 Overview of parameters for Switch output cam on – Expert tab............................................... 360 5.6.10.4 Relevant system functions for Switch output cam on ............................................................... 361 5.6.11 Switch output cam off................................................................................................................ 362 5.6.11.1 Overview of parameters for Switch output cam off ................................................................... 363 5.6.11.2 Overview of parameters for Switch output cam off – Parameters tab ...................................... 364 5.6.11.3 Overview of parameters for Switch output cam off – Expert tab............................................... 364 5.6.11.4 Relevant system functions for Switch output cam off ............................................................... 364 5.6.12 Switch output cam signal .......................................................................................................... 365 5.6.12.1 Overview of parameters for Switch output cam signal.............................................................. 366 5.6.12.2 Overview of parameters for Switch output cam signal – Parameters tab ................................. 367 5.6.12.3 Overview of parameters for Switch output cam signal – Expert tab ......................................... 368 5.6.12.4 Relevant system functions for Switch output cam signal.......................................................... 368 5.6.13 Output cam track On................................................................................................................. 369 5.6.13.1 Overview of parameters for Output cam track On .................................................................... 372 5.6.13.2 Overview of parameters for Output cam track On – Parameters tab........................................ 373 5.6.13.3 Overview of parameters for Output cam track On – Expert tab ................................................ 375 5.6.13.4 Relevant system function for Output cam track On .................................................................. 375 5.6.14 Output cam track Off ................................................................................................................. 376 5.6.14.1 Overview of parameters for Output cam track Off .................................................................... 377 5.6.14.2 Overview of parameters for Output cam track Off – Parameters tab........................................ 378 5.6.14.3 Overview of parameters for Output cam track Off – Expert tab ................................................ 378 5.6.14.4 Relevant system function for Output cam track Off .................................................................. 379 5.7 Commands for synchronous operation and camming .............................................................. 380

Page 17: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 17

5.7.1 Gearing on .................................................................................................................................380 5.7.1.1 Overview of parameters for Gearing on.....................................................................................382 5.7.1.2 Overview of parameters for Gearing on – Parameters tab ........................................................383 5.7.1.3 Overview of parameters for Gearing on – Synchronization tab .................................................385 5.7.1.4 Overview of parameters for Gearing on – Dynamic response tab.............................................390 5.7.1.5 Overview of parameters for Gearing on – Expert tab ................................................................391 5.7.1.6 Example of Gearing on ..............................................................................................................391 5.7.1.7 Relevant system functions for Gearing on.................................................................................391 5.7.2 Gearing off .................................................................................................................................393 5.7.2.1 Overview of parameters for Gearing off.....................................................................................394 5.7.2.2 Overview of parameters for Gearing off – Desynchronization tab .............................................395 5.7.2.3 Overview of parameters for Gearing off – Dynamic response tab.............................................397 5.7.2.4 Overview of parameters for Gearing off – Expert tab ................................................................398 5.7.2.5 Relevant system function for Gearing off...................................................................................398 5.7.3 Set offset on the gearing............................................................................................................399 5.7.3.1 Overview of parameters for Set offset on the gearing ...............................................................400 5.7.3.2 Overview of parameters for Set offset on the gearing – Parameters tab...................................401 5.7.3.3 Overview of parameters for Set offset on the gearing – Dynamic response tab .......................402 5.7.3.4 Overview of parameters for Set offset on the gearing – Expert tab...........................................402 5.7.3.5 Relevant system function for Set offset on the gearing .............................................................403 5.7.4 Synchronous velocity operation on............................................................................................403 5.7.4.1 Overview of Synchronous velocity operation on........................................................................405 5.7.4.2 Overview of parameters for Synchronous velocity operation on – Parameters tab...................406 5.7.4.3 Overview of parameters for Synchronous velocity operation on – Dynamic response tab .......407 5.7.4.4 Overview of parameters for Synchronous velocity operation on – Expert tab...........................407 5.7.4.5 Example of Synchronous velocity operation on.........................................................................408 5.7.4.6 Relevant system functions for Synchronous velocity operation on ...........................................409 5.7.5 Synchronous velocity operation off ............................................................................................410 5.7.5.1 Overview of parameters for Synchronous velocity operation off ...............................................411 5.7.5.2 Overview of parameters for Synchronous velocity operation off – Dynamic response tab .......412 5.7.5.3 Overview of parameters for Synchronous velocity operation off – Expert tab...........................412 5.7.5.4 Relevant system function for Synchronous velocity operation off .............................................413 5.7.6 Cam on.......................................................................................................................................413 5.7.6.1 Overview of parameters for Cam on..........................................................................................415 5.7.6.2 Overview of parameters for Cam on – Parameters tab .............................................................416 5.7.6.3 Overview of parameters for Cam on – Synchronization tab ......................................................418 5.7.6.4 Overview of parameters for Cam on – Dynamic response tab ..................................................424 5.7.6.5 Overview of parameters for Cam on – Expert tab......................................................................424 5.7.6.6 Example of Cam on ...................................................................................................................425 5.7.6.7 Relevant system functions for Cam on ......................................................................................425 5.7.7 Cam off.......................................................................................................................................427 5.7.7.1 Overview of parameters for Cam off ..........................................................................................428 5.7.7.2 Overview of parameters for Cam off – Desynchronization tab ..................................................429 5.7.7.3 Overview of parameters for Cam off – Dynamic response tab ..................................................431 5.7.7.4 Overview of parameters for Cam Off – Expert tab.....................................................................432 5.7.7.5 Relevant system function for Cam off ........................................................................................432 5.7.8 Set scaling on camming.............................................................................................................433 5.7.8.1 Overview of parameters for Set scaling on camming ................................................................434 5.7.8.2 Overview of parameters for Set scaling on camming – Parameters tab....................................435 5.7.8.3 Overview of parameters for Set scaling on camming – Dynamic response tab ........................436 5.7.8.4 Overview of parameters for Set scaling on camming – Expert tab............................................436 5.7.8.5 Relevant system function for Set scaling on camming ..............................................................437 5.7.9 Set offset on camming ...............................................................................................................438 5.7.9.1 Overview of parameters for Set offset on camming...................................................................439 5.7.9.2 Overview of parameters for Set offset on camming – Parameters tab......................................440

Page 18: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart 18 Programming and Operating Manual, 08/2008

5.7.9.3 Overview of parameters for Set offset on camming – Dynamic response tab.......................... 441 5.7.9.4 Overview of parameters for Set offset on camming – Expert tab ............................................. 441 5.7.9.5 Relevant system function for Set offset on camming................................................................ 442 5.7.10 Parameterize cam..................................................................................................................... 443 5.7.10.1 Overview of parameters for Parameterize cam ........................................................................ 445 5.7.10.2 Overview of parameters for Parameterize cam – Offset tab..................................................... 445 5.7.10.3 Overview of parameters for Parameterize cam – Basic scaling tab ......................................... 445 5.7.10.4 Overview of parameters for Parameterize cam – Range scaling tab ....................................... 446 5.7.10.5 Overview of parameters for Parameterize cam – Expert tab .................................................... 446 5.7.10.6 Relevant system functions for Parameterize cam..................................................................... 447 5.7.11 Switch master setpoint .............................................................................................................. 448 5.7.11.1 Overview of parameters for Switch master setpoint ................................................................. 449 5.7.11.2 Overview of parameters for Switch master setpoint – Parameters tab..................................... 450 5.7.11.3 Overview of parameters for Switch master setpoint – Dynamic response tab ......................... 450 5.7.11.4 Overview of parameters for Switch master setpoint – Expert tab............................................. 451 5.7.11.5 Relevant system function for Switch master setpoint ............................................................... 451 5.8 Commands for path interpolation.............................................................................................. 452 5.8.1 Traverse path linearly................................................................................................................ 453 5.8.1.1 Overview of parameters for Traverse path linearly................................................................... 454 5.8.1.2 Overview of parameters for Traverse path linearly – Parameters tab ...................................... 454 5.8.1.3 Overview of parameters for Traverse path linearly – Dynamic response tab ........................... 456 5.8.1.4 Overview of parameters for Traverse path linearly – Path-synchronous motion tab................ 458 5.8.1.5 Overview of parameters for Traverse path linearly – Expert tab............................................... 459 5.8.1.6 Relevant system function for Traverse path linearly................................................................. 460 5.8.2 Traverse path circularly............................................................................................................. 461 5.8.2.1 Overview of parameters for Traverse path circularly ................................................................ 462 5.8.2.2 Overview of parameters for Traverse path circularly – Parameters tab ................................... 463 5.8.2.3 Overview of parameters for Traverse path circularly – Dynamic response tab ........................ 467 5.8.2.4 Overview of parameters for Traverse path circularly – Path-synchronous motion tab ............. 469 5.8.2.5 Overview of parameters for Traverse path circularly – Expert tab............................................ 470 5.8.2.6 Relevant system function for Traverse path circularly .............................................................. 470 5.8.3 Traverse path using polynomials .............................................................................................. 472 5.8.3.1 Overview of parameters for Traverse path using polynomials.................................................. 474 5.8.3.2 Overview of parameters for Traverse path using polynomials – Parameters tab ..................... 474 5.8.3.3 Overview of parameters for Traverse path using polynomials – Dynamic response tab.......... 477 5.8.3.4 Overview of parameters for Traverse path using polynomials – Path-synchronous motion

tab ............................................................................................................................................. 480 5.8.3.5 Overview of parameters for Traverse path using polynomials – Expert tab ............................. 481 5.8.3.6 Relevant system function for Traverse path using polynomials................................................ 482 5.8.4 Stop path motion ....................................................................................................................... 484 5.8.4.1 Overview of parameters for Stop path motion .......................................................................... 485 5.8.4.2 Overview of parameters for Stop path motion – Parameters tab.............................................. 485 5.8.4.3 Overview of parameters for Stop path motion – Dynamic response tab .................................. 486 5.8.4.4 Overview of parameters for Stop path motion – Expert tab ...................................................... 486 5.8.4.5 Relevant system functions for Stop path motion....................................................................... 487 5.8.5 Continue path motion ................................................................................................................ 488 5.8.5.1 Overview of parameters: Continue path motion........................................................................ 489 5.8.5.2 Relevant system function for Continue path motion ................................................................. 489

6 Commissioning (software) ..................................................................................................................... 491 6.1 Assigning programs to a task and downloading them to the target system ............................. 491 6.1.1 assigning programs to a task .................................................................................................... 491 6.1.1.1 Execution levels and tasks in SIMOTION................................................................................. 493 6.1.1.2 Task start sequence.................................................................................................................. 495 6.1.2 downloading programs to the target system............................................................................. 496

Page 19: MC SIMOTION MCC Programming Manual

Contents

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 19

7 Error Handling and Program Test .......................................................................................................... 497 7.1 Modes for program testing .........................................................................................................497 7.1.1 Modes of the SIMOTION devices ..............................................................................................497 7.1.2 Important information about the life-sign monitoring..................................................................499 7.1.3 Life-sign monitoring parameters ................................................................................................501 7.2 Monitoring variables in the symbol browser and watch tables ..................................................502 7.2.1 Symbol browser .........................................................................................................................502 7.2.2 Watch tables ..............................................................................................................................504 7.3 Monitoring the program execution .............................................................................................506 7.3.1 Tracking program execution ......................................................................................................506 7.3.2 Tracking single program steps...................................................................................................506 7.4 Program status...........................................................................................................................508 7.5 Program run ...............................................................................................................................510 7.5.1 Program run: Display code location and call path .....................................................................510 7.5.2 Parameter call stack program run..............................................................................................511 7.5.3 Program run toolbar ...................................................................................................................511 7.6 Trace ..........................................................................................................................................512 7.6.1 Activate trace .............................................................................................................................512 7.7 Breakpoints ................................................................................................................................515 7.7.1 General procedure for setting breakpoints ................................................................................515 7.7.2 Setting the debug mode.............................................................................................................516 7.7.3 Define the debug task group......................................................................................................517 7.7.4 Setting breakpoints ....................................................................................................................519 7.7.5 Breakpoints toolbar ....................................................................................................................521 7.7.6 Defining the call path for a single breakpoint.............................................................................522 7.7.7 Defining the call path for all breakpoints....................................................................................524 7.7.8 Activating breakpoints................................................................................................................526 7.7.9 Display call stack .......................................................................................................................528

A Appendix................................................................................................................................................ 529 A.1 Basics of LAD/FBD/Formula for MCC .......................................................................................529 A.1.1 Ladder logic (LAD) for MCC.......................................................................................................529 A.1.2 Function block diagram (FBD) for MCC.....................................................................................534 A.1.3 Formula for MCC .......................................................................................................................538 A.2 Key combinations.......................................................................................................................540

Index...................................................................................................................................................... 543

Page 20: MC SIMOTION MCC Programming Manual
Page 21: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 21

Description 11.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 source file is comprised of several MCC charts.

Figure 1-1 MCC for automating production machines

Page 22: MC SIMOTION MCC Programming Manual

Description 1.3 Principles of programming

SIMOTION MCC Motion Control Chart 22 Programming and Operating Manual, 08/2008

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 reaction to interrupts. ● 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.

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.

Page 23: MC SIMOTION MCC Programming Manual

Description 1.4 Procedure for programming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 23

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.

Figure 1-2 MCC chart for example task

① 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

Page 24: MC SIMOTION MCC Programming Manual

Description 1.4 Procedure for programming

SIMOTION MCC Motion Control Chart 24 Programming and Operating Manual, 08/2008

Page 25: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 25

Software interface 22.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

Page 26: MC SIMOTION MCC Programming Manual

Software interface 2.2 Representation of MCC chart and MCC source file in Workbench

SIMOTION MCC Motion Control Chart 26 Programming and Operating Manual, 08/2008

Figure 2-1 Workbench view

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. 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.

Page 27: MC SIMOTION MCC Programming Manual

Software interface 2.2 Representation of MCC chart and MCC source file in Workbench

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 27

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

Page 28: MC SIMOTION MCC Programming Manual

Software interface 2.3 Operator input options

SIMOTION MCC Motion Control Chart 28 Programming and Operating Manual, 08/2008

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)).

Keystroke combination 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 540). The online help system is called up with the keystroke combination Shift+F1 or F1.

Page 29: MC SIMOTION MCC Programming Manual

Software interface 2.3 Operator input options

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 29

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.

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

Page 30: MC SIMOTION MCC Programming Manual

Software interface 2.4 Settings for the MCC editor

SIMOTION MCC Motion Control Chart 30 Programming and Operating Manual, 08/2008

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 check box is selected, the declaration table contains only function blocks

that are defined in the same MCC source file or in linked source files or libraries. – When the check box is cleared, the declaration table contains all function blocks

defined in the project.

Figure 2-3 Settings for the MCC editor

Page 31: MC SIMOTION MCC Programming Manual

Software interface 2.5 Calling up the online help

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 31

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

Page 32: MC SIMOTION MCC Programming Manual
Page 33: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 33

MCC Source Files and MCC Charts 3This chapter describes how to create and work with an MCC source file containing MCC charts.

3.1 General MCC source files are assigned to the SIMOTION device on which they 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 programming units (program, function, function block) in an MCC source file. They are stored under the MCC source file in the project navigator.

Note ST source files and LAD/FBD programs 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.

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 source file

element ● via the menu Insert -> Program -> MCC Source File ● via the context menu Insert new object -> MCC program source ● Using the Insert MCC source file button on the MCC source file toolbar

Page 34: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart 34 Programming and Operating Manual, 08/2008

Proceed as follows 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. Select the Insert new object > MCC program source file command on the context menu. 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 43)).

5. You can also enter an author, version, and a comment. 6. Click OK to confirm.

NOTICE

When you click OK, the MCC source file will only be transferred to the project. The data are not saved to disk, together with the project, unless you select Project > Save or Project > Save and compile all.

Page 35: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 35

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)

Page 36: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart 36 Programming and Operating Manual, 08/2008

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 48)). The Transfer and compile command transfers the changes in the MCC source file and associated MCC charts to the project only. The data are not saved to disk, together with the project, unless you select Project > Save or Project > Save and compile all.

Page 37: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 37

You can also save (export) an MCC source file outside the project (see Exporting and importing an MCC source file (Page 39)). 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:

Figure 3-3 MCC source file toolbar

① Insert an MCC source file ③ Insert MCC chart ② Accept and compile

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.

Page 38: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart 38 Programming and Operating Manual, 08/2008

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

Proceed as follows 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 source file is pasted (with a different name, if necessary). 3. Change the name, if necessary (see Renaming MCC source files (Page 41)).

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. For procedures on how to set up know-how protection, refer to the SIMOTION online help.

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

Page 39: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 39

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 39) Exporting an MCC source file in XML format (Page 40) Importing an MCC source file from XML data (Page 40)

3.2.8.1 Exporting an MCC source file as an ST source file

Proceed as follows 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 source file in the project navigator. 2. In the context menu, select Export > As ST. 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 source files cannot be exported as plain text files (as an ST source file). However, they can still be exported in XML format.

Page 40: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart 40 Programming and Operating Manual, 08/2008

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

Proceed as follows This operation allows you to import MCC source files that were exported as encoded files in XML format. 1. If applicable, insert a new MCC source file (see Inserting a new MCC source

file (Page 33)). 2. Select the MCC source file in the project navigator. 3. In the context menu, select Expert > Import Object. 4. Select the XML data to be imported. The imported XML data overwrite the existing data in the selected MCC source file. The entire project is saved and recompiled.

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

Page 41: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 41

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.

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 43)). These functions facilitate debugging of your program.

Page 42: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart 42 Programming and Operating Manual, 08/2008

3.2.9.3 Configuring compiler settings You can configure the compiler settings as follows: ● globally for the SIMOTION project, all programming languages applicable, see Global

compiler settings (Page 42) ● locally for an individual MCC source within the SIMOTION project, see Local compiler

settings (Page 43)

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

Page 43: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 43

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 source file (see Properties of an MCC

source (Page 41)). 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

Page 44: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.2 Inserting and managing MCC source files

SIMOTION MCC Motion Control Chart 44 Programming and Operating Manual, 08/2008

Table 3-1 Local compiler settings

Parameter Description Ignore global settings Affects:

• Warning classes • Selective linking • Use preprocessor • Enable program status • Permit language extensions • Only create program instance data once Active: Only the selected local settings apply. The global settings are ignored. Inactive: The respective global setting (Options > Settings > Compiler menu command) can be accepted. The corresponding checkbox is grayed out.

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 class selection.

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.

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 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 Status Program (Page 508)). 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. 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).

Page 45: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 45

Parameter Description Only create program instance data once1

Active: The local variables of a program are only stored once in the user memory of the unit. The setting is required when a further program is to be called within a program. 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 for Ignore global settings = inactive). See Memory ranges of the variable types.

Enable OPC-XML Symbol information for the unit variables of the ST source file interface section are available in the SIMOTION device (required for the _exportUnitDataSet and _importUnitDataSet functions; see the SIMOTION Basic Functions Function Manual).

Permit single step 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 506).

1 Global setting is also possible (Options > Settings > Compiler menu), see Global Compiler Settings (Page 42).

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 source file in any of the following ways: ● In the project navigator: below an MCC source file using the Insert MCC chart command ● Using the Insert > Program > MCC chart menu command ● In the context menu using the Insert new object > MCC chart command ● In the MCC editor toolbar using Insert MCC chart

Proceed as follows To insert a new MCC chart using the context menu, proceed as follows: 1. The MCC source file must already exist. 2. Select the relevant MCC source file in the project navigator. 3. In the context menu, select Insert new object > MCC chart. 4. Enter the name of the MCC chart (see Rules for identifiers in Keywords for variable

types (Page 100)). 5. For creation type, select Program. For creation types Function and Function block, see

Subroutine (Page 133). 6. Enable the Exportable check box 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.

Page 46: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart 46 Programming and Operating Manual, 08/2008

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 are not saved to disk, together with the project, unless you select Project > Save or Project > Save and compile all.

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

Page 47: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 47

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 36)).

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).

Page 48: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart 48 Programming and Operating Manual, 08/2008

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 51)).

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.

Page 49: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 49

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.

Proceed as follows 1. Select the MCC chart 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 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.

Proceed as follows 1. Insert a new MCC chart, if necessary (Inserting a new MCC chart (Page 45)). 2. Select the MCC chart in the project navigator. 3. In the context menu, select Expert > Import Object. 4. Select the XML data to be imported. The imported XML data overwrite the existing data in the selected MCC chart. The entire project is saved and recompiled.

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

Page 50: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart 50 Programming and Operating Manual, 08/2008

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.

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

Page 51: MC SIMOTION MCC Programming Manual

MCC Source Files and MCC Charts 3.3 Inserting and managing MCC charts

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 51

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. Click OK to confirm.

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 491)). When the check box is cleared, the MCC chart can only be used in the associated MCC source file.

3. Click OK to confirm.

Page 52: MC SIMOTION MCC Programming Manual
Page 53: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 53

Programming in MCC 44.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.

Page 54: MC SIMOTION MCC Programming Manual

Programming in MCC 4.2 Principles of programming

SIMOTION MCC Motion Control Chart 54 Programming and Operating Manual, 08/2008

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.

Figure 4-1 Example of programming principles

① 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.

Page 55: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 55

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.

Figure 4-2 MCC editor toolbar

① Insert MCC chart ⑨ Program structures ② 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 ⑭ Important commands ⑦ Basic commands ⑮ Commands for path interpolation ⑧ Task commands ⑯ Command groups

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.

Page 56: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart 56 Programming and Operating Manual, 08/2008

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

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

Page 57: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 57

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.

Figure 4-5 Representation of a motion command in the MCC chart

① Breakpoint ⑤ Marking:

Command has not been parameterized yet or has been assigned incorrect parameters

② Name of the technology object, e.g., axis name

⑥ Positioning the symbol

③ Marking: Command comment present

⑦ Brief comment

④ Serial numbers for the command

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

Page 58: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart 58 Programming and Operating Manual, 08/2008

Command comment You can enter an additional comment for each command: ● On the shortcut menu, select Insert 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 192)).

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.

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.

Page 59: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 59

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.

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.

Page 60: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart 60 Programming and Operating Manual, 08/2008

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 133)).

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

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:

Figure 4-6 Combining existing commands to create a module

Page 61: MC SIMOTION MCC Programming Manual

Programming in MCC 4.3 Managing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 61

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.

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 and create new ones.

Page 62: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 62 Programming and Operating Manual, 08/2008

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.

Page 63: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 63

Figure 4-8 Parameter screen form for a motion command

① Register ⑥ Apply the parameter assignment and

close the screen form ② Transition behavior and step enabling

condition ⑦ Editable selection list

③ Online help ⑧ Selection list (combo box) ④ Apply the parameter assignment ⑨ Input field ⑤ Close the screen form (discard the

parameter assignment)

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 76)) ● Entries you have already made in the parameter screen form Read the note about the

table in Selection list (combo box) (Page 64).

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 153)).

Page 64: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 64 Programming and Operating Manual, 08/2008

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 159)).

● 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 161)).

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 67)) ● 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 171). The description of the system function contains a list of the enumeration elements for the respective enumeration data type, see List Manual, Technology Packages, System Functions. 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.

Page 65: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 65

Table 4-1 Frequently selected options in combo boxes

Selectable options Significance Default 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 315) 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.

Page 66: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 66 Programming and Operating Manual, 08/2008

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 64)). 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 67)

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.

Page 67: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 67

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. Configuration data from the technology object is used which influences the design and/or selection options in the parameter screen form. Through the assignment of a technology object, the TO properties values shown in the "TO properties" list in the "Expert" tab are fixed entries in the parameter screen form and cannot be changed in the parameter screen form.

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 76) 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.

Page 68: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 68 Programming and Operating Manual, 08/2008

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 76) tab in order to select the "Absolute encoder adjustment" or "Absolute encoder calibration with specification of the position value" homing types.

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 98)). 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.

Page 69: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 69

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

Page 70: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 70 Programming and Operating Manual, 08/2008

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 76) tab.

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 98)). This means that a "cam"-type technology object can be assigned to the variable during the program runtime.

Page 71: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 71

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

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.

Page 72: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 72 Programming and Operating Manual, 08/2008

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

Page 73: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 73

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-15 Dynamics tab for motion commands

Overview of parameters for

Table 4-2 Overview of parameters for Dynamics tab

Field/Button Explanation/instructions 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 380)), 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 64) The system variable for the preassigned value is given together with the description of each command.

Page 74: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 74 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Acceleration The acceleration value during the constant acceleration phase.

Enter the value in the editable selection list. Preassigned value Last programmed See Selection list (combo box) (Page 64) 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.

The system variable for the preassigned value is given together with the description of each command.

Deceleration Deceleration value during the constant deceleration phase Enter the value in the editable selection list. Preassigned value Last programmed See Selection list (combo box) (Page 64) 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.

The system variable for the preassigned value is given together with the description of each command.

Page 75: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 75

Field/Button Explanation/instructions 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 64) 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. Preassigned value Last programmed velocity Current See Selection list (combo box) (Page 64) The system variable for the preassigned value is given together with the description of each command.

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 64) 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 64)). Preassigned value Last programmed See Selection list (combo box) (Page 64) System variable for preassigned value: userDefaultDynamics.stopTime

Page 76: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 76 Programming and Operating Manual, 08/2008

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 dialog box. ● You can define the variable to which the return value is written (return variable).

Figure 4-16 Expert tab for motion commands

Page 77: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 77

Overview of parameters for

Table 4-3 Overview of parameters for Expert tab

Field/Button Explanation/instructions 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. If you have selected a technology object-type variable (see Description of the technology object data types (Page 98)) 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. 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 82) and return values (Page 82)

Page 78: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 78 Programming and Operating Manual, 08/2008

Table 4-4 TO properties list

Field/Button Explanation/instructions 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 380)

Page 79: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 79

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 command

The programmed motion is attached to the active 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.

Page 80: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 80 Programming and Operating Manual, 08/2008

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 (Page 171) in the "Overview of parameters" under the relevant MCC command). The table shows the step enabling conditions to the subsequent command (thin line = programmed command, thick line = subsequent command):

Wait for ... Graph Description Motion start The next command is started when the 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 phase

The next command is started when the deceleration phase for the active motion begins.

End of setpoint interpolation

The next command is started when setpoint interpolation for the active motion has ended.

Motion is finished Axis stopped

The next command is started when the active motion has been completed (e.g., the minimum dwell time of the actual value in the configured position window around the target position has elapsed).

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 175).

Page 81: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 81

4.4.6.3 Example of transition behavior and step enabling condition

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

Note The status of a motion command can be queried using the CommandID variable. 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.

Page 82: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 82 Programming and Operating Manual, 08/2008

ST commands can be programmed using the System Function Call (System Function Call (Page 181)) or ST Zoom (ST Zoom (Page 184)) 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.

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 76)) ● 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).

Page 83: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 83

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 Significance 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 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

Page 84: MC SIMOTION MCC Programming Manual

Programming in MCC 4.4 Processing MCC commands

SIMOTION MCC Motion Control Chart 84 Programming and Operating Manual, 08/2008

Error code Significance 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 with non-synchronous operation 41 This command can be executed when gearing 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. ≥10000 Internal error.

Page 85: MC SIMOTION MCC Programming Manual

Programming in MCC 4.5 General information about variables and data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 85

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 Significance System variables of the SIMOTION device System variables of technology objects

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

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, these variables are also available in other units (e.g., MCC source files, 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.

Page 86: MC SIMOTION MCC Programming Manual

Programming in MCC 4.5 General information about variables and data types

SIMOTION MCC Motion Control Chart 86 Programming and Operating Manual, 08/2008

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 (program variable)

Variable is declared in a program. The variable can only be accessed within this program. A 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 (FC variable)

Variable is declared in a function (FC). The variable can only be accessed within this 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 (FB variable)

Variable is declared in a function (FB). The variable can only be accessed within this 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.

Page 87: MC SIMOTION MCC Programming Manual

Programming in MCC 4.5 General information about variables and data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 87

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

• I/O variables The declared variables are valid in all units (e.g., ST 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 • Data types • Symbolic accesses to the fixed

process image of the BackgroundTask

The declared variables, data types, etc., are valid in the entire unit (e.g., ST source file, MCC source file, LAD/FBD source file); all programs, function blocks, and functions within the unit can access them. In addition, they are also available in other units after connection.

Implementation section of the unit1

• Unit variables • Data types • Symbolic accesses to the fixed

process image of the BackgroundTask

The declared variables, data types, etc., are valid in the entire unit (e.g., ST source file, MCC source file, LAD/FBD source file); all programs, function blocks, and functions within the source file can access them.

POU (program/ function block/ function)2

• Local variables • Data types • Symbolic accesses to the fixed

process image of the BackgroundTask

The declared variables, data types, etc., can only be accessed within the POU in which they were declared.

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).

Page 88: MC SIMOTION MCC Programming Manual

Programming in MCC 4.5 General information about variables and data types

SIMOTION MCC Motion Control Chart 88 Programming and Operating Manual, 08/2008

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-18 Definition of the length of an array

Example of use of array elements in a variable assignment

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

Page 89: MC SIMOTION MCC Programming Manual

Programming in MCC 4.5 General information about variables and data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 89

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), 10(99),3(7),2(1)

5 array elements [0..4] are preset to the same value "3". 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-20 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.

Page 90: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart 90 Programming and Operating Manual, 08/2008

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

Page 91: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 91

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 use 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 integer

UDINT 32 0 to 4_294_96_7295 (0 to 2**32-1)

Floating-point number (per IEEE -754)

REAL 32 -3.402_823_466E+38 to -1.175_494_351E−38, 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 number (in accordance with IEEE-754)

LREAL 64 -1.797_693_134_862_315_8E+308 to -2.225_073_858_507_201_4E−308, 0.0, +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.

Page 92: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart 92 Programming and Operating Manual, 08/2008

Type Reserv. word Bit width Range of values Time types These data types are used to represent various date and time values.

Duration in increments of 1 ms

TIME 32 T#0d_0h_0m_0s_0ms to T#49d_17h_2m_47s_295ms 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 day

DATE 32 D#1992-01-01 to D#2200-12-31 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 1 ms

TIME_OF_DAY (TOD)

32 TOD#0:0:0.0 to TOD#23:59:59.999 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_TIME (DT)

64 DT#1992-01-01-0:0:0.0 to DT#2200-12-31-23:59:59.999 DATE_AND_TIME consists of the data types DATE and 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

byte/character STRING 8 All characters with ASCII code $00 to $FF are permitted.

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.

See also Value range limits of elementary data types (Page 93) General data types (Page 94) Elementary system data types (Page 95)

Page 93: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 93

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#80SINT#MAX SINT 127 16#7FINT#MIN INT -32768 16#8000INT#MAX INT 32767 16#7FFFDINT#MIN DINT -2147483648 16#8000_0000DINT#MAX DINT 2147483647 16#7FFF_FFFFUSINT#MIN USINT 0 16#00USINT#MAX USINT 255 16#FFUINT#MIN UINT 0 16#0000UINT#MAX UINT 65535 16#FFFFUDINT#MIN UDINT 0 16#0000_0000UDINT#MAX UDINT 4294967295 16#FFFF_FFFFT#MIN TIME#MIN

TIME T#0ms 16#0000_00001

T#MAX TIME#MAX

TIME T#49d_17h_2m_47s_295ms 16#FFFF_FFFF1

TOD#MIN TIME_OF_DAY#MIN

TOD TOD#00:00:00.000 16#0000_00001

TOD#MAX TIME_OF_DAY#MAX

TOD TOD#23:59:59.999 16#0526_5BFF1

1 Internal display only

Page 94: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart 94 Programming and Operating Manual, 08/2008

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).

Page 95: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 95

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.

Page 96: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart 96 Programming and Operating Manual, 08/2008

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, 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.

Page 97: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 97

4.6.3.4 Defining enumerations You define enumerations in the declaration tables of the source file or the program/chart. The scope (Page 96) 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 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-21 Definition of an enumeration data type

Page 98: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart 98 Programming and Operating Manual, 08/2008

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, to which every TO can be assigned

ANYOBJECT

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

Page 99: MC SIMOTION MCC Programming Manual

Programming in MCC 4.6 Data types

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 99

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)

Page 100: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 100 Programming and Operating Manual, 08/2008

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.

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.

FB, FC, program

VAR_GLOBAL RETAIN Retentive unit variable; retained during power outage. FB, FC, programVAR_GLOBAL CONSTANT Unit constant; cannot be changed from the program. FB, FC, programLocal user variables (declared within a POU2) VAR Local variable FB, FC, programVAR_TEMP Temporary local variable FB, program VAR_INPUT Input parameters: Local variable; value is supplied from external source

and can only be read in the MCC chart. FB, FC

VAR_OUTPUT Output parameters: Local variable; value is sent to an external destination by the FB. It can be read as an instance variable after being called by the FB (FB instance name.variable name).

FB

VAR_IN_OUT In/out parameter; the FB accesses this variable directly (by means of a reference) and can change it directly.

FB

VAR CONSTANT Local constant; cannot be changed from the program. FB, FC, program1 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.

Page 101: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 101

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

Variable type Defined in... Global device user variables

Symbol browser

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_INOUT • Additionally for functions as VAR_INPUT

I/O variable Symbol browser Symbolic access to the fixed process image of the BackgroundTask

• Declaration table of the source file • Declaration table of the program/chart (programs and FB only)

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)

Page 102: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 102 Programming and Operating Manual, 08/2008

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)

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, 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.

Proceed as follows; the source file (declaration table) is open: 1. In the declaration table, select the section for the desired scope. 2. Then select the Parameter tab.

Page 103: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 103

3. Enter: – Name of the variable – Variable type – Data type of the variable

You can select elementary data types; other data types must be entered in the appropriate field. See also: Defining structures (Page 96) Defining enumerations (Page 97)

– Optional array length (to define the array size) See also: Array length and array element (Page 88)

– Optional initial value (initialization value See also: Initial value (Page 89)

The variable is now declared and can be used immediately.

Figure 4-22 Example: Declaring a unit variable in the MCC 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.

See also Connections to other program source files or libraries (Page 130)

Page 104: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 104 Programming and Operating Manual, 08/2008

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: 1. In the declaration table, select the Parameter/Variables tab. 2. Enter:

– Name of the variable – Type of variable – You can select elementary data types; other data types must be entered in the

appropriate field. See also: Defining structures (Page 96) Defining enumerations (Page 97)

– Optional array length (to define the array size) See also: Array length and array element (Page 88)

– Optional initial value (initialization value See also: Initial value (Page 89)

The variable is now declared and can be used immediately.

Figure 4-23 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.

Page 105: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 105

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 106) Initialization of non-retentive global variables (Page 107) Initialization of local variables (Page 108) Initialization of static program variables (Page 109) Initialization of instances of function blocks (FBs) (Page 110) Initialization of system variables of technology objects (Page 111) Version ID of global variables and their initialization during download (Page 112)

Page 106: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 106 Programming and Operating Manual, 08/2008

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.

Table 4-14 Initializing retentive global variables during download

Variable type Time of the variable initialization Retentive global device variables

The behavior when downloading depends on the Initialization of all retentive global 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 112). Retentive unit variables

The behavior when downloading depends on the Initialization of all retentive global device 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 112). 1 Default 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. 4 Several 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.

Page 107: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 107

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 106), 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; }

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

Variable type Time of the variable initialization Non-retentive global device variables

The behavior when downloading depends on the Initialization of all non-retentive global device 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 112). Non-retentive unit variables

The behavior when downloading depends on the Initialization of all non-retentive global device 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 112). 1 Default 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. 4 Several 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.

Page 108: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 108 Programming and Operating Manual, 08/2008

4.7.3.3 Initialization of local variables Local variables are initialized: ● For the initialization of retentive unit variables (Page 106). ● For the initialization of non-retentive unit variables (Page 107). ● Also, according to the following description:

Table 4-16 Initialization of local variables

Variable type Time of the variable initialization Local program variables

Local variables of programs are initialized differently: • Static variables (VAR) are initialized according to the memory area in which they are stored.

See: Initialization of static program variables (Page 109). • Temporary variables (VAR_TEMP) are initialized every time the program of the task is called.

Local variables of function blocks (FB)

Local variables of function blocks are initialized differently: • 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 110).

• Temporary variables (VAR_TEMP) are initialized every time the FB instance is called. Local variables of functions (FC)

Local variables of functions are temporary and are initialized every time the function is called.

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

Page 109: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 109

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 42) 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 are stored only once in the user memory of the task. – They are thus initialized together with the non-retentive unit variables, see Initialization

of non-retentive global variables (Page 107). – 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; }.

Page 110: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 110 Programming and Operating Manual, 08/2008

4.7.3.5 Initialization of instances of function blocks (FBs) The initialization of a function block instance (Page 143) 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 107).

● Local declaration in a program (within VAR / END_VAR): Initialization as for static variables of programs, see Initialization of static variables of programs (Page 109).

● 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 150) function.

Page 111: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 111

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 106) and Initialization of non-retentive global variables (Page 107). 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 variables

Behavior during download, depending on the Initialization of all non-retentive data for technology 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 variables

Only if a technology object was changed in SIMOTION SCOUT, will its retentive system variables be initialized. The retentive system variables of all other technology objects are retained (e.g. absolute encoder calibration).

1 Default 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.

Page 112: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart 112 Programming and Operating Manual, 08/2008

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 device variables

Non-retentive global device variables

• Separate version ID for each data segment of the global device variables.

• The version identification of the data segment changes for: – Add or remove a variable within the data segment – Change of the identifier or the data type of a variable

within the data segment • This version ID does not change on:

– Changes in the other data segment – Changes to initialization values1

• During downloading2, the rule is: Initialization of a data segment only if its version ID has changed.

• Use of the functions for data backup and initialization possible.

• Common version ID for all data segments of the global device variables.

• This version ID changes when the variable declaration is changed in a data segment.

• During downloading2, the rule is: Initialization of all data segments if the version ID changes.

• Use of the functions for data backup not possible.

Page 113: MC SIMOTION MCC Programming Manual

Programming in MCC 4.7 Variables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 113

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 variables in the interface section Retentive unit variables in the implementation section Non-retentive unit variables in the interface section

Non-retentive unit variables in the implementation section

• Several data blocks ( = declaration blocks)3 in each data segment possible.

• Own version ID for each data block. • The version identification of the data block changes for:

– Add or remove a variable in the associated declaration block

– Change of the identifier or the data type of a variable in the associated declaration block

– Change of a data type definition (from a separate or imported4 unit) used in the associated declaration block

– Add or remove declaration blocks within the same data segment before the associated declaration block

• This version ID does not change on: – Add or remove declaration blocks in other data

segments – Add or remove declaration blocks within the same

data segment after the associated declaration block – Changes in other data blocks – Changes to initialization values1 – 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.

• One data block in each data segment (also for several declaration blocks)3

• Common version ID for all global declarations in a unit.

• This version ID changes in response to the following changes: – Variable declaration in a

data segment – Declaration of global data

types in the unit – Declaration in the interface

section of an imported4 unit. • During downloading2, the rule

is: Initialization of all data segments if the version ID changes.

• Use of the functions for data backup only possible for: Non-retentive unit variables in the interface section

1 Changed initialization values are not effective until the data block or data segment in question is initialized. 2 If 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 106)" and "Initialization of non-retentive global variables (Page 107)". 3 Several 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 131). 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.

Page 114: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 114 Programming and Operating Manual, 08/2008

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 117).

● 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 117).

● 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 123).

A comparison of the most important properties is contained in "Important properties of direct access and process image (Page 115)". You can use I/O variables like any other variable, see "Access I/O variables (Page 129)".

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

Page 115: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 115

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 cyclic tasks

Access to fixed process image of the BackgroundTask

Permissible address range

Entire address range of the SIMOTION device Exception: I/O variables comprising more than one byte must not contain addresses 63 and 64 contiguously (example: PIW63 or PQD62 are not permitted). The addresses used must be present in the I/O and appropriately configured.

0 .. 63, except for the addresses used in the process image of the cyclic tasks Addresses that are not present in the I/O or have not been configured can also be used.

Assigned task None. Cyclic task for selection: • SynchronousTasks, • TimerInterruptTasks, • BackgroundTask.

BackgroundTask.

Updating • Onboard I/O of SIMOTION devices C230-2, C240, and P350: Update occurs in a cycle clock of 125 µs.

• I/O via PROFIBUS DP, PROFINET, P-Bus, and DRIVE-CLiQ as well as Onboard I/O of the D4xx SIMOTION devices: 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.

Update occurs with the assigned task: • Inputs are read before the

assigned task is started and transferred to the process input image.

• Process output image is written to the outputs after the assigned task has been completed.

An update is made with the BackgroundTask: • Inputs are read before the

BackgroundTask is started and is transferred to the process input image.

• Process output image is written to the outputs when the BackgroundTask is complete.

– During the entire cycle of the assigned task. Exception: Direct access to output occurs.

Consistency

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

During the entire cycle of the BackgroundTask. Exception: Direct access to output occurs.

Use Preferred in MotionTasks Preferred in the assigned task Preferred in the BackgroundTask

Use the absolute address

Not supported. Possible, with the following syntax: e.g. %IW62, %Q63.3.

Declaration as variable

Necessary, for the entire device as an I/O variable in the symbol browser. Syntax of I/O address: e.g. PIW1022, PQ63.3.

Possible, but not necessary: • for the entire device as an

I/O variable in the symbol browser,

• As unit variable, • As local variable in a

program.

Page 116: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 116 Programming and Operating Manual, 08/2008

Direct access Access to process image of cyclic tasks

Access to fixed process image of the BackgroundTask

Write protection for outputs

Possible; Read only status can be selected.

Not supported. Not supported.

Declaration of arrays Possible. Not supported. Further information Direct access and process image of the cyclic tasks (Page 117). Access to the fixed process

image of the BackgroundTask (Page 123).

Error during access from user program, alternative reactions available: • CPU stop1 • Substitution value • Last value

Error during generation of process image, alternative reactions available: • CPU stop2 • Substitution value • Last value

Error during generation of process image, reaction: CPU stop2. Exception: If a direct access has been created at the same address, the behavior set there applies.

Responses in the event of an error

Please refer to the SIMOTION Basic Functions function description. Access • In RUN mode Without any restrictions. Without any restrictions. Without any restrictions. • During

StartupTask Possible with restrictions: • Inputs can be read. • Outputs are not written until

StartupTask is complete.

Possible with restrictions: • Inputs are read at the start

of the StartupTask. • Outputs are not written until

StartupTask is complete.

Possible with restrictions: • Inputs are read at the start

of the StartupTask. • Outputs are not written until

StartupTask is complete. • During

ShutdownTask Without any restrictions. Possible with restrictions:

• Inputs retain status of last update

• Outputs are no longer written.

Possible with restrictions: • Inputs retain status of last

update • Outputs are no longer

written. 1 Call the ExecutionFaultTask. 2 Call the PeripheralFaultTask.

Page 117: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 117

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 123) is contained in "Important properties of direct access and process image (Page 115)".

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 120) 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 120) and assign it a task. Direct access to this I/O variable is still possible: Specify direct access with _direct.var-name.

Page 118: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 118 Programming and Operating Manual, 08/2008

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

Address range for SIMOTION Kernel version SIMOTION device V3.0 V3.1, V3.2 As of V4.0

C230-2 0 .. 1023 0 .. 2047 3 0 .. 2047 3 C240 – – 0 .. 4096 3

D410 1 – – 0 .. 16383 3 4 D4252 – 0 .. 4095 3 0 .. 16383 3 4 D435 0 .. 1023 0 .. 4095 3 0 .. 16383 3 4 D4452 – 0 .. 4095 3 0 .. 16383 3 4 P350 0 .. 1023 0 .. 2047 3 0 .. 4095 3

1 Available as of V4.1. 2 Available as of V3.2. 34 For 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 119).

Page 119: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 119

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 117). 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. Take care, for example, if you want to use an I/O variable to read the transferred PROFIBUS telegram of a 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 123). These accesses are not taken into account during the consistency check of the project (e.g. during download).

Page 120: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 120 Programming and Operating Manual, 08/2008

4.8.3.2 Creating I/O variables for direct access or process image of cyclic tasks You create I/O variables in the symbol browser 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 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 122)". – 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 123)".

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.

Page 121: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 121

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 129)".

Page 122: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 122 Programming and Operating Manual, 08/2008

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 117), 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

Syntax for Permissible address range Data type Input Output Direct access Process image e.g. direct access

D435 V4.1 BOOL PIn.x PQn.x n:

x: 0 .. MaxAddr 0 .. 7

-1 n: x:

0 .. 16383 0 .. 7

BYTE PIBn PQBn n: 0 .. MaxAddr n: 0 .. MaxAddr n: 0 .. 16383 WORD PIWn PQWn n: 0 .. 62

64 .. MaxAddr - 1 n: 0 .. 62

64 .. MaxAddr - 1 n: 0 .. 62

64 .. 16382 DWORD PIDn PQDn n: 0 .. 60

64 .. MaxAddr - 3 n: 0 .. 60

64 .. MaxAddr - 3 n: 0 .. 60

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 117)".

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 119).

Page 123: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 123

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 117). 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 122)".

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. It is preferably 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 117) is contained in "Important properties of direct access and process image (Page 115)".

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 119) 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.

Page 124: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 124 Programming and Operating Manual, 08/2008

You can access the fixed process image of the BackgroundTask by means of: ● Using an absolute PI access (Page 124): The absolute PI access identifier contains the

address of the input/output and the data type. ● Using a symbolic PI access (Page 126): 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 128): In the symbol browser, you define a valid I/O variable for the entire device that references the corresponding absolute PI access.

NOTICE Please observe that if the inputs and outputs work with the Little Endian byte order (e.g. the integrated digital inputs of the SIMOTION devices C230-2 or C240) 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 123) by directly using the identifier for the address (with implicit data type). The syntax of the identifier (Page 125) 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.

Page 125: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 125

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 124), 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 126). ● For the creation of an I/O variables for accessing the fixed process image of the

BackgroundTask (Page 128).

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

Syntax for Data type Input Output

Permissible address range

BOOL %In.x or %IXn.x1

%Qn.x or %QXn.x1

n: x :

0 .. 63 2 0 .. 7

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 119) 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.

Page 126: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 126 Programming and Operating Manual, 08/2008

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 125). – Data type of symbol (Page 127) (this must agree with the length of the process image

access).

Page 127: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 127

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 123). 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 126). ● For the creation of an I/O variable (Page 128). 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 absolute PI access

Possible data types of the 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 125)".

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

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

Page 128: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart 128 Programming and Operating Manual, 08/2008

4.8.4.6 Creating an I/O variable for access to the fixed process image of the BackgroundTask You create I/O variables in the symbol browser 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 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 125)" (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 127)".

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 129)".

Page 129: MC SIMOTION MCC Programming Manual

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

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 129

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 117). ● Access to the fixed process image of the BackgroundTask (Page 123). 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.

Page 130: MC SIMOTION MCC Programming Manual

Programming in MCC 4.9 Connections to other program source files or libraries

SIMOTION MCC Motion Control Chart 130 Programming and Operating Manual, 08/2008

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 programs 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 – 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 – User-defined data types (structures, enumerations)

Program source files and libraries must be compiled beforehand. In the declaration table of a source file, you can define connections to: 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).

Page 131: MC SIMOTION MCC Programming Manual

Programming in MCC 4.9 Connections to other program source files or libraries

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 131

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: 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.

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: 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:

To do this, enter a name under Name space.

Note When programming the Subroutine call command with a library function or a library function block, the connection to the library is automatically entered in 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.

Page 132: MC SIMOTION MCC Programming Manual

Programming in MCC 4.9 Connections to other program source files or libraries

SIMOTION MCC Motion Control Chart 132 Programming and Operating Manual, 08/2008

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. 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.

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.

Page 133: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 133

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

Figure 4-25 Execution of a subroutine

Subroutine as a function (FC) or function block (FB) The creation type of a subroutine can be a function (FC) or a function block (FB). ● 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.

Page 134: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 134 Programming and Operating Manual, 08/2008

● 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 is retained until the next call-up of this instance. They are re-initialized if the variable type of the FB type is re-initialized. 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.

Exchange of information between the subroutine and calling program Information is exchanged between the subroutine and the calling program using transfer parameters. These can be input, in/out, or output parameters. They are defined in the starting node of the subroutine: ● 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 In the case of functions, a function value can be returned; the data type of the return value can be specified when the function is inserted (created). 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 and function blocks.

See also Inserting a function (FC) or function block (FB) (Page 135) Inserting a subroutine call into the MCC chart and assigning parameters (Page 135) Example: Function (FC) (Page 138) Example: Function block (FB) (Page 142)

Page 135: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 135

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. In the context menu, select Insert new object > MCC chart.

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). ● Library functions or library function blocks from a program library.

Page 136: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 136 Programming and Operating Manual, 08/2008

Figure 4-26 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 139)

See also Overview of parameters for (Page 137)

Page 137: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 137

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

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.

Page 138: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 138 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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. 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 139) Subroutine call of function (FC) (Page 139)

Page 139: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 139

4.10.3.1 Creating and programming the function (FC) 1. In the project navigator, select the MCC source file in which you want to create the

function. 2. In the context menu, select Insert New Object > MCC chart.

– 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-27 Declaring variables (e.g., input parameters) in the MCC chart

Figure 4-28 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 45)). 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. 3. Insert the Subroutine call command. 4. Assign parameters in the parameter screen form (see figure).

Page 140: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 140 Programming and Operating Manual, 08/2008

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.

Figure 4-29 Declaring a variable in the MCC chart

① You can continue to use the myumfang (mycircum) variable in the program.

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

Page 141: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 141

Figure 4-31 Sequence of the MCC charts

① MCC chart with the function ② MCC chart containing the program with the subroutine call

Page 142: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 142 Programming and Operating Manual, 08/2008

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 142) Subroutine call of function block (FB) (Page 143) Creating a function block instance (Page 143) Programming the subroutine call of the function block (Page 144) Accessing the output parameters of the function block retrospectively (Page 146)

4.10.4.1 Creating and programming the function block (FB) 1. In the project navigator, select the MCC source file in which you want to create the

function block. 2. In the context menu, select Insert New Object > MCC chart.

– 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-32 Declaring variables (e.g., input and output parameters) in the MCC chart

Figure 4-33 Programming a variable assignment

Page 143: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 143

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 45)). 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 the variables is dependent on the declaration location.

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.

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, in other MCC 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 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.

Page 144: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 144 Programming and Operating Manual, 08/2008

Proceed as follows; the MCC source file or MCC chart with the declaration table is open: 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 87)) – 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.

4. Declare the other variables.

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

file

① 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 ④ Is displayed in the selection list as soon as the FB is saved and compiled error free.

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.

Page 145: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 145

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.

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 139)

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

Page 146: MC SIMOTION MCC Programming Manual

Programming in MCC 4.10 Subroutine

SIMOTION MCC Motion Control Chart 146 Programming and Operating Manual, 08/2008

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.

Figure 4-36 Programming a variable assignment

① Name of the FB instance ② Output parameter

Page 147: MC SIMOTION MCC Programming Manual

Programming in MCC 4.11 Reference data

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 147

4.11 Reference data The reference data provide you with an overview of: ● Utilized identifiers with information on their declaration and use

(Cross reference list) ● Function calls and their nesting

(Program structure) ● For the memory requirement of various data areas of the program sources

(code attribute)

See also Cross reference list (Page 147) Program structure (Page 150) Code attributes (Page 152)

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 type identifiers in declarations ● Used as variables in the statement section of a program organization unit You can generate the cross-reference list as required 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.

Page 148: MC SIMOTION MCC Programming Manual

Programming in MCC 4.11 Reference data

SIMOTION MCC Motion Control Chart 148 Programming and Operating Manual, 08/2008

4.11.1.2 Example: Cross-reference tab in detail view

Figure 4-37 Cross-reference tab in detail view

4.11.1.3 Content of the cross-reference list The created cross-reference list shows the following for each identifier: ● The identifier name (for structures and enumerators, also the individual components and

elements). ● The type (e.g. data type, POU type). ● The declaration location (e.g. name of the program source, name of the technology

package). ● Information about the current use of the identifier:

– Type of the use (e.g. R = read access, W = write access, variable type = declaration), – Path details of the program source (SIMOTION device, name of the program source), – Area in the program source (e.g. implementation section, POU name), – Program language of the program source, – Line number in the ST source file (or block number in the MCC chart or reference

number in the LAD/FBD source).

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.

Page 149: MC SIMOTION MCC Programming Manual

Programming in MCC 4.11 Reference data

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 149

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 ● Set filter functions (via context menu, which you can call with the right mouse button) ● Copy contents to the clipboard in order, for example, to paste them into a spread-sheet

program ● Print contents ● Open the referenced program source and position the cursor on the relevant line of the

ST command (or MCC 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.

Page 150: MC SIMOTION MCC Programming Manual

Programming in MCC 4.11 Reference data

SIMOTION MCC Motion Control Chart 150 Programming and Operating Manual, 08/2008

4.11.2 Program structure In the program structure are all 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.

4.11.2.1 Example: Program Structure tab in the detail view

Figure 4-38 Example of a program structure

Page 151: MC SIMOTION MCC Programming Manual

Programming in MCC 4.11 Reference data

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 151

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. For structure of the entries, see table:

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

Element Description Base (declared POU or task used))

List separated by a comma • Identifier of the program organization unit (POU) or task • 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 "|".

Page 152: MC SIMOTION MCC Programming Manual

Programming in MCC 4.11 Reference data

SIMOTION MCC Motion Control Chart 152 Programming and Operating Manual, 08/2008

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.

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.

Page 153: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 153

4.12 LAD/FBD/formula The creation language for a condition or variable assignment is either Ladder Diagram (LAD), Function Block Diagram (FBD), or Formula in accordance with IEC 61131-3. The language can be selected individually for the following commands: ● Variable assignment ● Wait for condition ● IF program branching ● WHILE loop with condition at start ● UNTIL loop with condition at end ● Synchronous start 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.

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.

Page 154: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart 154 Programming and Operating Manual, 08/2008

Input screen form for ladder diagram

Figure 4-39 Input screen form for ladder diagram

① Toolbar ⑤ Comparator ② Enlarge / reduce the graphical display ⑥ NC contact ③ Closing a branch ⑦ NO contact ④ Opens a branch

Page 155: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 155

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

Description

<= less than or equal to 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

Data types

LREAL 64-bit floating-point comparator, Parameter: 64-bit floating point values

Page 156: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart 156 Programming and Operating Manual, 08/2008

4.12.1.2 Opens a branch

Procedure: Opens a branch

4.12.1.3 Closing a branch

Procedure: Closing a branch

Page 157: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 157

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

Page 158: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart 158 Programming and Operating Manual, 08/2008

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

Page 159: MC SIMOTION MCC Programming Manual

Programming in MCC 4.12 LAD/FBD/formula

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 159

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

Page 160: MC SIMOTION MCC Programming Manual

Programming in MCC 4.13 Command library and system function

SIMOTION MCC Motion Control Chart 160 Programming and Operating Manual, 08/2008

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: ● Variable assignment ● Wait for condition ● System function call ● Program structures, e.g., IF, WHILE, Synchronous Start, etc.

Figure 4-40 Command library tab of the project navigator

Note System functions and operators can be moved from the command library to many programming windows using a drag-and-drop operation. The command library stays open even when the programming window is closed.

Page 161: MC SIMOTION MCC Programming Manual

Programming in MCC 4.13 Command library and system function

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 161

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-41 Inserting a command from the command library

Page 162: MC SIMOTION MCC Programming Manual

Programming in MCC 4.13 Command library and system function

SIMOTION MCC Motion Control Chart 162 Programming and Operating Manual, 08/2008

4.13.1.2 User functions and function blocks User functions and function blocks are also easily inserted into a programming window: ● Move the function from the project navigator to the entry field using a drag-and-drop

operation.

Figure 4-42 Inserting the name of a subroutine

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 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.

Page 163: MC SIMOTION MCC Programming Manual

Programming in MCC 4.13 Command library and system function

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 163

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 164)

Page 164: MC SIMOTION MCC Programming Manual

Programming in MCC 4.13 Command library and system function

SIMOTION MCC Motion Control Chart 164 Programming and Operating Manual, 08/2008

4.13.2.1 Overview of parameters for You can set the following parameters:

Overview of parameters for System function call

Field/Button Explanation/instructions 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. 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. 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 preassigned 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.

Page 165: MC SIMOTION MCC Programming Manual

Programming in MCC 4.14 MCC charts in libraries

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 165

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 source file (with specification of a name space, if necessary). 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 98)) 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.

Page 166: MC SIMOTION MCC Programming Manual

Programming in MCC 4.14 MCC charts in libraries

SIMOTION MCC Motion Control Chart 166 Programming and Operating Manual, 08/2008

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 including version (multiple selection possible)

Only those technology packages are displayed that are available for all of the selected devices. Note: 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.

Page 167: MC SIMOTION MCC Programming Manual

Programming in MCC 4.14 MCC charts in libraries

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 167

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: • MCC basic commands:

– Set output – Reset output – Wait for signal

• MCC task command: – Determine TaskId

• MCC communication commands: – Incoming message – Outgoing message

• MCC single axis command: – Set virtual axis values

• ST system functions (when used in the System function call, Variable assignment or ST Zoom MCC commands): – 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: • MCC basic commands:

– Activate trace – Change operating mode

• MCC command for program structure: – Synchronous start

• 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).

Page 168: MC SIMOTION MCC Programming Manual

Programming in MCC 4.14 MCC charts in libraries

SIMOTION MCC Motion Control Chart 168 Programming and Operating Manual, 08/2008

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 list 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: Select the library in the project navigator. Select the SIMOTION devices and the technology packages for which the library is to be compiled (Edit > Object properties menu command, TPs/TOs tab) In the context menu, select Accept and compile.

Page 169: MC SIMOTION MCC Programming Manual

Programming in MCC 4.15 Print

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 169

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 (MCC source file and MCC chart)

When this check box is selected, the declaration table of the MCC source file or the MCC chart is printed. In the Select column below, 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 (MCC chart only)

When this check box is selected, the selected MCC chart will be printed. Depending on the selected zoom factor, the printout can have multiple pages.

Printing the index page (MCC chart only)

When this check box is selected, an index page displaying the 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 pages (MCC chart only)

When this check box is selected, the number of the next page will be printed on the margin of each page of a multi-page MCC chart printout.

Page 170: MC SIMOTION MCC Programming Manual

Programming in MCC 4.15 Print

SIMOTION MCC Motion Control Chart 170 Programming and Operating Manual, 08/2008

Option Significance Zoom (MCC chart only)

Select a zoom factor for the printout of the MCC chart: 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 (MCC chart only)

If the printout of the MCC chart consists of several pages, blank 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.

Page 171: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 171

MCC commands 55.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

Page 172: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 172 Programming and Operating Manual, 08/2008

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 172) Expert tab See Overview of parameters for Wait time - Expert tab (Page 172)

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 76). 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.

Page 173: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 173

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 Pparameter Manual).

Page 174: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 174 Programming and Operating Manual, 08/2008

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 98)): 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 175)).

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 175)). • 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.

Page 175: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 175

5.1.2.2 Axis status

Axis status Technology of the axis1 System variable and value Axis moving at constant velocity

D, P, F motionStateData.motionState = CONSTANT_MOVE

Axis in motion D, P, F motionStateData.motionCommand = IN_MOTION Axis homed P, F positioningState.homed = YES Axis at standstill (default value)

D, P, F motionStateData.motionState = STANDSTILL 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.

Page 176: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 176 Programming and Operating Manual, 08/2008

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 117) (always

takes place via I/O variables) ● Accesses to the fixed process image of the background task (Page 123) (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.

Page 177: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 177

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

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.

Page 178: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 178 Programming and Operating Manual, 08/2008

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

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.

Page 179: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 179

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.

Figure 5-5 Installing and programming a new feeder

① New feeder:

Driven by axis_2 ② Conveyor belt:

Driven by axis_1

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).

Page 180: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 180 Programming and Operating Manual, 08/2008

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).

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

Page 181: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 181

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. When the command is called, the programmed function or function block is executed. Once the function or function block is executed, the MCC chart resumes after the command.

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

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. 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 MCC chart resumes after the command.

See also Using the System function call command (Page 162)

Page 182: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 182 Programming and Operating Manual, 08/2008

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

Assigned value Data type (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

Page 183: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 183

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

Assigned value Data type (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

Page 184: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 184 Programming and Operating Manual, 08/2008

5.1.10 Variable assignment

You can use this command to assign values to user or system variables.

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-9 Parameter screen form: ST zoom

Page 185: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 185

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-10 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 186) Expert tab See Overview of parameters for Activate simulation for object - Expert tab (Page 186) 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.

Page 186: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 186 Programming and Operating Manual, 08/2008

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 98))

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 76). 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

Page 187: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 187

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-11 Parameter screen form: Deactivate simulation for object

Additional information on using the command: ● Overview of parameters for Deactivate simulation for object (Page 188) ● Overview of parameters for Deactivate simulation for object - Parameters tab (Page 188) ● Overview of parameters for Deactivate simulation for object - Expert tab (Page 188) ● Relevant system functions for Deactivate simulation for object (Page 188)

Page 188: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 188 Programming and Operating Manual, 08/2008

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 188) Expert tab See Overview of parameters for Deactivate simulation for object - Expert tab (Page 188) 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 98))

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 76). 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.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

Page 189: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 189

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-12 Parameter screen form: Reset object

Additional information on using the command: ● Overview of parameters for Reset object (Page 189) ● Overview of parameters for Reset object - Parameters tab (Page 190) ● Overview of parameters for Reset object - Expert tab (Page 190) ● Relevant system functions for Reset object (Page 190)

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 190) Expert tab See Overview of parameters for Reset object - Expert tab (Page 190)

Page 190: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 190 Programming and Operating Manual, 08/2008

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 98))

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 76). 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.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

Page 191: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 191

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-13 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

5.1.15.2 Relevant system functions for Change operating mode System function of SIMOTION device: _changeOperationMode

Page 192: MC SIMOTION MCC Programming Manual

MCC commands 5.1 Basic commands

SIMOTION MCC Motion Control Chart 192 Programming and Operating Manual, 08/2008

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.

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-14 Parameter screen form: Comment block

Page 193: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 193

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-15 Parameter screen form: Start task

Note This command may only be programmed for MotionTasks.

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).

Page 194: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart 194 Programming and Operating Manual, 08/2008

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.

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.

Page 195: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 195

● 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: Interrupt task

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

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.

Page 196: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart 196 Programming and Operating Manual, 08/2008

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-17 Parameter screen form: Continue task

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

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

Page 197: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 197

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.

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-18 Parameter screen form: Reset task

Note This command may only be programmed for MotionTasks.

Page 198: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart 198 Programming and Operating Manual, 08/2008

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.

Page 199: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 199

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-19 Parameter screen form: Task status

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

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.

Page 200: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart 200 Programming and Operating Manual, 08/2008

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.

Figure 5-20 Example of a query whether a MotionTask can be 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.

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)

Page 201: MC SIMOTION MCC Programming Manual

MCC commands 5.2 Task commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 201

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-21 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.

Page 202: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 202 Programming and Operating Manual, 08/2008

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.

Figure 5-22 Example of a branch (IF) in a flowchart

① Depending on the "flag" variables, either the linear axis or the rotatory axis are started. ② Condition is not fulfilled. ③ Condition is fulfilled.

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

Page 203: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 203

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.

Figure 5-23 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

Page 204: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 204 Programming and Operating Manual, 08/2008

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

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

① Condition is fulfilled ② Condition is not fulfilled

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

Page 205: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 205

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-25 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.

Page 206: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 206 Programming and Operating Manual, 08/2008

Example of a FOR loop in a program

Figure 5-26 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-27 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

Page 207: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 207

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

Figure 5-28 Example of repetition with query at the end (UNTIL) in the flowchart

① Condition is not fulfilled ② Condition is fulfilled

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

Page 208: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 208 Programming and Operating Manual, 08/2008

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

Figure 5-29 Description of the variable and ELSE branches

① Comparison value corresponds to one of the programmed constants ② Comparison value does not correspond to any of the programmed constants

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.

Page 209: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 209

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.

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

Page 210: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 210 Programming and Operating Manual, 08/2008

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-30 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 211) command.

5.3.6.2 Relevant commands of the ST (Structured Text) programming language for Go to: GOTO

Page 211: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 211

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-31 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 210) command.

5.3.7.2 Relevant commands of the ST (Structured Text) programming language for Selection: Definition of a jump label

Page 212: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 212 Programming and Operating Manual, 08/2008

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

Figure 5-32 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.

5.3.8.1 Relevant commands of the ST (Structured Text) programming language for Return: RETURN

Page 213: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 213

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

Figure 5-33 Example of Exit

① The variable assignment is executed after the execution of the Exit command and the regular

end of the FOR loop.

5.3.9.1 Relevant commands of the ST (Structured Text) programming language for Exit: EXIT

Page 214: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 214 Programming and Operating Manual, 08/2008

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.

Page 215: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 215

Example: Synchronous start of three commands

Figure 5-34 Synchronous start of three commands

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.

Page 216: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 216 Programming and Operating Manual, 08/2008

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.

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.

Page 217: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 217

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

Timing for proper completion of command Permissible 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:

End of setpoint interpolation • Without time specification:

Infinite

• With time specification: Motion is finished

• Without time specification: Infinite

Speed preset • With time specification: End of setpoint interpolation

• Without time specification: Infinite

• With time specification: Standstill signal of axis

• Without time specification: 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

Commands for synchronous operation and camming Gearing on Infinite Infinite Gearing off End of setpoint interpolation End of setpoint interpolation Cam on • Cyclic cam

Infinite • Non-cyclic cam

End of setpoint interpolation

• Cyclic cam Infinite

• Non-cyclic cam End of setpoint interpolation

Cam off End of setpoint interpolation End of setpoint interpolation

Page 218: MC SIMOTION MCC Programming Manual

MCC commands 5.3 Program structures

SIMOTION MCC Motion Control Chart 218 Programming and Operating Manual, 08/2008

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.

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

Page 219: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 219

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-35 Parameter screen form: Acknowledge technology object alarms

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 220) Expert tab See Overview of parameters for Acknowledge TO alarms - Expert tab (Page 220)

Page 220: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 220 Programming and Operating Manual, 08/2008

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.

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

Page 221: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 221

● 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.

5.4.2 Acknowledge specific technology object alarm

The command acknowledges all alarms or a specific alarm at a technology object.

Figure 5-36 Parameter screen form: Acknowledge specific technology object alarm

Page 222: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 222 Programming and Operating Manual, 08/2008

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 222) Expert tab See Overview of parameters for Acknowledge specific TO alarm - Expert tab (Page 222)

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.

Page 223: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 223

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

Page 224: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 224 Programming and Operating Manual, 08/2008

5.4.3 Incoming message

This command notifies configured nodes that a message has arrived. Messages are configured beforehand in the message configuration (Target system > Message configuration 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 present, then there is no change. The message is not set again.

Figure 5-37 Parameter screen form: Incoming message

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 225) Expert tab See Overview of parameters for Incoming message - Expert tab (Page 225)

Page 225: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 225

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.

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

Page 226: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 226 Programming and Operating Manual, 08/2008

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 (Target system > Message configuration menu command). Acknowledgeable messages can then be acknowledged on the OP. See the online help for information about message configuration.

Figure 5-38 Parameter screen form: Outgoing message

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 227) Expert tab See Overview of parameters for Outgoing message - Expert tab (Page 227)

Page 227: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 227

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.

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

Page 228: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 228 Programming and Operating Manual, 08/2008

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.

Figure 5-39 Parameter screen form: Establish connection using TCP/IP

Page 229: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 229

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 clientDelay 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 connection requests

Here, you enter the maximum number of parallel 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.

Page 230: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 230 Programming and Operating Manual, 08/2008

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

Error code < 16#8000: if command execution is okay >= 16#8000: if an error has occurred See description for _tcpOpenServer command in the list manuals for the SIMOTION devices.

connectionId (DINT)

New connection ID

clientAddress (ARRAY [0..3] OF USINT)

IP address of the connecting client

clientPort (UINT)

Port number of the connecting client

Table 5-46 Structure of the return value (TYPE StructRetTcpOpenClient)

Parameter (data type) Meaning/values Values functionResult (DINT)

Error code < 16#8000: if command execution is okay >= 16#8000: if an error has occurred See description for _tcpOpenClient command in the list manuals for the SIMOTION devices.

connectionId (DINT)

New connection ID

Page 231: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 231

5.4.6 Remove connection using TCP/IP

This command is used to cancel a TCP/IP connection.

Figure 5-40 Parameter screen form: Remove connection using TCP/IP

5.4.6.1 Overview of parameters for Remove connection using TCP/IP You can set the following parameters:

Page 232: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 232 Programming and Operating Manual, 08/2008

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 closed.

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 _tcpCloseServer and _tcpCloseConnection functions in the list manuals for the SIMOTION devices.

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.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.

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 useful data length is dependent on the communications partner.

Page 233: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 233

● UDP protocol The connection is established via Ethernet with the UDP protocol. SIMOTION devices can send a maximum of 1400 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 send a maximum of 4096 bytes in one unit; the actual useful data length is dependent on the communications partner.

Figure 5-41 Parameter screen form: Send data

Page 234: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 234 Programming and Operating Manual, 08/2008

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 235) for Protocol = Xsend/XReceive

• For Protocol = UDP See Table Overview of parameters for Send data - Parameter tab (Page 235) for Protocol = UDP

• For Protocol = TCP/IP See Table Overview of parameters for Send data - Parameter tab (Page 235) for Protocol = TCP/IP

Expert tab see Overview of parameters for Send data - Expert tab (Page 236) 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.

Page 235: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 235

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/instructions 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 CPU

This selection is only active if Select device from hardware configuration is selected in the "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 communications partner

This selection is active only if Specify address directly is active in the "Communications 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.

Page 236: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 236 Programming and Operating Manual, 08/2008

Table 5-50 Overview of parameters for Send data - Parameter tab for Protocol = UDP

Field/Button Explanation/instructions 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 1400 values. The data type must be BYTE; furthermore, variables of type BYTE can be entered.

Table 5-51 Overview of parameters for Send data – Parameter tab for Protocol = TCP/IP

Field/Button Explanation/instructions 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.

Page 237: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 237

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 C230-2, C240: 1 for X8

2 for X9 P350: 1 for X101

2 for X102 D410 1 for X21

deviceId (USINT)

Point of the connection

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

number) of destination system. 1 for MPI, PROFIBUS

nextStaddrLength (USINT)

Length of the router address 0 for MPI, PROFIBUS

remoteSubnetId (ARRAY [0..5] OF USINT)

Subnet mask (irrelevant for MPI, PROFIBUS)

remoteStaddr (ARRAY [0..5] OF USINT)

Station address of target system (actual target address)

Station number for MPI, PROFIBUS: e.g.: remoteStaddr[0] = 25

nextStaddr (ARRAY [0..5] OF USINT)

Router address (irrelevant for MPI, PROFIBUS)

Page 238: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 238 Programming and Operating Manual, 08/2008

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 Send data command

Parameters of the _XSend system function

Log - Delay program execution nextCommand Parameters tab Job identifier messageld Return variable - Communications partner - Device - Connection of transmitting CPU - Destination address of communications partner address Continue connection communicationmode Back up 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 Send data command

Parameters of the _tcpSend system function

Log - Delay program execution nextCommand Parameters tab Connection ID connectionId Back up dataLength, data Expert tab Return variable -

Page 239: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 239

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 Send data command

Parameters of the _udpSend system function

Log - Delay program execution nextCommand Parameters tab PortNumber of sender sourcePort IP address of receiver destinationAddress Port number of receiver destinationPort Back up dataLength, data Expert tab Return variable -

Page 240: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 240 Programming and Operating Manual, 08/2008

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 1400 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.

Figure 5-42 Parameter screen form: Receive data

Page 241: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 241

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 242) for Protocol = XSend/XReceive

• For Protocol = UDP See Table Overview of parameters for Receive data - Parameter tab (Page 242) for Protocol = UDP

• For Protocol = TCP/IP See Table Overview of parameters for Receive data - Parameter tab (Page 242) for Protocol = TCP/IP

Expert tab See Overview of parameters for Receive data - Expert tab (Page 243) 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 79)

Page 242: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 242 Programming and Operating Manual, 08/2008

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/instructions 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/instructions 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..1399] 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/instructions 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.

Page 243: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 243

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 Receive data command

Parameters of the _XReceive system function

Log - Delay program execution nextCommand Parameters tab Job identifier messageld Return variable - Expert tab CommandID variable commandId

Page 244: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart 244 Programming and Operating Manual, 08/2008

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 Receive data command

Parameters of the _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 Receive data command

Parameters of the _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.

Page 245: MC SIMOTION MCC Programming Manual

MCC commands 5.4 Communication

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 245

Table 5-65 Structure of return value (TYPE StructRetXReceive)

Parameter (data type) Meaning/values Values functionResult (DINT)

Error code < 16#8000: if command execution is okay >= 16#8000: if an error has occurred See description for _Xreceive command in the list manuals for the SIMOTION devices.

dataLength (UDINT)

Length of received data packet

data (ARRAY [0..199] OF BYTE)

Received data

Table 5-66 Structure of the return value (TYPE StructRetUdpReceive)

Parameter (data type) Meaning/values Values functionResult (DINT)

Error code < 16#8000: if command execution is okay >= 16#8000: if an error has occurred See description for the _udpReceive command in the parameter manuals for the SIMOTION devices.

sourceAddress (ARRAY [0..3] OF USINT)

IP address of transmitter

sourcePort (UINT)

Port number of transmitter

dataLength (UDINT)

Length of received data packet

Table 5-67 Structure of the return value (TYPE StructRetTcpReceive)

Parameter (data type) Meaning/values Values functionResult (DINT)

Error code < 16#8000: if command execution is okay >= 16#8000: if an error has occurred See description for the _tcpReceive command in the parameter manuals for the SIMOTION devices.

dataLength (UDINT)

Length of received data packet

Page 246: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 246 Programming and Operating Manual, 08/2008

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-43 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 4. Follow-up operation cancelled

Page 247: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 247

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 Positioning axis Synchronous 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.

5.5.1.1 Overview of parameters for Switch axis enable

Table 5-69 Overview of parameters for Switch 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 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 98)) driveAxis, posAxis or followingAxis.

Parameter tab See Overview of parameters for Switch axis enable – Parameter tab (Page 248) Expert tab See Overview of parameters for Switch axis enable – Expert tab (Page 249) 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.

Page 248: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 248 Programming and Operating Manual, 08/2008

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 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 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. Current status of position controller enable for a real axis: System variable: servoMonitorings.controlState.

Switch enables individually according to PROFIdrive profiles

Select the check box if you want to be able to switch enables individually in accordance with the PROFIdrive profile. If the check box is selected: • 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.

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.

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.

Page 249: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 249

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 Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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 the system functions of the technology packages (Page 83).

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 STW1

MCC command 'Switch axis enable' MCC command 'Remove axis enable'

MCC command 'Switch axis enable' / 'Remove axis enable'

Check box selected Enable assigned - the corresponding bit of the control word is set to 1

Check box selected Remove enable - the corresponding bit of the control word is set to 0

Check box cleared the previous setting is retained - the corresponding bit of the control word remains unchanged

0 ON Brakes on the ramp-function generator (OFF1)

Retain

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

generator Disable ramp-function generator Retain

5 Do not freeze ramp-function generator

Freeze ramp-function generator Retain

6 Enable setpoint Disable setpoint Retain

Page 250: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 250 Programming and Operating Manual, 08/2008

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 Switch axis enable command

Parameters of the _enableAxis system function

Axis axis Delay program execution nextCommand Parameters 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 Set pressure controller enable forcecontrolMode Expert tab CommandID variable commandId Return variable –

Page 251: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 251

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-44 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 246)).

Page 252: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 252 Programming and Operating Manual, 08/2008

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 252)).

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 98)): driveAxis, posAxis, or followingAxis. Parameter tab See Overview of parameters for Remove axis enable – Parameter tab (Page 253) Expert tab See Overview of parameters for Remove axis enable – Expert tab (Page 254) 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.

Page 253: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 253

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 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 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 according to PROFIdrive profiles

Select the check box if you want to be able to switch enables individually in accordance with the PROFIdrive profile. If the check box is selected: • 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.

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 246)). 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 enable

For axes with force/pressure control only. Select the check box if you want to disable force/pressure control. If the check box is not selected, force/pressure control is enabled.

Page 254: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 254 Programming and Operating Manual, 08/2008

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 Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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.

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 Remove axis enable command

Parameters of the _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 –

Page 255: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 255

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-45 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

Page 256: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 256 Programming and Operating Manual, 08/2008

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 256)).

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 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 98)): driveAxis, posAxis, or followingAxis.

Parameter tab See Overview of parameters for Switch QF axis enable – Parameter tab (Page 257) QF_Parameters tab See Overview of parameters for Switch QF axis enable – QF_parameter

tab (Page 257) Expert tab See Overview of parameters for Switch QF axis enable – Expert tab (Page 259) 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.

Page 257: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 257

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.

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.

Page 258: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 258 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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.

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

Page 259: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 259

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 Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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.

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 Switch QF axis enable command

Parameters of the _enableQFAxis system function

Axis axis Delay program execution nextCommand Parameters tab Switch position controller enable controlMode Set pressure controller enable forcecontrolMode Follow-up mode commandToActualMode QF_Parameters tab Access to Q-valve qoutput Set Q-valve enable qoutputenable Up rate limit value qoutputmaxderivative Access to pressure control valve foutput Set pressure control valve enable foutputenable Up rate limit value foutputmaxderivative Expert tab CommandID variable commandId Return variable –

Page 260: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 260 Programming and Operating Manual, 08/2008

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-46 Parameter screen form: Remove QF axis enable

Page 261: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 261

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

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 261)).

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 98)): driveAxis, posAxis, or followingAxis. Parameter tab See Overview of parameters for Remove QF axis enable – Parameter tab (Page 262) QF_Parameters tab See Overview of parameters for Remove QF axis enable – QF_parameter

tab (Page 263) Expert tab See Overview of parameters for Remove QF axis enable – Expert tab (Page 264) 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.

Page 262: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 262 Programming and Operating Manual, 08/2008

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 enable

For axes with force/pressure control only. 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.

Page 263: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 263

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-valve is set

Here, you select whether a substitute value is to be set for the Q-valve. The substitute value 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 valve

If the pressure control valve (F-valve, F-actuator) is assigned to multiple axes: 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.

Page 264: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 264 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Set pressure control valve enable

Here, you select whether the enables for the pressure control valve are removed. 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 pressure control valve enable

Here, you select whether a substitute value is to be set for the pressure control valve. The substitute value is applied if no axis has access to the pressure control 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 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 Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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.

Page 265: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 265

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 Remove QF axis enable command

Parameters of the _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 –

Page 266: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 266 Programming and Operating Manual, 08/2008

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-47 Parameter screen form: Speed specification

Page 267: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 267

5.5.5.1 Overview of parameters for speed specification

Table 5-88 Overview of parameters for speed specification

Field/Button Explanation/instructions 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 98)): driveAxis, posAxis, or followingAxis.

Parameter tab See Overview of parameters for Speed specification - Parameters tab (Page 268) Dynamics tab See Overview of parameters for Speed specification - Dynamics tab (Page 268) Expert tab See Overview of parameters for Speed specification - Expert tab (Page 269) 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 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 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 80) speed Speed value during a 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 Dynamics tab. The axis continues at the resulting velocity. The programmed transition behavior must be "Substitute". Current Last programmed speed Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userDefaultDynamics.velocity See also Dynamics tab (Page 73).

Direction Select the direction of rotation. From speed sign Direction is obtained from the speed sign. Positive Positive direction Negative Negative direction Last programmed direction Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userDefaultDynamics.direction

Page 268: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 268 Programming and Operating Manual, 08/2008

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/instructions speed Speed value during the constant speed phase.

Enter the value in the editable selection list (see the Input fields and selection listssection). 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 programmed speed Preassigned value (default value) See the Frequently selected options in combo boxes table in the Selection list (combo box) section. System variable for preassignment: 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 programmed direction Preassigned value (default value) See the Frequently selection options in combo boxes table in the Selection list (combo box) section. System variable for preassignment: userDefaultDynamics.direction

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/instructions The Dynamic response tab is described in detail in Overview of parameters for Dynamic

response tab. 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.

Page 269: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 269

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 76). 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 83).

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 Speed specification command

Parameters of the _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 –

Page 270: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 270 Programming and Operating Manual, 08/2008

5.5.6 Start axis position-controlled

The command starts a positioning or synchronous (following) 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 Dynamic response tab), the axis is decelerated to the set velocity of 0 once the specified time has elapsed.

Figure 5-48 Parameter screen form: Start axis position-controlled

Page 271: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 271

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 98)): posAxis or followingAxis.

Parameter tab See Overview of parameters for Start axis position-controlled – Parameter tab (Page 271) Dynamics tab See Overview of parameters for Start axis position-controlled – Dynamics tab (Page 272) Expert tab See Overview of parameters for Start axis position-controlled – Expert tab (Page 272) 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 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 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 79)

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

Page 272: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 272 Programming and Operating Manual, 08/2008

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 73). 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.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 76). 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.

Page 273: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 273

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 Start axis position-controlled command

Parameters of the _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 –

Page 274: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 274 Programming and Operating Manual, 08/2008

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-49 Parameter screen form: Stop axis

Page 275: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 275

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 98)): driveAxis, posAxis, or followingAxis.

Parameter tab See Overview of parameters for Stop axis – Parameter tab (Page 276) Dynamics tab See Overview of parameters for Stop axis – Dynamics tab (Page 278) Expert tab See Overview of parameters for Stop axis – Expert tab (Page 279) 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 80).

Page 276: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 276 Programming and Operating Manual, 08/2008

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 278)). 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 278)). 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 278)). 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.

Page 277: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 277

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.

Page 278: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 278 Programming and Operating Manual, 08/2008

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 73). Velocity profile In this field, you define the transitions between the individual motion phases.

System variable for preassigned value: 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. System variable for preassigned value: userDefaultDynamics.positiveAccel

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. 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

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 preassigned value: userDefaultDynamics.stopTime

Page 279: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 279

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 76). 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.

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 Stop axis command

Parameters of the _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 –

Page 280: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 280 Programming and Operating Manual, 08/2008

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-50 Parameter screen form: Continue motion

Page 281: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 281

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 98)): driveAxis, posAxis, or followingAxis.

Parameter tab See Overview of parameters for Continue motion - Parameter tab (Page 281) Expert tab See Overview of parameters for Continue motion - Expert tab (Page 281)

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 76). 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 83).

Page 282: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 282 Programming and Operating Manual, 08/2008

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 Continue motion command

Parameters of the _continue system function

Axis axis Parameters tab Selection continuespecification Expert tab Return variable –

Page 283: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 283

5.5.9 Home axis

For a positioning axis or synchronous (following) axis, the displayed or input position values 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 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-51 Parameter screen form: Home axis

Page 284: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 284 Programming and Operating Manual, 08/2008

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 98)): posAxis or followingAxis.

Parameter tab See Overview of parameters for Home axis – Parameter tab (Page 285) Dynamics tab See Overview of parameters for Home axis – Dynamics tab (Page 286) Expert tab See Overview of parameters for Home axis – Expert tab (Page 286) 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 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 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 80)

See also Transition behavior and step enabling condition (Page 79)

Page 285: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 285

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 Explanation/instructions 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)). Preassigned value (default value) See Selection list (combo box) table. System variable for preassigned value: userDefaultHoming.homingPosition

Page 286: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 286 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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 Preassigned value (default value) See Selection list (combo box) (Page 64). 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 73).

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 Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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 83).

Page 287: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 287

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 Home axis command

Parameters of the _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 –

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.

Page 288: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 288 Programming and Operating Manual, 08/2008

Table 5-112 Homing mode for active and passive homing

Description Referencing mode Active homing Passive homing

Homing occurs by means of a separate traversing motion of the axis. Configuration data for homing mode: TypeOfAxis.NumberOfEncoders. Encoder_x.IncHomingEncoder. homingMode.

The homing command itself does not trigger any active traversing motion of the axis. Rather, homing occurs during the next axis motion. Configuration data for homing mode: TypeOfAxis.NumberOfEncoders. Encoder_x.IncHomingEncoder. passiveHomingMode.

With homing output cam and encoder zero mark

The homing command initiates axis motion towards the homing output cam. After the homing output cam is crossed, the axis moves to the next zero mark of the measuring system. Once the first zero mark is detected, the measuring system is synchronized. 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.

After the homing output cam is detected, the next zero mark of the measuring system is active for synchronization. Once the first zero mark is detected after the homing output cam, synchronization takes place. The position value of the axis is set to the value indicated in the home position coordinates.

External zero mark only The homing command initiates axis motion towards the external zero mark (e.g., homing output cam). Once the external zero mark is crossed, the measuring system is synchronized to the edge of the external 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.

Once the external zero mark (e.g., homing output cam) has been detected, synchronization with the edge takes place. The position value of the axis is set to the value indicated in the home position coordinates.

Encoder zero mark only The homing command initiates an axis motion towards the zero mark of the encoder. When the zero mark is crossed, the measuring system of the axis is 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.

Once the zero mark is detected, synchronization occurs. The position value of the axis 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.

Page 289: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 289

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-52 Parameter screen form: Position axis

Page 290: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 290 Programming and Operating Manual, 08/2008

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 98)): posAxis or followingAxis.

Parameter tab See Overview of parameters for Position axis – Parameter tab (Page 291) Dynamics tab See Overview of parameters for Position axis – Dynamics tab (Page 292) Expert tab See Overview of parameters for Position axis – Expert tab (Page 292) 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 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 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 80).

Page 291: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 291

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 64)

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 64) System variable for preassigned value: userDefaultDynamics.velocity See also Dynamics tab (Page 73).

Page 292: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 292 Programming and Operating Manual, 08/2008

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 73). 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 76). 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 83).

Page 293: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 293

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-53 Example of positioning

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 Position axis command

Parameters of the _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 –

Page 294: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 294 Programming and Operating Manual, 08/2008

5.5.11 Travel to fixed endstop

This command activates ● Monitoring of "Travel to fixed endstop" in parallel to an axis motion activated by a motion

command ● Retention of a clamping torque after reaching the fixed endstop This process is also referred to as "clamping". The method for detecting that the endstop is 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-54 Parameter screen form: Travel to fixed endstop

Page 295: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 295

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/instructions 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 98)): posAxis or followingAxis.

Parameter tab See Overview of parameters for Travel to fixed end stop – Parameter tab (Page 295) Expert tab See Overview of parameters for Travel to fixed end stop – Expert tab (Page 296) 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.

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 64) System variable for preassigned value: userDefaultClamping.ClampingValue.

Page 296: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 296 Programming and Operating Manual, 08/2008

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 76). 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 83).

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 Travel to fixed endstop command

Parameters of the _enableMovingToEndStop system function

Axis axis Delay program execution nextCommand Parameters tab Clamping value clampingvaluetype, clampingvalue, torquelimitunit Expert tab CommandID variable commandId Return variable –

Page 297: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 297

5.5.12 Remove fixed endstop

This command is used to deactivate monitoring of "Move to fixed endstop" in parallel to an axis motion activated by a motion command and to discontinue retention of a clamping torque after reaching the fixed endstop. The axis is placed in position-controlled mode.

Figure 5-55 Parameter screen form: Remove fixed endstop

Page 298: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 298 Programming and Operating Manual, 08/2008

5.5.12.1 Overview of parameters for Remove fixed endstop

Table 5-122 Overview of parameters for Remove fixed endstop

Field/Button Explanation/instructions 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 98)): 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 76).

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 76).

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

Return value for the system functions of the technology packages (Page 83)

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 Remove fixed endstop

Parameters of the _disableMovingToEndStop system function

Axis axis CommandID variable commandId Return variable – Delay program execution nextCommand

Page 299: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 299

5.5.13 Switch on torque limitation

This command is used to enable torque limiting in parallel to the motion. The torque limiting acts immediately.

Figure 5-56 Parameter screen form: Switch on torque limitation

Page 300: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 300 Programming and Operating Manual, 08/2008

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/instructions 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 98) technology object data types): driveAxis, posAxis, or followingAxis.

Parameters tab See Overview of parameters for Switch on torque limitation – Parameter tab (Page 301) Expert tab See Overview of parameters for Switch on torque limitation – Expert tab (Page 301) 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.

Page 301: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 301

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 Explanation/instructions 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 64) 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 % The value is interpreted as a percentage. The preassignment (default limit) is reduced to this percentage whereby the preassignment is interpreted as a limit on the load side. Only effective if the entry Preassignment has been selected in the Clamping value field. If the user has selected Last programmed or Preassignment without entering a percentage value, the current torque/force limit on the load side is applied, i.e. the entry "%" acts as if the entry Load side has been selected.

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 76). 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 83).

Page 302: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 302 Programming and Operating Manual, 08/2008

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 Switch on torque limiting command

Parameters of the _enableTorqueLimiting system function

Axis axis Delay program execution nextCommand Parameter tab Clamping value torquelimittype, torquelimit Units torquelimitunit Expert tab CommandID variable commandId Return variable –

Page 303: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 303

5.5.14 Deactivate torque limitation

This command is used to disable torque limiting that is superimposed on motion commands.

Figure 5-57 Parameter screen form: Switch off torque limitation

Page 304: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 304 Programming and Operating Manual, 08/2008

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/instructions 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 98)): 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 76).

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 83).

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.

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 Switch off torque limiting command

Parameters of the _disableTorqueLimiting system function

Axis axis CommandID variable commandId Return variable – Delay program execution nextCommand

Page 305: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 305

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-58 Parameter screen form: Time-dependent velocity profile

Page 306: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 306 Programming and Operating Manual, 08/2008

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 98)): driveAxis, posAxis, or followingAxis.

Profile tab See Overview of parameters for Time-dependent velocity profile – Profile tab (Page 306) Dynamics tab See Overview of parameters for Time-dependent velocity profile – Dynamics

tab (Page 307) Expert tab See Overview of parameters for Time-dependent velocity profile – Expert tab (Page 307) 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 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.

See also Delay program execution (step enabling condition) (Page 80)

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/instructions 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 98)): 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.

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.

Page 307: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 307

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 73).

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 76). 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 83).

Page 308: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 308 Programming and Operating Manual, 08/2008

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 Time-dependent velocity profile command

Parameters of the _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 –

Page 309: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 309

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-59 Parameter screen form: Time-dependent position profile

Page 310: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 310 Programming and Operating Manual, 08/2008

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 98)): posAxis or followingAxis.

Profile tab See Overview of parameters for Time-dependent position profile – Profile tab (Page 310) Dynamics tab See Overview of parameters for Time-dependent position profile – Dynamics

tab (Page 311) Expert tab See Overview of parameters for Time-dependent position profile – Expert tab (Page 311) 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 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.

See also Delay program execution (step enabling condition) (Page 80)

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/instructions 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 98)): 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.

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.

Page 311: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 311

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 73).

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 76). 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 83).

Page 312: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 312 Programming and Operating Manual, 08/2008

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 Time-dependent position profile command

Parameters of the _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 –

Page 313: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 313

5.5.17 Online correction

The correction value you enter for overriding velocity and acceleration acts on currently active commands and all following commands.

Figure 5-60 Parameter screen form: Online correction

Page 314: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 314 Programming and Operating Manual, 08/2008

5.5.17.1 Overview of parameters for Online correction

Table 5-140 Overview of parameters for Online correction

Field/Button Explanation/instructions 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 98)): 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.

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.

5.5.17.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

Page 315: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 315

5.5.18 Set axis parameter

This command changes the preassigned parameters (USERDEFAULT) for the specified axis. The programmed axis parameters go into effect when the relevant parameter is set to the preassigned value in a subsequent motion command. The USERDEFAULT value settings take effect again after: ● Power On ● Reset object command with selected Initialize system variables check box

Figure 5-61 Parameter screen form: Set axis parameter

Page 316: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 316 Programming and Operating Manual, 08/2008

5.5.18.1 Overview of parameters for Set axis parameter

Table 5-141 Overview of parameters for Set axis parameter

Field/Button Explanation/instructions 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 98)): driveAxis, posAxis, or followingAxis.

speed For speed-controlled axes only Preassigned 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 64)). See also Overview of parameters in the Dynamics tab (Page 73).

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 64)). See also Overview of parameters in the Dynamics tab (Page 73).

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 73). 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 64)). See also Overview of parameters in the Dynamics tab (Page 73).

Page 317: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 317

Field/Button Explanation/instructions 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 64)). See also Overview of parameters in the Dynamics tab (Page 73).

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 64)). See also Overview of parameters in the Dynamics tab (Page 73).

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 64)). See also Overview of parameters in the Dynamics tab (Page 73).

Page 318: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 318 Programming and Operating Manual, 08/2008

5.5.18.2 Example of Set axis parameter

Figure 5-62 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.

5.5.18.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

Page 319: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 319

5.5.19 Set virtual axis values

Use the command Set virtual axis values in order to transfer the values of position, velocity and acceleration of a real leading 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 are not set until the master axis is next started.

Figure 5-63 Parameter screen form: Set virtual axis values

Page 320: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 320 Programming and Operating Manual, 08/2008

5.5.19.1 Overview of parameters for Set virtual axis values

Table 5-142 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 320) Expert tab See Overview of parameters for Set virtual axis values – Expert tab (Page 320) 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.19.2 Overview of parameters for Set virtual axis values – Parameters tab

Table 5-143 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 98)): 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.19.3 Overview of parameters for Set virtual axis values – Expert tab

Table 5-144 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 76). 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 83).

Page 321: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 321

5.5.19.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-145 Parameters (MCC Set virtual axis values command compared to _redefinePosition system function)

Parameters of the MCC Set virtual axis values command

Parameters of the _redefinePosition system function

Virtual axis axis Delay program execution nextCommand Parameters 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 –

Page 322: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 322 Programming and Operating Manual, 08/2008

5.5.20 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-64 Parameter screen form: Delete command queue

5.5.20.1 Overview of parameters for Delete command queue

Table 5-146 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 98)): 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 98).

Page 323: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 323

5.5.20.2 Example of Delete command queue

Figure 5-65 Example of a command queue

① Waiting ③ Current command (cannot be deleted) ② Command is deleted

5.5.20.3 Relevant system function for Delete command queue Cam technology package: ● _resetMotionBuffer

Overview of parameters for Delete command queue, _resetMotionBuffer

Table 5-147 Parameters (MCC Delete command queue command compared to _resetMotionBuffer system function)

Parameters of the MCC Delete command queue command

Parameters of the _resetMotionBuffer system function

Axis axis Return variable –

Page 324: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 324 Programming and Operating Manual, 08/2008

5.5.21 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 switching data sets. All configured measuring systems are internally active, and the measured values are updated cyclically.

Figure 5-66 Parameter screen form: Switch parameter set

Page 325: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 325

5.5.21.1 Overview of parameters for Switch parameter set

Table 5-148 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 98)): driveAxis, posAxis, or followingAxis.

Parameters tab See Overview of parameters for Switch parameter set – Parameter tab (Page 325) Expert tab See Overview of parameters for Switch parameter set – Expert tab (Page 325) 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.21.2 Overview of parameters for Switch parameter set – Parameters tab

Table 5-149 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.21.3 Overview of parameters for Switch parameter set – Expert tab

Table 5-150 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 76). 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 83).

Page 326: MC SIMOTION MCC Programming Manual

MCC commands 5.5 Single axis commands

SIMOTION MCC Motion Control Chart 326 Programming and Operating Manual, 08/2008

5.5.21.4 Relevant system function for Switch parameter set Cam technology package: ● _setAxisDataSetActive

Overview of parameters for Switch parameter set, _setAxisDataSetActive

Table 5-151 Parameters (MCC Switch parameter set command compared to _setAxisDataSetActive system function)

Parameters of the MCC Switch parameter set command

Parameters of the _setAxisDataSetActive system function

Axis axis Delay program execution nextCommand Parameters tab Number of the parameter set datasetnumber Expert tab CommandID variable commandID Return variable –

Page 327: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 327

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-67 Parameter screen form: External encoder on

Page 328: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 328 Programming and Operating Manual, 08/2008

5.6.1.1 Overview of parameters for External encoder on

Table 5-152 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 98)): 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 76).

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 83).

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-153 Parameters (MCC External encoder on command compared to _enableExternalEncoder system function)

Parameters of the MCC External encoder on command

Parameters of the _enableExternalEncoder system function

Encoder externalEncoder CommandID variable commandId Return variable – Delay program execution nextCommand

Page 329: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 329

5.6.2 External encoder off

This command disables the external encoder for recording measured values.

Figure 5-68 Parameter screen form: External encoder off

Page 330: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 330 Programming and Operating Manual, 08/2008

5.6.2.1 Overview of parameters for External encoder off

Table 5-154 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 98)): 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 76).

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 83).

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-155 Parameters (MCC External encoder off command compared to _disableExternalEncoder system function)

Parameters of the MCC External encoder off command

Parameters of the _disableExternalEncoder system function

Encoder externalEncoder CommandID variable commandId Return variable – Delay program execution nextCommand

Page 331: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 331

5.6.3 Synchronize external encoder

This command homes the measuring system.

Figure 5-69 Parameter screen form: Synchronize external encoder

Page 332: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 332 Programming and Operating Manual, 08/2008

5.6.3.1 Overview of parameters for Synchronize external encoder

Table 5-156 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 98)): externalEncoderType.

Parameters tab See Overview of parameters for Synchronize external encoder – Parameter tab (Page 332)

Expert tab See Overview of parameters for Synchronize external encoder – Expert tab (Page 333)

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-157 Overview of parameters for Synchronize external encoder – Parameters tab

Field/Button Explanation/instructions 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 64) System variables for preassigned value: userDefaultHoming.homePosition

Page 333: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 333

5.6.3.3 Overview of parameters for Synchronize external encoder – Expert tab

Table 5-158 Overview of parameters for Synchronize external encoder – Expert tab

Field/Button Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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 83).

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-159 Parameter (MCC Synchronize external encoder command compared to _synchronizeExternalEncoder system function)

Parameters of the MCC Synchronize external encoder command

Parameters of the _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 –

Page 334: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 334 Programming and Operating Manual, 08/2008

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-70 Encoder monitoring on

5.6.4.1 Overview of parameters for Encoder monitoring on

Table 5-160 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 335) Expert tab See Overview of parameters for Encoder monitoring on - Expert tab (Page 335)

Page 335: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 335

5.6.4.2 Overview of parameters for Encoder monitoring on – Parameters tab

Table 5-161 Overview of parameters for Encoder monitoring on – Parameters tab

Field/Button Explanation/instructions Reference measuring system

Select the reference measuring system from the encoder systems configured for the axis.

Measuring system 2 Select the second measuring system from the remaining encoder systems configured for the axis.

Maximum permissible difference

Maximum permissible difference between the two encoder systems. 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 64) System variable for preassigned value: sensormonitoring.MaximalSensorDifference

5.6.4.3 Overview of parameters for Encoder monitoring on – Expert tab

Table 5-162 Overview of parameters for Encoder monitoring on – Expert tab

Field/Button Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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 83).

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-163 Parameters (MCC Encoder monitoring on command compared to _enableMonitoringOfEncoderDifference system function)

Parameters of the MCC Encoder monitoring on command

Parameters of the _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 –

Page 336: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 336 Programming and Operating Manual, 08/2008

5.6.5 Encoder monitoring off

This command disables encoder monitoring.

Figure 5-71 Parameter screen form: Encoder monitoring off

Page 337: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 337

5.6.5.1 Overview of parameters for Encoder monitoring off

Table 5-164 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 83).

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-165 Parameters (MCC Encoder monitoring off command compared to _disableMonitoringOfEncoderDifference system function)

Parameters of the MCC Encoder monitoring off command

Parameters of the _disableMonitoringOfEncoderDifference system function

Axis axis Return variable –

Page 338: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 338 Programming and Operating Manual, 08/2008

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. ● 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. Up to two edges can be detected and measured in each processing cycle clock. Cyclic measurement is only supported by the TM17 High Feature, the C240 (inputs B1-B4) and the D4xx (onboard measuring inputs). 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.

Page 339: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 339

Table 5-166 Content of system variables measuredValue1 and measuredValue2 according to the measurement and the triggering edge.

Measurement Trigger measuredValue1 measuredValue2 One edge (rising or falling)

Measured value 1 once-only

Two edges 1st measured value chronologically1

2nd measured value chronologically

One edge (rising or falling)

1st measured value chronologically2

2nd measured value chronologically34

Cyclic

Two edges Measured value at 1st rising edge2

Measured value at 1st 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.

Figure 5-72 Parameter screen form: Activate measuring input

Page 340: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 340 Programming and Operating Manual, 08/2008

5.6.6.1 Overview of parameters for Activate measuring input

Table 5-167 Overview of parameters for Activate measuring input

Field/Button Explanation/instructions 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 source file or MCC chart with data type measuringInput (references to measuring inputs) are available for selection in the Measuring input field.

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 98)) are available for selection: measuringInputType These variables are references to measuring inputs.

Parameter tab See Overview of parameters for Activate measuring input – Parameter tab (Page 341)

Expert tab See Overview of parameters for Activate measuring input – Expert tab (Page 343) 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.

Page 341: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 341

5.6.6.2 Overview of parameters for Activate measuring input – Parameters tab

Table 5-168 Overview of parameters for Activate measuring input – Parameters tab

Field/Button Explanation/instructions Activate cyclic measuring (SIMOTION kernel V4.0 and higher)

Select this check box if the actual values are to be acquired cyclically. If the check box is not selected, the actual value is acquired one time.

Edge for cyclic measuring (SIMOTION kernel V4.0 and higher)

Only if the Activate cyclic measuring check box is selected. 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 64) 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 64) System variable for preassigned value: userDefault.measuredEdge

Page 342: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 342 Programming and Operating Manual, 08/2008

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 64) 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 64) 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 64) System variable for preassigned value: userDefault.measuringRangeEndPosition

Page 343: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 343

5.6.6.3 Overview of parameters for Activate measuring input – Expert tab

Table 5-169 Overview of parameters for Activate measuring input – Expert tab

Field/Button Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76) 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 83).

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-170 Parameters (MCC Activate measuring input command compared to _enableMeasuringInput, _enableMeasuringInputCyclic system functions)

Parameters of the MCC Activate measuring input command

Parameters of the _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 –

Page 344: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 344 Programming and Operating Manual, 08/2008

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-73 Parameter screen form: Deactivate measuring input

Page 345: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 345

5.6.7.1 Overview of parameters for Deactivate measuring input

Table 5-171 Overview of parameters for Deactivate measuring input

Field/Button Explanation/instructions 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 source file or MCC chart with data type measuringInput (references to measuring inputs) are available for selection in the Measuring input field. 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 – Parameter tab (Page 345) Expert tab See Overview of parameters for Deactivate measuring input – Expert tab (Page 346)

5.6.7.2 Overview of parameters for Deactivate measuring input – Parameters tab

Table 5-172 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 98)) are available for selection: measuringInputType These variables are references to measuring inputs.

Page 346: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 346 Programming and Operating Manual, 08/2008

5.6.7.3 Overview of parameters for Deactivate measuring input – Expert tab

Table 5-173 Overview of parameters for Deactivate measuring input – Expert tab

Field/Button Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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 83).

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-174 Parameters (MCC Deactivate measuring input command compared to _disableMeasuringInput system function)

Parameters of the MCC Deactivate measuring input command

Parameters of the _disableMeasuringInput system function

Axis/encoder externalEncoder Parameters tab Measuring input referenceencodertype, referenceEncoder, encoder Expert tab Return variable –

Page 347: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 347

5.6.8 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-74 Parameter screen form: Shift measuring system

Page 348: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 348 Programming and Operating Manual, 08/2008

5.6.8.1 Overview of parameters for Shift measuring system

Table 5-175 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 98)): posAxis or followingAxis.

Set actual value tab

See Overview of parameters for Shift measuring system – Set actual value tab (Page 348)

Expert tab

See Overview of parameters for Shift measuring system – Expert tab (Page 349)

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 Shift measuring system – Set actual value tab

Table 5-176 Overview of parameters for Shift measuring system – Set actual value tab

Field/Button Explanation/instructions Position Here, you enter the new position value. 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.

Page 349: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 349

5.6.8.3 Overview of parameters for Shift measuring system – Expert tab

Table 5-177 Overview of parameters for Shift measuring system – Expert tab

Field/Button Explanation/instructions The Expert tab is described in detail in Expert tab (Page 76). 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 83).

5.6.8.4 Relevant system function for Shift measuring system Cam technology package: ● _redefinePosition

Overview of parameters for Shift measuring system / _redefinePosition

Table 5-178 Parameters (MCC Shift measuring system command compared to _redefinePosition system function)

Parameters of the MCC Shift measuring system command

Parameters of the _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 –

Page 350: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 350 Programming and Operating Manual, 08/2008

5.6.9 Synchronize measuring system

This command synchronizes two measuring systems or returns the difference between the specified measuring systems.

Figure 5-75 Parameter screen form: Synchronize measuring system

Page 351: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 351

5.6.9.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 98)) driveAxis, posAxis or followingAxis.

Parameter tab See Overview of parameters for Synchronize measuring system – Parameter tab (Page 351)

Expert tab See Overview of parameters for Synchronize measuring system – Expert tab (Page 352) 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.9.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 system to be synchronized

Measuring system to be selected; possible values are 1 to 8. 1 (default value) Measuring system 1

Use current measuring system as reference

Select this check box if the current measuring system is to be used as a 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 systems

Select this check box if the measuring systems are to be synchronized with one another.

Read difference between measuring systems

Select this check box if you want the difference between the two measuring systems to 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.

Page 352: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 352 Programming and Operating Manual, 08/2008

5.6.9.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 76). 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 (DINT)

Error code 0: if command execution is okay <> 0: if an error has occurred See Return value for the system functions of the technology packages (Page 83).

encoderDifference (LREAL)

Difference of specified measuring systems

5.6.9.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 Synchronize measuring system command

Parameters of the _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 –

Page 353: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 353

5.6.10 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 362) or – Switch output cam signal (Page 365),

● 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.

Page 354: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 354 Programming and Operating Manual, 08/2008

Figure 5-76 Parameter screen form: Switch output cam on for rotary axis with uni-directional output

cam

Figure 5-77 Parameter screen form: Switch output cam on for rotary axis with position-based cam

Page 355: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 355

Figure 5-78 Parameter screen form: Switch output cam on for rotary axis with time-based cam

Figure 5-79 Parameter screen form: Switch output cam on for linear axis with uni-directional output

cam

Page 356: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 356 Programming and Operating Manual, 08/2008

Figure 5-80 Parameter screen form: Switch output cam on for linear axis with position-based cam

Figure 5-81 Parameter screen form: Switch output cam on for linear axis with time-based cam

Page 357: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 357

5.6.10.1 Overview of parameters for Switch output cam on

Table 5-184 Overview of parameters for Switch output cam on

Field/Button Explanation/instructions 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 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. 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 98)) are available for selection: outputCamType. These variables are references to output cams.

Parameter tab See Overview of parameters for Switch output cam on - Parameter tab (Page 358) Expert tab See Overview of parameters for Switch output cam on - Expert tab (Page 360)

Page 358: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 358 Programming and Operating Manual, 08/2008

5.6.10.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/instructions 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 64) 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 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 64) System variable for preassigned value: userDefault.switchOnDuration

Page 359: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 359

Field/Button Explanation/instructions 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 64) 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 64) 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 64) 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 64) System variable for preassigned value: userDefault.forceDirection.

Page 360: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 360 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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.

Counter start value Only if the Set output cam counter check box is selected: Here, you enter the counter start value as an integer.

5.6.10.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 76). 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 83).

Page 361: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 361

5.6.10.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 Switch output cam on command

Parameters of the _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 –

Page 362: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 362 Programming and Operating Manual, 08/2008

5.6.11 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-82 Parameter screen form: Switch output cam off

Page 363: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 363

5.6.11.1 Overview of parameters for Switch output cam off

Table 5-188 Overview of parameters for Switch output cam off

Field/Button Explanation/instructions 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 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 98)) are available for selection: outputCamType. These variables are references to output cams.

Parameter tab See Overview of parameters for Switch output cam off - Parameter tab (Page 364) Expert tab See Overview of parameters for Switch output cam off - Expert tab (Page 364)

Page 364: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 364 Programming and Operating Manual, 08/2008

5.6.11.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.

5.6.11.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 76). 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 83).

5.6.11.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 Switch output cam off command

Parameters of the _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 –

Page 365: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 365

5.6.12 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 353)" 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 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.

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.

Page 366: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 366 Programming and Operating Manual, 08/2008

Figure 5-83 Parameter screen form: Switch output cam signal

5.6.12.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).

Page 367: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 367

Field/Button Explanation/instructions 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 98)) 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 367) Expert tab See Overview of parameters for Switch output cam signal - Expert tab (Page 368)

5.6.12.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 64). 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.

Page 368: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 368 Programming and Operating Manual, 08/2008

5.6.12.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 76). 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 83).

5.6.12.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 Switch output cam signal

Parameters of the _setOutputCamState system functions

Axis/encoder – Output cam outputCam Parameters tab Time offset timeOffset Output cam status stateType Expert tab Return variable –

Page 369: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 369

5.6.13 Output cam track On

This command is used to assign parameters for an output cam track and then to switch it on. An output 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

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.

Page 370: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 370 Programming and Operating Manual, 08/2008

Figure 5-84 Parameter screen form: Output cam track On for a rotary axis

Page 371: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 371

Figure 5-85 Parameter screen form: Output cam track On for a linear axis

Page 372: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 372 Programming and Operating Manual, 08/2008

5.6.13.1 Overview of parameters for Output cam track On

Table 5-196 Overview of parameters for Output cam track On

Field/Button Explanation/instructions 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 source file or MCC chart with data type _camTrackType (references to output cam tracks) are available for selection in the Output cam track field.

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 source file or MCC chart (see Description of the technology object data types (Page 98)) are available for selection: _camTrackType. These variables are references to output cam tracks.

Parameter tab See Overview of parameters for Output cam track on - Parameter tab (Page 373) Expert tab See Overview of parameters for Output cam track on - Expert tab (Page 375) 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.

Page 373: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 373

5.6.13.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 64) 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 64) 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 64) System variable for preassigned value: userDefault.activationTime

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 64) System variable for preassigned value: userDefault.deactivationTime.

Page 374: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 374 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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 64) 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 64) 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 64) System variable for preassigned value: userDefault.startMode.

Page 375: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 375

5.6.13.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 76). 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 83).

5.6.13.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 Output cam track On command

Parameters of the _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 –

Page 376: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 376 Programming and Operating Manual, 08/2008

5.6.14 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-86 Parameter screen form: Output cam track Off

Page 377: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 377

5.6.14.1 Overview of parameters for Output cam track Off

Table 5-200 Overview of parameters for Output cam track Off

Field/Button Explanation/instructions 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 source file or MCC chart with data type _camTrackType (references to output cam tracks) are available for selection in the Output cam track field.

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 98)) are available for selection: _camTrackType. These variables are references to output cam tracks.

Parameter tab See Overview of parameters for Output cam track off - Parameter tab (Page 378) Expert tab See Overview of parameters for Output cam track off - Expert tab (Page 378) 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.

Page 378: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart 378 Programming and Operating Manual, 08/2008

5.6.14.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 64) System variable for preassigned value: userDefault.startMode.

5.6.14.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 76). 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 83).

Page 379: MC SIMOTION MCC Programming Manual

MCC commands 5.6 Commands for external encoders, measuring inputs and output cams

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 379

5.6.14.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 Output cam track Off command

Parameters of the _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 –

Page 380: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 380 Programming and Operating Manual, 08/2008

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 setpoint can be defined in the command; the slave value can be modified later with the Switch master setpoint.

Figure 5-87 Parameter screen form: Gearing on

Page 381: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 381

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 slave axis

NOTICE

The Stop axis command will only terminate the synchronous operation if Quick stop... was selected as the Stop mode.

Page 382: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 382 Programming and Operating Manual, 08/2008

5.7.1.1 Overview of parameters for Gearing on

Table 5-204 Overview of parameters for Gearing on

Field/Button Explanation/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Technology object data types (Page 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Parameter tab See Overview of parameters for Gearing on - Parameter tab (Page 383) Synchronization tab See Overview of parameters for Gearing on - Synchronization tab (Page 385) Dynamics tab See Overview of parameters for Gearing on - Dynamics tab (Page 390) Expert tab See Overview of parameters for Gearing on - Expert tab (Page 391) 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 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 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 80).

Example: See Example of Gearing on (Page 391)

Page 383: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 383

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/instructions 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.

Leading axis / encoder An entry is required in this field only if the Reset master value check box is selected. 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

Description of the technology object data types (Page 98)): 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 64) System variable for preassigned value: userDefault.gearingSettings.direction

Gear ratio type The gear ratio is the ratio between the distances covered by the slave 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 64) System variable for preassigned value: userDefault.gearingSettings.defineMode

Page 384: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 384 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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 64) 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.

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.

Transformation ratio Enter the gear ratio as a floating-point number here. 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 385)). 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 385)). 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 64) System variable for preassigned value: userDefault.syncProfile.syncProfileReference

Page 385: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 385

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/instructions 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 slave axis are not taken into account.

Time Time-related synchronization: Synchronization occurs on the basis of specified dynamic response values. Program the relevant values in the Dynamics tab (see Overview of parameters for Gearing on - Dynamics tab (Page 390)). • 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 reference Preassigned value See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.syncProfile.syncProfileReference

Page 386: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 386 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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 position • 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 – Parameter tab (Page 383)): – 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 • Reference point of leading axis position • Leading axis position Synchronization occurs with respect to the following values: • Master setpoint = last programmed leading axis position • Slave value: see description in the Offset field: 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 – Parameter tab (Page 383)) – 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)

Page 387: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 387

Field/Button Explanation/instructions 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 Synchronization occurs with respect to the following values: • Master setpoint = current master setpoint • Slave value: see description in the Offset field: Start immediately and synchronously to master position This choice is available only for time synchronization reference. It is intended for use with modulo axes that are synchronized over several cycles (of the master and slave axes). The gear is enabled immediately The slave axis synchronizes in such a way that the synchronism is achieved at the specified master position (master setpoint). The selection in Reference point (see Overview of parameters for Gearing on – Parameter tab (Page 383)) is ignored; absolute gearing is started in every case. Synchronization occurs with respect to the following values: • Master setpoint = last programmed leading axis position • Slave value = gear ratio * position of leading axis 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 position • 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 – Parameter tab (Page 383)): – 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 start of synchronization Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.gearingSettings.synchronizingMode

Page 388: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 388 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Offset 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 a value that is used to calculate the offset of the slave axis for linear coupling between the master axis and slave axis. Depending on the selection in Reference point (see Overview of parameters for Gearing On – Parameter tab (Page 383)), 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 slave axis and master axis Depending on the selection in Reference point (see Overview of parameters for Gearing on – Parameters tab (Page 383)), 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 Reference point of 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 • 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 position Preassigned value See Selection list (combo box) (Page 64) 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 64) System variable for preassigned value: userdefault.syncProfile.syncLength

Page 389: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 389

Field/Button Explanation/instructions Following axis position An entry is required in this field if you have selected the following in the Start of

synchronization field: • Following axis position Here, you enter the slave axis position in the editable selection list. Last programmed following axis position Preassigned value See Selection list (combo box) (Page 64) 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 64) System variable for preassigned value: userdefault.gearingSettings.syncPositionMaster

Behavior during leading synchronization (SIMOTION kernel V3.2 and higher)

An entry can be made 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 – Synchronize immediately – Synchronize immediately with offset – Following axis position

• In the Reference point of leading axis position 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 (expanded look ahead): Standard (default value) No expanded look ahead. Expanded look ahead Expanded look ahead is active: Acceleration or deceleration of master setpoint is taken into account in synchronization calculations Important: Expanded look ahead requires a lot of computation time.

Page 390: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 390 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Synchronization direction (SIMOTION kernel V3.1 and higher)

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 64) System variable for preassigned value: userdefault.gearingSettings.synchronizingDirection

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 73).

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

Page 391: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 391

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 76). 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 83).

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-88 Example: MCC chart for gearing

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.

Page 392: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 392 Programming and Operating Manual, 08/2008

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 Gearing on command

Parameters of the _enableGearing and _setMaster system functions

Following axis – Synchronous operation followingObject Transition behavior mergeMode Delay program execution nextCommand Parameters 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

Leading axis / encoder master (system function _setMaster) Gear direction direction Gear ratio type gearingMode Gear ratio type gearingRatioType Gear ratio numerator gearingNumerator Gear ratio denominator gearingDenominator Gear ratio gearingRatio Reference point gearingType Synchronization tab Synchronization reference synchronizingMode Start of synchronization syncProfileReference Offset syncPositionSlave Reference point of leading axis position syncPositionReference Synchronization length syncLengthType Following axis position syncPositionSlaveType, syncPositionSlave Leading axis position syncPositionMasterType, syncPositionMaster Behavior during leading synchronization synchronizingWithLookAhead 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 –

Page 393: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 393

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-89 Parameter screen form: Gearing off

Page 394: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 394 Programming and Operating Manual, 08/2008

5.7.2.1 Overview of parameters for Gearing off

Table 5-210 Overview of parameters for Gearing off

Field/Button Explanation/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Description of the technology object data types (Page 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Desynchronization tab See Overview of parameters for Gearing off – Desynchronization tab (Page 395) Dynamics tab See Overview of parameters for Gearing off – Dynamics tab (Page 397) Expert tab see Overview of parameters for Gearing off – Expert tab (Page 398) 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 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 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 80)

Page 395: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 395

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 Explanation/instructions 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 397)). • 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 reference Preassigned value See Selection list (combo box) (Page 64) 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 64) System variable for preassigned value: userdefault.gearingSettings.syncOffMode

Page 396: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 396 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Reference point of desynchronization position

An entry is required in this field if you have selected the following in the 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 64) 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 64) 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. Preassignment See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.syncOffPositions.Slave

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. Preassignment See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.syncOffPositions.Master

Page 397: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 397

Field/Button Explanation/instructions 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 distance Synchronization occurs over the shortest path without direction specification. Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.gearingSettings.synchronizingDirection

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 73).

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

Page 398: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 398 Programming and Operating Manual, 08/2008

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 76). 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 83).

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 Gearing off command

Parameters of the _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 –

Page 399: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 399

5.7.3 Set offset on the gearing

This command causes an offset in the master axis or slave axis range during the gearing operation. You can assign 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-90 Parameter screen form: Set offset on the gearing

Page 400: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 400 Programming and Operating Manual, 08/2008

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/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave 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 98)) 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 401) Dynamics tab See Overview of parameters for Set offset on the gearing – Dynamics tab (Page 402) Expert tab See Overview of parameters for Set offset on the gearing – Expert tab (Page 402)

Page 401: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 401

Field/Button Explanation/instructions 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.

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/instructions Area Here, you select whether the master axis or slave axis range will be offset.

Master range (default value) The master axis range is offset. slave range The slave axis range is offset.

Offset Offset for the selected range. Enter the value as a signed floating-point number.

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.

Page 402: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 402 Programming and Operating Manual, 08/2008

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 73). 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 76)

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 76). 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 83).

Page 403: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 403

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 Set offset on the gearing command

Parameters of the _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 –

5.7.4 Synchronous velocity operation on

A synchronous velocity operation is characterized by a constant gear ratio between a master setpoint (velocity of a leading axis or external encoder) and a slave value (velocity of a following axis). Unlike gearing, the synchronous velocity operation is not in positional synchronism. When the synchronous velocity operation is started, the slave value is synchronized to the master setpoint with the programmed dynamic response settings. The gear ratio is specified as a decimal number. The master setpoint can be defined in the command; the slave value can be modified later with the Switch master setpoint.

Page 404: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 404 Programming and Operating Manual, 08/2008

Figure 5-91 Parameter screen form: Synchronous velocity operation on

The synchronous velocity operation can be terminated: ● With the Synchronous velocity operation Off command ● By starting another synchronous operation on the same synchronous object, e.g., with

another Synchronous velocity operation on command ● With a canceling single axis command on the slave axis

NOTICE

The Stop axis command will only terminate the synchronous velocity operation if Quick stop... was selected as the Stop mode.

Page 405: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 405

5.7.4.1 Overview of Synchronous velocity operation on

Table 5-220 Overview of Synchronous velocity operation on

Field/Button Explanation/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Technology object data types (Page 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Parameter tab See Overview of parameters for Velocity gearing on - Parameter tab (Page 406) Dynamics tab See Overview of parameters for Velocity gearing on - Dynamics tab (Page 407) Expert tab See Overview of parameters for Velocity gearing on - Expert tab (Page 407) 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 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 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 80).

Page 406: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 406 Programming and Operating Manual, 08/2008

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/instructions 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.

Leading axis / encoder An entry is required in this field only if the Reset master value check box is selected. 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 98)): 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 64) 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 64) System variables for preassigned value: userDefault.gearingSettings.ratio

Transformation ratio Enter the gear ratio as a floating-point number here.

Page 407: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 407

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 73). 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 76). 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 83).

Page 408: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 408 Programming and Operating Manual, 08/2008

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-92 Example: MCC chart for velocity gearing

Page 409: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 409

5.7.4.6 Relevant system functions for Synchronous velocity operation on Cam technology package: ● _enableVelocityGearing ● _setMaster

Overview of parameters for Synchronous velocity operation on / _enableVelocityGearing, _setMaster

Table 5-224 Parameters (MCC Synchronous velocity operation on command compared to _enableVelocityGearing and _setMaster system functions)

Parameters of the MCC Synchronous velocity operation on command

Parameters of the _enableVelocityGearing and _setMaster system functions

Following axis – Synchronous operation followingObject Transition behavior mergeMode Delay program execution nextCommand Parameters 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

Leading axis / encoder 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 –

Page 410: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 410 Programming and Operating Manual, 08/2008

5.7.5 Synchronous velocity operation off

This command enables you to terminate gearing that was started with the Synchronous velocity operation on command. Desynchronization occurs with the programmed dynamic response settings.

Figure 5-93 Parameter screen form: Synchronous velocity operation off

Page 411: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 411

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/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Technology object data types (Page 98)) 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 412) Expert tab See Overview of parameters for Velocity gearing off - Expert tab (Page 412) 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 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 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 80)

Page 412: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 412 Programming and Operating Manual, 08/2008

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 73) 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 76). 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 83).

Page 413: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 413

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 Synchronous velocity operation off command

Parameters of the _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 –

5.7.6 Cam on

Camming is characterized by a variable 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). Camming is thus in positional synchronism. The variable transmission ratio is described by a cam (transfer 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 setpoint with the programmed synchronization settings. It is also possible to switch to another cam at the end of an active cam. The master setpoint can be defined in the command; the slave value can be modified later with the Switch master setpoint.

Page 414: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 414 Programming and Operating Manual, 08/2008

Figure 5-94 Parameter screen form: Cam on

Active camming can be scaled and offset both on the side of the master setpoint and on the side of the slave value. This enables a cam to be adjusted individually in its definition and value range. 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 slave axis

NOTICE

The Stop axis command will only terminate the synchronous operation if Quick stop... was selected as the Stop mode.

Page 415: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 415

5.7.6.1 Overview of parameters for Cam on

Table 5-229 Overview of parameters for Cam on

Field/Button Explanation/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Technology object data types (Page 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Parameter tab See Overview of parameters for Cam on - Parameter tab (Page 416) Synchronization tab See Overview of parameters for Cam on - Synchronization tab (Page 418) Dynamics tab See Overview of parameters for Cam on - Dynamics tab (Page 424) Expert tab See Overview of parameters for Cam on - Expert tab (Page 424) 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 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 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 80).

Page 416: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 416 Programming and Operating Manual, 08/2008

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 Explanation/instructions 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.

Leading axis / encoder An entry is required in this field only if the Reset master value check box is selected. 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 98)): 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 98)): 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 64) System variable for preassigned value: userdefault.cammingSettings.direction

Page 417: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 417

Field/Button Explanation/instructions 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. Last programmed value Preassignment (default value) See Selection list (combo box) (Page 64) 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 Preassignment (default value) See Selection list (combo box) (Page 64) 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 64) System variable for preassigned value: userdefault.CammingSettings.cammingMode

Page 418: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 418 Programming and Operating Manual, 08/2008

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/instructions 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 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 on - Dynamics tab (Page 424)). • 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 reference Preassigned value See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.syncProfile.syncProfileReference

Page 419: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 419

Field/Button Explanation/instructions 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 position • 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 – Parameter 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 • Reference point of leading axis position • 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 – Parameter 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

Page 420: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 420 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Start of synchronization (continued)

Synchronize immediately 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 – Parameter 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 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 – Parameter 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

Page 421: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 421

Field/Button Explanation/instructions Start of synchronization (continued)

At end of cam cycle 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 position 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 – Parameter 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 start of synchronization Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.cammingSettings.synchronizingMode

Offset 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 slave axis position.

Page 422: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 422 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Reference point of 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 • 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 position Preassigned value See Selection list (combo box) (Page 64) 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 point

An entry is required in this field if you have selected the following in the Evaluation of 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 64) System variable for preassigned value: userdefault.cammingSettings.camStartPosition

Following axis position Here, you enter the slave 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

Page 423: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 423

Field/Button Explanation/instructions 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 64) 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 distance Synchronization occurs over the shortest path without direction specification. Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.cammingSettings.synchronizingDirection

Page 424: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 424 Programming and Operating Manual, 08/2008

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 73).

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 76). 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 83).

Page 425: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 425

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-95 Example: MCC chart for a camming operation

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.

Page 426: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 426 Programming and Operating Manual, 08/2008

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 Cam on command

Parameters of the _enableCamming and _setMaster system functions

Following axis – Synchronous operation followingObject Transition behavior mergeMode Delay program execution nextCommand Parameters 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

Leading axis / encoder master (system function _setMaster) Cam cam Cam direction direction Evaluation of the leading axis masterMode Evaluation of the following axis slaveRatioType Processing the cam cammingModer Synchronization tab Synchronization reference synchronizingMode Start of synchronization syncProfileReference Offset syncPositionSlave Reference point of leading axis position syncPositionReference Synchronization length syncLengthType Offset in relation to cam starting point camStartPositionMasterType, camStartPositionMaster Following axis position syncPositionSlaveType, syncPositionSlave Leading axis position syncPositionMasterType, syncPositionMaster 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 –

Page 427: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 427

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-96 Parameter screen form: Cam off

Page 428: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 428 Programming and Operating Manual, 08/2008

5.7.7.1 Overview of parameters for Cam off

Table 5-235 Overview of parameters for Cam off

Field/Button Explanation/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Technology object data types (Page 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Desynchronization tab See Overview of parameters for Cam off - Desynchronization tab (Page 429) Dynamics tab See Overview of parameters for Cam off - Dynamics tab (Page 431) Expert tab See Overview of parameters for Cam off - Expert tab (Page 432) 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 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 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 80).

Page 429: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 429

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 Explanation/instructions 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 431)). • 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 reference Preassigned value See Selection list (combo box) (Page 64) 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 64) System variable for preassigned value: userdefault.cammingSettings.syncOffMode

Page 430: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 430 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions Reference point of desynchronization position

An entry is required in this field if you have selected the following in the 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 64) 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 64) 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. Preassignment See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.syncOffPositions.Slave

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. Preassignment See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.syncOffPositions.Master

Page 431: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 431

Field/Button Explanation/instructions 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 distance Synchronization occurs over the shortest path without direction specification. Preassigned value (default value) See Selection list (combo box) (Page 64) System variable for preassigned value: userdefault.cammingSettings.synchronizingDirection

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 73).

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

Page 432: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 432 Programming and Operating Manual, 08/2008

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 76). 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 83).

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 Cam off command

Parameters of the _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 –

Page 433: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 433

5.7.8 Set scaling on camming

This command causes scaling of the leading 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-97 Parameter screen form: Set scaling on camming

Page 434: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 434 Programming and Operating Manual, 08/2008

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/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave 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 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Parameter tab See Overview of parameters for Set scaling on camming – Parameter tab (Page 435) Dynamics tab See Overview of parameters for Set scaling on camming – Dynamics tab (Page 436) Expert tab See Overview of parameters for Set scaling on camming – Expert tab (Page 436)

Page 435: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 435

Field/Button Explanation/instructions 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 80).

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/instructions 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.

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).

Page 436: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 436 Programming and Operating Manual, 08/2008

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 73). 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 76). 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 83).

Page 437: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 437

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 Set scaling on camming command

Parameters of the _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 –

Page 438: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 438 Programming and Operating Manual, 08/2008

5.7.9 Set offset on camming

This command causes an offset of the leading 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 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 offset on camming

Page 439: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 439

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/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave 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 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Parameter tab See Overview of parameters for Set offset on camming – Parameter tab (Page 440) Dynamics tab See Overview of parameters for Set offset on camming – Dynamics tab (Page 441) Expert tab See Overview of parameters for Set offset on camming – Expert tab (Page 441)

Page 440: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 440 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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 80)

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/instructions 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.

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.

Instant in 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).

Page 441: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 441

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 73). 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 76). 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 83).

Page 442: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 442 Programming and Operating Manual, 08/2008

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 Set offset on camming command

Parameters of the _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 –

Page 443: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 443

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-99 Parameter screen form: Parameterize cam for the Offset tab

Page 444: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 444 Programming and Operating Manual, 08/2008

Figure 5-100 Parameter screen form: Parameterize cam for the Basic scaling tab

Figure 5-101 Parameter screen form: Parameterize cam for the Range scaling tab

Page 445: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 445

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 98)): camType.

Offset tab See Overview of parameters for Parameterize cam – Offset tab (Page 445) Basic scaling tab See Overview of parameters for Parameterize cam – Basic scaling tab (Page 445) Range scaling tab See Overview of parameters for Parameterize cam – Range scaling tab (Page 446) Expert tab See Overview of parameters for Parameterize cam – Expert tab (Page 446)

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/instructions Following axis offset Select this check box if you want to program an offset for the slave axis.

Enter the offset for the slave axis here. 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. 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.

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/instructions 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.

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.

Page 446: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 446 Programming and Operating Manual, 08/2008

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/instructions 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 slave

axis. Start of range (following axis)

Here, you enter the slave axis position at which scaling starts.

End of range (following axis)

Here, you enter the slave axis position at which scaling ends.

Scaling factor (following axis)

Here, you enter the scaling factor for the slave axis. This is effective within the specified range.

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. End of range (leading axis) Here, you enter the position of the master axis at which scaling ends. Scaling factor (leading axis) Here, you enter the scaling factor for the master axis. This is effective within the specified

range.

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 76). 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 83).

Page 447: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 447

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 Parameterize cam command

Parameters of the _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 –

Page 448: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 448 Programming and Operating Manual, 08/2008

5.7.11 Switch master setpoint

This command switches the master setpoint for an existing synchronous relationship. Switchover is possible when synchronous operation is active.

Figure 5-102 Parameter screen form: Switch master setpoint

Page 449: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 449

5.7.11.1 Overview of parameters for Switch master setpoint

Table 5-256 Overview of parameters for Switch master setpoint

Field/Button Explanation/instructions 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 source file or MCC chart with data type followingObjectType (references to synchronous objects) are available for selection in the Gearing field.

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 slave axis:

The synchronous object associated with the selected slave 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 slave axis: All technology object-type variables declared in the MCC source file or MCC chart (see Technology object data types (Page 98)) are available for selection: followingObjectType. These variables are references to synchronous objects.

Parameter tab See Overview of parameters for Switch master setpoint – Parameter tab (Page 450) Dynamics tab See Overview of parameters for Switch master setpoint – Dynamics tab (Page 450) Expert tab See Overview of parameters for Switch master setpoint – Expert tab (Page 451) 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 80).

Page 450: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart 450 Programming and Operating Manual, 08/2008

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 98)): 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 450)).

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 73).

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

Page 451: MC SIMOTION MCC Programming Manual

MCC commands 5.7 Commands for synchronous operation and camming

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 451

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 76).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 83).

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 Switch master value command

Parameters of the _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 –

Page 452: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 452 Programming and Operating Manual, 08/2008

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 453) command – Circular motion: Traverse path circularly (Page 461) command – Polynomial motion: command Traverse path using polynomials (Page 472)

● Blending is used to link individual segments in series to form one complete motion with no intermediary stop.

Page 453: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 453

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-103 Parameter screen form: Traverse path linearly

See also the SIMOTION Motion Control Function Manual, Technology object, Path interpolation.

Page 454: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 454 Programming and Operating Manual, 08/2008

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 98)): _pathObjectType.

Parameters tab See Overview of parameters for Traverse path linearly - Parameters tab (Page 454) Dynamic response tab See Overview of parameters for Traverse path linearly - Dynamic response

tab (Page 456) Synchronous axis tab See Overview of parameters for Traverse path linearly - Path-synchronous motion

tab (Page 458) Expert tab See Overview of parameters for Traverse path linearly - Expert tab (Page 459) 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 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.

See also Delay program execution (step enabling condition) (Page 80).

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 64). System variable for preassigned value: userDefault.path.plane

Page 455: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 455

Field/Button Explanation/instructions 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 64). System variable for preassigned value: userDefault.path.mode

Target coordinates X, Y, Z

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 Input field (Page 64)

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 64). System variable for preassigned value: userDefault.blending.mode

Page 456: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 456 Programming and Operating Manual, 08/2008

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 Explanation/instructions 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. 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 • If 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

Page 457: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 457

Field/Button Explanation/instructions 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 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 positioning 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. Preassignment See . System variable for preassigned 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 data type of technology objects declared in the MCC source file or

MCC chart (see Technology object data types (Page 98)): 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 Profile position at end of path

These two values determine the area within the definition range of the cam (x axis) that is mapped by scaling to the length of the programmed path. Enter the values as signed floating-point numbers. See

See also Dynamics tab (Page 73) Selection list (combo box) (Page 64) Input field (Page 64)

Page 458: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 458 Programming and Operating Manual, 08/2008

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 motion

Here, you specify how the axis for path-synchronous motion should be traversed with the 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 64) System variable for preassigned value: userDefault.w.mode

Direction of synchronous path motion

Select the direction of the path-synchronous motion. The direction must be specified in 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 64) System variable for preassigned value: userDefault.w.direction

Page 459: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 459

Field/Button Explanation/instructions Position of path-synchronous motion

This parameter is evaluated only for the following settings for Mode of path-synchronous 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 64)

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 76). 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 83).

Page 460: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 460 Programming and Operating Manual, 08/2008

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 Traverse path linearly command

Parameters of the _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 –

Page 461: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 461

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-104 Parameter screen form: Traverse path circularly

See also the SIMOTION Motion Control Function Manual, Technology object, Path interpolation.

Page 462: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 462 Programming and Operating Manual, 08/2008

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 98)): _pathObjectType.

Parameters tab See Overview of parameters for Traverse path circularly - Parameters tab (Page 463) Dynamic response tab See Overview of parameters for Traverse path circularly - Dynamic response

tab (Page 467) Synchronous axis tab See Overview of parameters for Traverse path circularly - Path-synchronous motion

tab (Page 469) Expert tab See Overview of parameters for Traverse path circularly - Expert tab (Page 470) 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 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.

See also Delay program execution (step enabling condition) (Page 80).

Page 463: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 463

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 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 64). 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 . System variable for preassigned value: userDefault.path.mode

Target coordinates X, Y, Z

These parameters are evaluated only for: • 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

Page 464: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 464 Programming and Operating Manual, 08/2008

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 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 . 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 . System variable for preassigned value: userDefault.path.circularType

Page 465: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 465

Field/Button Explanation/instructions 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 circle specification 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 circle specification 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 circle specification 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 circle specification 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 . System variable for preassigned value: userDefault.path.ijkMode

Center coordinates Center point coordinates I, J, K

These parameters are evaluated only for: • 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

Page 466: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 466 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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

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 Input field (Page 64)

Page 467: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 467

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 Explanation/instructions 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. 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

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

Page 468: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 468 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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. Preassignment See . System variable for preassigned 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 technology object-type variables declared in the MCC source file or MCC chart (see

Technology object data types (Page 98)): 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 Profile position at end of path

These two values determine the area within the definition range of the cam (x axis) that is mapped by scaling to the length of the programmed path. Enter the values as signed floating-point numbers. See

See also

Dynamics tab (Page 73) Selection list (combo box) (Page 64) Input field (Page 64)

Page 469: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 469

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 motion

Here, you specify how the axis for path-synchronous motion should be traversed with the 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 64) System variable for preassigned value: userDefault.w.mode

Direction of synchronous path motion

Select the direction of the path-synchronous motion. The direction must be specified in 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 64) System variable for preassigned value: userDefault.w.direction

Position of path-synchronous motion

This parameter is evaluated only for the following settings for Mode of path-synchronous 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 64)

Page 470: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 470 Programming and Operating Manual, 08/2008

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 76). 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 83).

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 Traverse path circularly command

Parameters of the _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

Page 471: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 471

Parameters of the MCC Traverse path circularly command

Parameters of the _movePathCircular system function

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 –

Page 472: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 472 Programming and Operating Manual, 08/2008

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).

● 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.

Page 473: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 473

Figure 5-105 Parameter screen form: Traverse path using polynomials

See also the SIMOTION Motion Control Function Manual, Technology object, Path interpolation.

Page 474: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 474 Programming and Operating Manual, 08/2008

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 98)): _pathObjectType.

Parameters tab See Overview of parameters for Traverse path using polynomials - Parameters tab (Page 474)

Dynamic response tab See Overview of parameters for Traverse path using polynomials - Dynamic response tab (Page 477)

Synchronous axis tab See Overview of parameters for Traverse path using polynomials - Path-synchronous motion tab (Page 480)

Expert tab See Overview of parameters for Traverse path using polynomials - Expert tab (Page 481) 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 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.

See also Delay program execution (step enabling condition) (Page 80).

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 64). System variable for preassigned value: userDefault.path.plane

Page 475: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 475

Field/Button Explanation/instructions 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 X, Y, Z

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

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

Page 476: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 476 Programming and Operating Manual, 08/2008

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 the starting point X, Y, Z

This parameter is evaluated only with polynomial specification via explicit specification of the starting point data. 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 at the starting point X, Y, Z

This parameter is evaluated only with polynomial specification via explicit specification of the starting point data. Here, you specify the second geometric derivative (curvature vector) at the starting point (current position). Enter the values as signed floating-point numbers. See

Page 477: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 477

Field/Button Explanation/instructions 1. First geometric derivative at the end point X, Y, Z

This parameter is evaluated only with polynomial specification via explicit specification of the starting point data and attach continuously. 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 at the end point X, Y, Z

This parameter is evaluated only with polynomial specification via explicit specification of the starting point data and Attach continuously. 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 X, Y, Z Coefficient a3 X, Y, Z Coefficient a4 X, Y, Z Coefficient a5 X, Y, Z

These parameters are evaluated only with polynomial specification via direct specification of the polynomial coefficients. Here you specify the coefficients a2, a3, a4 and a5 of the fifth order polynomial. Enter the values as signed floating-point numbers. See

See also Input field (Page 64)

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/instructions 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. 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

Page 478: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 478 Programming and Operating Manual, 08/2008

Field/Button Explanation/instructions 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. Preassignment See . System variable for preassigned value: userDefault.path.dynamicAdaption

Page 479: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 479

Field/Button Explanation/instructions 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 source file or MCC chart

(see Technology object data types (Page 98)): 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 Profile position at end of path

These two values determine the area within the definition range of the cam (x axis) that is mapped by scaling to the length of the programmed path. Enter the values as signed floating-point numbers. See

See also Dynamics tab (Page 73) Selection list (combo box) (Page 64) Input field (Page 64)

Page 480: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 480 Programming and Operating Manual, 08/2008

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 motion

Here, you specify how the axis for path-synchronous motion should be traversed with the 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 64) System variable for preassigned value: userDefault.w.mode

Direction of synchronous path motion

Select the direction of the path-synchronous motion. The direction must be specified in 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 64) System variable for preassigned value: userDefault.w.direction

Page 481: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 481

Field/Button Explanation/instructions Position of path-synchronous motion

This parameter is evaluated only for the following settings for Mode of path-synchronous 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 64)

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 76). 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 83).

Page 482: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 482 Programming and Operating Manual, 08/2008

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 Traverse path using polynomials command

Parameters of the _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

Page 483: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 483

Parameters of the MCC Traverse path using polynomials command

Parameters of the _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 –

Page 484: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 484 Programming and Operating Manual, 08/2008

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 488) 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-106 Parameter screen form: Stop path motion

See also the SIMOTION Motion Control Function Manual, Technology object, Path interpolation.

Page 485: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 485

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 98)): _pathObjectType.

Parameters tab See Overview of parameters for Stop path motion - Parameters tab (Page 485) Dynamic response tab See Overview of parameters for Stop path motion - Dynamic response tab (Page 486) Expert tab See Overview of parameters for Stop path motion - Expert tab (Page 486) 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 80).

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 486)). 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.

Page 486: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 486 Programming and Operating Manual, 08/2008

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 73). 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/instructions The Expert tab is described in detail in Overview of parameters for Expert tab (Page 76). 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 83).

Page 487: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 487

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 Stop path motion command

Parameters of the _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 –

Page 488: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart 488 Programming and Operating Manual, 08/2008

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-107 Parameter screen form: Continue path motion

See also the SIMOTION Motion Control Function Manual, Technology object, Path interpolation.

Page 489: MC SIMOTION MCC Programming Manual

MCC commands 5.8 Commands for path interpolation

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 489

5.8.5.1 Overview of parameters: Continue path motion

Table 5-284 Overview of parameters: Continue path motion

Field/Button Explanation/instructions 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

source file or MCC chart (see Technology object data types (Page 98)): _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 76).

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 83).

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.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 Continue path motion command

Parameters of the _continuePath system function

Path object pathObject CommandID variable commandId Return variable – Delay program execution nextCommand

Page 490: MC SIMOTION MCC Programming Manual
Page 491: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 491

Commissioning (software) 66.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.

Page 492: MC SIMOTION MCC Programming Manual

Commissioning (software) 6.1 Assigning programs to a task and downloading them to the target system

SIMOTION MCC Motion Control Chart 492 Programming and Operating Manual, 08/2008

Figure 6-1 Configure execution system

Figure 6-2 Assigning a program to a motion task

Page 493: MC SIMOTION MCC Programming Manual

Commissioning (software) 6.1 Assigning programs to a task and downloading them to the target system

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 493

6.1.1.1 Execution levels and tasks in SIMOTION

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.

Page 494: MC SIMOTION MCC Programming Manual

Commissioning (software) 6.1 Assigning programs to a task and downloading them to the target system

SIMOTION MCC Motion Control Chart 494 Programming and Operating Manual, 08/2008

Execution level Description 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.

• BackgroundTask Cyclic task, restarted automatically once the assigned programs have been executed; task cycle time depends on 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: SeeInitialization of local variables (Page 108). • In the event of execution errors in the program, see SIMOTION Basic Functions function manual. For information about access options for the process image and I/O variables: See Important features of direct access and process image access (Page 115).

Page 495: MC SIMOTION MCC Programming Manual

Commissioning (software) 6.1 Assigning programs to a task and downloading them to the target system

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 495

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

Page 496: MC SIMOTION MCC Programming Manual

Commissioning (software) 6.1 Assigning programs to a task and downloading them to the target system

SIMOTION MCC Motion Control Chart 496 Programming and Operating Manual, 08/2008

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. Follow the steps outlined below: 1. Check the project for consistency: Select the Project > Consistency check menu

command. 2. Compile the project from scratch again, taking account of all dependencies: Select the

Project > Save and compile all menu command. 3. Go online with the target system: Select the Project > Connect to target system menu

command. 4. Download the project to the target system: Select the Project > Download to target device

menu command.

Note For information about variable initialization, consult the Variable type and timing of variable initialization table.

Page 497: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 497

Error Handling and Program Test 77.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 499).

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 521) is displayed.

Page 498: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.1 Modes for program testing

SIMOTION MCC Motion Control Chart 498 Programming and Operating Manual, 08/2008

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 502) or a watch table (Page 504). • Program status (Page 508) (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 502) or a watch table (Page 504). • Program status (Page 508):

– 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 515). 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 499).

Page 499: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.1 Modes for program testing

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 499

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.

Page 500: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.1 Modes for program testing

SIMOTION MCC Motion Control Chart 500 Programming and Operating Manual, 08/2008

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.

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.

Page 501: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.1 Modes for program testing

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 501

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 499)

Page 502: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.2 Monitoring variables in the symbol browser and watch tables

SIMOTION MCC Motion Control Chart 502 Programming and Operating Manual, 08/2008

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. ● 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.

Variables in the user memory of the unit You can use the symbol browser to monitor the variables contained in the user memory of the unit, e.g. ● Unit variables of the interface section of a program source file (unit), ● Unit variables of the implementation section of a program source file (unit), ● Static variables of the function blocks whose instances are declared as unit variables. Follow these steps: 1. Select the program source file in the project navigator. 2. In the detail view, click the Symbol browser tab.

You see in the symbol browser all variables contained in the user memory of the unit.

Page 503: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.2 Monitoring variables in the symbol browser and watch tables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 503

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, e.g. ● 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.

The symbol browser shows all tasks with the assigned programs. The 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 Status Program (see Program status (Page 508)).

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.

Page 504: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.2 Monitoring variables in the symbol browser and watch tables

SIMOTION MCC Motion Control Chart 504 Programming and Operating Manual, 08/2008

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.

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 .

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.

Page 505: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.2 Monitoring variables in the symbol browser and watch tables

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 505

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. 5. From the context menu, select the item Move variable 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 .

Page 506: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.3 Monitoring the program execution

SIMOTION MCC Motion Control Chart 506 Programming and Operating Manual, 08/2008

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 one (and only 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 initiates the next program step; the next command to be executed is shown in light blue. After initiation of the next single step, the active command is shown in yellow until execution of the command is complete. The program is then 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.

Page 507: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.3 Monitoring the program execution

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 507

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 214) 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 Single-step monitoring is enabled separately for every MCC chart. 1. Open the MCC chart whose program execution you want to monitor. 2. Select the MCC chart > Properties menu command.

The properties dialog opens. 3. Select the Single step check box. 4. Recompile the MCC chart (MCC chart > Accept and compile menu command). 5. 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 command. 2. You can Initiate the next single step in one of the following ways:

– By clicking the Next step button on the MCC editor toolbar – By selecting the MCC chart > Next step menu command – By selecting the Next step command on the context menu in the project navigator

Note The program stays in single-step mode if the SIMOTION device goes offline or the MCC chart is closed.

Page 508: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.4 Program status

SIMOTION MCC Motion Control Chart 508 Programming and Operating Manual, 08/2008

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. Clear the Single step check box in the Properties dialog. 3. Recompile the program and download it to the target system.

7.4 Program status Program status can be used to monitor variables for the following commands: ● IF: Program branch ● WHILE: Loop with condition at the start ● UNTIL: Loop with condition at the end ● ST zoom 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, or UNTIL 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.

Page 509: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.4 Program status

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 509

Preparing program status Before you can work with program status, additional code must be generated during compilation: 1. Select the SIMOTION device, and select Change operating mode on the shortcut menu. 2. Select Test mode.

Program status is available in this mode without restrictions (see SIMOTION device modes (Page 497)).

3. Open the Properties window of the MCC source file. 4. Activate the Permit program status check box in the Options tab (see Local compiler

settings (Page 43)). 5. Compile the MCC source file (MCC source file > Accept and compile menu command). 6. Download the programs to the target system.

Starting the Status program To start program status, proceed as follows. The relevant MCC chart must be open. 1. Open the commands for which you want to monitor variables (IF, WHILE, UNTIL, or ST

Zoom). 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).

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. Clear the Permit program status check box in the Properties dialog of the MCC source

file. 3. Select the SIMOTION device, and select Change operating mode on the shortcut menu. 4. Select Process mode. 5. This operating mode is optimized for maximum performance of program execution. 6. Recompile the program and download it to the target system.

Page 510: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.5 Program run

SIMOTION MCC Motion Control Chart 510 Programming and Operating Manual, 08/2008

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 511)" 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-3 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.

Page 511: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.5 Program run

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 511

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-4 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 510)".

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-5 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 510)

Page 512: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.6 Trace

SIMOTION MCC Motion Control Chart 512 Programming and Operating Manual, 08/2008

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. 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.

Overview of parameters for You can set the following parameters:

Explanation/instructions Field/Button Up to Trace V2.0 Trace V2.1 and higher:

Trace Trigger 1 Trace block 1 is started. Trace is started when the following condition is satisfied: "Trigger with TraceTrigger 1 program call".

Trace Trigger 2 Trace block 2 is started. Trace is started when the following condition is satisfied: "Trigger with TraceTrigger 2 program call".

Page 513: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.6 Trace

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 513

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

Page 514: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.6 Trace

SIMOTION MCC Motion Control Chart 514 Programming and Operating Manual, 08/2008

Figure 7-3 Trace recording of synchronous start

Relevant system variable for Activate trace System variable of SIMOTION device: TraceControl

Page 515: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 515

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 516). 2. Specify the debug task group, see Specifying the debug task group (Page 517). 3. Set breakpoints, see Setting breakpoints (Page 519). 4. Define the call path, see Defining a call path for a single breakpoint (Page 522). 5. Activate the breakpoints, see Activating breakpoints (Page 526).

See also Breakpoints toolbar (Page 521)

Page 516: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 516 Programming and Operating Manual, 08/2008

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 499) 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 521). 4. Accept the safety information 5. Parameterize the sign-of-life monitoring.

See also section: Important information about the life-sign monitoring (Page 499). 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 521) 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.

Page 517: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 517

See also Modes of the SIMOTION devices (Page 497)

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.

Page 518: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 518 Programming and Operating Manual, 08/2008

Table 7-6 Behavior at the breakpoint depending on the tasks to be stopped in the debug task group.

Tasks to be stopped Properties Single selected tasks (debug task group)

All tasks

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

tasks Active for all tasks Deactivated for all tasks

Time monitoring of the tasks Deactivated for tasks in the debug task group

Deactivated for all tasks

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 Technology Closed-loop control active

The behavior of the outputs and the 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 519)). 2. Define the call path (see Defining a call path for a single breakpoint (Page 522)). 3. Activate the breakpoints (see Activating breakpoints (Page 526)).

Page 519: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 519

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 516). 3. The debug task group is defined, see Defining the debug task group (Page 517).

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 Edit > Set breakpoint menu command. – 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 Edit > Set breakpoint menu command. – 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. – Click the button in the Breakpoints toolbar.

Page 520: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 520 Programming and Operating Manual, 08/2008

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 508) 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 522). 2. Activate the breakpoints, see Activating breakpoints (Page 526).

Page 521: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 521

7.7.5 Breakpoints toolbar This toolbar contains important operator actions for setting and activating breakpoints:

Table 7-7 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 519).

Activate/deactivate breakpoint Click this icon to activate or deactivate the breakpoint at the selected code position. See: Activating breakpoints (Page 526).

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 522), Defining the call path for all breakpoints (Page 524).

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 526).

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 526).

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 519).

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 528).

Resume Click this icon to continue the program execution after reaching an activated breakpoint. See: Activating breakpoints (Page 526), Displaying the call stack (Page 528).

Page 522: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 522 Programming and Operating Manual, 08/2008

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 516). 3. The debug task group is defined, see Defining the debug task group (Page 517). 4. Breakpoint is set, see Setting breakpoints (Page 519).

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.

Page 523: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 523

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 526).

Note You can use the "Display call stack (Page 528)" 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 524)

Page 524: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 524 Programming and Operating Manual, 08/2008

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 516). ● The debug task group is defined, see Defining the debug task group (Page 517).

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.

Page 525: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 525

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 526).

Note You can use the "Display call stack (Page 528)" 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 522)

Page 526: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 526 Programming and Operating Manual, 08/2008

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 516). 3. The debug task group is defined, see Defining the debug task group (Page 517). 4. Breakpoints are set, see Setting breakpoints (Page 519). 5. Call paths are defined, see Defining a call path for a single breakpoint (Page 522).

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. – 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.

Page 527: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 527

Behavior at the activated breakpoint On reaching an activated breakpoint (possibly using the selected call path (Page 522)), 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 517)". 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 502). You can use the "Display call stack (Page 528)" 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: ● Click the button for "resume" (Ctrl+F8 shortcut) in the Breakpoint toolbar.

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. – 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.

Page 528: MC SIMOTION MCC Programming Manual

Error Handling and Program Test 7.7 Breakpoints

SIMOTION MCC Motion Control Chart 528 Programming and Operating Manual, 08/2008

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 517) 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 510)".

Page 529: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 529

Appendix AA.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.

Page 530: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart 530 Programming and Operating Manual, 08/2008

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: ● 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

Page 531: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 531

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

Page 532: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart 532 Programming and Operating Manual, 08/2008

Comparator

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.

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

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

Page 533: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 533

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).

Figure A-5 Example of NO contact operations in a parallel circuit

Page 534: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart 534 Programming and Operating Manual, 08/2008

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.

Figure A-6 Example of an AND operation

① The result is 1 if the following condition is fulfilled:

%I 1.0 = 1 AND %I 1.1 = 1

Page 535: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 535

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.

Figure A-7 Example of an OR operation with an inverted input

① The result is 1 if the following condition is fulfilled:

%I 1.0 = 0 OR %I 1.1 = 1

Page 536: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart 536 Programming and Operating Manual, 08/2008

Comparator

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.

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

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.

Page 537: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 537

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.

Figure A-10 Example of an AND before OR operation

① The result of the operation is 1 if at least one AND operation is fulfilled.

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.

Figure A-11 Example of an OR before AND operation

① The result of the operation is "1" if both OR operations are fulfilled.

Page 538: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart 538 Programming and Operating Manual, 08/2008

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.

Page 539: MC SIMOTION MCC Programming Manual

Appendix A.1 Basics of LAD/FBD/Formula for MCC

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 539

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

Page 540: MC SIMOTION MCC Programming Manual

Appendix A.2 Key combinations

SIMOTION MCC Motion Control Chart 540 Programming and Operating Manual, 08/2008

A.2 Key combinations The following key combinations are available:

Table A-4 Key combinations

Keystroke combination

Significance

When MCC source file is open Ctrl+F4 Closes the active MCC source file. Ctrl+B Accepts and compiles the active MCC source file. Alt+Enter Displays the properties of the active MCC source file for editing. Ctrl+R Inserts an MCC chart in the MCC source file. Ctrl+P Prints the active MCC chart. When an MCC chart is open Ctrl+F4 Closes the active MCC chart. Ctrl+B Accepts and compiles the active MCC source file 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+Z Close the brief comment box 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+F Searches text in the active list. Ctrl+B Saves and compiles the active/selected object. Window menu Ctrl+Shift+F5 Cascades all windows open in this application. Ctrl+Shift+F2 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. Alt+F4 Closes all windows and ends the application.

Page 541: MC SIMOTION MCC Programming Manual

Appendix A.2 Key combinations

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 541

Keystroke combination

Significance

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. 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 Home 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 With assignments: Inserts a new variable Alt+D With assignments: Deletes a variable Within LAD 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 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

Page 542: MC SIMOTION MCC Programming Manual
Page 543: MC SIMOTION MCC Programming Manual

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 543

Index

_ _additionObjectType, 98 _camTrackType, 98 _controllerObjectType, 98 _device, 129 _direct, 114, 117, 129 _fixedGearType, 98 _formulaObjectType, 98 _getSafeValue

Application, 129 _MccRetSyncStart, 214 _sensorType, 98 _setSafeValue

Application, 129

A acceleration model

Direction-based, 73, 74 Non-direction-based, 73, 74

ANY, 94 ANY_BIT, 94 ANY_DATE, 94 ANY_ELEMENTARY, 94 ANY_INT, 94 ANY_NUM, 94 ANY_REAL, 94 ANYOBJECT, 98 Axis enable

electric drive, 246, 251 Hydraulic drive, 255, 260

B Basic commands, 171 Bit data types, 91 BOOL, 91 Breakpoint, 515

Activating, 526 Call path, 522, 524 Call stack, 528 Deactivating, 527

remove, 519 Set, 519 Toolbar, 521

BYTE, 91

C Call path

Breakpoint, 522, 524 Call stack, 528 Program run, 510

camType, 98 Close

MCC source file, 37 Closing the parameter screen form, 82 Code attributes, 152 Command

Acknowledge specific technology object alarm, 221 Acknowledge technology object alarms, 219 Activate measuring input, 338 Activate simulation for object, 185 Activate trace, 192, 512 Cam off, 427 Cam on, 413 CASE statement, 208 Change operating mode, 191 Comment block, 192 Continue motion, 280 Continue path motion, 488 Continue task, 196 Deactivate measuring input, 344 Deactivate simulation for object, 187 Deactivate torque limitation, 303 Delete command queue, 322 Determine TaskId, 201 Encoder monitoring off, 336 Encoder monitoring on, 334 Establish connection using TCP/IP, 228 Exit, 213 External encoder off, 329 External encoder on, 327 FOR statement, 205 Gearing off, 393 Gearing on, 380 Go to, 210

Page 544: MC SIMOTION MCC Programming Manual

Index

SIMOTION MCC Motion Control Chart 544 Programming and Operating Manual, 08/2008

Home axis, 283 IF statement, 202 Incoming message, 224 Interrupt task, 194 Module, 60, 181 Online correction, 313 Outgoing message, 226 Output cam track Off, 376 Output cam track On, 369 Parameterize cam, 443 Position axis, 289 Receive data, 240 Remove axis enable, 251 Remove connection using TCP/IP, 231 Remove fixed endstop, 297 Remove QF axis enable, 260 Reset object, 189 Reset output, 183 Reset task, 197 Return, 212 Selection, 211 Send data, 232 Set axis parameter, 315 Set offset on camming, 438 Set offset on the gearing, 399 Set output, 182 Set scaling on camming, 433 Set virtual axis values, 319 Shift measuring system, 347 Speed preset, 266 ST zoom, 184 Start axis position-controlled, 270 Start task, 193 Stop axis, 274 Stop path motion, 484 Subprogram call, 135 Subroutine call, 162, 181 Switch axis enable, 246 Switch master setpoint, 448 Switch on torque limitation, 299 Switch output cam off, 362 Switch output cam on, 353 Switch output cam signal, 365 Switch parameter set, 324 Switch QF axis enable, 255 Synchronize external encoder, 331 Synchronize measuring system, 350 Synchronous start, 214 Synchronous velocity operation off, 410 Synchronous velocity operation on, 403 System function call, 181 Task status, 199

Time-dependent position profile, 309 Time-dependent velocity profile, 305 Travel to fixed endstop, 294 Traverse path circularly, 461 Traverse path linearly, 453 Traverse path using polynomials, 472 UNTIL statement, 207 Variable assignment, 184 Wait for axis, 173 Wait for condition, 177 Wait for signal, 176 Wait time, 171 WHILE statement, 204

CommandID variable, 76 Commands

Assigning a technology object, 67 Assigning a technology object-type variable, 67 Copying, 59 cutting, 59 deleting, 59 Hide and Display, 59 Inserting, 59 Numbering, 58 Pasting, 55 programming, 62 representing, 57 selecting, 58

Comments, 57 Compiling

Library, 167 MCC chart, 47 MCC source file, 36

Connections, 130 defining, 130 to LAD/FBD programs, 130 To libraries, 130 to MCC charts, 130 to ST source files, 130

VAR CONSTANT, 100 Constants

Time specifications, 92 Context menu, 28 Cross-reference list, 147

Displayed data, 148 Single step monitoring, 148 TSI#dwuser_1, 148 TSI#dwuser_2, 148

Cyclic program execution Effect on I/O access, 114, 117, 123 Effect on variable initialization, 105

Page 545: MC SIMOTION MCC Programming Manual

Index

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 545

D Data types

Bit data type, 91 elementary, 91 Inheritance, 99 Numeric, 91 STRING, 92 Technology object, 98 Time, 92

DATE, 92 DATE_AND_TIME, 92 Debug mode, 498, 516 Declaration

Scope, 87 Declaration area, 27 Deleting

MCC chart, 47 MCC source file, 38

Derived data types, 95 DINT, 91 DINT#MAX, 93 DINT#MIN, 93 Direct access, 114, 117

Features, 115 Download

Effect on variable initialization, 105 Drag&drop, 29 driveAxis, 98 DT, 92 DWORD, 91

E Elementary data types

Overview, 91 Enumeration

Example, 97 Example, 54 Export

MCC charts in program source files, 51 MCC source file as an ST source file, 39 MCC source file in XML format, 40, 49

externalEncoderType, 98

F FBD, 153 Features

MCC chart, 50 MCC source file, 41

Floating-point number

Data types, 91 followingAxis, 98 followingObjectType, 98 Formula, 153, 159

Fundamentals, 538 Function

Creating, 139 Example, 138 Pasting, 135 Programming, 139

Function block Pasting, 135

Function chart, 157 Fundamentals, 534

G Global device data

Definition, 101 Global user data

Definition, 101 Group variable

_MccRetSyncStart, 214

I I/O variable

Creating, 117, 128 Direct access, 114, 117 Process image, 114, 117 Process image of the BackgroundTask, 124

Importing MCC chart as MCC, 50 MCC source file from XML data, 40, 49

Inheritance For technology objects, 99

Initialization Time of the variable initialization, 105

Input fields, 64 INT, 91 INT#MAX, 93 INT#MIN, 93 Integer

Data types, 91

K Key combinations, 28 Know-how protection, 38

Page 546: MC SIMOTION MCC Programming Manual

Index

SIMOTION MCC Motion Control Chart 546 Programming and Operating Manual, 08/2008

L LAD, 153 LAD/FBD

downloading programs to the target system, 496 Ladder diagram, 153

Closing a branch, 156 description of elements, 155, 158 Fundamentals, 529 Opens a branch, 156

Library, 165 Compiling, 167 Technology package, 165

LREAL, 91

M Maximizing detail view, 26 Maximizing working area, 26 MCC

Introduction, 21 MCC chart

Accept, 47 assigning programs to a task, 491 closing, 47 Compiling, 47 defining order, 48 deleting, 47 downloading programs to the target system, 496 downloading task to the target system, 491 Editor, 55 exporting, 39, 48 exporting to program source files, 51 Features, 50 Importing, 39, 48 importing as MCC, 50 Inserting, 45 inserting commands, 55 monitoring program execution, 506 moving to the foreground, 27 Opening, 47 representation in the Workbench, 25 representing commands, 57 single step monitoring, 507 State, 508 Toolbar, 55 Tracking program execution, 506 using in program source files, 51 zooming in/out, 26

MCC charts changing the creation type, 51 Rename, 41, 51

using test functions, 41 wait commands, 53

MCC source file Accept, 36 closing, 37 Compiling, 36 cutting, 38 deleting, 38 exporting as an ST source file, 39 exporting in XML format, 40, 49 Features, 41 importing from XML data, 40, 49 Inserting, 33 Know-how protection, 38 Opening, 36 Pasting, 38 Toolbar, 37

measuringInputType, 98 Menu bar, 28 Mode

Debug mode, 498, 516 Test mode, 498

Module creation, 60

N Name space, 132 New

I/O variable, 117, 128 MCC chart, 45 MCC source file, 33

Numeric data types, 91

O Open

MCC chart, 47 MCC source file, 36

Operating mode Process mode, 498

Operator input options, 28 outputCamType, 98

P posAxis, 98 Preprocessor

Activating, 44 Using, 44

Principles of programming, 54 Print, 169

Page 547: MC SIMOTION MCC Programming Manual

Index

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 547

Process image Features, 115 principle and use, 114, 123

Process image of the BackgroundTask, 114 Process image of the cyclic tasks, 114, 117 Process mode, 498 Program

see MCC chart, 36, 47 Program run, 510

Toolbar, 511 Program structure, 150 Programming

Principle, 22 Proceed as follows, 23

R REAL, 91 Reference, 98 Reference data, 147 References, 4 Registers

Dynamic response, 73 Expert, 76

Rename, 41, 51 reuse

MCC chart, 47 MCC source file, 36

RUN Effect on variable initialization, 105

S Scope of the declarations, 87 Selection lists, 64 Sequential program execution

Effect on I/O access, 114, 117 Effect on variable initialization, 105

Settings, 30 Single axis commands, 283 single step monitoring

TSI#dwuser_1, 506 TSI#dwuser_2, 506

Single step monitoring Cross-reference list, 148

SINT, 91 SINT#MAX, 93 SINT#MIN, 93 ST

_alarm, 132 _alarmS, 225, 227

_alarmSId, 225, 227 _alarmSq, 225, 227 _alarmSqId, 225, 227 _device, 132 _direct, 132 _disableAxis, 254 _disableAxisSimulation, 188 _disableCamTrack, 379 _disableCamTrackSimulation, 188 _disableFollowingObjectSimulation, 188 _disableMeasuringInput, 346 _disableMeasuringInputSimulation, 188 _disableMonitoringOfEncoderDifference, 337 _disableOutputCam, 364 _disablePathObjectSimulation, 188 _disableQFAxis, 265 _disableScheduler, 218 _enableAxis, 250 _enableAxisSimulation, 186 _enableCamming, 425 _enableCamTrack, 375 _enableCamTrackSimulation, 186 _enableExternalEncoder, 328 _enableFollowingObjectSimulation, 186 _enableGearing, 391 _enableMeasuringInput, 343 _enableMeasuringInputCyclic, 343 _enableMeasuringInputSimulation, 186 _enableOutputCam, 361 _enableOutputCamSimulation, 186 _enablePathObjectSimulation, 186 _enableQFAxis, 259 _enableScheduler, 218 _enableTorqueLimiting, 302 _enableVelocityGearing, 409 _getStateOfTask, 200 _getStateOfTaskId, 200 _GetStateOfXCommand, 237, 243 _getSyncCommandId, 218 _getTaskId, 201 _homing, 287 _move, 269, 273 _project, 132 _redefinePosition, 321, 349 _resetAdditionObject, 190 _resetAdditionObjectError, 221, 223 _resetAxis, 190 _resetAxisError, 220, 223 _resetCam, 190 _resetCamError, 220, 223 _resetCamTrack, 190 _resetCamTrackError, 220, 223

Page 548: MC SIMOTION MCC Programming Manual

Index

SIMOTION MCC Motion Control Chart 548 Programming and Operating Manual, 08/2008

_resetControllerObject, 190 _resetControllerObjectError, 221, 223 _resetExternalEncoder, 190 _resetExternalEncoderError, 220, 223 _resetFixedGear, 190 _resetFixedGearError, 221, 223 _resetFollowingObject, 190 _resetFollowingObjectError, 220, 223 _resetFormulaObject, 190 _resetFormulaObjectError, 221, 223 _resetMeasuringInput, 190 _resetMeasuringInputError, 220, 223 _resetMotionBuffer, 323 _resetOutputCam, 190 _resetOutputCamError, 220, 223 _resetPathObject, 190 _resetPathObjectError, 221, 223 _resetSensor, 190 _resetSensorError, 221, 223 _resetTask, 198 _resetTaskId, 198 _resetTController, 190 _resetTControllerError, 221, 223 _resetTechnologicalErrors, 220 _restartTask, 194 _restartTaskId, 194 _resumeTask, 197 _resumeTaskId, 197 _setCamOffset, 447 _setCamScale, 447 _setMaster, 254, 259, 265, 269, 273, 279, 282, 287, 296, 302, 308, 312, 314, 318, 321, 323, 326, 391, 409, 426 _setOutputCamCounter, 361 _setOutputCamState, 364, 368 _startSyncCommands, 218 _stop, 279 _stopEmergency, 279 _suspendTask, 195 _suspendTaskId, 195 _task, 132 _tcpCloseConnection, 232 _tcpCloseServer, 232 _tcpOpenClient, 230 _tcpOpenServer, 230 _tcpReceive, 245 _tcpSend, 238 _to, 132 _udpReceive, 245 _udpReceive, 243 _udpSend, 238 _waitTime, 172, 218

_Xreceive, 245 _Xreceive, 243 _Xsend, 238 BEGIN_SYNC, 218 END_EXPRESSION, 176, 177, 180, 218 END_SYNC, 218 END_WAITFORCONDITION, 176, 177, 180, 218 EXPRESSION, 176, 177, 180, 218 tcpReceive, 243 Value assignments, 182, 183 WAITFORCONDITION, 176, 177, 180, 218

Step enabling condition, 79 STOP to RUN

Effect on variable initialization, 105 STRING, 92 StructAlarmId, 95 STRUCTALARMID#NIL, 95 StructTaskId, 95 STRUCTTASKID#NIL, 95 Structures, 96 Subroutine, 133

as a function, 133 as a function block, 133 Call, 135 information exchange, 134 inserting in MCC chart, 135 programming, 135

Symbol browser, 502 Synchronous start

Group variable _MccRetSyncStart, 214 System function

Call, 162 inserting in MCC chart, 162 programming, 162

System functions Inheritance, 99

System variables Inheritance, 99

T T#MAX, 93 T#MIN, 93 Task

Effect on variable initialization, 105 Technology object

Assignment to a command, 67 Data type, 98 Inheritance, 99 Variable as a reference, 67

Technology package in library, 165

Page 549: MC SIMOTION MCC Programming Manual

Index

SIMOTION MCC Motion Control Chart Programming and Operating Manual, 08/2008 549

Test mode, 498 TIME, 92 Time types

Overview, 92 TIME#MAX, 93 TIME#MIN, 93 TIME_OF_DAY, 92 TIME_OF_DAY#MAX, 93 TIME_OF_DAY#MIN, 93 TO#NIL, 98 TOD, 92 TOD#MAX, 93 TOD#MIN, 93 Toolbar, 28

MCC editor, 55 MCC source file, 37

Trace, 512 Transition behavior, 79 TSI#dwuser_1

Cross-reference list, 148 single step monitoring, 506

TSI#dwuser_2 Cross-reference list, 148 single step monitoring, 506

U UDINT, 91 UDINT#MAX, 93 UDINT#MIN, 93 UINT, 91 UINT#MAX, 93 UINT#MIN, 93 using test functions, 41 USINT, 91

USINT#MAX, 93 USINT#MIN, 93

V VAR, 100 VAR_GLOBAL, 100 VAR_GLOBAL CONSTANT, 100 VAR_GLOBAL RETAIN

RETAIN, 100 VAR_IN_OUT, 100 VAR_INPUT, 100 VAR_OUTPUT, 100 VAR_TEMP, 100 Variable types, 85

Keywords, 100 Variables, 100

defining, 101 local variable, 104 Process image, 114, 123 Reference to a technology object, 67 Reference to a technology object: Example of an absolute encoder, 68 Reference to a technology object: Example of time-based cams, 70 timing of initialization, 105 unit variable, 102 Watch tables, 504

W Watch tables, 504 WORD, 91