Manual. Libraries MPLCTec..._MDX, MPLCTecVirtualEncoder for MOVI-PLC. Edition 07/ / EN

Similar documents
Drive Technology \ Drive Automation \ System Integration \ Services. MPLCTec.._MX Libraries. Manual. Edition 04/ / EN

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. CCU Universal Module Application Module

Manual. MOVIDRIVE MDX60B / 61B Crane Control Application. Edition 01/ / EN

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVITRAC B Simple Positioning Application Module

Manual. MOVIAXIS MX Multi-Axis Servo Inverter Virtual Encoder Technology Function. Edition 05/ / EN

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIFIT SNI UFF41B/UFR41B Fieldbus Gateway for MOVIGEAR SNI

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIFIT SNI Fieldbus Gateway UFF41B for MOVIGEAR SNI

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. Control Cabinet Inverter MOVITRAC B Functional Safety

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVITRAC B Simple Positioning Application Module

Addendum to the System Manual. MOVIGEAR SNI Expanded Parameter Setting and Diagnostics with MOVITOOLS MotionStudio. Edition 01/ / EN

Drive inverter for asynchronous AC motors without encoder feedback. The units are not option capable.

Manual. TwinCAT MC Flying Saw. TwinCAT 3. Version: Date: Order No.: TF5055

Manual. Decentralized Drive Control MOVIFIT FDC-SNI Connection to PROFIBUS/DeviceNet with UFF41B Fieldbus Gateway

The right control system for each application: Controlling movement with MOVI-PLC

Drive Technology \ Drive Automation \ System Integration \ Services. MOVITOOLS MotionStudio. Manual. Edition 06/ / EN

Addendum to the Operating Instructions

The 7-segment display shows the operating condition of MOVIDRIVE and, in the event of a fault, a fault or warning code.

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIDRIVE MDX61B Automotive AMA0801 Application Module

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. Electronic Motor DRC Functional Safety

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVITRAC MC07B Functional Safety

Drive Technology \ Drive Automation \ System Integration \ Services. Quick Start Guide. MOVIMOT MM..D With DRS/DRE/DRP AC Motor

PLC Lib: Tc3_MC2_AdvancedHoming

Manual. MOVIDRIVE MDX61B Safety Module Option DCS21B/31B. Edition 03/ / EN

Manual. MultiMotion / MultiMotion Light Technology Module Kinematics * _0714*

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIDRIVE MDX61B Internal Synchronous Operation (ISYNC)

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVITRAC MC07B Functional Safety

Manual. Fieldbus Interface DFE33B EtherNet/IP and Modbus/TCP. Edition 10/ / EN

Manual. MOVIFIT Function Level "Classic" Edition 06/2006 FC / EN

Manual. MOVIFIT Function Level "Technology" Edition 08/2006 FC / EN

Addendum to the Operating Instructions

* _1216* Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIPRO with EtherNet/IP or Modbus/TCP Fieldbus Interface

Installation Instructions

Manual. Decentralized Extra-Low Voltage Servo Drive CMP ELVCD Functional Safety * _0717*

Manual. Fieldbus Gateway UFF41B DeviceNet and PROFIBUS DP. Edition 02/ / EN

Manual. MOVIFIT Function Level "System" Edition 06/2006 FC / EN

Addendum to the Manual

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIPRO -SDC With EtherNet/IP and Modbus/TCP Interface

Application for Drive Technology

Cover. Technology Template MC_MoveJOG. Technology CPU. Documentation March Applikationen & Tools. Answers for industry.

* _1216* Drive Technology \ Drive Automation \ System Integration \ Services. Manual. Electronic Motor DRC..

Manual. DFS21B PROFINET IO Fieldbus Interface with PROFIsafe (Safe Stop) Edition 10/ / EN

Technical Manual. Linear Flying Shear Application Solution Package. for MPiec Controllers

Edition. MOVITRAC 07 Communication 06/2003. Manual / EN

Manual. Fieldbus Interface DFP21B PROFIBUS DP-V1. Edition 07/2006 FA / EN

Manual. MOVI-PLC advanced DHE41B/DHF41B/DHR41B Controller. Edition 04/ / EN

SIMATIC S7-1500T "Flying Saw" FlyingSawBasic for SIMATIC. Application examples / V1.0 / 08/2017. Siemens Industry Online Support

Manual. Controllers DHE21B / DHF21B / DHR21B (standard) DHE41B / DHF41B / DHR41B (advanced)

Application about Drive Technology

Manual. MOVIDRIVE MDX61B DFD11B Fieldbus Interface DeviceNet. Edition 11/2004 FA / EN

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIPRO SDC with DeviceNet Interface

Manual. MOVIAXIS MX Fieldbus Interface XFP11A PROFIBUS DP. Edition 04/2006 FB / EN

Micro800 Programmable Controllers: Getting Started with Motion Control Using a Simulated Axis

FAST Application Software. Technology module. Track Pick & Place Reference Manual EN. Ä.V2Qä

MOVIDRIVE Drive Inverters

CMMT-AS-PN controlled by SINAPOS functions block with Siemens S controller

SIMATIC Easy Motion Control. Getting Started Edition 02/2003. First Steps in Commissioning

S Motion Control V12 SP1 SIMATIC. STEP 7 S Motion Control V12 SP1. Preface. Using S Motion Control. S Motion Control 2

Interpreter. SIMOTION Interpreter. Preface 1. Structure of a command 2. Commands for program control of the Interpreter 3. Motion control commands 4

MOVIDRIVE MD_60A Drive Inverter

Revision. Decentralized Drive and Application Control MOVIPRO ADC with PROFINET interface * _1017*

Rexroth MLC Tech-FB for Packaging Applications

Application Note. Rotary Knife Application Solution Package for MPiec Series Controllers

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. Communication Interface FSE24B EtherCAT For MOVITRAC B

* _0815* Drive Technology \ Drive Automation \ System Integration \ Services. Manual. UHX71B Controller (Performance Class power)

Operating displays for MC_40A (without fieldbus) [1] Operation LED V1 (three colors: green/red/yellow) Color Operating state Description

Manual. TwinCAT MC Camming. TwinCAT. Version: Date: Order No.: TS5050

SIMOTION. Supplement to SIMODRIVE POSMO A Positioning Motor. Introduction. Description 1. Function blocks 2. Application example 3.

Manual. Fieldbus Interface DFS11B PROFIBUS DP-V1 with PROFIsafe. Edition 09/ / EN

User Manual Connection to BRC-Symbolic

MOVIDRIVE MDX61B INTERBUS DFI11B Fieldbus Interface

Manual. PLC Lib: Tc2_SMI. TwinCAT 3. Version: Date:

Manual. NC PTP: Quick Starting Guide. TwinCAT 3. Version: Date: Order No.: TF5000

Servo press kit YJKP - Host interface

Operating Instructions MOVISAFE UCS.B Safety Modules

Manual. DFE32B PROFINET IO Fieldbus Interface. Edition 09/ / EN

KOLLMORGEN. SERVOSTAR CD. SERCOS IDN Manual M-SS rev. F. Solutions by D A N A H E R M O T I O N

FAST Application Software. Technology module. Cross Cutter _ Reference Manual EN. Ä.V2+ä

* _0318* Drive Technology \ Drive Automation \ System Integration \ Services. Manual. DFS21B PROFINET IO Fieldbus Interface with PROFIsafe

* _1017* Drive Technology \ Drive Automation \ System Integration \ Services. Revision. MOVIPRO SDC With PROFINET Interface

SIMOTION. SIMOTION SCOUT Reading and Writing Drive Data. Preface. Fundamental safety instructions 1. Description 2.

FAST Application Software. Technology module. Virtual Master _ Reference Manual EN. Ä.V2Uä

Manual. Controller DHE/DHF/DHR21B (standard) and DHE/DHF/DHR41B (advanced) * _0816*

Operating Instructions

* _1118* Drive Technology \ Drive Automation \ System Integration \ Services. Manual. Interface Adapter USM21A

11 Operation and Servicing

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. Communication Interface FSE24B EtherCAT for MOVITRAC B


LXM23A CANopen Fieldbus protocol for servo drive Fieldbus manual V2.00,

Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVIDRIVE MDX61B DFS22B Fieldbus Interface PROFINET IO with PROFIsafe

FAST Application Software. Technology module. Table Positioning _ Reference Manual EN. Ä.V2Mä

User Manual AC Servo Controller YukonDrive Sercos II and III

Lexium Controller. Keypad VW3M1701. User s Manual. Retain for future use

Manual. MOVIDRIVE MDX61B "Table Positioning" Application. Edition 09/ / EN

SIMATIC/SINAMICS. Getting started with SINAMICS V90 PN on S Motion Control. Fundamental safety instructions 1. Introduction

SINAMICS SINAMICS G120. Frequency inverter with Control Units CU240E-2 CU240E-2 DP CU240E-2 F CU240E-2 DP-F. Function Manual Safety Integrated 07/2010

Profibus DP Expansion Board

SIMOTION. Supplement to SIMODRIVE POSMO A Positioning Motor. Introduction. Fundamental safety instructions 1. Description 2.

* _0516* Drive Technology \ Drive Automation \ System Integration \ Services. Manual. MOVI-C CONTROLLER power UHX85A and power eco UHX84A

WMX Parameter Manual

Manual. Configuration and Diagnostics Tool MOVIVISION Version Edition 07/2005 FE / EN

Transcription:

Gearmotors \ Industrial Gear Units \ Drive Electronics \ Drive Automation \ Services Libraries MPLCTec..._MDX, MPLCTecVirtualEncoder for MOVI-PLC Edition 7/27 11494212 / EN Manual

SEW-EURODRIVE Driving the world

1 General Information... 5 1.1 Structure of the safety notes... 5 1.2 Rights to claim under limited warranty... 5 1.3 Exclusion of liability... 5 1.4 Other applicable documentation... 6 1.5 General safety notes for bus systems... 6 1.6 Safety functions... 6 1.7 Hoist applications... 6 2 MPLCTecVirtualEncoder... 7 2.1 Introduction... 7 2.2 Areas of application... 7 2.3 Project planning... 8 2.3.1 Prerequisites... 8 2.3.2 Basic principle and notes... 8 2.3.3 Project planning procedure... 8 2.4 Overview of the MPLCTecVirtualEncoder library... 9 2.4.1 Determining the address and addressing of the virtual encoder... 11 2.4.2 Output data and actual values of the virtual encoder... 12 2.4.3 StateVirtualAxis diagram... 13 2.4.4 Function modules of the MPLCTecVirtualEncoder library... 14 2.5 Example... 31 2.5.1 Virtual encoder is operated with speed control... 31 2.6 Appendix... 33 2.6.1 Aborting function modules (CommandAborted output signal)... 33 3 MPLCTecGearMotion_MDX... 35 3.1 Introduction... 35 3.2 Application areas... 35 3.3 Project planning... 36 3.3.1 Prerequisites... 36 3.3.2 Basic principle and notes... 36 3.3.3 Startup cycle and offset types... 36 3.3.4 Various start events for startup cycle and offset travel... 39 3.3.5 Project planning procedure... 42 3.4 Overview of the MPLCTecGearMotion_MDX library... 44 3.4.1 Data types of the MPLCTecGearMotion_MDX library... 46 3.4.2 Restore function for saving MOVIDRIVE system variables... 48 3.4.3 Function modules of the MPLCTecGearMotion_MDX library... 49 3.5 Examples... 68 3.5.1 Example 1: Synchronous operation with external encoder as master and direct engaging / disengaging... 68 3.5.2 Example 2: Synchronous operation with virtual encoder as master. 69 3.5.3 Example 3: MOVIDRIVE as master sends position via SBUs... 71 3.6 Appendix... 74 3.6.1 Abortion of function modules (CommandAborted output signal)... 74 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 3

4 MPLCTecCamMotion_MDX... 76 4.1 Introduction... 76 4.2 Project planning... 76 4.2.1 Prerequisites... 76 4.2.2 Notes... 77 4.3 Overview of the MPLCTecCamMotion_MDX library... 77 4.3.1 Data types of the MPLCTecCamMotion_MDX library... 79 4.3.2 Data types of the MC_CamLinkTec_MDX function module... 82 4.3.3 Function modules of the MPLCTecCamMotion_MDX library... 83 4.4 Appendix... 118 4.4.1 Abortion of function modules (CommandAborted output signal)... 118 4.5 Cam examples... 12 4.5.1 Example 1: Curve design with the Motion Technology Editor... 12 4.5.2 Example 2: Creating PLC user program... 126 4.5.3 Programming notes... 132 4.5.4 Diagnostics functions in the Motion Technology Editor... 133 4.5.5 Operation with virtual master encoder... 135 4.5.6 Axis driver AxisControlCam for cam applications... 138 4.6 Appendix... 139 4.6.1 Changing the interpolation time manually (MFilterTime)... 139 4.6.2 Read / write a curve set via the VarData service... 141 4.6.3 Allocation of the remanent IPOS plus variables and scaling factors... 142 5 MPLCTecCamSwitch_MDX... 143 5.1 Introduction... 143 5.2 Areas of application... 143 5.3 Project planning... 144 5.3.1 Prerequisites... 144 5.4 Overview of the MPLCTecCamSwitch_MDX library... 144 5.4.1 Data types of the MPLCTecCamSwitch_MDX library... 145 5.4.2 Restore function for saving the MOVIDRIVE system variables... 147 5.4.3 Function modules of the MPLCTecCamSwitch_MDX library... 148 6 Index... 157 4 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

General Information Structure of the safety notes 1 Manual 1 General Information 1.1 Structure of the safety notes The safety notes in this manual are designed as follows: Pictogram SIGNAL WORD! Type and source of danger. Possible consequence(s) if the safety notes are disregarded. Measure(s) to prevent the danger. Pictogram Signal word Meaning Consequences in case of disregard Example: DANGER! Imminent danger Severe or fatal injuries General danger WARNING! Possible dangerous situation Severe or fatal injuries CAUTION! Possible dangerous situation Minor injuries Specific danger, e.g. electric shock STOP! Possible damage to property Damage to the drive system or its environment NOTE Useful information or a tip Simplifies the handling of the drive system 1.2 Rights to claim under limited warranty A requirement of fault-free operation and fulfillment of any rights to claim under limited warranty is that you adhere to the information in the MOVI-PLC documentation. Therefore, read the manual before you start operating the unit. Make sure that the manual is available to persons responsible for the plant and its operation, as well as to person who work independently on the unit. You must also ensure that the documentation is legible. 1.3 Exclusion of liability You must comply with the information contained in the MOVI-PLC documentation to ensure safe operation of the MOVI-PLC controller and to achieve the specified product characteristics and performance requirements. SEW-EURODRIVE assumes no liability for injury to persons or damage to equipment or property resulting from non-observance of these operating instructions. In such cases, any liability for defects is excluded. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 5

General Information 1 Other applicable documentation 1.4 Other applicable documentation Installation and startup only by trained personnel observing the relevant accident prevention regulations and the following documents: "MOVIDRIVE MDX6B/61B" operating instructions "MOVI-PLC basic DHP11B controller" manual "MOVI-PLC advanced DH.41B" manual "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " manual. "Libraries for MOVI-PLC Fault Codes" manual "MOVI-PLC programming in the PLC Editor" system manual Read through this manual carefully before you commence installation and startup of the MOVI-PLC controller. As a prerequisite to fault-free operation and fulfillment of warranty claims, you must adhere to the information in the documentation. 1.5 General safety notes for bus systems You are now in possession of a communication system that lets you adapt MOVI-PLC controllers and MOVIDRIVE B inverters to the particulars of your specific system. As with all bus systems, there is a danger of invisible, external (as far as the inverter is concerned) modifications to the parameters which give rise to changes in the unit behavior. This may result in unexpected (not uncontrolled) system behavior. 1.6 Safety functions MOVI-PLC may not execute any safety functions. For safety applications, refer to the information in the following publication. Safe disconnection for MOVIDRIVE Use only those components in safety applications that were explicitly delivered in this design by SEW-EURODRIVE! 1.7 Hoist applications Hoist applications can only be implemented with MOVI-PLC under the following conditions: A special hoist startup must be performed. MOVI-PLC is not designed for use as a safety device in hoist applications. Use monitoring systems or mechanical protection devices as safety equipment to avoid possible damage to property or injury to people. 6 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Introduction I 2 2 MPLCTecVirtualEncoder 2.1 Introduction The MPLCTecVirtualEncoder library offers function modules for implementing a virtual motor axis. The motor axis can be operated like a real drive in various operating modes. You can operate the virtual encoder as speed-controlled motor axis move to absolute target positions in positioning mode perform endless movement over a specified distance Velocities and ramps can be set, which means a specified travel profile can be implemented. Depending on which mode is set, the current position of the virtual encoder is sent via the SBus with a resolution of 496 increments (MOVIDRIVE B mode), or with 65536 increments per revolution (MOVIAXIS mode) as cyclic transmit object. It can be used as master value, for example for synchronous operation slaves or electronic cam slaves. 2.2 Areas of application The MPLCTecVirtualEncoder library is suited for all applications in which a central position master value is needed. This position master value is then used as common master signal for several motor axes in a synchronous operation system. Application examples Material handling, e.g. two-axis pick and place unit Synchronous material transportation, e.g. several conveyor belts are synchronized to one master Multi-axis hoists/trolleys Packaging technology, e.g. tubular bag machines Properties Two independent virtual encoders are possible Various operating modes: Absolute positioning Relative positioning Speed control Absolute modulo positioning Relative modulo positioning Setting the current position to a certain value ("virtual reference travel") Current position can be stored in a non-volatile memory ("Absolute encoder functionalilty") Adjustable cycle time for sending the position Automatic setup of a synchronization object for synchronizing the SBus MOVIDRIVE or MOVIAXIS mode selectable with corresponding scaling of velocities and ramps as well as respective encoder resolution Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 7

