Top Banner
Gearmotors \ Industrial Gear Units \ Drive Electronics \ Drive Automation \ Services Libraries MPLCTec..._MDX, MPLCTecVirtualEncoder for MOVI-PLC ® M anual Edition 07/2007 11494212 / EN
168

› download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Feb 25, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Gearmotors \ Industrial Gear Units \ Drive Electronics \ Drive Automation \ Services

Libraries MPLCTec..._MDX,MPLCTecVirtualEncoder for MOVI-PLC®

ManualEdition 07/200711494212 / EN

Page 2: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

SEW-EURODRIVE – Driving the world

Page 3: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 3

1 General Information ............................................................................................... 51.1 Structure of the safety notes .......................................................................... 51.2 Rights to claim under limited warranty ........................................................... 51.3 Exclusion of liability ........................................................................................ 51.4 Other applicable documentation .................................................................... 61.5 General safety notes for bus systems............................................................ 61.6 Safety functions ............................................................................................. 61.7 Hoist applications........................................................................................... 6

2 MPLCTecVirtualEncoder ....................................................................................... 72.1 Introduction .................................................................................................... 72.2 Areas of application ....................................................................................... 72.3 Project planning ............................................................................................. 8

2.3.1 Prerequisites ....................................................................................... 82.3.2 Basic principle and notes .................................................................... 82.3.3 Project planning procedure ................................................................. 8

2.4 Overview of the MPLCTecVirtualEncoder library........................................... 92.4.1 Determining the address and addressing of the virtual encoder ....... 112.4.2 Output data and actual values of the virtual encoder ........................ 122.4.3 StateVirtualAxis diagram ................................................................... 132.4.4 Function modules of the MPLCTecVirtualEncoder library ................ 14

2.5 Example ....................................................................................................... 312.5.1 Virtual encoder is operated with speed control ................................. 31

2.6 Appendix ...................................................................................................... 332.6.1 Aborting function modules (CommandAborted output signal) .......... 33

3 MPLCTecGearMotion_MDX................................................................................. 353.1 Introduction .................................................................................................. 353.2 Application areas ......................................................................................... 353.3 Project planning ........................................................................................... 36

3.3.1 Prerequisites ..................................................................................... 363.3.2 Basic principle and notes .................................................................. 363.3.3 Startup cycle and offset types ........................................................... 363.3.4 Various start events for startup cycle and offset travel ..................... 393.3.5 Project planning procedure ............................................................... 42

3.4 Overview of the MPLCTecGearMotion_MDX library.................................... 443.4.1 Data types of the MPLCTecGearMotion_MDX library ...................... 463.4.2 Restore function for saving MOVIDRIVE® system variables ............ 483.4.3 Function modules of the MPLCTecGearMotion_MDX library ........... 49

3.5 Examples ..................................................................................................... 683.5.1 Example 1: Synchronous operation with external encoder

as master and direct engaging / disengaging ................................... 683.5.2 Example 2: Synchronous operation with virtual encoder as master . 693.5.3 Example 3: MOVIDRIVE® as master sends position via SBUs ........ 71

3.6 Appendix ...................................................................................................... 743.6.1 Abortion of function modules (CommandAborted output signal) ...... 74

Page 4: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

4 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 MPLCTecCamMotion_MDX ................................................................................. 764.1 Introduction .................................................................................................. 764.2 Project planning ........................................................................................... 76

4.2.1 Prerequisites ..................................................................................... 764.2.2 Notes ................................................................................................ 77

4.3 Overview of the MPLCTecCamMotion_MDX library .................................... 774.3.1 Data types of the MPLCTecCamMotion_MDX library ....................... 794.3.2 Data types of the MC_CamLinkTec_MDX function module .............. 824.3.3 Function modules of the MPLCTecCamMotion_MDX library ........... 83

4.4 Appendix .................................................................................................... 1184.4.1 Abortion of function modules (CommandAborted output signal) .... 118

4.5 Cam examples ........................................................................................... 1204.5.1 Example 1: Curve design with the Motion Technology Editor ......... 1204.5.2 Example 2: Creating PLC user program ......................................... 1264.5.3 Programming notes ........................................................................ 1324.5.4 Diagnostics functions in the Motion Technology Editor .................. 1334.5.5 Operation with virtual master encoder ............................................ 1354.5.6 Axis driver AxisControlCam for cam applications ........................... 138

4.6 Appendix .................................................................................................... 1394.6.1 Changing the interpolation time manually (MFilterTime) ................ 1394.6.2 Read / write a curve set via the VarData service ............................ 1414.6.3 Allocation of the remanent IPOSplus® variables

and scaling factors .......................................................................... 142

5 MPLCTecCamSwitch_MDX................................................................................ 1435.1 Introduction ................................................................................................ 1435.2 Areas of application ................................................................................... 1435.3 Project planning ......................................................................................... 144

5.3.1 Prerequisites ................................................................................... 1445.4 Overview of the MPLCTecCamSwitch_MDX library .................................. 144

5.4.1 Data types of the MPLCTecCamSwitch_MDX library ..................... 1455.4.2 Restore function for saving the MOVIDRIVE® system variables .... 1475.4.3 Function modules of the MPLCTecCamSwitch_MDX library .......... 148

6 Index.................................................................................................................... 157

Page 5: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 5

1Structure of the safety notesGeneral Information

Manual1 General Information1.1 Structure of the safety notes

The safety notes in this manual are designed as follows:

1.2 Rights to claim under limited warrantyA requirement of fault-free operation and fulfillment of any rights to claim under limitedwarranty is that you adhere to the information in the MOVI-PLC® documentation. There-fore, read the manual before you start operating the unit.Make sure that the manual is available to persons responsible for the plant and itsoperation, as well as to person who work independently on the unit. You must alsoensure that the documentation is legible.

1.3 Exclusion of liabilityYou must comply with the information contained in the MOVI-PLC® documentation toensure safe operation of the MOVI-PLC® controller and to achieve the specified productcharacteristics and performance requirements. SEW-EURODRIVE assumes no liabilityfor injury to persons or damage to equipment or property resulting from non-observanceof these operating instructions. In such cases, any liability for defects is excluded.

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:

General danger

Specific danger,e.g. electric shock

DANGER! Imminent danger Severe or fatal injuries

WARNING! Possible dangerous situation Severe or fatal injuries

CAUTION! Possible dangerous situation Minor injuries

STOP! Possible damage to property Damage to the drive system or its environ-ment

NOTE Useful information or a tipSimplifies the handling of the drive system

Page 6: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

1 Other applicable documentationGeneral Information

1.4 Other applicable documentation• Installation and startup only by trained personnel observing the relevant accident

prevention regulations and the following documents:– "MOVIDRIVE® MDX60B/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 ofthe MOVI-PLC® controller.

• As a prerequisite to fault-free operation and fulfillment of warranty claims, you mustadhere to the information in the documentation.

1.5 General safety notes for bus systemsYou 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. Aswith all bus systems, there is a danger of invisible, external (as far as the inverter isconcerned) modifications to the parameters which give rise to changes in the unitbehavior. This may result in unexpected (not uncontrolled) system behavior.

1.6 Safety functionsMOVI-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 thisdesign 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 toavoid possible damage to property or injury to people.

Page 7: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 7

2IntroductionMPLCTecVirtualEncoder

2 MPLCTecVirtualEncoder2.1 Introduction

The MPLCTecVirtualEncoder library offers function modules for implementing a virtualmotor 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 distanceVelocities and ramps can be set, which means a specified travel profile can be imple-mented.Depending on which mode is set, the current position of the virtual encoder is sent viathe SBus with a resolution of 4096 increments (MOVIDRIVE® B mode), or with 65536increments per revolution (MOVIAXIS® mode) as cyclic transmit object. It can be usedas master value, for example for synchronous operation slaves or electronic cam slaves.

2.2 Areas of applicationThe MPLCTecVirtualEncoder library is suited for all applications in which a central po-sition master value is needed. This position master value is then used as common mas-ter 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

00

I

Page 8: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

8 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Project planningMPLCTecVirtualEncoder

2.3 Project planning2.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 theMPLCTecFct_ProfGen library. The LinProfGen function module represents theactual profile generator. This function module is configured to the required functionby the library modules in order to keep handling the virtual encoder as simple aspossible.

• The MC_LinkTecAxis_Virtual function module is mandatory for using the virtualencoder. The function module is used, among others, to determine the logicaladdress and the synchronization object for SBus synchronization as well as to createthe send object for the current position.This function module must be called in a cyclic task that corresponds to the set cycletime (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 thefirst virtual encoder is assigned ID 2 and the second virtual encoder is assigned ID3to 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. Someof the system variables are used for this purpose. System variables beginning fromH2000 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 di-rectories.

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

00

I

Page 9: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 9

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

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

ing the required functions in a cyclic or free-wheeling task.

2.4 Overview of the MPLCTecVirtualEncoder library

VirtualEncoder_-Main

VirtualEncoder_Main directory:• MC_LinkTecAxis_Virtual function module

The MC_LinkTecAxis_Virtual function module is the central interface to the technol-ogy 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 moduleThe MC_ModeSelect_Virtual function module lets you choose whether the virtualencoder is operated in MOVIAXIS® mode or in MOVIDRIVE® mode. Both encoderresolution and scaling of the dynamic parameters will be adjusted accordingly.

VirtualEncoder_ Parameter

VirtualEncoder_Parameter directory:• MC_SetDynamics_Virtual function module

61652AXX

00

I

Page 10: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

10 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

The MC_SetDynamicsVirtual function module is used to change the velocity, rampsand jerk time during travel.

• MC_SetModuloParameters_Virtual function moduleThe MC_SetModuloParameters_Virtual function module is used to set the moduloparameters 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 toan absolute target with specified velocity and ramp.

• MC_MoveAbsoluteModulo_Virtual function moduleThe MC_MoveAbsoluteModulo_Virtual function module starts a positioning travel toan absolute target in modulo format with specified velocity and ramp.

• MC_MoveRelative_Virtual function moduleThe MC_MoveRelative_Virtual function module starts a relative positioning travelfrom the current position with specified step width, velocity and ramp.

• MC_MoveRelativeModulo_Virtual function moduleThe MC_MoveRelativeModulo_Virtual function module starts a relative modulopositioning from the current position with specified step width, velocity and ramp.

• MC_MoveVelocity_Virtual function moduleThe MC_MoveVelocity_Virtual function module starts a process of endless move-ment with set velocity and ramp (speed control).

• MC_SetActPos_Virtual function moduleThe MC_SetActPos_Virtual function module is used to set the current position to aspecified value. In this way, a virtual reference travel can be implemented compara-ble with reference travel type 5 for MOVIDRIVE®.

• MC_Stop_Virtual function moduleThe MC_Stop_Virtual function module stops an already started travel of the virtualencoder.

00

I

Page 11: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 11

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

2.4.1 Determining the address and addressing of the virtual encoder

The MC_LInkTecAxis_Virtual function module determines the axis referenceAXIS_REF_VIRTUAL from the input SendObjectID as logical address for the remainingmodules of the MPLCTecVirtualEncoder library.The MPLCDatatypes library includes the file type MC_PDO_ID_MDX where twosettings are provided for the virtual encoder (→ following figure).

Example The MC_LinkTecAxis_Virtual function module contains the"MDX_VIRTUAL_ENCODER_ID1" signal at the input MDX_VIRTUAL_ENCODER_ID1and outputs the axis reference LogAdrVirt as logical address at the output VirtualAxis(→ following figure).

61653AXX

61654AXX

MC_LinkTecAxis_Virtual

Modulo

SendObjectID

SaveActPosition

CycleTime

Execute

Node

DoneTRUE

5

FALSE

FALSE

MDX_VIRTUAL_ENCODER_ID1

SBUS_NODE_1

Busy

Error

ErrorID

VirtualAxis

VirtualAxisData

LinkState

LogAdrVirt

LinkTecVirtual

MC_MoveAbsolute_Virtual

Velocity

Deceleration

Acceleration

Position

Execute

JerkTime

Done

TargetPos

TargetSpeed

0

Active

CommandAborted

Error

ErrorID

MoveAbsoluteVirtual

500

500

AxisLogAdrVirt

00

I

Page 12: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

12 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

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 vir-tual encoder as well as the current actual speed and position values.

61655AXX

[1] Axis reference output[2] Current speed and position output[3] Current status display

[1]

[2]

[3]

NOTEThe states Active and Done indicated under VirtualAxisData are used within the library.These status messages are saved and deleted by the relevant Move function modulesbecause the profile generator in the MC_LinkTecAxis_Virtual function module is edgecontrolled.This is the reason why the status messages of the Move module should rather be usedfor inhibit or step enabling conditions in the user program.

00

I

Page 13: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 13

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

2.4.3 StateVirtualAxis diagram

61885AXX

MC_MoveAbsolute_VirtualMC_MoveAbsoluteModulo_VirtualMC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual

"Done" von:

MC_M

oveAbsolute_Virtual

MC_M

oveAbsoluteModulo_Virtual

MC_M

oveRelative_Virtual

MC_M

oveRelativeModulo_Virtual

MC_Stop_Virtual

MC_MoveVelocity_Virtual

MC_Stop_Virtual

MC_LinkTecAxis_Virtual Done = TRUE LinkState = INITIALIZED

MC_LinkAxis_VirtualDone = FALSE LinkState = NOTLINKED

All StatesMC_Stop_Virtual Done

DISCRETE_

MOTIONCONTINUOUS

MOTION

NOT_CONNECTEDSTANDSTILL

STOPPING

MC_MoveVelocity_Virtu

al

MC_M

oveAbsolute_Virtual

MC_M

oveAbsoluteModulo_Virtual

MC_M

oveRelative_Virtual

MC_M

oveRelativeModulo_Virtual

MC_MoveAbsolute_VirtualMC_MoveAbsoluteModulo_VirtualMC_MoveRelative_Virtual MC_MoveRelativeModulo_Virtual

MC_MoveVelocity_Virtual

00

I

Page 14: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

14 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

2.4.4 Function modules of the MPLCTecVirtualEncoder library

MC_LinkTecAxis_Virtual function module

Description The MC_LinkTecAxis_Virtual function module constitutes the logical interface to thetechnology function "Virtual encoder". The axis reference is determined using theSendObjectID 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 theinitialization.You can set the cycle time of the virtual encoder using the input signal CycleTime. If theinput Modulo = TRUE, the modulo position will be sent, else the linear position will besent. These settings only refer to the position to be sent, not to the modulo function assuch. This means positioning can be performed in modulo format but the linear positionwill be sent. The input signal SaveActPosition lets you set whether the virtual encoderwill start with the last actual value when the power supply is switched on, or whether itwill start at position "0". The current position, velocity and current status of the virtualencoder are available as output values.

61656AXX

MC_LINKTECAXIS_VIRTUAL

CycleTime : BYTE

Done : BOOL

Busy : BOOL

Enable : BOOL

Modulo : BOOL

SaveActPosition : BOOL

SendObjectID : MC_PDO_ID_MDX

Node : CAN_NODE

ErrorID : DWORD

Error : BOOL

VirtualAxis : AXIS_REF_VIRTUAL

VirtualAxisData : MC_DATA_VIRTUAL

LinkState : MC_LINKTECSTATE

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 errormessage will be issued.

• Note that the MC_LinkTecAxis_Virtual function module is called with the same cycletime as set at the CycleTime input. The virtual encoder can basically operate with acycle time of 1 ms. The cycle time might be violated because internal systemfunctions are also being processed during this time. SEW-EURODRIVE thereforerecommends to set the cycle time to 5 ms or 10 ms.

• Different SendObjectID must be assigned for several virtual encoders even if theyare created on various SBus nodes.

00

I

Page 15: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 15

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

Input signals The following input signals can be set on the MC_LinkTecAxis_Virtual function module.

Output signals The MC_LinkTecAxis_Virtual provides the following output signals.

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

ful)

00

I

Page 16: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

16 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_ModeSelect_Virtual function module

Description The MC_ModeSelect_Virtual function module lets you choose whether the virtualencoder is operated in MOVIDRIVE® or MOVIAXIS® mode. The encoder resolution andthe scaling of dynamic parameters is set for the corresponding unit type depending onthe chosen mode.

Prerequisite • The "Virtual encoder" technology function is created via the MC_LinkTecAxis_Virtualfunction module.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_ModeSelect_Virtual function module.

Output signals The MC_ModeSelect_Virtual function module provides the following output signals.

61664AXX

MC_MODESELECT_VIRTUAL

Mode : MC_ENCODERMODE_VIRTUAL

Done : BOOLExecute : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

Mode MC_ENCODERMODE_VIRTUAL

Possible settings:• VIRTUAL_MDX_MODE (resolution

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

00

I

Page 17: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 17

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_SetDynamics_Virtual function module

Description The MC_SetDynamics_Virtual function module enables you to change the dynamicparameters 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 depend-ing on the set unit type (set in the MC_ModeSelect_Virtual function module).

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_SetDynamics_Virtual function module.

Output signals The MC_SetDynamics_Virtual function module provides the following output signals:

61665AXX

MC_SETDYNAMICS_VIRTUAL

Velocity : DINT

Done : BOOL

Busy : BOOL

Execute : BOOL

Acceleration : DINT

Deceleration : DINT

JerkTime : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

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

3000 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

3000 1/min• MX mode: in revolutions/min/s [rpm/s]

JerkTime DINT • MDX mode: Jerk time in [ms]• MX mode: Jerk in revolutions/min/s2 [rpm/s2]

Axis AXIS_REF_VIRTUAL Logical address of the virtual drive that is to be addressed by the function module.

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.

00

I

Page 18: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

18 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_SetModuloParameters_Virtual function module

Description The MC_SetModuloParameters_Virtual function module is used to set the parametersfor calculating the modulo position. The input signal ModuloResolution determines theresolution of a modulo revolution. The input signal Encoder Resolution defines theencoder resolution that corresponds to a modulo revolution.

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_SetModuloParameters_Virtualfunction module.

Output signals The MC_SetModuloParameters_Virtual function module provides the following outputsignals.

61666AXX

MC_SETMODULOPARAMETERS_VIRTUAL

ModuloResolution : UINT

Done : BOOL

Busy : BOOL

Execute : BOOL

EncoderResolution : BYTE

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

ModuloResolution UINT Resolution of a modulo revolution, for example:• 36000 → resolution in 1/100 degree; range: 1 ... 65535

EncoderResolution BYTE Encoder resolution with one modulo revolution. Setting as exponent of 2• 16 → 216 = 65536 inc/revolutions; range: 21 ... 232

Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module.

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.

00

I

Page 19: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 19

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_MoveAbsolute_Virtual function module

Description The MC_MoveAbsolute_Virtual function module is used to start positioning to anabsolute target. Velocity, acceleration and deceleration time as well as jerk time are setas dynamic parameters. The parameters are scaled in the respective system unitsdepending on the selected unit type (set in the MC_ModeSelect_Virtual functionmodule).

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_MoveAbsolute_Virtual functionmodule.

61669AXX

MC_MOVEABSOLUTE_VIRTUAL

Position : DINT

Done : BOOL

Active : BOOL

Execute : BOOL

Acceleration : DINT

Deceleration : DINT

JerkTime : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Velocity : DINT CommandAborted : BOOL

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

3000 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

3000 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/s2) [rpm/s2]

Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module.

