Omron R88A-MCW151-DRT-E Operation Manual

Omron R88A-MCW151-DRT-E Operation Manual

Mcw151 series motion control option board
Table of Contents

Advertisement

Cat. No. I203-E2-02
R88A-MCW151-E
R88A-MCW151-DRT-E
Motion Control Option
Board
OPERATION MANUAL

Advertisement

Table of Contents
loading

Summary of Contents for Omron R88A-MCW151-DRT-E

  • Page 1 Cat. No. I203-E2-02 R88A-MCW151-E R88A-MCW151-DRT-E Motion Control Option Board OPERATION MANUAL...
  • Page 2 MCW151 Series Motion Control Option Board Models: R88A-MCW151-E R88A-MCW151-DRT-E Operation Manual Produced March 2003...
  • Page 4 DeviceNet is a registered trademark of the Open DeviceNet Vendor Association, Inc. OMRON, 2003 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
  • Page 6 DRT-E Motion Control Option Boards (MC Units) and includes the sections described below. Please read this manual and the related manuals listed in the following table carefully and be sure you understand the information provided before attempting to install or operate the MC Unit. Be sure to read the precautions provided in the following section.
  • Page 8: Table Of Contents

    Installation and Wiring Precautions ........
  • Page 9 Problems and Countermeasures........
  • Page 10: Precautions

    Conformance to EC Directives ........
  • Page 11: Intended Audience

    3. The application of the product to systems, machines, or equipment that may have a serious influence on human life and property if they are used improperly. ! W A R N I N G...
  • Page 12 MC Unit. Not providing sufficient safety measures may result in seri- ous accidents, or property damage. • The MC Unit outputs may remain ON or OFF due to deposits on or burning of the out- put relays, or destruction of the output transistors. As a counter-measure for such prob- lems, external safety measures must be provided to ensure safety in the system.
  • Page 13: Storage And Transportation Precautions

    Storage and Transportation Precautions Storage and Transportation Precautions Do not hold the product by the cables or motor shaft while transporting it. Doing so may ! C a u t i o n result in injury or malfunction. Do not place any load exceeding the figure indicated on the product. Doing so may result ! C a u t i o n in injury or malfunction.
  • Page 14: Operation And Adjustment Precautions

    ! C a u t i o n running. Otherwise, unexpected operation may be caused. Do not turn OFF the power supply to the Unit while data is being written to flash memory. ! C a u t i o n Doing so may cause problems with the flash memory.
  • Page 15: Concepts

    EN61000-6-2, EN50082-2 EMI (Electromagnetic Interference): EN55011 Class A Group 1 Low Voltage Directive Always ensure that devices operating at voltages of 50 to 1,000 VAC or 75 to 1,500 VDC meet the required safety standards. 8-1-1 Conformance to EC Directives The W-series Servo Driver complies with EC Directives.
  • Page 16: Features And System Configuration

    Other Operations........
  • Page 17: Features

    Continuous Path Control Continuous path (CP) control enables the user not only to control the start and end positions, but also the path between those points. Possible multi-axis paths are linear interpolation and circular interpolation. Also user defined paths can be realized with the CAM control.
  • Page 18: Description Of Features

    The multi-task BASIC motion control language is used to program the MC BASIC Motion Control Unit. A total of 14 programs can be held in the Unit and up to 3 tasks can be Language run simultaneously. The MC Unit is programmed using a Windows-based application called Motion Perfect.
  • Page 19 Features Virtual Axes The MC Unit contains a total of 3 axes, of which two can be configured as vir- tual axis. The virtual axes are internal axes and are used for computational purposes. They act as perfect servo axes and are very useful for creating pro- files.
  • Page 20: System Configuration

    Typical applicable Units for Encoder Output MCW151 Unit MCW151 Unit Servo Driver Note 1. The RS-422A/485 Serial Port 2 is only available on the MCW151-E Unit. 2. The MC Unit has one encoder axis. Either the encoder input or the encoder output can be used.
  • Page 21 Motion Perfect) Motion Perfect Version 2.0 or later Note The MC Unit must be used with a Servo Driver with software version 14 or later. The MC Unit cannot be used with software version 8. DeviceNet Configuration A DeviceNet system can be constructed in two ways: fixed allocation or free (MCW151-DRT-E only) allocation.
  • Page 22: Motion Control Concepts

    A move is defined in either absolute or relative terms. An absolute move takes the axis to a specific predefined position with respect to the origin point. A rel- ative move takes the axis from the current position to a position that is defined...
  • Page 23: Ptp-Control

    MOVEABS(50) AXIS(1) Axis 0 At start, both the axis 0 and axis 1 will move to a coordinate of 50 over the same duration of time. At this point, axis 1 will stop and the axis 0 will con- tinue to move to a coordinate of 100.
  • Page 24 The required maxi- mum speed has been set to 10 m/s. In order to reach this speed in one second and also to decelerate to zero speed again in one second, both the acceleration as the deceleration rate have been set to 10 m/s .
  • Page 25: Cp-Control

    • CAM control Linear Interpolation In applications it can be required for a set of motors to perform a move opera- tion from one position to another in a straight line. Linearly interpolated moves can take place among several axes. The commands MOVE and MOVEABS are also used for the linear interpolation.
  • Page 26: Eg-Control

    It may be required that a tool travels from the starting point to the end point in an arc of a circle. In this instance the motion of two axes is related via a circu- lar interpolated move using the MOVECIRC command. Consider the following diagram.
  • Page 27 Motion Control Concepts Electronic Gearbox The MC Unit is able to have a gearbox link from one axis to another as if there is a physical gearbox connecting them. This can be done using the CON- NECT command in the program. In the command the ratio and the axis to link to are specified.
  • Page 28: Other Operations

    Time Adding Axes It is very useful to be able to add all movements of one axis to another. One possible application is for instance changing the offset between two axes linked by an electronic gearbox. The MC Unit provides this possibility by using the ADDAX command.
  • Page 29: Control System Configuration

    Control System Configuration Print Registration The MC Unit can capture the position of an axis in a register when an event occurs. The event is referred to as the print registration input. On the rising or falling edge of an input signal, which is either the Z-marker or an input, the MC Unit captures the position of an axis in hardware.
  • Page 30 MC Unit tems applied to positioning devices for industrial applications. The following graph shows the basic principle of the Servo System as used in the MC Unit. 1,2,3... 1. The MC Unit performs actual position control. The main input of the con- troller is the following error, which is the calculated difference between the demand position and the actual measured position.
  • Page 31 Section 1-4 Control System Configuration The Motion Control algorithm of the MC Unit is shown in the diagram below. Output Demand Following signal position error Measured position Proportional Gain The proportional gain creates an output that is proportional to the following error All practical systems use proportional gain.
  • Page 32: Encoder Signals

    Phase B Counts (x4) The signals A, B and Z appear physically as A+ and A-, B+ and B- and Z+ and Z-. These appear as differential signals on twisted-pair wire inputs, ensuring that common modes are rejected and that the noise level is kept to a mini- mum.
  • Page 33 The Z-phase signal has the following specification: • The Z-marker has a period of 4096 generated edges. • The pulse has a width of a quarter pulse period length (when both phase A and B are low). • The Z-phase signal is active after power-on.
  • Page 34: Specifications

    5 VDC (supplied from the control power supply of the Servo Driver) 24 VDC (supplied from external power supply) Total Power Consumption 4.0 W External Dimensions 20 x 142 x 128 mm (H x W x D) Approx. Mass 200 g Current Consumption 170 mA for 24 VDC...
  • Page 35 Internal counts to output pulse ratio: 64 : 1 Digital Inputs Total of 8 digital inputs can be wired and used for instance for limit switches, emergency stop and prox- imity inputs. Two inputs can be used for registration of the encoder input/output axis.
  • Page 36: Comparison Between Firmware Versions

    The following table shows a comparison between the two current versions of the R88A-MCW151-E and R88A-MCW151-DRT-E Motion Control Units. The changes are only related to firmware (not hardware) and the firmware is com- mon for both types. Verify the current version of the MC Unit using the VER- SION parameter.
  • Page 37 Section 1-6 Comparison between Firmware Versions The R88A-MCW151-E FW 1.62 is fully backward compatible with the previ- ! C a u t i o n ous version FW 1.61. For the R88A-MCW151-DRT-E FW 1.62 many DeviceNet implementation changes have been done. For both Units caution must be taken when upgrading.
  • Page 38: Installation

    Components and Unit Settings ........
  • Page 39: Components And Unit Settings

    Connector DeviceNet Connector I/O Connector + 24V + 24V Power Connector Indicators The following table describes the indicators on the front of the MC Unit. Motion Control Indicator Color Status Meaning Green The MC Unit is operating normally. The MC Unit did not start properly or is not pow- ered on.
  • Page 40 1 NA0 Node address The node address of the slave is set with pins 1 through 6 of the DIP switch. Any node address within the setting range can be used as long as it is not already set on another node.
  • Page 41 Pin 2 Pin 1 0 (default) 0: OFF, 1: ON Baud rate Pins 9 and 10 are used to set the baud rate as shown in the following table. Pin 10 Pin 9 Baud rate 125 kbps (default) 250 kbps...
  • Page 42 Pin 2 Pin 1 Selection RS-422A (default) RS-485 Other not allowed Pin 3 selects the termination resistor between receive pins (RD+ / RD -) for port 2. Pin 3 Selection Termination disabled (default) Termination enabled Pin 4 is not used.
  • Page 43: Installation

    1. Insert the lower two extensions into the bottom mounting holes on the right side of the Servo Driver. 2. Move the upper side of the MC Unit towards the Driver and verify the Servo Driver connector will directly fit into the MC Unit connector. Click the higher...
  • Page 44 Section 2-2 Installation When removing the MC Unit, press down the top of the MC Unit case and remove the upper extension from the Driver. 2-2-3 Dimensions The basic dimensions of the MC Unit are shown below. MCW151 3 SW3...
  • Page 45: Wiring

    Wiring Wiring 2-3-1 Control Connections I/O Connector The I/O Connector is used for wiring to the digital I/O and the connection for the encoder input or encoder output. Refer to 2-3-4 I/O Specifications for elec- trical specifications. Connector pin arrangement...
  • Page 46 Section 2-3 Wiring I/O Connector Type Weidmüller B2L 3.5/26 SN SW (included in package) Wiring Instructions Power Connector The Power Connector is used to connect the 24V power supply to the MC Unit. Connector pin arrangement Name Function + 24V...
  • Page 47 Specifications Electrical characteristics Conform to EIA RS-422A/485 Synchronization Start-stop synchronization (asynchronous) Baud rate 1200 / 2400 / 4800 / 9600 / 19200 / 38400 bps Transmission Format Databit Length 7 or 8 bit Stop Bit 1 or 2 bit Parity Bit...
  • Page 48 RS-1 SD-1 RS-232C RS-232C Interface Interface SG-1 RD-1 Shell mini-DIN 8-pin D-sub 9-pin connector (male) connector (male) Note MC Unit Communication Mode: Host Link Slave MC Unit Signal Signal RS-1 SD-1 RS-232C RS-232C Interface SG-1 Interface RD-1 Shell Shell FG...
  • Page 49 Send data (-) mini-DIN 8-pin connector (male) MC Unit Signal D-sub 9-pin Terminal Block Power connector (male) Supply (5V) 1:1 Connections Using RS-422A/485 Port 2 (MCW151-E only) Programming Terminal (PT) MC Unit Programmable Terminal (PT) Signal Signal RS-422A RS-422A Interface Interface COMBICON...
  • Page 50 Pin 1 ON Pin 2 ON Pin 3 ON Note 1. MC Unit Communication Mode: General-purpose 2. For the 2-wire system (Switch SW2: pin 1,2 =ON), the RD- and SD- resp. the RD+ and SD+ are interconnected within the MC Unit.
  • Page 51 IN parame- ter. These times are depending on the MC Unit’s Servo Period and the priority of the corresponding BASIC task and they include the physical delays in the input circuit.
  • Page 52 To other output circuits fuse on common Output response times The response times given in the following table are the times between a change in the OP parameter and the corresponding change in the digital out- put circuit. These times are mainly depending on the MC Unit’s Servo Period and they include the physical delays in the output circuit.
  • Page 53 Phase Z axis 1 Line transmitter 2-3-5 Connection examples Cascading encoder signal (MCW151 to MCW151) MCW151 (output) MCW151 (input) 0V_ENC 0V_ENC 5V_ENC 5V_ENC Connecting master encoder input signal from W-series Servo Driver W-series Servo Driver MCW151 (input) Shell 0V_ENC 5V_ENC...
  • Page 54: Servo System Precautions

    Motion Error will occur. The Servo Driver will be disabled and all motion will come to a halt. The user must be sure that this does not have an adverse effect on the machine. Determine the value of following error limit carefully according to the operating conditions of the application.
  • Page 55: Wiring Precautions

    In both cases the axis parameters FWD_IN and REV_IN for axis 0 are used to assign the limit switch inputs for the MC unit. When the Servo Driver inputs are used, define FWD_IN=18 and REV_IN=19.
  • Page 56 • Use twisted-pair shielded cables for control voltage output signals, input signals and encoder signals. • The maximum distance for the encoder signal from an encoder to the MC Unit must not exceed 20 m. • The input terminals that operate the 24 V system are isolated with optical...
  • Page 58: Motion Control Functions

    3-3-1 Servo Driver Control........
  • Page 59: Overview

    Encoder MC Axis Configuration The MC Unit has 3 axes in total, which can be used for different motion con- trol purposes depending on the application. The following table lists the differ- ent available axis types. The type of each axis is set by using the ATYPE axis parameter.
  • Page 60 Limitations on using Parameter Unit together with the MC Unit If the MC Unit is mounted to the Servo Driver, it is not allowed to have the Parameter Unit or the Servo Driver Software connected to the Servo Driver when performing the following operations: •...
  • Page 61: System Set-Up

    • The Display will not be lit for some seconds during start-up (either by power-up or software reset). • The Display will not be lit for some time when the following commands are executed in the MC Unit: • Reading and writing Servo Driver parameters.
  • Page 62: System Functions

    For an overview of the available motion control commands which can be used, refer to 6-2-1 Motion Control Commands. For setting up a Motion Application with Speed Control, use one of the follow- ing settings in the Servo Driver. Param-...
  • Page 63 The speed characteristics are Servomotor dependent. The S_RATE axis parameter specifies the speed reference rate of the attached motor. This rate is defined as the amount of Rotational speed (in RPM) per unit of speed refer- ence. Rotational Speed [RPM]...
  • Page 64 Section 3-3 System Functions Torque Control The Torque Control mode is used to apply a fixed torque, independent of the travelling speed. This mode can be used for specific applications which require a constant pressure. To set up a Motion Application with Torque Control, the following setting in the Servo Driver is required.
  • Page 65: Digital I/O

    3-3-2 Digital I/O The MC Unit has two different types of digital I/O. These are the digital I/O on the MC Unit and the mapping of the Servo Driver digital I/O. The inputs and outputs are accessible by using the IN and OP commands in BASIC.
  • Page 66 Servo ON complete Print Registration For both the Servo Driver axis 0 as the encoder input / output axis 1 the REG- IST command can be used to perform print registration on the axis. Print reg- istration captures an axis position as soon as a registration event occurs. The registration event can be defined to be the moment when a registration input or the Z-marker has been detected.
  • Page 67: Monitoring Data

    Section 3-3 System Functions Servo Driver Control Signals Two output signals are implemented as Servo Driver control signals. The con- trol signals are the TVSEL and MING signals and they are specified as fol- lows: Output Signal Description States Name...
  • Page 68 Section 3-3 System Functions AIN1: Torque Command Value Analog input 1 contains the torque command data from the Servo Driver. Item Specification Output Range (-15000, 15000) Resolution Given by T_RATE axis parameter. 15000 -Max. torque Max. torque -15000 Torque command [% of rated torque] = AIN1*T_RATE...
  • Page 69: Absolute Encoder

    If an absolute encoder is used, the counter counts the number of rotations from the setup position and output the number of rotations from the Servo Driver to the MC Unit. For some applications it is convenient to reset the multi- turn data back to 0 after a certain amount of turns.
  • Page 70 Multi-turn data +32767 Servomotor rotations -32768 With any other setting than 65535, the Servomotor multi-turn data will be as follows: Multi-turn data Pn205 Servomotor rotations When the value is other than the default setting, the maximum value sup- ported by the MC Unit is 32767.
  • Page 71 Perform the following actions: • Set the correct Servo Driver settings. When the Servo Driver is set up for absolute encoder, the MC Unit position will be automatically updated. • Put the Servomotor into the origin position for the system.
  • Page 72: Other Servo Driver Commands

    Servo Driver, the MC Unit provides the BASIC commands Parameters DRV_READ and DRV_WRITE. Using these commands it is possible to read from and write to all Servo Driver parameters directly from the MC Unit user program. Reset Servo Driver and The DRV_RESET command will software reset both the Servo Driver and the MC Unit.
  • Page 74: Communication Interfaces

    General-purpose ........
  • Page 75: Serial Communications

    2. A 4-wire RS-422A connection must be used when using Host Link Com- munication. 3. For connection to a PC (Host Link Slave), configure the MC Unit as a Host Link Master. For connection to a Programmable Terminal (Host Link Mas- ter), configure the MC Unit as a Host Link Slave.
  • Page 76 The Host Link Master protocol supports the commands only in single frame and can be used with the BASIC commands as shown in the next table. The table also shows for which operating mode of a CPU Unit (Slave) the com- mand is valid.
  • Page 77 Undefined com- Valid Valid Valid mand (response only) End Code Summary These are the end codes as they can be defined in the HLM_STATUS param- eter. Contents Probably cause Corrective measures code Normal completion No problem exists Not executable in RUN mode...
  • Page 78 Timeout error (case 4) Command not recognized (case 2) If no error did occur the HLM_STATUS will have value 0. In case of a non- zero value, any appropriate action such as a re-try or emergency stop needs to be programmed in the user BASIC program.
  • Page 79 Section 4-1 Serial Communications Examples: Consider the following operations for a MC Unit connected to a PC using port 2 (RS-422A). The Slave PC has node address 13. Reading data from PC using HLM_READ BASIC program: ‘ Set up Host Link Master for port 2 SETCOM(9600,7,2,2,2,6) ‘...
  • Page 80: Host Link Slave

    Host Link Slave In Host Link Slave mode, a Host Link Master such as a Programmable Termi- nal can read data from and write data to the MC Unit. The MC Unit will have the following mapping for the Host Link Slave.
  • Page 81 The SETCOM is required to set-up the serial communication port for the Host Link Slave protocol. After setting the following command: SETCOM(baudrate,data_bits,stop_bits,parity,port,5) the MC Unit will respond to any Host Link command from the master with the specified node number as set with the HLS_NODE parameter.
  • Page 82: General-Purpose

    Section 4-1 Serial Communications Example: Consider a MCW151-E connected to the NT11S Programmable Terminal using port 2 (RS-422A). The Host Link Slave can be configured by using the following program: ‘ Define Host Link Slave node HLS_NODE = 15 ‘ Define Host Link Slave model code HLS_MODEL = $FA ‘...
  • Page 83: Devicenet (Mcw151-Drt-E Only)

    DeviceNet (MCW151-DRT-E only) The MCW151-DRT-E is connected to the DeviceNet network as a DeviceNet Slave. This allows data from any area in the MC Unit to be read or written from the Master. Through the DeviceNet, the MC Unit memory can be accessed using one of the following two methods.
  • Page 84 For example when the MC Unit has been selected to Mode II and the node number is set to 5, the input area will occupy the words for nodes 5 through 8 and the output area will also occupy the words for nodes 5 through 8.
  • Page 85 User defined Contents is set by VR(2). note) 4 (see 00 to User defined Contents is set by VR(3). note) Note The input words no. 3 and 4 will only be transferred when I/O Slave messag- ing mode II is selected.
  • Page 86 Section 4-2 DeviceNet (MCW151-DRT-E only) Input word 2 The allocation of input word 2 is determined by the FB_SET parameter. The following settings are supported. FB_SET Name Function value 00 to User defined Contents is set by VR(0) MC Unit I/O Mapping...
  • Page 87: Explicit Devicenet Messages

    The data is transferred word by word from each PC memory location to each variable in the MC unit and vice versa. The value in the MC Unit is always the integer equivalent of the hexadecimal value in the PC (no 2's complement).
  • Page 88 Service code Source node address Note For a normal response, the leftmost bit of the service code specified in the command will be turned ON and then returned. For example, a command service code of 32 Hex is returned as B2 Hex in the response.
  • Page 89 The node address of the destination of the explicit message. Service code (command, response) A service code defined for DeviceNet. In a normal response, bit 15 of the ser- vice code specified will be turned ON and returned. For an error response, the service code will always be 94 Hex.
  • Page 90 The specified data is returned from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). Note The user should be aware that the MC Unit does not check if the MC Unit memory data is within range of the three-word format.
  • Page 91 The specified data is returned from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). Note The user should be aware that the MC Unit does not check if the MC Unit memory data is within range of the three-word format.
  • Page 92 Hex). The 119 VR elements imply 238 bytes to be transferred. Read data (response) The specified data is returned from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). TABLE DATA WRITE TABLE DATA WRITE (THREE-WORD FORMAT) will write Table data.
  • Page 93 The specified data should be written from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). Note The user should be aware that the MC Unit does not check if the PC memory data complies to the three-word format.
  • Page 94 The specified data should be written from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). Note The user should be aware that the MC Unit does not check if the PC memory data complies to the three-word format.
  • Page 95 When an OMRON Master is being used, the maximum is 119 elements (77 Hex). The 119 VR elements imply 238 bytes to be transferred. Write data (command) The specified data should be written from word H (leftmost byte: bits 08 to 15) to word L (rightmost byte: bits 00 to 07). RESET RESET will perform a software reset of both the MC Unit and the Servo Driver (as DRV_RESET command).
  • Page 96 Section 4-2 DeviceNet (MCW151-DRT-E only) Parameters Service code (command, response) In the command, 05 Hex is specified. In the response, the leftmost bit is turned ON and 85 Hex is returned. 4-2-2-3 Sample Programs Using the CMD(490) In the following example, the CMD(490) instruction is used to read data (one-...
  • Page 97 00 64 Response monitoring time: 10 s Using the CMD(490) In the following example, the CMD(490) instruction is used to write data (three instruction to write data word format) to Table(10) to Table(12) on the Slave Unit, from the Master (CS1 PCs).
  • Page 98 Three word format: 928824 S+13 88 24 S+14 00 92 D: Response Words (D: First Response Word) Results are stored as shown in the following table. Word Contents (Hex) Meaning 28 01 EXPLICIT MESSAGE SEND command code: 28 01 Hex...
  • Page 100: Multitasking Basic Programming

    Program Execution ........
  • Page 101: Overview

    The MC Unit can hold up to 14 programs if memory size permits. A total of 3 tasks can be allocated to the programs. The execution of the programs is user controlled using BASIC.
  • Page 102: Data Structures And Variables

    The Table is common to all tasks on the MC Unit, i.e., the values written to the Table from one task can be read from other tasks.
  • Page 103: Mathematical Specifications

    The single precision floating point format is internally a 32 bit value. It has an 8 bit exponent field, a sign bit and 23 bit fraction field with an implicit 1 as the –...
  • Page 104: Motion Execution

    The best way to ensure the precedence of various operators is through the use of parentheses. Motion Execution Every task on the MC Unit has a set of buffers that holds the information from the motion commands given. The motion commands include MOVE, MOVE- ABS, MOVEMODIFY, MOVECIRC, FORWARD, REVERSE, MOVELINK, CONNECT, CAM and CAMBOX.
  • Page 105: Command Line Interface

    NTYPE buffers to see if any of them are available. If there are any available then it checks the task buffers to see if there is a move waiting to be loaded. If a move can be loaded, then the data for all the speci- fied axes is loaded from the task buffers into the NTYPE buffers and the cor- responding task buffers are marked as idle.
  • Page 106: Managing Programs

    The source programs are held in the MC Unit in a tokenised form and as a result, the sizes of the programs will be less on the MC Unit compared to the same programs on the computer.
  • Page 107: Program Execution

    5-5-3 Program Execution The timing of the execution for the different tasks and the refreshing of the I/O of the MC Unit revolves around the servo cycle period of the system. The servo cycle period is determined by the SERVO_PERIOD system parameter.
  • Page 108: Task Operation Sequence

    6. Execute position servo. For axis 0 this also includes the Servo Driver com- munications. (See note). 7. Update outputs. Note Each of these items will be performed for each axis in turn before moving on to the next item. Program task execution There are three slots available for the BASIC tasks execution.
  • Page 109: Error Processing

    The error routine can stop the driver, put the digital I/O in a safe status and notify the PC Unit of the error. Please refer to section 6-3-31 BASICERROR on the way to include an error subroutine in a BASIC program.
  • Page 110 The master shell program is used for the config- uration of the MC Unit and Servo Driver, for the control of the application pro- gram tasks and for the continuous checking any error event that may occur. It is strongly recommended to use this program or a similar program for every application.
  • Page 112: Basic Motion Control Programming Language

    6-3-12 Hexadecimal input: $ ........
  • Page 113 6-3-79 FOR TO STEP NEXT........
  • Page 114 6-3-115 MOTION_ERROR ........
  • Page 115 6-3-184 SWITCH_STATUS ........
  • Page 116 6-3-202 WAIT LOADED ........
  • Page 117: Overview

    Overview Overview This section contains the description of the commands, functions and param- eters of the MC Unit. All items can be found in alphabetical order. For quick command reference, check the following section. Group Structure The complete set of commands, functions and parameters is divided in the following groups.
  • Page 118: Command Reference List

    BASE BASE is used to set the base axis to the axis specified with axis. CAM moves an axis according to values of a movement pro- file stored in the Table variable array.
  • Page 119: Loop And Conditional Structures

    KEY returns TRUE or FALSE depending on if character is received. LINPUT LINPUT waits for a string and puts it in VR variables. OP sets one or more outputs or returns the state of the first 24 outputs. OUTDEVICE OUTDEVICE defines the default output device.
  • Page 120: System Commands And Parameters

    TROFF suspends a trace at the current line and resumes nor- mal program execution. TRON TRON creates a breakpoint in a program. 6-2-5 System Commands and Parameters The table below outlines the system commands and parameters. Refer to the specified pages for details. Name Description Page Hexadecimal input: Command $ assigns a hexadecimal number to a variable.
  • Page 121: Mathematical And Logical Functions

    TSIZE returns the size of the currently defined Table. VERSION VERSION returns the version number of the BASIC language installed in the MC Unit. VR writes and reads data to and from the global (VR) vari- ables. WA holds program execution for the number of milliseconds specified.
  • Page 122: Constants

    SCOPE_POS contains the current Table position at which the SCOPE command is currently storing its first parameter. TRIGGER TRIGGER starts a previously set SCOPE command. 6-2-9 Axis Parameters The table below outlines the axis parameters. Refer to the specified pages for details. Name Description Page ACCEL ACCEL contains the axis acceleration rate.
  • Page 123 MERGE is a software switch that can be used to enable or disable the merging of consecutive moves. MPOS MPOS is the position of the axis as measured by the encoder. 163 MSPEED MSPEED represents the change in the measured position in the last servo period.
  • Page 124: Task Commands And Parameters

    VFF_GAIN VFF_GAIN contains the speed feed forward control gain. VP_SPEED VP_SPEED contains the speed profile speed. 6-2-10 Task Commands and Parameters The table below outlines the task commands and parameters. Refer to the specified pages for details. Name Description Page...
  • Page 125: Servo Driver Commands And Parameters

    DRV_WRITE DRV_WRITE writes a specific value to the specified parame- ter of the Servo Driver. 6-2-12 Host Link Commands and Parameters The table below outlines the Host Link commands and parameters. Refer to the specified pages for details. Name Description...
  • Page 126: Command, Function And Parameter Description

    BASIC programming language. ! W A R N I N G It is the responsibility of the programmer to ensure that the motion func- tions are invoked correctly, with the correct number of parameters and values. Failure to do so may result in unexpected behavior, loss or dam- age to the machinery.
  • Page 127: Subtract

    Any valid BASIC expression. expression_2 Any valid BASIC expression. Example: a = 10/(2.1+9) The parentheses are evaluated first, and then 10 is divided by the result, 11.1. Therefore, a would contain the value 0.9009 6-3-6 Is Less Than: < Type:...
  • Page 128: Is Not Equal To

    Section 6-3 Command, function and parameter description In the above line, 1 is not less than or equal to 0 and, therefore, variable maybe would contain the value 0 (FALSE). 6-3-8 Is Not Equal To: <> Type: Logical Operation Syntax: expression_1 <>...
  • Page 129: Hexadecimal Input

    ‘ [ <Comment field> ] Description: The single quote “ ‘ “ can be used in a program to mark a line as being com- ment which will not be executed. The single quote can be put at the beginning of a line or after any valid statement.
  • Page 130: Accel

    ACOS( expression ) Description: The ACOS function returns the arc-cosine of the expression. The expression value must be between –1 and 1. The result in radians will be between 0 and PI. Input values outside the range will return zero. expression Arguments: Any valid BASIC expression.
  • Page 131: Addax_Axis

    As different encoders with different resolutions are used, the gains are not identical. 2. To create a servo loop on axis 1, set the ATYPE parameter of that axis to servo (value 2). 3. Set the OUTLIMIT parameter of axis 1 to the same value as the value for axis 0, which is 15000.
  • Page 132: Addax

    In the example below, axis 0 is assumed to be the base axis and it executes a continuous forward movement and a superimposed move on axis 2 is used to apply offsets according to the offset calculated in a subroutine.
  • Page 133: And

    For the AIN2 channel the S_RATE axis parameter can be used to convert the data into a value in round per minute. For both the AIN1 and AIN3 channels the T_RATE axis parameter can be used to convert the value into a percent- age of the rated torque.
  • Page 134: Asin

    ASIN( expression ) Description: The ASIN function returns the arc-sine of the expression. The expression value must be between –1 and 1. The result in radians will be between –PI/2 and PI/2. Input values outside the range will return zero. Arguments: expression Any valid BASIC expression.
  • Page 135: Autorun

    Section 6-3 Command, function and parameter description Description: The ATYPE axis parameter sets the axis type for the axis. The valid values is depending on the axis Axis Axis type ATYPE value number Servo 13 (fixed) Virtual Servo Encoder input...
  • Page 136: Axisstatus

    Alternative: Description: The BASE command is used to set the default base axis or to set a specified axis sequence group. All subsequent motion commands and axis parameters will apply to the base axis or the specified axis group unless the AXIS com- mand is used to specify a temporary base axis.
  • Page 137: Basicerror

    Section 6-3 Command, function and parameter description Arguments: axis_i The number of the axis set as the base axis and any subsequent axes in the group order for multi-axis moves. See also: AXIS Examples: Example 1 It is possible to program each axis with its own speed, acceleration and other parameters.
  • Page 138: Cam

    For example, assume the system is being programmed in mm and the speed is set to 10 mm/s and the acceleration sufficiently high. If a distance of 100 mm is specified, CAM will take 10 seconds to execute.
  • Page 139: Cambox

    Table array to be used to hold more than one profile and/or other information. The MC Unit moves continuously between the val- ues in the Table to allow a number of points to define a smooth profile. Two or more CAMBOX commands can be executed simultaneously using the same or overlapping values in the Table array.
  • Page 140: Cancel

    The address of the end element in the Table array. table_multiplier The Table multiplier value used to scale the values stored in the Table. As the Table values are specified in encoder edges, use this argument to set the val- ues for instance to the unit conversion factor (set by UNITS parameter).
  • Page 141: Checksum

    Other bits in the variable will keep their values. Arguments: bit_number The number of the bit to be reset. Range: [0, 23]. vr_number The number of the VR variable for which the bit will be reset. Range: [0, 250] See also: READ_BIT, SET_BIT, VR 6-3-38 CLOSE_WIN Type:...
  • Page 142: Commserror

    Section 6-3 Command, function and parameter description The default value is set to a high value (1000000) in order to ensure compat- ibility with previous MC Units (MC402-E). Note The operation using CLUTCH_RATE is not deterministic in position. If required, use the MOVELINK command instead to avoid unnecessary phase difference between master and slave.
  • Page 143: Control

    AXIS, CANCEL, CLUTCH_RATE, CONNECT, RAPIDSTOP Example: In a press feed, a roller is required to rotate at a speed one quarter of the measured rate from an encoder mounted on the incoming conveyor. The roller is wired to axis 0. An input channel monitors the encoder pulses from the conveyor and forms axis 1.
  • Page 144: Creep

    The DATUM command performs one of 6 origin search sequences to position an axis to an absolute position and also can be used to reset the following errors. The origin search mechanism of the Servo Driver is used for axis 0.
  • Page 145: Datum_In

    The DATUM_IN axis parameter contains the input number to be used as the datum switch input for the DATUM command. The valid input range is given by 0 to 7. If DATUM_IN is set to –1, then no input is used as the datum switch input.
  • Page 146: Decel

    As an alternative also the OFFPOS axis parameter can be used. This param- eter can be used to perform a relative adjustment of the current position. DEFPOS works on the default basis axis (set with BASE) unless AXIS is used to specify a temporary base axis.
  • Page 147: Demand_Edges

    Program Command Syntax: Alternative: Description: The DIR command displays a list of the programs held in memory, their mem- ory size and their RUNTYPE. Furthermore the controller’s available memory size, power up mode and current selected program is displayed. See also:...
  • Page 148: Drv_Clear

    Be sure that no Parameter Unit or Personal Computer Software is connected ! C a u t i o n to the Servo Driver when executing this command. Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed. See also:...
  • Page 149: Drv_Reset

    Be sure that no Parameter Unit or Personal Computer Software is connected ! C a u t i o n to the Servo Driver when executing this command. Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed. 6-3-59 DRV_STATUS...
  • Page 150: Drv_Write

    Be sure that no Parameter Unit or Personal Computer Software is connected ! C a u t i o n to the Servo Driver when executing this command. Otherwise the program task will be paused until the connection of the other device to the Servo Driver is removed. parameter Arguments: The number of the Pn-parameter to be written.
  • Page 151: Encoder

    Flash memory. At each start-up the program data from the Flash memory will be copied to the RAM. Note Motion Perfect offers this command as a button on the control panel. Also pop-up screens will prompt to write the program data into Flash memory.
  • Page 152: Errormask

    ERRORMASK is 268. Refer to 8-2 Error Handling for more detailed information on error handling. It is up to the user to define in which cases a motion error is generated. For ! C a u t i o n safe operation it is strongly recommended to generate a motion error when the following error has exceed its limit for the servo axis 0 in all cases.
  • Page 153: Fb_Set

    Description: The FAST_JOG axis parameter contains the input number to be used as the fast jog input. The number can be from 0 to 7. As default the parameter is set to –1, no input is selected. The fast jog input controls the jog speed between two speeds. If the fast jog input is set, the speed as given by the SPEED axis parameter will be used for jogging.
  • Page 154: Fe_Range

    Description: The FHSPEED axis parameter contains the feedhold speed. This parameter can be set to a value in user units/s at which speed the axis will move when the feed-hold input turns ON. The current move is not cancelled. FHSPEED can have any positive value including zero.
  • Page 155: For To Step Next

    Table data will be restored to the values held in Flash memory. Storing the data in Flash memory for this Unit is required as data in RAM is not contained when power is down. The command will write either a single VR variable or the entire Table array.
  • Page 156: Forward

    Description: The FORWARD command moves an axis continuously forward at the speed set in the SPEED axis parameter. The acceleration rate is defined by the ACCEL axis parameter. FORWARD works on the default basis axis (set with BASE) unless AXIS is used to specify a temporary base axis.
  • Page 157: Fs_Limit

    The FWD_IN axis parameter contains the input number to be used as a for- ward limit input. The number can be set from 0 to 7 and 18. Range 0 to 7 is used to select one of the MC Unit inputs. Defining value 18 will select the Servo Driver’s POT (Forward drive prohibited, CN1 pin 42) input.
  • Page 158: Gosub Return

    15 characters are significant. Precautions: Subroutines on each task can be nested up to 8 levels deep. Arguments: label A valid label that occurs in the program. An invalid label will give a compilation error before execution. See also: GOTO Example:...
  • Page 159: Halt

    Section 6-3 Command, function and parameter description Arguments: label A valid label that occurs in the program. An invalid label will give a compilation error before execution. See also: GOSUB Example: loop: PRINT "Measured position = ";MPOS;CHR(13); GOTO loop 6-3-89 HALT...
  • Page 160 HLM_COMMAND(HLM_ABORT,2,4) Example 4: When data has to be written to a PC using Host Link, the CPU Unit can not be in RUN mode. The HLM_COMMAND command can be used to set it to MON- ITOR mode. The Slave has node address 0 and is connected to the RS-232C port.
  • Page 161: Hlm_Read

    Host Link command string containing the specified node of the Slave to the serial port. The received response data will be written to either VR or Table variables. Each word of data will be transferred to one variable. The maximum data length is 30 words (single frame transfer).
  • Page 162: Hlm_Status

    Section 6-3 Command, function and parameter description mc_offset The address of the specified MC Unit memory area to write to. Range for VR variables: [0, 250]. Range for Table variables: [0, 7999]. See also: HLM_COMMAND, HLM_STATUS, HLM_TIMEOUT, HLM_WRITE, SETCOM Example: The following example shows how to read 20 words from the PC DM area addresses 120-139 to MC Unit’s Table addresses 4000-4019.
  • Page 163: Hlm_Write

    MC Unit is set to 500 ms (SERVO_PERIOD=500). >> HLM_TIMEOUT=2000 For both serial ports the Host Link Master timeout time has been set to 1 s. 6-3-94 HLM_WRITE Type: Host Link Command Syntax: HLM_WRITE( port, node, pc_area, pc_offset, length, mc_area, mc_offset )
  • Page 164: Hls_Model

    PLC_EM EM area (or value 6) pc_offset The address of the specified PC memory area to write to. Range: [0, 9999]. length The number of words of data to be transfered. Range: [1, 29]. mc_area The MC Unit’s memory selection to read the send data from.
  • Page 165: I_Gain

    If the condition is TRUE the commands follow- ing THEN up to ELSE (or ENDIF if not included) will be executed. If the condi- tion is FALSE the commands following ELSE will be executed or the program will resume at the line after ENDIF in case no ELSE is included.
  • Page 166: Indevice

    • IN(input_number) with the value for input_number less than 32 will return the value of the particular channel. • IN (without arguments) will return the binary sum of the first 24 inputs (as IN(0,23)). Refer to 3-3-2 Digital I/O for a description of the various types of output and inputs.
  • Page 167: Input

    <CR> after the last variable has been assigned. If the string is invalid, the user will be prompted with an error message and the task will be repeated. The maximum amount of inputs on one line has no limit other than the line length.
  • Page 168: Jogspeed

    Most systems do not use all the available axes. It would therefore be a waste of time to task the idle moves on all axes that are not in use. To avoid this to some extent, the MC Unit will task moves on the axes from 0 to LAST_AXIS, where LAST_AXIS is the number of the highest axis for which an AXIS or BASE command has been processed, whichever of the two is larger.
  • Page 169: Link_Axis

    The LINPUT command assigns the ASCII code of the characters to an array of variables starting with the specified VR variable. Program execution will be paused until the string is terminated with a carriage return <CR>, which is also stored. The string is not echoed by the controller.
  • Page 170: Lock

    The LOCK command prevents the program from being viewed, modified or deleted by personnel unaware of the security code. The UNLOCK command allows the locked state to be unlocked. The code number can be any integer and is held in encoded form. LOCK is always an immediate command and can be issued only when the system is UNLOCKED.
  • Page 171: Markb

    When merging multi-axis moves, only the base axis MERGE axis parameter needs to be set. Precautions: If the moves are short, a high deceleration rate must be set to avoid the MC Unit decelerating in anticipation of the end of the buffered move. See also:...
  • Page 172: Move

    ------------- . Arguments: dist_i The distance to move for every axis i in user units starting with the base axis. See also: AXIS, MOVEABS, UNITS Examples: Example 1 A system is working with a unit conversion factor of 1 and has a 1000-line encoder.
  • Page 173: Moveabs

    DECEL parameters from the base axis and the total multi-axes distance – where The individual speed for axis at any time of the movement is calculated ------------- . Arguments: pos_i The position to move every axis i to in user units starting with the base axis.
  • Page 174: Movecirc

    MOVEABS(20,350) Example 2 A pallet consists of a 6 by 8 grid in which gas canisters are inserted 85mm apart by a packaging machine. The canisters are picked up from a fixed point. The first position in the pallet is defined as position (0,0) using the DEFPOS command.
  • Page 175: Movelink

    0 to produce positive motion about the third (possibly imaginary) orthogonal axis. If the two axes involved in the movement form a left-hand axis. set direction to 0 to produce negative motion about the third (possibly imaginary) orthogonal axis.
  • Page 176 Arguments: The incremental distance in user units to move the base axis, as a result of the measured link_distance movement on the link axis. link_distance The positive incremental distance in user units that is required to be mea- sured on the link axis to result in the distance motion on the base axis.
  • Page 177 A flying shear cuts a roll of paper every 160 m while moving at the speed of the paper. The shear is able to travel up to 1.2 m of which 1 m is used in this example. The paper distance is measured by an encoder, the unit conversion factor being set to give units of metres on both axes.
  • Page 178: Movemodify

    The MSPEED parameter contains the measured speed in units/s. It is calcu- lated by taking the change in the measured position in user units in the last servo period and divide it by the servo period (in seconds). The servo period is set with the SERVO_PERIOD parameter.
  • Page 179: New

    CONNECT MOVELINK MTYPE can be used to determine whether a move has finished or if a transi- tion from one move type to another has taken place. A non-idle move type does not necessarily mean that the axis is actually mov- ing.
  • Page 180: Ntype

    Axis Parameter Description: The NTYPE parameter contains the type of the move in the next move buffer. Once the current move has finished, the move present in the NTYPE buffer will be executed. The values are the same as those for the MTYPE axis parameter.
  • Page 181 If the expression has value 1 the first label is used, for value 2 then the second label is used, and so on. Depending on the GOSUB or GOTO command the subroutine or normal jump is performed.
  • Page 182: Open_Win

    This following line sets the bit pattern 10010 on the first 5 physical outputs, outputs 13 to 17 would be cleared. The bit pattern is shifted 8 bits by multiply- ing by 256 to set the first available outputs as outputs 0 to 7 do not exist. OP(18*256) Example 3 This routine sets outputs 8 to 15 ON and all others OFF.
  • Page 183: Outdevice

    MC Unit to the Servo Driver for both servo loop (SERVO=ON) and open loop (SERVO=OFF). The default value of OUTLIMIT for axis 0 is 15000. This sets the speed refer- ence range to [-15000, 14999], which is the actual input reference range of the Servo Driver.
  • Page 184: P_Gain

    P_GAIN parameter value. The default value for axis 0 is 0.1. The proportional gain sets the ’stiffness’ of the servo response. Values that are too high will cause oscillation. Values that are too low will cause large fol- lowing errors.
  • Page 185: Print

    The width of the field in which a number is printed can be set with the use of [w,x] after the number to be printed. The width of the column is given by w and the number of decimal places is given by x.
  • Page 186: Proc

    OUTDEVICE, hexadecimal input ($) Examples: Example 1 PRINT "CAPITALS and lower case CAN BE PRINTED" Example 2 Consider VR(1) = 6 and variab = 1.5, the print output will be as follows: PRINT 123.45,VR(1)-variab 123.4500 4.5000 Example 3 In this example, the semi-colon separator is used. This does not tab into the next column, allowing the programmer more freedom in where the print items are placed.
  • Page 187: Proc_Status

    There are 16 position switches each of which can be assigned to any axis. Each switch is assigned its own ON and OFF positions and output number. The command can be used with 2 or all 7 arguments. With only 2 arguments a given switch can be disabled.
  • Page 188: Rapidstop

    There is also a proximity switch on the shaft to indicate the TDC of the machine. With a mechanical cam, the change from job to job is time consuming. This can be eased by using PSWITCH as a software cam switch.
  • Page 189: Read_Bit

    MOVEABS, MOVEMODIFY, FORWARD, REVERSE MOVECIRC) will decelerate to a stop with the deceleration rate as set by the DECEL parameter. Moves for other commands will be immediately stopped. Precautions: • RAPIDSTOP cancels only the presently executing moves. If further moves are buffered in the next move buffers (NTYPE) or the task buffers they will then be loaded.
  • Page 190 For axis 1 the print registration mechanism of the MC Unit provides two regis- ters, which allows two simultaneous events to be captured. The registration event can either be input I0 / R0, input I1 / R1 or the encoder input Z-marker phase.
  • Page 191 A paper cutting machine uses a CAM profile to quickly draw paper through servo-driven rollers and then stop it while it is cut. The paper is printed with a registration mark. This mark is detected and the length of the next sheet is...
  • Page 192: Remain

    Description: The REMAIN parameter contains the distance remaining to the end of the current move. It can be checked to see how much of the move has been com- pleted. REMAIN is defined in user units. Note This parameter is read-only.
  • Page 193: Rep_Option

    Any valid BASIC logical expression See also: FOR, WHILE Example: A conveyor is to index 100mm at a speed of 1000mm/s, wait for 0.5s and then repeat the cycle until an external counter signals to stop by turning ON input 4. cycle:...
  • Page 194: Reset

    The REV_IN parameter contains the input number to be used as a reverse limit input. The number can be set from 0 to 7 and 19. Range 0 to 7 is used to select one of the MC Unit inputs. Defining value 19 will select the Servo Driver’s NOT (Reverse drive prohibited, CN1 pin 43) input.
  • Page 195: Rs_Limit

    A software limit for reverse movement can be set from the program to control the working range of the machine. When the limit is reached, the MC Unit will decelerate to zero, and then cancel the move. Bit 10 of the AXISSTATUS axis parameter will be turned ON while the axis position is smaller than / below RS_LIMIT.
  • Page 196: Runtype

    The RUNTYPE command determines whether the program, specified by program_name, is run automatically at start-up or not and which task it is to run on. The task number is optional, if omitted the program will run at the high- est available task.
  • Page 197: S_Ref

    See also: AXIS, OUTLIMIT, S_REF, S_REF_OUT, SERVO Example: >> PRINT S_REF_OUT AXIS(0) 288.0000 6-3-170 SCOPE Type: Motion Perfect Command Syntax: SCOPE( control , period , table_start , table_stop , P0 [ , P1 [ , P2 [ , P3 ]]])
  • Page 198: Scope_Pos

    The sample period can be any multiple of the servo period. The parameters are stored in the Table array and can then be read back to a computer and displayed on the Motion Perfect Oscilloscope or written to a file for further analysis using the "Create Table file"...
  • Page 199: Select

    The timing of the execution of the program tasks and the refreshing of the control data and I/O of the Unit are all depending on this setting. The parame- ter is defined in microseconds. The MC Unit can be set in either 0.5 ms or 1.0 ms servo cycle.
  • Page 200: Set_Bit

    The command will enable the Host Link protocols or define the general-pur- pose communication. The serial ports have 9,600 baud, 7 data bits, 2 stop bits, even parity and XON/XOFF enabled for general-purpose communication by default. These default settings are recovered at start-up.
  • Page 201: Sin

    SIN( expression ) Description: The SIN function returns the sine of the expression. Input values are in radi- ans and may have any value. The result value will be in the range from -1 to 1. Arguments: expression Any valid BASIC expression.
  • Page 202: Stop

    If the program is specified then all occurrences of this program will be stepped. A new task will be started when there is no copy of the program run- ning. If the task is specified as well then only the copy of the program running on the specified task will be stepped.
  • Page 203: T_Rate

    20 elements. • TABLE(address) returns the table value at that entry. A value in the table can be read only if a value of that number or higher has been previously written to the table. For example, printing TABLE(1001) will produce an error message if the highest table location previously written to the table is location 1000.
  • Page 204: Tan

    3. The Table and VR data in RAM will be lost when the power is switched OFF. If valid data needs to be recovered during start-up, write the data into Flash memory using the FLASHVR command.
  • Page 205: Trigger

    The TRON command creates a breakpoint in a program that will suspend pro- gram execution at the line following the TRON command. The program can then for example be executed one line at a time using the STEPLINE com- mand.
  • Page 206: True

    The TSIZE parameter returns the size of the Table array, which is one more than the currently highest defined table element. TSIZE is reset to zero when the Table array is deleted using DEL “TABLE” or NEW “TABLE” on the command line.
  • Page 207: Vff_Gain

    2. The Table and VR data in RAM will be lost when the power is switched OFF. If valid data needs to be recovered during start-up, write the data into Flash memory using the FLASHVR command.
  • Page 208: Wait Idle

    A transfer gantry has 10 put down positions in a row. Each position may at any time be full or empty. VR(101) to VR(110) are used to hold an array of ten 1’s and 0’s to signal that the positions are full (1) or empty (0). The gantry puts the load down in the first free position.
  • Page 209: Wait Loaded

    The command can only be used in a program. This is useful for activating events at the beginning of a move, or at the end when multiple moves are buffered together.
  • Page 210: Wdog

    WEND Description: The WHILE ... WEND structure allows the program segment between the WHILE and the WEND statement to be repeated a number of times until the condition becomes FALSE. In that case program execution will continue after WEND. Precautions: WHILE ...
  • Page 211 The parentheses are evaluated first, but only the integer part of the result, 18, is used for the operation. Therefore, this expression is equivalent to the fol- lowing: VR(0)=10 XOR 18 The XOR is a bit operator and so the binary action taking place is as follows: 01010 10010 11000...
  • Page 212: Motion Perfect Software Package

    VR and Table Editors ........
  • Page 213: Features And Requirements

    8. Mouse or tracker ball. Connecting to the MC Unit Motion Perfect can be connected to the MC Unit once the MC Unit is pow- ered-up and running in order to use all features. After installation Motion Per- fect can be started by using the Start Button.
  • Page 214: Motion Perfect Projects

    Revert to backup from the File Menu. The backup file will be overwritten each time a project is opened. If you open a new project during a development session, the new projects backup copy...
  • Page 215 When Motion Perfect starts, it always performs a consistency check between any programs on the MC Unit and the current project files on the computer. It will only enable its tool site when it has successfully verified that the programs in the controller matches the project on the computer.
  • Page 216: Desktop Appearance

    Creating a Project for the First Time If this is the first time the MC Unit has been used with Motion Perfect and you do not have any programs on the MC Unit, click the New Button in the Check Project Options Window and then click the Yes Button when asked.
  • Page 217: Control Panel

    Program List Box The Program List Box in the middle of the Control Panel will show a list of the programs in the project. There are two buttons next to each program name to control the execution of this program.
  • Page 218: Editing And Running Simple Programs

    Example 1 1,2,3... 1. Create a new program in the new project by selecting New from the Pro- gram Menu or by clicking on the Control Panel’s shortcut button “Create New Program”. 2. Name your program ‘OP1’ and click the OK Button.
  • Page 219: Motion Perfect Tools

    The system will compile and link the program before running it. If the compiler detects errors in the program, it will not run, but will print the line number at which the error occurred. The line can be located by looking at the current line number displayed in the bottom right of the Editor Window’s status bar or by...
  • Page 220: Editor

    When an Editor Window is closed, the project file is updated with the modified program. Note It is not possible to open a new Editor Window while any program is running on the MC Unit.
  • Page 221 To jump to a specific label, click the desired label in the display to enter it in the text box at the bottom of the window and press the OK button. The cursor will move to the specified label in the program. Alternatively, a specific line number can be selected by entering the value of the line number text box at the bottom of the window, and the pressing the OK button.
  • Page 222 Run, Step and Stop These operations are used to run the program, run a single line in the pro- gram and stop the program. These operations can also be found on the con- trol panel (same buttons).
  • Page 223: Axis Parameters

    These values are updated continuously at a specified rate. The following operations are possible on the Axis Parameters Window. • The user is able to change the size of the window. The black dividing bar can be repositioned to change the space occupied by the two banks.
  • Page 224: Controller Configuration

    Cancelling Move Encoder Out Overspeed • The Axes Button at the bottom of the window can be pressed to access a Window to select the axes that are displayed. By default, the axes set for the last modified start-up program from the File Menu, Jog Axes Window or Axes Parameters Window will be displayed.
  • Page 225: I/O Status Window

    Push the refresh button to reload the values. Range Both in the VR and Table Editor you can select the range of the view by giving the begin and end element. The range of the Table Editor is limited to the highest element, which is specified by the TSIZE system parameter.
  • Page 226: Full Controller Directory

    Jog Speed Settings This is the speed at which the jog will be performed, which is given by the JOGSPEED parameter. The value of the speed is limited to the range from 0 to the demand speed given by the SPEED parameter for this axis. This value can be changed by writing directly to this field or by using the jog speed con- trol (up/down) buttons.
  • Page 227: Oscilloscope

    OFF. Prior to the activation the value of the Jog Speed field will be written to the JOGSPEED parameter. When released this input is ON and the jogging will be stopped.
  • Page 228 The value selected is the time per grid division on the display. If the time base is greater than a predefined value, then the data is retrieved from the controller in sections (as opposed to retrieving a compete trace of data at one time.) These sections of data are...
  • Page 229 Each scope channel has the following channel-specific controls organized in each of four channel control blocks surrounded by a colored border. The color of the border is the same as the color for the channel trace on the display. Each channel has the following:...
  • Page 230 Depending upon the parameter chosen, the next label will switch between axis or channel. It is also possible to plot the points held in the MC Unit Table array directly by selecting the Table parameter, followed by the number of a channel whose first/last points have been configured using the Advanced Options Window, which is described later in this section.
  • Page 231 Table Range Parameter Checks There is a maximum Table size on the MC Unit, and it is not possible to enter Table channel values beyond this value. It is also not possible to enter a lower scope table value or increase the samples per grid division to a value which causes the upper scope Table value to exceed the MC Unit maximum Table value.
  • Page 232: Suggestions And Precautions

    Menu. Running Motion Perfect Motion Perfect can be run in an off-line mode if it is unable to find a MC Unit and open a valid project. This may occur if it does not find any MC Units con- Off-line nected to the computer or if the project consistency check fails and the check is canceled.
  • Page 233 Retrieving Backup If you want to abandon changes made during a development session and reload the backup copy made at the start of the session, then select Revert to Backup from the Project Menu. Downloading Firmware The MC Unit has Flash memory for storage of both user programs and the system software.
  • Page 234: Troubleshooting

    Servo Driver Alarms ........
  • Page 235: Error Indicators

    Section 8-1 Error Indicators Error Indicators MC Unit Indicators The following errors are displayed at the LED indicators at the top of the MC Unit’s front panel. MCW151-E MCW151-DRT-E MCW151 MCW151-DRT General Indicators Error Remedy (Normal) The MC Unit is defective.
  • Page 236: Error Handling

    OFF, MOTION_ERROR parameter will be set to 1 and the ERROR_AXIS parame- ter will contain the number of the first axis to have the error condition. The motion error can be cleared by using the DATUM(0) command or performing a system reset by using the DRV_RESET command.
  • Page 237 4096 Servo Driver Alarm If the Servo Driver detects an error, it will generate an alarm. The MC Unit provides the following utilities to detect the Servo Driver alarm: • The Servo Driver Alarm bit (no. 3) of the AXISSTATUS axis parameter for axis 0 will be set.
  • Page 238 Section 8-2 Error Handling If the alarm is canceled while the Servo ON signal (WDOG) is still ON, the Servo Driver will start as soon as the alarm is cleared, which is dangerous. Be sure to turn OFF the WDOG system parameter before cancelling the alarm.
  • Page 239 Host Link command and receiving a response several problems may occur: 1. The slave detects an error within the command and will send a corre- sponding end code indication. 2. The slave cannot decode the command header code and sends a IC re- sponse.
  • Page 240: Servo Driver Alarms

    Timeout error (case 4) Command not recognized (case 2) If no error did occur the HLM_STATUS will have value 0. In case of a non- zero value, any appropriate action such as a re-try or emergency stop needs to be programmed in the user BASIC program.
  • Page 241 Alarm Outputs Alarm Code Outputs ALM Output ALO1 ALO2 ALO3 Note OFF: Output transistor is OFF (alarm state). ON: Output transistor is ON. Status and Remedy for Alarm At power on Cause Remedy The MC Unit is defective. Replace the MC Unit A.E2...
  • Page 242: Problems And Countermeasures

    Status and Remedy for Alarm MC Unit detection error Cause Remedy The MC Unit is not mounted properly. Check that MC Unit mounted cor- rectly. The MC Unit is not mounted. Execute Fn014 (option unit detection result clear) and then cycle the power.
  • Page 243 Check whether the Servo Driver is operating. The communication between Check both the MC Unit and If there is an error, try to find the MC Unit and Servo Driver is Servo Driver if they indicate a the cause and cycle power of malfunctioning.
  • Page 244 There is eccentricity in the cou- Check the machinery. Try turn- Adjust the machinery. plings connecting the Servomo- ing the motor with no load (i.e., tor axis and the mechanical with the machinery removed system. There may be loose from the coupling).
  • Page 245: Devicenet Slave Problem Solving

    8-3-2 DeviceNet Slave Problem Solving Red Indicator (ON or Use the following table to troubleshoot in a Slave that has a red indicator that Flashing) is ON or flashing. Error Probable cause The MS indicator is a constant red.
  • Page 246 Probable cause The NS indicator remains OFF. • Check if the baud rate of the Master Unit coincides with that of the Slave Unit. If the baud rate are different, correct the baud rate of the Slave Unit. • Check that the Slave’s connector is connected correctly.
  • Page 247 • Check whether the Slave is registered in the Master’s scan list. If an OMRON Master Unit is being used, a new Slave cannot be added to the network if the Master is operating with the scan list enabled. First perform the clear scan list operation, check that the Slave has joined the network, and then perform the create scan list operation.
  • Page 248: Maintenance And Inspection

    Routine Inspections........
  • Page 249: Routine Inspections

    A standard inspection schedule is once every six months to one year. More fre- quent inspections may be advisable depending on the operating environment.
  • Page 250: Replacing A Mc Unit

    1,2,3... 1. Make a note of the switch settings of the MC Unit to be replaced. 2. Use Motion Perfect to check the project of the Unit and to make a local copy saved on the Personal Computer. 3. Turn OFF the system power supply.
  • Page 252: Appendix A Servo Driver Parameter List

    Appendix A Servo Driver Parameter List The following Servo Driver parameter settings are required for operation with the MC Unit. Refer to the OMNUC W-series user’s manual (I531) for details. Param- Parameter Name Required Explanation Remark eter No. Setting Pn000.1...
  • Page 254: Appendix B Device Protocol (Mcw151-Drt-E Only)

    Module Network MAC ID setting DIP switch Default MAC ID Baud rate setting DIP switch Supported baud rates 125 kbps, 250 kbps and 500 kbps Communications data Predefined Master/Slave Group 2 only server connection set Dynamic connection support (UCMM) Explicit message fragmentation...
  • Page 255 Attribute 1 MAC ID 2 Baud rate 3 BOI 4 Bus Off counter 5 Allocation information 6 MAC ID switch changed 7 Baud rate switch changed 8 MAC ID switch value 9 Baud rate switch value Item DeviceNet service Parameter option...
  • Page 256 9 Expected packet rate 12 Watchdog time-out action 01 (hexadecimal) 13 Produced connection path length 0000 (hexadecimal) 14 Produced connection path 15 Consumed connection path length Yes 0000 (hexadecimal) 16 Consumed connection path 17 Production inhibit time 0000 (hexadecimal) Item...
  • Page 257 0E Get_Attribute_Single 10 Set_Attribute_Single Note The number of bytes for the consumed and the produced size depends on the I/O Slave Messaging mode of the MC Unit. The mode set by pin 7 of the DeviceNet switch settings. Pin 7...
  • Page 258 Appendix B Device Protocol (MCW151-DRT-E only) Item DeviceNet service Parameter option Object instance 1 Service 05 Reset 32 Table_Memory_Read_3W 33 VR_Memory_Read_3W 34 VR_Memory_Read_1W 35 Table_Memory_Write_3W 36 VR_Memory_Write_3W 37 VR_Memory_Write_1W...
  • Page 260: Appendix C Programming Examples

    • Continuously monitoring the status of the system. Please find below an example of such a master shell program. Be sure to modify it to the specific application and to check proper operation for all possible conditions before relying on its safety operation. This program should be set to run at power-up at low priority (task 1).
  • Page 261 WA(10) ' Program status: Normal running VR(programstatus) = 2 BASE(0) 'Main loop '------------------------------------------ loop: ' Check for motion error or Servo Driver OFF IF MOTION_ERROR THEN '... GOTO m_error ENDIF ' Check for emergency stop IF IN(e_stop) = 0 THEN '...
  • Page 262 ' Host Link Master settings '------------------------------ HLM_TIMEOUT = 1000 RETURN 'Motion stop and initialisation '------------------------------- stop_all: 'We store in those variable the cause of the error, if any, for diagnostics BASE(0) VR(alarm_mcw151)=AXISSTATUS VR(alarm_servodriver)=DRV_STATUS 'Stops all programs STOP "application" '... 'Stops all possible moves...
  • Page 263 WAIT UNTIL IN(e_stop) = 1 GOTO start Servo Driver Parameter Setting program The following program can be used to set the correct Servo Driver settings. Modify the parameters to those required for the application. '#################################################################### ' Servo Driver parameter setting program...
  • Page 264 Pn50A.0 = 1 : Input Signal Allocation mode user-defined Pn50A.1 = 8 : RUN Signal Input always disabled Pn50A.2 = 8 : MING Signal Input always disabled Pn50A.3 = 2 : POT Signal Input allocated to CN1-42 IF DRV_READ($50A)<>$2881 THEN DRV_WRITE($50A,$2881)
  • Page 265 Example 3: Positioning a Rotary Table A rotary table must stop at one of 8 equally spaced positions according to the value of a thumbwheel input (inputs 4 to 7). The table will not move until a start button is pressed (input 10).
  • Page 266 Programming Examples Example 5: Synchronising Cutter Movement A flying shear cutter is required to synchronise with a continuously moving web and to cut a roll of paper every 5 m: • The cutter (axis 0) can move a total of 600 mm. We use a maximum 500 mm of this travel.
  • Page 267 A registration process checks the position of the product on the conveyor and calculates the amount that con- veyor A must be advanced or retarded in order to align with conveyor B. Input 1 indicates that the registration process has been completed and the correction amount loaded serially into VR(1).
  • Page 268 Appendix C Programming Examples ' to VR memory (address 0). The PC has Host Link slave node 13. HLM_READ(2,13,PLC_IR,2,2,MC_VR,0) GOSUB check_status PRINT VR(0)[0],VR(1)[0] STOP check_status: VR(250)=HLM_STATUS PORT(2) IF VR(250)=0 THEN PRINT "Succeeded" RETURN ELSE PRINT "Failure (";attempt[0];"): "; IF READ_BIT(9,250) THEN PRINT "Command not recognized by slave"...
  • Page 270: Index

    DRV_RESET group structure DRV_STATUS I/O access DRV_WRITE labels EDIT parameters ENCODER statements ENDMOVE variables EPROM equal operator BASIC commands, functions and parameters ERROR_AXIS listed alphabetically ERROR_LINE ERRORMASK ACCEL ACOS FALSE add operator FAST_JOG ADD_DAC FB_SET ADDAX FB_STATUS ADDAX_AXIS FE_LIMIT...
  • Page 271 Index FWD_JOG OUTDEVICE OUTLIMIT GOSUB OV_GAIN GOTO P_GAIN greater than operator greater than or equal operator PMOVE HALT power operator PP_STEP hexadecimal input PRINT HLM_COMMAND PROC HLM_READ PROC_LINE HLM_STATUS PROC_STATUS HLM_TIMEOUT PROCESS HLM_WRITE PROCNUMBER HLS_MODEL PSWITCH HLS_NODE RAPIDSTOP I_GAIN READ_BIT...
  • Page 272 BASIC programs control system compile description coordinate system debugging description editing scaling error processing CP control. See continuous path control managing multitasking priority run at start-up stepping data format storing datuming. See origin search tasks trace function debugging. See BASIC programs, debugging...
  • Page 273 FINS command one-word format mapping programming example print registration RESET I/O connector TABLE DATA READ (THREE-WORD FORMAT) I/O specifications TABLE DATA WRITE (THREE-WORD FORMAT) indicators three-word format VR DATA READ (ONE-WORD FORMAT) installation VR DATA READ (THREE-WORD FORMAT)
  • Page 274 Table editor coordinating with mark detection terminal window high-speed profiles tools master shell program VR editor product detection rotary table Motion Perfect projects Servo Driver parameter setting program backup synchronising cutter consistency check description proportional gain manager protocol motor runaway general-purpose...
  • Page 275 Servo Driver table alarm virtual axis enable switch limit switches VR variables. See variables, global parameter access VT100 Emulation required settings wiring software reset DeviceNet connector servo period I/O connector servo system power connector...
  • Page 276: Revision History

    Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. I203-E2-02 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.

This manual is also suitable for:

R88a-mcw151-e

Table of Contents