I MPLCTecVirtualEncoder 2 Project planning 2.3 Project planning 2.3.1 Prerequisites To be able to use the MPLCTecVirtualEncoder library, you need a MOVI-PLC controller in technology version T1 or higher. 2.3.2 Basic principle and notes The MPLCTecVirtualEncoder library automatically includes the MPLCTecFct_ProfGen library. The LinProfGen function module represents the actual profile generator. This function module is configured to the required function by the library modules in order to keep handling the virtual encoder as simple as possible. The MC_LinkTecAxis_Virtual function module is mandatory for using the virtual encoder. The function module is used, among others, to determine the logical address and the synchronization object for SBus synchronization as well as to create the send object for the current position. This function module must be called in a cyclic task that corresponds to the set cycle time (recommended: 5 ms function module is called cyclically at intervals of 5 ms; so-called 5 ms task) The sycnchronization object has the fixed identifier 1 (ID1). The send object of the first virtual encoder is assigned ID 2 and the second virtual encoder is assigned ID3 to ensure that these objects have the highest priority on the SBus. The current position of the virtual encoder is stored in a non-volatile memory. Some of the system variables are used for this purpose. System variables beginning from H2 should therefore not be written by the user program. 2.3.3 Project planning procedure The function modules of the MPLCTecVirtualEncoder library are divided into three directories. VirtualEncoder_ Main VirtualEncoderMain directory: MC_LinkTecAxis_Virtual MC_ModeSelect_Virtual VirtualEncoder_ Parameter VirtualEncoderParameter directory: MC_SetDynamics_Virtual MC_SetModuloParameters_Virtual VirtualEncoder_ SingleAxis VirtualEncoderSingleAxis directory: MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual MC_MoveVelocity_Virtual 8 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_Stop_Virtual MC_SetActPos_Virtual Procedure Insert the MPLCTecVirtualEncoder library into the project using the Library Manager. Create a cyclic task calling a program that includes the MC_LinkTecAxis function module ( Sec. "Example") You can call function modules of the type VirtualEncoder_SingleAxis for implementing the required functions in a cyclic or free-wheeling task. 2.4 Overview of the MPLCTecVirtualEncoder library 61652AXX VirtualEncoder_- Main VirtualEncoder_Main directory: MC_LinkTecAxis_Virtual function module The MC_LinkTecAxis_Virtual function module is the central interface to the technology function "Virtual encoder". It provides the following functions: Determine the logical address Create the cyclic send objects Implement the absolute encoder functionality Configure the virtual profile generator Output the current position, velocity and status MC_ModeSelect_Virtual function module The MC_ModeSelect_Virtual function module lets you choose whether the virtual encoder is operated in MOVIAXIS mode or in MOVIDRIVE mode. Both encoder resolution and scaling of the dynamic parameters will be adjusted accordingly. VirtualEncoder_ Parameter VirtualEncoder_Parameter directory: MC_SetDynamics_Virtual function module Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 9

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library The MC_SetDynamicsVirtual function module is used to change the velocity, ramps and jerk time during travel. MC_SetModuloParameters_Virtual function module The MC_SetModuloParameters_Virtual function module is used to set the modulo parameters ModuloResolution and EncoderResolution. VirtualEncoder_ SingleAxis VirtualEncoder_SingleAxis directory: MC_MoveAbsolute_Virtual function module The MC_MoveAbsolute_Virtual function module lets you start a positioning travel to an absolute target with specified velocity and ramp. MC_MoveAbsoluteModulo_Virtual function module The MC_MoveAbsoluteModulo_Virtual function module starts a positioning travel to an absolute target in modulo format with specified velocity and ramp. MC_MoveRelative_Virtual function module The MC_MoveRelative_Virtual function module starts a relative positioning travel from the current position with specified step width, velocity and ramp. MC_MoveRelativeModulo_Virtual function module The MC_MoveRelativeModulo_Virtual function module starts a relative modulo positioning from the current position with specified step width, velocity and ramp. MC_MoveVelocity_Virtual function module The MC_MoveVelocity_Virtual function module starts a process of endless movement with set velocity and ramp (speed control). MC_SetActPos_Virtual function module The MC_SetActPos_Virtual function module is used to set the current position to a specified value. In this way, a virtual reference travel can be implemented comparable with reference travel type 5 for MOVIDRIVE. MC_Stop_Virtual function module The MC_Stop_Virtual function module stops an already started travel of the virtual encoder. 1 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 2.4.1 Determining the address and addressing of the virtual encoder The MC_LInkTecAxis_Virtual function module determines the axis reference AXIS_REF_VIRTUAL from the input SendObjectID as logical address for the remaining modules of the MPLCTecVirtualEncoder library. The MPLCDatatypes library includes the file type MC_PDO_ID_MDX where two settings are provided for the virtual encoder ( following figure). 61653AXX Example The MC_LinkTecAxis_Virtual function module contains the "MDX_VIRTUAL_ENCODER_ID1" signal at the input MDX_VIRTUAL_ENCODER_ID1 and outputs the axis reference LogAdrVirt as logical address at the output VirtualAxis ( following figure). LinkTecVirtual MC_LinkTecAxis_Virtual MoveAbsoluteVirtual MC_MoveAbsolute_Virtual TRUE 5 FALSE FALSE MDX_VIRTUAL_ENCODER_ID1 SBUS_NODE_1 Execute CycleTime Modulo SaveActPosition SendObjectID Node Done Busy Error ErrorID VirtualAxis VirtualAxisData LinkState TargetPos TargetSpeed 5 LogAdrVirt 5 LogAdrVirt Execute Position Velocity Acceleration Deceleration JerkTime Axis Done Active CommandAborted Error ErrorID 61654AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 11

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library 2.4.2 Output data and actual values of the virtual encoder The MC_LinkTecAxis_Virtual function modules provides as output the status of the virtual encoder as well as the current actual speed and position values. [1] [2] [3] [1] Axis reference output [2] Current speed and position output [3] Current status display 61655AXX NOTE The states Active and Done indicated under VirtualAxisData are used within the library. These status messages are saved and deleted by the relevant Move function modules because the profile generator in the MC_LinkTecAxis_Virtual function module is edge controlled. This is the reason why the status messages of the Move module should rather be used for inhibit or step enabling conditions in the user program. 12 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 2.4.3 StateVirtualAxis diagram MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual MC_MoveVelocity_Virtual MC_MoveVelocity_Virtual DISCRETE_ MOTION MC_Stop_Virtual MC_Stop_Virtual CONTINUOUS MOTION STOPPING MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual "Done" von: MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual MC_Stop_Virtual Done MC_MoveVelocity_Virtual All States MC_LinkAxis_Virtual Done = FALSE LinkState = NOTLINKED STANDSTILL MC_LinkTecAxis_Virtual Done = TRUE LinkState = INITIALIZED NOT_CONNECTED 61885AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 13

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library 2.4.4 Function modules of the MPLCTecVirtualEncoder library MC_LinkTecAxis_Virtual function module MC_LINKTECAXIS_VIRTUAL Enable : BOOL CycleTime : BYTE Modulo : BOOL SaveActPosition : BOOL SendObjectID : MC_PDO_ID_MDX Node : CAN_NODE Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD VirtualAxis : AXIS_REF_VIRTUAL VirtualAxisData : MC_DATA_VIRTUAL LinkState : MC_LINKTECSTATE 61656AXX Description The MC_LinkTecAxis_Virtual function module constitutes the logical interface to the technology function "Virtual encoder". The axis reference is determined using the SendObjectID input signal and the logical address is output as VirtualAxis output signal. The send objects for the cyclical sending of position and SyncID are created during the initialization. You can set the cycle time of the virtual encoder using the input signal CycleTime. If the input Modulo = TRUE, the modulo position will be sent, else the linear position will be sent. These settings only refer to the position to be sent, not to the modulo function as such. This means positioning can be performed in modulo format but the linear position will be sent. The input signal SaveActPosition lets you set whether the virtual encoder will start with the last actual value when the power supply is switched on, or whether it will start at position "". The current position, velocity and current status of the virtual encoder are available as output values. NOTES The MC_LinkTecAxis_Virtual function module is mandatory for using the virtual encoder and must be called cyclically in the program. If the output signal LinkState has the status NOTLINKED, none of the function modules of the MPLCTecVirtualEncoder library can be executed. The relevant error message will be issued. Note that the MC_LinkTecAxis_Virtual function module is called with the same cycle time as set at the CycleTime input. The virtual encoder can basically operate with a cycle time of 1 ms. The cycle time might be violated because internal system functions are also being processed during this time. SEW-EURODRIVE therefore recommends to set the cycle time to 5 ms or 1 ms. Different SendObjectID must be assigned for several virtual encoders even if they are created on various SBus nodes. 14 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 Input signals The following input signals can be set on the MC_LinkTecAxis_Virtual function module. Input signal Type Meaning Enable BOOL The function module is processed as long as the input signal Enable = TRUE. Initialization is performed with a rising edge. CycleTime BYTE Cycle time setting of the virtual encoder. 1 ms, 5 ms or 1 ms can be set. Modulo BOOL The modulo position is sent. SaveActPosition BOOL The current position is saved to a non-volatile memory. SendObjectID MC_PDO_ID_MDX Identifier with which the position is sent: MDX_VIRTUAL_ENCODER_ID1 MDX_VIRTUAL_ENCODER_ID2 Node CAN_NODE SBus node selection: SBUS_NODE_1 SBUS_NODE_2 Output signals The MC_LinkTecAxis_Virtual provides the following output signals. Output signal Type Meaning Done BOOL Initialization successfully completed, connection with "Virtual encoder" technology function established. Busy BOOL Initialization is performed. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault codes" manual VirtualAxis AXIS_REF_VIRTUAL Axis reference with the following data: LogAdr (logical address) PDO_ID (SendObjectID) Node (SBus node) VirtualAxisData MC_DATA_VIRTUAL Current velocity, current position values, current MotionState. LinkState MC_LINKTECSTATE Current status: GEN_TEC_NOTLINKED (no connection) GEN_TEC_INITIALIZED (cyclical data transfer successful) Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 15

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library MC_ModeSelect_Virtual function module MC_MODESELECT_VIRTUAL Execute : BOOL Mode : MC_ENCODERMODE_VIRTUAL Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61664AXX Description The MC_ModeSelect_Virtual function module lets you choose whether the virtual encoder is operated in MOVIDRIVE or MOVIAXIS mode. The encoder resolution and the scaling of dynamic parameters is set for the corresponding unit type depending on the chosen mode. Prerequisite The "Virtual encoder" technology function is created via the MC_LinkTecAxis_Virtual function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_ModeSelect_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Mode MC_ENCODERMODE Possible settings: _VIRTUAL VIRTUAL_MDX_MODE (resolution 496 inc./revolution) VIRTUAL_MX_MODE (resolution 65536 inc./revolution) Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_ModeSelect_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual 16 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_SetDynamics_Virtual function module MC_SETDYNAMICS_VIRTUAL Execute : BOOL Velocity : DINT Acceleration : DINT Deceleration : DINT JerkTime : DINT Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61665AXX Description The MC_SetDynamics_Virtual function module enables you to change the dynamic parameters of the virtual drive during a travel process. You can change the velocity, ramp and jerk times. The parameters are scaled in the respective system units depending on the set unit type (set in the MC_ModeSelect_Virtual function module). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_SetDynamics_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Velocity DINT Speed of the virtual encoder in 1/min. Acceleration DINT Acceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] Deceleration DINT Deceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] JerkTime DINT MDX mode: Jerk time in [ms] MX mode: Jerk in revolutions/min/s 2 [rpm/s 2 ] Axis AXIS_REF_VIRTUAL Logical address of the virtual drive that is to be addressed by the function module. Output signals The MC_SetDynamics_Virtual function module provides the following output signals: Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 17

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library MC_SetModuloParameters_Virtual function module MC_SETMODULOPARAMETERS_VIRTUAL Execute : BOOL ModuloResolution : UINT EncoderResolution : BYTE Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61666AXX Description The MC_SetModuloParameters_Virtual function module is used to set the parameters for calculating the modulo position. The input signal ModuloResolution determines the resolution of a modulo revolution. The input signal Encoder Resolution defines the encoder resolution that corresponds to a modulo revolution. Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_SetModuloParameters_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. ModuloResolution UINT Resolution of a modulo revolution, for example: 36 resolution in 1/1 degree; range: 1... 65535 EncoderResolution BYTE Encoder resolution with one modulo revolution. Setting as exponent of 2 16 2 16 = 65536 inc/revolutions; range: 2 1... 2 32 Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_SetModuloParameters_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 18 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_MoveAbsolute_Virtual function module MC_MOVEABSOLUTE_VIRTUAL Execute : BOOL Position : DINT Velocity : DINT Acceleration : DINT Deceleration : DINT JerkTime : DINT Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61669AXX Description The MC_MoveAbsolute_Virtual function module is used to start positioning to an absolute target. Velocity, acceleration and deceleration time as well as jerk time are set as dynamic parameters. The parameters are scaled in the respective system units depending on the selected unit type (set in the MC_ModeSelect_Virtual function module). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_MoveAbsolute_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Position DINT Absolute target position in increments. Velocity DINT Maximum positioning speed in 1/min. Acceleration DINT Acceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] Deceleration DINT Deceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s) [rpm/s] JerkTime DINT Jerk time MDX mode: Jerk time in [ms] MX mode: Jerk in revolutions/min/s 2 ) [rpm/s 2 ] Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 19

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library Output signals The MC_MoveAbsolute_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL Target position reached Active BOOL Virtual motor travels to target position. Command BOOL The job was aborted by another function module. Aborted Error BOOL Error in module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 2 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_MoveAbsoluteModulo_Virtual function module MC_MOVEABSOLUTEMODULO_VIRTUAL Execute : BOOL ModuloPosition : DINT Velocity : DINT Acceleration : DINT Deceleration : DINT JerkTime : DINT ModuloMode : MC_MODULOMODEVIRTUAL Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 6167AXX Description The MC_MoveAbsoluteModulo_Virtual function module is used to start a positioning process to an absolute target in modulo format. The input ModuloMode specified the travel strategy. The settings VIRTUAL_SHORT means that the target is approached by the shortest route. Velocity, acceleration and deceleration time as well as jerk time are set as dynamic parameters. The parameters are scaled in the respective system units depending on the selected unit type (set in the MC_ModeSelect_Virtual function module). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The input signals ModuloResolution and EncoderResolution in the MC_SetModuloParameters_Virtual function module are set. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 21

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library Input signals The following input signals can be set on the MC_MoveAbsoluteModulo_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. ModuloPosition DINT Absolute modulo target position in increments. Range:... ModuloResolution Velocity DINT Maximum positioning speed in 1/min. Acceleration DINT Acceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s) [rpm/s] Deceleration DINT Deceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s) [rpm/s] JerkTime DINT Jerk time MDX mode: Jerk time in [ms] MX mode: Jerk in revolutions/min/s 2 [rpm/s 2 ] ModuloMode MC_MODULOMODE_ Modulo travel strategy: VIRTUAL VIRTUAL_SHORT (shortest route) VIRTUAL_CW (CW only) VIRTUAL_CCW (CCW only) Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_MoveAbsoluteModulo_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL Target position reached Active BOOL Virtual motor travels to target position. Command BOOL The job was aborted by another function module. Aborted Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 22 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_MoveRelative_Virtual function module MC_MOVERELATIVE_VIRTUAL Execute : BOOL Distance : DINT Velocity : DINT Acceleration : DINT Deceleration : DINT JerkTime : DINT Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61671AXX Description The MC_MoveRelative_Virtual function module is used to start a relative positioning process based on the current position with the step width set on the Distance input. Velocity, acceleration and deceleration times as well as jerk time are set as dynamic parameters. The parameters are scaled in the respective system units depending on the selected unit type (set in the MC_ModeSelect_Virtual function module). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_MoveRelative_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Distance DINT Relative target position in increments with reference to the current position (at the start). Velocity DINT Maximum positioning speed in 1/min. Acceleration DINT Acceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s) [rpm/s] Deceleration DINT Deceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s) [rpm/s] JerkTime DINT Jerk time MDX mode: Jerk time in [ms] MX mode: Jerk in revolutions/min/s 2 ) [rpm/s 2 ] Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 23

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library Output signals The MC_MoveRelative_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL Target position reached Active BOOL Virtual motor travels to target position. Command BOOL The job was aborted by another function module. Aborted Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 24 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_MoveRelativeModulo_Virtual function module MC_MOVERELATIVEMODULO_VIRTUAL Execute : BOOL Distance : DINT Velocity : DINT Acceleration : DINT Deceleration : DINT JerkTime : DINT ModuloMode : MC_MODULOMODEVIRTUAL Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61673AXX Description The MC_MoveRelativeModulo_Virtual function module is used to start a relative positioning process based on the current modulo position with the step width set on the Distance input. The ModuloMode input is used to specify whether only CW or CCW direction of rotation is allowed or both directions of rotation. Velocity, acceleration and deceleration time as well as jerk time are set as dynamic parameters. The parameters are scaled in the respective system units depending on the selected unit type (set in the MC_ModeSelect_Virtual function module). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The input signals ModuloResolution and EncoderResolution in the MC_SetModuloParameters_Virtual function module are set. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 25

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library Input signals The following input signals can be set on the MC_MoveRelativeModulo_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Distance DINT Relative target position in increments with reference to the current start position. Velocity DINT Maximum positioning speed in 1/min. Acceleration DINT Acceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] Deceleration DINT Deceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] JerkTime DINT Jerk time MDX mode: Jerk time in [ms] MX mode: Jerk in revolutions/min/s 2 [rpm/s 2 ] ModuloMode MC_MODULOMODE_ Modulo travel strategy: VIRTUAL VIRTUAL_CW (CW only) VIRTUAL_CCW (CCW only) VIRTUAL_RELATIVE (both directions of rotation enabled) Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_MoveRelativeModulo_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL Target position reached Active BOOL Virtual motor travels to target position. Command BOOL The job was aborted by another function module. Aborted Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 26 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_MoveVelocity_Virtual function module MC_MOVEVELOCITY_VIRTUAL Execute : BOOL Velocity : DINT Acceleration : DINT Deceleration : DINT Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) InVelocity : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61674AXX Description The MC_MoveVelocity_Virtual function module is used to start continuous movement of the virtual encoder. Once the virtual encoder has started, it will run until it is stopped (using the MC_Stop_Virtual function module). Velocity, acceleration and deceleration times as well as jerk time are set as dynamic parameters. The parameters are scaled in the respective system units depending on the selected unit type (set in the MC_ModeSelect_Virtual function module). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_MoveVelocity_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Velocity DINT Maximum positioning speed in 1/min. Acceleration DINT Acceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] Deceleration DINT Deceleration: MDX mode: in [ms] with reference to a change in speed of 3 1/min MX mode: in revolutions/min/s [rpm/s] JerkTime DINT Jerk time MDX mode: Jerk time in [ms] MX mode: Jerk in revolutions/min/s 2 [rpm/s 2 ] Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 27

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library Output signals The MC_MoveVelocity_Virtual function module provides the following output signals. Output signal Type Meaning InVelocity BOOL Virtual encoder travels with target velocity. Active BOOL Virtual motor axis accelerates. Command BOOL The job was aborted by another function module. Aborted Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 28 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Overview of the MPLCTecVirtualEncoder library I 2 MC_SetActPos_Virtual function module MC_SETACTPOS_VIRTUAL Execute : BOOL SetModuloPos : BOOL SetPosition : DINT Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Error : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61676AXX Description The MC_SetActPos_Virtual function module is used to set the current position of the virtual encoder to a specified position (input SetPosition). This corresponds to reference travel type 5 for MOVIDRIVE (no reference travel, current position is reference position). Prerequisite The "Virtual encoder" technology function is created using the MC_LinkTecAxis_Virtual function module. The MC_SetActPos function module can only be executed if the output VirtualAxis- State of the MC_LinkTecAxis_Virtual function module has the status STANDSTILL. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_SetActPos_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. SetModuloPos BOOL You can use the input SetModuloPos to ohoose whether the modulo position or the linear position is to be set. SetPosition DINT Value to which the current position is to be set. Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_SetActPos_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL The task of the function module has been performed. Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 29

I MPLCTecVirtualEncoder 2 Overview of the MPLCTecVirtualEncoder library MC_Stop_Virtual function module MC_STOP_VIRTUAL Execute : BOOL Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) Done : BOOL Active : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) 61677AXX Description The MC_Stop_Virtual function module is used to stop the virtual motor axis. Both a movement started with the MC_MoveVelocity_Virtual function module and a positioning process can be stopped. In this case, the virtual encoder will use the ramp set in the MC_MoveVelocity_Virtual function module. Prerequisite The "Gear" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecAxis_Virtual function module has the status GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_Stop_Virtual function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_Stop_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL The task of the function module has been performed. Active BOOL Stop is active. Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 3 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Example I 2 2.5 Example 2.5.1 Virtual encoder is operated with speed control For reasons of clarity all function modules of the virtual encoder are called in the 5 ms task although this is only required for the MC_LinkTecAxis_Virtual function module. The virtual encoder is to be started and stopped in endless operation. The current position of the virtual encoder should serve as master value for a MOVIDRIVE unit in synchronous operation. Step 1: Create the program module VirtualAxis 61678AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 31