00

I

Page 20: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

20 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

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 Aborted

BOOL The job was aborted by another function module.

Error BOOL Error in module during the execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 21: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 21

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_MoveAbsoluteModulo_Virtual function module

Description The MC_MoveAbsoluteModulo_Virtual function module is used to start a positioningprocess to an absolute target in modulo format. The input ModuloMode specified thetravel strategy. The settings VIRTUAL_SHORT means that the target is approached bythe shortest route.Velocity, acceleration and deceleration time as well as jerk time are set as dynamicparameters. The parameters are scaled in the respective system units depending on theselected unit type (set in the MC_ModeSelect_Virtual function module).

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The input signals ModuloResolution and EncoderResolution in theMC_SetModuloParameters_Virtual function module are set.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

61670AXX

MC_MOVEABSOLUTEMODULO_VIRTUAL

ModuloPosition : DINT

Done : BOOL

Active : BOOL

Execute : BOOL

Acceleration : DINT

Deceleration : DINT

JerkTime : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Velocity : DINT CommandAborted : BOOL

ModuloMode : MC_MODULOMODEVIRTUAL

00

I

Page 22: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

22 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

Input signals The following input signals can be set on the MC_MoveAbsoluteModulo_Virtual functionmodule.

Output signals The MC_MoveAbsoluteModulo_Virtual function module provides the following outputsignals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

ModuloPosition DINT Absolute modulo target position in increments.Range: 0 ... ModuloResolution

Velocity DINT Maximum positioning speed in 1/min.

Acceleration DINT Acceleration:• MDX mode: in [ms] with reference to a change in speed

of 3000 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 3000 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/s2 [rpm/s2]

ModuloMode MC_MODULOMODE_VIRTUAL

Modulo travel strategy:• 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 signal Type Meaning

Done BOOL Target position reached

Active BOOL Virtual motor travels to target position.

Command Aborted

BOOL The job was aborted by another function module.

Error BOOL Error in function module during the execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 23: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 23

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_MoveRelative_Virtual function module

Description The MC_MoveRelative_Virtual function module is used to start a relative positioningprocess 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 dynamicparameters. The parameters are scaled in the respective system units depending on theselected unit type (set in the MC_ModeSelect_Virtual function module).

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_MoveRelative_Virtual functionmodule.

61671AXX

MC_MOVERELATIVE_VIRTUAL

Distance : DINT

Done : BOOL

Active : BOOL

Execute : BOOL

Acceleration : DINT

Deceleration : DINT

JerkTime : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Velocity : DINT CommandAborted : BOOL

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

3000 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

3000 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/s2) [rpm/s2]

Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module.

00

I

Page 24: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

24 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

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 Aborted

BOOL The job was aborted by another function module.

Error BOOL Error in function module during the execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 25: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 25

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_MoveRelativeModulo_Virtual function module

Description The MC_MoveRelativeModulo_Virtual function module is used to start a relativepositioning process based on the current modulo position with the step width set on theDistance input. The ModuloMode input is used to specify whether only CW or CCWdirection of rotation is allowed or both directions of rotation.Velocity, acceleration and deceleration time as well as jerk time are set as dynamicparameters. The parameters are scaled in the respective system units depending on theselected unit type (set in the MC_ModeSelect_Virtual function module).

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The input signals ModuloResolution and EncoderResolution in theMC_SetModuloParameters_Virtual function module are set.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

61673AXX

MC_MOVERELATIVEMODULO_VIRTUAL

Distance : DINT

Done : BOOL

Active : BOOL

Execute : BOOL

Acceleration : DINT

Deceleration : DINT

JerkTime : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Velocity : DINT CommandAborted : BOOL

ModuloMode : MC_MODULOMODEVIRTUAL

00

I

Page 26: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

26 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

Input signals The following input signals can be set on the MC_MoveRelativeModulo_Virtual functionmodule.

Output signals The MC_MoveRelativeModulo_Virtual function module provides the following outputsignals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule 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 3000 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 3000 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/s2 [rpm/s2]

ModuloMode MC_MODULOMODE_VIRTUAL

Modulo travel strategy:• 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 signal Type Meaning

Done BOOL Target position reached

Active BOOL Virtual motor travels to target position.

Command Aborted

BOOL The job was aborted by another function module.

Error BOOL Error in function module during the execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 27: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 27

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_MoveVelocity_Virtual function module

Description The MC_MoveVelocity_Virtual function module is used to start continuous movement ofthe 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 decelerationtimes as well as jerk time are set as dynamic parameters. The parameters are scaled inthe respective system units depending on the selected unit type (set in theMC_ModeSelect_Virtual function module).

Prerequisite • The "Virtual encoder" technology function is created using theMC_LinkTecAxis_Virtual function module.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_MoveVelocity_Virtual function module.

61674AXX

MC_MOVEVELOCITY_VIRTUAL

InVelocity : BOOL

Active : BOOL

Execute : BOOL

Acceleration : DINT

Deceleration : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

Velocity : DINT

CommandAborted : BOOL

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule 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 3000 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 3000 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/s2 [rpm/s2]

Axis AXIS_REF_VIRTUAL Logical address of the motor axis that is to be addressed by the function module.

00

I

Page 28: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

28 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

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 Aborted

BOOL The job was aborted by another function module.

Error BOOL Error in function module during the execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 29: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 29

2Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_SetActPos_Virtual function module

Description The MC_SetActPos_Virtual function module is used to set the current position of thevirtual encoder to a specified position (input SetPosition). This corresponds to referencetravel type 5 for MOVIDRIVE® (no reference travel, current position is reference posi-tion).

Prerequisite • The "Virtual encoder" technology function is created using theMC_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 thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_SetActPos_Virtual function module.

Output signals The MC_SetActPos_Virtual function module provides the following output signals.

61676AXX

MC_SETACTPOS_VIRTUAL

Done : BOOL

Error : BOOL

Execute : BOOL

SetPosition : DINT

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT) ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

SetModuloPos : BOOL

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

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 30: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

30 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 Overview of the MPLCTecVirtualEncoder libraryMPLCTecVirtualEncoder

MC_Stop_Virtual function module

Description The MC_Stop_Virtual function module is used to stop the virtual motor axis. Both amovement started with the MC_MoveVelocity_Virtual function module and a positioningprocess can be stopped. In this case, the virtual encoder will use the ramp set in theMC_MoveVelocity_Virtual function module.

Prerequisite • The "Gear" technology function is created using the MC_LinkTecGear_MDX functionmodule.

• The output signal LinkState of the MC_LinkTecAxis_Virtual function module has thestatus GEN_TEC_INITIALIZED.

Input signals The following input signals can be set on the MC_Stop_Virtual function module.

Output signals The MC_Stop_Virtual function module provides the following output signals.

61677AXX

MC_STOP_VIRTUAL

Done : BOOL

Active : BOOL

Execute : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF_VIRTUAL (VAR_IN_OUT)

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

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 31: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 31

2ExampleMPLCTecVirtualEncoder

2.5 Example2.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 mstask 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 posi-tion of the virtual encoder should serve as master value for a MOVIDRIVE® unit insynchronous operation.

Step 1: Create the program module VirtualAxis

61678AXX

00

I

Page 32: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

32 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 ExampleMPLCTecVirtualEncoder

Step 2: Program call VirtualAxis in 5 ms task (task configuration)

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 ofthe MC_SetGearConfig_MDX function module in the default setting to theSendObjectID 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 theMC_InitialConfig_MDX function module of the MPLCMotion_MDX library.

61679AEN

61680AXX

MC_SetGearConfig_MDX

GFMaster

Done

Busy

Execute

SlaveSource

ExternalSlaveEncoderNum

ErrorID

Error

MasterSource

bGearConfigured

ExternalSlaveEncoderDenom

LagCountLifeTime

RotationDirectionLock

MasterSignalFilter

Axis

bGearConfig

5

7

MDX_GEAR_RECEIVE_PDO_1

MDX_GEAR_SLAVE_X15

1

1

500

0

5

GFSlave

LogAdrA1

FeedforwardFilter50

00

I

Page 33: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 33

2AppendixMPLCTecVirtualEncoder

2.6 Appendix2.6.1 Aborting function modules (CommandAborted output signal)

The CommandAborted output signal is used to indicate multiple calls of a movementmodule (MC_Move ...) or call of another movement module. The aborted job will not beexecuted any longer (→ "MPLCMotion_MDX und MPLCMotion_MX Libraries for MOVI-PLC® manual).

Activated function module Creates CommandAborted to

MC_Stop_Virtual

• MC_MoveAbsolute_Virtual• MC_MoveRelative_Virtual• MC_MoveVelocity_Virtual• MC_MoveAbsoluteModulo_Virtual• MC_MoveRelativeModulo_Virtual

MC_MoveAbsolute_Virtual

• Instances of MC_MoveAbsolute_Virtual• MC_MoveVelocity_Virtual• MC_MoveRelative_Virtual• MC_MoveAbsoluteModulo_Virtual• MC_MoveRelativeModulo_Virtual

MC_MoveAbsoluteModulo_Virtual

• Instances of MC_MoveAbsoluteModulo_Virtual• MC_MoveVelocity_Virtual• MC_MoveAbsolute_Virtual• MC_MoveRelative_Virtual• MC_MoveRelativeModulo_Virtual

MC_MoveRelative_Virtual

• Instances of MC_MoveRelative_Virtual• MC_MoveVelocity_Virtual• MC_MoveAbsolute_Virtual• MC_MoveAbsoluteModulo_Virtual• MC_MoveRelativeModulo_Virtula

MC_MoveRelativeModulo_Virtual

• Instances of MC_MoveRelativeModulo_Virtual• MC_MoveVelocity_Virtual• MC_MoveAbsolute_Virtual• MC_MoveAbsoluteModulo_Virtual• MC_MoveRelative_Virtual

MC_MoveVelocity_Virtual

• Instances of MC_MoveVelocity_Virtual• MC_MoveAbsolute_Virtual• MC_MoveRelative_Virtual• MC_MoveAbsoluteModulo_Virtual• MC_MoveRelativeModulo_Virtual

00

I

Page 34: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

34 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

2 AppendixMPLCTecVirtualEncoder

The following figure deptics the mutual cancellation conditions of the CommandAbortedoutput signal.

61681AEN

New instance:CA to previous

MC_MoveRelative_Virtual

MC_MoveAbsolute_Virtual

MC_MoveVelocity_Virtual

MC_Stop_Virtual

New instance:CA to previous

New instance:CA to previous

Call creates CA

Call creates CA

Call creates CA

Call creates CA

Call creates CA

MC_MoveRelativeModulo_VirtualNew instance:

CA to previous

Call creates CA

MC_MoveAbsoluteModulo_Virtual

Call creates CA

Call creates CACall creates CA

New instance:CA to previous

NOTEThe MC_Move ... function modules cancel each other.

00

I

Page 35: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 35

3IntroductionMPLCTecGearMotion_MDX

3 MPLCTecGearMotion_MDX3.1 Introduction

The MPLCTecGearMotion_MDX library is based on the technology function "Internalsynchronous operation (ISYNC)" of the MOVIDRIVE® drive inverter. The followingsimplifications 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 configuredand 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, arecontrolled centrally using the MOVI-PLC® controller

3.2 Application areasThe MPLCTecGearMotion_MDX library is suited for all applications that requiresynchronized 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) motoraxes can be operated in synchronous operation

• A variety of configuration options can be set clearly structured with the relevantfunction 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

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.

00

I

Page 36: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

36 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Project planningMPLCTecGearMotion_MDX

3.3 Project planning3.3.1 Prerequisites

• In order to use the MPLCTecGearMotion library, you need a MOVI-PLC® controllerin technology version T1 or higher. A MOVIDRIVE® B unit in standard version (..00)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 inthe "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC®" manualapply as well.

3.3.2 Basic principle and notes

• Existing scope of functions of the ISYNC technology function are used withMOVIDRIVE® B.

• Setting the corresponding system variables for synchronous operation using IECfunction modules.

• Automatic changeover of ramp types during direct startup cycle or while preparingthe 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 functionmodule MC_ReadParameter_MDX or MC_WriteParameter_MDX(MPLCMotion_MDXlibrary).

• The MC_LinkTecGear_MDX function module is mandatory as central data interfaceto the gear technology function, for example to administer the non-remanent systemvariables of the ISYNC technology function. Besides, the technology function "Inter-nal 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-relatedor position-dependent.The choice whether the synchronization process is to be performed in a time-related orposition-dependent manner is defined for the startup cycle through the inputGearInMasterDistance of the MC_PrepareGearIn_MDX function module. In the case ofoffset travel, the choice whether the time-related or position-dependent synchronizationprocess is to be used is made using the input GearOffsetMasterDistance of theMC_PrepareGearOffset_MDX function module. If the value is "0", time-related synchronization process is activated; if the value isunequal "0", position-dependent synchronization will be used with the relevant value asmaster distance for the synchronization process.

00

I

Page 37: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 37

3Project planningMPLCTecGearMotion_MDX

Time-related startup cycle

Time-related startup cycle means the slave synchronizes to the master using the veloc-ity and ramp set in the MC_SetGearDynamics_MDX function module. It these valuesare set more dynamically than those for the master, then a lag error that might occur dur-ing the stop cycle can be reduced.

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 3000 1/min)[6] Slave is in sync with the master

n

t

[1]

[3]

[4]

[5]

[2]

[6]

00

I

Page 38: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

38 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Project planningMPLCTecGearMotion_MDX

Position-depen-dent startup cycle

Position-dependent startup cycle means the slave synchronizes to the master within amaster distance that can be set. The startup cycle is softer than with time-related startupcycle but a lag error cannot be reduced.The position-dependent startup cycle depends on the direction. This means, if themaster distance is specified on the input GearInMasterDistance as positive value for thestartup cycle, then the master also has to turn in positive direction, else there will not bea startup cycle process.

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

n

[1]

[2]

[5]

[4]

[3]

[6]

00

I

Page 39: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 39

3Project planningMPLCTecGearMotion_MDX

3.3.4 Various start events for startup cycle and offset travel

The MC_PrepareGearIn_MDX and MC_PrepareGearOffset_MDX function modulescan be used to set the event that triggers the action independent of the chosen startupcycle or offset type. During the startup cycle, this is set with the input GearInStartSourceon 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 functionmodule.

• MDX_GEAR_INTERRUPT_DI02/MDX_GEAR_INTERRUPT_X14CThe startup cycle is started by an interrupt event that is triggered by a signal changeon binary input DI02 of the MOVIDRIVE® B unit or the C track of the external encoderon X14. A delayed startup cycle can be implemented using the input Distance-ForStartGearIn (→ following figure).

61687AXX

[1]

[2]

[3]

[4]

[5]

[6]

[1] Interrupt event on DI02 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

00

I

Page 40: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

40 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Project planningMPLCTecGearMotion_MDX

• MDX_GEAR_DISTANCE_COUNTERWith this setting, the startup cycle is started according to the specified masterdistance.

61688AXX

[1] [2] [3]

[4] [4]

[5] [6]

