11635428

116
Drive Technology \ Drive Automation \ System Integration \ Services MOVI-PLC ® AxisControl Sample Project Manual Edition 05/2008 11635428 / EN

Upload: ep915197

Post on 11-Nov-2015

10 views

Category:

Documents


5 download

DESCRIPTION

SEW

TRANSCRIPT

  • Drive Technology \ Drive Automation \ System Integration \ Services

    MOVI-PLCAxisControlSample Project

    ManualEdition 05/200811635428 / EN

  • SEW-EURODRIVE Driving the world

  • Manual MOVI-PLC AxisControl Application Solution 3

    Contents

    Contents1 General Information ............................................................................................ 5

    1.1 Structure of the safety notes ....................................................................... 51.2 Rights to claim under warranty ................................................................... 51.3 Exclusion of liability..................................................................................... 61.4 Applicable documents................................................................................. 6

    2 Introduction ......................................................................................................... 72.1 Objectives ................................................................................................... 72.2 Functionality of the application solution ...................................................... 72.3 System requirements .................................................................................. 8

    3 MOVIDRIVE Control with AxisControl_MDX_SingleAxis .............................. 93.1 MOVIDRIVE requirements ....................................................................... 93.2 Startup of MOVIDRIVE with the DIP11B option...................................... 113.3 Opening and starting the project AxisControl_MDX_SingleAxis.pro ........ 123.4 Adapting the AxisControl_MDX_SingleAxis.pro project............................ 153.5 AxisControl_MDX function block............................................................... 173.6 Controlling MOVIDRIVE via the Application Builder

    "Monitor AxisControl" ................................................................................ 20

    4 Adding a MOVIDRIVE Drive to the Project.................................................... 244.1 Task .......................................................................................................... 244.2 Solution ..................................................................................................... 24

    5 Integrating an Automated Sequence............................................................... 305.1 Task .......................................................................................................... 305.2 Solution ..................................................................................................... 30

    6 AxisControl_MDX_SingleAxis Sample Project .............................................. 406.1 Operating modes ...................................................................................... 406.2 Function blocks ......................................................................................... 406.3 Processing of the function blocks ............................................................. 416.4 Overview of the AxisControl_MDX function block..................................... 436.5 Input and output assignment of the AxisControl_MDX function block ...... 446.6 Description of operating modes ................................................................ 46

    7 Adding an Operating Mode for Torque Control ............................................. 507.1 Task .......................................................................................................... 507.2 Solution ..................................................................................................... 50

    8 Synchronous Operation with Virtual Encoder as Master............................. 608.1 Startup and parameterization of MOVIDRIVE ........................................ 618.2 Startup of MOVIDRIVE with option DIP11B............................................ 618.3 Opening and starting the project AxisControl_MDX_Technology............. 618.4 Adapting the AxisControl_MDX_Technology.pro project .......................... 628.5 Additional settings for synchronous operation .......................................... 638.6 Compiling and starting the project in the PLC Editor ................................ 648.7 Controlling MOVIDRIVE + virtual encoder via "Monitor AxisControl" ..... 648.8 AxisControlCam_MDX function block ....................................................... 668.9 AxisControlGear_MDX function block....................................................... 69

  • 4 Manual MOVI-PLC AxisControl Application Solution

    Contents

    9 Synchronous Operation with MOVIDRIVE as Master .................................. 729.1 Adapting the AxisControl_MDX_Technology.pro project .......................... 729.2 Controlling both MOVIDRIVE inverters via "Monitor AxisControl" .......... 79

    10 AxisControl_MDX_Technology Sample Project............................................. 8110.1 Operating modes ...................................................................................... 8110.2 Function blocks ......................................................................................... 8210.3 Description of operating modes ............................................................... 85

    11 Data Backup for Connected Inverters............................................................. 8811.1 General notes on data backup.................................................................. 8811.2 Description of operating modes ................................................................ 8911.3 Data Management using global variable interface.................................... 9011.4 Data Management via Application Builder ................................................ 93

    12 Frequently Asked Questions ........................................................................... 9612.1 Communication problems between the PLC Editor and MOVI-PLC....... 9612.2 Controlling the AxisControl_MDX... sample project via PROFIBUS ......... 9812.3 Features and operating principle of the virtual encoder.......................... 101

    13 Address List .................................................................................................... 102

    Index................................................................................................................. 111

  • Manual MOVI-PLC AxisControl Application Solution 5

    1 Structure of the safety notesGeneral Information

    1 General Information1.1 Structure of the safety notes

    The safety notes in these operating instructions are structured as follows:

    1.2 Rights to claim under warrantyAs a prerequisite to fault-free operation and fulfillment of warranty claims, you must ad-here to the information in the SEW documentation. Consequently, read the operating in-structions and manuals of the respective inverters before you start working with the unit!

    Make sure that the operating instructions and manuals are available to persons respon-sible for the plant and its operation, as well as to person who work independently on theunit. You must also ensure that the documentation is legible.

    Symbol SIGNAL WORD!Nature and source of hazard.

    Possible consequence(s) if disregarded. Measure(s) to avoid the hazard.

    Symbol Signal word Meaning Consequences if disregarded

    Example:

    General hazard

    Specific hazard,e.g. electric shock

    HAZARD! Imminent hazard Severe or fatal injuries

    WARNING! Possible hazardous situation Severe or fatal injuries

    CAUTION! Possible hazardous situation Minor injuries

    STOP! Possible damage to property Damage to the drive system or its environment

    NOTE Useful information or tip. Simpli-fies the handling of the drive sys-tem

  • 6 Manual MOVI-PLC AxisControl Application Solution

    1 Exclusion of liability General Information

    1.3 Exclusion of liabilityYou must comply with the information contained in these operating instructions to en-sure safe operation and to achieve the specified product characteristics and perfor-mance features of the inverters. SEW-EURODRIVE assumes no liability for injury topersons or damage to equipment or property resulting from non-observance of theseoperating instructions. In such cases, any liability for defects is excluded.

    1.4 Applicable documents This manual does not replace the detailed operating instructions and the

    corresponding manuals.

    Installation and startup of the inverter only by trained personnel observing therelevant accident prevention regulations and the following documents:

    "MOVI-PLC Programming in the PLC Editor" system manual,

    "MOVIDRIVE MDX60B/61B" system manual and corresponding manuals,

    "MPLCTec..._MDX, MPLCTecVirtualEncoder Libraries for MOVI-PLC" manual,

    "MPLCMotion_MDX and MPLCMotion_MX Libraries for MOVI-PLC" manual,

    "MOVITRAC B Basic Unit" operating instructions and corresponding manuals,

    MOVIAXIS system manual and corresponding manuals.

  • Manual MOVI-PLC AxisControl Application Solution 7

    2 ObjectivesIntroduction

    2 Introduction2.1 Objectives

    The MOVI-PLC controller combines motion and logic control to provide the completedrive functionality by means of user-friendly function blocks in an environment that canbe programmed in accordance with IEC 61131.

    All function blocks for a wide range of drive functions are already integrated in the Axis-Control program for MOVI-PLC.

    With conventional PLC programming, the drive functionality is only a data interface. TheBus Positioning application module, for example, is addressed via global variables in theI/O range of the PLC.

    The AxisControl_MDX_SingleAxis.pro and AxisControl_MDX_Tech-nology.pro programs are sample projects, designed like an application module. How-ever, their advantage is that they can be adjusted by the PLC programmer.

    The Visu_Axis_control_MDX.mon ApplicationBuilder interface enables simple star-tup without higher-level PLC program. It can be also used to perform diagnostics.

    This manual describes the programs for the MOVIDRIVE inverter as an example. Theprograms for the MOVIAXIS and MOVITRAC 07 B inverters offer similar or reducedfunctions.

    2.2 Functionality of the application solutionFunctionality of the program AxisControl_MDX_Single Axis.pro:

    Speed control

    Absolute positioning

    Modulo absolute positioning

    Relative positioning

    Jog mode, speed controlled

    Jog mode, position controlled

    Reference travel

    Additional functionality of the program AxisControl_MDX_Technology.pro:

    Synchronous operation (direct engagement/disengagement)

    Electronic cam (direct engagement/disengagement)

    Virtual encoder

    These functions are completely based on the MPLCMotion_MDX, MPLCTec..._MDXand MPLCTecVirtualEncoder libraries and offer the required basic functions. You caneasily adapt the sample programs to the required functions using this manual and theother applicable documents.

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • 8 Manual MOVI-PLC AxisControl Application Solution

    2 System requirements Introduction

    2.3 System requirements2.3.1 Software

    The following software must be installed on the engineering PC for programming theAxisControl sample project.

    For MOVI-PLC basic DHP11B Motion Library version 2010r5 or higher

    For MOVI-PLC advanced DHx41B Motion Library version 2020r2 or higher

    An ApplicationBuilder interface is available for execution, control and monitoring of theAxisControl sample project.

    This offers the following advantages:

    You can control and monitor each instance of the AxisControl function blockseparately.

    You can check the electrical connection, hardware and communicationindependently of the application program.

    For executing the AxisControl sample project, no programming experience isrequired.

    2.3.2 HardwareThe following units must be available for executing the AxisControl sample project:

    MOVIDRIVE 60B/61B inverter with firmware version 824 854 1.16 or higher

    MOVITRAC B inverter with firmware version 1820 230 6.13 or higher

    Synchronous servomotors or asynchronous motors with or without encoderfeedback.

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • Manual MOVI-PLC AxisControl Application Solution 9

    3 MOVIDRIVE requirementsMOVIDRIVE Control with AxisControl_MDX_SingleAxis

    3 MOVIDRIVE Control with AxisControl_MDX_SingleAxis3.1 MOVIDRIVE requirements

    In order to control the MOVIDRIVE inverter with a MOVI-PLC, you have to start it upfirst with the "DriveStartUp for MOVI-PLC" startup assistant. Connect theMOVIDRIVE inverter to the engineering PC via the serial RS-485 interface.

    Start the startup assistant as follows:

    1. Right-click on [MDX61B0015...].

    2. Select [Technology Editors] from the context menu.

    3. Select [Drive Startup for MOVI-PLC] from the submenu.

    802992139

    00

    I

  • 10 Manual MOVI-PLC AxisControl Application Solution

    3 MOVIDRIVE requirements MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    Then perform the 5 startup steps displayed in the figure below:

    The MOVIDRIVE inverter is visible at the respective CAN line if the following applies:

    Startup has been performed successfully with the "DriveStartup for MOVI-PLC"startup assistant,

    The SBus address has been assigned correctly,

    And the network has been scanned again in MOVITOOLS MotionStudio.

    803406859

    NOTES For detailed information on startup, refer to chapter "MOVIDRIVE startup with the

    DIP11B option" (see page 11) in the "MPLCMotion_MDX and MPLCMotion_MX for MOVI-PLC" manual.

    Consider the organization of the different SBus addresses of the SBus stations. The SBus address of the drive inverter must be different from the SBus address of the MOVI-PLC controller (default: 0).

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 11

    3 Startup of MOVIDRIVE with the DIP11B optionMOVIDRIVE Control with AxisControl_MDX_SingleAxis

    The MOVIDRIVE inverter on the CAN1 line:

    3.2 Startup of MOVIDRIVE with the DIP11B optionIf the drive is to perform positioning task using a SSI absolute encoder, the drive and theDIP11B absolute encoder card must be started up in the MOVITOOLS via DIP startup.

    803469195

    [1] MOVI-PLC at the Ethernet interface [2] MOVIDRIVE routed through at the CAN1 interface of the MOVI-PLC controller[3] MOVIDRIVE at the COM1 interface of the engineering PC via RS-485

    [1]

    [2]

    [3]

    NOTEFor detailed information on startup of an SSI absolute encoder, refer to the"MOVIDRIVE MDX61B Absolute Encoder Card DIP11B" manual.

    00

    I

  • 12 Manual MOVI-PLC AxisControl Application Solution

    3 Opening and starting the project AxisControl_MDX_SingleAxis.pro MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    3.3 Opening and starting the project AxisControl_MDX_SingleAxis.pro3.3.1 Creating a new project in the PLC Editor

    Proceed as follows to create a new project:

    1. Right-click on MOVI-PLC.

    2. Select [Programming] from the context menu.

    3. Select [New PLC Editor project...] from the submenu.

    804057739

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 13

    3 Opening and starting the project AxisControl_MDX_SingleAxis.proMOVIDRIVE Control with AxisControl_MDX_SingleAxis

    The "Create PLCProject..." window is displayed. It shows a list of the library versionsthat are compatible with the MOVI-PLC firmware:

    1. Select the relevant directory on the hard drive of the engineering PC.

    2. Enter a file name for the new PLC Editor project.

    3. Select the required motion library.

    4. After selecting the relevant directory and assigning a file name, select an AxisControlproject:

    AxisControl_MDX_SingleAxis.pro for simple control of motor axes or

    AxisControl_MDX_Technology.pro for applications with synchronousoperation or cam.

    804617739

    [1] Directory on the hard drive of the engineering PC[2] File name of the new PLC Editor project[3] Selection of the required motion library

    [1]

    [2]

    [3]

    00

    I

  • 14 Manual MOVI-PLC AxisControl Application Solution

    3 Opening and starting the project AxisControl_MDX_SingleAxis.pro MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    Upon confirming with [OK], the PLC Editor opens a complete PLC Editor project that canbe compiled without errors.

    3.3.2 Compiling and starting a new project1. Select the menu command [Project] / [Compile] in the PLC Editor to compile the mod-

    ified project.

    2. Select the command [Online] / [Login] to load the project into the MOVI-PLC con-troller.

    3. To start the program, press function key or select the menu command [Online]/ [Start] after downloading the project into the controller.

    The MOVIDRIVE inverter can now be controlled via the global structure variablegAxisInterfaceIn_MDX[x]. This structure variable contains control signals such ascontroller inhibit, enable, reset, operating mode, etc.

    For testing purposes, you can also control the motor axis through an Application Builderinterface.

    805521803

    NOTEFor detailed information, refer to chapter "Controlling MOVIDRIVE via the ApplicationBuilder Axis Control Monitor" (see page 20).

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 15

    3 Adapting the AxisControl_MDX_SingleAxis.pro projectMOVIDRIVE Control with AxisControl_MDX_SingleAxis

    3.4 Adapting the AxisControl_MDX_SingleAxis.pro projectThe sample project has been designed for 3 motor axes. If the number of controlledmotor axes changes, you have to adapt the control configuration:

    Deleting motor axes:1. Right-click on [MOVIDRIVE].

    2. Select [Delete] from the context menu.

    Adding a motor axis:1. Right-click on [Can1 enabled].

    2. Select [Append subelement] from the context menu.

    3. Select [MOVIDRIVE MDX B].

    Adapting the control configuration:Subsequently, adjust the module parameters (SBus address).

    If more than 3 motor axes are to be controlled, add corresponding networks by callingup another instance of the AxisControl_MDX function block and parameterizing it.

    798772235

    NOTEFor non-existent motor axes, no instance of the AxisControl_MDX function blockmay be called up.

    Delete the respective networks from the PLC_PRG_SingleAxis main program.

    00

    I

  • 16 Manual MOVI-PLC AxisControl Application Solution

    3 Adapting the AxisControl_MDX_SingleAxis.pro project MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    You also have to adjust the Configuration_MDX function block:

    1. Delete the initialization statements for non-existent motor axes.

    2. If using more than 3 motor axes, add initialization statements for the respective motoraxes.

    NOTEFor detailed information, refer to chapter "Adding a MOVIDRIVE drive to the project"(see page 24).

    805782027

    NOTEFor detailed information on the modification of the existingAxisControl_MDX_SingleAxis.pro project, refer to the following chapters.

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 17

    3 AxisControl_MDX function blockMOVIDRIVE Control with AxisControl_MDX_SingleAxis

    3.4.1 Compiling and starting a new project

    1. Select the menu command [Project] / [Compile] in the PLC Editor to compile theproject.

    2. Select the command [Online] / [Login] to load the project into the MOVI-PLC con-troller.

    3. To start the program, press function key or select the menu command [Online]/ [Start] after downloading the project into the controller.

    You can now control the MOVIDRIVE inverter via the global structure variablegAxisInterfaceIn_MDX[x]. This structure variable contains control signals such ascontroller inhibit, enable, reset, operating mode, etc.

    For testing purposes, you can also control the motor axis through an Application Builderinterface (Visu_AxisControl_MDX.mon).

    3.5 AxisControl_MDX function blockIn the PLC_PRG_SingleAxis main program, one instance of the AxisControl_MDXfunction block is called up for each motor axis. The input or output signals of the functionblock have the following meaning:

    3.5.1 Input signalsThe behavior of the AxisControl_MDX function block is dependent on the followinginput signals:

    NOTEFor detailed information, refer to chapter "Controlling MOVIDRIVE via the ApplicationBuilder Monitor AxisControl" (see page 20).

    Input signal Type Meaning

    HControl BOOL If this input signal is set to TRUE, the motor axis is con-trolled via H variables from the Application Builder inter-face.

    Node CAN_NODE This input signal sets the relevant MOVI-PLC CAN bus node.

    SBUS_Address UNIT This input signal sets the SBus address of the inverter.

    InverterInhibit BOOL This input signal INHIBITS the INVERTER (status display 1 at the inverter).

    InverterEnable BOOL This input signal enables the inverter. It changes to the state with status display 5 or A.

    Reset BOOL A RESET is performed at the respective inverter with a rising edge of this input signal.

    AxisMode ENUM_AXIS-MODE

    Selecting an operating mode: 0: AM_DEFAULT1: AM_VELOCITY2: AM_POSITIONING3: AM_POSITIONINGMODULO4: AM_POSITIONINGRELATIVE5: AM_JOG_56: AM_JOG_A7: AM_HOMING8: AM_CAMING9: AM_GEARING

    00

    I

  • 18 Manual MOVI-PLC AxisControl Application Solution

    3 AxisControl_MDX function block MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    Start BOOL This input signal starts the movement of the selected operating mode.

    JogPos BOOL In the jog operating mode, the motor axis moves in the positive direction (CW).

    JogNeg BOOL In the jog operating mode, the motor axis moves in the negative direction (CCW).

    Position DINT Target position for the Positioning operating mode

    Velocity DINT Setpoint speed for the operating modes speed control, jog and positioning.

    Acceleration DINT This input signal sets the acceleration ramp of the respec-tive operating mode (time in [ms] based on a setpoint step change of 3000 min-1).

    Deceleration DINT This input signal sets the braking ramp of the respective operating mode (time in [ms] based on a setpoint step change of 3000 min-1).

    ModuloMode UNIT Travel strategy for the operating mode AM_POSITIONINGMODULO: 0: Off1: Short distance 2: CW 3: CCW

    AxisConfiguration ST_AxisConfigu-ration_MDX

    This input variable transfers the configuration parameters set in FB Configuration_MDX to the relevant motor axis.

    Input signal Type Meaning

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 19

    3 AxisControl_MDX function blockMOVIDRIVE Control with AxisControl_MDX_SingleAxis

    3.5.2 Output signals

    The AxisControl_MDX function block provides the following output signals:

    Output signal Type Meaning

    Connected BOOL Connection to the motor axis is established; initialization of the MC_ConnectAxis_MDX function block completed

    RequestedAxisMode ENUM_AXIS-MODE

    Requested axis mode corresponds to the AxisMode input signal

    ActualAxisMode ENUM_AXIS-MODE

    Actually activated axis mode: If RequestedAxisMode and ActualAxisMode are different, movement in the current operating mode is stopped. After the axis has come to a standstill, it switches to the new operating mode.

    Powered BOOL The output signal shows whether the motor axis is enabled. TRUE: Motor axis is enabled. Inverter status with

    status display A or 5. FALSE: Motor axis is not enabled. Inverter status with

    status display 1 or 2.

    Done BOOL The output signal Done indicates whether the individual motion function blocks of the selected operating mode have been executed. TRUE: e.g. target position or setpoint speed reached. FALSE: Target position or setpoint speed not reached

    yet.

    Active BOOL The Active output signal shows whether the motor axis is turning to reach the target position or the speed setpoint, for example. TRUE: Motor axis is turning, but target position or

    speed setpoint not reached yet. FALSE: Motor axis has reached the target position

    and is standing still, or turns at setpoint speed.

    Stopped BOOL The output signal Stopped indicates that the motor axis has been stopped.

    InverterFault BOOL The output signal InverterFault indicates that the inverter has detected a fault.

    InverterFaultStatus DWORD The output signal shows the fault code of the inverter of the motor axis

    FBError BOOL The output signal indicates an error in a motion function block.

    FBErrorID DWORD The output signal shows the error code of the faulty motion function block.Note:For information on the error codes, refer to chapter "Error identifier" in the library manual or to the "MPLCSystem_ErrorCodes.lib" library in the PLC Editor.

    Axis AXIS_REF Logical address of the motor axis. Is created by the respective MC_ConnectAxis_MDX function block.

    PLCopenState MC_PLCopen-State

    The output signal shows the current PLCopenState of the motor axis.

    InverterInfos MC_InverterInfos_MDX

    The output signal gives information about the inverter.

    InverterData MC_InverterData_MDX

    The output signal shows the current actual values of the inverter.

    00

    I

  • 20 Manual MOVI-PLC AxisControl Application Solution

    3 Controlling MOVIDRIVE via the Application Builder "Monitor AxisControl" MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    3.6 Controlling MOVIDRIVE via the Application Builder "Monitor AxisControl"Monitor AxisControl is an Application Builder user interface integrated inMOVITOOLS MotionStudio. This user interface is used for controlling a MOVIDRIVEinverter.

    Open this user interface as follows:

    1. Right-click on [MOVI-PLC...].

    2. Select [Diagnostics] from the context menu.

    3. Select [Monitor AxisControl].

    806171275

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 21

    3 Controlling MOVIDRIVE via the Application Builder "Monitor AxisControl"MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    The following window is displayed:

    The standard operating mode of this user interface is "monitoring". In this mode, onlymonitoring is possible. Control of the motor axis is not possible.

    To switch the user interface to "controlling", set the gAxisInterfaceIn_MDX[1].HControlvariable of the motor axis to TRUE. In this example, this is the axis with LogAdr 1.

    806194187

    00

    I

  • 22 Manual MOVI-PLC AxisControl Application Solution

    3 Controlling MOVIDRIVE via the Application Builder "Monitor AxisControl" MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    Proceed as follows:

    1. Double-click on the HControl variable in the PLC_PRG_SinlgeAxis program of thePLC Editor when logged in. The value TRUE is displayed.

    2. Use the key combination + or the menu command [Online] / [Writevalues] to enter the value. The variable text TRUE is displayed in blue.

    In the Monitor AxisControl Application Builder window, the display changes to:

    806220427

    806392843

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 23

    3 Controlling MOVIDRIVE via the Application Builder "Monitor AxisControl"MOVIDRIVE Control with AxisControl_MDX_SingleAxis

    The operating mode changes to "controlling". The "set point" fields are white for editing.Click on the [send] button to adopt the changes in the project.

    3.6.1 Application exampleThe MOVIDRIVE inverter is controlled with following the drive parameters:

    In order to operate the motor axis with the set drive parameters,

    1. Click on the [inverter enable] button and then on [send]

    2. Click on the [start] button and then on [send]

    Operating mode: Speed control

    Setpoint speed: 500 rpm

    Acceleration ramp: 2000 ms

    Braking ramp: 1000 ms

    806495243

    NOTEIn an emergency, click on the [stop axis] button to stop the motor axis. It is not neces-sary to click on [send] for this.

    00

    I

  • 24 Manual MOVI-PLC AxisControl Application Solution

    4 Task Adding a MOVIDRIVE Drive to the Project

    4 Adding a MOVIDRIVE Drive to the Project4.1 Task

    3 motor axes are created as standard when creating a newAxisControl_MDX_SingleAxis.pro project in the PLC Editor.

    A fourth axis is to be added. The MOVIDRIVE inverter is to control this motor axis.

    4.2 SolutionThe solution includes the following steps:

    4.2.1 Starting up and parameterizing the 4 MOVIDRIVE invertersThe 4 MOVIDRIVE inverters are started up using the DriveStartup assistant forMOVI-PLC.

    1. Connect the inverters individually via RS-485 with MOVITOOLS MotionStudio.

    2. It is essential that you set different SBus addresses and the same baud rates (e.g.SBus addresses: 1, 2, 3, 4 and baud rate 500 kBaud each).

    3. You can now access the 4 inverters connected to the CAN1 node through the routingfunction of MOVI-PLC.

    4.2.2 Creating a new AxisControl_MDX_SingleAxis.pro MOVI-PLC project 1. Create a new AxisControl_MDX_SingleAxis.pro project as described in

    chapter "Opening and starting the project AxisControl_MDX_SingleAxis.pro" (seepage 12).

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 25

    4 SolutionAdding a MOVIDRIVE Drive to the Project

    4.2.3 Integrating a 4th MOVIDRIVE inverter

    3 subelements are already attached to the control configuration of the project. Add afourth element as follows:

    1. Right-click on [Can1 enabled].

    2. Select [Append subelement] from the context menu.

    3. Select [MOVIDRIVE MDX B...].

    4. In the [Module parameter] tab, set the SBus address to 4.

    5. Quit the control configuration.

    808728715

    808772491

    00

    I

  • 26 Manual MOVI-PLC AxisControl Application Solution

    4 Solution Adding a MOVIDRIVE Drive to the Project

    4.2.4 Adding a new instance of the AxisControl_MDX function block in the main program

    Proceed as follows to add another network to PLC_PRG_SingleAxis:

    1. Copy network 5 and add it as a new network.

    2. Change the following entries to "4" in the sixth network.

    808817419

    [1]

    [2] [3]

    [1] SBus address[2] Name of instance[3] ARRAY number

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 27

    4 SolutionAdding a MOVIDRIVE Drive to the Project

    4.2.5 Changing the Configuration_MDX (FB) configuration module

    Change the following in the Configuration_MDX (FB) configuration module for thefourth MOVIDRIVE inverter:

    1. Copy the initialization of the 3rd inverter and paste it to the program.

    2. Adjust the configuration for the 4th inverter.

    808894219

    00

    I

  • 28 Manual MOVI-PLC AxisControl Application Solution

    4 Solution Adding a MOVIDRIVE Drive to the Project

    4.2.6 Transferring changes to the current MOVI-PLC program and testing it

    1. Press the function key or select the menu command [Project] / [Compile] tocompile the modified project.

    2. Select [Online] / [Login] to load the project into the controller.

    You can now control and test the new project via the MonitorAxisControl.monApplication Builder user interface.

    3. Use the AxisControl_MDX function block to set the H_Control input to TRUE inthe PLC_PRG_SingleAxis program in the network of the 4th axis.

    You can determine the logical address of the 4th axis from the global variablegAxisInterfaceOut_MDX[4].Axis.

    1. Use the Monitor AxisControl.mon Application Builder user interface to test thefunction as described in chapter "Controlling MOVIDRIVE via Application BuilderMonitor AxisControl" (see page 20).

    809055499

    [1] Logical address of the 4th motor axis

    [1]

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 29

    4 SolutionAdding a MOVIDRIVE Drive to the Project

    809104139

    [1]

    [1] Selecting the motor axis with logical address 4

    00

    I

  • 30 Manual MOVI-PLC AxisControl Application Solution

    5 Task Integrating an Automated Sequence

    5 Integrating an Automated Sequence5.1 Task

    An automatic sequence for controlling a MOVIDRIVE inverter is to be integrated intothe AxisControl_MDX_SingleAxis.pro program.

    The automatic sequence is started by setting the input signal at the input terminal (DI07)of the inverter.

    The drive is first referenced and then runs through a reversing program as follows:

    Travelling cyclically to a certain EndPosition and

    Travelling back to the StartPosition after a delay.

    The global variable gAxisInterfaceIn_MDX[1]...... specifies the drive parameters Posi-tioningSpeed and Ramps.

    Local variables in the PLC_PRG_SingleAxis program specify the StartPosition, theEndPosition and the Delay between the movements.

    5.2 SolutionThe solution includes the following steps:

    5.2.1 Step 1: Starting up and parameterizing the MOVIDRIVE drive inverterThe MOVIDRIVE inverter is started up using the "DriveStartup for MOVI-PLC" assis-tant.

    1. Connect the inverter via RS-485 to MOVITOOLS MotionStudio.

    2. It is essential that you set a SBus address that is different from that of theMOVI-PLC and a baud rate that is the same as the MOVI-PLC baud rate.

    Example:

    Default setting for CAN1 of MOVI-PLC: SBus address: 0, baud rate: 500 kBaud

    MOVIDRIVE: SBus address: 1, baud rate: 500 kBaud

    5.2.2 Step 2: Creating a new AxisControl_MDX_SingleAxis.pro MOVI-PLC project 1. Use the project wizard to create a new AxisControl_MDX_SingleAxis.pro

    project, see chapter "Opening and starting AxisControl_MDX_SingleAxis.pro" (seepage 12).

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 31

    5 SolutionIntegrating an Automated Sequence

    5.2.3 Step 3: Deleting inverters from the control configuration that are not used

    Proceed as follows to remove the two unneeded MOVIDRIVE inverters from the con-trol configuration:

    1. Right-click on the two inverters that are not needed and select [Delete] from the con-text menu.

    5.2.4 Step 4: Removing both AxisControl_MDX function blocks from the main programYou have to remove the two AxisControl_MDX function blocks of the unneeded in-verters from the PLC_PRG_SingleAxis main program:

    1. Right-click on the network number of the network to be removed and select [Delete]from the context menu.

    812889611

    813031179

    [1] Network number

    [1]

    00

    I

  • 32 Manual MOVI-PLC AxisControl Application Solution

    5 Solution Integrating an Automated Sequence

    5.2.5 Step 5: Deleting the configuration of the inverters that are not needed

    You have to remove the configuration of the two unneeded inverters from theConfiguration_MDX function block:

    1. Highlight the configuration lines of the two unneeded inverters and delete them.

    813966859

    [1] Configuration lines

    [1]

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 33

    5 SolutionIntegrating an Automated Sequence

    5.2.6 Step 6: Adding a program for an automatic sequence in the "Object Organizer"

    1. Click in the "Object Organizer" with the right mouse button.

    2. Select [Insert object] from the context menu.

    3. Select:

    Type of module: "Program"

    Language of module: "SFC"

    4. Enter the name of the module: "P_AutomaticSequence".

    The automatic sequence is programmed with a sequencer here as an example (SFC:sequential function chart). This programming language is best for realizing step-by-stepprocessing. The individual actions and transitions can be programmed in other program-ming languages. To proceed from one action to the next, the transition in between mustbe logically TRUE.

    814084235

    00

    I

  • 34 Manual MOVI-PLC AxisControl Application Solution

    5 Solution Integrating an Automated Sequence

    5.2.7 Step 7: Programming the P_AutomaticSequence program

    You can program the P_AutomaticSequence program in SFC (sequential functionchart) as follows:

    814201995

    [1] Exit action[2] Entry action

    [1]

    [2]

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 35

    5 SolutionIntegrating an Automated Sequence

    Program the individual actions as follows:

    InitThe "Init" action is programmed in ST (structured text).

    Set enable and the start signal to FALSE:

    Prepare_for_HomingThis action queries whether the drive is ready for homing:

    HOMINGThe action sequence for homing includes:

    Enabling the inverter,

    Setting the operating mode to homing (AM_HOMING).

    The start signal for homing is issued if

    The operating mode is set to AM_HOMING and

    The other conditions at the AND gate are fulfilled.

    The transition (bDoneHoming) to the next action is set to TRUE for one cycle by theR_TRIG function block if

    The drive is referenced, i.e. the module issues the signal Done, and

    The input for starting the entire sequence is still pending.

    Querying the edge change of the gAxisInterface_Out_MDX[1].Done signal is important.The same signal is used in the subsequent actions for the transition conditions of thedrive moments.

    Without querying the edge change, the transition condition for the following action wouldalready be fulfilled with the pending gAxisInterface_Out_MDX[1].Done signal.

    814359051

    814414859

    00

    I

  • 36 Manual MOVI-PLC AxisControl Application Solution

    5 Solution Integrating an Automated Sequence

    Action:

    In the exit action, the start signal is reset to FALSE:

    WaitingTime1_1s_StartPositionThis action ensures that the drive waits for a certain time in the start position. A timer iscalled up for delaying activation.

    The waiting time until the next action MOVE_TO_ENDPOS is enabled is set by the Wai-tingTime variable. The timer must be reset with an entry action "E" so that it starts eachtime anew. This is accomplished by calling up the timer with IN := FALSE:

    Entry action:

    Action:

    814470923

    814987531

    815310603

    815043339

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 37

    5 SolutionIntegrating an Automated Sequence

    MOVE_TO_ENDPOSWith this action, the drive travels to a specified end position.

    The operating mode absolute positioning AM_POSITIONING is used.

    The entry action includes the following steps:

    Transferring the travel parameters positioning speed and positioning ramps to therespective variables:

    gAxisInterfaceIn_MDX[1].Velocity,

    gAxisInterfaceIn_MDX[1].Acceleration and

    gAxisInterfaceIn_MDX[1].Deceleration

    Writing the End position variable to the target position gAxisInterface-In_MDX[1].Position of the AM_POSITIONING operating mode.

    The operating principle is the same as for the "Homing" action.

    The start signal is set if:

    The current operating mode is AM_POSITIONING and

    The state of the AND gate is TRUE.

    The transition (bDoneEndPosition) to the next action is set for one cycle if

    The target position (Done) has been reached and

    The input signal for starting the entire sequence is still pending.

    In the exit action, the start signal is reset to FALSE.

    Entry action:

    815383179

    00

    I

  • 38 Manual MOVI-PLC AxisControl Application Solution

    5 Solution Integrating an Automated Sequence

    Action:

    Exit action:

    WaitingTime2_1s_EndPositionThis action keeps the drive in its current position after reaching the end position. Thewaiting time is set with the Waiting Time variable. The operating principle is the sameas for action "WaitingTime1_1s_StartPosition".

    MOVE_TO_STARTPOSThe operating principle is the same as for action "MOVE_TO_ENDPOS".The StartPosition variable is transferred in the entry action.

    When the drive has reached the start position again,

    The bDoneStartPosition transition is set to TRUE for one cycle

    And the program jumps to the "WaitingTime1_1s_StartPosition" action to run throughagain.

    If the signal at the input terminal for starting the entire sequence (DI07) is revoked duringthe automatic sequence,

    The SFC is reset to the Init step,

    The Init step is processed and

    In the Init step, the inverter enable and the start signal are set to FALSE.

    818666123

    821898635

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 39

    5 SolutionIntegrating an Automated Sequence

    5.2.8 Step 8: Calling up the P_AutomaticSequence program in the main program

    Network 3 is inserted between the call of the Configuration_MDX function block andthe AxisControl_MDX function block.

    In this network, the defined P_AutomaticSequence program is called. The input vari-ables of the program are entered and defined as shown in the screen shot.

    5.2.9 Step 9: Testing the functionality of the automatic sequenceIf the project can be compiled without errors, it is transferred to the MOVI-PLC control-ler and started.

    In the PLC_PRG_SingleAxis program, the variables for the travel parameters of theP_AutomaticSequence program are pre-initialized in the variable declaration. If nec-essary, you can change them with the [Write values] function.

    You can test the functionality of the automatic sequence by activating theibMDX1_StartSequence input signal (input terminal DI07 on MOVIDRIVE).

    822421387

    00

    I

  • 40 Manual MOVI-PLC AxisControl Application Solution

    6 Operating modes AxisControl_MDX_SingleAxis Sample Project

    6 AxisControl_MDX_SingleAxis Sample Project6.1 Operating modes

    When opening the AxisControl_MDX_SingleAxis project, the user is offered thebasic functions for controlling several MOVIDRIVE inverters. The following operatingmodes are available:

    Speed control

    Absolute positioning

    Modulo absolute positioning

    Relative positioning

    Jog mode, speed controlled

    Jog mode, position controlled

    Reference travel

    Synchronous operation (only with the application version)

    Electronic cam (only with the application version)

    6.2 Function blocksThe AxisControl_MDX_SingleAxis project offers the following function blocks:

    The task configuration [Resources] / [Task configuration] shows that thePLC_PRG_SingleAxis main program is called cyclically by a free-running task.

    1030032267

    899402507

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • Manual MOVI-PLC AxisControl Application Solution 41

    6 Processing of the function blocksAxisControl_MDX_SingleAxis Sample Project

    In the control configuration [Resources] / [Control configuration], 3 axes are connectedto the CAN1 system bus as standard. Their SBus addresses are 1, 2 and 3.

    6.3 Processing of the function blocksIn the 2nd network of the PLC_PRG_SingleAxis main program, the instance of theConfiguration_MDX function block is called.

    In this function block, after the first download and the start of the program, differentparameters are set to an initialization value once for each connected axis.

    In the following networks, one instance of the AxisControl_MDX function block iscalled up for each axis.

    791207947

    791838219

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • 42 Manual MOVI-PLC AxisControl Application Solution

    6 Processing of the function blocks AxisControl_MDX_SingleAxis Sample Project

    In the AxisControl_MDX function block, the CommunicationInSignals_MDXcommunication module is called first. Here is mainly determined whether the input sig-nals of the module are connected with the global structure variablegAxisInterfaceIn_MDX[x].... or with the internal H variables.

    In the following networks, other function blocks are called with the following functions:

    Subsequently, the individual function blocks are called with the possible operatingmodes:

    In the following networks 17 - 24, the output signals of the AxisControl_MDX functionblocks are created:

    Done

    Active

    Stopped

    InverterError

    InverterFaultStatus

    FBError

    FBErrorID

    The CommunicationOutSignals_MDX communication module is called in the lastNetwork (25). Here, the output variables of the AxisControl_MDX function block aretransferred to the global structure variable gAxisInterfaceOut_MDX[x] or internal Hvariables.

    Function block Function

    MC_GetInverterInfo_MDX Reading out settings and information of the inverter

    MC_InitialConfig_MDX Activating communication features and functions of the inverter

    MC_ConnectAxis_MDX Cyclical communication with the inverter

    MC_Power_MDX Enabling the inverter

    MC_Reset_MDX Resetting the inverter

    MC_SetJerk_MDX Activating jerk limitation and setting the jerk time of the inverter positioning modules

    Function block Function

    AxisModeDefault_MDX No valid mode selected

    AxisModeVelocity_MDX Speed-controlled operation of the motor axis

    AxisModePositioning_MDX Absolute positioning of the motor

    AxisModePositioningModulo_MDX Modulo positioning of the motor axis

    AxisModeJog5_MDX Jog mode, speed controlled

    AxisModeJogA_MDX Jog mode, position controlled

    AxisModeHoming_MDX Homing the motor axis

    AxisModePositioningRelative_MDX Absolute positioning of the motor

    NOTEFor information on these output signals, refer to chapter "AxisControl_MDX functionblock" (see page 17).

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • Manual MOVI-PLC AxisControl Application Solution 43

    6 Overview of the AxisControl_MDX function blockAxisControl_MDX_SingleAxis Sample Project

    6.4 Overview of the AxisControl_MDX function blockThe following figure shows the functions of the AxisControl_MDX function block:

    792333707

    PLC_PRG

    H_V

    AR

    GLO

    BA

    L_VA

    R

    fbAxisControl_MDX1

    Axis_Control_MDX

    Configuration_MDX

    CommunicationOutSignals_MDX

    CommunicationInSignals_MDX

    MC_GetInverterInfos_MDX

    MC_InitialConfig_MDX

    MC_Power_MDXMC_Reset_MDX

    MC_ConnectAxis_MDX

    AxisModeVelocity_MDX

    AxisModePositioning_MDX

    AxisModePositioningRelative_MDX

    HControlTRUE

    FALSE

    fbAxisControl_MDX2

    Axis_Control_MDX

    CommunicationOutSignals_MDX

    CommunicationInSignals_MDX

    MC_GetInverterInfos_MDX

    MC_InitialConfig_MDX

    MC_Power_MDXMC_Reset_MDX

    MC_ConnectAxis_MDX

    AxisModeVelocity_MDX

    AxisModePositioning_MDX

    AxisModePositioningRelative_MDX

    HControlTRUE

    FALSE

    ApplicationBuilder

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • 44 Manual MOVI-PLC AxisControl Application Solution

    6 Input and output assignment of the AxisControl_MDX function block AxisControl_MDX_SingleAxis Sample Project

    6.5 Input and output assignment of the AxisControl_MDX function blockThe input and output assignment of the AxisControl_MDX function block is trans-ferred to global structure variables (gAxisInterfaceIn_MDX[x] andgAxisInterfaceOut_MDX[x]). The structure variables are defined as follows:

    Open the window as follows:

    [Resources] / [Global variables] / [AxisControl_MDX] / [GlobalVar_AxisControl_MDX]

    The following figure shows the structure of the function blocks:

    ST_AxisInterfaceInType_MDX and

    ST_AxisInterfaceOutType_MDX.

    792371979

    792385035

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • Manual MOVI-PLC AxisControl Application Solution 45

    6 Input and output assignment of the AxisControl_MDX function blockAxisControl_MDX_SingleAxis Sample Project

    The comment texts describe the variables.

    792409611

    NOTEFor detailed information on the meaning of the variables, refer to chapter"AxisControl_MDX function block" (see page 17).

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • 46 Manual MOVI-PLC AxisControl Application Solution

    6 Description of operating modes AxisControl_MDX_SingleAxis Sample Project

    6.6 Description of operating modesThis manual only describes the operating mode AM_POSITIONING as an example forall other operating mode. The other operating modes have the same or a similar struc-ture and differ only in the internally used motion function blocks.

    6.6.1 Absolute positioning (AM_POSITIONING)Description This operating mode is used for positioning the motor axes. Position specification is ab-

    solute. When the input signal Start = TRUE, the changes at the dynamic inputs areadopted immediately.

    Prerequisite The motor axis must be referenced!

    Input signals The behavior of the AxisControl_MDX_SingleAxis function block is dependent onthe following input signals:

    NOTEFor detailed information on the motion function blocks, refer to the "MPLCMotion_MDXand MPLCMotion_MX Libraries for MOVI-PLC" manual.

    Input signal Type Meaning

    Enable BOOL If this input signal is set to TRUE, the operating mode AM_POSITIONING is enabled and processed.

    Start BOOL This input signal starts the movement of the selected motor axis.

    Position DINT This input signal specifies the target position.

    Velocity DINT This input signal sets the positioning speed [rpm].

    Acceleration DINT This input signal sets the positioning ramp UP (time in [ms] based on a setpoint step change of 3000 rpm).

    Deceleration DINT This input signal sets the positioning ramp DOWN (time in [ms] based on a setpoint step change of 3000 rpm).

    Axis AXIS_REF Logical address of the motor axis. Is created by the respective MC_ConnectAxis_MDX function block.

    PLCopenState MC_PLCopenState

    This input signal transfers the PLCopenState of the inverter to the function block.

    RequestedAxisMode ENUM_AXIS-MODE

    Requested axis mode is required for internal operating mode switching.

    ActualAxisMode ENUM_AXIS-MODE

    Actually active axis mode is required for internal operat-ing mode switching.

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • Manual MOVI-PLC AxisControl Application Solution 47

    6 Description of operating modesAxisControl_MDX_SingleAxis Sample Project

    Output signals The AxisControl_MDX_SingleAxis function block provides the following outputsignals:

    If the current operating mode is AM_POSITIONING, the input signal Enable is set toTRUE. The operating mode is changed in the function block of the operating mode thathas been active last. If predefined conditions are fulfilled, the current operating mode isequated there with the requested operating mode. If the Enable input signal is not set toTRUE, the AxisModePositioning_MDX function block is exited with the RETURN pro-gram command.

    The movement to a new target position is started with the Start input signal. The SEWmotion module MC_MoveTargetPosition_MDX is enabled.

    The logic for changing the operating mode is programmed in network 3:

    The operating mode can only be changed if the drive is in STANDSTILL.

    The newly selected operating mode (RequestedAxisMode) is adopted as current oper-ating mode (ActualAxisMode) if

    The movement has been started (SetSpeicher bFlagStartet)

    And the SEW motion module has been stopped or the movement has been aborted(output signal Stopped or CommandAborted)

    If the movement has not been started yet (ResetSpeicher bFlagStartet), a newly se-lected operating mode (RequestedAxisMode) is adopted directly as current operatingmode (ActualAxisMode).

    Output signal Type Meaning

    InPosition BOOL This output signal shows that the motor axis has reached the target position.

    Active BOOL This output signal shows that the movement of the motor axis has been started, but the actual position value has not reached the target position yet.

    Stopped BOOL The output signal Stopped indicates that the motor axis has been stopped.

    Error BOOL The output signal indicates an error in an internal motion function block.

    ErrorID DWORD The output signal shows the error code of the faulty motion function block. Note:For information on the error codes, refer to chapter "Error identifier" in the library manual or to the MPLCSystem_ErrorCodes.lib library in the PLC Editor.

    NOTEFor detailed information, refer to the "MPLCMotion_MDX and MPLCMotion_MX Librar-ies for MOVI-PLC" manual.

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • 48 Manual MOVI-PLC AxisControl Application Solution

    6 Description of operating modes AxisControl_MDX_SingleAxis Sample Project

    6.6.2 Speed control (AM_VELOCITY)Description In this operating mode, the motor axis is operated in a speed-controlled endless move-

    ment. It can also be used for motor axes without encoder feedback.

    6.6.3 Absolute modulo positioning (AM_POSITIONINGMODULO)Description This operating mode is used for positioning the motor axes in endless operation. In this

    operating mode, drifting of the actual position is avoided even for infinite gear unit ratiofactors. Position specification is absolute.

    To realize applications with a cycle distance of 360, the Start input signal must be tog-gled. A rotation of the motor axis of 360 corresponds to 216 increments.

    Prerequisite The motor axis must be referenced!

    6.6.4 Relative positioning (AM_POSITIONINGRELATVE)Description This operating mode is used for relative positioning of the motor axis. Position specifi-

    cation is relative. When the input signal Start = TRUE, the changes at the dynamic inputsare adopted immediately.

    This operating mode requires an edge change of the Start input signal to move the motoraxis over a specified distance.

    Prerequisite None

    6.6.5 Jog mode, speed controlled (AM_JOG_5)Description This operating mode is used for jogging the motor axis in both directions of rotation. Jog

    mode is subject to speed control. The inverter is in n-control operating status (status dis-play 5). Existing software limit switches are not evaluated.

    794180875

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • Manual MOVI-PLC AxisControl Application Solution 49

    6 Description of operating modesAxisControl_MDX_SingleAxis Sample Project

    6.6.6 Jog mode, position controlled (AM_JOG_A)Description This operating mode is used for jogging the motor axis in both directions of rotation. Jog

    mode is subject to position control. The inverter is in Technology option operating status(status display A). Existing software limit switches can be used optionally with the usualmonitoring functions if the motor axis is referenced.

    If the software limit switches are used, the travel range is limited to 3 x position windows(P922) before the software limit switches. Endless operation is possible without softwarelimit switches and if the motor axis is not referenced.

    6.6.7 Homing (AM_HOMING)Description This operating mode is used for referencing the motor axis. The values set in the param-

    eters P900ff are used for this. The module MC_SetHomeParameter_MDX can be usedto change these parameters in the IEC program. This module is not included in the stan-dard version of the AxisControl_MDX_SingleAxis.pro project.

    Pi

    fkVA

    Hz

    n

    Pi

    fkVA

    Hz

    n

  • 50 Manual MOVI-PLC AxisControl Application Solution

    7 Task Adding an Operating Mode for Torque Control

    7 Adding an Operating Mode for Torque Control7.1 Task

    Another operating mode is to be added to an existingAxisControl_MDX_SingleAxis.pro project.

    The following conditions are to apply to this operating mode:

    The drive is subject to torque control, for which the user can specify a limit torquewith a variable.

    The drive is speed-controlled in principle, but it is to be operated permanently at thespecified torque limit. This means the drive must always be assigned a speedsetpoint that is larger than the drive's actual value. The actual value can never reachthe setpoint value, since the drive is always restricted by its torque limit (P304).

    The speed monitoring function (P500) of the inverter must be disabled.

    7.2 SolutionThe solution includes the following steps:

    7.2.1 Starting up and parameterizing the MOVIDRIVE invertersIf additional MOVIDRIVE inverters are used, you have to start them up using the"DriveStartup for MOVI-PLC" assistant:

    1. To do so, connect the inverters individually via RS-485 with MOVITOOLSMotionStudio.

    2. It is essential that you set different SBus addresses and the same baud rates (e.g.SBus addresses: 1, 2, 3 and baud rate 500 kBaud).

    Only these settings ensure access to the inverters connected to the CAN1 node throughthe routing function of MOVI-PLC.

    7.2.2 Creating a new AxisControl_MDX_SingleAxis.pro MOVI-PLC project 1. Create a new AxisControl_MDX_SingleAxis.pro project as described in

    chapter "Opening and starting the project AxisControl_MDX_SingleAxis.pro" (seepage 12).

    NOTEIt is essential that a servo operating mode (CFC or SERVO) is set at the inverter for thisoperating mode, since the torque is to be limited.

    Torque control is not possible in VFC-n operating mode!

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 51

    7 SolutionAdding an Operating Mode for Torque Control

    7.2.3 Adding a new operating mode as a new project

    For programming a completely new operating mode, you have to add the new operatingmode as a new object in the Object Organizer of the PLC Editor:

    Proceed as follows:

    1. Right-click on "AxisControl_SingleAxis".

    2. Select [Add object] from the context menu.

    3. Make the following settings in the "New POU" window:

    The new mode is based on a speed control. This means you can also copy and adaptthe existing POU AxisModeVelocity_MDX to create a new POU:

    Proceed as follows:

    1. Right-click on "AxisModeVelocity_MDX".

    2. Select [Copy object] from the context menu.

    3. Enter the name of the new object "AxisModeTorqueControl_MDX" in the "New POU"window that appears now.

    4. Click [OK].

    824526219

    [1] Object Organizer

    825699851

    00

    I

  • 52 Manual MOVI-PLC AxisControl Application Solution

    7 Solution Adding an Operating Mode for Torque Control

    7.2.4 Adding the new operating mode to the data types

    Add the new operating mode to the "ENUM_AXISMODE" enumeration of theAxisControl data types as follows:

    1. Select the [Data types] tab in the Object Organizer.

    2. Double-click on the "ENUM_AXISMODE (ENUM)" enumeration

    3. Add the new AM_TORQUECONTROL operating mode.

    7.2.5 Programming the new moduleProgram the new module for the AxisModeTorqueControl_MDX operating mode asfollows:

    1. In the [POUs] tab of the Object Organizer, double-click on the new"AxisModeTorqueControl_MDX" POU.

    The POU to be edited is opened.

    2. Change or amend the networks as follows:

    825779723

    [1] [Data types] tab in the Object Organizer[2] New operating mode AM_TORQUECONTROL

    [2]

    [1]

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 53

    7 SolutionAdding an Operating Mode for Torque Control

    826261131

    00

    I

  • 54 Manual MOVI-PLC AxisControl Application Solution

    7 Solution Adding an Operating Mode for Torque Control

    826291211

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 55

    7 SolutionAdding an Operating Mode for Torque Control

    Description of the POU

    For the new AM_TORQUECONTROL operating mode, the program has to change 2 pa-rameters in the MOVIDRIVE inverter:

    1. The speed monitoring function P500 (index 8557dez) must be set to OFF and

    2. The torque limit P304 (index 8688dez) must be adapted continuously during opera-tion.

    You can use the parameter writing functions of the MC_WriteParameter_MDXmodule.

    The motion of the drive is speed-controlled in principle, and it is performed with theMC_MoveTargetSpeed_MDX motion module.

    Reset the original values of the changed parameters in case of a mode change.

    Description of the networks

    Network 1:If the Enable input variable is not TRUE, the function block is exited immediately withRETURN.

    Networks 2 and 3:Resetting the local variables MmaxNormalDone and NmonONDone. These variablesare required when exiting the operating mode.

    Network 4:If the drive has not been started up in operating mode CFC or SERVO, errorINVALID_OPERATING_MODE with ErrorID FB0074 is issued.

    Network 5:When exiting the mode, the original value of the torque limit (P304) is written back to theinverter.

    Network 6:When exiting the mode, speed monitoring (P500) is switched back ON.

    Network 7:After selecting the mode, the torque limit (P304) set after the drive startup is read outand stored in a variable.

    Network 8:The original value of the torque limit (P304) is copied to the internal auxiliary variablenMmaxOld.

    Network 9:After selecting the mode, speed monitoring (P500) is deactivated.

    00

    I

  • 56 Manual MOVI-PLC AxisControl Application Solution

    7 Solution Adding an Operating Mode for Torque Control

    Network 10:When the user specifies a new value for the torque limit, this value is written to the in-verter (parameter P304). The internal scaling of the parameter is 0.001%. The parame-ter value is entered in thousandths percent. The entered value must be multiplied by1000 so that the user can enter the value in percent.

    Network 11:The value for the torque limit specified by the user is copied to the nMmaxOld auxiliaryvariable.

    Network 12:Calling up the MC_MoveTargetSpeed_MDX motion module for speed-controlled move-ment of the drive. For the speed setpoint Velocity, a value is entered that is 60 rpm fasterthan the current speed.

    This means:

    The speed controller in the MOVIDRIVE inverter operates at the maximum leveland

    The speed setpoint for the current controller is limited by the torque limit (P304).

    Network 13:Creating the Error signal for the AM_TORQUECONTROL operating mode.

    Network 14:Creating the ErrorID signal for the AM_TORQUECONTROL operating mode.

    Network 15:Logic for adopting the newly requested operating mode.

    Each operating mode module must contain this functionality. When a change of the op-erating mode is requested, this logic switches the active mode. The same logic as inAM_VELOCITY mode is used. The mode is only changed when both parameters for thetorque limit and speed monitoring have been assigned their original value (bMmax-NormalDone and bNmonONDone set to TRUE).

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 57

    7 SolutionAdding an Operating Mode for Torque Control

    7.2.6 Activating the new operating mode

    Activate the new operating mode by calling the AxisModeTorqueControl_MDX func-tion block in the AxisControl_MDX function block.

    In the AxisControl_MDX function block, an instance of theAxisModeTorqueControl_MDX function block is called.

    The inputs are connected as follows:

    7.2.7 Linking the output signals of the new function block to existing structuresThe output signals of the new AxisModeTorqueControl_MDX function block are:

    fbAxisModeTorqueControl.Active and

    fbAxisModeTorqueControl.Stopped.

    826563211

    00

    I

  • 58 Manual MOVI-PLC AxisControl Application Solution

    7 Solution Adding an Operating Mode for Torque Control

    Link the output signals in the AxisControl_MDX function block as follows:

    Link the error generation and the error number in the AxisControl_MDX functionblock as follows:

    826619403

    826650763

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 59

    7 SolutionAdding an Operating Mode for Torque Control

    7.2.8 Testing the functionality of the new operating mode

    After compiling the project successfully and transferring it to the MOVI-PLC controller,you can test the function of the new AM_TORQUECONTROL operating mode using theApplication Builder interface MonitorAxisControl.mon.

    To select the new operating mode and to specify the limit torque as Mmax in percent,modify the Application Builder interface as follows:

    826683659

    [5][4]

    [2][3] [1]

    [1] "Send" button for transferring the set parameters to the program[2] Motor axis control[3] Travel parameter setting [4] Setting the "Torque control" operating mode[5] Selecting the motor axis with logical address 1

    00

    I

  • 60 Manual MOVI-PLC AxisControl Application Solution

    8 Solution Synchronous Operation with Virtual Encoder as Master

    8 Synchronous Operation with Virtual Encoder as MasterThree motor axes are created as standard when creating a newAxisControl_MDX_Technology.pro project in the PLC Editor.

    The first drive axis is assigned the AxisControl_MDX_SingleAxis functionality(without technology function), as described in the previous chapters.

    The second drive axis is assigned cam functionality (CAM). An instance of theAxisControlCam_MDX function block is called up.

    The third drive axis is assigned synchronous operation functionality (Gear). Aninstance of the AxisControlGear_MDX function block is called up.

    In addition to that, the program VEMain for the virtual encoder is called in the 5 ms taskof the AxisControl_MDX_Technology.pro program.

    In this program, an instance of the VEAxisControl function block is called up. The vir-tual encoder can be controlled via a global variable interface in the same way as theother drive axes (gVEInterfaceIn.... and gVEInterfaceOut....).

    In standard communication, the virtual encoder transmits its actual position as an object(MDX_VIRTUAL_ENCODER_ID1) via the CAN1 bus. With the standard configurationof the MOVIDRIVE inverters, you receive this MDX_VIRTUAL_ENCODER_ID1 objectas setpoint position from the CAN1 bus.

    If the setpoint position is to be taken from a different source, the respectiveMOVIDRIVE inverter must be reconfigured in the program. An example will be shownin a subsequent chapter.

    The following sections describe how you can operate a MOVIDRIVE inverter at a syn-chronous angle to a virtual encoder. The virtual encoder offers different operatingmodes, such as speed-controlled, position-controlled, etc. The MOVIDRIVE inverterengages upon receiving a start signal and then travels along the virtual encoder at a syn-chronous angle.

    NOTEThese technology functions can only be used if technology version T1 is activated forthe MOVI-PLC controller.

    For detailed information on technology activations, refer to the respective manuals ofthe MOVI-PLC controller.

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 61

    8 Startup and parameterization of MOVIDRIVESynchronous Operation with Virtual Encoder as Master

    8.1 Startup and parameterization of MOVIDRIVE

    Start up the MOVIDRIVE inverter using the "DriveStartup for MOVI-PLC" tool. Con-nect the inverter directly to MOVITOOLS MotionStudio via RS-485.

    8.2 Startup of MOVIDRIVE with option DIP11BIf a SSI absolute encoder is to be used for positioning, you have to commission theDIP11B card with DIP startup.

    8.3 Opening and starting the project AxisControl_MDX_TechnologyThe procedure for creating a new project is the same as the one described in chapter"Opening and starting the project AxisControl_MDX_SingleAxis.pro " (see page 12).The only difference is that you select AxisControl_MDX_Technology.pro as a newproject.

    NOTEFor detailed information on inverter startup, refer to chapter "MOVIDRIVE require-ments" (see page 9).

    826772107

    00

    I

  • 62 Manual MOVI-PLC AxisControl Application Solution

    8 Adapting the AxisControl_MDX_Technology.pro project Synchronous Operation with Virtual Encoder as Master

    8.4 Adapting the AxisControl_MDX_Technology.pro projectOnly one MOVIDRIVE is to be operated in sync with the virtual encoder. This meansyou have to remove all drives from the control configuration that are not used:

    Delete the unneeded motor axes as follows:

    1. Right-click on MOVIDRIVE.

    2. Select [Delete] from the context menu.

    Instances of the unneeded drives must not be called in the PLC_PRG_Technologymain program.

    Delete the respective networks and adapt the SBus address and array number of theinstance fbAxisControlGear:

    826845963

    827049867

    [2]

    [1]

    [1] Array number[2] SBus address

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 63

    8 Additional settings for synchronous operationSynchronous Operation with Virtual Encoder as Master

    You also have to adapt the Configuration_MDX program and delete the unneededconfigurations there.

    The following is an example of a complete program:

    8.5 Additional settings for synchronous operationThe basic parameters for synchronous operation are set in theAxisControl_MDX_Technology.pro standard project. This is done in theConfiguration_MDX program.

    The synchronization of the motor axis is always time-related, since no instance of theMC_PrepareGearIn_MDX function block is called.

    If other functions, such as position-related engaging or offset processing in synchronousoperation, are required, you have to program them in the FB AxisModeGear_MDXfunction block.

    827086091

    NOTEFor a detailed description of how function blocks are integrated and parameterized,refer to the "MPLCTec..._MDX, MPLCTecVirtEncoder Libraries for MOVI-PLC"manual. This manual also shows simple examples to illustrate the operating principle.

    00

    I

  • 64 Manual MOVI-PLC AxisControl Application Solution

    8 Compiling and starting the project in the PLC Editor Synchronous Operation with Virtual Encoder as Master

    8.6 Compiling and starting the project in the PLC Editor1. Select the menu command [Project] / [Compile] in the PLC Editor to compile the

    project.

    2. Select the command [Online] / [Login] to load the project into the MOVI-PLC con-troller.

    3. To start the program, press function key or select the menu command [Online]/ [Start] after downloading the project into the controller.

    You can now control the MOVIDRIVE inverter and the VE virtual encoder via the globalstructure variables gAxisInterfaceIn_MDX[x] or gVEInterfaceIn. These structure vari-ables contain control signals such as controller inhibit, enable, reset, operating mode,etc.

    For test purposes, you can also control the motor axis and the VE virtual encoder via aninterface of the Application Builder (MonitorAxisControl.mon).

    8.7 Controlling MOVIDRIVE + virtual encoder via "Monitor AxisControl"You can use the Monitor AxisControl.mon diagnostics interface of the ApplicationBuilder to test the functionality. The procedure for opening and configuring the interfaceis described in chapter "Controlling MOVIDRIVE via Application Builder Monitor Axis-Control" (see page 20).

    You have to start 2 user interfaces:

    One interface for controlling the virtual encoder and

    One for controlling the MOVIDRIVE inverter.

    To control the virtual encoder and the inverter, you have to enable control via H vari-ables:

    1. In the PLC_PRG_Technology main program, set thegAxisInterfaceIn_MDX[1].HControl variable to TRUE.

    2. Set the gVEInterfaceIn.HControl variable to TRUE in the VEMain program.

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 65

    8 Controlling MOVIDRIVE + virtual encoder via "Monitor AxisControl"Synchronous Operation with Virtual Encoder as Master

    The user interface of the virtual encoder after selecting [VE]:

    You can control the virtual encoder like a normal drive axis.

    Proceed as follows:

    1. For "axis mode", set the "velocity" operating mode.

    2. Enter the travel parameters for "velocity", "acceleration" and "deceleration".

    3. Click on [send] to transfer the changes and settings to the controller.

    4. Click on [start] and then on [send] to start the virtual movement.

    To reset the current position to a defined position, you have to reference the virtual en-coder:

    1. To do so, select "homing" under "axis mode".

    2. Click on [start] and then on [send].

    The current position of the virtual encoder is now set to the value of the reference offsetin the "actual position" display field (default: 0).

    828042379

    00

    I

  • 66 Manual MOVI-PLC AxisControl Application Solution

    8 AxisControlCam_MDX function block Synchronous Operation with Virtual Encoder as Master

    The user interface of the MOVIDRIVE after selecting axis [01]:

    For the necessary settings, refer to the screen shots of the two Application Builderinterfaces.

    If the virtual encoder is in AM_VELOCITY mode, you can engage or disengage theMOVIDRIVE inverter in AM_GEARING mode with the signal [start].

    8.8 AxisControlCam_MDX function blockThe first drive axis has normal AxisControl_MDX functionality.

    For the relevant interface description, refer to the previous chapters.

    In the PLC_PRG_Technology main program, an instance of theAxisControlCam_MDX function block is called up for the second motor axis. The elec-tronic cam technology function (CAM) can now be used.

    The input and output signals of the function block have the following meaning:

    828302347

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 67

    8 AxisControlCam_MDX function blockSynchronous Operation with Virtual Encoder as Master

    8.8.1 Input signals

    The behavior of the AxisControlCam_MDX function block is dependent on the follow-ing input signals:

    Input signal Type Meaning

    HControl BOOL If this input signal is set to TRUE, the motor axis is con-trolled via H variables.

    Node CAN_NODE This input signal sets the relevant CAN bus node.

    SBUS_Address UNIT This input signal sets the SBus address of the inverter.

    InverterInhibit BOOL This input signal INHIBITS the INVERTER (status display 1 at the inverter).

    InverterEnable BOOL This input signal enables the inverter. It changes to the state with status display 5 or A.

    Reset BOOL A RESET is performed at the respective inverter with a rising edge of this input signal.

    AxisMode ENUM_AXIS-MODE

    Selecting an operating mode: 0: AM_DEFAULT1: AM_VELOCITY2: AM_POSITIONING3: AM_POSITIONINGMODULO4: AM_POSITIONINGRELATIVE5: AM_JOG_56: AM_JOG_A7: AM_HOMING8: AM_CAMING9: AM_GEARING

    Start BOOL This input signal starts the movement of the selected operating mode.

    JogPos BOOL In the jog operating mode, the motor axis moves in the positive direction (CW).

    JogNeg BOOL In the jog operating mode, the motor axis moves in the negative direction (CCW).

    Position DINT Target position for the Positioning operating mode

    Velocity DINT Setpoint speed for the operating modes speed control, jog and positioning.

    Acceleration DINT This input signal sets the acceleration ramp (time in [ms] based on a setpoint step change of 3000 min-1).

    Deceleration DINT This input signal sets the acceleration ramp (time in [ms] based on a setpoint step change of 3000 min-1).

    ModuloMode UNIT Travel strategy for the operating mode AM_POSITIONINGMODULO: 0: Off1: Short distance 2: CW 3: CCW

    Table UNIT This input signal selects the curve (5...0).

    AxisConfiguration ST_AxisConfigu-ration_MDX

    This input variable transfers the configuration parameters set in FB Configuration_MDX to the relevant motor axis.

    00

    I

  • 68 Manual MOVI-PLC AxisControl Application Solution

    8 AxisControlCam_MDX function block Synchronous Operation with Virtual Encoder as Master

    8.8.2 Output signals

    The AxisControlCam_MDX function block provides the following output signals:

    Output signal Type Meaning

    Connected BOOL Connection to the motor axis is established; initialization of the MC_ConnectAxis_MDX function block completed

    RequestedAxisMode ENUM_AXIS-MODE

    Requested axis mode corresponds to the AxisMode input signal

    ActualAxisMode ENUM_AXIS-MODE

    Actually activated axis mode: If RequestedAxisMode and ActualAxisMode are different, movement in the current operating mode is stopped. After the axis has come to a standstill, it switches to the new operating mode.

    Powered BOOL The output signal shows whether the motor axis is enabled. TRUE: Motor axis is enabled. Inverter status with

    status display A or 5. FALSE: Motor axis is not enabled. Inverter status with

    status display 1 or 2.

    Done BOOL The output signal Done indicates whether the individual motion function blocks of the selected operating mode have been executed. TRUE: e.g. target position or setpoint speed reached. FALSE: Target position or setpoint speed not reached

    yet.

    Active BOOL The Active output signal shows whether the motor axis is turning to reach the target position or the speed setpoint, for example. TRUE: Motor axis is turning, but target position or

    speed setpoint not reached yet. FALSE: Motor axis has reached the target position

    and is standing still, or turns at setpoint speed.

    Stopped BOOL The output signal Stopped indicates that the motor axis has been stopped.

    InverterError BOOL The output signal InverterError indicates that the inverter has detected a fault.

    InverterFaultStatus DWORD The output signal shows the fault code of the inverter of the motor axis.

    FBError BOOL The output signal indicates an error in a motion function block.

    FBErrorID DWORD The output signal shows the error code of the faulty motion function blocks.Note:For information on the error codes, refer to chapter "Error identifier" in the library manual or to the MPLCSystem_ErrorCodes.lib library in the PLC Editor.

    Axis AXIS_REF Logical address of the motor axis. Is created by the respective MC_ConnectAxis_MDX function block.

    PLCopenState MC_PLCopenState

    The output signal shows the current PLCopenState of the motor axis.

    InverterInfos MC_InverterInfos_MDX

    The output signal gives information about the inverter.

    InverterData MC_InverterData_MDX

    The output signal shows the current actual values of the inverter.

    LinkState MC_LINKTECSTATE

    The output signal indicated the current status of the MC_LINKTECCAM function block: 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)

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 69

    8 AxisControlGear_MDX function blockSynchronous Operation with Virtual Encoder as Master

    8.9 AxisControlGear_MDX function blockIn the PLC_PRG_Technology main program, an instance of theAxisControlGear_MDX function block is called up for the third motor axis.

    The input and output signals of the function block have the following meaning:

    8.9.1 Input signalsThe behavior of the AxisControlGear_MDX function block is dependent on the fol-lowing input signals:

    CamState MC_CAM_-STATE_MDX

    The signal shows the current status of the cam. MDX_CAM_RESET (cam reset, free-wheeling with

    speed setpoint in H439 MDX_CAM_START (startup cycle state) MDX_CAM_MAINCURVE (main curve) MDX_CAM_STOP (stop cycle state) MDX_CAM_STOP_INVERTERSTART (stop cycle

    state with inverted startup cycle curve) MDX_CAM_NOTLINKED (no connection)

    InGear BOOL This output signal shows that the motor axis is in "hard" synchronous operation.

    Output signal Type Meaning

    Input signal Type Meaning

    HControl BOOL If this input signal is set to TRUE, the motor axis is con-trolled via H variables.

    Node CAN_NODE This input signal sets the relevant CAN bus node.

    SBUS_Address UNIT This input signal sets the SBus address of the inverter.

    InverterInhibit BOOL This input signal INHIBITS the INVERTER (status display 1 at the inverter).

    InverterEnable BOOL This input signal enables the inverter. It changes to the state with status display 5 or A.

    Reset BOOL A RESET is performed at the respective inverter with a rising edge of this input signal.

    AxisMode ENUM_AXIS-MODE

    Selecting an operating mode: 0: AM_DEFAULT1: AM_VELOCITY2: AM_POSITIONING3: AM_POSITIONINGMODULO4: AM_POSITIONINGRELATIVE5: AM_JOG_56: AM_JOG_A7: AM_HOMING8: AM_CAMING9: AM_GEARING

    Start BOOL This input signal starts the movement of the selected operating mode.

    JogPos BOOL In the jog operating mode, the motor axis moves in the positive direction (CW).

    JogNeg BOOL In the jog operating mode, the motor axis moves in the negative direction (CCW).

    Position DINT Target position for the Positioning operating mode

    Velocity DINT Setpoint speed for the operating modes speed control, jog and positioning.

    Acceleration DINT This input signal sets the acceleration ramp (time in [ms] based on a setpoint step change of 3000 min-1).

    00

    I

  • 70 Manual MOVI-PLC AxisControl Application Solution

    8 AxisControlGear_MDX function block Synchronous Operation with Virtual Encoder as Master

    8.9.2 Output signalsThe AxisControlGear_MDX function block provides the following output signals:

    Deceleration DINT This input signal sets the acceleration ramp (time in [ms] based on a setpoint step change of 3000 min-1).

    ModuloMode UNIT Travel strategy for the operating mode AM_POSITIONINGMODULO: 0: Off1: Short distance 2: CW 3: CCW

    GearOutLagCountOn BOOL TRUE: The difference counter remains active after disen-gaging.

    GearClearLag BOOL A rising edge at this input deletes the difference counter for synchronous operation.

    AxisConfiguration ST_AxisConfigu-ration_MDX

    This input variable transfers the configuration parameters set in FB Configuration_MDX to the relevant motor axis.

    Input signal Type Meaning

    Output signal Type Meaning

    Connected BOOL Connection to the motor axis is established; initialization of the MC_ConnectAxis_MDX function block completed

    RequestedAxisMode ENUM_AXIS-MODE

    Requested axis mode corresponds to the AxisMode input signal

    ActualAxisMode ENUM_AXIS-MODE

    Actually activated axis mode: If RequestedAxisMode and ActualAxisMode are different, movement in the current operating mode is stopped. After the axis has come to a standstill, it switches to the new operating mode.

    Powered BOOL The output signal shows whether the motor axis is enabled. TRUE: Motor axis is enabled. Inverter status with

    status display A or 5. FALSE: Motor axis is not enabled. Inverter status with

    status display 1 or 2.

    Done BOOL The output signal Done indicates whether the individual motion function blocks of the selected operating mode have been executed. TRUE: e.g. target position or setpoint speed reached. FALSE: Target position or setpoint speed not reached

    yet.

    Active BOOL The Active output signal shows whether the motor axis is turning to reach the target position or the speed setpoint, for example. TRUE: Motor axis is turning, but target position or

    speed setpoint not reached yet. FALSE: Motor axis has reached the target position

    and is standing still, or turns at setpoint speed.

    Stopped BOOL The output signal Stopped indicates that the motor axis has been stopped.

    InverterError BOOL The output signal InverterError indicates that the inverter has detected a fault.

    InverterFaultStatus DWORD The output signal shows the fault code of the inverter of the motor axis.

    FBError BOOL The output signal indicates an error in a motion function block.

    00

    I

  • Manual MOVI-PLC AxisControl Application Solution 71

    8 AxisControlGear_MDX function blockSynchronous Operation with Virtual Encoder as Master

    FBErrorID DWORD The output signal shows the error code of the faulty motion function block.Note:For information on the error codes, refer to chapter "Error identifier" in the library manual or to the MPLCSystem_ErrorCodes.lib library in the PLC Editor.

    Axis AXIS_REF Logical address of the motor axis. Is created by the respective MC_ConnectAxis_MDX function block.

    PLCopenState MC_PLCopenState

    The output signal shows the current PLCopenState of the motor axis.

    InverterInfos MC_InverterInfos_MDX

    The output signal gives information about the inverter.

    InverterData MC_InverterData_MDX

    The output signal shows the current actual values of the inverter.

    LinkState MC_LINKTECSTATE

    The output signal indicated the current status of the MC_LINKTECCAM function block: 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)

    GearState MC_GEAR_STATE_MDX

    The signal shows the current status of synchronous oper-ation: MDX_GEAR_OUTGEAR_N_CTRL (disengaged,

    speed-controlled) MDX_ GEAR_OUTGEAR_X_CTRL (disengaged,

    position-controlled) MDX_GEAR_ENGAGING_GEAR_IN (startup cycle

    state) MDX_GEAR_IN_GEAR (synchronous operation) MDX_GEAR_OFFSET (offset operation) MDX_DISENGAGING_GEAR (disengaged state) MDX_GEAR_NOTLINKED (no valid gear state, e.g.

    when LinkState = NOTLINKED)

    InGear BOOL This output signal shows that the motor axis is in "hard" synchronous operation.

    LagCleared BOOL The output signal shows that the difference counter has been deleted.

    Output signal Type Meaning

    00

    I

  • 72 Manual MOVI-PLC AxisControl Application Solution

    9 Adapting the AxisControl_MDX_Technology.pro project Synchronous Operation with MOVIDRIVE as Master

    9 Synchronous Operation with MOVIDRIVE as MasterThe standard setting prepares the AxisControl_MDX_Technology project for syn-chronous operation with the virtual encoder as master. If a MOVIDRIVE inverter is tobe master, you have to change several settings in theAxisControl_MDX_Technology.pro project.

    For detailed information, refer to chapter "Startup and parameterization ofMOVIDRIVE" (see page 61):

    Basic procedure for preparing the two MOVIDRIVE inverters and

    Creating a new AxisControl_MDX_Technology.pro project using the projectwizard in MOVITOOLS MotionStudio.

    9.1 Adapting the AxisControl_MDX_Technology.pro projectOne MOVIDRIVE inverter is controlled with the standard function blockAxisControl_MDX. The second MOVIDRIVE inverter must be controlled with theAxisControlGear_MDX block because it is intended for synchronous operation. Thesecond motor axis (SBus address = 2) is intended for cam operation as standard and istherefore not needed. You have to delete it from the control configuration:

    Delete the unneeded second motor axis as follows:

    1. Right-click on [MOVIDRIVE MDX B].

    2. Select [Delete] from the context menu.

    The instance of the unneeded drive must not be called in the PLC_PRG_Technologymain program. You have to delete the relevant network (4).

    826845963

    00

    I

  • Manual MOVI-PLC AxisControl Application Soluti