Danfoss MCO 305 Design Manual

Programmable motion controller
Hide thumbs Also See for MCO 305:

Advertisement

MCO 305 Design Guide
Contents
How to Read this MCO 305 Design Guide..................................3
Functions and Examples ......................................................... 17
PC Software Interface ............................................................ 55
How to Read this Design Guide ......................................................................3
Symbols and Conventions .............................................................................5
Abbreviations ..............................................................................................5
Definitions ..................................................................................................6
What is VLT Motion Control Option MCO 305? ................................................. 11
System Overview ....................................................................................... 12
Configuration Examples .............................................................................. 13
Control Loops ............................................................................................ 14
Encoder .................................................................................................... 15
Program Execution ..................................................................................... 15
Positioning ................................................................................................ 17
Synchronizing............................................................................................ 24
CAM Control .............................................................................................. 35
CAM Box................................................................................................... 46
Mechanical Brake Control ............................................................................ 47
Limited-Jerk .............................................................................................. 49
Specifics of the User Interface ..................................................................... 55
The APOSS Window .................................................................................... 56
The Edit Window ........................................................................................ 58
File Menu .................................................................................................. 61
Edit Menu ................................................................................................. 62
Development Menu .................................................................................... 64
Controller Menu ......................................................................................... 70
Tools Menu................................................................................................ 78
Settings Menu ........................................................................................... 79
Window Menu ............................................................................................ 83
Help Menu ................................................................................................ 83
Download Menu ......................................................................................... 84
Debugging Programs .................................................................................. 86
®
MG.33.L5.02 - VLT
is a registered Danfoss trademark
1

Advertisement

Table of Contents
loading