[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

00

I

Page 41: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 41

3Project planningMPLCTecGearMotion_MDX

Offset processing An offset can be activated during synchronous operation after a successfully completedstartup cycle. Offset means the slave moves faster or slower than a set value and thenmoves 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 onthe MC_PrepareGearOffset_MDX function module.

Possible settings:• MDX_GEAR_DIRECT

Offset processing is directly started with the MC_GearOffsetDirect_MDX functionmodule.

• MDX_GEAR_DISTANCE_COUNTERWith this setting, offset processing is started according to the specified masterdistance. The input OffsetAutoRepeat can be used to specify whether offset travel isto be restarted automatically if the counter reaches the value of DistanceForStartOff-set again.

61689AXX

[1] [2] [3]

[4]

[5]

[7][6]

n

[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

00

I

Page 42: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

42 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Project planningMPLCTecGearMotion_MDX

3.3.5 Project planning procedure

The function modules of the MPLCTecGearMotion_MDX library are divided into fourdirectories.

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

MDX_Gear_Parameter directory:• MC_PrepareGearIn_MDX• MC_PrepareGearOffset_MDX• MC_SetGearDynamics_MDX

MDX_Gear_-SingleAxis

MDX_Gear_SingleAxis directory:• MC_GearInDirect_MDX• MC_GearOutDirect_MDX• MC_GearOffsetDirect_MDX

Procedure • Integrate the MPLCTecGearMotion_MDX library additionally in theMPLCMotion_MDX library into the project using the Library Manager.

• If the master position is to be transferred via SBus, the MC_InitialConfig_MDXfunction module has to be configured accordingly. This function module is part of theMPLCMotion_MDX library (→ "MPLCMotion_MDX und MPLCMotion_MX Librariesfor MOVI-PLC®" manual).The SBus should also be synchronized. The SBus synchronization telegram iscreated with the MC_SetSync_MDX function module (part of theMPLC_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_Virtualfunction module ( MPLCTecVirtualEncoder library).

• The MC_LinkTecGear_MDX function module constitutes the interface between tech-nology function and motor axis and must be called cyclically in the program. Oncethe MC_ConnectAxis_MDX function module has established the connection with themotor 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 synchro-nous operation parameters. This function module must be called with a rising edgeon the Execute input each time the MOVI-PLC® controller is restarted, or if you wantto change the general synchronous operation parameters.

00

I

Page 43: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 43

3Project planningMPLCTecGearMotion_MDX

• The MC_Prepare... function module is used to set the required startup cycle and off-set modes as well as the associated parameters.

NOTEThe 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 DI02. Ifpositioning is performed after a successful stop cycle (e.g. with theMC_MoveAbsolute_MDX function module), then the LINEAR ramp type is set automat-ically. If you want to synchronize again, the MC_PrepareGearIn_MDX function modulemust be called again so that the ramp type is set to synchronous operation even if thestartup cycle parameters have not changed.Exception: If synchronization takes place using the MC_GearInDirect_MDX functionmodule and if the startup cycle parameters have not changed, then theMC_PrepareGearIn_MDX function module need not be called again because theMC_GearInDirect_MDX function module changes the ramp type automatically.

00

I

Page 44: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

44 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

3.4 Overview of the MPLCTecGearMotion_MDX library

MDX_Gear_ Con-fig

MDX_Gear_Config directory:• MC_SetGearConfig_MDX function module

The MC_SetGearConfig_MDX function module is used for configuring the basicparameters for synchronous operation. The synchronous operation parameters musthave been transferred via this function module before a startup cycle process cantake place.

MDX_Gear_Main MDX_Gear_Main directory:• MC_ClearLagPermanent_MDX function module

The MC_ClearLagPermanent_MDX function module is used to clear the differencecounter as long as the input Enable = TRUE.

• MC_GearClearLag_MDX function moduleThe MC_GearClearLag_MDX function module is used to clear the difference counterof synchronous operation once with a rising edge at the Execute input.

• MC_GearState_MDX function moduleThe MC_GearState_MDXAs function module outputs the current synchronous oper-ation status as long as input Enable = TRUE.

61692AXX

00

I

Page 45: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 45

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

• MC_LinkTecGear_MDX function moduleThe 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, theMC_AutoRestartGearIn_MDX function module enables you to activate anotherautomatic startup cycle when the startup cycle event occurs again.

• MC_PrepareGearIn_MDX function moduleThe MC_PrepareGearIn_MDX function module prepares the startup cycle. Theparameters required for the startup cycle as well as the ramp type are set to synchro-nous operation. However, there is no active engaging.

• MC_PrepareGearOffset_MDX function moduleSimilarly to the MC_PrepareGearIn_MDX function module, you can set the offsetmodes and offset parameters using the MC_PrepareGearOffset_MDX functionmodules.

• MC_SetGearDynamics_MDX function moduleThe MC_SetGearDynamics_MDX function module is used with time-related startupcycle 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 completedstop cycle.

MDX_Gear_ Sin-gleAxis

Directory MDX_Gear_SingleAxis:• MC_GearInDirect_MDX, MC_GearOffsetDirect_MDX, MC_GearOutDirect_MDX

function modulesWith a rising edge on the Execute input, the MC_GearInDirect_MDX andMC_GearOffsetDirect_MDX function modules cause the respective direct action withthe parameters set by the MC_Prepare function modules. The MC_GearOutDirect_MDX function module is used for the stop cycle. There doesnot exist a corresponding Prepare function module for this function module.

00

I

Page 46: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

46 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

3.4.1 Data types of the MPLCTecGearMotion_MDX library

• Data type MC_GEAR_IN_SOURCE_MDXThis data type can be used with the MC_PrepareGearIn_MDX function module todefine the startup cycle event or delete already set startup cycle parameters.This enumeration is also used with the MC_PrepareGearOffset_MDX function mod-ule to define the start event for the offset. However, the two interrupt modes are notpossible in this case.

• Data type MC_GEAR_MASTERSOURCE_MDXThis enumeration defines the source of the master encoder signal. In addition to themaster sources external encoder on X14 or SSI, the master signal can also be sentvia the SBus. You can choose one of four CAN objects for this purpose.

61705AXX

61706AXX

61707AXX

00

I

Page 47: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 47

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

• Data type MC_GEAR_SLAVESOURCE_MDXThe source of the slave position can be determined with this data type.

• Data type MC_GEAR_STATE_MDXThis enumeration is used to display the current status of synchronous operation.

61708AXX

61709AXX

NOTEThe output GearState indicates the status of synchronous operation. Except for thestatus MDX_GEAR_NOTLINKED, the states correspond exactly with the IPOSplus®

variable H427. For detailed information on the individual states during synchronousoperation, refer to the "MOVIDRIVE® MDX61B Internal Synchronous Operation(ISYNC)" manual.

00

I

Page 48: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

48 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

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 onthe controller to the MOVIDRIVE® unit again once an axis fault has been acknowledged.This means you need not reconfigure the MOVIDRIVE® system variables of synchro-nous operation.You can use the "Reset" service to delete these system variables both on the controllerand in MOVIDRIVE®.The following system variables are saved or deleted.

System variable

Name Data Type Description

GearOffset settings, depending on the offset mode

H360 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

H400 StopCycleMode DINT Selected stop cycle mode

H401 StopCycleModeControl DINT Definition of the state after completed stop cycle

GearIn settings, depending on the startup cycle mode

H410 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

H430 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

H390 RegisterLoopDXDTOut DINT Control element for position-dependent startup cycle

00

I

Page 49: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 49

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

3.4.3 Function modules of the MPLCTecGearMotion_MDX library

MC_LinkTecGear_MDX function module

Description The MC_LinkTecGear_MDX function module constitutes the logical interface betweenmotor axis and technology function "Internal Synchronous Operation". Once theMC_ConnectAxis_MDX function module has established the cyclical communication tothe motor axis and after enable via the Enable input, the synchronous operation functionof MOVIDRIVE® B is activated first. Next, the initialization service of the generalsynchronous operation parameters is executed which is selected using InitService.These synchronous operation parameters are deleted depending on the set service, forexample after a fault reset, or the image of the last setting on the controller is transferredto the motor axis.In cyclical operation, the MC_LinkTecGear_MDX function module constitutes theparameter interface of the synchronous operation function modules to MOVIDRIVE®.Additionally, various status signals are available as outputs.

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.

61694AXX

MC_LINKTECGEAR_MDX

InitService : MC_LINKTEC_INITSERVICE

Done : BOOLEnable : BOOL

UseGearConfigAssistant : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

LinkState : MC_LINKTECSTATE

GearState : MC_GEAR_STATE_MDX

Axis : AXIS_REF (VAR_IN_OUT)

NOTES• The MC_LinkTecAxis_Virtual function module is mandatory for using the synchro-

nous operation function. The function module has to be called cyclically in theprogram.

• If the output signal LinkState has the status NotLinked, then none of the functionmodules of the MPLCTecVirtualEncoder library can be executed. A correspondingerror message is issued.

00

I

Page 50: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

50 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

Input signals The following input signals can be set on the MC_LinkTecGear_MDX function module.

Output signals The MC_LinkTecGear_MDX provides the following output signals.

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 (pre-pared)

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

controlled)• MDX_GEAR_OUTGEAR_X_CTRL (decoupled in posi-

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

00

I

Page 51: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 51

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

The following figure shows the functions and initialization routines of theMC_LinkTecGear_MDX function module and establishing the connection state (outputLinkTecState).

61710AEN

Enable=True

OK

Error

No

OK

Reset service No service

Restore service

No

Parameter service successful?

Yes

No

Yes

Yes

Activate technology function "synchronous operation" in MDX B

Execute initialization service

Call MC_LinkTecGear_MDX

Check: Technology version, valied log. address,

1xLinkTecGear per axis

Cancel processing with error and error message

Check:

PLCopenState

> NotConnected

i.e. connection

to axis OK?

Check:

PLCopenState

> NotConnected

i.e. connection

to axis OK?

Cyclical program section:

Synchronous operation parameters are written

or read if requested by the gear function modules LinkState =

GEN_TEC_INITIALIZED

LinkState =

GEN_TEC_NOT_LINKED

Error issued by the module which

has requested parameter service

LinkState = GEN_TEC_RESETED

GearState = MDX_GEAR_NOTLINKEDLinkState = GEN_TEC_RESTORED

GearState = MDX_GEAR_NOTLINKEDLinkState = GEN_TEC_NOTINITIALIZED

GearState = MDX_GEAR_NOTLINKED

00

I

Page 52: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

52 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_SetGearConfig_MDX function module

Description The MC_SetGearConfig_MDX function module is used to set basic synchronousoperation parameters and to transfer these parameters to the respective motor axis. Theset 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 setas master source on the MasterSource input. You can choose whether the master valueis 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 counterfor saving the synchronous operation after a fault or in DC 24 V operation. If the valueis "0", this function will be deactivated; the difference counter is not saved.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

6171!AXX

MC_SETGEARCONFIG_MDX

GFMaster : DINT

Done : BOOLExecute : BOOL

GFSlave : UDINT ErrorID : DWORD

Error : BOOL

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)

Axis : AXIS_REF (VAR_IN_OUT)

00

I

Page 53: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 53

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

Input signals The following input signals can be set on the MC_SetGearConfig_MDX functionmodule.

Output signals The MC_SetGearConfig_MDX function module provides the following output signals:

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

GFMaster DINT Scaling factor of the master increments (IPOSplus® variable H428 GFMaster → "MOVIDRIVE® MDX61B Internal Syn-chronous Operation ISYNC" manual)

GFSlave DINT Scaling factor of the slave increments (IPOSplus® variable H429 GFSlave → "MOVIDRIVE® MDX61B Internal Synchronous Operation ISYNC" manual)

MasterSource MC_GEAR_MASTER SOURCE_MDX

Source of the master position (H430):• 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 MC_GEAR_SLAVE SOURCE_MDX

Source of the slave position (H431):• MDX_GEAR_SLAVE_X15• MDX_GEAR_SLAVE_X14• MDX_GEAR_SLAVE_SSI

ExternalSlave EncoderNum

UINT Slave encoder on the track, numerator value (IPOSplus® variable H435 SyncEncoderNum → "MOVIDRIVE® MDX61B Internal Synchronous Operation ISYNC" manual)

ExternalSlave EncoderDenom

UINT Slave encoder on the track, denominator value (IPOSplus® variable H436 SyncEncoderDenom → "MOVIDRIVE® MDX61B Internal Synchronous Operation ISYNC" manual)

LagCountLife-Time

DWORD 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 "0".

Rotation Direc-tionLock

BYTE Direction of rotation lock:• 0 = Both directions of rotation enabled• 1 = Only CCW enabled• 2 = Only CW enabled (IPOSplus® variable H444

ReSprintClose)

MasterSignal Fil-ter

BYTE Interpolation time master signal (IPOSplus® variable H446 MFilterTime).

FeedForward Fil-ter

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

00

I

Page 54: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

54 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_SetGearDynamics_MDX function module

Description The MC_SetGearDynamics_MDX function module is used to set the velocity and rampfor the synchronization or offset process. These dynamic parameters are only active fortime-controlled startup cycle or offset processing. For position-dependent startupcycle/offset, synchronization takes place within the specified master distance (in theMC_Prepare function module). You can also set the stop cycle ramp and the free-wheeling speed (if the stop cycle is not subject to position control).

Prerequisites • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

61713AXX

MC_SETGEARDYNAMICS_MDX

GearSpeed : UDINT

Done : BOOL

Busy : BOOL

Execute : BOOL

GearRamp : DINT

FreeRunSpeed : DINT

GearOutRamp : DINT

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

NOTEThe inputs GearSpeed and GearRamp are effective both for the startup cycle and off-set processing. If different values are required for this purpose, then the new dynamicvalues have to be written prior to the respective action.The free-wheeling speed is set using the "TargetSpeed", which is also used for posi-tioning or speed control. The free-wheeling speed can only be set in the PLCopen sta-tus DISCRETE_MOTION or SYNCHRONIZED_MOTION to avoid undesired changesin velocity in the case of speed control.

00

I

Page 55: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 55

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

Input signals The following input signals can be set on the MC_SetGearDynamics_MDX functionmodule.

Output signals The MC_SetGearDynamics_MDX function module provides the following outputsignals:

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

GearSpeed UDINT Catch-up velocity for the startup cycle/offset (parameter P240 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 P130 in ms).

Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module.

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.

00

I

Page 56: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

56 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_PrepareGearIn_MDX function module

Description The MC_PrepareGearIn_MDX function module prepares the startup cycle for synchro-nization. You can set the event that triggers the startup cycle and sets the relevantparameters depending on the mode. The ramp type is already set to ISYNC.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

61716AXX

MC_PREPAREGEARIN_MDX

GearInStartSource : MC_GEAR_IN_SOURCE_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

GearInMasterDistance : DINT

Axis : AXIS_REF (VAR_IN_OUT)ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

DistanceForStartGearIn : DINT

CommandAborted : BOOL

NOTESObserve 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 activatethe "AutoRestart" function using the MC_AutoRestartGearIn_MDX function module.

• If a change to positioning mode (DiscreteMotion) or speed control (ContinuousMo-tion) takes place after the stop cycle, for example to move a "flying saw" back to theinitial position, then you have to call the MC_PrepareGearIn_MDX function moduleagain in order to reset the ramp type to synchronous operation.

00

I

Page 57: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 57

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

Input signals The following input signals can be set on the MC_PrepareGearIn_MDX function mod-ule.

Output signals The MC_PrepareGearIn_MDX function module provides the following output signals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs.

GearInStart-Source

MC_GEAR_IN_ SOURCE

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_DI02 (startup cycle triggered

by interrupt DI02)• MDX_GEAR_INTERRUPT_X14C (startup cycle triggered

by interrupt X14 C track)• MDX_GEAR_DISTANCE_COUNTER (startup cycle

according to defined master distance)

GearInMasterD-istance

DINT Master distance during which the startup cycle is performed. The setting "0" means time-controlled startup cycle with the values of the MC_SetGearDynamics_MDX function module (IPOSplus® variable H417).

DistanceForStart-GearIn

DINT 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 (IPOSplus® variable H415).

Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module.

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.

00

I

Page 58: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

58 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_AutoRestartGearIn_MDX function module

Description The MC_AutoRestartGearIn_MDX function module is used to activate the AutoRestartfunction 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 func-tion can be used, for example for a "flaying saw" by another startup cycle according toset master distance (input DistanceForStartGearIn on the MC_PrepareGearIn_MDXfunction 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. Onceyou activate the lock again, the startup cycle process will be triggered automatically nexttime the startup cycle value is reached. If a MC_GearOutDirect_MDX function moduleis active, the AutoRestart function will be disabled for the duration of the stop cycle.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

Input signals The following input signals can be set on the MC_AutoRestartGearIn_MDX functionmodule.

Output signals The MC_AutoRestartGearIn_MDX provides the following output signals.

61717AXX

MC_AUTORESTARTGEARIN_MDX

AutoRestart : BOOL

Done : BOOL

Busy : BOOL

EN : BOOL

Axis : AXIS_REF (VAR_IN_OUT)ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

LockAutoGearIn : BOOL LockedByGearOut : BOOL

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

00

I

Page 59: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 59

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_PrepareGearOffset_MDX function module

Description The MC_PrepareGearOffset_MDX function module prepares offset processing. Hereyou can set the event that triggers the offset and sets the relevant parameters depend-ing on the mode. You can use the OffsetAutoRepeat input to choose whether you wantto activate repeated offset in CounterControlled offset mode.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

Input signals The following input signals can be set on the MC_PrepareGearOffset_MDX functionmodule.

61718AXX

MC_PREPAREGEAROFFSET_MDX

GearOffsetStartMode : MC_GEAR_IN_SOURCE_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

GearOffsetSlaveDistance : DINT

DistanceForStartOffset : DINT

OffsetAutoRepeat : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

GearOffsetMasterDistance : DINT CommandAborted : BOOL

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

GearOffsetStart-Mode

MC_GEAR_IN_ SOURCE

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)

GearOffset Mas-terDistance

DINT Master distance within which the offset is implemented. The setting "0" means time-controlled offset with the values of the MC_SetGearDynamics_MDX function module (IPOSplus® variable H366).

GearOffsetSlave-Distance

DINT Offset distance that the slave is to cover (IPOSplus® variable H367).

DistanceFor StartOffset

DINT Master distance after which the offset is started in the case of an offset that is controlled via Distance_Counter. (IPOSplus® variable H365).

OffsetAuto Repeat

BOOL Automatic offset repetition in the Distance_Counter mode.

Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module.

00

I

Page 60: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

60 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

Output signals The MC_PrepareGearOffset_MDX function module provides the following outputsignals.

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.

00

I

Page 61: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 61

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_GearInDirect_MDX function module

Description A rising edge at the Execute input of the MC_GearInDirect_MDX function modulecauses direct engaging in the synchronization process using the parameters that wereset with the function modules MC_PrepareGearIn or MC_SetGearDynamics. TheMC_GearInDirect_MDX function module interrupts other Move or PrepareGearInfunction modules.

Prerequisite • The "Synchronous operation" technology function was created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

• The GearState output signal of the MC_LinkTecGear_MDX function module has thestatus 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.

Output signals The MC_GearInDirect_MDX function module provides the following output signals.

61719AXX

MC_GEARINDIRECT_MDX

InGear : BOOL

Active : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

CommandAborted : BOOL

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

00

I

Page 62: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

62 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_GearOutDirect_MDX function module

Description The MC_GearOutDirect_MDX function module ends synchronous operation. Themotor axis leaves synchronization with a rising edge on the Execute input. If the inputGearOutFreeRunning = TRUE, the drive turns after decoupling with the velocity set atthe FreeRunSpeed input. Else the motor axis remains stopped subject to positioncontrol. The GearOutLagCountOn input specifies whether the difference counter is toremain active after the stop cycle. This selection is only possible with stop cycle in posi-tion control; when the stop cycle is performed in speed control, the difference counteralways remains active.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

• Usually, decoupling takes place from synchronous or offset operation. But decou-pling can also take place already during the startup cycle.

61720AXX

MC_GEAROUTDIRECT_MDX

GearOutLagCountOn : BOOL

Done : BOOL

Active : BOOL

Execute : BOOL

FreeRunSpeed : DINT

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

GearOutFreeRunning : BOOL

NOTES• The lag error can only be reduced after another startup cycle process when it is

time-controlled (input GearMasterDistance = 0 with the MC_PrepareGearIn_MDXfunction module).

• Setting of the free-wheeling speed is only active once during the stop cycle. Thefree-wheeling speed can then only be changed with theMC_SetGearDynamics_MDX function module.

• The current library MPLCTecGearMotion_MDX also allows for "changeover on thefly" from synchronous operation to positioning mode; the output GearState of theMC_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.

00

I

Page 63: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 63

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

Input signals The following input signals can be set on the MC_GearOutDirect_MDX function module.

Output signals The MC_GearOutDirect_MDX function module provides the following output signals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs.

GearOutLag-CountOn

BOOL Selection whether the difference counter is to remain active after the stop cycle.

GearOutFre-eRunning

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

00

I

Page 64: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

64 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_GearOffsetDirect_MDX function module

Description The MC_GearOffsetDirect_MDX function module starts an offset travel with the valuesthat were set with the function modules MC_PrepareGearOffset orMC_SetGearDynamics. The motor changes to synchronous operation again aftersuccessful offset.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave 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.

Output signals The MC_GearOutDirect_MDX function module provides the following output signals.

61721AXX

MC_GEAROFFSETSETDIRECT_MDX

Done : BOOL

Active : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

CommandAborted : BOOL

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

Axis AXIS_REF Logical address of the motor axis that is to be addressed by the function module.

Output signal Type Meaning

Done BOOL Offset was processed, motor axis is synchronous again.

Active BOOL Offset processing ongoing.

Command Aborted

BOOL The job was aborted by another function module.

Error BOOL Error in the function module during execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 65: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 65

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_GearClearLag_MDX function module

Description The MC_GearClearLag_MDX function module clears the difference counter of thesynchronous operation with a rising edge at the Execute input. The action was per-formed successfully if the difference counter is within LagWindow, else an error will beissued.

Prerequisite • The "Synchronous operation" technology function is created using theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

Input signals The following input signals can be set on the MC_GearClearLag_MDX function module.

Output signals The MC_SetActPos_Virtual function module provides the following output signals.

61722AXX

MC_GEARCLEARLAG_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

LagWindow : INIT

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule 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 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.

00

I

Page 66: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

66 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_ClearLagPermanent_MDX function module

Description The MC_ClearLagPermanent_MDX function module clears the difference counter ofsynchronous operation until input Enable = TRUE. In addition, you can set whether theslave 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 theMC_LinkTecGear_MDX function module.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

Input signals The behavior of the MC_ClearLagPermanent_MDX function module depends on thefollowing input signals.

Output signals The MC_ClearLagPermanent_MDX function module provides the following outputsignals.

61725AXX

MC_CLEARLAGPERMANENT_MDX

Enabled : BOOLEnable : BOOL

Axis : AXIS_REF (VAR_IN_OUT) ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

FollowMasterSpeed : BOOL

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

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 67: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 67

3Overview of the MPLCTecGearMotion_MDX libraryMPLCTecGearMotion_MDX

MC_GearState_MDX function module

Description The MC_GearState_MDX function module is a diagnostics module that indicates thecurrent status of synchronous operation (GearState output) as long as input Enable =TRUE. Other important states are available as Boolean variables (→ Section 'Outputsignals") (e.g. as condition for other actions).

Prerequisite • The "Gear" technology function is created using the MC_LinkTecGear_MDX functionmodule.

• The output signal LinkState of the MC_LinkTecGear_MDX function module does nothave the status GEN_TEC_NOTLINKED.

Input signals The following input signals can be set on the MC_GearState_MDX function module.

Output signals The MC_GearState_MDX function module provides the following output signals.

61727AXX

MC_GEARSTATE_MDX

Enabled : BOOL

GearState : MC_GEAR_STATE_MDX

Enable : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

InGear : BOOL

OutGear : BOOL

EngagingGear : BOOL

OffsetGear : BOOL

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 signal Type Meaning

Enabled BOOL The function module is enabled; the output values are valid.

GearState MC_GEAR_STATE_MDX

Synchronous operation status:• 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 mod-ule.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 68: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

68 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 ExamplesMPLCTecGearMotion_MDX

3.5 Examples3.5.1 Example 1: Synchronous operation with external encoder as master and direct engaging /

disengaging

61728AXX

61729AXX

00

I

Page 69: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 69

3ExamplesMPLCTecGearMotion_MDX

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. Theslave motor axis synchronizes to the master triggered by an interrupt event at DI02. Thedifference counter is to remain active after disengaging and is to be cleared with the nextstartup cycle process.

Step 1: Create the virtual encoder in 5 ms task

61730AXX

00

I

Page 70: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

70 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 ExamplesMPLCTecGearMotion_MDX

Step 2: Create and configure the slaves

61731AXX

00

I

Page 71: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 71

3ExamplesMPLCTecGearMotion_MDX

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. Thisaxis sends the motor encoder position cyclically every 5 ms with the telegram IDMDX_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 theMC_ConnectAxis_MDX function module is started (→ " MPLCMotion_MDX Library forMOVI-PLC® manual). Furthermore the SBus should be synchronized with theMC_SetSync_MDX function module.

61732AXX

61735AXX

00

I

Page 72: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

72 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 ExamplesMPLCTecGearMotion_MDX

Step 2: Create and configure the "Synchronous operation" technology function

The MC_LinkTecGear_MDX function module with selection of the restore service isused for this purpose.If the connection is established using the MC_LinkTecGear_MDX function module, thegeneral synchronous operation parameters are set with the MC_SetGearConfig_MDXfunction modules.Receive_PDO_1 is specified as source of the master signal that was set before in theMC_InitialConfig_MDX function module. The MC_Prepare function modules are config-ured for engaging and offset processing for direct engaging, or for offset start with time-related process.

61734AXX

61736AXX

00

I

Page 73: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 73

3ExamplesMPLCTecGearMotion_MDX

Step 3: Direct engaging / disengaging and offset start

61738AXX

00

I

Page 74: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

74 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

3 AppendixMPLCTecGearMotion_MDX

3.6 Appendix3.6.1 Abortion of function modules (CommandAborted output signal)

The CommandAborted output signal is used to indicate multiple calls of a movementmodule (MC_Move ...) or to call another movement module. The aborted job will not beexecuted anymore (→ "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC® manual).

Activated function module Creates CommandAborted to

MC_GearOutDirect_MDX • MC_GearInDirect_MDX• MC_GearOffsetDirect_MDX

MC_GearInDirect_MDX • Instances of MC_GearIn• 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

MC_PrepareGearOffset_MDX • Instances of MC_PrepareGearOffset_MDX• MC_GearOffsetDirect_MDX

MC_Move function modules • MC_GearOffsetDirect_MDX

00

I

Page 75: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 75

3AppendixMPLCTecGearMotion_MDX

The following figure shows a schematic view of the mutual abortion conditions of theCommandAborted (CA) output signal.

61740AEN

New instance:CA to previous

MC_GearOffsetDirect_MDXMC_PrepareGearOffset_MDX

MC_PrepareGearIn_MDX

New instance:CA to previous

New instance:CA to previous

MC_GearInDirect_MDXNew instance:

CA to previous

MC_GearOutDirect_MDX"FB-Move" ausMPLCMotion_MDX

Call creates CA

Call creates CA

Call creates CA

Call creates CA

Call creates CA

Calll creates CA Call creates CA

NOTEMC_Move ... function modules of the MPLCMotion_MDX library:• MC_MoveAbsolute_MDX• MC_MoveRelative_MDX

00

I

Page 76: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

76 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 IntroductionMPLCTecCamMotion_MDX

4 MPLCTecCamMotion_MDX4.1 Introduction

The MPLCTecCamMotion_MDX library is based on the technology function "Electroniccam" of the MOVIDRIVE® MDX61B drive inverter. The following simplifications havebeen 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 IPOSplus®

• Complex programming when networking and synchronizing several linked electroniccams.

• Program functionality distributed on several inverters, which means complexdiagnostics

• Lengthy familiarization in the event of functional extensions of the existing programsequence

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.

4.2 Project planning4.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 (..00) with encoder feedback and firmware

status ".17" is sufficient as drive inverter.• Software MOVITOOLS® MotionStudio 5.40 or higher.

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

00

I

Page 77: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 77

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

4.2.2 Notes

A prerequisite for operating the technology function "Electronic cam" is that the technol-ogy function "Electronic cam" has been installed using the Motion Technology editor ofthe MOVITOOLS® MotionStudio.Startup with the Motion Technology editor is not necessary if you use the functionmodules MC_CamCalcRtoR_MDX or MC_CamCalcSpline_MDX.The Motion Technology editor can be used to create up to six individual curves basedon pre-defined curve segments. Curve points can be exported, for example form a curvepoint table.

Recommended procedure

• The configured curve tables and internal scaling factors are created and loadedusing the Motion Technology editor. This process is performed for each driveinverter.

• 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 theMPLCTecCamMotion_MDX library can be made using the existing function modulesMC_ReadParameter_MDX or MC_WriteParameter_MDX.

4.3 Overview of the MPLCTecCamMotion_MDX libraryThe function modules of the MPLCTecCamMotion_MDX are divided into five groups:

MDX_Cam_ Con-fig

Directory MDX_Cam_Config:• MC_LinkTecCam_MDX function module

The MC_LinkTecCam_MDX function module is used to diagnose and manage thetechnology function "Electronic cam". The function module must be called cyclicallyand is mandatory for operating the technology function "Electronic cam". All commu-nication services of the integrated function modules of the library are performed viathis 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 sixelectronic cams stored in the MOVIDRIVE® drive inverter can be selected andsystem variables stored in MOVIDRIVE® can be activated.

• MC_CamTableScale_MDX function moduleThe MC_CamTableScale_MDX function module is used to scale the selected cam.

00

I

Page 78: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

78 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

• MC_SetCamConfig_MDX function moduleThe MC_SetCamConfig us used to manually manage the SEW-internal cam param-eters. The function module is provided for specific applications and should not beused.

MDX_Cam_ Parameters

MDX_Cam_Parameters directory:• MC_AutoRestartCamIn_MDX function module

The MC_AutoRestartCamIn_MDX function module is used to restart the interruptcontrolled startup cycle function.

• MC_PrepareCamIn_MDX function moduleThe MC_PrepareCamIn_MDX function module is used to select SEW-specificstartup cycle modes, for example interrupt controlled startup cycle on binary inputDI02.

• MC_PrepareCamOut_MDX function moduleThe MC_PrepareCamIn_MDX function module is used to select the SEW-specificstop cycle modes, for example counter controller stop cycle after the main curve hasbeen passed through a specified number of times.

• MC_WriteCamTrim_MDX function moduleThe MC_WriteCamTrim_MDX function module is used to shift the referencebetween master and cam slave in engaged state.

• MC_WriteModuloRest_MDX function moduleThe MC_WriteModuloRest_MDX function module is used to compensate the added-up offset of non-ultimate gear ratio factors.

MDX_Cam_ Sin-gleAxis

MDX_Cam_SingleAxis directory:• MC_AdjustCamSlave_MDX function module

The MC_AdjustCamSlave_MDX function module is used to adjust the cam motoraxis to any curve point.

• MC_CamInDirect_MDX function moduleThe MC_CamInDirect_MDX function module is used to directly start the startupcycle.

• MC_CamOutDirect_MDX function moduleThe MC_CamOutDirect_MDX function module is used to directly start the stop cycle.

00

I

Page 79: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 79

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MDX_Cam_ Calculate

MDX_Cam_Calculate directory:• MC_CamCalcSpline_MDX function module

The MC_CamCalcSpline_MDX function module calculates a spline curve based onthe coordinates (X = master, Y = slave).

• MC_CamCalcRtoR_MDX function moduleThe MC_CamCalcRtoR_MDX function module calculates a curve based on thecoordinates (X = master, Y = slave). The curve is made up of a number of sequences.The transitions of the sequences are rest-to-rest.

• MC_CamCalcRtoR50_MDX function moduleThe MC_CamCalcRtoR50_MDX function module calculates a curve based on thecoordinates (X = master, Y = slave). The curve is made up of up to 50 sequences.The transitions of the sequences are rest-to-rest.

4.3.1 Data types of the MPLCTecCamMotion_MDX library

• File type MC_CAM_IN_MDXThis enumeration is used to define the interrupt source for theMC_PrepareCamIn_MDX function module (startup cycle).

61745AXX

61746AXX

00

I

Page 80: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

80 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

• Data type MC_CAM_OUT_MDXThis enumeration is used to define the interrupt source for theMC_PrepareCamOut_MDX function module (stop cycle).

• Data type MC_CAM_MASTERSOURCE_MDXThis data type is used to define the source of the master encoder signal. In additionto the master encoder signals "External encoder on X14" or "SSI", you can create anobject received via SBus. You can choose between four CAN objects for thispurpose. The send objects are defined by the MC_InitialConfig_MDX functionmodule (→ "MPLCMotion_MDX Library for MOVI-PLC®" manual)

• Data type MC_CAM_SLAVESOURCE_MDXThis enumeration is used to define the encoder source. Currently, only the slavesource X15 (i.e. motor encoder) is supported.

61747AXX

61748AXX

61749AXX

00

I

Page 81: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 81

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

• Data type MC_CAM_STARTUPMODE_MDXThis enumeration is used to specify the startup cycle mode for theMC_PrepareCamIn_MDX function module.

• Data type MC_CAM_STOPMODE_MDXThis enumeration is used to specify the stop cycle mode for theMC_PrepareCamOut_MDX function module.

• Data type MC_CAM_STATE_MDXThis enumeration is used to indicate the current status of the electronic cam. It is out-put at the CamState output of the MC_CamLinkTec_MDX function module.

• Data type MC_CAM_CALC_FUNCTIONNO_MDXThis enumeration is used to define the curve mode for the MC_CamCalcSpline_MDXfunction module.

61750AXX

61751AXX

61752AXX

61928AXX

00

I

Page 82: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

82 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

• Data type MC_CAM_CALC_SPLINEMODE_MDXThis enumeration is used to define the spline mode for theMC_CamCalcSpline_MDX function module.

4.3.2 Data types of the MC_CamLinkTec_MDX function module

• Data type MC_LINKTECSTATEThis enumeration indicates the current status of the electronic cam. The status is out-put at the LinkState output of the MC_LinkTecState _MDX function module.

• Data type MC_LINKTEC_INITSERVICEThis enumeration is used to set the parameters for the restart behavior at theInitservice input of the MC_LinkTecCam_MDX function module. Currently, only theinitialization service GEN_RESET_SERVICE is supported.

61929AXX

61753AXX

61754AXX

00

I

Page 83: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 83

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

4.3.3 Function modules of the MPLCTecCamMotion_MDX library

MC_LinkTecCam_MDX function module

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 andoutput LinkState = GEN_TEC_NOTLINKED).

• No communication error between MOVI-PLC® and motor axis.

61755AXX

MC_LINKTECCAM_MDX

InitService : MC_LINKTEC_INITSERVICE

Done : BOOLEnable : BOOL

Axis : AXIS_REF (VAR_IN_OUT) ErrorID : UINT

Error : BOOL

LinkState : MC_LINKTECSTATE

CamState : MC_CAM_STATE_MDX

00

I

Page 84: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

84 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_LinkTecCam_MDX function module.

Output signals The MC_LinkTecCam_MDX function module provides the following output signals.

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 vari-ables:• 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 signal Type Meaning

Done BOOL Initialization successfully completed, connection with "Vir-tual 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

00

I

Page 85: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 85

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamTableScale_MDX function module

Description The MC_CamTableScale_MDX function module is used to scale the selected curve(0... 5) with the defined nominator and denominator with reference to the master. Thisallows for trimming the curve with reference to the MasterCycleScale (StartupCyclescale) (→ following figure).

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.

61756AXX

MC_CAMTABLESCALE_MDX

Table : UINT

Done : BOOLExecute : BOOL

Nominator : DINT

ErrorID : UINT

Error : BOOL

Denominator : DINT

Axis : AXIS_REF (VAR_IN_OUT)

Busy : BOOL

61757AXX

55%

100%

SlaveCycle f(x)

MasterCycle

00

I

Page 86: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

86 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_LinkTecGear_MDX function module.

Output signals The MC_CamTableScale_MDX function module provides the following output signals:

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

Table UINT Selection of the curve number (0 ... 5) (IPOSplus® variable H451 TableSelect)

Nominator DINT Scaling factor numerator –32000...0...32000(IPOSplus® variable H449 TableScaleNominator)

Denominator DINT Scaling factor denominator 0...32000(IPOSplus® variable H450 TableScaleDenominator)

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

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.

00

I

Page 87: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 87

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamTableSelect_MDX function module

Description With the MC_CamTableSelect_MDX function module, you can choose a maximum of 6cams 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 remanentIPOSplus® 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 ofthe read master value via the MasterSampleTime input.The following read-in values are recalculated component-internally due to the inputvalue (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 becalled prior to the MC_CamTableSelect_MDX function module.This wiring is intended for special applications and should not be used.

61758AXX

MC_CAMTABLESELECT_MDX

Table : UINT

Done : BOOL

Busy : BOOL

Execute : BOOL

UseCamEditorConfiguration : BOOL

UseVirtEncoder : BOOL

MasterSampleTime : UDINT

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : UINT

Error : BOOL

00

I

Page 88: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

88 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

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

Input signals The following input signals can be set on the MC_CamTableSelect_MDX functionmodule.

Output signals The MC_CamTableSelect_MDX function module provides the following output signals.

NOTEChanging to another curve is only possible in decoupled state.

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 (0 ... 5)(IPOSplus® variable H451 TableSelect)

UseCamEditor-Configuration

BOOL TRUE: Scaling parameters are activated automaticallyFALSE: The MC_SetCamConfig_MDX function module must be called before.

UseVirtEncoder BOOL TRUE: VirtMPLCEncoder activeFALSE: X14 External incremental encoder active

MasterSample-Time

UDINT Interpolation time of the master value 1 ... 30 ms1: Input value with X14 setpoint5: Input value for VirtEnc in 5 ms task10: Input value for VirtEnc in 10 ms task

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

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.

00

I

Page 89: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 89

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_SetCamConfig_MDX function module

Description The MC_SetCamConfig_MDX function module is used to transfer the relevant systemvariables from the startup of the cam editor. The procedure is explained in the "Exam-ples" section.The transferred parameters are written to the non-remanent system variables. TheMC_SetCamConfig_MDX function module is used to set the status variable LinkStateto GEN_TEC_INITIALIZED.

Prerequisite • The LinkState output of the MC_LinkTecCam_MDX function module does not havethe status GEN_TEC_NOTLINKED.

• The CamState output of the MC_LinkTecCam_MDX function module has the statusMDX_CAM_RESET or MDX_CAM_STOP.

61759AXX

MC_SETCAMCONFIG_MDX

MasterCountDirection : BOOL

Done : BOOL

Busy : BOOL

Execute : BOOL

MasterSource : MC_CAM_MASTERSOURCE

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

MasterNorm

MasterCycleScale : UDINT

StartupCycleScale : UDINT

ActualPositionScale : UINT

NFilterTime : USINT

DirectionBlock : USINT

MFilterTime : USINT

NOTEThe MC_SetCamConfig_MDX function module should only be used for specialapplications (→ Description of the MC_CamTableSelect_MDX function module).

00

I

Page 90: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

90 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_SetCamConfig_MDX function module.

Output signals The MC_SetCamConfig_MDX function module provides the following output signals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs.

MasterCount direction

BOOL Reversal of the direction of rotation of the master encoder.FALSE: No direction of rotation reversalTRUE: Direction of rotation reversal active(IPOSplus® variable H429 CamModeControl.1)

MasterSource MC_CAM_MASTER-SOURCE

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

MasterNorm Scaling of the master cycle (IPOSplus® variable H431 MasterNorm).

MasterCycle scale

UDINT Master cycle in increments (IPOSplus® variable H432 MasterCycleScale).

StartupCycleS-cale

UDINT Startup cycle inincrements (IPOSplus® variable H433 StartupCycleScale).

ActualPosition scale

UINT Scaling of the slave cycle (IPOSplus® variable H440 ActPositionScale).

NFilterTime USINT Feedforwared interpolator (IPOSplus® variable H443 NfilterTime).

DirectionBlock USINT Direction of rotation lock (IPOSplus® variable H444 ReSprintClose).

MFilterTime USINT Interpolation time (IPOSplus® variable H446 MfilterTime).

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

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.

NOTESProject 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 theinterpolation time")

00

I

Page 91: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 91

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_RestartCamIn_MDX function module

Description If the previous startup cycle mode was interrupt-controlled, the MC_RestartCamIn_MDXfunction module can be used to activate an automatic restart. This means a purelyinterrupt-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 havethe 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.

Output signals The MC_RestartCamIn_MDX function module provides the following output signals.

61760AXX

MC_RESTARTCAMIN_MDX

AutoRestart : BOOL

Done : BOOL

Busy : BOOL

EN : BOOL

Axis : AXIS_REF (VAR_IN_OUT) ErrorID : UINT

Error : BOOLLockAutoCamIn : BOOL

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

00

I

Page 92: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

92 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_PrepareCamIn_MDX function module

Description The MC_PrepareGearOffset_MDX function module prepares the SEW-specific startupcycle 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 DI02.The following status variables are changed by the MC_PrepareCamIn_MDX functionmodules:• 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 thestatus MDX_CAM_MAINCURVE.

Prerequisite • The LinkState output of the MC_LinkTecCam_MDX function module has the statusGEN_TEC_INITIALIZED.

• The CamState output of the MC_LinkTecCam_MDX function module has the statusMDX_CAM_RESET or MDX_CAM_STOP.

61761AXX

MC_PREPARECAMIN_MDX

StartupMode : MC_CAM_STARTUPMODE_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

Offset : DINT

Axis : AXIS_REF (VAR_IN_OUT) ErrorID : DWORD

Error : BOOLSource : MC_CAM_IN_MDX CommandAborted : BOOL

NOTEAn activated interrupt can be deselected by selecting the startup cycle typeMDX_CAM_STARTDIRECT at the StartupMode input.

00

I

Page 93: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 93

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_PrepareCamIn_MDX function module.

Output signals The MC_PrepareCamIn_MDX function module provides the following output signals.

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

Select the required startup cycle mode:• 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 star-

tup cycle (IPOSplus® variable H410 StartupCycleMode)

Source MC_CAM_IN_MDX Select the interrupt source for the startup cycle mode STARTINTERRUPT:• MDX_CAM_IN_DI02 Edge change at binary input DI02

/ X13:2)• MDX_CAM_IN_X14 Zero track of the external encoder

(IPOSplus® variable H411 StartupCycleModeControl.2)

Offset DINT Master distance in increments for the StartupMode:• MDX_CAM_STARTINTERRUPT• MDX_CAM_STARTCOUNTER (IPOSplus® variable

H415 StartupCycleCounterMaxValue)

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

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.

00

I

Page 94: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

94 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_PrepareCamOut_MDX function module

Description The MC_PrepareCamOut_MDX function module is used to prepare the SEW-specificstop cycle modes. The stop cycle process is started depending on the defined stop cycleevent, for example in the case of computer controlled stop cycle when the specifiednumber of times the main curve has been passed through is reached. Exception: When the stop cycle type MDX_CAM_STOPDIRECT is selected, theMDX_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 havethe status GEN_TEC_INITIALIZED.

• The CamState output of the MC_LinkTecCam_MDX function module has the statusMDX_CAM_RESET or MDX_CAM_STOP.

61776AXX

MC_PREPARECAMOUT_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : UINT

Error : BOOL

CommandAborted : BOOLStopMode : MC_CAM_STOPMODE_MDX

SetCounter : DINT

Source : SEW_CAM_OUT_MDX

RemainWay : DINT

LimitLeft : DINT

LimitRight : DINT

CamOutPosCtrl : BOOL

NOTEAn activated interrupt can be deselected by selecting the MDX_CAM_STOPDIRECTstop cycle type.

00

I

Page 95: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 95

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_PrepareCamOut_MDX functionmodule.

Output signals The MC_PrepareCamOut_MDX function module provides the following output signals.

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

Select the required stop cycle mode:• 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 (IPOSplus® variable H400 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 (IPOSplus® variable H404 StopCycleCounter).

Source SEW_CAM_OUT_MDX Select the interrupt source for the stop cycle mode STOPINTERRUPT:• MDX_CAM_IN_DI03

Edge change at binary input DI03 / X13:3)• MDX_CAM_IN_X14

Zero track of the external encoder (IPOSplus® variable H401 StopCycleModeControl.2)

RemainWay DINT Remaining distance to be covered in stop cycle mode MDX_CAM_STOPINTERRUPT after a plausible interrupt event has occurred (IPOSplus® variable H405 StopCycleRe-mainWay).

LimitLeft DINT The left window of range monitoring (IPOSplus® variable H383 RegisterLimitLeft) specified in stop cycle mode MDX_CAMSTOPINTERRUPT.

LimitRight DINT Right window of range monitoring (IPOSplus® 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 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.

00

I

Page 96: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

96 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_WriteCamTrim_MDX function module

Description The MC_WriteCamTrim_MDX function module is used to trim the active curve inengaged state. This means an offset with a master value, for example caused by slip,can be compensated.

Prerequisites • The LinkState output of the MC_LinkTecCam_MDX function module has the statusGEN_TEC_INITIALIZED.

• The CamState output of the MC_LinkTecCam_MDX function module has the statusMDX_CAM_MAINCURVE.

• Positive sign at the RegisterLoopOut input:Curve is decremented.

• Negative sign at the RegisterLoopOut input:Curve is incremented.

61777AXX

MC_WRITECAMTRIM_MDX

TrimMaster : BOOL

Done : BOOL

Busy : BOOL

Execute : BOOL

RegisterLoopOut : DINT

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : BOOL

Error : BOOLRegisterLoopDXDTOut : UINT

61778AXX

[1] Shift the slave reference point (input TrimMaster = FALSE; input RegisterLoop-Out = –10000 inc.)

[2] Shift the master reference point (input TrimMaster = TRUE; input RegisterLoop-Out = +5000 inc.)

[1]

[2]

SlaveCycle f(x)

MasterCycle

00

I

Page 97: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 97

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_WriteCamTrim_MDX function module.

Output signals The MC_WriteCamTrim_MDX function module provides the following output signals.

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

UINT Control range of the control element in inc/ms.

RegisterLoopOut DINT Specified setpoint for trimming.

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

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.

00

I

Page 98: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

98 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_WriteModuloRest_MDX function module

Description The MC_WriteModuloRest_MDX function module is used to automatically correct themodulo remainder increments. Increments will get lost with infinite division factors of thegear ratio because the cam can only process integer increments. This will lead to a driftas regards the master value.A position drift is determined and compensated cyclically with the modulo parameterstaken into operation component-internally.

Prerequisite • The LinkState output signal of the MC_LinkTecGear_MDX function module has thestatus TEC_INITIALIZED.

• The CamState output of the MC_LinkTecCam_MDX function module has the statusMDX_CAM_MAINCURVE.

• Previous initialization of the modulo numerator and denominator factors using theMC_SetModuloParameters_MDX function module.

• Mapping the SlaveCycle to the defined modulo 360° resolution.

Input signals The following input signals can be set on the MC_WriteModuloRest_MDX functionmodule.

Output signals The MC_WriteModuloRest_MDX function module provides the following output signals.

61779AXX

MC_WRITEMODULOREST_MDX

Enabled : BOOLEnable : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : UINT

Error : BOOL

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

00

I

Page 99: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 99

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_AdjustCamSlave_MDX function module

Description The MC_AdjustCamSlave_MDX function module adjusts the motor axis to the specifiedmaster position prior to the startup cycle process. The actual position for the main curveresults 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 "0".• RelativeMaster = TRUE

The first curve point of the cam is assigned the modulo actual position value "0".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

61780AXX

MC_ADJUSTCAMSLAVE_MDX

Done : BOOL

Active : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

Error : BOOL

CommandAborted : BOOLUseVirtEncoder : BOOL

RelativeMaster : BOOL

MasterPosition : DINT

Velocity : DINT

Acceleration : DINT

Deceleration : DINT

ErrorID : UINT

00

I

Page 100: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

100 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Prerequisite • The LinkState output signal of the MC_LinkTecGear_MDX function module has thestatus TEC_INITIALIZED.

• Master drive at standstill.• The modulo function is activated when the input RelativeMaster = TRUE.

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.

SlaveCycle

MasterCycleMasterCycle Nr.1

Sla

veC

ycle

Nr.

1

MasterCycle Nr.2

Sla

veC

ycle

Nr.

2

[3]

[1]

[2]

[4]

00

I

Page 101: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 101

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_AdjustCamSlave_MDX functionmodule.

Output signals The MC_AdjustCamSlave_MDX function module provides the following output signals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function module when a rising edge occurs.

UseVirtEncoder BOOL • 0 = X14• 1 = VirtEncoder

RelativeMaster BOOL • 0 = 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 3000 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 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.

00

I

Page 102: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

102 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamInDirect_MDX function module

Description The MC_CamInDirect_MDX function module is used to directly start the startup cycleprocess. The startup cycle mode is reset. The following status variables are changed bythe 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 statusGEN_TEC_INITIALIZED.

• The CamState output of the MC_LinkTecCam_MDX function module has the statusMDX_CAM_RESET or MDX_CAM_STOP.

Input signals The following input signals can be set on the MC_CamInDirect_MDX function module.

Output signals The MC_CamInDirect_MDX function module provides the following output signals.

61784AXX

MC_CamInDirect_MDX

InGear : BOOLExecute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : UINT

Active : BOOL

CommandAborted : BOOL

Error : BOOL

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

00

I

Page 103: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 103

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamOutDirect_MDX function module

Description The MC_CamOutDirect_MDX function module is used to directly start the stop cycleprocess. The stop cycle mode is reset. The following status variables are changed bythe 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.

Output signals The MC_CamOutDirect_MDX function module provides the following output signals.

61785AXX

MC_CamOutDirect_MDX

Done : BOOLExecute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : UINT

Active : BOOL

CommandAborted : BOOL

Error : BOOL

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

00

I

Page 104: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

104 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamCalcSpline_MDX function module

Description The MC_CamCalcSpline_MDX function module calculates a spline curve based on theX/Y coordinates (X = master / Y = slave) (→ examples).

Prerequisites • Make sure that the drive is at standstill or that the curve to be calculated is notselected.

• You can activate the corresponding table in MOVIDRIVE® using theMC_CamTableSelect function module.

61919AXX

MC_CAMCALCSPLINE_MDX

Number_of_Points : BYTE

Done : BOOLExecute : BOOL

Spline_P : ARRAY_OF_SPLINE_POINT Error : BOOL

Busy : BOOL

ErrorID : UDINT

INFO : DINT

Mode : UINT

Submode : UINT

V0 : REAL

A0 : REAL

Vn : REAL

An : REAL

Table_0_5 : UINT

MasterCycleScale : DINT

Axis : AXIS_REF (VAR_IN_OUT)

00

I

Page 105: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 105

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Examples Curve example 1:• Input Number_of_Points = 9• Input Mode = 0 → Spline_0

Spline_P[0]

Spline_P[1]

Spline_P[2]

Spline_P[3]

Spline_P[4]

Spline_P[5]

Spline_P[6]

Spline_P[7]

Spline_P[8]

X 0 10 20 200 256 312 492 502 512

Y 0 0 0 1024 4096 1024 0 0 0

61923AXX

Y = Slave

32768

8192

-8368

Mode=0=Spline_0

256 5120

X = Master

00

I

Page 106: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

106 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Curve example 2:• Input Number_of_Points = 9• Input Mode = 1 → Spline_B (submode = 7)

Spline_P[0]

Spline_P[1]

Spline_P[2]

Spline_P[3]

Spline_P[4]

Spline_P[5]

Spline_P[6]

Spline_P[7]

Spline_P[8]

X 0 10 20 200 256 312 492 502 512

Y 0 0 0 1024 4096 1024 0 0 0

61924AXX

Y = Slave

14638

Mode=1=Spline_B

256 5120

X = Master

00

I

Page 107: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 107

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Curve example 3:• Input Number_of_Points = 9• Input Mode = 2 → Spline_1

Tasks of the function module (applies to all examples):• Calculation of curves based on 3 ... 30 coordinate points. The coordinates are trans-

ferred with an array. The table curve points of the master on the x-axis are located inthe range from 0 ... 512. The y-axis includes the positions of the slave.

• The MasterNorm output is adjusted according to the value of the MasterCycleScaleinput.Example: Input MasterCycleScale = 36000 → Output MasterNorm = 1MasterNorm < MasterCycleScale/32768). The factor calculated at the MasterNormoutput is issued.

• Position scaling is adjusted according to the highest y-value. The calculated factor isoutput.

• The slave coordinates (Y0 ... Y29) are multiplied by factor 2ActPositionScale.Example: Y4 = 4096, input ActPositionScale = 4 → Y4_intern = 4096×24 = 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.

Spline_P[0]

Spline_P[1]

Spline_P[2]

Spline_P[3]

Spline_P[4]

Spline_P[5]

Spline_P[6]

Spline_P[7]

Spline_P[8]

X 0 10 20 200 256 312 492 502 512

Y 0 0 0 1024 4096 1024 0 0 0

61925AXX

Y = Slave

32768

8192

Mode=2=Spline_1

256 5120

X = Master

00

I

Page 108: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

108 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

• The curve is loaded according to the table selected in MOVIDRIVE®. The functionmodule has an internal array of 513 curve points in accordance with theMOVIDRIVE® configuration.

• The scaling parameters H30 ... H89 are written accordingly.

Input signals The following input signals can be set on the MC_CamCalcSpline_MDX functionmodule.

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

Spline_P ARRAY [0 ... 29] OFSPLINE_POINT

Number of coordinate points:• Spline_X = Master position (0 ... 512)• Spline_Y = Slave position

Mode UINT • Mode 0 = Spline_0 (cubic spline)• Mode 1 = Spline_B (→ submode)• Mode 2 = Spline_1 (Akima interpolation)

Submode UINT Only for mode 1= Spline_B:• 0 = 3rd order polynomial (cubic) for calculation• 1 = Not supported• 2 = 2rd order polynomial (square)• 3 = 3rd order polynomial (cubic)• .. = ...• 7 = 7th order polynomial

V0 REAL Velocity in the start point of the curve.

A0 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_0_5 UINT Selection of curve 0 ... 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.

00

I

Page 109: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 109

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

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.

INFOVmax

Vmin

AbsVmax

Amax

Amin

AbsAmax

MasterNorm

ActPositionScale

State

DINT

DINT

DINT

DINT

DINT

DINT

UINT

UINT

BYTE

Current curve status:Maximum velocity V(i) = Y(i+1) within the cam.

Minimum velocity V(i) = Y(i+1) – Y(i) within the cam.

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.

Minimum acceleration A(i) = V(i) – V(i–1) within the cam.

Maximum value of the acceleration A(i) = V(i) – V(i–1) within the cam.

Master scale factor.

Position scaling.

Processing status.

00

I

Page 110: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

110 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamCalcRtoR_MDX function module

Description The MC_CamCalcRtoR_MDX function module calculates a curve based on the X/Ycoordinates (X = master / Y = slave) (→ examples). The curve is made up of a numberof 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 se-lected.

• You can activate the corresponding table in MOVIDRIVE® using theMC_CamTableSelect function module.

61920AXX

MC_CAMCALCRtoR_MDX

Number_of_Points : BYTE

Done : BOOLExecute : BOOL

X2 : DINT Error : BOOL

Busy : BOOL

ErrorID : UDINT

INFO : DINT

Y2 : DINT

X3 : DINT

Y3 : DINT

X4 : DINT

Y4 : DINT

X5 : DINT

Y5 : DINT

X6 : DINT

Axis : AXIS_REF (VAR_IN_OUT)

Y6 : DINTFunctionNo : UINT

Table_0_5 : UINT

00

I

Page 111: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 111

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

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.

61921AXX

X1/Y1

Y = Slave

X = Master

X2/Y2 X3/Y3 X4/Y4 X5/Y5 X6/Y6

00

I

Page 112: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

112 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

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.

61914AXX

X1/Y1

Y = Slave

X = Master

X2/Y2 X3/Y3 X4/Y4 X5/Y5 X6/Y6

00

I

Page 113: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 113

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

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.

Tasks of the function module (applies to all examples):• Calculation of curves based on 2 ... 6 coordinate points. The curve always begins at

0/0 (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 = 36000 → Output MasterNorm = 1MasterNorm < MasterCycleScale/32768). The factor calculated at the MasterNormoutput is issued.

• Position scaling is adjusted according to the highest y-value. The calculated factor isoutput.

• The slave coordinates (Y2 ... Y6) are multiplied by factor 2ActPositionScale.Example: Y4 = 4096, input ActPositionScale = 5 → Y4_intern = 4096×25 = 131072(ActPositionScale < 131072/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 theMOVIDRIVE® configuration.

• The scaling parameters H30 ... H89 are written accordingly.

61922AXX

X1/Y1

= Slave

X = Master

X2/Y2 X3/Y3 X4/Y4

00

I

Page 114: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

114 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_CamCalcRtoR_MDX function module.

Output signals The MC_CamCalcRtoR_MDX function module provides the following output signals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule 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:• 0 = Even• 1 = 5th order polynomial• 2 = Sine• 3 = 3rd order polynomial• 4 = Sinoids from Bestehorn• 5 = Modifed acceleration trapezoid

Table_0_5 UINT Selection of curve 0 ... 5

Axis AXIS_REF This input specifies the motor axis on which the actions of the function module are to be executed.

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

Vmax

Vmin

AbsVmax

Amax

Amin

AbsAmax

MasterNorm

ActPositionScale

State

dINT

DINT

DINT

DINT

DINT

DINT

UINT

UINT

BYTE

Current curve status:Maximum velocity V(i) = Y(i+1) within the cam.

Minimum velocity V(i) = Y(i+1) – Y(i) within the cam.

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.

Minimum acceleration A(i) = V(i) – V(i–1) within the cam.

Maximum value of the acceleration A(i) = V(i) – V(i–1) within the cam.

Master scale factor.

Position scaling.

Processing status.

00

I

Page 115: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 115

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

MC_CamCalcRtoR50_MDX function module

Description The MC_CamCalcRtoR50_MDX function module calculates a curve based on X/Ycoordinates (X = master / Y = slave) (→ Examples). The curve is made up of up to 50sequences. 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 notselected.

• You can activate the corresponding table in MOVIDRIVE® using theMC_CamTableSelect function module.

Example Curve example:• Input Number_of_Points = 36

– Rest-to-rest motion with 8 cycles and subsequent backward movement to themechanical starting point.

– The curve points are entered via an array:gRtoR: ST_RtoR; (* Array to specify the curve points *)

62014AXX

MC_CAMCALCRtoR50_MDX

Number_of_Points : BYTE

Done : BOOLExecute : BOOL

RtoR : ST_RtoR Error : BOOL

Busy : BOOL

ErrorID : UDINT

INFO : DINTAxis : AXIS_REF (VAR_IN_OUT)

FunctionNo : UINT

Table_0_5 : UINT

62015AXX

00

I

Page 116: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

116 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Tasks of the function module:• Calculate curves with a minimum of 2 and a maximum of 50 coordinate points. The

curve always begins at 0/0 (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 = 36000 → Output MasterNorm = 1MasterNorm < MasterCycleScale/32768). The factor calculated at the MasterNormoutput is issued.

• Position scaling is adjusted according to the highest y-value. The calculated factor isoutput.

• The slave coordinates (Y2 ... Y50) are multiplied by factor 2ActPositionScale.Example: Y4 = 4096, input ActPositionScale = 5 → Y4_intern = 4096×25 = 131072(ActPositionScale < 131072/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 theMOVIDRIVE® configuration.

• The scaling parameters H30 ... H89 are written accordingly.

62016AXX

X = Master

Y = Slave

00

I

Page 117: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 117

4Overview of the MPLCTecCamMotion_MDX libraryMPLCTecCamMotion_MDX

Input signals The following input signals can be set on the MC_CamCalcRtoR50_MDX functionmodule.

Output signals The MC_CamCalcRtoR50_MDX function module provides the following output signals.

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

Number_of_Points BYTE Number of coordinate curve points

RtoR ST_RtoR Array with a maximum of 50 input values for:• x = Master position• y = Slave position

FunctionNo UINT FunctionNo:• 0 = Even• 1 = 5th order polynomial• 2 = Sine• 3 = 3rd order polynomial• 4 = Sinoids from Bestehorn• 5 = Modifed acceleration trapezoid

Table_0_5 UINT Selection of curve 0 ... 5

Axis AXIS_REF This input specifies the motor axis on which the actions of the function module are to be executed.

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.

INFOVmin

Vmin

AbsVmax

Amax

Amin

AbsAmax

MasterNorm

ActPositionScale

State

DINT

DINT

DINT

DINT

DINT

DINT

UINT

UINT

BYTE

Current curve status:Maximum velocity V(i) = Y(i+1) within the cam.

Minimum velocity V(i) = Y(i+1) – Y(i) within the cam.

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.

Minimum acceleration A(i) = V(i) – V(i–1) within the cam.

Maximum value of the acceleration A(i) = V(i) – V(i–1) within the cam.

Master scale factor.

Position scaling.

Processing status.

00

I

Page 118: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

118 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 AppendixMPLCTecCamMotion_MDX

4.4 Appendix4.4.1 Abortion of function modules (CommandAborted output signal)

The CommandAborted output signal is used to signal that a movement module wascalled several times (MC_Move ...) or another movement module was called. Theaborted job will not be executed anymore (→ "MPLCMotion_MDX andMPLCMotion_MX Libraries for MOVI-PLC®" manual).

Activated function module Creates CommandAborted to

MC_CamInDirect_MDX• Instances of MC_CamInDirect_MDX• MC_Move function modules• MC_CamOutDirect_MDX

MC_CamOutDirect_MDX• Instances of MC_CamOutDirect_MDX• MC_CamOutDirect_MDX• MC_PrepareCamOut_MDX

MC_PrepareCamIn_MDX• Instances of MC_PrepareCamIn_MDX• MC_GearInDirect_MDX• MC_CamInDirect_MDX

MC_PrepareCamOut_MDX • Instances of MC_PrepareCamOffset_MDX• MC_CamOutDirect_MDX

Function module of the MPLCMotion_MDX library

• MC_CamInDirect_MDX• MC_PrepareCamIN_MDX• MC_CamOutDirect_MDX• MC_PrepareCamOut_MDX

00

I

Page 119: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 119

4AppendixMPLCTecCamMotion_MDX

The following figure shows a schematic view of the mutual abortion conditions whenCommandAborted is issued (CA).

61787AEN

Modules fromMPLCMotion_MDX

- MC_MoveVelocity_MDX

- MC_MoveAbsolute_MDX

- MC_MoveRelative_MDX

- MC_Home_MDX

MC_CamInDirect_MDX

MC_PrepareCamIn_MDX

MC_CamOutDirect_MDX

MC_PrepareCamOut_MDX

New instance:CA to previous

New instance:CA to previous

New instance:CA to previous

New instance:CA to previous

Call createsCA

Call createsCA

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

00

I

Page 120: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

120 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

4.5 Cam examples4.5.1 Example 1: Curve design with the Motion Technology Editor

• In MOVITOOLS® MotionStudio, start the Motion Technology Editor (→ followingfigure).

61788AEN

00

I

Page 121: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 121

4Cam examplesMPLCTecCamMotion_MDX

• In the Motion Technology Editor (→ following figure), select the "Startup for MOVI-PLC" checkbox [1]. System variables will be stored remanently and can be adoptedby the MC_CamTableSelect_MDX function module.

• From the "No. of curves" selection list [2], choose the number of curves (→ followingfigure) and perform startup of the individual curves one after the other. Click the <Setup curve 1> button to set the general curve parameters.

61789AEN

[1]

[2]

00

I

Page 122: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

122 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

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

Example without startup cycle curve:– Number of curve points = 512– Startup cycle = 0– Master cycle = 50000

Example with startup cycle curve:– Number of curve points = 256– Startup cycle = 20000– Master cycle = 50000

• Click <Next> to continue.

61790AEN

[2]

[1]

00

I

Page 123: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 123

4Cam examplesMPLCTecCamMotion_MDX

• Combine the individual segments to create the curve (→ following figure).

61791AEN

00

I

Page 124: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

124 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

• For special applications (using the MC_SeTCamConfig_MDX function moduleinstead of the MC_CamTableSelct_MDX function module), the following IPOSplus®

variables have to be adopted (→ following figure):– H431 MasterNorm– H432 MasterCycleScale– H433 StartupCycleScale– H440 ActualPositionScale– H443 NFilter– H444 DirectionBlock– H446 MFilter

• Click <Next> to load the curve parameters to the inverter.

61792AEN

00

I

Page 125: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 125

4Cam examplesMPLCTecCamMotion_MDX

• Click <Download> to finish startup of the cam control (→ following figure).

61793AEN

00

I

Page 126: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

126 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

4.5.2 Example 2: Creating PLC user program

Integrating MPLCTecCam-Motion_MDX.lib library

• Select [Ressources] / [Library Manager] to integrate theMPLCTecCamMotion_MDX.lib library (→ following figure):

61794AEN

00

I

Page 127: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 127

4Cam examplesMPLCTecCamMotion_MDX

Example program MC_CamTableSelect_MDX with virtual encoder

The following figure shows the programming of the function modules for controlling thecam in the free-wheeling task.

61805AXX

00

I

Page 128: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

128 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

The following figure shows the programming of the function modules for controlling thevirtual encoder (5 ms task).

61807AXX

00

I

Page 129: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 129

4Cam examplesMPLCTecCamMotion_MDX

Example program MC_SetCamConfig_MDX with incremental master value

61808AXX

00

I

Page 130: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

130 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

Step 1: Creating the virtual encoder in the 5 ms task

61730AXX

00

I

Page 131: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 131

4Cam examplesMPLCTecCamMotion_MDX

Step 2: Creating and configuring the slave

61731AXX

00

I

Page 132: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

132 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

4.5.3 Programming notes

61809AEN

MC_TableSelect_MDX

Job:

Automatic re-copying of the startup

parameters of the CamEditor

MC_LinkTecCam_MDX

Job:

Logical axis connection to the technology function

Electronic cam

Outputs

LinkState: Status message LinkTecCam

CamState: Status message CamState

MC_SetCamConfig_MDX

Job:

Manual re-copying of the input parameters

Done: Preparation/parameter download

completed

MC_CamInDirect_MDX

Job: Start of the startup cycle process

InGear: Main curve active

MC_PrepareCamIn_MDX

Job: Selection of SEW-specific startup cycle

modes (e.g. interrupt-controlled)

Done: Preparation/parameter download

completed

AutoConfig NO

YES

LinkState > GEN_TEC_RESET

Direct engaging NO

YES

LinkState = GEN_TEC_INITIALISED

MC_CamOutDirect_MDX

Job: Start of the stopy cycle process

OutOfGear: CamFunction deactivated

MC_PrepareCamOut_MDX

Job: Selection of SEW-specific stop cycle

modes (e.g. interrupt-controlled)

Done: Preparation/parameter download

completed

Direct

disengagingNO

YES

00

I

Page 133: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 133

4Cam examplesMPLCTecCamMotion_MDX

4.5.4 Diagnostic functions in the Motion Technology Editor

Curve design with Motion Tech-nologie Editor

• In MOVITOOLS® MotionStudio, start the Motion Technology Editor. From the menu,choose "Monitor an existing curve application" (→ following figure).

61810AEN

00

I

Page 134: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

134 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

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

61811AEN

00

I

Page 135: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 135

4Cam examplesMPLCTecCamMotion_MDX

4.5.5 Operation with virtual master encoder

Advantages • The MPLCMotionVirtualEncoder library for controlling the virtual master encoder cal-culated in the MOVI-PLC® is available.

• Simple and central control of the virtual master encoder as replacement of themechanical 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 indepen-dent 5 ms task. The example also shows the settings on the MC_CamTableSelect_MDXfunction 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 exam-ple, the PLC_VE_PRG program was appended to the task. The main programPLC_PRG runs in the free-wheeling task in the example.

61812AEN

00

I

Page 136: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

136 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

• Select [Resources] / [Library Manager] from the menu to insert the MPLCVirtual-Encoder library

• Call the MC_LinkTecAxis_Virtual function module in the PLC_VE_PRG program. Atthe CycleTime input, enter the value "5" (→ following figure).

• Program the setpoints for the virtual encoder. In the example, theMC_MoveVelocity_Virtual function module is used for specifying an endless position(→ following figure).

61813ADE

61814AXX

61815AXX

00

I

Page 137: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 137

4Cam examplesMPLCTecCamMotion_MDX

• On the MC_CamTableSelect_MDX function module, set the UseVirtEncoder input toTRUE.

61816AXX

00

I

Page 138: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

138 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 Cam examplesMPLCTecCamMotion_MDX

4.5.6 Axis driver AxisControlCam for cam applications

An axis driver is available to increase the diagnostics capability of MOVI-PLC® applica-tions programmed by the customer. The axis driver isolates the drive functionality andmakes 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

61817AXX

AxisControlCam

SBUs_Address

RequestedAxisMode

ActualAxisMode

Node

Power

Reset

Powered

Connected

PowerOffMode

QuickStop

AxisMode

Start

JogPos

JogNeg

HControl

Done

Active

AxisError

AxisErrorID

FBError

FBErrorID

Axis

PLCopenState

InverterData

LinkState

CamState

InGear

Position

Velocity

Acceleration

Deceleration

StartRisingEdge

ModuloMode

UseVirtEncoder

Table

00

I

Page 139: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 139

4AppendixMPLCTecCamMotion_MDX

4.6 Appendix4.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 theMFilterTime input. The setting at the MFilterTime input has a linear effect on the follow-ing parameters:• MasterCycle scale• MasterNorm• When using a startup cycle curve:

– StartupCycleScale– StartupCycleCounterMaxValue

The following figure shows the input wiring of the MC_SetCamConfig_MDX functionmodule prior to adjustment (input MFilterTime = 1, i.e. no filter activated).

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 virtualencoder, the setpoint of which is received in the drive inverter every 5 ms, is created asmaster 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 (H432MasterCycleScale). The master cycle must also be increased by this factor.

• Adjusting the MasterNormThe subsequent control calculation determines whether increasing the master cyclemust be taken into account by adjusting the scaling factor of the master cycle. Acheck is performed during the calculation whether the internal range of representa-tion of 216–1 is violated.

61818AXX

MC_SetCamConfig_MDX

MasterCountDirection

Done

Busy

Execute

MasterCycleScale

StartupCycleScale

ErrorID

Error

MasterNorm SetCamConfigErrorID

SetCamConfigError

SetCamConfigBusy

SetCamConfigDone

ActualPositionScale

NFilterTime

DirectionBlock

MFilterTime

Axis

bSetCamConfig

FALSE

MDX_CAM_MASTER_X14

1

50000

0

5

7

0

1

MasterSource

LogAdrA1

00

I

Page 140: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

140 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 AppendixMPLCTecCamMotion_MDX

Calculation • MasterCycleScale (old) / 215 = 50000 / 215 = 1.53 <21

The value "1" was determined at startup of the Motion Technology Editor.

• MasterCycleScale (new) / 215 = 25000 /215 = 7.63 < 23

This means the value "3" at the MasterNorm input has to be adjusted.

The calculations lead to the following results:

61854AXX

MC_SetCamConfig_MDX

MasterCountDirection

Done

Busy

Execute

MasterCycleScale

StartupCycleScale

ErrorID

Error

MasterNorm SetCamConfigErrorID

SetCamConfigError

SetCamConfigBusy

SetCamConfigDone

ActualPositionScale

NFilterTime

DirectionBlock

MFilterTime

Axis

bSetCamConfig

FALSE

MDX_VIRTUAL_ENCODER_ID1

3

25000

0

5

7

0

5

MasterSource

LogAdrA1

Input designation Values from the Motion Technology Editor

Values after adjustment

MFilterTime 1 Adjusted 5

MasterCycle scale 50000 Calculated 25000

MasterNorm 1 Calculated 3

00

I

Page 141: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 141

4AppendixMPLCTecCamMotion_MDX

4.6.2 Read / write a curve set via the VarData service

It might be necessary for specific applications to extend the options for changingbetween 6 curves. The SbusHandleCamDate function module from theMPLCInterface_Can library can be integrated to allow for handling centrally calculatedcurve 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).

• Open the library MPLCInterface_Can and insert the SBusHandleCamDate functionmodule.

• Call the SBusHandleCamData function module. The PointerDate input must havebeen created using the structure aPointerData : ARRAY [0...512] OF DINT; (→following figure).

• You can choose the following settings at the Service input:– ML_VD_SVC_READ_EEPROM– ML_VD_SVC_WRITE– ML_VD_SVC_READ_RAM

61855AEN

61856AXX

SBusHandleCamData

Node

Done

Busy

Execute

Service

PointerData

ErrorID

Error

Channel SBusErrorID

SBusError

SBusBusy

SBusDone

CurveNumber

DataLength

TimeMax

DI.1

1

2

ML_VD_SVC_READ_EEPROM

ADR(aPointerData)

nSBUsCurve

513

50

SBusAddress

SBUS_NODE_1

MvlReturnCode

RequestCount

DataLengthOut

SBusMvLReturnCode

SBusReqCount

SBusDataLength

00

I

Page 142: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

142 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

4 AppendixMPLCTecCamMotion_MDX

4.6.3 Allocation of the remanent IPOSplus® variables and scaling factors

When performing startup with the Motion Technology Editor, the scaling factors belong-ing to the selected curve are saved in the remanent IPOSplus® memory area of the driveinverter. The following table shows to which variable (H..) of the inverter the scalingfactors will be saved.

NOTEThe curve points should always be managed via this function module.Download via the parameter data channel of the drive inverter is not recommendedbecause of the required cycle time and the exclusive limitation to the first curve.

Curve 1 Curve 2 Curve 3 Curve 4 Curve 5 Curve 6

Master scale factor.H431 MasterNorm

H30 H40 H50 H60 H70 H80

Scaled master cycleH432 MasterCycleScale

H31 H41 H51 H61 H71 H81

Scaled startup cycleH433 StartupCycleScale

H32 H42 H52 H62 H72 H82

Position scalingH440 ActPositionScale

H33 H43 H53 H63 H73 H83

NFilterH443 NFilterTime

H34 H44 H54 H64 H74 H84

BackstopH444 ReSprintClose

H35 H45 H55 H65 H75 H85

MFilterH446 MFilterTime

H36 H46 H56 H66 H76 H86

Reserved H37 H47 H57 H67 H77 H87

Reserved H38 H48 H58 H68 H78 H88

Reserved H39 H49 H59 H69 H79 H89

00

I

Page 143: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 143

5IntroductionMPLCTecCamSwitch_MDX

5 MPLCTecCamSwitch_MDX5.1 Introduction

The MPLCTecCamSwitch_MDX library is based on the technology function "Camcontroller" of the MOVIDRIVE® B drive inverter. The following simplifications wereachieved 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 withoutdetailed knowledge of the individual firmware functions.

5.2 Areas of applicationThe MPLCTecCamSwitch_MDX library is suited for applications where hardware out-puts 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 DO02 to DO05 of the MOVIDRIVE® B basicunit and DO10 to DO13 with MOVIDRIVE® B with DIP11B o DIO11B option) can beconfigured with 4 cams each (switching ranges). The binary outputs must be config-ured with parameters P62x and P63x to IPOS output in the parameter tree of theMOVITOOLS® MotionStudio.

• The response time of the cam channels (tz) is 1 ms for binary outputs DO02 to DO05and 5 ms for binary outputs DO10 to DO13.

• Each cam channel takes account of the delay (switching delay) of the connectedactuator. In this way the switching position is corrected depending on the velocity(quantization 0.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

NOTEAdditional documentation:• For general notes on the functioning of the library, refer to the "MPLCMotion_MDX

and MPLCMotion_MX Libraries for MOVI-PLC®" manual.• "IPOSplus®" manual

00

I

Page 144: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

144 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Project planningMPLCTecCamSwitch_MDX

5.3 Project planning5.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 standardversion (..00) is sufficient as drive inverter.

• The MPLCTecCamSwitch_MDX library must be inserted in the project in addition tothe 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

• MC_ForceCamSwitchChannel_MDX function moduleThe MC_ForceCamSwitchChannel_MDX function module is used to set and clearoutputs independent of the cam controller.

• MC_LinkTecCamSwitch_MDX function moduleThe MC_LinkTecCamSwitch_MDX function module constitutes the interfacebetween technology function "Cam controller" and motor axis and must therefore becalled cyclically in the program. Once the MC_ConnectAxis_MDX function modulehas established the connection with the motor axis, theMC_LinkTecCamSwitch_MDX function module activates the cam controller technol-ogy function on the respective motor axis.

• MC_SetCamSwitchConfig_MDX function moduleThe MC_SetCamSwitchConfig_MDX function module is used to configure the camcontroller. This function module must be called with a rising edge at the Execute inputwhen the MOVI-PLC® controller is started, or when you want to change the param-eters of the cam controller.

• MC_StartCamSwitch_MDX function moduleThe MC_StartCamSwitch_MDX function module is used to activate the cam control-ler.

• MC_StopCamSwitch_MDX function moduleThe MC_StopCamSwitch_MDX function module is used to deactivate the camcontroller.

61860AXX

00

I

Page 145: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 145

5Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

5.4.1 Data types of the MPLCTecCamSwitch_MDX library

You find the data types of the MPLCTecCamSwitch_MDX library in the libraryMPLCDatatypes.

• Data type MC_CAMSWITCH_AREAS_MDXThe cam width of the four cams is specified in this structure. The structure is passedto the MC_SetCamSwitchConfig_MDX function module on the Areas input.

61861AXX

61862AXX

61863AXX

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

[1]

[2]

[3]

[4]

[5]

[6]

00

I

Page 146: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

146 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

• Data type MC_CAMSWITCH_FORCEORDER_MDXThis enumeration specifies to which value the output is to be set independent of thecam controller.

• Data type MC_CAMSWITCH_SOURCE_MDXThis data type is used to define the source of the cam controller.

• Data type MC_CAMSWITCH_STATE_MDXThis enumeration is used to display the current status of the cam controller.

61864AXX

61865AXX

61866AXX

00

I

Page 147: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 147

5Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

5.4.2 Restore function for saving the MOVIDRIVE® system variables

The MPLCTecCamSwitch_MDX library provides an initialization service. You canconfigure this service via the InitService input of the MC_LinkTecCamSwitch functionmodule. • Service GEN_RESTORE_SERVICE

Once an axis fault has been acknowledged, the last configuration of the cam will beautomatically transferred to MOVIDRIVE® B. The MC_SetCamSwitchConfig_MDXfunction module must not be called again.

• Service GEN_RESET_SERVICEThe configuration of the technology function is deleted when an axis fault has beenacknowledged. To reconfigure the cam controller, you have to call theMC_SetCamSwitchConfig_MDX function module.

• Service GEN_NO_SERVICEThe configuration of the technology function is not initialized when an axis fault hasbeen acknowledged. To reconfigure the cam controller, you have to call theMC_SetCamSwitchConfig_MDX function module.

00

I

Page 148: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

148 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

5.4.3 Function modules of the MPLCTecCamSwitch_MDX library

MC_LinkTecCamSwitch_MDX function module

Description The MC_LinkTecCamSwitch_MDX function module constitutes the logical interfacebetween the motor axis and the technology function "Cam controller". When theMC_ConnectAxis_MDX function module has established cyclic communication with themotor axis, the initialization service selected at the InitService input will be performed.The technology function "Cam controller" is linked when the output LinkState is unequalGEN_TEC_NOTLINKED.

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.

61867AXX

MC_LINKTECCAMSWITCH_MDX

InitService : MC_LINKTEC_INITSERVICE

Done : BOOLEnable : BOOL

Axis : AXIS_REF (VAR_IN_OUT) ErrorID : DWORD

Error : BOOL

LinkState : MC_LINKTECSTATE

CamSwitchState : MC_CAMSWITCH_STATE_MDX

Axis : AXIS_REF (VAR_IN_OUT)

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.

00

I

Page 149: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 149

5Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

Input signals The following input signals can be set on the MC_LinkTecCamSwitch_MDX functionmodule.

Output signals The MC_LinkTecCamSwitch_MDX function module provides the following outputsignals.

Input signal Type Meaning

Enable BOOL The function module is processed as long as the input sig-nal 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 con-

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

cessful)

CamSwitchState MC_CAMSWITCH STATE

Current status of the technology functionMDX_CAMSWITCH_INACTIVEMDX_CAMSWITCH_ACTIVE

00

I

Page 150: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

150 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

The following figure shows the state diagram of the LinkState output.

• The state transitions 1, 2 and 3 are triggered by the MC_LinkTecCamSwitch_MDXfunction module. One of the three states is assumed once the logical connection tothe motor axis has been established independent of the initialization service at theInitService input.– GEN_TEC_NOTINITIALIZED– GEN_TEC_RESETED– GEN_TEC_RESTORED

61868AXX

INITIALIZED

RESTORED

NOTINITIALIZED RESETED

NOTLINKED

2

13

4

5

6

00

I

Page 151: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 151

5Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

• State transitions 4, 5 and 6 are triggered by the MC_SetCamSwitchConfig_MDXfunction module. This function module initializes and writes the parameters of one ofthe four cam channels. When the function module is executed for the first time afterthe logical connection to the motor axis has been established, the function modulewill trigger one of the three state transitions. The technology function "Cam control-ler" is then in the state GEN_TEC_INITIALIZED.

• The cam controller can only be activated when the required parameters have beeninitialized. The MC_StartCamSwitch_MDX function module can therefore only beexecuted without errors if the LinkState output has one of the two valuesGEN_TEC_RESTORED or GEN_TEC_INITIALIZED.

• As long as the LinkState output has the value GEN_TEC_NOTLINKED, an errormessage will be issued each time a technology module of the cam function isexecuted.

00

I

Page 152: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

152 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

MC_SetCamSwitchConfig_MDX function module

Description The MC_SetCamSwitchConfig_MDX function module is used to configure a cam chan-nel (i.e. the binary output of MOVIDRIVE® B). An instance of theMC_SetCamSwitchConfig_MDX function module should be integrated in the programfor each cam channel.The MC_SetCamSwitchConfig_MDX function module changes among others thefollowing 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 functionmodule.

61869AXX

MC_SETCAMSWITCHCONFIG_MDX

Select : MC_DIGITALOUTPUTS_MDX

Done : BOOLExecute : BOOL

PredictionTime : UINT

ErrorID : DWORD

Error : BOOL

NumberOfCams : UINT

Areas : MC_CAMSWITCH_AREAS_MDX

Axis : AXIS_REF (VAR_IN_OUT)

Axis : AXIS_REF (VAR_IN_OUT)

Busy : BOOL

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

Select MC_DIGITALOUTPUTS_MDX

Selection of the cam channel:• MDX_DO02: Binary output DO02 (X10.x)• MDX_DO03: Binary output DO03 (X16.3)• MDX_DO04: Binary output DO04 (X16.4)• MDX_DO05: Binary output DO05 (X16.5)• MDX_DO10: Binary output DO10

(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 100 μs, value range 0 ... 500Example: PredictionTime = 100 corresponds to 10 ms

NumberOfCams UINT Number of cams per channel. Value range 0 ... 4If NumberOfCams = 0, 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.

00

I

Page 153: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 153

5Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

Output signals The MC_SetCamSwitchConfig_MDX function module provides the following outputsignals:

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.

00

I

Page 154: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

154 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

MC_StartCamSwitch_MDX function module

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

Output signals The MC_StartCamSwitch_MDX function module provides the following output signals.

61871AXX

MC_STARTCAMSWITCH_MDX

CamSwitchSource : MC_CAMSWITCH_SOURCE_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

CommandAborted : BOOL

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

EncoderSource MC_CAMSWITCH_-SOURCE_MDX

Specification of the encoder source with which the cam con-troller 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 (H301)• MDX_CAMSWITCH_SOURCE_PDO_2:

PDO from system bus (H302)• MDX_CAMSWITCH_SOURCE_PDO_3:

PDO from system bus (H303)• MDX_CAMSWITCH_SOURCE_PDO_4:

PDO from system bus (H304)

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

Output signal Type Meaning

Done BOOL The output indicates that the technology function "Cam con-troller" is active. The state CamSwitchState changes to MDX_CAMSWITCH_ACTIVE

Busy BOOL The output indicates that the function module of the cam con-troller starts.

Error BOOL Error in function module during execution.

ErrorID UINT → "Libraries for MOVI-PLC®– Fault Codes" manual.

00

I

Page 155: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 155

5Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

MC_StopCamSwitch_MDX function module

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

Output signals The MC_StartCamSwitch_MDX function module provides the following output signals.

61872AXX

MC_STOPCAMSWITCH_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

CommandAborted : BOOL

Input signal Type Meaning

Execute BOOL The Execute input signal starts the job of the function mod-ule when a rising edge occurs.

Axis AXIS_REF Logical address of the motor axis that is to addressed by the function module.

Output signal Type Meaning

Done BOOL The output indicates that the technology function "Cam con-troller" 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.

00

I

Page 156: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

156 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

5 Overview of the MPLCTecCamSwitch_MDX libraryMPLCTecCamSwitch_MDX

MC_ForceCamSwitchChannel_MDX function module

Description The MC_ForceCamSwitchChannel_MDX function module defines the way in which theoutput is to be set independent of the cam controller.

Input signals The following input signals can be set on the MC_ForceCamSwitchChannel_MDX func-tion module.

Output signals The MC_ForceCamSwitchChannel_MDX function module provides the following outputsignals.

61873AXX

MC_FORCECAMSWITCHCHANNEL_MDX

Select : MC_DIGITALOUTPUTS_MDX

Done : BOOL

Busy : BOOL

Execute : BOOL

Axis : AXIS_REF (VAR_IN_OUT) ErrorID : DWORD

Error : BOOL

Axis : AXIS_REF (VAR_IN_OUT)

Order : MC_CAMSWITCH_FORCEORDER_MDX

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_DO02: Binary output DO02 (X10.7)• MDX_DO03: Binry output DO03 (X16.3)• MDX_DO04: Binary output DO04 (X16.4)• MDX_DO05: Binary output DO05 (X16.5)• MDX_DO10: Binary output DO10

(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_LOWFORCEThe output is set fixed to low level.

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

00

I

Page 157: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 157

6Index

6 IndexCCommunication times .......................................144

EExclusion of liability ...............................................5GGeneral Information ..............................................5General notes

Exclusion of liability ........................................5Limited warranty .............................................5Structure of the safety notes ..........................5

IImportant notes

General safety notes for bus systems ............6Hoist applications ...........................................6

MMPLCTecCamMotion_MDX library .....................76

Aborting function modules (CommandAborted output signals) ............................................118Appendix ....................................................139Axis driver AxisControl for cam applications .........................................138Create PLC user program (example 2) ......126Curve design with the Motion Technology Editor (example 1) ................................................120Data types ....................................................79Diagnostics function with the Motion Technologie Editor ..........................133MC_AdjustCamSlave_MDX function module ............................................99MC_CamCalcRtoR_MDX function module 110MC_CamCalcRtoR50_MDX function module ..........................................115MC_CamCalcSpline_MDX function module ..........................................104MC_CamInDirect_MDX function module ...102MC_CamOutDirect_MDX function module .103MC_CamTableSelect_MDX function module ............................................87MC_LinkTecCam_MDX function module .....83MC_PrepareCamIn_MDX function module ..92MC_PrepareCamOutMDX function module .94MC_RestartCamIn_MDX function module ...91MC_SetCamConfig_MDX function module ..89MC_WriteCamTrim_MDX function module ..96MC_WriteModuloRest_MDX function module ............................................98Operation with virtual master encoder ........135Overview ......................................................77Project planning ............................................76

MPLCTecCamSwitch_MDX library ...................143Application examples .................................143Data types ..................................................145

MC_ForceCamSwitchChannel_MDX function module ......................................... 156MC_LinkTecCamSwitch_MDX function module ......................................... 148MC_SetCamSwitchConfig_MDX function module ......................................... 152MC_StartCamSwitch_MDX function module ......................................... 154MC_StopCamSwitch_MDX function module ......................................... 155Overview .................................................... 144Project planning ......................................... 144Restore function ........................................ 147

MPLCTecGearMotion_MDX librariesAbortion of function modules (CommandAborted output signal) ................ 74

MPLCTecGearMotion_MDX library .................... 35Areas of application ..................................... 35Data types ................................................... 46MC_AutoRestartGearIn_MDX function module ........................................... 58MC_GearClearLag_MDX function module .. 65MC_GearClearLagPermanent_MDX function module ........................................... 66MC_GearInDirect_MDX function module .... 61MC_GearOffsetDirect_MDX function module ......................................................... 64MC_GearOutDirect_MDX function module . 62MC_GearState_MDX function module ........ 67MC_LinkTecGear_MDX function module .... 49MC_PrepareGearIn_MDX function module . 56MC_PrepareGearOffset_MDX function module ........................................... 59MC_SetGearConfig_MDX function module . 52MC_SetGearDynamics_MDX function module ........................................... 54MOVIDRIVE® as master sends position via SBus (example 3) ........................................ 71Offset processing ......................................... 41Overview ...................................................... 44Position-dependent startup cycle ................ 38Project planning ........................................... 36Project planning procedure .......................... 42Restore function .......................................... 48Start events for startup cycle and offset travel .................................................. 39startup cycle and offset types ...................... 36Synchronous operation with external encoder as master (example 1) ................................. 68Synchronous operation with virtual encoder as master (example 2) ................................. 69Time-related startup cycle ........................... 37

MPLCTecVirtualEncoder library ........................... 7Areas of application ....................................... 7

Page 158: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

6

158 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC®

Index

Cancellation of the function modules (CommandAborted output signal) ................33Determine address and addressing of the virtual encoder ..............................................11Example virtual encoder ...............................31Fault code .....................................................33Function modules .........................................14Introduction .....................................................7MC_LInkTecAxis_Virtual function module ....14MC_ModeSelect_Virtual function module ....16MC_MoveAbsolute_Virtual function module 19MC_MoveAbsoluteModulo_Virtual function module ..........................................................21MC_MoveRelative_Virtual function module .23MC_MoveRelativeModulo_Virtual function module ..........................................................25MC_MoveVelocity_Virtual function module ..27MC_SetActPos_Virtual function module ......29MC_SetModuloParameters_Virtual function module ..........................................................18MC_Stop_Virtual function module ................30Output data and actual values of the virtual encoder ........................................................12Overview ........................................................9Project planning ..............................................8Project planning procedure ............................8StateVirtualAxis diagram ..............................13

PPosition-dependent startup cycle ........................38Prerequisites for project planning ................ 7, 143Project planning ................................................143

RRights to claim under limited warranty ..................5

SSafety notes

Structure of the safety notes ..........................5Startup cycle and offset types .............................36

TTime-related startup cycle ...................................37

Page 159: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

07/2007 159

Address ListGermany

HeadquartersProductionSales

Bruchsal SEW-EURODRIVE GmbH & Co KGErnst-Blickle-Straße 42 D-76646 BruchsalP.O. BoxPostfach 3023 • D-76642 Bruchsal

Tel. +49 7251 75-0Fax +49 7251 75-1970http://[email protected]

Service Competence Center

Central SEW-EURODRIVE GmbH & Co KGErnst-Blickle-Straße 1 D-76676 Graben-Neudorf

Tel. +49 7251 75-1710Fax +49 7251 [email protected]

North SEW-EURODRIVE GmbH & Co KGAlte Ricklinger Straße 40-42 D-30823 Garbsen (near Hannover)

Tel. +49 5137 8798-30Fax +49 5137 [email protected]

East SEW-EURODRIVE GmbH & Co KGDänkritzer Weg 1D-08393 Meerane (near Zwickau)

Tel. +49 3764 7606-0Fax +49 3764 [email protected]

South SEW-EURODRIVE GmbH & Co KGDomagkstraße 5D-85551 Kirchheim (near München)

Tel. +49 89 909552-10Fax +49 89 [email protected]

West SEW-EURODRIVE GmbH & Co KGSiemensstraße 1D-40764 Langenfeld (near Düsseldorf)

Tel. +49 2173 8507-30Fax +49 2173 [email protected]

Electronics SEW-EURODRIVE GmbH & Co KGErnst-Blickle-Straße 42 D-76646 Bruchsal

Tel. +49 7251 75-1780Fax +49 7251 [email protected]

Drive Service Hotline / 24 Hour Service +49 180 5 SEWHELP+49 180 5 7394357

Additional addresses for service in Germany provided on request!

France

ProductionSalesService

Haguenau SEW-USOCOME 48-54, route de Soufflenheim B. P. 20185F-67506 Haguenau Cedex

Tel. +33 3 88 73 67 00 Fax +33 3 88 73 66 00http://[email protected]

Production Forbach SEW-EUROCOME Zone Industrielle Technopôle Forbach SudB. P. 30269F-57604 Forbach Cedex

Tel. +33 3 87 29 38 00

AssemblySalesService

Bordeaux SEW-USOCOME Parc d'activités de Magellan62, avenue de Magellan - B. P. 182F-33607 Pessac Cedex

Tel. +33 5 57 26 39 00Fax +33 5 57 26 39 09

Lyon SEW-USOCOME Parc d'Affaires RooseveltRue Jacques TatiF-69120 Vaulx en Velin

Tel. +33 4 72 15 37 00Fax +33 4 72 15 37 15

Paris SEW-USOCOME Zone industrielle 2, rue Denis Papin F-77390 Verneuil I'Etang

Tel. +33 1 64 42 40 80Fax +33 1 64 42 40 88

Additional addresses for service in France provided on request!

Algeria

Sales Alger Réducom 16, rue des Frères ZaghnounBellevue El-Harrach16200 Alger

Tel. +213 21 8222-84Fax +213 21 8222-84

Argentina

AssemblySalesService

Buenos Aires SEW EURODRIVE ARGENTINA S.A.Centro Industrial Garin, Lote 35Ruta Panamericana Km 37,51619 Garin

Tel. +54 3327 4572-84Fax +54 3327 [email protected]

Page 160: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

160 07/2007

Australia

AssemblySalesService

Melbourne SEW-EURODRIVE PTY. LTD.27 Beverage DriveTullamarine, Victoria 3043

Tel. +61 3 9933-1000Fax +61 3 9933-1003http://[email protected]

Sydney SEW-EURODRIVE PTY. LTD.9, Sleigh Place, Wetherill Park New South Wales, 2164

Tel. +61 2 9725-9900Fax +61 2 [email protected]

Townsville SEW-EURODRIVE PTY. LTD.12 Leyland StreetGarbutt, QLD 4814

Tel. +61 7 4779 4333Fax +61 7 4779 [email protected]

Austria

AssemblySalesService

Wien SEW-EURODRIVE Ges.m.b.H. Richard-Strauss-Strasse 24A-1230 Wien

Tel. +43 1 617 55 00-0Fax +43 1 617 55 00-30http://[email protected]

Belgium

AssemblySalesService

Brüssel SEW Caron-Vector S.A.Avenue Eiffel 5B-1300 Wavre

Tel. +32 10 231-311Fax +32 10 231-336http://[email protected]

Brazil

ProductionSalesService

Sao Paulo SEW-EURODRIVE Brasil Ltda.Avenida Amâncio Gaiolli, 50Caixa Postal: 201-07111-970Guarulhos/SP - Cep.: 07251-250

Tel. +55 11 6489-9133Fax +55 11 6480-3328http://[email protected]

Additional addresses for service in Brazil provided on request!

Bulgaria

Sales Sofia BEVER-DRIVE GmbHBogdanovetz Str.1BG-1606 Sofia

Tel. +359 2 9151160Fax +359 2 [email protected]

Cameroon

Sales Douala Electro-ServicesRue Drouot AkwaB.P. 2024Douala

Tel. +237 4322-99Fax +237 4277-03

Canada

AssemblySalesService

Toronto SEW-EURODRIVE CO. OF CANADA LTD. 210 Walker Drive Bramalea, Ontario L6T3W1

Tel. +1 905 791-1553Fax +1 905 791-2999http://[email protected]

Vancouver SEW-EURODRIVE CO. OF CANADA LTD.7188 Honeyman Street Delta. B.C. V4G 1 E2

Tel. +1 604 946-5535Fax +1 604 [email protected]

Montreal SEW-EURODRIVE CO. OF CANADA LTD.2555 Rue Leger LaSalle, Quebec H8N 2V9

Tel. +1 514 367-1124Fax +1 514 [email protected]

Additional addresses for service in Canada provided on request!

Chile

AssemblySalesService

Santiago de Chile

SEW-EURODRIVE CHILE LTDA.Las Encinas 1295Parque Industrial Valle GrandeLAMPARCH-Santiago de ChileP.O. BoxCasilla 23 Correo Quilicura - Santiago - Chile

Tel. +56 2 75770-00Fax +56 2 75770-01http://[email protected]

Page 161: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

07/2007 161

China

ProductionAssemblySalesService

Tianjin SEW-EURODRIVE (Tianjin) Co., Ltd.No. 46, 7th Avenue, TEDA Tianjin 300457

Tel. +86 22 25322612Fax +86 22 [email protected]://www.sew-eurodrive.com.cn

AssemblySalesService

Suzhou SEW-EURODRIVE (Suzhou) Co., Ltd.333, Suhong Middle RoadSuzhou Industrial ParkJiangsu Province, 215021P. R. China

Tel. +86 512 62581781Fax +86 512 [email protected]

Additional addresses for service in China provided on request!

Colombia

AssemblySalesService

Bogotá SEW-EURODRIVE COLOMBIA LTDA. Calle 22 No. 132-60Bodega 6, Manzana BSantafé de Bogotá

Tel. +57 1 54750-50Fax +57 1 54750-44http://[email protected]

Croatia

SalesService

Zagreb KOMPEKS d. o. o.PIT Erdödy 4 IIHR 10 000 Zagreb

Tel. +385 1 4613-158Fax +385 1 [email protected]

Czech Republic

Sales Praha SEW-EURODRIVE CZ S.R.O.Business Centrum Praha Lužná 591CZ-16000 Praha 6 - Vokovice

Tel. +420 220121234Fax +420 220121237http://[email protected]

Denmark

AssemblySalesService

Kopenhagen SEW-EURODRIVEA/SGeminivej 28-30DK-2670 Greve

Tel. +45 43 9585-00Fax +45 43 9585-09http://[email protected]

Estonia

Sales Tallin ALAS-KUUL ASReti tee 4EE-75301 Peetri küla, Rae vald, Harjumaa

Tel. +372 6593230Fax +372 [email protected]

Finland

AssemblySalesService

Lahti SEW-EURODRIVE OYVesimäentie 4FIN-15860 Hollola 2

Tel. +358 201 589-300Fax +358 3 [email protected]://www.sew-eurodrive.fi

Gabon

Sales Libreville Electro-ServicesB.P. 1889Libreville

Tel. +241 7340-11Fax +241 7340-12

Great Britain

AssemblySalesService

Normanton SEW-EURODRIVE Ltd.Beckbridge Industrial Estate P.O. Box No.1GB-Normanton, West- Yorkshire WF6 1QR

Tel. +44 1924 893-855Fax +44 1924 893-702http://[email protected]

Greece

SalesService

Athen Christ. Boznos & Son S.A.12, Mavromichali StreetP.O. Box 80136, GR-18545 Piraeus

Tel. +30 2 1042 251-34 Fax +30 2 1042 251-59http://[email protected]

Page 162: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

162 07/2007

Hong Kong

AssemblySalesService

Hong Kong SEW-EURODRIVE LTD.Unit No. 801-806, 8th FloorHong Leong Industrial ComplexNo. 4, Wang Kwong Road Kowloon, Hong Kong

Tel. +852 2 7960477 + 79604654Fax +852 2 [email protected]

Hungary

SalesService

Budapest SEW-EURODRIVE Kft.H-1037 BudapestKunigunda u. 18

Tel. +36 1 437 06-58Fax +36 1 437 [email protected]

India

AssemblySalesService

Baroda SEW-EURODRIVE India Pvt. Ltd.Plot No. 4, GidcPor Ramangamdi • Baroda - 391 243Gujarat

Tel. +91 265 2831086Fax +91 265 2831087http://[email protected]

Technical Offices Bangalore SEW-EURODRIVE India Private Limited308, Prestige Centre Point7, Edward RoadBangalore

Tel. +91 80 22266565Fax +91 80 [email protected]

Ireland

SalesService

Dublin Alperton Engineering Ltd. 48 Moyle RoadDublin Industrial EstateGlasnevin, Dublin 11

Tel. +353 1 830-6277Fax +353 1 [email protected]

Israel

Sales Tel-Aviv Liraz Handasa Ltd. Ahofer Str 34B / 22858858 Holon

Tel. +972 3 5599511Fax +972 3 [email protected]

Italy

AssemblySalesService

Milano SEW-EURODRIVE di R. Blickle & Co.s.a.s.Via Bernini,14 I-20020 Solaro (Milano)

Tel. +39 02 96 9801Fax +39 02 96 799781http://[email protected]

Ivory Coast

Sales Abidjan SICASte industrielle et commerciale pour l'Afrique165, Bld de MarseilleB.P. 2323, Abidjan 08

Tel. +225 2579-44Fax +225 2584-36

Japan

AssemblySalesService

Iwata SEW-EURODRIVE JAPAN CO., LTD 250-1, Shimoman-no,IwataShizuoka 438-0818

Tel. +81 538 373811Fax +81 538 373814http://[email protected]

Korea

AssemblySalesService

Ansan-City SEW-EURODRIVE KOREA CO., LTD. B 601-4, Banweol Industrial Estate Unit 1048-4, Shingil-DongAnsan 425-120

Tel. +82 31 492-8051Fax +82 31 492-8056http://[email protected]

Latvia

Sales Riga SIA Alas-KuulKatlakalna 11CLV-1073 Riga

Tel. +371 7139253Fax +371 7139386http://[email protected]

Page 163: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

07/2007 163

Lebanon

Sales Beirut Gabriel Acar & Fils sarlB. P. 80484Bourj Hammoud, Beirut

Tel. +961 1 4947-86 +961 1 4982-72+961 3 2745-39Fax +961 1 4949-71 [email protected]

Lithuania

Sales Alytus UAB IrsevaNaujoji 19LT-62175 Alytus

Tel. +370 315 79204Fax +370 315 [email protected]://www.sew-eurodrive.lt

Luxembourg

AssemblySalesService

Brüssel CARON-VECTOR S.A.Avenue Eiffel 5B-1300 Wavre

Tel. +32 10 231-311Fax +32 10 231-336http://[email protected]

Malaysia

AssemblySalesService

Johore SEW-EURODRIVE SDN BHD No. 95, Jalan Seroja 39, Taman Johor Jaya81000 Johor Bahru, JohorWest Malaysia

Tel. +60 7 3549409Fax +60 7 [email protected]

Mexico

AssemblySalesService

Queretaro SEW-EURODRIVE MEXIKO SA DE CVSEM-981118-M93Tequisquiapan No. 102Parque Industrial QueretaroC.P. 76220Queretaro, Mexico

Tel. +52 442 1030-300Fax +52 442 1030-301http://[email protected]

Morocco

Sales Casablanca Afit5, rue Emir AbdelkaderMA 20300 Casablanca

Tel. +212 22618372Fax +212 [email protected]

Netherlands

AssemblySalesService

Rotterdam VECTOR Aandrijftechniek B.V. Industrieweg 175 NL-3044 AS RotterdamPostbus 10085NL-3004 AB Rotterdam

Tel. +31 10 4463-700Fax +31 10 4155-552http://[email protected]

New Zealand

AssemblySalesService

Auckland SEW-EURODRIVE NEW ZEALAND LTD. P.O. Box 58-428 82 Greenmount driveEast Tamaki Auckland

Tel. +64 9 2745627Fax +64 9 2740165http://[email protected]

Christchurch SEW-EURODRIVE NEW ZEALAND LTD. 10 Settlers Crescent, FerrymeadChristchurch

Tel. +64 3 384-6251Fax +64 3 [email protected]

Norway

AssemblySalesService

Moss SEW-EURODRIVE A/SSolgaard skog 71N-1599 Moss

Tel. +47 69 241-020Fax +47 69 241-040http://[email protected]

Peru

AssemblySalesService

Lima SEW DEL PERU MOTORES REDUCTORES S.A.C.Los Calderos, 120-124Urbanizacion Industrial Vulcano, ATE, Lima

Tel. +51 1 3495280Fax +51 1 3493002http://[email protected]

Page 164: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

164 07/2007

Poland

AssemblySalesService

Lodz SEW-EURODRIVE Polska Sp.z.o.o.ul. Techniczna 5 PL-92-518 Łódź

Tel. +48 42 67710-90Fax +48 42 67710-99http://[email protected]

Portugal

AssemblySalesService

Coimbra SEW-EURODRIVE, LDA. Apartado 15 P-3050-901 Mealhada

Tel. +351 231 20 9670Fax +351 231 20 3685http://[email protected]

Romania

SalesService

Bucureşti Sialco Trading SRL str. Madrid nr.4 011785 Bucuresti

Tel. +40 21 230-1328Fax +40 21 230-7170 [email protected]

Russia

AssemblySalesService

St. Petersburg ZAO SEW-EURODRIVE P.O. Box 36 195220 St. Petersburg Russia

Tel. +7 812 3332522 +7 812 5357142Fax +7 812 3332523http://[email protected]

Senegal

Sales Dakar SENEMECA Mécanique GénéraleKm 8, Route de Rufisque B.P. 3251, Dakar

Tel. +221 849 47-70Fax +221 849 [email protected]

Serbia

Sales Beograd DIPAR d.o.o.Ustanicka 128aPC Košum, IV floorSCG-11000 Beograd

Tel. +381 11 347 3244 / +381 11 288 0393Fax +381 11 347 [email protected]

Singapore

AssemblySalesService

Singapore SEW-EURODRIVE PTE. LTD. No 9, Tuas Drive 2 Jurong Industrial Estate Singapore 638644

Tel. +65 68621701Fax +65 68612827http://[email protected]

Slovakia

Sales Bratislava SEW-Eurodrive SK s.r.o.Rybničná 40SK-83554 Bratislava

Tel. +421 2 49595201Fax +421 2 [email protected]://www.sew-eurodrive.sk

Žilina SEW-Eurodrive SK s.r.o.ul. Vojtecha Spanyola 33SK-010 01 Žilina

Tel. +421 41 700 2513Fax +421 41 700 [email protected]

Banská Bystrica SEW-Eurodrive SK s.r.o.Rudlovská cesta 85SK-97411 Banská Bystrica

Tel. +421 48 414 6564Fax +421 48 414 [email protected]

Slovenia

SalesService

Celje Pakman - Pogonska Tehnika d.o.o.UI. XIV. divizije 14SLO - 3000 Celje

Tel. +386 3 490 83-20Fax +386 3 490 [email protected]

South Africa

AssemblySalesService

Johannesburg SEW-EURODRIVE (PROPRIETARY) LIMITEDEurodrive House Cnr. Adcock Ingram and Aerodrome RoadsAeroton Ext. 2Johannesburg 2013P.O.Box 90004Bertsham 2013

Tel. +27 11 248-7000Fax +27 11 494-3104http://[email protected]

Page 165: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

07/2007 165

Capetown SEW-EURODRIVE (PROPRIETARY) LIMITED Rainbow ParkCnr. Racecourse & Omuramba RoadMontague GardensCape TownP.O.Box 36556Chempet 7442 Cape Town

Tel. +27 21 552-9820Fax +27 21 552-9830Telex 576 [email protected]

Durban SEW-EURODRIVE (PROPRIETARY) LIMITED2 Monaceo PlacePinetownDurbanP.O. Box 10433, Ashwood 3605

Tel. +27 31 700-3451Fax +27 31 [email protected]

Spain

AssemblySalesService

Bilbao SEW-EURODRIVE ESPAÑA, S.L. Parque Tecnológico, Edificio, 302E-48170 Zamudio (Vizcaya)

Tel. +34 94 43184-70Fax +34 94 43184-71http://[email protected]

Sweden

AssemblySalesService

Jönköping SEW-EURODRIVE ABGnejsvägen 6-8S-55303 JönköpingBox 3100 S-55003 Jönköping

Tel. +46 36 3442-00Fax +46 36 3442-80http://[email protected]

Switzerland

AssemblySalesService

Basel Alfred lmhof A.G.Jurastrasse 10 CH-4142 Münchenstein bei Basel

Tel. +41 61 417 1717Fax +41 61 417 1700http://[email protected]

Thailand

AssemblySalesService

Chonburi SEW-EURODRIVE (Thailand) Ltd.700/456, Moo.7, DonhuarohMuang Chonburi 20000

Tel. +66 38 454281Fax +66 38 [email protected]

Tunisia

Sales Tunis T. M.S. Technic Marketing Service5, Rue El Houdaibiah 1000 Tunis

Tel. +216 71 4340-64 + 71 4320-29Fax +216 71 [email protected]

Turkey

AssemblySalesService

Istanbul SEW-EURODRIVE Hareket Sistemleri San. ve Tic. Ltd. Sti. Bagdat Cad. Koruma Cikmazi No. 3 TR-34846 Maltepe ISTANBUL

Tel. +90 216 4419163 / 164 3838014/15Fax +90 216 3055867http://[email protected]

Ukraine

SalesService

Dnepropetrovsk SEW-EURODRIVEStr. Rabochaja 23-B, Office 40949008 Dnepropetrovsk

Tel. +380 56 370 3211Fax +380 56 372 2078http://[email protected]

Sales Kiev SEW-EURODRIVE GmbHS. Oleynika str. 2102068 Kiev

Tel. +380 44 503 95 77Fax +380 44 503 95 [email protected]

USA

ProductionAssemblySalesService

Greenville SEW-EURODRIVE INC. 1295 Old Spartanburg Highway P.O. Box 518Lyman, S.C. 29365

Tel. +1 864 439-7537Fax Sales +1 864 439-7830Fax Manuf. +1 864 439-9948Fax Ass. +1 864 439-0566Telex 805 550 http://[email protected]

South Africa

Page 166: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

Address List

166 07/2007

AssemblySalesService

San Francisco SEW-EURODRIVE INC. 30599 San Antonio St.Hayward, California 94544-7101

Tel. +1 510 487-3560Fax +1 510 [email protected]

Philadelphia/PA SEW-EURODRIVE INC. Pureland Ind. Complex 2107 High Hill Road, P.O. Box 481Bridgeport, New Jersey 08014

Tel. +1 856 467-2277Fax +1 856 [email protected]

Dayton SEW-EURODRIVE INC.2001 West Main Street Troy, Ohio 45373

Tel. +1 937 335-0036Fax +1 937 [email protected]

Dallas SEW-EURODRIVE INC.3950 Platinum Way Dallas, Texas 75237

Tel. +1 214 330-4824Fax +1 214 [email protected]

Additional addresses for service in the USA provided on request!

Venezuela

AssemblySalesService

Valencia SEW-EURODRIVE Venezuela S.A.Av. Norte Sur No. 3, Galpon 84-319Zona Industrial Municipal NorteValencia, Estado Carabobo

Tel. +58 241 832-9804Fax +58 241 838-6275http://[email protected]@cantv.net

USA

Page 167: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

SEW-EURODRIVE – Driving the world

Page 168: › download › pdf › 11494212.pdf Libraries MPLCTec MDX, MPLCTecVirtualEncoder …6 Manual – MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC® 1 Other applicable

www.sew-eurodrive.com

How we’re driving the world

With people whothink fast anddevelop thefuture with you.

With a worldwide service network that isalways close at hand.

With drives and controlsthat automaticallyimprove your productivity.

With comprehensiveknowledge in virtuallyevery branch ofindustry today.

With uncompromisingquality that reduces thecost and complexity ofdaily operations.

With a global presencethat offers responsive and reliable solutions. Anywhere.

With innovativetechnology that solvestomorrow’s problemstoday.

With online informationand software updates,via the Internet, availablearound the clock.

Gearmotors \ Industrial Gear Units \ Drive Electronics \ Drive Automation \ Services

SEW-EURODRIVEDriving the world

SEW-EURODRIVE GmbH & Co KGP.O. Box 3023 · D-76642 Bruchsal / GermanyPhone +49 7251 75-0 · Fax +49 7251 [email protected]