I MPLCTecVirtualEncoder 2 Example Step 2: Program call VirtualAxis in 5 ms task (task configuration) 61679AEN Step 3: Set the virtual encoder as synchronous master value with MOVIDRIVE The setting MDX_GEAR_RECEIVE_PDO_1 is used to set the MasterSource input of the MC_SetGearConfig_MDX function module in the default setting to the SendObjectID of the virtual encoder with logical address 1 (MDX_VIRTUAL_ENCODER_ID1). The MC_SetGearConfig_MDX function module is described in detail in the "MPLCTecGearMotion" section. If you do not want to use the default values, you can implement other values using the MC_InitialConfig_MDX function module of the MPLCMotion_MDX library. MC_SetGearConfig_MDX bgearconfig 5 7 MDX_GEAR_RECEIVE_PDO_1 MDX_GEAR_SLAVE_X15 1 1 5 5 5 LogAdrA1 Execute GFMaster GFSlave MasterSource SlaveSource ExternalSlaveEncoderNum ExternalSlaveEncoderDenom LagCountLifeTime RotationDirectionLock MasterSignalFilter FeedforwardFilter Axis Done Busy Error ErrorID bgearconfigured 6168AXX 32 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecVirtualEncoder Appendix I 2 2.6 Appendix 2.6.1 Aborting function modules (CommandAborted output signal) The CommandAborted output signal is used to indicate multiple calls of a movement module (MC_Move...) or call of another movement module. The aborted job will not be executed any longer ( "MPLCMotion_MDX und MPLCMotion_MX Libraries for MOVI- PLC manual). Activated function module MC_Stop_Virtual MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual MC_MoveVelocity_Virtual Creates CommandAborted to MC_MoveAbsolute_Virtual MC_MoveRelative_Virtual MC_MoveVelocity_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelativeModulo_Virtual Instances of MC_MoveAbsolute_Virtual MC_MoveVelocity_Virtual MC_MoveRelative_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelativeModulo_Virtual Instances of MC_MoveAbsoluteModulo_Virtual MC_MoveVelocity_Virtual MC_MoveAbsolute_Virtual MC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual Instances of MC_MoveRelative_Virtual MC_MoveVelocity_Virtual MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelativeModulo_Virtula Instances of MC_MoveRelativeModulo_Virtual MC_MoveVelocity_Virtual MC_MoveAbsolute_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelative_Virtual Instances of MC_MoveVelocity_Virtual MC_MoveAbsolute_Virtual MC_MoveRelative_Virtual MC_MoveAbsoluteModulo_Virtual MC_MoveRelativeModulo_Virtual Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 33

I MPLCTecVirtualEncoder 2 Appendix The following figure deptics the mutual cancellation conditions of the CommandAborted output signal. New instance: CA to previous MC_MoveRelative_Virtual Call creates CA New instance: CA to previous MC_MoveRelativeModulo_Virtual Call creates CA New instance: CA to previous MC_MoveAbsolute_Virtual Call creates CA New instance: CA to previous MC_MoveAbsoluteModulo_Virtual Call creates CA Call creates CA Call creates CA New instance: CA to previous MC_MoveVelocity_Virtual Call creates CA Call creates CA Call creates CA MC_Stop_Virtual 61681AEN NOTE The MC_Move... function modules cancel each other. 34 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Introduction I 3 3 MPLCTecGearMotion_MDX 3.1 Introduction The MPLCTecGearMotion_MDX library is based on the technology function "Internal synchronous operation (ISYNC)" of the MOVIDRIVE drive inverter. The following simplifications have been achieved compared to the previous solutions. Before: Familiarization in the SEW-specific programming language Specific knowledge required for creating and setting the parameters of the system variables for synchronous operation Solution with MOVI-PLC : Programming in accordance with IEC 61131, which means customer-specific applications can be easily implemented. Library for controlling the technology function "Internal synchronous operation". In this way, the technology function "Internal synchronous operation" can be configured and controlled easily without detailed knowledge of the individual firmware functions. Up to 12 (with MOVI-PLC basic) or up to 64 (with MOVI-PLC advanced) synchronous operation motor axes can be controlled centrally. Additional functions, such as specifying master values via a virtual encoder, are controlled centrally using the MOVI-PLC controller NOTES For general notes on the theory of operation of the library, refer to the "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " "MOVIDRIVE MDX61B Internal Synchronous Operation (ISYNC)" manual. 3.2 Application areas The MPLCTecGearMotion_MDX library is suited for all applications that require synchronized axis movements. Application examples Flying saw, e.g. to cut endless material Synchronous material transportation, e.g. several conveyor belts are synchronized to one master Multi-axis hoists/trolleys Filling station in the beverage industry Packaging technology, e.g. tubular bag machines Properties Up to 12 (with MOVI-PLC basic) or up to 64 (with MOVI-PLC advanced) motor axes can be operated in synchronous operation A variety of configuration options can be set clearly structured with the relevant function modules Various master encoder sources can be set Lag distance can be saved protected against power outage (for a limited time) Various master/slave combinations can be implemented; several synchronous operation masters can be configured Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 35

I MPLCTecGearMotion_MDX 3 Project planning 3.3 Project planning 3.3.1 Prerequisites In order to use the MPLCTecGearMotion library, you need a MOVI-PLC controller in technology version T1 or higher. A MOVIDRIVE B unit in standard version (..) is sufficient as drive inverter. Information in the "MOVIDRIVE MDX61B Internal Synchronous Operation (ISYNC)" manual The MPLCMotion_MDX library must be integrated. The prerequisites mentioned in the "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " manual apply as well. 3.3.2 Basic principle and notes Existing scope of functions of the ISYNC technology function are used with MOVIDRIVE B. Setting the corresponding system variables for synchronous operation using IEC function modules. Automatic changeover of ramp types during direct startup cycle or while preparing the startup cycle. On-the-fly changeover from synchronous operation to positioning. The MPLCTecGearMotion_MDX library should cover the most frequent synchronous operation applications. If specific ISYNC functions are required that are not covered, then the user can set the corresponding system variables using the existing function module MC_ReadParameter_MDX or MC_WriteParameter_MDX (MPLCMotion_MDXlibrary). The MC_LinkTecGear_MDX function module is mandatory as central data interface to the gear technology function, for example to administer the non-remanent system variables of the ISYNC technology function. Besides, the technology function "Internal synchronous operation" is enabled with MOVIDRIVE B. 3.3.3 Startup cycle and offset types You can define whether the startup cycle or offset travel is to be performed time-related or position-dependent. The choice whether the synchronization process is to be performed in a time-related or position-dependent manner is defined for the startup cycle through the input GearInMasterDistance of the MC_PrepareGearIn_MDX function module. In the case of offset travel, the choice whether the time-related or position-dependent synchronization process is to be used is made using the input GearOffsetMasterDistance of the MC_PrepareGearOffset_MDX function module. If the value is "", time-related synchronization process is activated; if the value is unequal "", position-dependent synchronization will be used with the relevant value as master distance for the synchronization process. 36 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Project planning I 3 Time-related startup cycle Time-related startup cycle means the slave synchronizes to the master using the velocity and ramp set in the MC_SetGearDynamics_MDX function module. It these values are set more dynamically than those for the master, then a lag error that might occur during the stop cycle can be reduced. n [1] [2] [3] [4] [5] [6] t 61685AXX [1] Velocity set with MC_SetGearDynamics_MDX [2] Velocity of the slave [3] Velocity of the master [4] Start of the time-related startup cycle [5] Ramp set with MC_SetGearDynamics_MDX (with reference to 3 1/min) [6] Slave is in sync with the master Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 37

I MPLCTecGearMotion_MDX 3 Project planning Position-dependent startup cycle Position-dependent startup cycle means the slave synchronizes to the master within a master distance that can be set. The startup cycle is softer than with time-related startup cycle but a lag error cannot be reduced. The position-dependent startup cycle depends on the direction. This means, if the master distance is specified on the input GearInMasterDistance as positive value for the startup cycle, then the master also has to turn in positive direction, else there will not be a startup cycle process. n [1] [2] [3] [4] [5] [6] 61686AXX [1] Velocity of the master [2] Velocity of the slave [3] Start of the position-dependent startup cycle [4] Master distance for the startup cycle [5] Slave is in sync with the master [6] Position of the master 38 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Project planning I 3 3.3.4 Various start events for startup cycle and offset travel The MC_PrepareGearIn_MDX and MC_PrepareGearOffset_MDX function modules can be used to set the event that triggers the action independent of the chosen startup cycle or offset type. During the startup cycle, this is set with the input GearInStartSource on the MC_PrepareGearIn_MDX function module. Startup cycle events Possible startup cycle events: MDX_GEAR_DIRECT The startup cycle is directly started with the MC_GearInDirect_MDX function module. MDX_GEAR_INTERRUPT_DI2/MDX_GEAR_INTERRUPT_X14C The startup cycle is started by an interrupt event that is triggered by a signal change on binary input DI2 of the MOVIDRIVE B unit or the C track of the external encoder on X14. A delayed startup cycle can be implemented using the input Distance- ForStartGearIn ( following figure). [1] [2] [4] [3] [5] [6] 61687AXX [1] Interrupt event on DI2 or X14 [2] Begin of the startup cycle [3] Delayed startup cycle through the DistanceForGearStartGearIn input [4] Velocity of the slave [5] Slave is in sync with the master [6] Position of the master Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 39

I MPLCTecGearMotion_MDX 3 Project planning MDX_GEAR_DISTANCE_COUNTER With this setting, the startup cycle is started according to the specified master distance. [1] [2] [3] [4] [4] [5] [6] 61688AXX [1] Startup cycle process [2] Slave is in sync with the master [3] Stop cycle process [4] Begin of the startup cycle [5] Specified master distance for the startup cycle process [6] Position of the master 4 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Project planning I 3 Offset processing An offset can be activated during synchronous operation after a successfully completed startup cycle. Offset means the slave moves faster or slower than a set value and then moves in sync with the master again. Any phase shift can be implemented in this way. The start event for offset processing is chosen with the input GearOffsetStartMode on the MC_PrepareGearOffset_MDX function module. Possible settings: MDX_GEAR_DIRECT Offset processing is directly started with the MC_GearOffsetDirect_MDX function module. MDX_GEAR_DISTANCE_COUNTER With this setting, offset processing is started according to the specified master distance. The input OffsetAutoRepeat can be used to specify whether offset travel is to be restarted automatically if the counter reaches the value of DistanceForStartOffset again. n [1] [2] [3] [5] [4] [6] [7] 61689AXX [1] Slave is in sync with the master [2] Offset travel [3] Synchronous operation [4] Begin of offset processing [5] Velocity of the slave [6] Specified master distance for offset processing [7] Position of the master Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 41

I MPLCTecGearMotion_MDX 3 Project planning 3.3.5 Project planning procedure The function modules of the MPLCTecGearMotion_MDX library are divided into four directories. MDX_Gear_- Config MDX_Gear_Config directory: MC_SetGearConfig_MDX MDX_Gear_Main MDX_Gear_Main directory: MC_LinkTecGear_MDX MC_GearState_MDX MC_GearClearLag_MDX MC_ClearLagPermanent_MDX MDX_Gear_Parameter directory: MC_PrepareGearIn_MDX MC_PrepareGearOffset_MDX MC_SetGearDynamics_MDX MDX_Gear_Parameter MDX_Gear_- SingleAxis MDX_Gear_SingleAxis directory: MC_GearInDirect_MDX MC_GearOutDirect_MDX MC_GearOffsetDirect_MDX Procedure Integrate the MPLCTecGearMotion_MDX library additionally in the MPLCMotion_MDX library into the project using the Library Manager. If the master position is to be transferred via SBus, the MC_InitialConfig_MDX function module has to be configured accordingly. This function module is part of the MPLCMotion_MDX library ( "MPLCMotion_MDX und MPLCMotion_MX Libraries for MOVI-PLC " manual). The SBus should also be synchronized. The SBus synchronization telegram is created with the MC_SetSync_MDX function module (part of the MPLC_Motion_MDX library). If the virtual encoder of the controller is used as master, the SBus will be automatically synchronized by calling the MC_LinkTecAxis_Virtual function module ( MPLCTecVirtualEncoder library). The MC_LinkTecGear_MDX function module constitutes the interface between technology function and motor axis and must be called cyclically in the program. Once the MC_ConnectAxis_MDX function module has established the connection with the motor axis, the MC_LinkTecGear function module activates the technology function "Internal synchronous operation" on the respective motor axis. The MC_SetGearConfig_MDX function module is used to set the general synchronous operation parameters. This function module must be called with a rising edge on the Execute input each time the MOVI-PLC controller is restarted, or if you want to change the general synchronous operation parameters. 42 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Project planning I 3 The MC_Prepare... function module is used to set the required startup cycle and offset modes as well as the associated parameters. NOTE The ramp is also changed when calling the MC_PrepareGearIn_MDX function module. The motor axis engages once the startup cycle event is detected, e.g. interrupt DI2. If positioning is performed after a successful stop cycle (e.g. with the MC_MoveAbsolute_MDX function module), then the LINEAR ramp type is set automatically. If you want to synchronize again, the MC_PrepareGearIn_MDX function module must be called again so that the ramp type is set to synchronous operation even if the startup cycle parameters have not changed. Exception: If synchronization takes place using the MC_GearInDirect_MDX function module and if the startup cycle parameters have not changed, then the MC_PrepareGearIn_MDX function module need not be called again because the MC_GearInDirect_MDX function module changes the ramp type automatically. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 43

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library 3.4 Overview of the MPLCTecGearMotion_MDX library 61692AXX MDX_Gear_ Config MDX_Gear_Config directory: MC_SetGearConfig_MDX function module The MC_SetGearConfig_MDX function module is used for configuring the basic parameters for synchronous operation. The synchronous operation parameters must have been transferred via this function module before a startup cycle process can take place. MDX_Gear_Main MDX_Gear_Main directory: MC_ClearLagPermanent_MDX function module The MC_ClearLagPermanent_MDX function module is used to clear the difference counter as long as the input Enable = TRUE. MC_GearClearLag_MDX function module The MC_GearClearLag_MDX function module is used to clear the difference counter of synchronous operation once with a rising edge at the Execute input. MC_GearState_MDX function module The MC_GearState_MDXAs function module outputs the current synchronous operation status as long as input Enable = TRUE. 44 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 MC_LinkTecGear_MDX function module The MC_LinkTecGear_MDX function module has the following functions: Activate the technology function "Internal synchronous operation" with MOVIDRIVE B Optional initialization service for the general synchronous operation parameters after a fault reset on the drive Interface for data exchange between drive and technology function "Internal synchronous operation" Output of the current status of the technology function "Internal synchronous operation" Output of the initialization status MDX_Gear_ Parameter Directory MDX_Gear_Parameter: MC_AutoRestartGearIn_MDX function module For interrupt or distance counter controlled startup cycle mode, the MC_AutoRestartGearIn_MDX function module enables you to activate another automatic startup cycle when the startup cycle event occurs again. MC_PrepareGearIn_MDX function module The MC_PrepareGearIn_MDX function module prepares the startup cycle. The parameters required for the startup cycle as well as the ramp type are set to synchronous operation. However, there is no active engaging. MC_PrepareGearOffset_MDX function module Similarly to the MC_PrepareGearIn_MDX function module, you can set the offset modes and offset parameters using the MC_PrepareGearOffset_MDX function modules. MC_SetGearDynamics_MDX function module The MC_SetGearDynamics_MDX function module is used with time-related startup cycle of offset processing for setting the required catch-up velocity and ramp. Besides, you can set the stop cycle ramp and a free-wheeling speed after completed stop cycle. MDX_Gear_ SingleAxis Directory MDX_Gear_SingleAxis: MC_GearInDirect_MDX, MC_GearOffsetDirect_MDX, MC_GearOutDirect_MDX function modules With a rising edge on the Execute input, the MC_GearInDirect_MDX and MC_GearOffsetDirect_MDX function modules cause the respective direct action with the parameters set by the MC_Prepare function modules. The MC_GearOutDirect_MDX function module is used for the stop cycle. There does not exist a corresponding Prepare function module for this function module. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 45

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library 3.4.1 Data types of the MPLCTecGearMotion_MDX library 6175AXX Data type MC_GEAR_IN_SOURCE_MDX This data type can be used with the MC_PrepareGearIn_MDX function module to define the startup cycle event or delete already set startup cycle parameters. This enumeration is also used with the MC_PrepareGearOffset_MDX function module to define the start event for the offset. However, the two interrupt modes are not possible in this case. 6176AXX Data type MC_GEAR_MASTERSOURCE_MDX This enumeration defines the source of the master encoder signal. In addition to the master sources external encoder on X14 or SSI, the master signal can also be sent via the SBus. You can choose one of four CAN objects for this purpose. 6177AXX 46 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 Data type MC_GEAR_SLAVESOURCE_MDX The source of the slave position can be determined with this data type. 6178AXX Data type MC_GEAR_STATE_MDX This enumeration is used to display the current status of synchronous operation. NOTE 6179AXX The output GearState indicates the status of synchronous operation. Except for the status MDX_GEAR_NOTLINKED, the states correspond exactly with the IPOS plus variable H427. For detailed information on the individual states during synchronous operation, refer to the "MOVIDRIVE MDX61B Internal Synchronous Operation (ISYNC)" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 47

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library 3.4.2 Restore function for saving MOVIDRIVE system variables The MC_LinkTecGear_MDX function module provides an initialization service. The "Restore" service transfers the image of the synchronization operation configuration on the controller to the MOVIDRIVE unit again once an axis fault has been acknowledged. This means you need not reconfigure the MOVIDRIVE system variables of synchronous operation. You can use the "Reset" service to delete these system variables both on the controller and in MOVIDRIVE. The following system variables are saved or deleted. System variable Name Data Type Description GearOffset settings, depending on the offset mode H36 OffsetCycleMode DINT Selected offset mode H361 OffsetCycleModeControl DINT Offset mode settings H365 OffsetCycleCounterMaxValue DINT Master distance after which offset is to be started H366 OffsetCycleMasterLength DINT Offset master distance H367 OffsetCycleValue DINT Offset value for slave drive GearOut settings H4 StopCycleMode DINT Selected stop cycle mode H41 StopCycleModeControl DINT Definition of the state after completed stop cycle GearIn settings, depending on the startup cycle mode H41 StartupCycleMode DINT Selected startup cycle mode H411 StartupCycleModeControl DINT Settings of the startup cycle mode H415 StartupCycleCounterMaxValue DINT Master distance after which startup cycle is to begin H417 StartupCycleMasterLength DINT Startup cycle master distance General settings for synchronous operation (MC_SetGearConfig_MDX) H428 GFMaster DINT Scaling factor of the master increments H429 GFSlave DINT Scaling factor of the slave increments H43 MasterSource DINT Source master position H431 SlaveSource DINT Source slave position H435 SyncEncoderNum DINT Numerator for synchronous encoder factor H436 SyncEncoderDenom DINT Denominator for synchronous encoder factor H444 ReSprintClose DINT Direction of rotation inhibit H446 MFilterTime DINT Interpolation time master position H125 LagCountLifeTime DINT Defines how long the difference counter is to be saved in the event of a failure of power outage H426 SynchronousModeControl DINT Activation of various synchronous operation functions H39 RegisterLoopDXDTOut DINT Control element for position-dependent startup cycle 48 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 3.4.3 Function modules of the MPLCTecGearMotion_MDX library MC_LinkTecGear_MDX function module MC_LINKTECGEAR_MDX Enable : BOOL InitService : MC_LINKTEC_INITSERVICE UseGearConfigAssistant : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Error : BOOL ErrorID : DWORD LinkState : MC_LINKTECSTATE GearState : MC_GEAR_STATE_MDX Axis : AXIS_REF (VAR_IN_OUT) 61694AXX Description The MC_LinkTecGear_MDX function module constitutes the logical interface between motor axis and technology function "Internal Synchronous Operation". Once the MC_ConnectAxis_MDX function module has established the cyclical communication to the motor axis and after enable via the Enable input, the synchronous operation function of MOVIDRIVE B is activated first. Next, the initialization service of the general synchronous operation parameters is executed which is selected using InitService. These synchronous operation parameters are deleted depending on the set service, for example after a fault reset, or the image of the last setting on the controller is transferred to the motor axis. In cyclical operation, the MC_LinkTecGear_MDX function module constitutes the parameter interface of the synchronous operation function modules to MOVIDRIVE. Additionally, various status signals are available as outputs. NOTES The MC_LinkTecAxis_Virtual function module is mandatory for using the synchronous operation function. The function module has to be called cyclically in the program. If the output signal LinkState has the status NotLinked, then none of the function modules of the MPLCTecVirtualEncoder library can be executed. A corresponding error message is issued. Prerequisite MOVI-PLC basic or advanced controller in the technology version T1 or higher. The MC_ConnectAxis_MDX function module is integrated in the cyclical program for the relevant motor axis. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 49

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library Input signals The following input signals can be set on the MC_LinkTecGear_MDX function module. Input signal Type Meaning Enable BOOL The function module is processed as long as the input signal Enable = TRUE. Initialization is performed with a rising edge. InitService MC_LINKTEC_ INIT- SERVICE Selection of the initialization service after communication has been reestablished (e.g. following fault reset): GEN_RESET_SERVICE (variables are deleted on controller and motor axis) GEN_RESTORE_SERVICE (last image is transferred to the motor axis) GEN_NO_SERVICE (no initialization) UseGearConfig Assistant (prepared) BOOL Simplified gear configuration with external tool. In this case SetGearConfig is not required (in preparation). Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_LinkTecGear_MDX provides the following output signals. Output signal Type Meaning Done BOOL Initialization successfully completed, connection with "Gear" technology function established. Error BOOL Error in module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. LinkState MC_LINKTECSTATE Current status: GEN_TEC_NOTLINKED (no connection) GEN_TEC_NOTINITIALIZED (no initialization performed) GEN_TEC_RESETED (reset service executed) GEN_TEC_RESTORED (restore service executed) GEN_TEC_INITIALIZED (cyclical data exchange successful) GearState MC_GEARTECSTATE Current synchronous operation status: MDX_GEAR_OUTGEAR_N_CTRL (decoupled speedcontrolled) MDX_GEAR_OUTGEAR_X_CTRL (decoupled in position control) MDX_GEAR_ENGAGING_GEAR_IN (startup cycle state) MDX_GEAR_IN_ GEAR (synchronous operation) MDX_GEAR_GEAR_OFFSET (offset mode) MDX_GEAR_DISENGAGING_GEAR (stop cycle state) MDX_GEAR_NOTLINKED (no valid gear state, e.g. when LinkState = NOTLINKED) 5 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 The following figure shows the functions and initialization routines of the MC_LinkTecGear_MDX function module and establishing the connection state (output LinkTecState). Call MC_LinkTecGear_MDX Enable=True Check: Technology version, valied log. address, 1xLinkTecGear per axis Error Cancel processing with error and error message OK Check: PLCopenState > NotConnected i.e. connection to axis OK? No OK Activate technology function "synchronous operation" in MDX B Execute initialization service Reset service Restore service No service LinkState = GEN_TEC_RESETED GearState = MDX_GEAR_NOTLINKED LinkState = GEN_TEC_RESTORED GearState = MDX_GEAR_NOTLINKED LinkState = GEN_TEC_NOTINITIALIZED GearState = MDX_GEAR_NOTLINKED No Check: PLCopenState > NotConnected i.e. connection to axis OK? Yes LinkState = GEN_TEC_NOT_LINKED Error issued by the module which has requested parameter service No Cyclical program section: Synchronous operation parameters are written or read if requested by the gear function modules LinkState = GEN_TEC_INITIALIZED Yes Parameter service successful? Yes 6171AEN Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 51

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_SetGearConfig_MDX function module MC_SETGEARCONFIG_MDX Execute : BOOL GFMaster : DINT GFSlave : UDINT MasterSource : MC_GEAR_MASTERSOURCE_MDX SlaveSource : MC_GEAR_SLAVESOURCE_MDX ExternalSlaveEncoderNum : UINT ExternalSlaveEncoderDenom : UINT LagCountLifeTime : DWORD RotationDirectionLock : BYTE MasterSignalFilter : BYTE FeedforwardFilter : BYTE Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 6171!AXX Description The MC_SetGearConfig_MDX function module is used to set basic synchronous operation parameters and to transfer these parameters to the respective motor axis. The set values are adopted and sent with the rising edge on the Execute input. An external encoder (X14/SSI) and an actual position vallue via SBus object can be set as master source on the MasterSource input. You can choose whether the master value is to be sent by another MOVIDRIVE unit or by a virtual encoder. On the LagCountLifeTime input, you set the duration (in ms) for the difference counter for saving the synchronous operation after a fault or in DC 24 V operation. If the value is "", this function will be deactivated; the difference counter is not saved. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. 52 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 Input signals The following input signals can be set on the MC_SetGearConfig_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. GFMaster DINT Scaling factor of the master increments (IPOS plus variable H428 GFMaster "MOVIDRIVE MDX61B Internal Synchronous Operation ISYNC" manual) GFSlave DINT Scaling factor of the slave increments (IPOS plus variable H429 GFSlave "MOVIDRIVE MDX61B Internal Synchronous Operation ISYNC" manual) MasterSource MC_GEAR_MASTER Source of the master position (H43): SOURCE_MDX MDX_GEAR_MASTER_X14 MDX_GEAR_MASTER_SSI MDX_GEAR_RECEIVE_PDO_1 MDX_GEAR_RECEIVE_PDO_2 MDX_GEAR_RECEIVE_PDO_3 MDX_GEAR_RECEIVE_PDO_4 SlaveSource ExternalSlave EncoderNum ExternalSlave EncoderDenom LagCountLife- Time Rotation DirectionLock MasterSignal Filter FeedForward Filter MC_GEAR_SLAVE SOURCE_MDX UINT UINT DWORD BYTE BYTE BYTE Source of the slave position (H431): MDX_GEAR_SLAVE_X15 MDX_GEAR_SLAVE_X14 MDX_GEAR_SLAVE_SSI Slave encoder on the track, numerator value (IPOS plus variable H435 SyncEncoderNum "MOVIDRIVE MDX61B Internal Synchronous Operation ISYNC" manual) Slave encoder on the track, denominator value (IPOS plus variable H436 SyncEncoderDenom "MOVIDRIVE MDX61B Internal Synchronous Operation ISYNC" manual) The difference counter is stored remanently in the event of a motor axis fault or in DC 24 V operation. The function is deactivated if the value is "". Direction of rotation lock: = Both directions of rotation enabled 1 = Only CCW enabled 2 = Only CW enabled (IPOS plus variable H444 ReSprintClose) Interpolation time master signal (IPOS plus variable H446 MFilterTime). Feedforward filter synchronous operation (parameter P228). Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_SetGearConfig_MDX function module provides the following output signals: Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 53

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_SetGearDynamics_MDX function module MC_SETGEARDYNAMICS_MDX Execute : BOOL GearSpeed : UDINT GearRamp : DINT FreeRunSpeed : DINT GearOutRamp : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61713AXX Description The MC_SetGearDynamics_MDX function module is used to set the velocity and ramp for the synchronization or offset process. These dynamic parameters are only active for time-controlled startup cycle or offset processing. For position-dependent startup cycle/offset, synchronization takes place within the specified master distance (in the MC_Prepare function module). You can also set the stop cycle ramp and the freewheeling speed (if the stop cycle is not subject to position control). Prerequisites The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. NOTE The inputs GearSpeed and GearRamp are effective both for the startup cycle and offset processing. If different values are required for this purpose, then the new dynamic values have to be written prior to the respective action. The free-wheeling speed is set using the "TargetSpeed", which is also used for positioning or speed control. The free-wheeling speed can only be set in the PLCopen status DISCRETE_MOTION or SYNCHRONIZED_MOTION to avoid undesired changes in velocity in the case of speed control. 54 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 Input signals The following input signals can be set on the MC_SetGearDynamics_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. GearSpeed UDINT Catch-up velocity for the startup cycle/offset (parameter P24 in 1/min). GearRamp DINT Catch-up ramp for the startup cycle/offset (parameter P241 in ms). FreeRunSpeed DINT Free-wheeling speed after the stop cycle in "FreeRunning" (set is TargetSpeed in 1/min). GearOutRamp DINT Ramp that is used for the stop cycle (parameter P13 in ms). Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_SetGearDynamics_MDX function module provides the following output signals: Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 55

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_PrepareGearIn_MDX function module MC_PREPAREGEARIN_MDX Execute : BOOL GearInStartSource : MC_GEAR_IN_SOURCE_MDX GearInMasterDistance : DINT DistanceForStartGearIn : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61716AXX Description The MC_PrepareGearIn_MDX function module prepares the startup cycle for synchronization. You can set the event that triggers the startup cycle and sets the relevant parameters depending on the mode. The ramp type is already set to ISYNC. NOTES Observe the following points for interrupt or counter controlled startup cycle: The startup cycle is enabled only once for these startup cycle types. If you want to have a startup cycle automatically when a new event is triggered, you can activate the "AutoRestart" function using the MC_AutoRestartGearIn_MDX function module. If a change to positioning mode (DiscreteMotion) or speed control (ContinuousMotion) takes place after the stop cycle, for example to move a "flying saw" back to the initial position, then you have to call the MC_PrepareGearIn_MDX function module again in order to reset the ramp type to synchronous operation. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. 56 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 Input signals Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. The following input signals can be set on the MC_PrepareGearIn_MDX function module. GearInStart- Source GearInMasterDistance DistanceForStart- GearIn MC_GEAR_IN_ SOURCE DINT DINT Selection of the startup cycle event: MDX_GEAR_RESET_SELECTION (deletes possible startup cycle settings) MDX_GEAR_DIRECT (startup cycle triggered by MC_GearInDirect function module) MDX_GEAR_INTERRUPT_DI2 (startup cycle triggered by interrupt DI2) MDX_GEAR_INTERRUPT_X14C (startup cycle triggered by interrupt X14 C track) MDX_GEAR_DISTANCE_COUNTER (startup cycle according to defined master distance) Master distance during which the startup cycle is performed. The setting "" means time-controlled startup cycle with the values of the MC_SetGearDynamics_MDX function module (IPOS plus variable H417). Deceleration by the value set here can be implemented for interrupt controlled startup cycle. The distance set here is used for performing a startup cycle according to the defined master distance (IPOS plus variable H415). Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_PrepareGearIn_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred Command Aborted BOOL The function module was aborted by another instance of the MC_PrepareGearIn_MDX function module. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 57

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_AutoRestartGearIn_MDX function module MC_AUTORESTARTGEARIN_MDX EN : BOOL AutoRestart : BOOL LockAutoGearIn : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL LockedByGearOut : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61717AXX Description The MC_AutoRestartGearIn_MDX function module is used to activate the AutoRestart function for interrupt of position counter controlled startup cycle. In this way automatic, repeated startup cycle is activated when the startup cycle event is triggered. This function can be used, for example for a "flaying saw" by another startup cycle according to set master distance (input DistanceForStartGearIn on the MC_PrepareGearIn_MDX function module). You can disable the automatic startup cycle process using the Lock- AutoGearIn input. In this case, the counter for the master distance is not cleared. Once you activate the lock again, the startup cycle process will be triggered automatically next time the startup cycle value is reached. If a MC_GearOutDirect_MDX function module is active, the AutoRestart function will be disabled for the duration of the stop cycle. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. Input signals The following input signals can be set on the MC_AutoRestartGearIn_MDX function module. Input signal Type Meaning EN BOOL The function module is processed if EN = TRUE. AutoRestart BOOL Activates or deactivates the AutoRestart input. LockAutoGearIn Bool Lock the automatic startup cycle process. Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_AutoRestartGearIn_MDX provides the following output signals. Output signal Type Meaning Done BOOL The startup cycle is prepared. Busy BOOL Parameters are being transferred. Command Aborted BOOL The job was aborted by another instance of the MC_PrepareGearIN_MDX function module. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 58 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 MC_PrepareGearOffset_MDX function module MC_PREPAREGEAROFFSET_MDX Execute : BOOL GearOffsetStartMode : MC_GEAR_IN_SOURCE_MDX GearOffsetMasterDistance : DINT GearOffsetSlaveDistance : DINT DistanceForStartOffset : DINT OffsetAutoRepeat : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61718AXX Description The MC_PrepareGearOffset_MDX function module prepares offset processing. Here you can set the event that triggers the offset and sets the relevant parameters depending on the mode. You can use the OffsetAutoRepeat input to choose whether you want to activate repeated offset in CounterControlled offset mode. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. Input signals The following input signals can be set on the MC_PrepareGearOffset_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. GearOffsetStart- Mode GearOffset MasterDistance GearOffsetSlave- Distance DistanceFor StartOffset MC_GEAR_IN_ SOURCE DINT DINT DINT Selection of the offset start event: MDX_GEAR_RESET_SELECTION (deletes possible offset settings) MDX_GEAR_DIRECT (offset starts through MC_GearOffsetDirect function module) MDX_GEAR_DISTANCE_COUNTER (offset starts according to defined master distance) Master distance within which the offset is implemented. The setting "" means time-controlled offset with the values of the MC_SetGearDynamics_MDX function module (IPOS plus variable H366). Offset distance that the slave is to cover (IPOS plus variable H367). Master distance after which the offset is started in the case of an offset that is controlled via Distance_Counter. (IPOS plus variable H365). OffsetAuto BOOL Automatic offset repetition in the Distance_Counter mode. Repeat Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 59

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library Output signals The MC_PrepareGearOffset_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Active BOOL Virtual motor travels to target position. Command Aborted BOOL The job was aborted by another instance of the function module. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 6 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 MC_GearInDirect_MDX function module MC_GEARINDIRECT_MDX Execute : BOOL Axis : AXIS_REF (VAR_IN_OUT) InGear : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) Description 61719AXX A rising edge at the Execute input of the MC_GearInDirect_MDX function module causes direct engaging in the synchronization process using the parameters that were set with the function modules MC_PrepareGearIn or MC_SetGearDynamics. The MC_GearInDirect_MDX function module interrupts other Move or PrepareGearIn function modules. Prerequisite The "Synchronous operation" technology function was created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. The GearState output signal of the MC_LinkTecGear_MDX function module has the status MDX_GEAR_OUTGEAR_N_CTRL or MDX_GEAR_OUTGEAR_X_CTRL. Input signals The following input signals can be set on the MC_GearInDirect_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the startup cycle. Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_GearInDirect_MDX function module provides the following output signals. Output signal Type Meaning InGear BOOL The drive has engaged in synchronous operation and runs in sync with the master. Active BOOL Motor axis is startup cycle status (GearState = 2). Command Aborted BOOL The job was aborted by calling GearOutDirect or PrepareGearIn. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 61

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_GearOutDirect_MDX function module MC_GEAROUTDIRECT_MDX Execute : BOOL GearOutLagCountOn : BOOL GearOutFreeRunning : BOOL FreeRunSpeed : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Active : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 6172AXX Description The MC_GearOutDirect_MDX function module ends synchronous operation. The motor axis leaves synchronization with a rising edge on the Execute input. If the input GearOutFreeRunning = TRUE, the drive turns after decoupling with the velocity set at the FreeRunSpeed input. Else the motor axis remains stopped subject to position control. The GearOutLagCountOn input specifies whether the difference counter is to remain active after the stop cycle. This selection is only possible with stop cycle in position control; when the stop cycle is performed in speed control, the difference counter always remains active. NOTES The lag error can only be reduced after another startup cycle process when it is time-controlled (input GearMasterDistance = with the MC_PrepareGearIn_MDX function module). Setting of the free-wheeling speed is only active once during the stop cycle. The free-wheeling speed can then only be changed with the MC_SetGearDynamics_MDX function module. The current library MPLCTecGearMotion_MDX also allows for "changeover on the fly" from synchronous operation to positioning mode; the output GearState of the MC_LinkTecGear_MDX function module remains set to synchronous operation. This is the reason why the motor axis must be decoupled before it is engaged again. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. Usually, decoupling takes place from synchronous or offset operation. But decoupling can also take place already during the startup cycle. 62 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 Input signals The following input signals can be set on the MC_GearOutDirect_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. GearOutLag- CountOn GearOutFreeRunning BOOL Selection whether the difference counter is to remain active after the stop cycle. BOOL TRUE = decoupling in free-wheeling mode FALSE = decoupling in position control FreeRunSpeed DINT Free-wheeling speed. Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_GearOutDirect_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Motor axis is decoupled. Active BOOL Decoupling is active. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 63

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_GearOffsetDirect_MDX function module MC_GEAROFFSETSETDIRECT_MDX Execute : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61721AXX Description The MC_GearOffsetDirect_MDX function module starts an offset travel with the values that were set with the function modules MC_PrepareGearOffset or MC_SetGearDynamics. The motor changes to synchronous operation again after successful offset. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. The motor axis is in synchronous operation. Input signals The following input signals can be set on the MC_GearOutDirect_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_GearOutDirect_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Offset was processed, motor axis is synchronous again. Active BOOL Offset processing ongoing. Command BOOL The job was aborted by another function module. Aborted Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 64 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 MC_GearClearLag_MDX function module MC_GEARCLEARLAG_MDX Execute : BOOL LagWindow : INIT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61722AXX Description The MC_GearClearLag_MDX function module clears the difference counter of the synchronous operation with a rising edge at the Execute input. The action was performed successfully if the difference counter is within LagWindow, else an error will be issued. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. Input signals The following input signals can be set on the MC_GearClearLag_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. LagWindow INT The action was successful if the difference counter was within LagWindow after being cleared. Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_SetActPos_Virtual function module provides the following output signals. Output signal Type Meaning Done BOOL The task of the function module has been performed. Busy BOOL Difference counter is cleared (ClearLag is active). Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 65