Summary of Contents for Danfoss MCO 305

  • Page 1: Table Of Contents

    What is VLT Motion Control Option MCO 305? ..........11 System Overview ..................12 Configuration Examples ................13 Interface between MCO 305, FC 300, and other Option Modules......14 Control Loops .................... 14 Encoder ....................15 Program Execution ..................15 Functions and Examples ............
  • Page 2 MCO 305 Design Guide __ How to Read this MCO 305 Design Guide __ APOSS Tools ................89 CAM-Editor ....................89 Array Editor .................... 105 APOSS Oscilloscope .................. 116 How to Program ..............157 Programming the MCO with the APOSS Macro-language......... 157 Basics ....................
  • Page 3: How To Read This Mco 305 Design Guide

    How to Read this Design Guide This Design Guide will introduce all aspects of your MCO 305. Please read also the Operating Instructions, in order to be able to work with the system safely and professionally, particularly observe the hints and cautionary remarks.
  • Page 4 − The MCO 305 Operating Instructions provide the necessary information for built-in, set-up, and optimize the controller. − The MCO 305 Design Guide entails all technical information about the option board and customer design and applications. − This MCO 305 Command Reference completes the MCO 305 Design Guide with the detailed description of all commands.
  • Page 5: Symbols And Conventions

    MCO 305 Design Guide __ How to Read this MCO 305 Design Guide __ Symbols and Conventions Symbols used in this manual: NB!: Indicates something to be noted by the reader. Indicates a general warning. Indicates a high-voltage warning. Indicates default setting.
  • Page 6: Definitions

    MCO 305 Design Guide __ How to Read this MCO 305 Design Guide __ Definitions MLONG An upper or lower limit for many parameters: -MLONG = -1,073,741,824 MLONG = 1,073,741,823 Online / Offline Parameters Changes to online parameters are activated immediately after the data value is changed. Changes to offline parameters are not activated until you enter [OK] on the LCP.
  • Page 7 MCO 305 Design Guide __ How to Read this MCO 305 Design Guide __ Virtual Master Virtual master is an encoder simulation which serves as a common master signal for synchronization of up-to 32 axes. ® MG.33.L5.02 – VLT is a registered Danfoss trademark...
  • Page 8 MCO 305 Design Guide __ How to Read this MCO 305 Design Guide __ User Units The units for the drive or the slave and the master, respectively, can be defined by the user in any way desired so that the user can work with meaningful measurements.
  • Page 9 MCO 305 Design Guide __ How to Read this MCO 305 Design Guide __ Master Units [MU] A factor (fraction) is used for the conversion into qc, as with the user unit: par. − Synchroniz ation Factor Master Master Unit par.
  • Page 11: Introduction To Vlt Motion Control Option Mco 305

    MCO 305 is based on event controlled programming using a structured text programming language developed and optimized for this application. FC 312 can be delivered as an “all-in-one” drive with the MCO 305 module preinstalled or MCO 305 can be delivered as option module for field installation.
  • Page 12: System Overview

    MCO 305 Design Guide __ Introduction to VLT Motion Control Option MCO 305 __ System Overview The MCO 305 system includes at least the following elements: – FC 300. – MCO 305 module. – Motor/geared motor. – Feedback encoder. Encoder must be mounted on motor shaft when operating FC 300 in Flux closed loop, feedback encoder for positioning and synchronizing can be mounted anywhere in the application.
  • Page 13: Configuration Examples

    MCO 305 Design Guide __ Introduction to VLT Motion Control Option MCO 305 __ Configuration Examples One encoder used as motor feedback for closed loop Flux control as well as position feedback. One encoder used as motor feedback for closed...
  • Page 14: Interface Between Mco 305, Fc 300, And Other Option Modules

    FC 300 is an “amplifier” in the MCO 305 control loop and it must therefore be optimized for the connected motor and load before the MCO 305 PID can be set-up. FC 300 can be operated in open loop or closed loop within the MCO 305 control loop, see example below: Guideline for optimizing MCO 305 PID can be found in MCO 305 Operating Instructions.
  • Page 15: Encoder

    (minimum 20 encoder increments per controller sample). Program Execution MCO 305 can store multiple programs, up-to 90. Only one of these programs can be executed at a time, there are three ways to control which program to execute: − Via parameter 33-80 Activated Program Number.
  • Page 16 MCO 305 Design Guide __ Introduction to VLT Motion Control Option MCO 305 __ A temporary program can be executed from the program editor (MCT10/APOSS), temporary programs are only stored in RAM and are thus lost at power-down. The temporary program can also be executed in a special Debug mode where it is possible to influence the program execution as well as reading out data and variables, see on-line help of APOSS for further details.
  • Page 17: Functions And Examples

    − Index tables, for example filling material into trays on a rotating table. − Conveyors, for example when cutting material to length. − Hoists, for example a lift stopping at different levels. MCO 305 offers three main positioning types − Absolute − Relative −...
  • Page 18 MCO 305 Design Guide __ Functions and Examples __ Relative Positioning Relative positioning is always relating to the actual position, it is therefore possible to execute a positioning procedure without defining the absolute zero point. If the starting position is 100.000, with a relative positioning to 150.000 the target position is 250.000 (100.000 + 150.000), the moving distance is thus 150.000.
  • Page 19 The horizontal axis is con- trolled with absolute positioning between the pick-up position and the deliver position. Parameter Settings and Commands for Palletizer Application The following MCO 305 parameters are relevant for 32-0* Encoder 2 – Slave page 201...
  • Page 20 MCO 305 Design Guide __ Functions and Examples __ Program Example: Absolute Positioning for Palletizer Application /********************** Absolute Positioning program sample **************************/ Inputs: Go to pick up position Goto deliver position Home switch Clear Error // Outputs: 1 In pick up position...
  • Page 21 This is done by relative positioning to “box height” in the “up- direction”. Parameter Settings and Commands for Palletizer Application (Relative Positioning) The following MCO 305 parameters are relevant for 32-0* Encoder 2 – Slave...
  • Page 22 This is controlled with Touch probe positioning where the touch probe detects the top of the stack in order to calculate the deliver position on top of the stack. Parameter Settings and Commands for Touch Probe Application The following MCO 305 parameters are relevant for 32-0* Encoder 2 – Slave...
  • Page 23 MCO 305 Design Guide __ Functions and Examples __ Program Example: Touch Probe Positioning for Palletizer Application /******** Touch probe positioning sample program for palletizer application example *********/ Inputs: Go to position Touch probe Clear Error Outputs: In position Error...
  • Page 24: Synchronizing

    It is assumed that the motor and encoder connections are checked and that all basic parameter settings such as motor data, encoder data and PID controller are done. Instructions for setting up parameters can be found in FC 300 Operating Instructions and MCO 305 Operating Instructions. ®...
  • Page 25 MCO 305 Design Guide __ Functions and Examples __ Parameter Settings and Commands for Conveyor Belt Application The following MCO 305 parameters are relevant for 32-0* Encoder 2 – Slave page 201 velocity synchronization: 32-3* Encoder 1 – Master page 205...
  • Page 26 MCO 305 Design Guide __ Functions and Examples __ man_vel = man_vel + GET 1901 done = 1 ELSEIF (IN 4 == 1) AND (done == 0) THEN // Decrease manual velocity by 1 step when input 3 is set...
  • Page 27 It is assumed that the motor and encoder connections are checked and that all basic parameter settings such as motor data, encoder data and PID controller are done. Instructions for setting up parameters can be found in FC 300 Operating Instructions and MCO 305 Operating Instructions. Parameter Settings and Commands for Packaging Application...
  • Page 28 MCO 305 Design Guide __ Functions and Examples __ Command Description Syntax Parameter DEFSYNCORIGIN Defines master-slave relation for the DEFSYNCORIGIN master = reference position in qc next SYNCP or SYNCM command master slave slave = reference position MOVESYNCORIGIN Relative shifting of the origin of...
  • Page 29 MCO 305 Design Guide __ Functions and Examples __ old_offset = GET SYNCPOSOFFS WHILE (IN 1 == 1) DO // Stay in synchronizing mode while input 1 = 1 IF (IN 4 == 1) THEN GOSUB increase_offset ELSEIF (IN 5 == 1) THEN...
  • Page 30 MCO 305 Design Guide __ Functions and Examples __ Next_step = 1 // Enable next offset step RETURN /***************************** Error handler ***********************************/ SUBPROG errhandle err = 1 // Set error flag to remain in error handler until error is reset.
  • Page 31 MCO 305 Design Guide __ Functions and Examples __ Marker Synchronization (SYNCM) Marker synchronization (SYNCM) is extended position synchronizing where an additional position correction is done to align a slave marker with a master marker. Master and slave marker signals can be the encoder zero pulse or external sensors connected to digital inputs.
  • Page 32 Instructions for setting up parameters can be found in FC 300 Operating Instructions and MCO 305 Operating Instructions. Parameter Settings and Commands for Packaging Application The following MCO 305 parameters are relevant for 32-0* Encoder 2 – Slave page 201...
  • Page 33 MCO 305 Design Guide __ Functions and Examples __ Program Example: Marker Synchronization /********************* Marker synchronizing sample program ************************/ // Inputs: Start/stop synchronization Measure slave marker distance Measure master marker distance Master marker Slave marker Clear Error // Outputs: Within synchronizing accuracy, set accuracy window in parameter 33-13 Marker measurement active.
  • Page 34 MCO 305 Design Guide __ Functions and Examples __ IF (skip_first == 0) THEN // Do not use first value as it might be invalid skip_first = 1 ELSE marker_number = marker_number + 1 // Increment counter total_dist = total_dist + marker_distance...
  • Page 35: Cam Control

    MCO 305 Design Guide __ Functions and Examples __ CAM Control In order to realize CAM control, you need – depending on the application – at least one curve which describes the slave position in relation to the master position, as well as the engaging and disengaging behavior.
  • Page 36 MCO 305 Design Guide __ Functions and Examples __ Stamping of Boxes with Use-by Date The following example explains step by step how to Slave positions [degrees] stamp beginning 120°, end 240° edit the curve for this application of the CAM con-...
  • Page 37 MCO 305 Design Guide __ Functions and Examples __ Determine a whole number factor for the intervals in the index card → Curve Data so that the Fix points are on the interpolation points. Set this using the “Set” button.
  • Page 38 MCO 305 Design Guide __ Functions and Examples __ Program Example: Stamping of Boxes with Use-by Date Since the curve is stored internally as an array, the DIM instruction must appear first in your program: DIM stamping[92] // Number of elements from the title bar of the CAM-Editor...
  • Page 39 MCO 305 Design Guide __ Functions and Examples __ Printing of Cardboard Boxes with Marker Correction If the boxes are not always transported at the exact same distance from each other, markers will be required that can recognize a box and correct the synchronization.
  • Page 40 MCO 305 Design Guide __ Functions and Examples __ 13. Take a look at the curve profile in order to determine when the correction of the synchro- nization may begin at the earliest and when it must be finished. The vertical green line indi-...
  • Page 41 MCO 305 Design Guide __ Functions and Examples __ If the Sensor Distance is Larger than one Master Cycle Length In many applications, the marker cannot be placed within one master cycle length, for example in the case of the following equipment for the production...
  • Page 42 MCO 305 Design Guide __ Functions and Examples __ Thus, it would be better to install the sensor in such a way that the distance to the processing point is either smaller or substantially larger than one master cycle length; here, for example, at a distance of 3900. Then it is possible to correct from 2500 to 1000.
  • Page 43 MCO 305 Design Guide __ Functions and Examples __ How to Edit a curve for the Slave Synchronization Set the FC 300 with the required parameters and save these parameters with Parameters → Save to file with the extension “zbc”.
  • Page 44 MCO 305 Design Guide __ Functions and Examples __ Activate the diagram of the → Velocity to see the corresponding velocity curve as it is shown in this figure: Enter the → Cycles/min Master = 20 in the index card → Curve Info. This is the (maxi- mum) number of cardboard boxes that can be processed per minute.
  • Page 45 MCO 305 Design Guide __ Functions and Examples __ Program Example: Slave Synchronization with Marker In order to determine the master position, a switch on the master is required that indicates the zero position. In order to put the slave into the correct position, it will be moved forward to the photoelectric beam.
  • Page 46: Cam Box

    MCO 305 Design Guide __ Functions and Examples __ CAM Box The mechanical camshaft is also reproduced by one (or more) curves. In order to realize a CAM box, it must be possible to engage and disengage the slave at specific master positions over and over again.
  • Page 47: Mechanical Brake Control

    In applications controlled by MCO 305 involving an electro-mechanical brake it normally makes sense to control the brake from the MCO 305 application program to avoid situations when the position controller of MCO 305 attempts to move the motor while the brake is still engaged.
  • Page 48 MCO 305 Design Guide __ Functions and Examples __ SUBPROG engage OUT 11 0 // Close mechanical brake. DELAY (GET 1901) // Wait to ensure that brake is engaged before releasing the motor. MOTOR OFF // Stop position control and coast the motor.
  • Page 49: Limited-Jerk

    MCO 305 Design Guide __ Functions and Examples __ Limited-Jerk Understanding Limited-Jerk Movements Limited-jerk movements are similar to normal Trapezoidal movements except that the user may control the "gentleness" of the acceleration and deceleration ramps. This allows the user to limit the "jerk" caused by the "instantaneous"...
  • Page 50 MCO 305 Design Guide __ Functions and Examples __ The user can control the “gentleness” of the acceleration ramp using 4 parameters: Parameter Limited Jerk JERKMIN: Acceleration ramp-up constant. This specifies the number of milliseconds required to ramp the acceleration up from 0 to maximum acceleration.
  • Page 51 MCO 305 Design Guide __ Functions and Examples __ A Limited-jerk movement can be used in three different situations: 1. Stopping from the current velocity and acceleration (where the final position is not important). 2. Changing from the current velocity and acceleration to a specified constant velocity (where the positions are not important).
  • Page 52 MCO 305 Design Guide __ Functions and Examples __ The chart below shows a stopping movement that begins from a negative velocity and a very high decelera- tion. (It is a deceleration because the speed is slowing down.) However, because the initial deceleration is so high, the motor is unable to stop without overshooting 0 velocity and ‘coming back’.
  • Page 53 MCO 305 Design Guide __ Functions and Examples __ Next chart is similar to the previous example except that it begins with a positive acceleration. In this case, the curve must start with an acceleration ramp-down segment (using JERKMIN2). Once the acceleration reaches 0, then the curve can continue as before.
  • Page 54 MCO 305 Design Guide __ Functions and Examples __ Next chart shows a typical ‘short’ movement where maximum velocity cannot be reached. In this case, the curve ramps-up the acceleration (using JERKMIN) for as long as possible. This may or may not reach maximum acceleration, depending on how far away the target position is.
  • Page 55: Pc Software Interface

    PC User Interface. ® For programming the MCO 305 the VLT Motion Control Tool MCT 10 is used. With that you also start the integrated APOSS software for developing control programs and for editing curves.
  • Page 56: The Aposs Window

    MCO 305 Design Guide __ PC Software Interface __ The APOSS Window The APOSS Window allows simultaneous access both to an APOSS program and to a controller. Multiple APOSS windows can be opened, each accessing a different APOSS program and a different controller.
  • Page 57 MCO 305 Design Guide __ PC Software Interface __ Popup Menus Popup menus are provided at certain program loca- tions if the right mouse button is clicked. For example, the context menu in the Edit Window or a selection menu in Tools → CAM Editor for inserting or deleting Fix Points.
  • Page 58: The Edit Window

    MCO 305 Design Guide __ PC Software Interface __ The Edit Window The Edit Window displays the current program being edited and allows it to be changed. Many functions are provided through the mouse and through keyboard shortcuts in order to assist the user in the editing process.
  • Page 59 MCO 305 Design Guide __ PC Software Interface __ Text Selection [Shift]-[←] Extend selection left. [Shift]-[ ] Extend selection right. [Shift]-[↑] Extend selection up. [Shift]-[↓] Extend selection down. [Ctrl]-[Shift]-[←] Extend selection to start of word. [Ctrl]-[Shift]-[ ] Extend selection to end of word.
  • Page 60 MCO 305 Design Guide __ PC Software Interface __ Undo Function You can use [Alt]-[Backspace], or [Ctrl]-[Z], or Edit → Undo to undo the last action in the Edit Window. NB!: Note that both File → Save and File → Save as clear the Undo memory.
  • Page 61: File Menu

    MCO 305 Design Guide __ PC Software Interface __ File Menu The File menu contains all the commands necessary to create, open, save and print programs. File → Close, Save, Save as, Print, and Print setup are used in the usual way.
  • Page 62: Edit Menu

    MCO 305 Design Guide __ PC Software Interface __ Edit Menu The Edit menu offers the necessary editing help for programming. Most of these commands can also be reached via certain keys and key combinations. Find and Replace Click on Edit → Find or press [Ctrl]-[F] and enter the search string into the following dialog field. Use [F3] to jump from one instance of the string to the next.
  • Page 63 MCO 305 Design Guide __ PC Software Interface __ Find in Files The Find in Files function will display a dialog allowing the user to search for strings within files. All occur- rences of the string which are found will be displayed in the dialog. Double-clicking on any occurrence in the list will open that file and position the cursor on that line.
  • Page 64: Development Menu

    MCO 305 Design Guide __ PC Software Interface __ Development Menu This menu provides various functions used during the program development phase of applications. This includes functions to compile, execute, break, and debug programs. It also includes functions that allow controllers to be connected and disconnected.
  • Page 65 MCO 305 Design Guide __ PC Software Interface __ Each APOSS Window can be connected to only one controller at a time and each APOSS program can be edited by only one APOSS Window at a time. Hence, if you want to execute the same program on several controllers, then use one of the following methods: 1.
  • Page 66 MCO 305 Design Guide __ PC Software Interface __ End Debug This command removes the APOSS-IDE and the controller from “debug” mode. Watch Add / Start / Stop This function enables online monitoring of the variables, arrays, system and axis processing data and axis parameters.
  • Page 67 ACHTUNG!: This feature is available only if Binary file support in Settings → Options is enabled. Convert VLT 5000 > MCO 305 This converter checks your previous programs, gives a summery of the required changes, and adds comments where changes have to be done.
  • Page 68 MCO 305 Design Guide __ PC Software Interface __ Delete Programs all Development → Delete Programs all will delete all programs saved on all controllers that share the same connection interface as the controller connected to this APOSS Window (e.g. multiple controllers on a field bus).
  • Page 69 MCO 305 Design Guide __ PC Software Interface __ Command List The Command List offers a list all commands with their syntax, allowing them to be either inserted into the existing program or executed directly. This can be useful for those more infrequently used commands that may not be so well remembered by the user.
  • Page 70: Controller Menu

    MCO 305 Design Guide __ PC Software Interface __ Controller Menu This menu provides various functions used to view and set the controller configuration and to manage various aspects of the controller's onboard memory. This includes functions to manage saved programs...
  • Page 71 MCO 305 Design Guide __ PC Software Interface __ Save a Current Program Whenever you execute a program (i.e. with Development → Execute), it is compiled and downloaded into a temporary block of memory in the controller. This is overwritten with each subsequent Execute and it is lost if the controller is powered off.
  • Page 72 MCO 305 Design Guide __ PC Software Interface __ Autostart In order to support the use of the controller in “stand-alone” or “turnkey” applications (i.e. without user input), the controller can be configured so that an APOSS program is started automatically when the con- troller is powered on.
  • Page 73 MCO 305 Design Guide __ PC Software Interface __ Restart program If the controller executes an Autostart program when it is powered on, then the controller’s Autostart mechanism will be activated. When the Autostart mechanism is active, then the controller will automatically start the designated Restart program whenever the currently executing program terminates.
  • Page 74 MCO 305 Design Guide __ PC Software Interface __ Parameters The parameters in the Controller menu are divided into two groups: the global parameters and the axis parameters. Please see for more details, parameter values, and the default settings the chapter Parameter Reference.
  • Page 75 MCO 305 Design Guide __ PC Software Interface __ Parameters > Name This function allows you to assign a name to a controller or to change the existing name of a controller. The name is displayed in various dialogs in the APOSS user interface, allowing you to more easily differentiate between multiple controllers.
  • Page 76 User Parameters, Arrays, All Appl.Data, Option Parameters -> EPROM Use the corresponding function to save → User Parameters, → Arrays, → All Application-Data (which also contains the application program in addition to the user parameters) or → Options Parameters(MCO 305 parameters) individually in the LCP-EEPROM.
  • Page 77 Note that if Memory → Save RAM is subsequently used, or an APOSS program executes the SAVE ARRAYS command, then the arrays in the EPROM are also deleted! Complete The → Complete function will reset all parameters and delete all arrays and programs. The MCO 305 Option is reset to the original factory setting. NB!: Reset →...
  • Page 78: Tools Menu

    MCO 305 Design Guide __ PC Software Interface __ The following information is listed: Time Controller system time when error occurred. See “sys_clock” in System Process Data. Age (in seconds) of the error when the Error History dialog was opened (i.e. how long ago the error occurred).
  • Page 79: Settings Menu

    APOSS-IDE is first installed and used (see chapter “How to Get Started” in the „MCO 305 Operating Instructions”). However, if they need to be changed for any reason (e.g. the baud rate or COM port has changed, the...
  • Page 80 MCO 305 Design Guide __ PC Software Interface __ Simply select the appropriate interface type and change the necessary parameters. NB!: Note that only one interface type can be selected as the default interface. The default interface is used to establish connections to controllers when the [Esc] key is pressed.
  • Page 81 APOSS has been re-started the next time). This item allows to user to manually compile and save the current program file to a binary file. See also BinFileMap in illustrations in chapter Appendix in the MCO 305 Command Reference. Print color If this is enabled, then programs printed from the Edit Window will be printed in color using the same colors as the Edit Window.
  • Page 82 MCO 305 Design Guide __ PC Software Interface __ Array Editor parameter support Normally, the Array Editor will read and display all user parameters and arrays. However, if this setting is enabled, then the Array Editor will also read and display global parameters, temporary and permanent axis parameters, axis process parameters, and system process parameters.
  • Page 83: Window Menu

    MCO 305 Design Guide __ PC Software Interface __ Window Menu The commands on the Window menu follow the Windows standards (i.e. Cascade for overlapping windows arranged down and across, Tile vertically for vertical windows arranged beside each other, or Tile horizontally for horizontal windows arranged above/below each other).
  • Page 84: Download Menu

    MCO 305 Design Guide __ PC Software Interface __ Download Menu The Download menu provides a simple interface to support the downloading of programs to multiple controllers. Note that all APOSS Windows, with the exception of the main APOSS-IDE application window, must be closed before this menu will be available.
  • Page 85 MCO 305 Design Guide __ PC Software Interface __ If any error occurs during the processing of a controller, then processing is halted for that controller. However, processing will continue for subsequent controllers in the ID range. When the entire download operation is complete, a summary is displayed in the text box listing the ID’s of those controllers that...
  • Page 86: Debugging Programs

    MCO 305 Design Guide __ PC Software Interface __ Debugging Programs The APOSS-IDE contains a powerful built-in debugger. This provides common debug features such as single- stepping, breakpoints, and the ability to read and set program variable values. NB!: The debugger cannot be used in all cases. For example, it may not be possible to use the debugger with programs that are actively controlling a motor.
  • Page 87 MCO 305 Design Guide __ PC Software Interface __ Single-Stepping To single-step through the program, use Development → Singlestep or press [F9]. This will execute the next statement (i.e. the statement currently highlighted in yellow) and automatically stop before the next executable statement is executed.
  • Page 88 MCO 305 Design Guide __ PC Software Interface __ Displaying and Modifying Variables At any time while the debugger is active (i.e. whether the program is executing or stopped), the current value of any program variable can be displayed. This is done by clicking on (or immediately after) any instance of the variable with the left mouse button.The current value will be displayed in a...
  • Page 89: Aposs Tools

    MCO 305 Design Guide APOSS Tools CAM-Editor Curve profiles for CAM controls are created using the CAM-Editor. Curve profiles are defined by Fix points, parameters for engage and disengage motion, as well as parameters for synchronization with markers. The curves and parameters are displayed graphically and can be edited either graphically or textually.
  • Page 90 MCO 305 Design Guide __ APOSS Tools __ How to Start the CAM-Editor MCT 10 Online and Offline Mode The configuration files (*.zbc and *.cnf) can be opened using MCT 10. Doing so, the APOSS CAM editor is also started. Depending on the mode some menu functions are disabled. Use the functions of the MCT 10 Motion Control Tools for New, Open and Save as.
  • Page 91 MCO 305 Design Guide __ APOSS Tools __ CAM-Editor Window The CAM-Editor Window is divided into four sections: – Curve Profile diagram. – Index Cards: Curve Data, Curve Info, and all the axis parameter index cards normally available using Controller → Parameters → Axis.
  • Page 92 MCO 305 Design Guide __ APOSS Tools __ CAM-Editor Toolbar The CAM-Editor toolbar contains the following special fields: Array – This field lists all the arrays currently defined and allows the user to select the array to be edited. Each item in the list will consist of the array number followed by the curve profile name. If the array does not correspond to a curve profile, then “Array”...
  • Page 93 MCO 305 Design Guide __ APOSS Tools __ Curve Profile Diagram The curve profile diagram graphically displays the curve along with other information about curve synchronization. It also allows Fix points to be added, deleted, and moved using the mouse.
  • Page 94 MCO 305 Design Guide __ APOSS Tools __ Using the Mouse to Edit Fix Points Fix points can be edited interactively using the mouse within the diagram. But they can also be input directly in the Fix points table, please see Fix points.
  • Page 95 MCO 305 Design Guide __ APOSS Tools __ CAM Index cards The CAM-Editor index cards allow various parameters related to curve profiles to be changed. This is done using the Curve Data and Curve Info index cards. In addition, other index cards allow all axis parameters to be changed.
  • Page 96 MCO 305 Design Guide __ APOSS Tools __ – Specify gradients (immediate) – The user must explicitly set the start and end velocities using the “Set” button. However, the start gradient will be replaced with the actual current velocity when the curve is activated in the controller.
  • Page 97 MCO 305 Design Guide __ APOSS Tools __ Master and Slave Marker Positions Enter the master position (or the slave position in the case of slave synchronization with marker) for which the marker has been set. For example, the beginning of the box in the illustration below is the master marker position.
  • Page 98 MCO 305 Design Guide __ APOSS Tools __ Index Card Curve Info Cycles/min Master This specifies the number of cycles of the master per minute. In most cases, this will be the (maximum) number of products that are processed per minute.
  • Page 99 MCO 305 Design Guide __ APOSS Tools __ Interval Size and Interval Time (ms) These values are only important if interpolation has been enabled. The interval size is the length of a single interpolation interval in master units. It is derived from the number of intervals and the length of the master cycle.
  • Page 100 MCO 305 Design Guide __ APOSS Tools __ Curve profile settings The Settings section of the CAM-Editor Window contains checkboxes for displaying and hiding various attributes of the curve profile diagram. Velocity Display the velocity curve corresponding to the curve profile. This is displayed as a blue line. The grid scale for this curve is displayed down the right side of the curve profile diagram (as long as this is the only grid to be displayed on the right side of the chart).
  • Page 101 MCO 305 Design Guide __ APOSS Tools __ Correction Display the positions where the master correction should begin and end (defined in the Curve Data index card). This is displayed as a blue-grey bar along the bottom axis of the curve profile diagram.
  • Page 102 MCO 305 Design Guide __ APOSS Tools __ Fix points Fix points are used to define the basic shape of the curve over the length of the master cycle. The CAM- Editor will fit a mathematical spline through these Fix points in order to create a smooth curve. Note that you should not define more Fix points than are necessary to adequately produce the final desired curve profile.
  • Page 103 MCO 305 Design Guide __ APOSS Tools __ Tangent (T) The following segment is straight. The velocity will be constant and the acceleration will be zero. Trapezoid (CZ) The following segment will be calculated using a trapezoidal velocity profile (i.e. two segments of constant acceleration).
  • Page 104 MCO 305 Design Guide __ APOSS Tools __ NB!: When the master moves forward engaging is shown by the engage path and disengaging is shown by the disengage path. When the master moves backward, engaging is shown by the disengage path and disengaging is shown by...
  • Page 105: Array Editor

    MCO 305 Design Guide __ APOSS Tools __ Array Editor The APOSS Array Editor provides a list-oriented interface that allows all controller arrays and parameters to be viewed and edited. This includes user parameters, global parameters, axis parameters, axis state variables, and system state variables.
  • Page 106 MCO 305 Design Guide __ APOSS Tools __ Stand-alone application The Array Editor can be started stand-alone by adding either an argument to the Windows command line. “/a” will start the Array Editor in User mode and “/ae” will start the Array Editor in Expert mode.
  • Page 107 MCO 305 Design Guide __ APOSS Tools __ Name If the array index or parameter has been given a name, then it is displayed in this column. It will be blank if there is no name. Items in the list can be organized into “groups” and given a title (select the type “Group heading”...
  • Page 108 MCO 305 Design Guide __ APOSS Tools __ Array Editor Functions If the Array Editor has been started from with the APOSS IDE, then all Array Editor functions will be available on the toolbar. The Array Selection Box is displayed rightmost.
  • Page 109 MCO 305 Design Guide __ APOSS Tools __ Delete index or pressing [Esc] delete the currently selected list item, or click in stand-alone Array-Editor on → Delete Index. This function is not available in User mode. Items can only be deleted in Expert mode.
  • Page 110 MCO 305 Design Guide __ APOSS Tools __ User mode WITHOUT an Array Definition File The stand-alone Array Editor User mode dialog is shown below. To use it WITHOUT an Array Definition File, follow these steps. 1. Press the → Select button. This will display the normal APOSS “Select Controller” dialog that will allow the user to set interface parameters, open interfaces, and choose a controller.
  • Page 111 MCO 305 Design Guide __ APOSS Tools __ Expert mode WITHOUT an Array Definition File The stand-alone Array Editor Expert mode dialog is shown below. Use the toolbar icons, if the Array-Editor has been started within the APOSS-IDE. This dialog is used in the same way as the User mode dialog. The only difference is that Add and Delete buttons are now available.
  • Page 112 MCO 305 Design Guide __ APOSS Tools __ User mode WITH an Array Definition File The stand-alone Array Editor User mode dialog when an array definition file is being used is shown below. To use the Array Editor with an array definition file, proceed as follows: 1.
  • Page 113 MCO 305 Design Guide __ APOSS Tools __ Expert mode WITH an Array Definition File The stand-alone Array Editor Expert mode dialog when an array definition file is being used is shown below. Use the toolbar icons, if the Array-Editor has been started within the APOSS-IDE.
  • Page 114 MCO 305 Design Guide __ APOSS Tools __ NB!: Note that when the array definition file is being edited, User, Global, Axis, etc., array elements can be deleted. Creating an Array Definition File Array definition files are simple text files with the file extension “.zba”. Array definition files can be created directly using the Array Edit Expert mode.
  • Page 115 MCO 305 Design Guide __ APOSS Tools __ For Group items, the Array column determines when the heading is to be displayed and should contain one of the following: -1 - Always displayed. -2 - Displayed only when the “User” array (or “All”) is selected.
  • Page 116: Aposs Oscilloscope

    MCO 305 Design Guide __ APOSS Tools __ APOSS Oscilloscope The APOSS Oscilloscope is a tool for recording and graphically displaying values from one or more controllers while those controllers are operational and executing programs. It is intended to be used as an aid in debugging prototype applications, diagnosing operational problems, and tuning the internal controller parameters for optimal system performance.
  • Page 117 MCO 305 Design Guide __ APOSS Tools __ Oscilloscope Versions There are four versions of the Oscilloscope available to users. Each version is designed for a different use but all versions basically operate in a similar manner and have a similar appearance. The Free Run, Single Shot, and TESTSETP Oscilloscopes are designed for debugging and diagnostics.
  • Page 118 MCO 305 Design Guide __ APOSS Tools __ TESTSETP Oscilloscope The TESTSETP Oscilloscope is designed to display user-defined TESTSETP arrays created on the controller (i.e. with the TESTSETP command). As with the Single Shot Oscilloscope, values are recorded using a TESTSETP array and uploaded to the Oscilloscope after the test is complete.
  • Page 119 MCO 305 Design Guide __ APOSS Tools __ Oscilloscope Window The layout of the Oscilloscope Window is shown above. Note that when an Oscilloscope Window is active, then the normal APOSS menu and toolbar are replaced by a custom menu and toolbar for the Oscilloscope.
  • Page 120 MCO 305 Design Guide __ APOSS Tools __ The figure above shows a sample chart. Each colored curve in the chart represents one value, measured over time, during the execution of a “test run”. The X-axis of the chart represents time and is usually measured in milliseconds.
  • Page 121 MCO 305 Design Guide __ APOSS Tools __ Using A and B Cursors The Oscilloscope provides two “cursors”: A and B. These can be used as a convenience by the user to mark particular times along the X-axis. They can be shown or hidden by clicking on the Cursor A and Cursor B toolbar buttons or by using the View →...
  • Page 122 MCO 305 Design Guide __ APOSS Tools __ Using the Mouse in the Navigation Window Left button (Zoom) - Zoom in to an area of interest in the chart by pressing the left mouse button, moving the mouse across the area of interest, and then releasing the mouse button. The selected area will then be displayed in the Chart Window.
  • Page 123 MCO 305 Design Guide __ APOSS Tools __ The “Name” column consists of three parts: Checkbox – If this is checked, then this curve will be displayed in the Chart and Navigation Windows. Otherwise, the curve is hidden. Left-clicking anywhere within the Name column will toggle the checkbox.
  • Page 124 MCO 305 Design Guide __ APOSS Tools __ Clicking on the left radio button will cause the Y-axis of the Chart Window to be labeled on the left side with a scale corresponding to the selected curve. In the above example, the scale for “REG_ACTPOS” will be dis- played.
  • Page 125 MCO 305 Design Guide __ APOSS Tools __ Select Controller – This command allows the user to select a different controller to be associated with the selected curve. Other curves that are associated with this controller, or other controllers, are not affected.
  • Page 126 MCO 305 Design Guide __ APOSS Tools __ Last, Minimum, and Maximum Columns These columns will show the values listed below. If a value is shown as “*”, then the column is too narrow to display the entire value. In this case, the column can be widened by dragging the column separator in the header with the left mouse button.
  • Page 127 MCO 305 Design Guide __ APOSS Tools __ Controller and Interface Columns If a controller is connected, then the “Controller” column will list the ID number (usually the CAN ID) and user-assigned name of the controller associated with each curve. If a controller is not connected, then only the ID number is shown.
  • Page 128 MCO 305 Design Guide __ APOSS Tools __ Interpolation Data are recorded for a curve as a series of discrete sample points. This setting specifies how the Oscilloscope will interpolate values between the actual sample points. The settings are illustrated below: Typically, the choice of interpolation depends on the type of value being recorded.
  • Page 129 MCO 305 Design Guide __ APOSS Tools __ The width will specify the number of points on either side of each point that will be used in the averaging. For example, a width of 2 means 2 points on the left and 2 points on the right of each point for a total of 5 points in each averaged point.
  • Page 130 MCO 305 Design Guide __ APOSS Tools __ Curve Properties: Axis Min Height The Y-axis of the chart is normally scaled so that the entire curve can be drawn on the chart. However, this scaling cannot be determined in a way that will...
  • Page 131 MCO 305 Design Guide __ APOSS Tools __ NB!: As well as explicit sharing (e.g. curve B shares the Y-axis of curve A and curve C also shares the Y- axis of curve A), implicit chains can also be created (e.g. curve C shares the Y-axis of curve B and curve B shares the Y-axis of curve A …...
  • Page 132 MCO 305 Design Guide __ APOSS Tools __ Starting the Oscilloscope Starting the Oscilloscope involves following steps: 1. Opening an APOSS program in an APOSS Window. 2. Connecting to the controller. 3. If the TESTSETP Oscilloscope is being used, then before starting the Oscilloscope, execute the APOSS program which creates the TESTSETP array.
  • Page 133 MCO 305 Design Guide __ APOSS Tools __ The white boxes in the “Status” column indicate that controllers are not connected. However, the controller ID and connection interface can be seen at the far right side of the “Curve Selection List”.
  • Page 134 MCO 305 Design Guide __ APOSS Tools __ Sample Count This specifies the maximum number of points that will be saved in the TESTSETP array. If set to Fill available space, then as many points as possible will be saved in the array. If set to Fixed count, then not more than that many sets of points (i.e.
  • Page 135 MCO 305 Design Guide __ APOSS Tools __ Since the Oscilloscope does not control which values are recorded or the starting and stopping of – the recording, the Active column will always be empty for TESTSETP curves. Also note that the Start toolbar button will be disabled in the TESTSETP Oscilloscope since starting –...
  • Page 136 MCO 305 Design Guide __ APOSS Tools __ Old “.txt” files do not contain enough information about the original controller to reliably reconnect to the controller. Hence, the Status, Controller, and Interface columns are left empty. However, information about the original test parameters can be viewed using the curve Properties → Source window.
  • Page 137 MCO 305 Design Guide __ APOSS Tools __ Adding Oscilloscope Curves Curves are added to the Oscilloscope using the Add curve toolbar button. The types of curves that can be added will depend of the type of Oscilloscope being used.
  • Page 138 MCO 305 Design Guide __ APOSS Tools __ Usage Notes for Polling Mode If the Free Run Oscilloscope is being used in Polling Mode, then add the curves as usual but instead of selecting a group for the curve, the Polled (no group) option should be selected.
  • Page 139 MCO 305 Design Guide __ APOSS Tools __ SDO Curve A curve can be added for any SDO that can be read from the controller. There are three methods of recording the data for the curve: as a “polled” value, through a “Free Run”...
  • Page 140 If the SDO is being added to a Free Run group, then the user is able to select the PDO into which the SDO will be configured. The PDO event and inhibit times can also be set. (See SDO 1800 in SDO Object Dictionary CANopen Basic Data in the manual „MCO 305 Command Reference”.) NB!: The Specify SDO, Bit Mask, and Inhibit time fields are only available if the APOSS “User Mode”...
  • Page 141 MCO 305 Design Guide __ APOSS Tools __ PDO Curve If the application running on the controller is sending PDO messages, then a PDO curve can be used to extract data from the PDO message. The data can be extracted from any byte position within the PDO.
  • Page 142 MCO 305 Design Guide __ APOSS Tools __ Changing Byte order will also change the order of the example so that the user can tell exactly how the incoming PDO bytes will be handled. The Bit Mask fields contain hexadecimal values that will be used as a mask to extract the curve data from the selected bytes.
  • Page 143 MCO 305 Design Guide __ APOSS Tools __ Variable Curve If the application currently executing on the controller is known and has been compiled by APOSS, then curves can be added to the Oscilloscope for any variable used within the program. As with SDO curves, there are three methods of recording the data for the curve: Polled value –...
  • Page 144 The PDO event and inhibit times can also be set. (See SDO 1800 in SDO Object Dictionary CANopen Basic Data in the manual “MCO 305 Command Reference”.) The Inhibit time field is only available if the APOSS “User Mode” is set to “Expert”. The User Mode is set using the Settings →...
  • Page 145 MCO 305 Design Guide __ APOSS Tools __ Derived Curve If other curves have already been added, then curves can be added that are derived from those curves. The derived curve will always be added to the “Curve Selection List” after the curve from which it is derived.
  • Page 146 MCO 305 Design Guide __ APOSS Tools __ Bit Mask This is used to specify how a Bit Mask value is to be extracted from the original value (which is always a 32- bit value). The Example bytes can be used by the user to help verify the correct bit mask specification. The three small buttons can be used to generate different test values for the example.
  • Page 147 MCO 305 Design Guide __ APOSS Tools __ Name This is the name that will appear in the “Curve Selection List”. A default name will be given but the user should set this to some appropriate name. Recording Method If the Free Run Oscilloscope is being used, then this will be set to Free Run. In this case, sample data is transferred from the controller to the Oscilloscope in real time using PDO messages.
  • Page 148 MCO 305 Design Guide __ APOSS Tools __ TESTSETP Curve If a user configures a custom TESTSETP array in an APOSS program (i.e. rather than using the Single Shot Oscilloscope to configure the array automatically then a TESTSETP curve must be added to the Oscilloscope to store the data.
  • Page 149 MCO 305 Design Guide __ APOSS Tools __ Adding Curves from other Oscilloscope Files Curves defined in other Oscilloscope “.zbo” files can be copied into the current Oscilloscope by selecting the File tab. Note: This feature is only available if the “User Mode”...
  • Page 150 MCO 305 Design Guide __ APOSS Tools __ Starting and Ending the Test Once all the curves have been added, then the test itself can be started. This involves three steps: 1. Selecting which curves are to be recorded. 2. Starting the application program running on the controller.
  • Page 151 MCO 305 Design Guide __ APOSS Tools __ The order in which the test program execution is started and the Oscilloscope recording is started, is not fixed. The user is free to start the program execution and then the recording or start the recording and then the program execution, whichever is appropriate.
  • Page 152 MCO 305 Design Guide __ APOSS Tools __ Analyzing the Results Any of the following functions and features of the Oscilloscope can be used to help analyze the recorded data: 1. The curves in the Chart Window may show correlations or anomalies. Use the Zoom toolbar buttons and the Navigation Window to display more detailed portions of the curves.
  • Page 153 MCO 305 Design Guide __ APOSS Tools __ Repeating the Test Once Oscilloscope recording has been stopped, then the user is free to make any necessary changes, additions, and deletions to the curves. Recording can be restarted simply by pressing the Start button again.
  • Page 154 MCO 305 Design Guide __ APOSS Tools __ Oscilloscope Settings Various global Oscilloscope attributes and defaults can be set using the Settings → Oscilloscope menu command. X axis Min Length specifies the minimum length of the X-axis in the Chart Window. This value is used when the chart is empty.
  • Page 155 MCO 305 Design Guide __ APOSS Tools __ Poll Rate The poll rate specifies how often the Oscilloscope will try to read data for polled curves from the controller when an Oscilloscope “run” start been started. Care should be taken not to set this time shorter than necessary as it can significantly increase demands on the PC processor, the controller processor, and the communication network.
  • Page 157: How To Program

    How to Program Programming the MCO with the APOSS Macro-language The following chapters describe how to program the FC 300 with MCO 305 using APOSS. Beginners should read the basic explanations on the programming language APOSS, i.e. program layout, command structure, interrupt, elements of the programming language, and arithmetic.
  • Page 158 MCO 305 Design Guide __ How to Program __ Followed by the main program loop: main: IF (IN 3 == 1) THEN main: // Go into synchronizing mode, if input 3 = 1 … GOSUB syncprog GOTO main ELSE // If input 3 not 1, run in speed mode...
  • Page 159 MCO 305 Design Guide __ How to Program __ Or it could look like: DIM statement pragmas variable declarations function definitions program code SUBMAINPROG subprogram definitions ENDPROG Function definitions can also be anywhere in the program code as well as variable declarations or function declarations.
  • Page 160 MCO 305 Design Guide __ How to Program __ Command Structure All instructions consist of: COMMAND WORD + possible Parameter. A variable can also be used as parameter instead of an absolute number. Example POSA 10000 pos = 10000 POSA pos Input Values As in other programming languages the values inputted are not tested.
  • Page 161 MCO 305 Design Guide __ How to Program __ Debugging Development → Messages -> Log file can be used to start the logging of messages to a file. Note that “Stop logging” will be enabled if logging has been started.
  • Page 162 MCO 305 Design Guide __ How to Program __ this is broken down into a series of APOSS machine code commands and the intermediate results are stored in temporary registers. Only at the end of the sequence is the result stored in “target”.
  • Page 163 MCO 305 Design Guide __ How to Program __ ON INT / ON COMBIT / ON STATBIT If two (input) interrupts occur simultaneously, then the one with the lower number is executed first, however the other is not lost. After the interrupt procedure is completed the other is called up accordingly.
  • Page 164 MCO 305 Design Guide __ How to Program __ Constants Constants can be used anywhere where parameters or values are expected. Constants are usually entered in integral numbers, for example: value = 5000 Constants … – are integer number values between –2 to +2 billion, –...
  • Page 165 MCO 305 Design Guide __ How to Program __ The DIM statement specifies the arrays to be subsequently used. If no arrays have been previously created then they will be created now. If arrays had been previously defined then it is important that the information corresponds with the original definition.
  • Page 166 MCO 305 Design Guide __ How to Program __ Indexes The elements of an array are designated by a corresponding index in square brackets: xpos[5]. Indexes are allowed from 1 to the size of the array defined. Thus, in the above case for xpos from 1 to 20. If an attempt is made to access elements before or after this array then an error message is generated since this could lead to data overrun and destruction of the array.
  • Page 167 MCO 305 Design Guide __ How to Program __ long a,b,c,d double u,v,y,z // x is not allowed, because it is used for axes notification x(n) It is recommended that NOIMPLICIT be used since this avoids the creation of unwanted definitions of new LONG variables by mistake (e.g.
  • Page 168 MCO 305 Design Guide __ How to Program __ where a is a long variable and y is a double variable, then the a is cast to double before the multiplication is executed. But you must be careful. If y = a % 2 Then the integer a is first divided by 2 (integer arithmetic) and then the result is converted to double before it is assigned to y.
  • Page 169 MCO 305 Design Guide __ How to Program __ Arithmetic The compiler offers the following commands and parameters: Operators plus, minus, times, divided by, XOR, Modulo, Division, Absolute amount Bit operators and, or, invert, left-shift, right-shift, bit, byte, word, long...
  • Page 170 MCO 305 Design Guide __ How to Program __ Double precision Operators All operators (+,-,*,%,++,--) are available as double operators starting with MCO 5.00. NB!: Up to these compiler and firmware versions all arithmetical operations had been integer number operations.
  • Page 171 MCO 305 Design Guide __ How to Program __ Comparison Operations and Logical Operations Comparison operations Logical operations > greater than < less than >= greater than or equal to <= less than or equal to the same as not equal...
  • Page 172: Preprocessor

    Please note that the syntax of the #include statement for versions of the APOSS IDE prior to MCO 305 is different. Before the statement contained no quotes. If an “old” program is opened using a new version, then quotes will be automatically added.
  • Page 173 MCO 305 Design Guide __ How to Program __ All instances of “name” that follow this statement will be replaced with “string”. Note that “string” will contain all characters (including spaces) up to the end of the line. The line may be continued using the “\”...
  • Page 174 MCO 305 Design Guide __ How to Program __ #ifdef, #ifndef, #if Program code can be conditionally compiled using any of the following statements: #ifdef name - If "name" has been defined using #define. #ifndef name - If "name" has not been defined using #define.
  • Page 175: Aposs Command Groups

    All commands are described in detail and alphabetically ordered as well as complemented with short examples in the manual MCO 305 Command Reference. Initialization Commands Commands to initialize the axes and MCO 305 start up and define the zero point(s). (Group INI) Command Description...
  • Page 176 MCO 305 Design Guide __ How to Program __ Command Description Syntax Parameter … ENDIF end of the conditional program execution ENDIF LOOP repeats loop LOOP n label n = number of repetitions label = target position MOTOR STOP motor-stop with a programmed delay (with MOTOR STOP –...
  • Page 177 MCO 305 Design Guide __ How to Program __ Input/Output Commands Commands for setting and re-setting the outputs, reading the inputs (Group I/O) Command Description Syntax Parameter reads input bit-by-bit (individually) res = IN n n = input number INAD...
  • Page 178 MCO 305 Design Guide __ How to Program __ Command Description Syntax Parameter IPOSDIFF overflow handling of incremental res = IPOSDIFF oldpos = encoders in applications oldpos IPOS at a previous time JERKFINVEL calculates the final velocity for a res = JERKFINVEL –...
  • Page 179 MCO 305 Design Guide __ How to Program __ Command Description Syntax Parameter TESTSETTIME defines the sampling period for data TESTSETTIME ms ms = sampling period in ms recording TESTSETTYPE defines “one time” or “cyclic” TESTSETTYPE type type: recording 0 = one time recording...
  • Page 180 MCO 305 Design Guide __ How to Program __ Interrupt Functions Command Description Syntax Parameter DISABLE .. locks the execution of interrupts DISABLE inttyp inttyp = INT, COMBIT, … ENABLE .. enables locked interrupts ENABLE inttyp inttyp = INT, COMBIT, …...
  • Page 181 MCO 305 Design Guide __ How to Program __ Command Description Syntax Parameter type = any POSINT ON +/- type position = depending on the ON posint position SETOUT command in user units [UU], SETOUT outno or master user units [MU],...
  • Page 182 All parameters with a parameter code can be set and read with the following commands. (Group PAR). Command Description Syntax Parameter reads parameter values (MCO 305 and res = GET par par = parameter identification application parameters) GETVLT reads FC 300 parameter values...
  • Page 183 MCO 305 Design Guide __ How to Program __ Communication Option Commands Command Description Syntax Parameter COMOPTSEND writes in the Communication option COMOPTSEND no no = number of words to be buffer array send array = name of an array (at...
  • Page 184 MCO 305 Design Guide __ How to Program __ Synchronizing Commands Commands to synchronize the slave with the master or the master simulation. (Group SYN) Command Description Syntax Parameter DEFSYNCORIGIN Defines master-slave relation for DEFSYNCORIGIN master = reference position in qc...
  • Page 185 MCO 305 Design Guide __ How to Program __ CAM Commands Commands for the synchronization in CAM-Mode (CAM control). Command Description Syntax Parameter CURVEPOS Retrieve slave curve position that res = CURVEPOS – corresponds to the current master position of the curve.
  • Page 186 MCO 305 Design Guide __ How to Program __ CAN Basic library Raw Telegram mode This library contains all the functions necessary to do raw CAN telegram transfer. So you can define mailboxes with the commands DEFCANIN and DEFCANOUT for reading and writing telegrams. Those commands allow the length and telegram id (standard 11 bit identifiers) to be chosen.
  • Page 187 MCO 305 Design Guide __ How to Program __ The following functions handle buffered transfer: Command Description Syntax Parameter INGLB reads Glb CAN message res = INGLB (p) p = time-out, defined . . . 0 = waits until a message arrives >...
  • Page 188 MCO 305 Design Guide __ How to Program __ CANopen Master library This library has functions to support the usage of CANopen Slaves like I/O modules or encoders or even drives. Those functions do not only allow the configuration with SDOs but do allow the usage of process data through PDOs.
  • Page 189 MCO 305 Design Guide __ How to Program __ Parameter Command Description Syntax SDOREADSEGP Segmented read of SDOs res = SDOREADSEGP id = CAN id number (packed). id, index, subindex, -id = executes the command without arrayname waiting for the answer...
  • Page 190 MCO 305 Design Guide __ How to Program __ CANopen Slave library This library contains all functions which are necessary to act as a CANopen Slave. With special application software, it would even be possible to behave like a DS402 drive.
  • Page 191: Get A General Idea Of Program Samples

    MCO 305 Design Guide __ How to Program __ Get a General Idea of Program Samples Some samples are described in the manual “Operation Instructions” or in the chapter “Functions and Samples” in this Design Guide. All other samples are you will find in the online help. Many of the samples are delivered with the APOSS software, too.
  • Page 192 MCO 305 Design Guide __ How to Program __ File name or Where to find? Description topic Online Manual or help Software INB_01.M Displays the status of all digital inputs. INB_02.M Displays the signal levels of all digital inputs and transfers them to the outputs.
  • Page 193 MCO 305 Design Guide __ How to Program __ File name or Where to find? Description topic Online Manual or help Software syncc_msim.m Simulation of a master via software command. TORIG_01.M Defines different temporary zero points and shows what it means to the current position information.
  • Page 195: Parameter Reference

    MCO 305 Design Guide Parameter Reference FC 300, MCO 305, and Application Parameters Basically there are these main parameter types: FC 300 parameters, MCO 305 parameters, and application parameters (group 19-**): – FC 300 and MCO 305 Parameters The parameters concerning the Frequency Converter are described in FC 300 Design Guide. The follo- wing section describes all the parameters which are necessary or helpful using the MCO 305.
  • Page 196 (group 19-**). There are two commands for reading parameters: − GET is used to read all MCO 305 related parameters i.e. groups 19-**, 32-**, 33-**, and 34-**. − GETVLT is used to read all other FC 300 parameters.
  • Page 197: Fc 300 Parameters Overview

    Parameter changes made by SET or SETVLT are only stored in RAM and will be lost at power down, exception: The application parameters (group 19-**) are automatically stored at power down. The other MCO 305 parameters (group 32-** and 33-**) can be saved by means of the SAVE AXPARS command.
  • Page 198 MCO 305 Design Guide __ Parameter Reference __ Par. number New selections New default 3-41 0.01 s 3-42 3-51 3-52 3-61 3-62 3-71 3-72 4-10 “Both Directions” 5-10 [0] No operation 5-11 5-12 5-13 5-30 [51] MCO Controlled [51] MCO Controlled...
  • Page 199: Application Settings

    MCO 305 Design Guide __ Parameter Reference __ Application Settings 19-90 .. 19-99 Read only Application 19-** Application Parameters Parameters 19-00 ...19-89 Application Parameters Range Range -2147483648 – 2147483647 -2147483648 – 2147483647 (Range depends on the data linked to the read-out...
  • Page 200: Mco Parameters

    MCO 305 Design Guide __ Parameter Reference __ MCO Parameters For a better overview the MCO Parameters are divided into groups: 32-** MCO Basic Settings 32-0* Encoder 2 - Slave page 201 32-3* Encoder 1 - Master page 202 32-5*...
  • Page 201: Mco Basics Settings

    MCO 305 Design Guide __ Parameter Reference __ MCO Basics Settings NB!: 32-0* Encoder 2 - Slave page 201 Prior to the commands to change the encoder a MOTOR OFF must always be 32-3* Encoder 1 – Master page 202...
  • Page 202 MCO 305 Design Guide __ Parameter Reference __ 32-01 Incremental Resolution 32-02 Absolute Protocol ENCODER ENCODERABSTYPE Range [Unit] Option 1 – MLONG [PPR] 1024 None Hiperface Function The encoder resolution is used to calculate velocity SSI with filter in RPM (rounds per minute) as well as timeout for...
  • Page 203 (encoder or MCO 305) is allowed to 4800 generate the data signal when multiple MCO 305’s are interconnected. 9600 Select On [1] if the MCO 305 is connected to just 19200 one absolute encoder. 38400 Note: Parameter only visible when par. 32-02 ≠ 0 Function Select the baud rate of the attached encoder.
  • Page 204 MCO 305 Design Guide __ Parameter Reference __ 32-09 Encoder Monitoring 4 = Same as [2], i.e. the sign of the reference value is reversed internally; in addition, the ENCODERMONITORING sign of the user unit is negated as in [3].
  • Page 205 MCO 305 Design Guide __ Parameter Reference __ All path information in motion commands are made Example 2 in user units and are converted to quad-counts Cylinder: internally. By choosing these scaling units corres- Gear factor = 5/1 pondingly it is possible to work with any technical Encoder resolution (incremental encoder) = 500 measurement unit (for example mm).
  • Page 206 MCO 305 Design Guide __ Parameter Reference __ Select Soft zero setting [2] if the encoder is used 32-3* Encoder 1 - Master by another axis or for some other purpose and it is Following parameters configures the interface for...
  • Page 207 MCO 305 Design Guide __ Parameter Reference __ The automatic generated objects can just be Select None [0] if no absolute encoder is deleted or reconfigured by a new differing SET connected. MENCODERTYPE. Also in the case of program abort...
  • Page 208 (encoder or MCO 305) is allowed to gene- rate the data signal when multiple MCO 305’s are interconnected. Select On [1] if the MCO 305 is connected to just one absolute encoder. Note: Parameter only visible when par. 32-32 ≠ 0...
  • Page 209 Encoder 1 node ID – One encoder is connected to multiple MCO 305 – The virtual master output of one MCO 305 is Range connected to multiple MCO 305. 1 – 127 Select On [1] when the encoder is only connected Function to this MCO 305.
  • Page 210 MCO 305. Rule of Thumb: Choose [3] for MCO 305 feedback from feedback KPROP greater = Drive will become 'stiffer' source given in Par. 102. This can be internal 24V KPROP too high = Tendency to overswing encoder, Encoder option, or resolver option.
  • Page 211 MCO 305 Design Guide __ Parameter Reference __ 32-63 Limit Value for Integral Sum When working with a normal PID algorithm the FFVEL must always be the same as the D factor in KILIM order to achieve typical dampening D.
  • Page 212 MCO 305 Design Guide __ Parameter Reference __ 32-68 Reverse Behavior for Slave 32-70 Scan Time for Profile Generator REVERS PROFTIME Option Option Reversing allowed 1 ms Reversing only allowed when master 2 ms is reversed 3 ms Reversing blocked...
  • Page 213 MCO 305 Design Guide __ Parameter Reference __ 32-72 Size of the Control Window (Deactiv.) This handling of the integral part can be an advan- tage for synchronization applications, where low REGWMIN synchronization errors are requested, but no hard Range regulation at standstill is wanted.
  • Page 214 If you work with the MCO 305 then you should always set the ramps via the option card and not in the FC 300. The FC 300 ramps must always be set to minimum.
  • Page 215 MCO 305 Design Guide __ Parameter Reference __ 32-83 Velocity Resolution There are four different JERKMIN options, see “Limited Jerk” in chapter “Function and Examples” VELRES and the parameter 32-87, 32-88, and 32-89. Range The maximum Jerk used with par. 32-82 Ramp 1 –...
  • Page 216 MCO 305 Design Guide __ Parameter Reference __ Function 32-89 Dec. down for limited jerk Acceleration ramp-down constant. This specifies JERKMIN4 the time in milliseconds required to ramp the acce- Range leration down from maximum acceleration to 0 (i.e. normally to constant maximum velocity). If set to 0 …...
  • Page 217: Mco Advanced Settings

    MCO 305 Design Guide __ Parameter Reference __ MCO Advanced Settings 33-01 Zero Point Offset from Home Position HOME_OFFSET 33-0* Home Motion page 217 Range [unit] 33-1* Synchronization page 218 -MLONG – MLONG [qc] 33-4* Limit Handling page 227 33-5*...
  • Page 218 MCO 305 Design Guide __ Parameter Reference __ Home Velocity [RPM] 33-1* Synchronization Maximum Velocity par. Home Velocity ∗ Position, velocity and angle/position synchroni- Velocity Resolution zation, with or without marker and more is possible with following parameters: ACHTUNG!: Since the program always searches for...
  • Page 219 MCO 305 Design Guide __ Parameter Reference __ Example 2 In conjunction with CAM synchronization the para- meters Synchronizing Factor Master and Slave are Conveyor belt: used to transform qc into MU. This allows the user The input should be possible in 1/10 mm to work with meaningful units in the CAM-Editor.
  • Page 220 MCO 305 Design Guide __ Parameter Reference __ Function Function Defines how large the difference between the Tolerated deviance of the slave drive from the actual master and slave position can be during a master velocity in %. position synchronization (SYNCP and SYNCM), so This parameter indicates by how many percent the that the required accuracy is still fulfilled.
  • Page 221 MCO 305 Design Guide __ Parameter Reference __ 33-16 Marker Number for Slave In a CAM synchronization, the distance of the sen- sor to the working position in MU will be indicated SYNCMARKS instead of the distance between two master mar- Range kers.
  • Page 222 MCO 305 Design Guide __ Parameter Reference __ 33-20 Slave Marker Type marker is also ignored and only corrected the next time, i.e. no catching up to the next marker. SYNCMTYPS When SYNCM (or SYNCCSTART) is started the Option monitoring only begins when the first marker has Encoder Z positive flank been found.
  • Page 223 MCO 305 Design Guide __ Parameter Reference __ 33-23 Start Behavior for Sync. 7 = Start with a polynomial 5 to reach the master exactly in a marker position. SYNCMSTART (with Marker Correction) 1000 = as [0], but an offset (par. 33-12...
  • Page 224 MCO 305 Design Guide __ Parameter Reference __ 33-25 Marker Number for Ready With the following: Cmdvel = set velocity SYNCREADY Old_Cmdvel = last set velocity Range Actvel = actual velocity of the master = sampling time (fixed 1ms) 0 – 10000 τ_filt...
  • Page 225 MCO 305 Design Guide __ Parameter Reference __ The Offset Filter Time defines the time which 4 = The Filter Time for Marker Correction (par. should be used to compensate one marker 33-29) is used instead of the Offset Filter distance.
  • Page 226 MCO 305 Design Guide __ Parameter Reference __ NB!: then Filtered Old Master Velocity is calculated with Master velocity filtering par. 33-26 a filter time constant equal SYNCVFTIME / 1000 Velocity Filter is given in 1/1000 ms for a Else the Filtered Old master velocity is set equal to better resolution, but the marker filtering the actual master velocity.
  • Page 227 See also Marker Correction illustration in chapter position (where slave will be in 1 ms). Thus it will “Technical Reference” in “MCO 305 Command always drive behind the master, as long as no Reference”.
  • Page 228 MCO 305 Design Guide __ Parameter Reference __ Function This parameter allows the deactivation of the par. 33-26 Velocity Filter if the error becomes bigger This parameter supports velocity dependent posi- than SYNCVFLIMIT. If the filter error tion feed forward in synchronous modes (SYNCP/ (PFG_G_MFILTERROR) exceeds the value of SYNCM/ SYNCC).
  • Page 229 MCO 305 Design Guide __ Parameter Reference __ 33-42 Positive Software End Limit 33-4* Limit Handling POSLIMIT Parameters for determination the limit switches behavior. Range [Unit] -MLONG – MLONG [qc] 500000 33-40 Behavior at End Limit Switch Function ENDSWMOD POSLIMIT indicates the Positive position limit for all Option movements.
  • Page 230 MCO 305 Design Guide __ Parameter Reference __ It is possible to clear a software limit error and 33-45 Time in Target Window then drive in the opposite direction. If you try TESTTIM again to move in the wrong direction, then the error 198 occurs.
  • Page 231 Modified handling of TESTWIN to adapt to – Home switch no [1]: Defines digital input_n of the needs of CANopen: If TESTTIM is set MCO 305 as home switch. Behavior after but TESTVAL is not set, then the CANopen reaching see HOME_TYPE.
  • Page 232 Function – Start program exe nc [14]: Defines digital Defines function of digital input 1 of MCO 305. input_n to be used to define the type of program start. If the input_n is set to [14], the...
  • Page 233 I_FUNCTION_4 I_FUNCTION_10 No function No function Function Function Defines function of digital input 4 of MCO 305. Defines function of digital input 10 of MCO 305. 33-54 Terminal X57/5 Digital Input 33-60 Terminal X59/1 and X59/2 Mode I_FUNCTION_5 IOMODE No function...
  • Page 234 When the error is cleared this output is re-set. Function NB!: Defines function of digital output 1 of MCO 305. The setting of this parameter does not influence the use of the OUT and OUTB NOTE: This parameter is only visible when par. 33- commands.
  • Page 235 PRGPAR No function Range Function -1 – 127 Defines function of digital output 3 of MCO 305. –1 = Program number is not activated, i.e. no program to start after autoexec 0 – 127 = activated program number is started...
  • Page 236 113 will be activated if FC 300 is not enabled (e.g. be deleted at once. In all other cases the trip) while MCO 305 is in the MOTOR ON state control can be switched off in the error routine (position control).
  • Page 237 OUTMSG, 1 = As [0], but all outputs including the FC 300 INMSG, and INGLB. outputs (if controlled by MCO 305) are set at [0]. Exception: The brake output – if defined – is 33-91 X62 MCO CAN baud rate always activated.
  • Page 238: Mco Data Readouts

    But at index [n] only MCO PCD[n] Write can be 115200 Baud selected. This selection defines that corresponding sub indices will be consumed by the MCO 305. Function This also makes it possible to set the indices 0 and 1 (CTW/STW and REF/MAV) to MCO. This might Defines the baud rate of the MCO RS485 serial link.
  • Page 239 But at index [n] only "MCO PCD[n] Read" can be selected. This selection defines that the correspon- Function ding sub indices will be produced by the MCO 305. Current master position in qc; corresponds to MAPOS command. 34-4* Inputs & Outputs...
  • Page 240 (converted with drive factor and Function offset) and the actual position of the slave. The Displays MCO 305 alarm word for readout of MCO result is displayed in UU and errors in MCT 10. as an absolute value when the value of the Par.
  • Page 241 MCO 305 Design Guide __ Parameter Reference __ 34-71 MCO Alarm Word 2 Function Displays MCO 305 alarm word for readout of MCO errors in MCT 10. Par. 34-71 cannot be readout while motor is running. Meaning 00000001 Illegal axis number...
  • Page 242: Parameter Lists

    MCO 305 Design Guide __ Parameter Reference __ Parameter Lists The parameters are determined by parameter numbers. We recommend using the alphabetical overview as a guide; then you will be able to find detailed information very quickly using the number.
  • Page 243 MCO 305 Design Guide __ Parameter Reference __ MCO Basics Settings, Parameter List Par. No. Parameter name Parameter description Default Changes 4-set-up Conver- Type setting during sion index operation 32-0* Encoder 2 - Slave 32-00 ENCODERTYPE Incremental Signal Type [1] RS422...
  • Page 244 MCO 305 Design Guide __ Parameter Reference __ Par. No. Parameter name Parameter description Default Changes 4-set-up Conver- Type setting during sion index operation 32-40 MENCODER TERM Encoder Termination [1] On TRUE 2 set-ups Uint8 32-43 MENCCONTROL Enc.1 Control TRUE...
  • Page 245 MCO 305 Design Guide __ Parameter Reference __ Par. No. Parameter name Parameter description Default Changes 4-set-up Conver- Type setting during sion index operation 32-88 JERKMIN3 Dec. up for limited jerk 0 ms TRUE 2 set-ups Uint32 32-89 JERKMIN4 Dec. down for limited jerk...
  • Page 246 MCO 305 Design Guide __ Parameter Reference __ MCO Advanced Settings, Parameter List Par. No. Parameter name Parameter description Default Changes 4-set-up Conver- Type setting during sion operation index 33-0* Home Motion 33-00 HOME_FORCE Force HOME [0] not forced 'TRUE'...
  • Page 247 MCO 305 Design Guide __ Parameter Reference __ Par. No. Parameter name Parameter description Default Changes 4-set-up Conver- Type setting during sion operation index 33-32 SYNCFFVEL Feed Forward Speed TRUE 2 set-ups Uint32 Adaptation 33-33 SYNCVFLIMIT Velocity Filter Window 0 qc...
  • Page 248 MCO 305 Design Guide __ Parameter Reference __ Par. No. Parameter name Parameter description Default Changes 4-set-up Conver- Type setting during sion operation index 33-64 O_FUNCTION_2 Terminal X59/2 Digital [0] no function TRUE 2 set-ups Uint8 Output 33-65 O_FUNCTION_3 Terminal X59/3 Digital...
  • Page 249 MCO 305 Design Guide __ Parameter Reference __ Par. No. Parameter Name Parameter description Default Changes 4-Setup Conver- Type setting during sion operation Index 34-07 PCD 7 Write to MCO All set-ups Uint16 34-08 PCD 8 Write to MCO All set-ups...
  • Page 251: Troubleshooting

    Starting with MCO 305 the last 50 errors since power up are stored internally. This information is not stored in flash. It can be read out by APOSS (see Error History) or by SDO access. For every error, not only time and axis are stored, but also additional error information.
  • Page 252 MCO 305 Design Guide __ Troubleshooting __ Error LCP display APOSS Error message Too many CAN objects There are no more CAN objects available (CANINI). Illegal axis num. Axis not in system. Error not reset Error not cleared. Home not done Failed to move to HOME position.
  • Page 253 MCO 305 Design Guide __ Troubleshooting __ Error LCP display APOSS Error message Encoder error Encoder error Stack overflow Stack overflow: Too many local variables or nested function calls. Out of dyn. mem Out of dynamic memory. Too many test indices Too many test indices in data logging command.
  • Page 254 MCO 305 Design Guide __ Troubleshooting __ Error 103 Error 109 Illegal axis number Index not found At reference or index search, the encoder index A motion command is addressing an axis number greater than 1. pulse could not be found within a motor rotation.
  • Page 255 MCO 305 Design Guide __ Troubleshooting __ Software-Limit error handling a up MCO 5.00: A Otherwise motion programs which require applica- Software-Limit error can not be cleared: The tion parameters will no longer function correctly. control unit will be switched off and the drive must...
  • Page 256 MCO 305 Design Guide __ Troubleshooting __ Error 125 Error 152 Limit switch activated Too many RETURN commands A motion command has caused a hardware limit There are either more RETURN than corresponding switch to be activated. GOSUB commands in the program, or there is a...
  • Page 257 MCO 305 Design Guide __ Troubleshooting __ Error 170 Error 179 Too many DIM arrays Waitndx timeout The definition of an array in a DIM command does Timeout while waiting for index: The command not correspond to an already existing array in the WAITNDX was executed and the timeout listed was MCO 305.
  • Page 258 MCO 305 Design Guide __ Troubleshooting __ Error 188 Error 192 CAN guarding error Encoder error A guarding error happened. This happens either Error from encoder monitoring: open or short when requesting guarding messages from slaves or circuit in accordance with the displayed LED.
  • Page 259: Aposs Software Messages

    MCO 305 Design Guide __ Troubleshooting __ APOSS Software Messages When re-saving a configuration (e.g. with Controller → Parameters → Restore from file) the The APOSS software messages are arranged in computer recognizes that the data in the array alphabetical order.
  • Page 261: Index

    MCO 305 Design Guide Index Arithmetic............169 Array Editor ............105 Expert mode WITH an Array Def. File ....113 #define, #undef ..........172 Expert mode WITHOUT an Array Def. File .... 111 #ifdef, #ifndef, #if ..........174 Starting............105 #include.............
  • Page 262 ENCODERDELAY ..........203 Controller Menu............. 70 ENCODERFREQ............ 203 Convert Tabs ............63 ENCODERMONITORING ........204 Convert VLT 5000 > MCO 305......... 67 ENCODERTYPE ............ 201 Curve Data Export into a txt file ......152 ENDSWMOD............229 Curve Data Index card ........... 95 ERRCOND ............
  • Page 263 Starting and Ending the Test......150 Master Units [MU] ...........9 Versions ............117 MCO 305 .............. 11 Oscilloscope Files MCO 305 Parameters ........... 195 Adding Curves from other........149 MCO Advanced Settings ........217 MCO Basics Settings ..........201 MCO Data Readouts ..........238 Parameter Access ..........
  • Page 264 MCO 305 Design Guide __ Index __ Parameter List ............ 242 Programming Language, elements ......163 Programs..............70 Application Parameters ........242 MCO Advanced Settings ........246 MCO Basics Settings ......... 243 MCO Data Readouts.......... 248 Quad-counts ............6 Parameters ............74 Axis ..............
  • Page 265 MCO 305 Design Guide __ Index __ SWNEGLIMACT............ 229 SWPOSLIMACT............ 230 Tabs ..............60 Symbols ..............5 Tangent Points ............35 Sync Marker Index Card ......... 99 TESTSETP Curve..........148 SYNCACCURACY ..........219 TESTSETP Oscilloscope ......... 118 SYNCFACTM............218 TESTSETP Oscilloscope Usage Notes ...... 134 SYNCFACTS ............

Table of Contents