I MPLCTecGearMotion_MDX 3 Overview of the MPLCTecGearMotion_MDX library MC_ClearLagPermanent_MDX function module MC_CLEARLAGPERMANENT_MDX Enable : BOOL FollowMasterSpeed : BOOL Axis : AXIS_REF (VAR_IN_OUT) Enabled : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61725AXX Description The MC_ClearLagPermanent_MDX function module clears the difference counter of synchronous operation until input Enable = TRUE. In addition, you can set whether the slave is to continue to move at the master speed or whether it stops during this time (i.e. when Enable = TRUE). The setting is made on the FollowMasterSpeed input. Prerequisite The "Synchronous operation" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. Input signals The behavior of the MC_ClearLagPermanent_MDX function module depends on the following input signals. Input signal Type Meaning Enable BOOL The difference counter is set to zero as long as the input signal Execute = TRUE. FollowMaster- Speed BOOL TRUE = Same speed as master speed FALSE = Slave stops Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_ClearLagPermanent_MDX function module provides the following output signals. Output signal Type Meaning Enabled BOOL The task of the function module has been performed. Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 66 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Overview of the MPLCTecGearMotion_MDX library I 3 MC_GearState_MDX function module MC_GEARSTATE_MDX Enable : BOOL Axis : AXIS_REF (VAR_IN_OUT) Enabled : BOOL GearState : MC_GEAR_STATE_MDX InGear : BOOL OutGear : BOOL EngagingGear : BOOL OffsetGear : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61727AXX Description The MC_GearState_MDX function module is a diagnostics module that indicates the current status of synchronous operation (GearState output) as long as input Enable = TRUE. Other important states are available as Boolean variables ( Section 'Output signals") (e.g. as condition for other actions). Prerequisite The "Gear" technology function is created using the MC_LinkTecGear_MDX function module. The output signal LinkState of the MC_LinkTecGear_MDX function module does not have the status GEN_TEC_NOTLINKED. Input signals The following input signals can be set on the MC_GearState_MDX function module. Input signal Type Meaning Enable BOOL The outputs will provide valid values if input Enable = TRUE. Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module. Output signals The MC_GearState_MDX function module provides the following output signals. Output signal Type Meaning Enabled BOOL The function module is enabled; the output values are valid. GearState MC_GEAR_STATE_ Synchronous operation status: MDX MDX_GEAR_OUTGEAR_N_CTRL MDX_GEAR_OUTGEAR_X_CTRL MDX_GEAR_ENGAGING_GLEAR_IN MDX_GEAR_IN_GEAR MDX_GEAR_GEAR_OFFSET MDX_GEAR_DISENGAGING_GEAR MDX_GEAR_NOTLINKED InGear BOOL Motor axis is synchronous. OutGear BOOL Motor axis is decoupled. EngagingGear BOOL Motor axis engages. OffsetGear BOOL Offset processing ongoing. Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 67

I MPLCTecGearMotion_MDX 3 Examples 3.5 Examples 3.5.1 Example 1: Synchronous operation with external encoder as master and direct engaging / disengaging 61728AXX 61729AXX 68 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Examples I 3 3.5.2 Example 2: Synchronous operation with virtual encoder as master The function modules of the virtual encoder are called cyclically at intervals of 5 ms (5 ms task). The virtual encoder is to be started and stopped in endless operation. The slave motor axis synchronizes to the master triggered by an interrupt event at DI2. The difference counter is to remain active after disengaging and is to be cleared with the next startup cycle process. Step 1: Create the virtual encoder in 5 ms task 6173AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 69

I MPLCTecGearMotion_MDX 3 Examples Step 2: Create and configure the slaves 61731AXX 7 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Examples I 3 3.5.3 Example 3: MOVIDRIVE as master sends position via SBUs Step 1: Create the send and receive objects master and slave The motor axis with address 2 assigned to it is the synchronous operation master. This axis sends the motor encoder position cyclically every 5 ms with the telegram ID MDX_PDO_ID1. This ID is used to create a PDO1 receive object for the slave motor axis with address 1. It is important that this initialization configuration is made before the MC_ConnectAxis_MDX function module is started ( " MPLCMotion_MDX Library for MOVI-PLC manual). Furthermore the SBus should be synchronized with the MC_SetSync_MDX function module. 61732AXX 61735AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 71

I MPLCTecGearMotion_MDX 3 Examples Step 2: Create and configure the "Synchronous operation" technology function The MC_LinkTecGear_MDX function module with selection of the restore service is used for this purpose. If the connection is established using the MC_LinkTecGear_MDX function module, the general synchronous operation parameters are set with the MC_SetGearConfig_MDX function modules. Receive_PDO_1 is specified as source of the master signal that was set before in the MC_InitialConfig_MDX function module. The MC_Prepare function modules are configured for engaging and offset processing for direct engaging, or for offset start with timerelated process. 61734AXX 61736AXX 72 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Examples I 3 Step 3: Direct engaging / disengaging and offset start 61738AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 73

I MPLCTecGearMotion_MDX 3 Appendix 3.6 Appendix 3.6.1 Abortion of function modules (CommandAborted output signal) The CommandAborted output signal is used to indicate multiple calls of a movement module (MC_Move...) or to call another movement module. The aborted job will not be executed anymore ( "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI- PLC manual). Activated function module MC_GearOutDirect_MDX Creates CommandAborted to MC_GearInDirect_MDX MC_GearOffsetDirect_MDX Instances of MC_GearIn MC_GearInDirect_MDX MC_Move function modules MC_GearOffsetDirect_MDX Instances of MC_GearOffsetDirect_MDX MC_PrepareGearIn_MDX Instances of MC_PrepareGearIn_MDX MC_GearInDirect_MDX MC_Move function modules Instances of MC_PrepareGearOffset_MDX MC_PrepareGearOffset_MDX MC_GearOffsetDirect_MDX MC_Move function modules MC_GearOffsetDirect_MDX 74 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecGearMotion_MDX Appendix I 3 The following figure shows a schematic view of the mutual abortion conditions of the CommandAborted (CA) output signal. New instance: CA to previous MC_PrepareGearOffset_MDX Call creates CA MC_GearOffsetDirect_MDX New instance: CA to previous Call creates CA Call creates CA "FB-Move" aus MPLCMotion_MDX MC_GearOutDirect_MDX Calll creates CA Call creates CA Call creates CA New instance: CA to previous MC_PrepareGearIn_MDX Call creates CA MC_GearInDirect_MDX New instance: CA to previous 6174AEN NOTE MC_Move... function modules of the MPLCMotion_MDX library: MC_MoveAbsolute_MDX MC_MoveRelative_MDX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 75

I MPLCTecCamMotion_MDX 4 Introduction 4 MPLCTecCamMotion_MDX 4.1 Introduction The MPLCTecCamMotion_MDX library is based on the technology function "Electronic cam" of the MOVIDRIVE MDX61B drive inverter. The following simplifications have been achieved compared to the previous solutions. Before: Decentralized startup and control of the technology function "Electronic cam" Complex familiarization with the SEW-specific programming language IPOS plus Complex programming when networking and synchronizing several linked electronic cams. Program functionality distributed on several inverters, which means complex diagnostics Lengthy familiarization in the event of functional extensions of the existing program sequence Solution with MOVI-PLC : Programming in accordance with IEC 61131, which means customer-specific applications can be easily implemented. Library for controlling the technology function "Electronic cam". No expert knowledge is required for handling the technology function "Electronic cam". Central control of the technology function "Electronic cam." Additional functions can be easily implemented, such as a virtual encoder. NOTE Additional documentation: For general notes on the theory of operation of the library, refer to the "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " manual "MOVIDRIVE Electronic Cam" manual. 4.2 Project planning 4.2.1 Prerequisites In order to use the MPLCTecCamMotion_MDX library, you need a MOVI-PLC DHP21B controller in application version T1 or higher. A MOVIDRIVE B unit in standard version (..) with encoder feedback and firmware status ".17" is sufficient as drive inverter. Software MOVITOOLS MotionStudio 5.4 or higher. 76 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 4.2.2 Notes A prerequisite for operating the technology function "Electronic cam" is that the technology function "Electronic cam" has been installed using the Motion Technology editor of the MOVITOOLS MotionStudio. Startup with the Motion Technology editor is not necessary if you use the function modules MC_CamCalcRtoR_MDX or MC_CamCalcSpline_MDX. The Motion Technology editor can be used to create up to six individual curves based on pre-defined curve segments. Curve points can be exported, for example form a curve point table. Recommended procedure The configured curve tables and internal scaling factors are created and loaded using the Motion Technology editor. This process is performed for each drive inverter. Create the MOVI-PLC user program to manage the electronic cam technology function transfer the scaling factors control the curve status (startup cycle, stop cycle, etc.) Function adjustments that exceed the scope of functions of the MPLCTecCamMotion_MDX library can be made using the existing function modules MC_ReadParameter_MDX or MC_WriteParameter_MDX. 4.3 Overview of the MPLCTecCamMotion_MDX library The function modules of the MPLCTecCamMotion_MDX are divided into five groups: MDX_Cam_ Config Directory MDX_Cam_Config: MC_LinkTecCam_MDX function module The MC_LinkTecCam_MDX function module is used to diagnose and manage the technology function "Electronic cam". The function module must be called cyclically and is mandatory for operating the technology function "Electronic cam". All communication services of the integrated function modules of the library are performed via this function module. MDX_Cam_Main Directory MDX_Cam_Main: MC_CamTableSelect_MDX function module With the MC_CamTableSelect_MDX function module, a maximum number of six electronic cams stored in the MOVIDRIVE drive inverter can be selected and system variables stored in MOVIDRIVE can be activated. MC_CamTableScale_MDX function module The MC_CamTableScale_MDX function module is used to scale the selected cam. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 77

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_SetCamConfig_MDX function module The MC_SetCamConfig us used to manually manage the SEW-internal cam parameters. The function module is provided for specific applications and should not be used. MDX_Cam_ Parameters MDX_Cam_Parameters directory: MC_AutoRestartCamIn_MDX function module The MC_AutoRestartCamIn_MDX function module is used to restart the interrupt controlled startup cycle function. MC_PrepareCamIn_MDX function module The MC_PrepareCamIn_MDX function module is used to select SEW-specific startup cycle modes, for example interrupt controlled startup cycle on binary input DI2. MC_PrepareCamOut_MDX function module The MC_PrepareCamIn_MDX function module is used to select the SEW-specific stop cycle modes, for example counter controller stop cycle after the main curve has been passed through a specified number of times. MC_WriteCamTrim_MDX function module The MC_WriteCamTrim_MDX function module is used to shift the reference between master and cam slave in engaged state. MC_WriteModuloRest_MDX function module The MC_WriteModuloRest_MDX function module is used to compensate the addedup offset of non-ultimate gear ratio factors. MDX_Cam_ SingleAxis MDX_Cam_SingleAxis directory: MC_AdjustCamSlave_MDX function module The MC_AdjustCamSlave_MDX function module is used to adjust the cam motor axis to any curve point. MC_CamInDirect_MDX function module The MC_CamInDirect_MDX function module is used to directly start the startup cycle. MC_CamOutDirect_MDX function module The MC_CamOutDirect_MDX function module is used to directly start the stop cycle. 78 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MDX_Cam_ Calculate MDX_Cam_Calculate directory: MC_CamCalcSpline_MDX function module The MC_CamCalcSpline_MDX function module calculates a spline curve based on the coordinates (X = master, Y = slave). MC_CamCalcRtoR_MDX function module The MC_CamCalcRtoR_MDX function module calculates a curve based on the coordinates (X = master, Y = slave). The curve is made up of a number of sequences. The transitions of the sequences are rest-to-rest. MC_CamCalcRtoR5_MDX function module The MC_CamCalcRtoR5_MDX function module calculates a curve based on the coordinates (X = master, Y = slave). The curve is made up of up to 5 sequences. The transitions of the sequences are rest-to-rest. 4.3.1 Data types of the MPLCTecCamMotion_MDX library 61745AXX File type MC_CAM_IN_MDX This enumeration is used to define the interrupt source for the MC_PrepareCamIn_MDX function module (startup cycle). 61746AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 79

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Data type MC_CAM_OUT_MDX This enumeration is used to define the interrupt source for the MC_PrepareCamOut_MDX function module (stop cycle). 61747AXX Data type MC_CAM_MASTERSOURCE_MDX This data type is used to define the source of the master encoder signal. In addition to the master encoder signals "External encoder on X14" or "SSI", you can create an object received via SBus. You can choose between four CAN objects for this purpose. The send objects are defined by the MC_InitialConfig_MDX function module ( "MPLCMotion_MDX Library for MOVI-PLC " manual) 61748AXX Data type MC_CAM_SLAVESOURCE_MDX This enumeration is used to define the encoder source. Currently, only the slave source X15 (i.e. motor encoder) is supported. 61749AXX 8 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Data type MC_CAM_STARTUPMODE_MDX This enumeration is used to specify the startup cycle mode for the MC_PrepareCamIn_MDX function module. 6175AXX Data type MC_CAM_STOPMODE_MDX This enumeration is used to specify the stop cycle mode for the MC_PrepareCamOut_MDX function module. 61751AXX Data type MC_CAM_STATE_MDX This enumeration is used to indicate the current status of the electronic cam. It is output at the CamState output of the MC_CamLinkTec_MDX function module. 61752AXX Data type MC_CAM_CALC_FUNCTIONNO_MDX This enumeration is used to define the curve mode for the MC_CamCalcSpline_MDX function module. 61928AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 81

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Data type MC_CAM_CALC_SPLINEMODE_MDX This enumeration is used to define the spline mode for the MC_CamCalcSpline_MDX function module. 61929AXX 4.3.2 Data types of the MC_CamLinkTec_MDX function module Data type MC_LINKTECSTATE This enumeration indicates the current status of the electronic cam. The status is output at the LinkState output of the MC_LinkTecState _MDX function module. 61753AXX Data type MC_LINKTEC_INITSERVICE This enumeration is used to set the parameters for the restart behavior at the Initservice input of the MC_LinkTecCam_MDX function module. Currently, only the initialization service GEN_RESET_SERVICE is supported. 61754AXX 82 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 4.3.3 Function modules of the MPLCTecCamMotion_MDX library MC_LinkTecCam_MDX function module MC_LINKTECCAM_MDX Enable : BOOL InitService : MC_LINKTEC_INITSERVICE Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Error : BOOL ErrorID : UINT LinkState : MC_LINKTECSTATE CamState : MC_CAM_STATE_MDX 61755AXX Description Tasks of the MC_LinkTecCam_MDX function module: Querying MOVI-PLC technology version T1. Automatically enabling the MOVIDRIVE technology function "Electronic cam". Checking the connection between the technology function "Electronic cam" and the physical motor axis. Status display LinkState of the MOVI-PLC connection. Status display CamState of the inverter firmware. Controlling the startup behavior, for example after a restart or error reset on the inverter, via the InitService input. Diagnostic function of the technology function. Diagnostic function of the active function module from the library (instance monitor of all activated function modules of the library). Automatic management of the parameter services, such as read or write. Process image of the system variables. Prerequisite No axis error (logical axis connection is disconnected in the event of an error and output LinkState = GEN_TEC_NOTLINKED). No communication error between MOVI-PLC and motor axis. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 83

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Input signals The following input signals can be set on the MC_LinkTecCam_MDX function module. Input signal Type Meaning Enable BOOL Establishing the logical connection to the motor axis. InitService MC_LINKTEC_ INIT- SERVICE Selection of the strategy according to which the function module is to be refreshed after restart of the system variables: GEN_RESET_SERVICE (variables are deleted on controller and motor axis) GEN_RESTORE_SERVICE (last image is transferred to the motor axis) GEN_NO_SERVICE (no initialization) The RESTORE service is not supported. Axis AXIS_REF This input specifies the motor axis on which the actions of the function module are to be executed. Output signals The MC_LinkTecCam_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Initialization successfully completed, connection with "Virtual encoder" technology function established. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. LinkState MC_LINKTECSTATE Current status of the function module: GEN_TEC_NOTLINKED (no connection) GEN_TEC_NOTINITIALIZED (not initialized) GEN_TEC_RESETED (reset service executed) GEN_TEC_RESTORED (restore service executed) GEN_TEC_INITIALIZED (cyclical data exchange successful) CamState MC_CAMSTATE Current status of the cam: MDX_CAM_RESET MDX_CAM_START MDX_CAM_MAIN_CURVE MDX_CAM_STOP MDX_CAM_STOPINVERTETSTART MDX_CAM_NOTLINKED 84 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_CamTableScale_MDX function module MC_CAMTABLESCALE_MDX Execute : BOOL Table : UINT Nominator : DINT Denominator : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : UINT 61756AXX Description The MC_CamTableScale_MDX function module is used to scale the selected curve (... 5) with the defined nominator and denominator with reference to the master. This allows for trimming the curve with reference to the MasterCycleScale (StartupCycle scale) ( following figure). SlaveCycle f(x) 55% 1% MasterCycle 61757AXX Prerequisite MC_LINKTECSTATE = GEN_TEC_INITIALIZED. The CamState output signal of the MC_LinkTecCam_MDX function module has the status MDX_CAM_RESET or MDX_CAM_STOP. The currently valid curve can only be scaled in decoupled state. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 85

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Input signals The following input signals can be set on the MC_LinkTecGear_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Table UINT Selection of the curve number (... 5) (IPOS plus variable H451 TableSelect) Nominator DINT Scaling factor numerator 32...32 (IPOS plus variable H449 TableScaleNominator) Denominator DINT Scaling factor denominator...32 (IPOS plus variable H45 TableScaleDenominator) Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_CamTableScale_MDX function module provides the following output signals: Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL The curve is being scaled. Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 86 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_CamTableSelect_MDX function module MC_CAMTABLESELECT_MDX Execute : BOOL Table : UINT UseCamEditorConfiguration : BOOL UseVirtEncoder : BOOL MasterSampleTime : UDINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : UINT 61758AXX Description With the MC_CamTableSelect_MDX function module, you can choose a maximum of 6 cams stored in the MOVIDRIVE drive inverter. Wiring the input UseCamEditorConfiguration Wiring with TRUE The selected curve is activated and the scaling factors stored in the remanent IPOS plus travel range of the inverter are adopted. The procedure is explained in the "Examples" section. If the master value is not specified per millisecond, you can obtain an interpolation of the read master value via the MasterSampleTime input. The following read-in values are recalculated component-internally due to the input value (for more information, refer to the "Manually changing the interpolation time" section): H431_MasterNorm H432_MasterCycleScale H433_StartupCycleScale H446_MfilterTime Wiring with FALSE (special case) Only the selected curve is activated. The inputs UseVirtEncoder and MasterSample- Time are not evaluated. The MC_SetCamConfig_MDX function module must be called prior to the MC_CamTableSelect_MDX function module. This wiring is intended for special applications and should not be used. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 87

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Prerequisites Input UseCamEditorConfiguration = TRUE MC_CAM_STATE = MDX_CAM_RESET or MDX_CAM_STOP Input UseCamEditorConfiguration = FALSE MC_LINKTECSTATE = GEN_TEC_INITIALIZED MC_CAM_STATE = MDX_CAM_RESET or MDX_CAM_STOP NOTE Changing to another curve is only possible in decoupled state. Input signals The following input signals can be set on the MC_CamTableSelect_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Table UINT Select curve (... 5) (IPOS plus variable H451 TableSelect) UseCamEditor- Configuration BOOL TRUE: Scaling parameters are activated automatically FALSE: The MC_SetCamConfig_MDX function module must be called before. UseVirtEncoder BOOL TRUE: VirtMPLCEncoder active FALSE: X14 External incremental encoder active MasterSample- Time UDINT Interpolation time of the master value 1... 3 ms 1: Input value with X14 setpoint 5: Input value for VirtEnc in 5 ms task 1: Input value for VirtEnc in 1 ms task Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_CamTableSelect_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Function module is being processed. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 88 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_SetCamConfig_MDX function module MC_SETCAMCONFIG_MDX Execute : BOOL MasterCountDirection : BOOL MasterSource : MC_CAM_MASTERSOURCE MasterNorm MasterCycleScale : UDINT StartupCycleScale : UDINT ActualPositionScale : UINT NFilterTime : USINT DirectionBlock : USINT MFilterTime : USINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD 61759AXX Description The MC_SetCamConfig_MDX function module is used to transfer the relevant system variables from the startup of the cam editor. The procedure is explained in the "Examples" section. The transferred parameters are written to the non-remanent system variables. The MC_SetCamConfig_MDX function module is used to set the status variable LinkState to GEN_TEC_INITIALIZED. Prerequisite The LinkState output of the MC_LinkTecCam_MDX function module does not have the status GEN_TEC_NOTLINKED. The CamState output of the MC_LinkTecCam_MDX function module has the status MDX_CAM_RESET or MDX_CAM_STOP. NOTE The MC_SetCamConfig_MDX function module should only be used for special applications ( Description of the MC_CamTableSelect_MDX function module). Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 89

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Input signals The following input signals can be set on the MC_SetCamConfig_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. MasterCount direction MasterSource MasterNorm MasterCycle scale StartupCycleScale ActualPosition scale BOOL MC_CAM_MASTER- SOURCE UDINT UDINT UINT Reversal of the direction of rotation of the master encoder. FALSE: No direction of rotation reversal TRUE: Direction of rotation reversal active (IPOS plus variable H429 CamModeControl.1) Source of the master frequency: MDX_CAM_MASTER_X14 MDX_CAM_MASTER_SSI MDX_CAM_RECEIVE_PDO_1 MDX_CAM_RECEIVE_PDO_2 MDX_CAM_RECEIVE_PDO_3 MDX_CAM_RECEIVE_PDO_4 Scaling of the master cycle (IPOS plus variable H431 MasterNorm). Master cycle in increments (IPOS plus variable H432 MasterCycleScale). Startup cycle inincrements (IPOS plus variable H433 StartupCycleScale). Scaling of the slave cycle (IPOS plus variable H44 ActPositionScale). NFilterTime USINT Feedforwared interpolator (IPOS plus variable H443 NfilterTime). DirectionBlock USINT Direction of rotation lock (IPOS plus variable H444 ReSprintClose). MFilterTime USINT Interpolation time (IPOS plus variable H446 MfilterTime). Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_SetCamConfig_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. NOTES Project planning notes when using the virtual encoder. Set the MasterSource input to MDX_CAM_RECEIVE_PDO_1. Program the virtual encoder in the 5 ms task. On the MC_SetCamConfig_MDX function module, set the FilterMasterPosition input to 5 ms. Increase the value on the MasterNorm input by the factor of the value FilterMaster- Position (i.e. in this example to "5"). Make a control calculation whether the values MasterNorm, MasterCycleScale and StartupCycleScale have to be adjusted manually ( Sec. "Manually changing the interpolation time") 9 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_RestartCamIn_MDX function module MC_RESTARTCAMIN_MDX EN : BOOL AutoRestart : BOOL LockAutoCamIn : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : UINT 6176AXX Description If the previous startup cycle mode was interrupt-controlled, the MC_RestartCamIn_MDX function module can be used to activate an automatic restart. This means a purely interrupt-controlled startup or stop cycle can be easily implemented in this way. Prerequisite The output LinkState of the MC_LinkTecCam_MDX function module does not have the status GEN_TEC_INITIALIZED. MC_LINKTECSTATE = GEN_TEC_INITIALIZED Input signals The following input signals can be set on the MC_RestartCamIn_MDX function module. Input signal Type Meaning EN BOOL When EN = TRUE, cyclical processing of the function module is started. AutoRestart BOOL TRUE: AutoRestart input is active FALSE: AutoRestart input is inactive LockAutoCamIn BOOL TRUE: AutoRestart input is suppressed; the length counter remains active FALSE: AutoRestart input is not suppressed Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_RestartCamIn_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Download after having made a change to an input is ongoing Error BOOL Error in function module during the execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 91

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_PrepareCamIn_MDX function module MC_PREPARECAMIN_MDX Execute : BOOL StartupMode : MC_CAM_STARTUPMODE_MDX Source : MC_CAM_IN_MDX Offset : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD 61761AXX Description The MC_PrepareGearOffset_MDX function module prepares the SEW-specific startup cycle modes. The startup cycle is started depending on the defined startup cycle event, for example with interrupt-controlled engaging upon a rising edge at binary input DI2. The following status variables are changed by the MC_PrepareCamIn_MDX function modules: The PLCopenState is set to SYNCHRONIZED_MOTION. When the startup cycle process has been completed, the firmware of the inverter sets the CamState output of the MC_LinkTecCam_MDX function module to the status MDX_CAM_MAINCURVE. Prerequisite The LinkState output of the MC_LinkTecCam_MDX function module has the status GEN_TEC_INITIALIZED. The CamState output of the MC_LinkTecCam_MDX function module has the status MDX_CAM_RESET or MDX_CAM_STOP. NOTE An activated interrupt can be deselected by selecting the startup cycle type MDX_CAM_STARTDIRECT at the StartupMode input. 92 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Input signals The following input signals can be set on the MC_PrepareCamIn_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. StartupMode MC_CAM_STARTUP- Select the required startup cycle mode: MODE_MDX MDX_CAM_STARTDIRECT preparation of direct engaging (the MC_CamInDirect_MDX function module must be called afterwards) MDX_CAM_STARTINTERRUPT Interrupt-controlled engaging, if required with offset processing MDX_CAM_RESERVED MDX_CAM_STARTCOUNTER Position-controlled startup cycle (IPOS plus variable H41 StartupCycleMode) Source MC_CAM_IN_MDX Select the interrupt source for the startup cycle mode STARTINTERRUPT: MDX_CAM_IN_DI2 Edge change at binary input DI2 / X13:2) MDX_CAM_IN_X14 Zero track of the external encoder (IPOS plus variable H411 StartupCycleModeControl.2) Offset DINT Master distance in increments for the StartupMode: MDX_CAM_STARTINTERRUPT MDX_CAM_STARTCOUNTER (IPOS plus variable H415 StartupCycleCounterMaxValue) Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_PrepareCamIn_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Command Aborted BOOL The job of the function module was aborted by another function module. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 93

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_PrepareCamOut_MDX function module MC_PREPARECAMOUT_MDX Execute : BOOL CamOutPosCtrl : BOOL StopMode : MC_CAM_STOPMODE_MDX SetCounter : DINT Source : SEW_CAM_OUT_MDX RemainWay : DINT LimitLeft : DINT LimitRight : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL CommandAborted : BOOL Error : BOOL ErrorID : UINT 61776AXX Description The MC_PrepareCamOut_MDX function module is used to prepare the SEW-specific stop cycle modes. The stop cycle process is started depending on the defined stop cycle event, for example in the case of computer controlled stop cycle when the specified number of times the main curve has been passed through is reached. Exception: When the stop cycle type MDX_CAM_STOPDIRECT is selected, the MDX_CamOutDirect_MDX function module must be called afterwards. The following status variables are changed by the function module: When the stop cycle has been completed, the firmware of the inverter sets the CamState output to MDX_CAM_RESET. Prerequisite The output LinkState of the MC_LinkTecCam_MDX function module does not have the status GEN_TEC_INITIALIZED. The CamState output of the MC_LinkTecCam_MDX function module has the status MDX_CAM_RESET or MDX_CAM_STOP. NOTE An activated interrupt can be deselected by selecting the MDX_CAM_STOPDIRECT stop cycle type. 94 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Input signals The following input signals can be set on the MC_PrepareCamOut_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the startup cycle. CamOutPosCtrl BOOL TRUE = decoupling in position control FALSE = decoupling in speed control Note: The input should be set to FALSE in particular for multi-curve operation. Doing so will reset the curve to decoupled status. No jerks can occur when changing to another curve. StopMode MC_CAM_STOP- Select the required stop cycle mode: MODE_MDX MDX_CAM_STOPDIRECT Preparation of direct decoupling (the MC_CamOutDirect_MDX function module must be called afterwards) MDX_CAM_STOPCOUNTER Decoupling after the number of times the main curve was run through set on the SetCounter input MDX_CAM_STOPCOUNTER_INVERS Like MDX_CAM_STOPCOUNTER but decoupling takes place with inverted startup cycle curve. MDX_CAM_STOPINTERRUPT Interrupt-controlled stop cycle with remaining distance processing and range monitoring (IPOS plus variable H4 StopCycleMode). SetCounter DINT Select how often the main curve is to be run through until decoupling takes place according to decoupling mode MDX_CAM_STOPCOUNTER or MDX_CAM_STOPCOUNTER_INVERS (IPOS plus variable H44 StopCycleCounter). Source SEW_CAM_OUT_MDX Select the interrupt source for the stop cycle mode STOPINTERRUPT: MDX_CAM_IN_DI3 Edge change at binary input DI3 / X13:3) MDX_CAM_IN_X14 Zero track of the external encoder (IPOS plus variable H41 StopCycleModeControl.2) RemainWay DINT Remaining distance to be covered in stop cycle mode MDX_CAM_STOPINTERRUPT after a plausible interrupt event has occurred (IPOS plus variable H45 StopCycleRemainWay). LimitLeft DINT The left window of range monitoring (IPOS plus variable H383 RegisterLimitLeft) specified in stop cycle mode MDX_CAMSTOPINTERRUPT. LimitRight DINT Right window of range monitoring (IPOS plus variable H384 RegisterLimitRight) specified in the MDX_CAMSTOPINTERRUPT stop cycle mode. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_PrepareCamOut_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL Parameters are being transferred. Command Aborted BOOL The job of the function module was aborted by another function module. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 95

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_WriteCamTrim_MDX function module MC_WRITECAMTRIM_MDX Execute : BOOL TrimMaster : BOOL RegisterLoopDXDTOut : UINT RegisterLoopOut : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : BOOL 61777AXX Description The MC_WriteCamTrim_MDX function module is used to trim the active curve in engaged state. This means an offset with a master value, for example caused by slip, can be compensated. SlaveCycle f(x) [1] [2] MasterCycle 61778AXX [1] Shift the slave reference point (input TrimMaster = FALSE; input RegisterLoop- Out = 1 inc.) [2] Shift the master reference point (input TrimMaster = TRUE; input RegisterLoop- Out = +5 inc.) Prerequisites The LinkState output of the MC_LinkTecCam_MDX function module has the status GEN_TEC_INITIALIZED. The CamState output of the MC_LinkTecCam_MDX function module has the status MDX_CAM_MAINCURVE. Positive sign at the RegisterLoopOut input: Curve is decremented. Negative sign at the RegisterLoopOut input: Curve is incremented. 96 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Input signals The following input signals can be set on the MC_WriteCamTrim_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. TrimMaster BOOL FALSE: The curve is shifted with reference to the slip on the slave. TRUE: The curve is shifted with reference to the slip on the master. RegisterLoop- UINT Control range of the control element in inc/ms. DXDTOut RegisterLoopOut DINT Specified setpoint for trimming. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_WriteCamTrim_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL All parameters have been transferred successfully. Busy BOOL The function module has not yet been processed. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 97

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_WriteModuloRest_MDX function module MC_WRITEMODULOREST_MDX Enable : BOOL Axis : AXIS_REF (VAR_IN_OUT) Enabled : BOOL Error : BOOL ErrorID : UINT 61779AXX Description The MC_WriteModuloRest_MDX function module is used to automatically correct the modulo remainder increments. Increments will get lost with infinite division factors of the gear ratio because the cam can only process integer increments. This will lead to a drift as regards the master value. A position drift is determined and compensated cyclically with the modulo parameters taken into operation component-internally. Prerequisite The LinkState output signal of the MC_LinkTecGear_MDX function module has the status TEC_INITIALIZED. The CamState output of the MC_LinkTecCam_MDX function module has the status MDX_CAM_MAINCURVE. Previous initialization of the modulo numerator and denominator factors using the MC_SetModuloParameters_MDX function module. Mapping the SlaveCycle to the defined modulo 36 resolution. Input signals The following input signals can be set on the MC_WriteModuloRest_MDX function module. Input signal Type Meaning Enable BOOL The Enable input signal starts the job of the function module with a rising edge. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_WriteModuloRest_MDX function module provides the following output signals. Output signal Type Meaning Enabled BOOL All parameters have been transferred successfully. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 98 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_AdjustCamSlave_MDX function module MC_ADJUSTCAMSLAVE_MDX Execute : BOOL UseVirtEncoder : BOOL RelativeMaster : BOOL MasterPosition : DINT Velocity : DINT Acceleration : DINT Deceleration : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : UINT 6178AXX Description The MC_AdjustCamSlave_MDX function module adjusts the motor axis to the specified master position prior to the startup cycle process. The actual position for the main curve results from the specified master position. The specified master position is evaluated differently via the RelativeMaster input: RelativeMaster = FALSE The first curve point of the cam is assigned the slave incremental value "". RelativeMaster = TRUE The first curve point of the cam is assigned the modulo actual position value "". The following status variables are changed by the function module when the "Done" message is set: PLCopenState to SYNCHRONIZED_MOTION MC_CAMSTATE to MDX_CAM_MAINCURVE Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 99

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library SlaveCycle [1] [3] [4] SlaveCycle Nr.1 SlaveCycle Nr.2 MasterCycle Nr.1 MasterCycle Nr.2 [2] MasterCycle 61781AXX [1] Emergency stop [2] Current master position at standstill (MasterPosition input). [3] Current slave position at standstill is processed component-internally. [4] Status after completed compensation movement. Motor axis is positioned on the main curve again. Prerequisite The LinkState output signal of the MC_LinkTecGear_MDX function module has the status TEC_INITIALIZED. Master drive at standstill. The modulo function is activated when the input RelativeMaster = TRUE. 1 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Input signals The following input signals can be set on the MC_AdjustCamSlave_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. UseVirtEncoder BOOL = X14 1 = VirtEncoder RelativeMaster BOOL = Absolute adjustment 1 = Relative adjustment (modulo) MasterPosition DINT Actual position of the master drive. Velocity DINT The Velocity input specifies the setpoint speed of the motor axis revolution specifies the ramp time for the acceleration to a speed increased by 3 1/min Acceleration DINT The Acceleration input specifies the acceleration of the motor axis revolution. Deceleration DINT The Deceleration input specifies the deceleration of the motor axis revolution. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_AdjustCamSlave_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL The adjustment process has been completed and the change to the status 'main curve' is performed. Active BOOL The function module has not yet been processed. Command Aborted BOOL The job of the function module was aborted by another function module. Error BOOL Error in the function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 11

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_CamInDirect_MDX function module MC_CamInDirect_MDX Execute : BOOL Axis : AXIS_REF (VAR_IN_OUT) InGear : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : UINT 61784AXX Description The MC_CamInDirect_MDX function module is used to directly start the startup cycle process. The startup cycle mode is reset. The following status variables are changed by the MC_CamInDirect function module: PLCopenState to SYNCHRONIZED_MOTION MC_CAMSTATE to MDX_CAM_MAINCURVE Prerequisite The LinkState output of the MC_LinkTecCam_MDX function module has the status GEN_TEC_INITIALIZED. The CamState output of the MC_LinkTecCam_MDX function module has the status MDX_CAM_RESET or MDX_CAM_STOP. Input signals The following input signals can be set on the MC_CamInDirect_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_CamInDirect_MDX function module provides the following output signals. Output signal Type Meaning InGear BOOL Change to the status "main curve" has been performed. Active BOOL Parameters are being transferred. The status "main curve" has not yet been reached. Command Aborted BOOL The job of the function module was aborted by another function module. Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 12 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_CamOutDirect_MDX function module MC_CamOutDirect_MDX Execute : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Active : BOOL CommandAborted : BOOL Error : BOOL ErrorID : UINT 61785AXX Description The MC_CamOutDirect_MDX function module is used to directly start the stop cycle process. The stop cycle mode is reset. The following status variables are changed by the MC_CamOutDirect_MDX function module: PLCopenState = STANDSTILL MC_CAMSTATE = MDX_CAM_STOP Input signals The following input signals can be set on the MC_CamOutDirect_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_CamOutDirect_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Change to the status "disengaging" has been performed. Active BOOL Parameters are being transferred. The status "disengaging" has not yet been reached. Command Aborted BOOL The job of the function module was aborted by another function module. Error BOOL An error has occurred during execution of the function module. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 13

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_CamCalcSpline_MDX function module MC_CAMCALCSPLINE_MDX Execute : BOOL Number_of_Points : BYTE Spline_P : ARRAY_OF_SPLINE_POINT Mode : UINT Submode : UINT V : REAL A : REAL Vn : REAL An : REAL Table 5 : UINT MasterCycleScale : DINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : UDINT INFO : DINT 61919AXX Description The MC_CamCalcSpline_MDX function module calculates a spline curve based on the X/Y coordinates (X = master / Y = slave) ( examples). Prerequisites Make sure that the drive is at standstill or that the curve to be calculated is not selected. You can activate the corresponding table in MOVIDRIVE using the MC_CamTableSelect function module. 14 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Examples Curve example 1: Input Number_of_Points = 9 Input Mode = Spline_ Spline_ P[] Spline_ P[1] Spline_ P[2] Spline_ P[3] Spline_ P[4] Spline_ P[5] Spline_ P[6] Spline_ P[7] X 1 2 2 256 312 492 52 512 Y 124 496 124 Spline_ P[8] Y = Slave 32768 8192 Mode==Spline_ 256 512 X = Master -8368 61923AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 15

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Curve example 2: Input Number_of_Points = 9 Input Mode = 1 Spline_B (submode = 7) Spline_ P[] Spline_ P[1] Spline_ P[2] Spline_ P[3] Spline_ P[4] Spline_ P[5] Spline_ P[6] Spline_ P[7] X 1 2 2 256 312 492 52 512 Y 124 496 124 Spline_ P[8] 14638 Y = Slave Mode=1=Spline_B 256 512 X = Master 61924AXX 16 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Curve example 3: Input Number_of_Points = 9 Input Mode = 2 Spline_1 Spline_ P[] Spline_ P[1] Spline_ P[2] Spline_ P[3] Spline_ P[4] Spline_ P[5] Spline_ P[6] Spline_ P[7] X 1 2 2 256 312 492 52 512 Y 124 496 124 Spline_ P[8] Y = Slave 32768 8192 Mode=2=Spline_1 256 512 X = Master 61925AXX Tasks of the function module (applies to all examples): Calculation of curves based on 3... 3 coordinate points. The coordinates are transferred with an array. The table curve points of the master on the x-axis are located in the range from... 512. The y-axis includes the positions of the slave. The MasterNorm output is adjusted according to the value of the MasterCycleScale input. Example: Input MasterCycleScale = 36 Output MasterNorm = 1 MasterNorm < MasterCycleScale/32768). The factor calculated at the MasterNorm output is issued. Position scaling is adjusted according to the highest y-value. The calculated factor is output. The slave coordinates (Y... Y29) are multiplied by factor 2 ActPositionScale. Example: Y4 = 496, input ActPositionScale = 4 Y4_intern = 496 2 4 = 65536 (ActPositionScale < 65536/SlaveScale) The spline curve is calculated using the scaled values. The minimum and maximum velocity in the curve is output. The minimum and maximum acceleration is output. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 17

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library The curve is loaded according to the table selected in MOVIDRIVE. The function module has an internal array of 513 curve points in accordance with the MOVIDRIVE configuration. The scaling parameters H3... H89 are written accordingly. Input signals The following input signals can be set on the MC_CamCalcSpline_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Number_of_Points BYTE Number of coordinate points data (3... 3) Spline_P ARRAY [... 29] OFSPLINE_POINT Number of coordinate points: Spline_X = Master position (... 512) Spline_Y = Slave position Mode UINT Mode = Spline_ (cubic spline) Mode 1 = Spline_B ( submode) Mode 2 = Spline_1 (Akima interpolation) Submode UINT Only for mode 1= Spline_B: = 3rd order polynomial (cubic) for calculation 1 = Not supported 2 = 2rd order polynomial (square) 3 = 3rd order polynomial (cubic).. =... 7 = 7th order polynomial V REAL Velocity in the start point of the curve. A REAL Acceleration in the start point of the curve. Vn REAL Velocity in the end point of the curve. An REAL Acceleration in the end point of the curve. Table 5 UINT Selection of curve... 5 MasterCycle scale DINT Master cycle. Axis AXIS_REF This input specifies the motor axis on which the actions of the function module are to be executed. 18 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Output signals The MC_CamCalcSpline_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Calculation, curve and parameter download finished. Busy BOOL The function module has not yet been processed. Error BOOL Error in function module during execution. ErrorID UDINT "Libraries for MOVI-PLC Fault Codes" manual. INFO Vmax DINT Current curve status: Maximum velocity V(i) = Y(i+1) within the cam. Vmin DINT Minimum velocity V(i) = Y(i+1) Y(i) within the cam. AbsVmax Amax DINT DINT Maximum value of the velocity V(i) = Y(i+1) Y(i) within the cam. Maximum velocity A(i) = V(i) V(i 1) within the cam. Amin DINT Minimum acceleration A(i) = V(i) V(i 1) within the cam. AbsAmax MasterNorm ActPositionScale State DINT UINT UINT BYTE Maximum value of the acceleration A(i) = V(i) V(i 1) within the cam. Master scale factor. Position scaling. Processing status. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 19

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library MC_CamCalcRtoR_MDX function module MC_CAMCALCRtoR_MDX Execute : BOOL Number_of_Points : BYTE X2 : DINT Y2 : DINT X3 : DINT Y3 : DINT X4 : DINT Y4 : DINT X5 : DINT Y5 : DINT X6 : DINT Y6 : DINT FunctionNo : UINT Table 5 : UINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : UDINT INFO : DINT 6192AXX Description The MC_CamCalcRtoR_MDX function module calculates a curve based on the X/Y coordinates (X = master / Y = slave) ( examples). The curve is made up of a number of sequences. The transitions of the sequences are rest-to-rest. Prerequisites Make sure that the drive is at standstill or that the curve to be calculated is not selected. You can activate the corresponding table in MOVIDRIVE using the MC_CamTableSelect function module. 11 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Examples Curve example 1: Input Number_of_Points = 6 The drive is positioned in section 1 (the virtual master moves from X1 to X2). The drive moves forward by one revolution (the virtual master moves from X2 to X3). The drive is positioned in section 3 (position Y3 = Y4. The virtual master moves from X3 to X4). The drive moves backward by one revolution (the virtual master moves from X4 to X5). The drive is positioned in section 5 (position Y5 = Y6 = Y1. The virtual master moves from X5 to X6). The curve begins again at X1. X1/Y1 X2/Y2 X3/Y3 X4/Y4 X5/Y5 X6/Y6 Y = Slave X = Master 61921AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 111

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Curve example 2: Input Number_of_Points = 6 The drive is positioned in section 1 (the virtual master moves from X1 to X2). The drive moves forward by one revolution (the virtual master moves from X2 to X3). The drive is positioned in section 3 (position Y3 = Y4. The virtual master moves from X3 to X4). The drive moves backward by 1.5 revolutions (the virtual master moves from X4 to X5). The drive moves forward by half a revolution (position Y6 = Y1. The virtual master moves from X5 to X6). The curve begins again at X1. X1/Y1 X2/Y2 X3/Y3 X4/Y4 X5/Y5 X6/Y6 Y = Slave X = Master 61914AXX 112 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Curve example 3: Input Number_of_Points = 4 The drive is positioned in section 1 (the virtual master moves from X1 to X2). The drive moves forward by one revolution (the virtual master moves from X2 to X3). The drive is positioned in section 3 (position Y3 = Y4. The virtual master moves from X3 to X4). The curve begins again at X1. X1/Y1 X2/Y2 X3/Y3 X4/Y4 = Slave X = Master 61922AXX Tasks of the function module (applies to all examples): Calculation of curves based on 2... 6 coordinate points. The curve always begins at / (X/Y). Calculation is always for rest-to-rest motion The master cycle corresponds to the highest master position. Example: Input Number_of_Points = 5 Master cycle = X5 The MasterNorm output is adjusted according to the value of the MasterCycleScale input. Example: Input MasterCycleScale = 36 Output MasterNorm = 1 MasterNorm < MasterCycleScale/32768). The factor calculated at the MasterNorm output is issued. Position scaling is adjusted according to the highest y-value. The calculated factor is output. The slave coordinates (Y2... Y6) are multiplied by factor 2 ActPositionScale. Example: Y4 = 496, input ActPositionScale = 5 Y4_intern = 496 2 5 = 13172 (ActPositionScale < 13172/SlaveScale) The minimum and maximum velocity in the curve is output. The minimum and maximum acceleration is output. The curve is loaded according to the curve number selected in MOVIDRIVE. The function module has an internal array of 513 curve points in accordance with the MOVIDRIVE configuration. The scaling parameters H3... H89 are written accordingly. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 113

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Input signals The following input signals can be set on the MC_CamCalcRtoR_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Number_of_Points BYTE Number of coordinate curve points. X2 DINT 2nd curve point - master position Y2 DINT 2nd curve point - slave position X3 DINT 3rd curve point - master position Y3 DINT 3rd curve point - slave position X4 DINT 4th curve point - master position Y4 DINT 4th curve point - slave position X5 DINT 5th curve point - master position Y5 DINT 5th curve point - slave position X6 DINT 6th curve point - master position Y6 DINT 6th curve point - slave position FunctionNo UINT FunctionNo: = Even 1 = 5th order polynomial 2 = Sine 3 = 3rd order polynomial 4 = Sinoids from Bestehorn 5 = Modifed acceleration trapezoid Table 5 UINT Selection of curve... 5 Axis AXIS_REF This input specifies the motor axis on which the actions of the function module are to be executed. Output signals The MC_CamCalcRtoR_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Calculation, curve and parameter download finished. Busy BOOL The function module has not yet been processed. Error BOOL Error in the function module during execution. ErrorID UDINT "Libraries for MOVI-PLC Fault Codes" manual. INFO Current curve status: Vmax dint Maximum velocity V(i) = Y(i+1) within the cam. Vmin DINT Minimum velocity V(i) = Y(i+1) Y(i) within the cam. AbsVmax Amax DINT DINT Maximum value of the velocity V(i) = Y(i+1) Y(i) within the cam. Maximum velocity A(i) = V(i) V(i 1) within the cam. Amin DINT Minimum acceleration A(i) = V(i) V(i 1) within the cam. AbsAmax MasterNorm ActPositionScale State DINT UINT UINT BYTE Maximum value of the acceleration A(i) = V(i) V(i 1) within the cam. Master scale factor. Position scaling. Processing status. 114 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 MC_CamCalcRtoR5_MDX function module MC_CAMCALCRtoR5_MDX Execute : BOOL Number_of_Points : BYTE RtoR : ST_RtoR FunctionNo : UINT Table 5 : UINT Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : UDINT INFO : DINT 6214AXX Description The MC_CamCalcRtoR5_MDX function module calculates a curve based on X/Y coordinates (X = master / Y = slave) ( Examples). The curve is made up of up to 5 sequences. The transitions of the sequences are rest-to-rest. Prerequisites Make sure that the drive is at standstill or that the curve to be calculated is not selected. You can activate the corresponding table in MOVIDRIVE using the MC_CamTableSelect function module. Example Curve example: Input Number_of_Points = 36 Rest-to-rest motion with 8 cycles and subsequent backward movement to the mechanical starting point. The curve points are entered via an array: grtor: ST_RtoR; (* Array to specify the curve points *) 6215AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 115

I MPLCTecCamMotion_MDX 4 Overview of the MPLCTecCamMotion_MDX library Y = Slave X = Master 6216AXX Tasks of the function module: Calculate curves with a minimum of 2 and a maximum of 5 coordinate points. The curve always begins at / (X/Y). Rest-to-rest is always calculated. The master cycle corresponds to the highest master position. Example: Input Number_of_Points = 36 master cycle = X36 The MasterNorm output is adjusted according to the value of the MasterCycleScale input. Example: Input MasterCycleScale = 36 Output MasterNorm = 1 MasterNorm < MasterCycleScale/32768). The factor calculated at the MasterNorm output is issued. Position scaling is adjusted according to the highest y-value. The calculated factor is output. The slave coordinates (Y2... Y5) are multiplied by factor 2 ActPositionScale. Example: Y4 = 496, input ActPositionScale = 5 Y4_intern = 496 2 5 = 13172 (ActPositionScale < 13172/SlaveScale) The minimum and maximum velocity in the curve is output. The minimum and maximum acceleration is output. The curve is loaded according to the curve number selected in MOVIDRIVE. The function module has an internal array of 513 curve points in accordance with the MOVIDRIVE configuration. The scaling parameters H3... H89 are written accordingly. 116 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Overview of the MPLCTecCamMotion_MDX library I 4 Input signals The following input signals can be set on the MC_CamCalcRtoR5_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Number_of_Points BYTE Number of coordinate curve points RtoR ST_RtoR Array with a maximum of 5 input values for: x = Master position y = Slave position FunctionNo UINT FunctionNo: = Even 1 = 5th order polynomial 2 = Sine 3 = 3rd order polynomial 4 = Sinoids from Bestehorn 5 = Modifed acceleration trapezoid Table 5 UINT Selection of curve... 5 Axis AXIS_REF This input specifies the motor axis on which the actions of the function module are to be executed. Output signals The MC_CamCalcRtoR5_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Calculation, curve and parameter download finished. Busy BOOL The function module has not yet been processed. Error BOOL Error in function module during execution. ErrorID UDINT "Libraries for MOVI-PLC Fault Codes" manual. INFO Vmin DINT Current curve status: Maximum velocity V(i) = Y(i+1) within the cam. Vmin DINT Minimum velocity V(i) = Y(i+1) Y(i) within the cam. AbsVmax Amax DINT DINT Maximum value of the velocity V(i) = Y(i+1) Y(i) within the cam. Maximum velocity A(i) = V(i) V(i 1) within the cam. Amin DINT Minimum acceleration A(i) = V(i) V(i 1) within the cam. AbsAmax MasterNorm ActPositionScale State DINT UINT UINT BYTE Maximum value of the acceleration A(i) = V(i) V(i 1) within the cam. Master scale factor. Position scaling. Processing status. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 117

I MPLCTecCamMotion_MDX 4 Appendix 4.4 Appendix 4.4.1 Abortion of function modules (CommandAborted output signal) The CommandAborted output signal is used to signal that a movement module was called several times (MC_Move...) or another movement module was called. The aborted job will not be executed anymore ( "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " manual). Activated function module MC_CamInDirect_MDX MC_CamOutDirect_MDX MC_PrepareCamIn_MDX MC_PrepareCamOut_MDX Function module of the MPLCMotion_MDX library Creates CommandAborted to Instances of MC_CamInDirect_MDX MC_Move function modules MC_CamOutDirect_MDX Instances of MC_CamOutDirect_MDX MC_CamOutDirect_MDX MC_PrepareCamOut_MDX Instances of MC_PrepareCamIn_MDX MC_GearInDirect_MDX MC_CamInDirect_MDX Instances of MC_PrepareCamOffset_MDX MC_CamOutDirect_MDX MC_CamInDirect_MDX MC_PrepareCamIN_MDX MC_CamOutDirect_MDX MC_PrepareCamOut_MDX 118 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Appendix I 4 The following figure shows a schematic view of the mutual abortion conditions when CommandAborted is issued (CA). New instance: CA to previous MC_CamInDirect_MDX MC_CamOutDirect_MDX New instance: CA to previous Call creates CA Modules from MPLCMotion_MDX - MC_MoveVelocity_MDX - MC_MoveAbsolute_MDX - MC_MoveRelative_MDX - MC_Home_MDX Call creates CA New instance: CA to previous MC_PrepareCamIn_MDX MC_PrepareCamOut_MDX New instance: CA to previous 61787AEN NOTES The described behavior does not apply to the following function modules: MC_LinkTecCam_MDX MC_CamTableScale_MDX MC_SetCamConfig_MDX MC_Move... function modules of the MPLCMotion_MDX library: MC_MoveVelocity_MDX MC_MoveAbsolute_MDX MC_MoveRelative_MDX MC_Home_MDX, etc. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 119

I MPLCTecCamMotion_MDX 4 Cam examples 4.5 Cam examples 4.5.1 Example 1: Curve design with the Motion Technology Editor In MOVITOOLS MotionStudio, start the Motion Technology Editor ( following figure). 61788AEN 12 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 In the Motion Technology Editor ( following figure), select the "Startup for MOVI- PLC" checkbox [1]. System variables will be stored remanently and can be adopted by the MC_CamTableSelect_MDX function module. From the "No. of curves" selection list [2], choose the number of curves ( following figure) and perform startup of the individual curves one after the other. Click the <Setup curve 1> button to set the general curve parameters. [2] [1] 61789AEN Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 121

I MPLCTecCamMotion_MDX 4 Cam examples Specify the general curve parameters [1] ( following figure): Startup cycle / stop cycle Number of curve points Master cycle Select the "Show user parameters" checkbox [2]. [1] [2] Example without startup cycle curve: Number of curve points = 512 Startup cycle = Master cycle = 5 6179AEN Example with startup cycle curve: Number of curve points = 256 Startup cycle = 2 Master cycle = 5 Click <Next> to continue. 122 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 Combine the individual segments to create the curve ( following figure). 61791AEN Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 123

I MPLCTecCamMotion_MDX 4 Cam examples For special applications (using the MC_SeTCamConfig_MDX function module instead of the MC_CamTableSelct_MDX function module), the following IPOS plus variables have to be adopted ( following figure): H431 MasterNorm H432 MasterCycleScale H433 StartupCycleScale H44 ActualPositionScale H443 NFilter H444 DirectionBlock H446 MFilter Click <Next> to load the curve parameters to the inverter. 61792AEN 124 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 Click <Download> to finish startup of the cam control ( following figure). 61793AEN Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 125

I MPLCTecCamMotion_MDX 4 Cam examples 4.5.2 Example 2: Creating PLC user program Integrating MPLCTecCam- Motion_MDX.lib library Select [Ressources] / [Library Manager] to integrate the MPLCTecCamMotion_MDX.lib library ( following figure): 61794AEN 126 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 Example program MC_CamTableSelect_MDX with virtual encoder The following figure shows the programming of the function modules for controlling the cam in the free-wheeling task. 6185AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 127

I MPLCTecCamMotion_MDX 4 Cam examples The following figure shows the programming of the function modules for controlling the virtual encoder (5 ms task). 6187AXX 128 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 Example program MC_SetCamConfig_MDX with incremental master value 6188AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 129

I MPLCTecCamMotion_MDX 4 Cam examples Step 1: Creating the virtual encoder in the 5 ms task 6173AXX 13 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 Step 2: Creating and configuring the slave 61731AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 131

I MPLCTecCamMotion_MDX 4 Cam examples 4.5.3 Programming notes MC_LinkTecCam_MDX Job: Logical axis connection to the technology function Electronic cam Outputs LinkState: Status message LinkTecCam CamState: Status message CamState LinkState > GEN_TEC_RESET AutoConfig NO YES MC_TableSelect_MDX Job: Automatic re-copying of the startup parameters of the CamEditor MC_SetCamConfig_MDX Job: Manual re-copying of the input parameters Done: Preparation/parameter download completed LinkState = GEN_TEC_INITIALISED Direct engaging NO YES Job: InGear: MC_CamInDirect_MDX Start of the startup cycle process Main curve active Job: Done: MC_PrepareCamIn_MDX Selection of SEW-specific startup cycle modes (e.g. interrupt-controlled) Preparation/parameter download completed Direct disengaging NO YES MC_CamOutDirect_MDX Job: Start of the stopy cycle process OutOfGear: CamFunction deactivated Job: Done: MC_PrepareCamOut_MDX Selection of SEW-specific stop cycle modes (e.g. interrupt-controlled) Preparation/parameter download completed 6189AEN 132 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 4.5.4 Diagnostic functions in the Motion Technology Editor Curve design with Motion Technologie Editor In MOVITOOLS MotionStudio, start the Motion Technology Editor. From the menu, choose "Monitor an existing curve application" ( following figure). 6181AEN Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 133

I MPLCTecCamMotion_MDX 4 Cam examples Call the curve to be monitored (e.g. curve 1). To do so, click the respective tab page (e.g. tab page "Curve no. 1" following figure). Next click the required diagnostic function 61811AEN 134 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 4.5.5 Operation with virtual master encoder Advantages The MPLCMotionVirtualEncoder library for controlling the virtual master encoder calculated in the MOVI-PLC is available. Simple and central control of the virtual master encoder as replacement of the mechanical vertical shaft. More cam slaves can be easily connected to the virtual master encoder. The following example shows how the virtual master encoder is created in an independent 5 ms task. The example also shows the settings on the MC_CamTableSelect_MDX function module required to ensure optimum operation of the cam at the virtual encoder. Under [Resources] / [Task configuration], create a 5 ms task. In the following example, the PLC_VE_PRG program was appended to the task. The main program PLC_PRG runs in the free-wheeling task in the example. 61812AEN Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 135

I MPLCTecCamMotion_MDX 4 Cam examples Select [Resources] / [Library Manager] from the menu to insert the MPLCVirtual- Encoder library 61813ADE Call the MC_LinkTecAxis_Virtual function module in the PLC_VE_PRG program. At the CycleTime input, enter the value "5" ( following figure). 61814AXX Program the setpoints for the virtual encoder. In the example, the MC_MoveVelocity_Virtual function module is used for specifying an endless position ( following figure). 61815AXX 136 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Cam examples I 4 On the MC_CamTableSelect_MDX function module, set the UseVirtEncoder input to TRUE. 61816AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 137

I MPLCTecCamMotion_MDX 4 Cam examples 4.5.6 Axis driver AxisControlCam for cam applications An axis driver is available to increase the diagnostics capability of MOVI-PLC applications programmed by the customer. The axis driver isolates the drive functionality and makes it available to the actual application via a standardized interface. The following functions can be selected using the axis driver: Speed control (with or without encoder) Jog in speed control Jog in positioning mode Positioning Reference travel Electronic cam AxisControlCam Node SBUs_Address HControl PowerOffMode Power Reset QuickStop AxisMode Start JogPos JogNeg Position Velocity Acceleration Deceleration StartRisingEdge ModuloMode UseVirtEncoder Table RequestedAxisMode ActualAxisMode Connected Powered Done Active AxisError AxisErrorID FBError FBErrorID Axis PLCopenState InverterData LinkState CamState InGear 61817AXX 138 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Appendix I 4 4.6 Appendix 4.6.1 Changing the interpolation time manually (MFilterTime) If the MasterSource (= master value) of the electronic cam is not read per millisecond, then an interpolation of the read master value must be achieved by adjusting the MFilterTime input. The setting at the MFilterTime input has a linear effect on the following parameters: MasterCycle scale MasterNorm When using a startup cycle curve: StartupCycleScale StartupCycleCounterMaxValue The following figure shows the input wiring of the MC_SetCamConfig_MDX function module prior to adjustment (input MFilterTime = 1, i.e. no filter activated). MC_SetCamConfig_MDX bsetcamconfig FALSE MDX_CAM_MASTER_X14 1 5 5 7 1 LogAdrA1 Execute MasterCountDirection MasterSource MasterNorm MasterCycleScale StartupCycleScale ActualPositionScale NFilterTime DirectionBlock MFilterTime Axis Done Busy Error ErrorID SetCamConfigDone SetCamConfigBusy SetCamConfigError SetCamConfigErrorID 61818AXX Example: Virtual master value, received via SBus every 5 ms The following example shows the input wirings that will have to be adjusted if a virtual encoder, the setpoint of which is received in the drive inverter every 5 ms, is created as master value. Adjusting the MFilterTime The MFilterTime is defined with factor "5" Adjusting the MasterCycleScale Increasing the MFilterTime by factor "5" directly influences the master cycle (H432 MasterCycleScale). The master cycle must also be increased by this factor. Adjusting the MasterNorm The subsequent control calculation determines whether increasing the master cycle must be taken into account by adjusting the scaling factor of the master cycle. A check is performed during the calculation whether the internal range of representation of 2 16 1 is violated. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 139

I MPLCTecCamMotion_MDX 4 Appendix Calculation MasterCycleScale (old) / 2 15 = 5 / 2 15 = 1.53 <2 1 The value "1" was determined at startup of the Motion Technology Editor. MasterCycleScale (new) / 2 15 = 25 /2 15 = 7.63 < 2 3 This means the value "3" at the MasterNorm input has to be adjusted. MC_SetCamConfig_MDX bsetcamconfig FALSE MDX_VIRTUAL_ENCODER_ID1 3 25 5 7 5 LogAdrA1 Execute MasterCountDirection MasterSource MasterNorm MasterCycleScale StartupCycleScale ActualPositionScale NFilterTime DirectionBlock MFilterTime Axis Done Busy Error ErrorID SetCamConfigDone SetCamConfigBusy SetCamConfigError SetCamConfigErrorID 61854AXX The calculations lead to the following results: Input designation Values from the Motion Technology Editor Values after adjustment MFilterTime 1 Adjusted 5 MasterCycle scale 5 Calculated 25 MasterNorm 1 Calculated 3 14 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamMotion_MDX Appendix I 4 4.6.2 Read / write a curve set via the VarData service It might be necessary for specific applications to extend the options for changing between 6 curves. The SbusHandleCamDate function module from the MPLCInterface_Can library can be integrated to allow for handling centrally calculated curve points and downloading to the drive inverter. The following example describes a possible wiring of the function module. Select [Resources] / Library Manager] to insert the MPLCInterface_Can library ( following figure). 61855AEN Open the library MPLCInterface_Can and insert the SBusHandleCamDate function module. Call the SBusHandleCamData function module. The PointerDate input must have been created using the structure apointerdata : ARRAY [...512] OF DINT; ( following figure). SBusHandleCamData DI.1 SBUS_NODE_1 1 2 ML_VD_SVC_READ_EEPROM ADR(aPointerData) nsbuscurve 513 5 Execute Node SBusAddress Channel Service PointerData CurveNumber DataLength TimeMax Done Busy Error ErrorID MvlReturnCode RequestCount DataLengthOut SBusDone SBusBusy SBusError SBusErrorID SBusMvLReturnCode SBusReqCount SBusDataLength You can choose the following settings at the Service input: ML_VD_SVC_READ_EEPROM ML_VD_SVC_WRITE ML_VD_SVC_READ_RAM 61856AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 141

I MPLCTecCamMotion_MDX 4 Appendix NOTE The curve points should always be managed via this function module. Download via the parameter data channel of the drive inverter is not recommended because of the required cycle time and the exclusive limitation to the first curve. 4.6.3 Allocation of the remanent IPOS plus variables and scaling factors When performing startup with the Motion Technology Editor, the scaling factors belonging to the selected curve are saved in the remanent IPOS plus memory area of the drive inverter. The following table shows to which variable (H..) of the inverter the scaling factors will be saved. Curve 1 Curve 2 Curve 3 Curve 4 Curve 5 Curve 6 Master scale factor. H3 H4 H5 H6 H7 H8 H431 MasterNorm Scaled master cycle H31 H41 H51 H61 H71 H81 H432 MasterCycleScale Scaled startup cycle H32 H42 H52 H62 H72 H82 H433 StartupCycleScale Position scaling H33 H43 H53 H63 H73 H83 H44 ActPositionScale NFilter H34 H44 H54 H64 H74 H84 H443 NFilterTime Backstop H35 H45 H55 H65 H75 H85 H444 ReSprintClose MFilter H36 H46 H56 H66 H76 H86 H446 MFilterTime Reserved H37 H47 H57 H67 H77 H87 Reserved H38 H48 H58 H68 H78 H88 Reserved H39 H49 H59 H69 H79 H89 142 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Introduction I 5 5 MPLCTecCamSwitch_MDX 5.1 Introduction The MPLCTecCamSwitch_MDX library is based on the technology function "Cam controller" of the MOVIDRIVE B drive inverter. The following simplifications were achieved compared to the previous solution approaches. Before: Familiarization in the SEW-specific programming language Special knowledge required for creating the cam controller and setting the relevant parameters. Solution with MOVI-PLC : Programming in accordance with IEC 61131, which means customer-specific applications can be implemented easily. Library for controlling the technology function "Cam controller". Using this library, the cam controller technology function can be configured and controlled easily without detailed knowledge of the individual firmware functions. NOTE Additional documentation: For general notes on the functioning of the library, refer to the "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " manual. "IPOS plus " manual 5.2 Areas of application The MPLCTecCamSwitch_MDX library is suited for applications where hardware outputs have to be switched quickly depending on a position. Application examples Controlling glue guns in packaging machines Switching valves Properties Up to 8 cam channels (binary outputs DO2 to DO5 of the MOVIDRIVE B basic unit and DO1 to DO13 with MOVIDRIVE B with DIP11B o DIO11B option) can be configured with 4 cams each (switching ranges). The binary outputs must be configured with parameters P62x and P63x to IPOS output in the parameter tree of the MOVITOOLS MotionStudio. The response time of the cam channels (t z ) is 1 ms for binary outputs DO2 to DO5 and 5 ms for binary outputs DO1 to DO13. Each cam channel takes account of the delay (switching delay) of the connected actuator. In this way the switching position is corrected depending on the velocity (quantization.1 ms). The cam controller can be set to the following position sources: All physical encoder inputs of MOVIDRIVE B Virtual encoders of the MOVI-PLC controller Virtual encoder on MOVIDRIVE B Four positions via SBus Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 143

I MPLCTecCamSwitch_MDX 5 Project planning 5.3 Project planning 5.3.1 Prerequisites In order to use the MPLCTecCamSwitch_MDX library, you need a MOVI-PLC controller in application version T1 or higher. A MOVIDRIVE B unit in standard version (..) is sufficient as drive inverter. The MPLCTecCamSwitch_MDX library must be inserted in the project in addition to the MPLCMotion_MDX library. Also adhere to the prerequisites in the "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC " manual. 5.4 Overview of the MPLCTecCamSwitch_MDX library 6186AXX MC_ForceCamSwitchChannel_MDX function module The MC_ForceCamSwitchChannel_MDX function module is used to set and clear outputs independent of the cam controller. MC_LinkTecCamSwitch_MDX function module The MC_LinkTecCamSwitch_MDX function module constitutes the interface between technology function "Cam controller" and motor axis and must therefore be called cyclically in the program. Once the MC_ConnectAxis_MDX function module has established the connection with the motor axis, the MC_LinkTecCamSwitch_MDX function module activates the cam controller technology function on the respective motor axis. MC_SetCamSwitchConfig_MDX function module The MC_SetCamSwitchConfig_MDX function module is used to configure the cam controller. This function module must be called with a rising edge at the Execute input when the MOVI-PLC controller is started, or when you want to change the parameters of the cam controller. MC_StartCamSwitch_MDX function module The MC_StartCamSwitch_MDX function module is used to activate the cam controller. MC_StopCamSwitch_MDX function module The MC_StopCamSwitch_MDX function module is used to deactivate the cam controller. 144 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Overview of the MPLCTecCamSwitch_MDX library I 5 5.4.1 Data types of the MPLCTecCamSwitch_MDX library You find the data types of the MPLCTecCamSwitch_MDX library in the library MPLCDatatypes. 61861AXX Data type MC_CAMSWITCH_AREAS_MDX The cam width of the four cams is specified in this structure. The structure is passed to the MC_SetCamSwitchConfig_MDX function module on the Areas input. 61862AXX [1] [2] [3] [4] [5] [6] [1] Trigger cam 1 [4] Trigger cam 2 [2] Limit 1 of trigger cam 1 (DINT) [5] Limit 1 of trigger cam 2 (DINT) [3] Limit 2 of trigger cam 2 (DINT) [6] Limit 2 of trigger cam 2 (DINT) 61863AXX Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 145

I MPLCTecCamSwitch_MDX 5 Overview of the MPLCTecCamSwitch_MDX library Data type MC_CAMSWITCH_FORCEORDER_MDX This enumeration specifies to which value the output is to be set independent of the cam controller. 61864AXX Data type MC_CAMSWITCH_SOURCE_MDX This data type is used to define the source of the cam controller. 61865AXX Data type MC_CAMSWITCH_STATE_MDX This enumeration is used to display the current status of the cam controller. 61866AXX 146 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Overview of the MPLCTecCamSwitch_MDX library I 5 5.4.2 Restore function for saving the MOVIDRIVE system variables The MPLCTecCamSwitch_MDX library provides an initialization service. You can configure this service via the InitService input of the MC_LinkTecCamSwitch function module. Service GEN_RESTORE_SERVICE Once an axis fault has been acknowledged, the last configuration of the cam will be automatically transferred to MOVIDRIVE B. The MC_SetCamSwitchConfig_MDX function module must not be called again. Service GEN_RESET_SERVICE The configuration of the technology function is deleted when an axis fault has been acknowledged. To reconfigure the cam controller, you have to call the MC_SetCamSwitchConfig_MDX function module. Service GEN_NO_SERVICE The configuration of the technology function is not initialized when an axis fault has been acknowledged. To reconfigure the cam controller, you have to call the MC_SetCamSwitchConfig_MDX function module. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 147

I MPLCTecCamSwitch_MDX 5 Overview of the MPLCTecCamSwitch_MDX library 5.4.3 Function modules of the MPLCTecCamSwitch_MDX library MC_LinkTecCamSwitch_MDX function module MC_LINKTECCAMSWITCH_MDX Enable : BOOL InitService : MC_LINKTEC_INITSERVICE Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Error : BOOL ErrorID : DWORD LinkState : MC_LINKTECSTATE CamSwitchState : MC_CAMSWITCH_STATE_MDX Axis : AXIS_REF (VAR_IN_OUT) 61867AXX Description The MC_LinkTecCamSwitch_MDX function module constitutes the logical interface between the motor axis and the technology function "Cam controller". When the MC_ConnectAxis_MDX function module has established cyclic communication with the motor axis, the initialization service selected at the InitService input will be performed. The technology function "Cam controller" is linked when the output LinkState is unequal GEN_TEC_NOTLINKED. NOTES The MC_LinkTecGear_MDX function module is mandatory for using the technology function "Cam controller" and must be called cyclically in the program. If the output signal LinkState has the status NotLinked, then the technology function "Cam controller" cannot be configured or activated. Prerequisite MOVI-PLC basic or advanced controller in the technology version T1 or higher. The MC_ConnectAxis_MDX function module is integrated in the cyclical program for the relevant motor axis. 148 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Overview of the MPLCTecCamSwitch_MDX library I 5 Input signals The following input signals can be set on the MC_LinkTecCamSwitch_MDX function module. Input signal Type Meaning Enable BOOL The function module is processed as long as the input signal Enable = TRUE. Initialization is performed with a rising edge. InitService MC_LINKTEC_ INIT- SERVICE Selection of the initialization service after communication has been reestablished (e.g. following fault reset): GEN_RESET_SERVICE (variables are deleted on controller and motor axis) GEN_RESTORE_SERVICE (last image is transferred to the motor axis) GEN_NO_SERVICE (no initialization) Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_LinkTecCamSwitch_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL Initialization successfully completed, connection with the "Cam controller" technology function created. Error BOOL Error in function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. LinkState MC_LINKTECSTATE Current status: GEN_TEC_NOTLINKED (no connection) GEN_TEC_NOTINITIALIZED (not initialized) GEN_TEC_RESETED (reset service executed) GEN_TEC_RESTORED (restore service executed) GEN_TEC_INITIALIZED (cyclical data exchange successful) CamSwitchState MC_CAMSWITCH STATE Current status of the technology function MDX_CAMSWITCH_INACTIVE MDX_CAMSWITCH_ACTIVE Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 149

I MPLCTecCamSwitch_MDX 5 Overview of the MPLCTecCamSwitch_MDX library The following figure shows the state diagram of the LinkState output. INITIALIZED 5 4 6 RESTORED NOTINITIALIZED RESETED 2 1 3 NOTLINKED 61868AXX The state transitions 1, 2 and 3 are triggered by the MC_LinkTecCamSwitch_MDX function module. One of the three states is assumed once the logical connection to the motor axis has been established independent of the initialization service at the InitService input. GEN_TEC_NOTINITIALIZED GEN_TEC_RESETED GEN_TEC_RESTORED 15 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Overview of the MPLCTecCamSwitch_MDX library I 5 State transitions 4, 5 and 6 are triggered by the MC_SetCamSwitchConfig_MDX function module. This function module initializes and writes the parameters of one of the four cam channels. When the function module is executed for the first time after the logical connection to the motor axis has been established, the function module will trigger one of the three state transitions. The technology function "Cam controller" is then in the state GEN_TEC_INITIALIZED. The cam controller can only be activated when the required parameters have been initialized. The MC_StartCamSwitch_MDX function module can therefore only be executed without errors if the LinkState output has one of the two values GEN_TEC_RESTORED or GEN_TEC_INITIALIZED. As long as the LinkState output has the value GEN_TEC_NOTLINKED, an error message will be issued each time a technology module of the cam function is executed. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 151

I MPLCTecCamSwitch_MDX 5 Overview of the MPLCTecCamSwitch_MDX library MC_SetCamSwitchConfig_MDX function module MC_SETCAMSWITCHCONFIG_MDX Execute : BOOL Select : MC_DIGITALOUTPUTS_MDX PredictionTime : UINT NumberOfCams : UINT Areas : MC_CAMSWITCH_AREAS_MDX Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61869AXX Description The MC_SetCamSwitchConfig_MDX function module is used to configure a cam channel (i.e. the binary output of MOVIDRIVE B). An instance of the MC_SetCamSwitchConfig_MDX function module should be integrated in the program for each cam channel. The MC_SetCamSwitchConfig_MDX function module changes among others the following status variables: The LinkState output of the MC_LinkTecCamSwitch_MDX function module is set to GEN_TEC_INITIALIZED. Input signals The following input signals can be set on the MC_SetCamSwitchConfig_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Select MC_DIGITALOUTPUT Selection of the cam channel: S_MDX MDX_DO2: Binary output DO2 (X1.x) MDX_DO3: Binary output DO3 (X16.3) MDX_DO4: Binary output DO4 (X16.4) MDX_DO5: Binary output DO5 (X16.5) MDX_DO1: Binary output DO1 (DIO11B: X23:1 / DIP11B: X61:1) MDX_DO11: Binary output DO11 (DIO11B: X23:2 / DIP11B: X61:2) MDX_DO12: Binary output DO12 (DIO11B: X23:3 / DIP11B: X61:3) MDX_DO13: Binary output DO13 (DIO11B: X23:4 / DIP11B: X61:4) PredictionTime UINT Compensation of the response and switching time of the connected actuator. Time resolution 1 μs, value range... 5 Example: PredictionTime = 1 corresponds to 1 ms NumberOfCams UINT Number of cams per channel. Value range... 4 If NumberOfCams =, the channel will never switch (no cam). Areas MC_CAMAREAS_MDX Switching limits of the cams. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. 152 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Overview of the MPLCTecCamSwitch_MDX library I 5 Output signals The MC_SetCamSwitchConfig_MDX function module provides the following output signals: Output signal Type Meaning Done BOOL The output indicates that the parameters have been written successfully. The state LinkState changes to GEN_TEC_INITIALIZED. Busy BOOL Parameters are being transferred. Error BOOL Error in function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 153

I MPLCTecCamSwitch_MDX 5 Overview of the MPLCTecCamSwitch_MDX library MC_StartCamSwitch_MDX function module MC_STARTCAMSWITCH_MDX Execute : BOOL CamSwitchSource : MC_CAMSWITCH_SOURCE_MDX Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61871AXX Description The MC_StartCamSwitch_MDX function module is used to activate the cam function. Input signals The following input signals can be set on the MC_StartCamSwitch_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. EncoderSource MC_CAMSWITCH_- SOURCE_MDX Specification of the encoder source with which the cam controller is to operate: MDX_CAMSWITCH_SOURCE_X15: Motorgeber (X15) MDX_CAMSWITCH_SOURCE_X14: Ext. encoder (X14) MDX_CAMSWITCH_SOURCE_SSI: SSI (DIP11B) MDX_CAMSWITCH_SOURCE_MODULO: Actual modulo position (H455) MDX_CAMSWITCH_SOURCE_VENC: Virtual encoder MDX (H376) MDX_CAMSWITCH_SOURCE_PDO_1: PDO from system bus (H31) MDX_CAMSWITCH_SOURCE_PDO_2: PDO from system bus (H32) MDX_CAMSWITCH_SOURCE_PDO_3: PDO from system bus (H33) MDX_CAMSWITCH_SOURCE_PDO_4: PDO from system bus (H34) Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_StartCamSwitch_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL The output indicates that the technology function "Cam controller" is active. The state CamSwitchState changes to MDX_CAMSWITCH_ACTIVE Busy BOOL The output indicates that the function module of the cam controller starts. Error BOOL Error in function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 154 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

MPLCTecCamSwitch_MDX Overview of the MPLCTecCamSwitch_MDX library I 5 MC_StopCamSwitch_MDX function module MC_STOPCAMSWITCH_MDX Execute : BOOL Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL CommandAborted : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61872AXX Description The MC_StopCamSwitch_MDX function module is used to deactivate the cam function. Input signals The following input signals can be set on the MC_StartCamSwitch_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_StartCamSwitch_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL The output indicates that the technology function "Cam controller" is inactive. The state CamSwitchState changes to MDX_CAMSWITCH_INACTIVE Busy BOOL The output indicates that the function module of the cam controller stops. Error BOOL Error in function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 155

I MPLCTecCamSwitch_MDX 5 Overview of the MPLCTecCamSwitch_MDX library MC_ForceCamSwitchChannel_MDX function module MC_FORCECAMSWITCHCHANNEL_MDX Execute : BOOL Select : MC_DIGITALOUTPUTS_MDX Order : MC_CAMSWITCH_FORCEORDER_MDX Axis : AXIS_REF (VAR_IN_OUT) Done : BOOL Busy : BOOL Error : BOOL ErrorID : DWORD Axis : AXIS_REF (VAR_IN_OUT) 61873AXX Description The MC_ForceCamSwitchChannel_MDX function module defines the way in which the output is to be set independent of the cam controller. Input signals The following input signals can be set on the MC_ForceCamSwitchChannel_MDX function module. Input signal Type Meaning Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs. Select MC_DIGITALOUTPUTS_ MDX Number of the cam channel the output of which is to be influenced: MDX_DO2: Binary output DO2 (X1.7) MDX_DO3: Binry output DO3 (X16.3) MDX_DO4: Binary output DO4 (X16.4) MDX_DO5: Binary output DO5 (X16.5) MDX_DO1: Binary output DO1 (DIO11B: X23:1 / DIP11B: X61:1) MDX_DO11: Binary output DO11 (DIO11B: X23:2 / DIP11B: X61:2) MDX_DO12: Binary output DO12 (DIO11B: X23:3 / DIP11B: X61:3) MDX_DO13: Binary output DO13 (DIO11B: X23:4 / DIP11B: X61:4) Order MC_CAMFORCEORDER _MDX Instruction how the output is to be influenced. MDX_CAMSWITCH_UNFORCE Control of the output is enabled. The cam controller determines the output level. MDX_CAMSWITCH_LOWFORCE The output is set fixed to low level. MDX_CAMSWITCH_HIGHFORCE The output is set fixed to high level. Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module. Output signals The MC_ForceCamSwitchChannel_MDX function module provides the following output signals. Output signal Type Meaning Done BOOL The output indicates that the force command was executed. Busy BOOL The output indicates that the function module is active. Error BOOL Error in function module during execution. ErrorID UINT "Libraries for MOVI-PLC Fault Codes" manual. 156 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

Index 6 6 Index C Communication times...144 E Exclusion of liability...5 G General Information...5 General notes Exclusion of liability...5 Limited warranty...5 Structure of the safety notes...5 I Important notes General safety notes for bus systems...6 Hoist applications...6 M MPLCTecCamMotion_MDX library...76 Aborting function modules (CommandAborted output signals)...118 Appendix...139 Axis driver AxisControl for cam applications...138 Create PLC user program (example 2)...126 Curve design with the Motion Technology Editor (example 1)...12 Data types...79 Diagnostics function with the Motion Technologie Editor...133 MC_AdjustCamSlave_MDX function module...99 MC_CamCalcRtoR_MDX function module 11 MC_CamCalcRtoR5_MDX function module...115 MC_CamCalcSpline_MDX function module...14 MC_CamInDirect_MDX function module...12 MC_CamOutDirect_MDX function module.13 MC_CamTableSelect_MDX function module...87 MC_LinkTecCam_MDX function module...83 MC_PrepareCamIn_MDX function module..92 MC_PrepareCamOutMDX function module.94 MC_RestartCamIn_MDX function module...91 MC_SetCamConfig_MDX function module..89 MC_WriteCamTrim_MDX function module..96 MC_WriteModuloRest_MDX function module...98 Operation with virtual master encoder...135 Overview...77 Project planning...76 MPLCTecCamSwitch_MDX library...143 Application examples...143 Data types...145 MC_ForceCamSwitchChannel_MDX function module... 156 MC_LinkTecCamSwitch_MDX function module... 148 MC_SetCamSwitchConfig_MDX function module... 152 MC_StartCamSwitch_MDX function module... 154 MC_StopCamSwitch_MDX function module... 155 Overview... 144 Project planning... 144 Restore function... 147 MPLCTecGearMotion_MDX libraries Abortion of function modules (CommandAborted output signal)... 74 MPLCTecGearMotion_MDX library... 35 Areas of application... 35 Data types... 46 MC_AutoRestartGearIn_MDX function module... 58 MC_GearClearLag_MDX function module.. 65 MC_GearClearLagPermanent_MDX function module... 66 MC_GearInDirect_MDX function module... 61 MC_GearOffsetDirect_MDX function module... 64 MC_GearOutDirect_MDX function module.62 MC_GearState_MDX function module... 67 MC_LinkTecGear_MDX function module... 49 MC_PrepareGearIn_MDX function module.56 MC_PrepareGearOffset_MDX function module... 59 MC_SetGearConfig_MDX function module.52 MC_SetGearDynamics_MDX function module... 54 MOVIDRIVE as master sends position via SBus (example 3)... 71 Offset processing... 41 Overview... 44 Position-dependent startup cycle... 38 Project planning... 36 Project planning procedure... 42 Restore function... 48 Start events for startup cycle and offset travel... 39 startup cycle and offset types... 36 Synchronous operation with external encoder as master (example 1)... 68 Synchronous operation with virtual encoder as master (example 2)... 69 Time-related startup cycle... 37 MPLCTecVirtualEncoder library... 7 Areas of application... 7 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC 157

6 Index Cancellation of the function modules (CommandAborted output signal)...33 Determine address and addressing of the virtual encoder...11 Example virtual encoder...31 Fault code...33 Function modules...14 Introduction...7 MC_LInkTecAxis_Virtual function module...14 MC_ModeSelect_Virtual function module...16 MC_MoveAbsolute_Virtual function module 19 MC_MoveAbsoluteModulo_Virtual function module...21 MC_MoveRelative_Virtual function module.23 MC_MoveRelativeModulo_Virtual function module...25 MC_MoveVelocity_Virtual function module..27 MC_SetActPos_Virtual function module...29 MC_SetModuloParameters_Virtual function module...18 MC_Stop_Virtual function module...3 Output data and actual values of the virtual encoder...12 Overview...9 Project planning...8 Project planning procedure...8 StateVirtualAxis diagram...13 P Position-dependent startup cycle...38 Prerequisites for project planning... 7, 143 Project planning...143 R Rights to claim under limited warranty...5 S Safety notes Structure of the safety notes...5 Startup cycle and offset types...36 T Time-related startup cycle...37 158 Manual MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC

Address List Address List Germany Headquarters Production Sales Service Competence Center Bruchsal Central North East South SEW-EURODRIVE GmbH & Co KG Ernst-Blickle-Straße 42 D-76646 Bruchsal P.O. Box Postfach 323 D-76642 Bruchsal SEW-EURODRIVE GmbH & Co KG Ernst-Blickle-Straße 1 D-76676 Graben-Neudorf SEW-EURODRIVE GmbH & Co KG Alte Ricklinger Straße 4-42 D-3823 Garbsen (near Hannover) SEW-EURODRIVE GmbH & Co KG Dänkritzer Weg 1 D-8393 Meerane (near Zwickau) SEW-EURODRIVE GmbH & Co KG Domagkstraße 5 D-85551 Kirchheim (near München) West SEW-EURODRIVE GmbH & Co KG Siemensstraße 1 D-4764 Langenfeld (near Düsseldorf) Electronics SEW-EURODRIVE GmbH & Co KG Ernst-Blickle-Straße 42 D-76646 Bruchsal Drive Service Hotline / 24 Hour Service Additional addresses for service in Germany provided on request! Tel. +49 7251 75- Fax +49 7251 75-197 http://www.sew-eurodrive.de sew@sew-eurodrive.de Tel. +49 7251 75-171 Fax +49 7251 75-1711 sc-mitte@sew-eurodrive.de Tel. +49 5137 8798-3 Fax +49 5137 8798-55 sc-nord@sew-eurodrive.de Tel. +49 3764 766- Fax +49 3764 766-3 sc-ost@sew-eurodrive.de Tel. +49 89 99552-1 Fax +49 89 99552-5 sc-sued@sew-eurodrive.de Tel. +49 2173 857-3 Fax +49 2173 857-55 sc-west@sew-eurodrive.de Tel. +49 7251 75-178 Fax +49 7251 75-1769 sc-elektronik@sew-eurodrive.de +49 18 5 SEWHELP +49 18 5 7394357 France Production Sales Service Haguenau SEW-USOCOME 48-54, route de Soufflenheim B. P. 2185 F-6756 Haguenau Cedex Production Forbach SEW-EUROCOME Zone Industrielle Technopôle Forbach Sud B. P. 3269 F-5764 Forbach Cedex Assembly Sales Service Bordeaux Lyon Paris SEW-USOCOME Parc d'activités de Magellan 62, avenue de Magellan - B. P. 182 F-3367 Pessac Cedex SEW-USOCOME Parc d'affaires Roosevelt Rue Jacques Tati F-6912 Vaulx en Velin SEW-USOCOME Zone industrielle 2, rue Denis Papin F-7739 Verneuil I'Etang Additional addresses for service in France provided on request! Algeria Sales Alger Réducom 16, rue des Frères Zaghnoun Bellevue El-Harrach 162 Alger Tel. +33 3 88 73 67 Fax +33 3 88 73 66 http://www.usocome.com sew@usocome.com Tel. +33 3 87 29 38 Tel. +33 5 57 26 39 Fax +33 5 57 26 39 9 Tel. +33 4 72 15 37 Fax +33 4 72 15 37 15 Tel. +33 1 64 42 4 8 Fax +33 1 64 42 4 88 Tel. +213 21 8222-84 Fax +213 21 8222-84 Argentina Assembly Sales Service Buenos Aires SEW EURODRIVE ARGENTINA S.A. Centro Industrial Garin, Lote 35 Ruta Panamericana Km 37,5 1619 Garin Tel. +54 3327 4572-84 Fax +54 3327 4572-21 sewar@sew-eurodrive.com.ar 7/27 159

Address List Australia Assembly Sales Service Melbourne SEW-EURODRIVE PTY. LTD. 27 Beverage Drive Tullamarine, Victoria 343 Tel. +61 3 9933-1 Fax +61 3 9933-13 http://www.sew-eurodrive.com.au enquires@sew-eurodrive.com.au Sydney SEW-EURODRIVE PTY. LTD. 9, Sleigh Place, Wetherill Park New South Wales, 2164 Tel. +61 2 9725-99 Fax +61 2 9725-995 enquires@sew-eurodrive.com.au Townsville SEW-EURODRIVE PTY. LTD. 12 Leyland Street Garbutt, QLD 4814 Tel. +61 7 4779 4333 Fax +61 7 4779 5333 enquires@sew-eurodrive.com.au Austria Assembly Sales Service Wien SEW-EURODRIVE Ges.m.b.H. Richard-Strauss-Strasse 24 A-123 Wien Tel. +43 1 617 55 - Fax +43 1 617 55-3 http://sew-eurodrive.at sew@sew-eurodrive.at Belgium Assembly Sales Service Brüssel SEW Caron-Vector S.A. Avenue Eiffel 5 B-13 Wavre Tel. +32 1 231-311 Fax +32 1 231-336 http://www.sew-eurodrive.be info@caron-vector.be Brazil Production Sales Service Sao Paulo SEW-EURODRIVE Brasil Ltda. Avenida Amâncio Gaiolli, 5 Caixa Postal: 21-7111-97 Guarulhos/SP - Cep.: 7251-25 Additional addresses for service in Brazil provided on request! Tel. +55 11 6489-9133 Fax +55 11 648-3328 http://www.sew.com.br sew@sew.com.br Bulgaria Sales Sofia BEVER-DRIVE GmbH Bogdanovetz Str.1 BG-166 Sofia Cameroon Sales Douala Electro-Services Rue Drouot Akwa B.P. 224 Douala Tel. +359 2 915116 Fax +359 2 9151166 bever@fastbg.net Tel. +237 4322-99 Fax +237 4277-3 Canada Assembly Sales Service Toronto Vancouver SEW-EURODRIVE CO. OF CANADA LTD. 21 Walker Drive Bramalea, Ontario L6T3W1 SEW-EURODRIVE CO. OF CANADA LTD. 7188 Honeyman Street Delta. B.C. V4G 1 E2 Montreal SEW-EURODRIVE CO. OF CANADA LTD. 2555 Rue Leger LaSalle, Quebec H8N 2V9 Additional addresses for service in Canada provided on request! Tel. +1 95 791-1553 Fax +1 95 791-2999 http://www.sew-eurodrive.ca marketing@sew-eurodrive.ca Tel. +1 64 946-5535 Fax +1 64 946-2513 b.wake@sew-eurodrive.ca Tel. +1 514 367-1124 Fax +1 514 367-3677 a.peluso@sew-eurodrive.ca Chile Assembly Sales Service Santiago de Chile SEW-EURODRIVE CHILE LTDA. Las Encinas 1295 Parque Industrial Valle Grande LAMPA RCH-Santiago de Chile P.O. Box Casilla 23 Correo Quilicura - Santiago - Chile Tel. +56 2 7577- Fax +56 2 7577-1 http://www.sew-eurodrive.cl ventas@sew-eurodrive.cl 16 7/27

Address List China Production Assembly Sales Service Assembly Sales Service Tianjin Suzhou SEW-EURODRIVE (Tianjin) Co., Ltd. No. 46, 7th Avenue, TEDA Tianjin 3457 SEW-EURODRIVE (Suzhou) Co., Ltd. 333, Suhong Middle Road Suzhou Industrial Park Jiangsu Province, 21521 P. R. China Additional addresses for service in China provided on request! Tel. +86 22 25322612 Fax +86 22 25322611 gm-tianjin@sew-eurodrive.cn http://www.sew-eurodrive.com.cn Tel. +86 512 62581781 Fax +86 512 62581783 suzhou@sew.com.cn Colombia Assembly Sales Service Bogotá SEW-EURODRIVE COLOMBIA LTDA. Calle 22 No. 132-6 Bodega 6, Manzana B Santafé de Bogotá Tel. +57 1 5475-5 Fax +57 1 5475-44 http://www.sew-eurodrive.com.co sewcol@sew-eurodrive.com.co Croatia Sales Service Zagreb KOMPEKS d. o. o. PIT Erdödy 4 II HR 1 Zagreb Tel. +385 1 4613-158 Fax +385 1 4613-158 kompeks@net.hr Czech Republic Sales Praha SEW-EURODRIVE CZ S.R.O. Business Centrum Praha Lužná 591 CZ-16 Praha 6 - Vokovice Tel. +42 22121234 Fax +42 22121237 http://www.sew-eurodrive.cz sew@sew-eurodrive.cz Denmark Assembly Sales Service Kopenhagen SEW-EURODRIVEA/S Geminivej 28-3 DK-267 Greve Tel. +45 43 9585- Fax +45 43 9585-9 http://www.sew-eurodrive.dk sew@sew-eurodrive.dk Estonia Sales Tallin ALAS-KUUL AS Reti tee 4 EE-7531 Peetri küla, Rae vald, Harjumaa Tel. +372 659323 Fax +372 6593231 veiko.soots@alas-kuul.ee Finland Assembly Sales Service Lahti SEW-EURODRIVE OY Vesimäentie 4 FIN-1586 Hollola 2 Tel. +358 21 589-3 Fax +358 3 78-6211 sew@sew.fi http://www.sew-eurodrive.fi Gabon Sales Libreville Electro-Services B.P. 1889 Libreville Tel. +241 734-11 Fax +241 734-12 Great Britain Assembly Sales Service Normanton SEW-EURODRIVE Ltd. Beckbridge Industrial Estate P.O. Box No.1 GB-Normanton, West- Yorkshire WF6 1QR Tel. +44 1924 893-855 Fax +44 1924 893-72 http://www.sew-eurodrive.co.uk info@sew-eurodrive.co.uk Greece Sales Service Athen Christ. Boznos & Son S.A. 12, Mavromichali Street P.O. Box 8136, GR-18545 Piraeus Tel. +3 2 142 251-34 Fax +3 2 142 251-59 http://www.boznos.gr info@boznos.gr 7/27 161

Address List Hong Kong Assembly Sales Service Hong Kong SEW-EURODRIVE LTD. Unit No. 81-86, 8th Floor Hong Leong Industrial Complex No. 4, Wang Kwong Road Kowloon, Hong Kong Tel. +852 2 796477 + 7964654 Fax +852 2 7959129 contact@sew-eurodrive.hk Hungary Sales Service Budapest SEW-EURODRIVE Kft. H-137 Budapest Kunigunda u. 18 Tel. +36 1 437 6-58 Fax +36 1 437 6-5 office@sew-eurodrive.hu India Assembly Sales Service Baroda SEW-EURODRIVE India Pvt. Ltd. Plot No. 4, Gidc Por Ramangamdi Baroda - 391 243 Gujarat Technical Offices Bangalore SEW-EURODRIVE India Private Limited 38, Prestige Centre Point 7, Edward Road Bangalore Tel. +91 265 283186 Fax +91 265 283187 http://www.seweurodriveindia.com mdoffice@seweurodriveindia.com Tel. +91 8 22266565 Fax +91 8 22266569 salesbang@seweurodriveindia.com Ireland Sales Service Dublin Alperton Engineering Ltd. 48 Moyle Road Dublin Industrial Estate Glasnevin, Dublin 11 Tel. +353 1 83-6277 Fax +353 1 83-6458 info@alperton.ie Israel Sales Tel-Aviv Liraz Handasa Ltd. Ahofer Str 34B / 228 58858 Holon Tel. +972 3 5599511 Fax +972 3 5599512 office@liraz-handasa.co.il Italy Assembly Sales Service Milano SEW-EURODRIVE di R. Blickle & Co.s.a.s. Via Bernini,14 I-22 Solaro (Milano) Tel. +39 2 96 981 Fax +39 2 96 799781 http://www.sew-eurodrive.it sewit@sew-eurodrive.it Ivory Coast Sales Abidjan SICA Ste industrielle et commerciale pour l'afrique 165, Bld de Marseille B.P. 2323, Abidjan 8 Tel. +225 2579-44 Fax +225 2584-36 Japan Assembly Sales Service Iwata SEW-EURODRIVE JAPAN CO., LTD 25-1, Shimoman-no, Iwata Shizuoka 438-818 Tel. +81 538 373811 Fax +81 538 373814 http://www.sew-eurodrive.co.jp sewjapan@sew-eurodrive.co.jp Korea Assembly Sales Service Ansan-City SEW-EURODRIVE KOREA CO., LTD. B 61-4, Banweol Industrial Estate Unit 148-4, Shingil-Dong Ansan 425-12 Tel. +82 31 492-851 Fax +82 31 492-856 http://www.sew-korea.co.kr master@sew-korea.co.kr Latvia Sales Riga SIA Alas-Kuul Katlakalna 11C LV-173 Riga Tel. +371 7139253 Fax +371 7139386 http://www.alas-kuul.com info@alas-kuul.com 162 7/27

Address List Lebanon Sales Beirut Gabriel Acar & Fils sarl B. P. 8484 Bourj Hammoud, Beirut Lithuania Sales Alytus UAB Irseva Naujoji 19 LT-62175 Alytus Tel. +961 1 4947-86 +961 1 4982-72 +961 3 2745-39 Fax +961 1 4949-71 gacar@beirut.com Tel. +37 315 7924 Fax +37 315 56175 info@irseva.lt http://www.sew-eurodrive.lt Luxembourg Assembly Sales Service Brüssel CARON-VECTOR S.A. Avenue Eiffel 5 B-13 Wavre Tel. +32 1 231-311 Fax +32 1 231-336 http://www.sew-eurodrive.lu info@caron-vector.be Malaysia Assembly Sales Service Johore SEW-EURODRIVE SDN BHD No. 95, Jalan Seroja 39, Taman Johor Jaya 81 Johor Bahru, Johor West Malaysia Tel. +6 7 354949 Fax +6 7 354144 sales@sew-eurodrive.com.my Mexico Assembly Sales Service Queretaro SEW-EURODRIVE MEXIKO SA DE CV SEM-981118-M93 Tequisquiapan No. 12 Parque Industrial Queretaro C.P. 7622 Queretaro, Mexico Tel. +52 442 13-3 Fax +52 442 13-31 http://www.sew-eurodrive.com.mx scmexico@seweurodrive.com.mx Morocco Sales Casablanca Afit 5, rue Emir Abdelkader MA 23 Casablanca Tel. +212 22618372 Fax +212 22618351 ali.alami@premium.net.ma Netherlands Assembly Sales Service Rotterdam VECTOR Aandrijftechniek B.V. Industrieweg 175 NL-344 AS Rotterdam Postbus 185 NL-34 AB Rotterdam Tel. +31 1 4463-7 Fax +31 1 4155-552 http://www.vector.nu info@vector.nu New Zealand Assembly Sales Service Auckland SEW-EURODRIVE NEW ZEALAND LTD. P.O. Box 58-428 82 Greenmount drive East Tamaki Auckland Tel. +64 9 2745627 Fax +64 9 274165 http://www.sew-eurodrive.co.nz sales@sew-eurodrive.co.nz Christchurch SEW-EURODRIVE NEW ZEALAND LTD. 1 Settlers Crescent, Ferrymead Christchurch Tel. +64 3 384-6251 Fax +64 3 384-6455 sales@sew-eurodrive.co.nz Norway Assembly Sales Service Moss SEW-EURODRIVE A/S Solgaard skog 71 N-1599 Moss Tel. +47 69 241-2 Fax +47 69 241-4 http://www.sew-eurodrive.no sew@sew-eurodrive.no Peru Assembly Sales Service Lima SEW DEL PERU MOTORES REDUCTORES S.A.C. Los Calderos, 12-124 Urbanizacion Industrial Vulcano, ATE, Lima Tel. +51 1 349528 Fax +51 1 34932 http://www.sew-eurodrive.com.pe sewperu@sew-eurodrive.com.pe 7/27 163

Address List Poland Assembly Sales Service Lodz SEW-EURODRIVE Polska Sp.z.o.o. ul. Techniczna 5 PL-92-518 Łódź Tel. +48 42 6771-9 Fax +48 42 6771-99 http://www.sew-eurodrive.pl sew@sew-eurodrive.pl Portugal Assembly Sales Service Coimbra SEW-EURODRIVE, LDA. Apartado 15 P-35-91 Mealhada Tel. +351 231 2 967 Fax +351 231 2 3685 http://www.sew-eurodrive.pt infosew@sew-eurodrive.pt Romania Sales Service Bucureşti Sialco Trading SRL str. Madrid nr.4 11785 Bucuresti Tel. +4 21 23-1328 Fax +4 21 23-717 sialco@sialco.ro Russia Assembly Sales Service St. Petersburg ZAO SEW-EURODRIVE P.O. Box 36 19522 St. Petersburg Russia Tel. +7 812 3332522 +7 812 5357142 Fax +7 812 3332523 http://www.sew-eurodrive.ru sew@sew-eurodrive.ru Senegal Sales Dakar SENEMECA Mécanique Générale Km 8, Route de Rufisque B.P. 3251, Dakar Serbia Sales Beograd DIPAR d.o.o. Ustanicka 128a PC Košum, IV floor SCG-11 Beograd Tel. +221 849 47-7 Fax +221 849 47-71 senemeca@sentoo.sn Tel. +381 11 347 3244 / +381 11 288 393 Fax +381 11 347 1337 dipar@yubc.net Singapore Assembly Sales Service Singapore SEW-EURODRIVE PTE. LTD. No 9, Tuas Drive 2 Jurong Industrial Estate Singapore 638644 Tel. +65 6862171 Fax +65 68612827 http://www.sew-eurodrive.com.sg sewsingapore@sew-eurodrive.com Slovakia Sales Bratislava SEW-Eurodrive SK s.r.o. Rybničná 4 SK-83554 Bratislava Žilina Banská Bystrica SEW-Eurodrive SK s.r.o. ul. Vojtecha Spanyola 33 SK-1 1 Žilina SEW-Eurodrive SK s.r.o. Rudlovská cesta 85 SK-97411 Banská Bystrica Tel. +421 2 4959521 Fax +421 2 495952 sew@sew-eurodrive.sk http://www.sew-eurodrive.sk Tel. +421 41 7 2513 Fax +421 41 7 2514 sew@sew-eurodrive.sk Tel. +421 48 414 6564 Fax +421 48 414 6566 sew@sew-eurodrive.sk Slovenia Sales Service Celje Pakman - Pogonska Tehnika d.o.o. UI. XIV. divizije 14 SLO - 3 Celje Tel. +386 3 49 83-2 Fax +386 3 49 83-21 pakman@siol.net South Africa Assembly Sales Service Johannesburg SEW-EURODRIVE (PROPRIETARY) LIMITED Eurodrive House Cnr. Adcock Ingram and Aerodrome Roads Aeroton Ext. 2 Johannesburg 213 P.O.Box 94 Bertsham 213 Tel. +27 11 248-7 Fax +27 11 494-314 http://www.sew.co.za dross@sew.co.za 164 7/27

Address List South Africa Capetown SEW-EURODRIVE (PROPRIETARY) LIMITED Rainbow Park Cnr. Racecourse & Omuramba Road Montague Gardens Cape Town P.O.Box 36556 Chempet 7442 Cape Town Tel. +27 21 552-982 Fax +27 21 552-983 Telex 576 62 dswanepoel@sew.co.za Durban SEW-EURODRIVE (PROPRIETARY) LIMITED 2 Monaceo Place Pinetown Durban P.O. Box 1433, Ashwood 365 Tel. +27 31 7-3451 Fax +27 31 7-3847 dtait@sew.co.za Spain Assembly Sales Service Bilbao SEW-EURODRIVE ESPAÑA, S.L. Parque Tecnológico, Edificio, 32 E-4817 Zamudio (Vizcaya) Tel. +34 94 43184-7 Fax +34 94 43184-71 http://www.sew-eurodrive.es sew.spain@sew-eurodrive.es Sweden Assembly Sales Service Jönköping SEW-EURODRIVE AB Gnejsvägen 6-8 S-5533 Jönköping Box 31 S-553 Jönköping Tel. +46 36 3442- Fax +46 36 3442-8 http://www.sew-eurodrive.se info@sew-eurodrive.se Switzerland Assembly Sales Service Basel Alfred lmhof A.G. Jurastrasse 1 CH-4142 Münchenstein bei Basel Tel. +41 61 417 1717 Fax +41 61 417 17 http://www.imhof-sew.ch info@imhof-sew.ch Thailand Assembly Sales Service Chonburi SEW-EURODRIVE (Thailand) Ltd. 7/456, Moo.7, Donhuaroh Muang Chonburi 2 Tel. +66 38 454281 Fax +66 38 454288 sewthailand@sew-eurodrive.com Tunisia Sales Tunis T. M.S. Technic Marketing Service 5, Rue El Houdaibiah 1 Tunis Tel. +216 71 434-64 + 71 432-29 Fax +216 71 4329-76 tms@tms.com.tn Turkey Assembly Sales Service Istanbul SEW-EURODRIVE Hareket Sistemleri San. ve Tic. Ltd. Sti. Bagdat Cad. Koruma Cikmazi No. 3 TR-34846 Maltepe ISTANBUL Tel. +9 216 4419163 / 164 383814/15 Fax +9 216 355867 http://www.sew-eurodrive.com.tr sew@sew-eurodrive.com.tr Ukraine Sales Service Dnepropetrovsk SEW-EURODRIVE Str. Rabochaja 23-B, Office 49 498 Dnepropetrovsk Sales Kiev SEW-EURODRIVE GmbH S. Oleynika str. 21 268 Kiev Tel. +38 56 37 3211 Fax +38 56 372 278 http://www.sew-eurodrive.ua sew@sew-eurodrive.ua Tel. +38 44 53 95 77 Fax +38 44 53 95 78 kso@sew-eurodrive.ua USA Production Assembly Sales Service Greenville SEW-EURODRIVE INC. 1295 Old Spartanburg Highway P.O. Box 518 Lyman, S.C. 29365 Tel. +1 864 439-7537 Fax Sales +1 864 439-783 Fax Manuf. +1 864 439-9948 Fax Ass. +1 864 439-566 Telex 85 55 http://www.seweurodrive.com cslyman@seweurodrive.com 7/27 165

Address List USA Assembly Sales Service San Francisco Philadelphia/PA Dayton SEW-EURODRIVE INC. 3599 San Antonio St. Hayward, California 94544-711 SEW-EURODRIVE INC. Pureland Ind. Complex 217 High Hill Road, P.O. Box 481 Bridgeport, New Jersey 814 SEW-EURODRIVE INC. 21 West Main Street Troy, Ohio 45373 Dallas SEW-EURODRIVE INC. 395 Platinum Way Dallas, Texas 75237 Additional addresses for service in the USA provided on request! Tel. +1 51 487-356 Fax +1 51 487-6381 cshayward@seweurodrive.com Tel. +1 856 467-2277 Fax +1 856 845-3179 csbridgeport@seweurodrive.com Tel. +1 937 335-36 Fax +1 937 44-3799 cstroy@seweurodrive.com Tel. +1 214 33-4824 Fax +1 214 33-4724 csdallas@seweurodrive.com Venezuela Assembly Sales Service Valencia SEW-EURODRIVE Venezuela S.A. Av. Norte Sur No. 3, Galpon 84-319 Zona Industrial Municipal Norte Valencia, Estado Carabobo Tel. +58 241 832-984 Fax +58 241 838-6275 http://www.sew-eurodrive.com.ve sewventas@cantv.net sewfinanzas@cantv.net 166 7/27

SEW-EURODRIVE Driving the world

Gearmotors \ Industrial Gear Units \ Drive Electronics \ Drive Automation \ Services How we re driving the world With people who think fast and develop the future with you. With a worldwide service network that is always close at hand. With drives and controls that automatically improve your productivity. With comprehensive knowledge in virtually every branch of industry today. With uncompromising quality that reduces the cost and complexity of daily operations. SEW-EURODRIVE Driving the world With a global presence that offers responsive and reliable solutions. Anywhere. With innovative technology that solves tomorrow s problems today. With online information and software updates, via the Internet, available around the clock. SEW-EURODRIVE GmbH & Co KG P.O. Box 323 D-76642 Bruchsal / Germany Phone +49 7251 75- Fax +49 7251 75-197 sew@sew-eurodrive.com www.sew-eurodrive.com