YASKAWA XtraWare User Manual

XtraWare User Manual
XtraWare Version 3.0
(Supporting XtraDrive Versions 3.04 - 3.23)
Catalog No. 8U0109
Revision G
Copyright © 2007 by YET, YASKAWA Eshed Technology Ltd.
XtraWare User Manual
XtraWare Version 3.0 for XtraDrive Version 3.04 – 3.23
Cat. No. 8U0109 Rev. G
June 2007
All rights reserved. No part of this publication may be stored in a retrieval system, or reproduced in any way, including but not limited to photocopy, photography, magnetic or other recording, without the prior agreement and written permission of the publisher. Program listings may be entered, stored and executed in a computer system, but not reproduced for publication.
This manual is designed to provide information about the XtraWare software. Every effort has been made to make this book complete and as accurate as possible. However, no warranty of suitability, purpose or fitness is made or implied. YET Ltd. is not liable or responsible to any person or entity for loss or damage in connection with or stemming from the use of XtraWare and/or the information contained in this publication
YET Ltd. bears no responsibility for errors which may appear in this publication and retains the right to make changes to the software and manual without prior notice.
MAIN OFFICE:
13 Hamelacha St.,
Afeq Industrial Estate
Rosh Ha’ayin 48091
ISRAEL
Tel: +972-3-9004114
Fax: +972-3-9030412
E-mail: info@yetmotion.com
Homepage: www.yetmotion.com
USA OFFICE:
YET US Inc.
444 East Industrial Park Drive
Manchester, NH 03109-5317
USA
Toll Free: 866-YET-8080
Tel: 603-641-1822
Fax: 603-641-1239
E-mail: info@yet-motion.com
Homepage: www.yet-motion.com
Table of Contents
Table of Contents
1. INTRODUCTION......................................................................... 1
2. SYSTEM REQUIREMENTS AND SOFTWARE INSTALLATION......... 3
3. THE MAIN SCREEN INTERFACE .................................................. 5
3.1. Title Bar (A) ................................................................................................5
3.2. Menu Bar (B)/Toolbar (C)...........................................................................5
3.2.1. File Menu..................................................................................................6
3.2.2. Edit Menu .................................................................................................8
3.2.3. View Menu ................................................................................................9
3.2.4. Run Menu ............................................................................................... 10
3.3. Communication Menu................................................................................11
3.3.1. Tool Menu............................................................................................... 11
3.3.2. Maintenance Menu ................................................................................... 12
3.3.3. Window Menu.......................................................................................... 13
3.4. Status Bar (D)...........................................................................................14
3.5. Work Area (E) ...........................................................................................14
3.5.1. Workspace Window .................................................................................. 14
3.5.2. Project Tab ............................................................................................. 14
3.5.3. Program Window .....................................................................................17
3.5.4. History Window .......................................................................................18
3.5.5. Parameters Window .................................................................................18
3.5.6. Cam Window........................................................................................... 19
4. OPERATING THE XTRADRIVE USING XTRAWARE..................... 21
4.1. Connecting the Driver to the PC ................................................................21
4.1.1. Communication Settings ........................................................................... 21
4.2. Setup Wizard.............................................................................................22
4.3. Parameter Control.....................................................................................25
4.3.1. Uploading and Downloading Parameters ...................................................... 25
4.3.2. Viewing Parameter Settings....................................................................... 25
4.3.3. Setting Parameters Online......................................................................... 27
4.3.4. Setting Parameters Offline ........................................................................27
4.4. Programming the XtraDrive ......................................................................27
4.4.1. Writing a Program.................................................................................... 27
4.4.2. Programming Commands with Variable Arguments ....................................... 29
4.4.3. Running a Program .................................................................................. 32
XtraWare User Manual i
Table of Contents
4.5. Program Modes .........................................................................................33
4.5.1. Program Mode ......................................................................................... 33
4.5.2. Immediate Mode...................................................................................... 33
4.5.3. Sequential Mode ...................................................................................... 33
4.6. Tuning the Control Loops ..........................................................................34
4.6.1. Manual Tuning......................................................................................... 34
4.6.2. Auto-tuning ............................................................................................ 34
4.6.3. Performing Fast Tuning............................................................................. 35
4.6.4. Performing Fine Tuning............................................................................. 35
4.6.5. Evaluating Control Loop Performance.......................................................... 36
4.7. Charts .......................................................................................................38
4.7.1. The Chart Main Window ............................................................................ 38
4.7.2. Using Zoom ............................................................................................42
4.7.3. Starting the Trace .................................................................................... 43
4.7.4. Printing a Chart ....................................................................................... 43
4.8. Mechanical Analysis ..................................................................................44
4.8.1. Mechanical Analysis Window...................................................................... 45
4.8.2. Mechanical Analysis Toolbar ......................................................................47
4.8.3. Running the Mechanical Analysis ................................................................ 48
4.9. ECAM (Electronic Cam)..............................................................................49
4.9.1. ECAM Profile Characteristics ...................................................................... 49
4.9.2. Installing ECAM .......................................................................................49
4.9.3. ECAM Workflow ....................................................................................... 49
4.9.4. ECAM Profiles .......................................................................................... 50
4.9.5. Creating a Profile ..................................................................................... 51
4.9.6. Loading a Profile ...................................................................................... 57
4.9.7. Editing a Profile .......................................................................................57
4.9.8. Deleting a Profile ..................................................................................... 58
4.9.9. Viewing the Master-Slave Table .................................................................59
4.9.10. Viewing the Data Graph......................................................................... 60
4.9.11. Printing from the Electronic Cam Window................................................. 60
4.9.12. The Cam List Window............................................................................ 61
4.9.13. Downloading Profiles to the XtraDrive...................................................... 61
4.9.14. Programming with Electronic Cam........................................................... 62
4.9.15. Modifying a Profile using Variables ..........................................................63
4.9.16. Monitoring Master and Slave Positions ..................................................... 67
4.9.17. Serial Communication and ECAM ............................................................ 67
4.10. Registration and Latching .........................................................................70
4.10.1. Latching Workflow ................................................................................ 71
4.10.2. Troubleshooting ................................................................................... 72
4.10.3. Commands .......................................................................................... 72
4.10.4. Registration Variables ........................................................................... 73
4.10.5. Registration Example ............................................................................74
4.11. Interrupts .................................................................................................76
4.11.1. Interrupt Events ................................................................................... 76
4.11.2. Multiple Interrupts ................................................................................ 76
ii XtraWare User Manual
Table of Contents
4.11.3. Interrupt Response Time .......................................................................76
4.11.4. Interrupt Masks.................................................................................... 77
4.11.5. Interrupt Handling ................................................................................ 77
4.11.6. Interrupt Variables ............................................................................... 77
4.11.7. Interrupt Commands............................................................................. 80
4.11.8. Interrupt Example ................................................................................ 82
4.12. Master-Slave Synchronization...................................................................85
4.12.1. Using New_move_enable to Reduce Response Time .................................. 85
4.12.2. Overriding New_move_enable ................................................................ 85
4.12.3. Example Program for a Flying Shear Application........................................ 85
5. COMMAND REFERENCE ............................................................ 87
5.1. XtraWare Modes........................................................................................88
5.1.1. Program Mode (User Program Buffer UPB)................................................... 88
5.1.2. Sequential Mode (Sequential Command Buffer SCB) ..................................... 88
5.1.3. Immediate Mode (Immediate Command Buffer ICB) ..................................... 89
5.2. SCB and UPB Command Flushing...............................................................89
5.2.1. Motion Commands With _D Suffix .............................................................. 89
5.2.2. Motion Commands Without _D Suffix.......................................................... 89
5.3. Motion Modes............................................................................................90
5.3.1. Transition Between Motion Modes............................................................... 91
5.4. Motion Command Buffer............................................................................93
5.5. XtraWare Commands.................................................................................93
ACCELERATION ................................................................................................. 96
ALARM_RESET ..................................................................................................97
CALL................................................................................................................ 98
CONTROL ......................................................................................................... 99
DELAY............................................................................................................ 100
ECAM_DISENGAGE .......................................................................................... 101
ECAM_ENGAGE ............................................................................................... 102
ELECTRONIC_GEAR ......................................................................................... 103
END............................................................................................................... 104
ENGAGE_VIRTUAL_AXIS................................................................................... 105
EXT_INT......................................................................................................... 106
FAST_OUTPUT_SETTING................................................................................... 107
FAULT_MANAGER ............................................................................................ 110
FAULT_MANAGER_RETURN ............................................................................... 111
FAULT_MESSAGE_CLEAR .................................................................................. 112
GAIN ............................................................................................................. 113
GO ................................................................................................................ 114
GO_D ............................................................................................................ 115
GO_H ............................................................................................................ 116
GO_TO........................................................................................................... 118
HOME Commands ............................................................................................ 118
HARD_HOME................................................................................................... 119
HOME_C......................................................................................................... 120
XtraWare User Manual iii
Table of Contents
HOME_SW ...................................................................................................... 121
HOME_SW_C .................................................................................................. 122
IF.................................................................................................................. 123
IF_INPUT........................................................................................................ 125
INPUT_CASE ................................................................................................... 127
INT................................................................................................................ 129
INT_RETURN................................................................................................... 131
JERK_TIME ..................................................................................................... 132
LABEL ............................................................................................................ 133
LATCHING_TRIGGER ........................................................................................ 134
LOOP ............................................................................................................. 136
MATH............................................................................................................. 137
MOVE ............................................................................................................ 139
MOVE_D......................................................................................................... 140
MOVE_H......................................................................................................... 141
MOVE_R......................................................................................................... 142
READ_FROM_ARRAY ........................................................................................ 145
REGISTRATION_DISTANCE ............................................................................... 146
RETURN ......................................................................................................... 147
RUN............................................................................................................... 148
SET_OUTPUT .................................................................................................. 148
SET_OUTPUTS ................................................................................................ 150
SET_VAR ........................................................................................................ 151
SET_ZERO_POSITION ...................................................................................... 152
SLIDE ............................................................................................................ 153
SLIDE_ANALOG ............................................................................................... 154
SPEED ........................................................................................................... 155
SPEED_CONTROL ............................................................................................ 156
SPEED_LIMIT_FOR_TORQUE_MODE ................................................................... 157
START............................................................................................................ 158
STOP ............................................................................................................. 158
STOP_EX........................................................................................................ 159
STOP_MOTION ................................................................................................ 161
TORQUE ......................................................................................................... 162
TORQUE_ANALOG............................................................................................ 163
TORQUE_LIMITS.............................................................................................. 164
WAIT_EXACT .................................................................................................. 165
WAIT_FOR_START ........................................................................................... 166
WAIT_INPUT................................................................................................... 167
WAIT_STOP .................................................................................................... 168
WAIT_VAR...................................................................................................... 169
WRITE_TO_ARRAY........................................................................................... 170
5.6. Serial Communication Commands ...........................................................171
CLEAR_BUFFER ............................................................................................... 171
ECAM_POINTS ................................................................................................ 171
ECAM_PROFILE ............................................................................................... 172
ECAM_SEGMENT.............................................................................................. 173
ECAM_TABLE_BEGIN........................................................................................ 173
ECAM_TABLE_END........................................................................................... 174
GET_FROM_ARRAY .......................................................................................... 174
GET_PAR........................................................................................................ 174
iv XtraWare User Manual
Table of Contents
GET_VAR........................................................................................................ 175
GET_VERSION................................................................................................. 175
POLLING ........................................................................................................ 175
SAVE_PRG_ECAM ............................................................................................ 175
SET_PAR ........................................................................................................ 176
6. SERIAL INTERFACE PROTOCOL.............................................. 177
6.1. Basic Communication Specifications .......................................................177
6.2. Protocol Specifications............................................................................177
6.2.1. Message Data Structure.......................................................................... 178
6.2.2. Master Message..................................................................................... 178
6.2.3. Response Message ................................................................................. 183
6.3. Troubleshooting......................................................................................191
7. ERROR MESSAGES ................................................................. 193
8. PARAMETER REFERENCE........................................................ 211
8.1. Table 19: Parameters..............................................................................211
8.2. Table 20: Application Setting Parameters ...............................................218
8.3. Table 21: Switches..................................................................................219
8.4. Table 22: Input Signal Selections............................................................226
8.5. Table 23: Home Switches ........................................................................229
8.6. Table 24: Extended Input Signal Selection..............................................229
8.7. Table 25: Output Signal Selections..........................................................230
8.8. Table 26: Extended Output Signal Selection............................................231
8.9. Table 27: Input and Output Availability per Mode...................................232
8.10. Table 28: Auxiliary Functions ..................................................................233
8.11. Table 25: Monitor Modes .........................................................................234
9. LIST OF SYSTEM VARIABLES ................................................. 235
10. LIST OF STATUS WORD BITS .............................................. 244
11. LIST OF OPERATION CODES................................................ 245
XtraWare User Manual v
Table of Contents
12. GLOSSARY OF TERMS AND CONCEPTS................................. 249
12.1. Electronic Gear........................................................................................249
12.1.1. Electronic Gear Parameters .................................................................. 249
12.2. Motion Profile..........................................................................................250
12.2.1. Profile Velocity ................................................................................... 250
12.2.2. Profile Acceleration ............................................................................. 250
12.2.3. Profile Jerk Smoothing Time ................................................................. 251
12.3. Explanation of Command Table ...............................................................251
vi XtraWare User Manual
1. Introduction
The XtraWare software constitutes the user interface and tool of operation for the XtraDrive. It enables the user to set parameters, tune control loops and monitor faults. It also facilitates programming of the driver both for professional programmers and novices.
The topics described in this manual include:
Software installation (including system requirements and setup
instructions)
User menus and toolbars Operation of the XtraDrive driver using the XtraWare software
(including communication, parameters and program handling)
Command reference which lists alphabetically:
The commands used in the XtraWare software The commands available in the serial communication protocol
The XtraDrive serial communication protocol Error messages Parameter reference providing information on all the parameters
available in the XtraWare software
System Variables Status Word Bits Operation Codes
Related documents:
Introduction
Title Catalog Number
XtraDrive (XD-) SERIES AC SERVO DRIVER User Manual
AC SERVO MOTOR INSTRUCTIONS TOE-C231-2 for ∑-II
XtraDrive (XD-) SERIES AC SERVO DRIVER Short Form Installation Guide
XtraWare User Manual 1
8U0108
servomotors or other compatible motors
8U0107
1BSystem Requirements and Software Installation
2. System Requirements and Software Installation
For optimum performance, XtraWare requires:
Computer: Pentium 166 MHz (Pentium II 350 MHz recommended). At least 32 MB of RAM (64 MB recommended). A hard drive with at least 100 MB of free disk space. Operating System:
Windows Windows 98 Windows NT4.0 Service Pack 3 or later (IE4.01 Service Pack 2 or
later)
Windows 2000 Windows Me Windows XP
Super VGA or better graphics display, minimum 256 colors (65536
colors recommended).
When using a computer that does not have a serial port, use either a
USB-to-serial converter or a PC Card expansion interface (PMCIA) with a serial port. Review vendors’ system requirements for further details, as not all USB-to-serial converters have exhibited satisfactory
performance. See Appendix E, page E12 of the XtraDrive User Guide for
a description of the cable and pin assignments.
CD-ROM drive (for installation only).
TM
95 OSR2 or later (IE4.01 Service Pack 2 or later).
The XtraWare software is provided on a CD-ROM supplied with the XtraDrive. To obtain a copy, visit the web site (www.yetmotion.com) and login to the download section. You may also contact your sales representative.
Before proceeding with the installation procedure, close any applications that are open. During the procedure, XtraWare and its related files are installed on your hard disk. If a previous version of XtraWare is already installed, the existing program is overwritten. All files created with previous versions of the software should be backed up.
XtraWare User Manual 3
1BSystem Requirements and Software Installation
¾ To install XtraWare:
1. Insert the CD into the CD-ROM drive.
2. If the procedure does not start automatically, either: Click Start>Run and type "D:\Install\SETUP" (where D: is your
CD drive), or
Using Windows Explorer, navigate to the CD-ROM drive, and double-
click D:\Install\SETUP.EXE.
The installation screen is displayed, the installation procedure commences and a message welcoming you to XtraWare is displayed.
3. Click Next to continue.
4. Follow the onscreen instructions to choose a destination folder for the
XtraWare files.
5. Click Next to continue.
6. Select the program group to create the XtraWare icon. C:\Program Files\YET\XtraWare is the default setting.
7. After selecting the program group or folder, click Next to continue.
The PC files are copied from the CD-ROM. During the procedure, the installation progress is displayed.
Note:
If new versions of the PC support files are needed to install XtraWare, a window will appear asking whether to overwrite the current version or to cancel the installation. XtraWare may not run correctly if the new versions of the support files are not installed.
4 XtraWare User Manual
The Main Screen Interface
3. The Main Screen Interface
This chapter describes the XtraWare main screen. The main screen comprises a main toolbar, menus and several windows. A sample main screen is shown in Figure 1 below. For clarity, the screen has been divided into separate elements.
Figure 1: Sample Main Screen
3.1. Title Bar (A)
The XtraWare title bar displays the name of the currently opened project file.
3.2. Menu Bar (B)/Toolbar (C)
The XtraWare menu bar provides access to the XtraWare menus: File, Edit, View, Run, Communication, Tools, Maintenance, Window and Help.
The toolbar is located immediately beneath the menu bar. It comprises shortcut icons to the most commonly used XtraWare options. In the following descriptions of the menu options, the appropriate icon (where applicable) is listed next to each option.
Note:
Some menu options are not available in all modes and will appear as disabled (grayed) when unavailable. Similarly, disabled icons indicate that communication is offline.
XtraWare User Manual 5
The Main Screen Interface
3.2.1. File Menu
A project contains all the data currently active in XtraWare, such as the user program, parameter settings, and definitions. The File Menu options are used to create new XtraWare projects, open existing projects, and save changes to projects. Project files, which are handled like any other file, are automatically assigned an extension of XDR, for example, project1.XDR.
In addition, the File Menu opti ons are used to download, upload and print programs and parameters.
Table 1: File Menu Options
Option Icon Description
New Project (Ctrl+N)
Creates a new XtraWare project. When this option is selected, the Motor Selection window in which you select the motor that will be used for this project, is displayed.
Figure 2: Motor Selection Window
Select the appropriate manufacturer and then one of the listed modules. If you are
using a model that is not listed, click Add Another Motor.
Enter the name of the model in the Motor Model field and select the Motor Type (either Rotary or Linear).
Click Finish to proceed; the Workspace,
Program, History and Parameters windows are opened with their default contents.
6 XtraWare User Manual
Option Icon Description
The Main Screen Interface
Open Project (Ctrl+O)
Save Project
Opens an existing XtraWare project. When this option is selected, the Load Project window is opened:
Figure 3: Load Project Window
Saves the current project under its existing name. If the project has not yet been named, the Save Project window is opened:
Save
Saves the current project under a new
Project as
Close
Closes the current project. If the project
Project
XtraWare User Manual 7
Figure 4: Save Project Window
In the File name field, type a name for the
project and click Save.
name. When this option is selected, the Save Project window is opened.
has not been saved, the following message is displayed:
Save changes to <project-name>?
Click Save to save the project.
The Main Screen Interface
Option Icon Description
Download Program
Download Parameters
Download
1
Cam
Upload
Print
Prints the current program.
Downloads a program to the XtraDrive driver.
Downloads a set of parameters to the XtraDrive driver.
Downloads cam profiles to the XtraDrive driver.
Uploads data from the XtraDrive driver.
Program
Print Parameters
Prints the parameter list, including their
values, on the printer. The parameters are printed in tabular format.
Print Chart Prints the currently displayed chart and its
corresponding data. See section
4.7.4,
Printing a Chart, for further information.
Exit Exits from XtraWare.
Note:
1) The ECAM-related options are only activated if an ECAM license has been purchased.
3.2.2. Edit Menu
The Edit Menu options are used to edit the command order of a program in the Program window.
Table 2: Edit Menu Options
Option Description
Cut (Ctrl+X)
Copy (Ctrl+C)
Paste (Ctrl+V)
Deletes selected text or lines from the program and places the selection on the Windows and XtraWare clipboards.
Places a copy of selected text or lines from the program on the Windows and XtraWare clipboards.
Inserts the contents of the XtraWare clipboard into the program.
8 XtraWare User Manual
3.2.3. View Menu
The View Menu options are used to select which windows you want displayed on the XtraWare screen.
Table 3: View Menu Options
Option Icon Description
Program Displays/hides the Program window.
Parameters Displays/hides the Parameters window.
Cam List Displays/hides the CAM window.
Workspace Displays/hides the Workspace window.
History Displays/hides the History window.
The Main Screen Interface
Chart
Variable
Opens the Charts window. See section Charts, for a description of this window’s operation.
Opens the Variables window:
4.7,
Toolbar Displays/hides the toolbar.
Status bar Displays/hides the status bar.
XtraWare User Manual 9
Figure 5: Variables Window
The Main Screen Interface
3.2.4. Run Menu
The Run Menu options enable you to control the program running on the XtraDrive driver.
Table 4: Run Menu Options
Option Icon Description
Run Program
Stop Program
Servo ON
Servo OFF
Immediate Mode
Program Mode
Runs the program immediately.
Stops the program immediately.
Switches the XtraDrive driver ON so that the motor is now under driver control. In this mode, the driver holds the motor in position under various load conditions, even when no motion is required.
Switches the XtraDrive driver OFF so that the motor is no longer under driver control.
Switches to Immediate mode. In Immediate mode, commands are downloaded immediately to the driver’s memory. For details of all the available modes, see section Modes.
Switches to Program mode. In Program mode, a list of commands is prepared in the program editor to be downloaded to the driver at a later stage. For details of all the available modes, see section
4.5, Program Modes.
4.5, Program
Sequential Mode
Jog
Stop
10 XtraWare User Manual
Switches to Sequential mode. In Sequential mode, each command is downloaded individually to the driver and then processed. For details of all the available modes, see section
Runs the motor at a constant predefined speed.
Immediately stops the motor motion. You can
also click Stop on the toolbar or press F9. For further details, see the STOP_EX command in Chapter
4.5, Program Modes.
5, Command Reference.
3.3. Communication Menu
The Communication Menu options are used to switch the communication between the XtraWare and the XtraDrive on and off. Options in this menu are used to customize the communication parameters.
Table 5: Communication Menu Options
Option Description
Online Switches to working in online mode.
Offline Switches to working in offline mode.
Setting Opens the Communication Settings window. See
section this option.
3.3.1. Tool Menu
The Tool Menu options allow you to access the Electronic Cam interface, to automatically tune the control loops, and to perform a mechanical analysis of the motor-load system.
4.1.1, Communication Settings, for details on
The Main Screen Interface
Table 6: Tool Menu Options
Option Icon Description
Electronic
1
Cam
Auto­tuning
Mechanical Analysis
Creates motion according to a specified profile that is dependent on the position of a master axis or on the elapsed time.
Automatically sets control loop gains based on actual system measurements and tunes the XtraDrive driver accordingly. See section Tuning the Control Loops, for full details.
The mechanical analysis (FFT) option samples and analyzes 2000 speed data points. The speed is a response to sinusoidal torque frequency commands. The response is displayed as a graph of the gain (dB) and phase angle (degree) versus frequency (Hz in log scale). According to the graph, the relevant parameters can then be adjusted in order to reduce the effect of the mechanical restrictions. See section details.
4.6,
4.8, Mechanical Analysis, for full
XtraWare User Manual 11
The Main Screen Interface
Note:
1) The ECAM related options are only activated if an ECAM license has been purchased.
3.3.2. Maintenance Menu
The Maintenance Menu options allow you to tune the control loops automatically or manually, to open and close a log file, and to send a command to the XtraWare device.
Table 7: Maintenance Menu Options
Option Icon Description
Reset Driver
Reset to Default Parameters
Open Log File
Cycles the main circuit and control power supply. This is necessary after certain parameters are edited, to enable the new
settings. The Need Reset indicator appears in
the status line when this action is necessary.
Discards user modifications to the parameters
and reverts to the factory default parameters. Note that some parameters are updated at power-up only and you must therefore restart the XtraDrive after using this option.
Starts a new log file and inserts all the
commands sent via communication into the log file. The log file is used mainly for debugging purposes.
When this option is selected, the Open Log File dialog box is displayed:
12 XtraWare User Manual
Figure 6: Open Log File Dialog Box
Select a directory and select the name of an existing file, or type in a name to create a new log file. When XtraWare is in Online
Option Icon Description
mode, all the commands sent via communication to the XtraDrive are stored in the selected log file.
To close the log file, select the Close Log File
option.
The Main Screen Interface
Close Log
Stops storing commands in the log file and
File
Password Enables an authorized user to enter a
Send
For internal use only.
Command
3.3.3. Window Menu
The Window menu is used to switch between different views in the XtraWare system, and to save a customized screen for future use.
Table 8: Window Menu Options
Option Description
Project Screen
Displays the default XtraWare Main Screen interface, which includes the Workspace, Program, History, Cam and Parameters windows.
closes the log file that is currently open.
password to be permitted to modify certain parameters (displayed in red in the Parameters window) which can only be modified by authorized users.
Program Edit Screen
User Screen
Save User Screen
Enlarges the Program window to facilitate program editing. The History, Cam and Parameters windows are hidden.
Displays the current user customized screen saved under the Save User Screen option.
The size and location of the Workspace, Program, History, Cam and Parameters windows can be customized to facilitate your work session. This option enables you to save your customized screen for future work sessions. Each time you save a new customized screen, the previous user screen is overwritten.
XtraWare User Manual 13
The Main Screen Interface
3.4. Status Bar (D)
The Status Bar, located at the bottom of the XtraWare screen, indicates the status of the current driver and of the Servo.
Figure 7: Status Bar
The indicators on the right of the status bar are as follows:
A: Indicates whether or not a program is running on the controller (Run
or Stop).
B: Need Reset indicator. After certain parameters are edited, the main
circuit and control power supply must be cycled in order to enable the
new settings. When this indicator appears, click Reset.
C: Indicates the status of the connection to the XtraDrive driver (Offline
or Online).
D: Indicates the current status of the XtraDrive driver (ON or OFF).
3.5. Work Area (E)
The Work Area comprises the following windows:
Workspace window Project tab Program window History window Parameters window Cam window
3.5.1. Workspace Window
The Workspace window includes:
Project Tab: The subsections of the current project. Command Tab: A list of the XtraWare commands divided into six
groups.
Description Pane: A description of the currently selected item.
3.5.2. Project Tab
The Project tab (Figure 8) presents the subsections (Program, Parameters and Cam) of the current project.
14 XtraWare User Manual
To view the project subsections, click the + sign next to the project name in the Workspace window.
Figure 8: Workspace Window – Project Tab
3.5.2.1. Command Tab
The Command tab (Figure 9) lists the commands that can be used to write the program. The commands are divided into groups. A full description of each command is provided in Chapter
To view the commands under a command group, click the + sign next to the group name in the Command tab.
The Main Screen Interface
5, Command Reference.
Figure 9: Workspace Window – Command Tab
XtraWare User Manual 15
The Main Screen Interface
The icon next to each command indicates its current status. The availability or unavailability of a command depends on the current working mode. Table 9 below lists the three command tab icons.
Table 9: Command Tab Icons
Icon Description
Available command. This command can be used in the current working mode.
Currently selected command. When a command is selected its description is displayed in the Description area under the command list.
Command is not available in the currently selected mode.
¾ To select a command:
1. Double-click on the command name. The appropriate command dialog
box is displayed. See section
4.4.1, Writing a Program, for details on how to insert
commands into the program.
2. Click on a command name to see a short description of the command in the Description pane, or see Chapter
detailed description.
3.5.2.2. Command Groups
The Command Groups are listed in the table below.
5, Command Reference, for a more
Table 10: Command Groups
Group Description
ECAM Controls the motor
motion according to a profile that is
Included Commands
(examples)
ECAM_ENGAGE; ECAM_DISENGAGE;
ECAM_VIRTUAL_AXIS dependent on the position of a master axis or on time elapsed.
Encoder Latching
Controls the latching and registration
LATCHING_TRIGGER,
REGISTRATION_DISTANCE process.
Home Moves the motor to
search for the (system) home
HARD_HOME, HOME_C,
HOME_SW, HOME_SW_C,
SET_ZERO_POSITION position.
16 XtraWare User Manual
The Main Screen Interface
Group Description
Interrupt Specifies the interrupt
Included Commands
(examples)
EXT_INT, INT, INT_RETURN routines to be run for various interrupt events.
Motion Controls motor
motion.
GO, GO_D, GO_H, MOVE,
MOVE_D, MOVE_H, MOVE_R,
SLIDE, SLIDE_ANALOG,
SPEED_CONTROL, START,
STOP_EX, TORQUE,
TORQUE_ANALOG
Motion Profile
Changes the default values of speed,
ACCELERATION, JERK_TIME,
SPEED acceleration and jerk time.
Output Sets output ON/OFF. FAST_OUTPUT_SETTING,
SET_OUTPUT, SET_OUTPUTS;
Program Flow Control
Program flow handling commands.
CALL, END, GO_TO, IF,
IF_INPUT, INPUT_CASE, LABEL,
LOOP, RETURN, RUN
System Enables and disables
SERVO control in the program. Sets gain and torque limits.
Variables Sets variable values in
the program.
Wait Delays program flow,
either for a specified time or until a condition is met.
3.5.3. Program Window
The Program Window (Figure 10) displays the entire program. The program is written by selecting commands from the Command tab, and entering values for the commands’ parameters. See section Program, for details on how to write a program.
CONTROL, GAIN,
TORQUE_LIMITS,
ELECTRONIC_GEAR
MATH, READ_FROM_ARRAY,
SET_VAR, WRITE_TO_ARRAY
DELAY, WAIT_EXACT,
WAIT_FOR_START,
WAIT_INPUT, WAIT_STOP,
WAIT_VAR
4.4.1, Writing a
XtraWare User Manual 17
The Main Screen Interface
¾ To change the value of a command’s argument after it has
been added to the program:
1. Double-click on the command line to open its window, and enter a new
value or values.
Figure 10: Program Window
3.5.4. History Window
The History window presents a list of all the commands that have been downloaded or sent (in Immediate mode) to the XtraDrive driver.
For each command, the following information is displayed:
Table 11: History Window Columns
Name Description
ID A sequential number assigned to the command.
Command The name of the command that was executed.
Operation Mode
The operation mode (Program, Immediate, Sequential) active when the command was issued.
3.5.5. Parameters Window
Each project in the XtraWare system comprises a program and parameters.
The XtraWare parameters are divided into different parameter groups, and are displayed in the Parameters window (Figure 11).
For instructions on how to set parameters, see section Parameters Online, and section
4.3.4, Setting Parameters Offline.
4.3.3, Setting
A full list of all the parameters available in the XtraDrive system and their values is provided in Chapter
18 XtraWare User Manual
8, Parameter Reference.
The Main Screen Interface
The Parameters window is divided into three panes as shown below:
Figure 11: Parameters Window
Group pane (A) lists the parameter groups. The parameters in the
selected group are displayed in the Parameters pane.
The Parameters pane (B) displays the details of each parameter.
Initially, the values displayed for the parameters are the default values.
The Description pane (C) displays a short description of the selected
parameter.
3.5.6. Cam Window
The Cam window lists all ECAM profiles that have been defined.
Figure 12: Cam Window
Download size: Indicates the number of data points that will be
downloaded to the XtraDrive when the Download Cam button is pressed.
Profile#: The profiles are identified in the Cam List by their numbers. Download: Check the checkboxes corresponding to all profiles that
should be downloaded to the XtraDrive when the Download Cam button
is pressed.
Size: The number of data points in each profile
XtraWare User Manual 19
The Main Screen Interface
¾ To view or edit a profile:
1. Double-click anywhere in the row corresponding to the profile number
that you would like to view or edit.
The Electronic Cam window is opened, with the Position Setting tab
displaying the selected profile. See section
Note:
The ECAM related options are only activated if an ECAM license has been purchased. Contact YET to purchase an ECAM license.
4.9, ECAM (Electronic Cam).
20 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4. Operating the XtraDrive Using XtraWare
This chapter provides detailed instructions on how to operate the XtraDrive servo driver using the XtraWare software.
4.1. Connecting the Driver to the PC
Serial communication is used between the PC and the driver.
¾ To connect the driver to the PC:
1. Connect a communication cable to an available COM port of your PC.
Note that XtraWare supports serial communications ports COM1 through COM7. Their usage depends upon available hardware
2. Connect the other end of the communication table to the CN3 connector
on the XtraDrive.
4.1.1. Communication Settings
.
It is important that the communication settings are set correctly.
¾ To change the communication settings:
1. Run the XtraWare software. The default location is: Start > Programs > XtraWare.
2. Select Setting from the Communication menu. The Communication Settings window is displayed.
Figure 13: Communication Settings Window
XtraWare User Manual 21
Operating the XtraDrive Using XtraWare
3. Set the Port to the correct COM port of your PC (the default is COM1 on
most computers).
4. Set the Axis Address.
5. All other communication parameters are predefined and are for display
purposes only:
Baud Rate – 19200 Parity – Even Data Bits – 7 Stop bits – 1 Flow Control – None
6. Click OK.
¾ To check the communication settings:
1. After changing the communication settings, select Online from the Communications menu.
If the communication indicator in the status bar changes to Online for a few seconds and then reverts to Offline, communication between XtraWare and the XtraDrive has not been established.
In such cases, check the following:
The driver is powered on. The communication cable is connected both to the PC and to the
XtraDrive.
Select the Setting option from the Communication menu and make
sure that the Port is set to the correct COM port of your PC (the default is COM1 on most computers).
4.2. Setup Wizard
To facilitate the setup procedure, XtraWare offers a Setup Wizard that guides you through the following steps:
Select Motor – YASKAWA or other Set Reference Command Type – Pn000.1 Set User Units Set Motion Profile Default (see section 12.2) Set End of Motion definitions Set analog input command of Speed and Torque (if required) Set pulse-train settings for master-slave applications (if
required)
Set digital I/O Set PG divider output ratio.
22 XtraWare User Manual
Operating the XtraDrive Using XtraWare
¾ To operate the wizard:
1. Select New Project from the File menu.
2. Follow the instructions on the following Wizard screens:
Motor Selection: Select your motor from the list or add a new motor. Basic Selection: Set the control method, usually “programming”. For
host controller applications with pulse train output use “Position control (Pulse train)”. For YASKAWA option board (NS300, NS500, etc), set for “YASKAWA Option board”.
Set motor direction. Axis address.
XtraDrive supports networking of up to 15 drives connected by serial communication. (Use RS 232 for communication with a single XtraDrive and RS422 for use with up to fifteen XtraDrive units.)
Set XtraDrive address.
Commutation Settings (Only applicable for motors with A quad B
encoders):
Software commutation (Phase finding) – XtraDrive finds the
commutation angle without sensors. This takes several seconds on the first CONTROL ON after powering up.
With commutation sensors (Hall sensors) – Some models of XtraDrive
support commutation sensors of 5V or 24V. Set according to the sensors’ polarity.
User Units:
Set user units for position, speed and acceleration. Position units must be in the range of 0.01 – 100.
Default Profile:
Set default speed, acceleration and jerk (speed and acceleration
values are mandatory). The values can be changed in the program using the appropriate commands.
Set the end of motion window in the Advance Setting screen.
Analog Input:
If you plan to use the analog input command, set the following values. Otherwise skip this screen.
Ratio between the analog command and the generated speed Ratio between the analog command and the generated torque
Pulse Train:
Set the following if your application requires pulse-train values. Otherwise skip this screen.
Pulse-train form and logic. Electronic gear between the pulse-train and the motor. (See section
12.1 as well as Electronic Gear in the Glossary.)
XtraWare User Manual 23
Operating the XtraDrive Using XtraWare
If position control (Pn000.1=C) is set, the Position Completed Width
screen is enabled. When using programming mode (Pn000.1=D), the equivalent value is set by Pn2C4 (Pulse train synchronization window).
Inputs:
Allocate digital inputs to system functions. Digital inputs used as
general purpose inputs can be referred to simply by their input numbers from within the program.
The polarity can be reversed by checking the Reverse polarity
checkbox.
Outputs:
Allocate digital outputs to system functions. If digital outputs are to
be used as general purpose outputs simply refer to the output number in the program.
Each output can be used either as a system function output or as a
general-purpose output.
Encoder Output Settings:
For a host-controlled application where output pulses (PG out) are required, set the output gear. Otherwise skip this screen.
3. Click Finish to complete the setup and create a parameters file.
4. Click Download Parameters
to download the parameters to
XtraDrive,.
5. Cycle the power to reset the XtraDrive.
6. You can now proceed to Auto-tuning (See
Loops).
4.6, Tuning the Control
24 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.3. Parameter Control
In order to control the motor and the peripheral system (such as I/O lines), the XtraDrive requires that certain parameters be set in its memory. Some parameters are automatically set by the system based on the automatic motor identification (when applicable), and some must be set manually. The parameters define data such as current limits, encoder type and I/O configuration, as well as data related to specific user applications (such as the ratio between the encoder resolution and the user units).
4.3.1. Uploading and Downloading Parameters
Parameters can be sent from the PC to the XtraDrive (Downloading) or read from the XtraDrive to the PC (Uploading). Note that the Upload function reads and uploads the parameters, the program and all other data currently active in the XtraDrive (excluding ECAM tables). Therefore, it is advisable to save your program prior to using the Upload function to prevent it from being overwritten.
¾ To download parameters:
1. Click Download Parameters on the toolbar.
Note:
If the motor is not fitted with a serial encoder (SII or W Series) and
the project was opened using Open Project and not by running the
Wizard, you must enter a password or the motor parameters (highlighted in red) will not be changed.
¾ To upload parameters:
1. Click Upload on the toolbar.
Note:
This will upload entire project parameters and program.
4.3.2. Viewing Parameter Settings
Parameters are set in the Parameters window (Figure 14). This window displays the current values of the project’s parameters. Note that parameter
values in the project do not necessarily match the values currently active in
the XtraDrive.
In order to provide easy access to certain parameters, the parameters can be viewed in groups. The default group setting of the Parameters window is ALL, that is, all available parameters in the system are shown.
XtraWare User Manual 25
Operating the XtraDrive Using XtraWare
¾ To display parameters belonging to a specific group in the
Value pane:
1. Select one of the predefined groups (e.g., Digital I/O, Servo Control) listed in the Group pane.
Figure 14: Parameters Window
The fields in the panes of the Parameters window are listed below (from left to right):
Group: Parameter group selection. Parameter status indication: An asterisk in this column indicates that
the value of the parameter has been changed in the PC, but has not
been downloaded to the XtraDrive.
Parameter ID: The parameter number. Value: Current parameter value (0x indicates hexadecimal values). Min: Minimum value allowed for the parameter. Max: Maximum value allowed for the parameter. Units: The units used for the parameter. Default: The default value for the parameter. Description: A short description of the parameter functionality.
26 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.3.3. Setting Parameters Online
¾ To set a parameter online:
1. Right-click on the row of the parameter you wish to change.
A pop-up window appears (Figure 15) displaying the current value of the parameter.
Figure 15: Parameter Setting Window
2. Use the buttons below each digit to change the value of the parameter.
Note that the changed value is sent on-line to the XtraDrive. Some values take effect immediately; others are sent to the driver but take
effect only after the power is cycled. The Need Rese t indicator appears
in the status line when this action is necessary.
4.3.4. Setting Parameters Offline
¾ To set a parameter offline:
1. Double-click on the value field of the desired parameter.
2. Enter the desired value. The new value is not sent to the driver automatically (an asterisk
appears in the Parameter status indication column).
3. Click the Download icon
to send the changed values to the driver.
4.4. Programming the XtraDrive
The XtraDrive has built-in programming capabilities. You can write a program that will be executed by the XtraDrive without the need for an external positioning controller.
4.4.1. Writing a Program
A program is written by selecting a command from the command list in the Workspace window (Figure 16), and adding it to the Program window. (For a detailed description of the different commands, see Chapter Reference.)
5, Command
You must be in Program mode to write a program.
XtraWare User Manual 27
Operating the XtraDrive Using XtraWare
¾ To enter Program mode:
1. Click Program Mode in the toolbar, or select the Program Mode option from the Run menu.
Figure 16: Workspace Window Figure 17: Program Window
The commands in the Workspace window are divided to groups. For further details, see section
3.5.3, Program Window.
¾ To add a command to a program:
1. Open the relevant command group.
2. Double-click the required command to open a pop-up dialog box (Figure
18) relating to the command.
Figure 18: Sample Command Pop-up Dialog Box
28 XtraWare User Manual
Operating the XtraDrive Using XtraWare
3. Set the arguments required for the command. See section 4.4.2,
Programming Commands with Variable Arguments, for instructions on specifying the argument with a variable.
4. Click Program to add the command to the program in the Program
window. The maximum length of a program is 180 command lines. If ECAM is
enabled, the maximum program length is 99 lines.
It is possible to edit the arguments of commands already listed in the
Program window:
¾ To edit a programmed command:
1. Double-click a command in the Program window to open the command's
pop-up window.
2. Edit the arguments as desired and click Program.
¾ To edit the order of programmed commands:
1. Use the standard Windows operations (Ctrl+X - cut, Ctrl+C - copy, and Ctrl+V - paste) to re-order commands in the Program window.
When you have completed the program, it must be downloaded to the XtraDrive.
¾ To download a program to the XtraDrive:
1. Click Download Program .
4.4.2. Programming Commands with Variable Arguments
Instead of entering a number to specify the value of an argument, you can set the argument to equal one of the system or user variables. The variables that can be selected depend on the command being programmed.
Arguments that can be specified by variables are indicated by the letter V in
the Arg columns of the table in Chapter the Syntax Arguments section of each command table in Chapter
Command Reference.
This functionality is available in driver versions 3.0 and upward.
11, List of Operation Codes, and in
5,
XtraWare User Manual 29
Operating the XtraDrive Using XtraWare
¾ To set an argument equal to a variable:
1. Open the relevant command group.
2. Double-click the required command to open a pop-up dialog box relating
to the command.
3. Click the arrow at the right of the relevant argument field.
A drop-down menu listing available variables is displayed.
Figure 19: Sample Command Pop-up Dialog Box
4. Click the required variable.
The selected variable name is displayed in the argument field.
4.4.2.1. Example
The following example program illustrates how arguments can be specified by variables.
In the program, a sequence of movements is performed. The motion characteristics of each movement are dependent on the value of the digital inputs. For each combination of digital inputs, a different set of values are assigned to the variables that set the motion characteristics.
The main part of the program (lines 8 to 16) sets the profile velocity and initiates motion. Once a pre-specified position has been passed, the speed is reduced. Once the commanded motion has ended, a second motion back to the origin is started. 500 ms after the second motion has ended, the program restarts.
Most of the commands used in the main section use variables to specify the value of the arguments. Depending on the initial state of the inputs, the program calls (in lines 4 and 6) a different subroutine The variable values are set under labels 3 and 4.
30 XtraWare User Manual
Evaluation of Digital Inputs
1 LABEL 1
2 WAIT_INPUT 1 = 0 -1
3 WAIT_INPUT 1 = 1 -1
4 INPUT_CASE 12 4
5 CALL 3
6 INPUT_CASE 12 12
7 CALL 4
Main
8 LABEL 2
9 SET_VAR Profile_velocity Var_03
10 GO_H Var_01
11 WAIT_VAR Position_actual_value > Var_02
12 SET_VAR Profile_velocity Var_04
Operating the XtraDrive Using XtraWare
13 WAIT_STOP -1
14 GO_D 0 Var_05
15 DELAY 500
16 GO_TO 1
Subroutine 3
17 LABEL 3
18 SET_VAR Var_01 100000
19 SET_VAR Var_02 50000
20 SET_VAR Var_03 1000
21 SET_VAR Var_04 400
22 SET_VAR Var_05 -1
23 RETURN
Subroutine 4
24 LABEL 4
25 SET_VAR Var_01 200000
26 SET_VAR Var_02 80000
27 SET_VAR Var_03 1300
28 SET_VAR Var_04 700
29 SET_VAR Var_05 600
XtraWare User Manual 31
Operating the XtraDrive Using XtraWare
30 RETURN
The chart below graphs the target speed against time for each of the two cases specified in lines 4 and 6, which call the variable settings specified in subroutines 3 and 4 respectively. For example, note how the initial peak in target speed for Case 2 exceeds that for Case 1. This is because line 9 sets the profile velocity equal to the value of Var_03. Case 1 specifies Var_03 as 1000 user speed units, while Case 2 specifies Var_03 as 1300 user speed units. Therefore, the initial peak in speed in Case 2 exceeded that in Case 1.
Figure 20: Graph Illustrating Effect of Variable Argument Settings
4.4.3. Running a Program
When a program has been completed and downloaded, it can be run using any of the following methods:
Clicking the RUN icon In Immediate and Sequential modes, selecting the RUN command from
the Program Flow Control commands in the Workspace window. In the pop-up window that is displayed, type in the label number from which you want the program to run.
After downloading a user program to the driver, it is possible to run it
automatically every time the driver turns ON by setting the parameter Pn2CC to 1. For further information, see section 7.11 of the XtraDrive User Manual.
to run the program from the first line.
32 XtraWare User Manual
4.5. Program Modes
XtraDrive has three programming modes:
Program Immediate Sequential
Each mode utilizes an individual buffer for commands and program processing and execution. Note that not all of the commands are available in all the program modes. A full explanation on the use of the buffers is provided in the introductory section of Chapter
4.5.1. Program Mode
Use this mode when writing a program that is to be executed after the entire program has been written (see section This mode stores the program in the User Program Buffer (UPB). Program execution is activated by the RUN command (see section Program).
Operating the XtraDrive Using XtraWare
5, Command Reference.
4.4.1, Writing a Program).
4.4.3, Running a
4.5.2. Immediate Mode
Use this mode to issue a single command for immediate execution or when sending a single command from a host PC (for example, to change the state of an output while a program is running or to lower the gain while the motor is enabled and not in motion and no program is running). Commands sent in Immediate Mode are stored in the Immediate Command Buffer (ICB) and are executed within 2 ms (or less).
4.5.3. Sequential Mode
Use this mode when using a host PC that sends a command stream that should be executed as a program (move the motor and wait for motion completion; wait for input; make another move, etc.). Immediate mode cannot be used in such cases because commands like MOVE_D (move the motor and wait for motion completion) are not available in Immediate mode.
XtraWare User Manual 33
Operating the XtraDrive Using XtraWare
4.6. Tuning the Control Loops
The mathematical coefficients of the control loop, an advanced control algorithm, must be tuned in order to ensure good system behavior.
These coefficients can be tuned either manually or automatically (Auto­tuning). Two Auto-tuning procedures are available: one that calculates the coefficients based only on the user-specified motor inertia ratio (Fast Tuning), and one that sets the coefficients experimentally by moving the motor and analyzing its behavior (Fine Tuning).
4.6.1. Manual Tuning
Manual tuning can be performed according to the instructions provided in the XtraDrive User Manual.
4.6.2. Auto-tuning
Auto-tuning is applicable in programming mode only
(Pn000.1 = D).
In driver version 2.91, auto-tuning is not available for linear motors.
When you select the Auto-tuning option from the Maintenance menu, the Auto-tuning window (Figure 21) is displayed:
Figure 21: Auto-tuning Window
34 XtraWare User Manual
The fields and options are explained below:
Inertia Ratio (Pn103): Inertia ratio between the load and the motor
as a percentage.
Fast Tuning: The driver loads a group of parameters from predefined
tuning groups, based on the motor and driver type and the load inertia.
Fine Tuning: The driver moves the motor back and forth and searches
for the parameters that allow the best system performance.
Auto Select Parameters: Uses Fast Tuning gains as the starting point.
The motion profile of the motor while tuning is determined automatically according to system characteristics. The motor will make approximately one turn to each side, and this process is repeated until all coefficients have been set.
With User Parameters: The gain values start at their current values
(set by parameters, such as Pn1AC = 54). The motion during the tuning (auto-tuning profile) is set according to Pn2C8, Pn2C9, Pn2CA and Pn2CB, allowing you to specify how far and how fast the motor should turn during fine tuning.
4.6.3. Performing Fast Tuning
Operating the XtraDrive Using XtraWare
¾ To perform fast tuning:
1. Enter a rough estimation of load inertia in Inertia Ratio.
2. Click Start. The Fast-Tuning
3. Click OK.
4. Enable the servo control and check the performance (See
Evaluating Control Loop Performance). If the motor behavior is good you can either perform Fine Tuning or
leave it as is.
5. If you are not satisfied with the performance, the following methods can
be used to improve the performance and stability of the system:
Adjust the global gain (Pn1A0). For very rigid systems, re-run fast tuning after disabling the OCA
option.
Set a different Inertia ratio.
Note:
The value of the command filter is calculated automatically and stored in parameter Pn216 during fast tuning.
window is displayed.
4.6.5,
4.6.4. Performing Fine Tuning
During fine tuning the motor moves in the positive direction and then back again, and repeats this motion several times. The control parameters are
XtraWare User Manual 35
Operating the XtraDrive Using XtraWare
optimized by analyzing the motor movement. Motor movement is as follows:
If you select Auto Select Parameters the motor will rotate
approximately twice.
If you select With User Parameters the motor will rotate according to
the settings of the auto-tuning parameters (Pn2C8 – Pn2CB).
¾ To perform fine tuning:
1. Place the motor so that it can move according to the auto-tuning profile.
2. Enter a rough estimation of load inertia in the Inertia Ratio field.
3. Select Auto Select Parameters or With User Parameters, depending
on the motor motion required.
4. Press Start.
Warning:
After pressing Start, the motor will begin to move.
5. Wait for a few minutes while the best gain is detected.
6. Click OK.
7. Enable the servo control and check the performance (see
Evaluating Control Loop Performance). If you are not satisfied you can easily improve the performance and
stability by adjusting the global gain (Pn1A0) or by trying the following.
For very rigid systems, try the fine tuning without the OCA option
selected.
Set a different Inertia ratio.
4.6.5,
4.6.5. Evaluating Control Loop Performance
After having tuned the control loop coefficients using either manual or automatic tuning, it is useful to verify that the coefficients chosen result in adequate control. The procedure detailed below describes how the quality of the control coefficients can be checked.
36 XtraWare User Manual
Operating the XtraDrive Using XtraWare
¾ To evaluate control loop performance:
1. Click Program Mode to select Program mode.
2. Enter the program shown below in Figure 22 (see section
Programming the XtraDrive).
Figure 22: Program for Checking Control Coefficients
3. Click Program Download to download your program to the
XtraDrive.
4.4,
4. Click Chart
to open the Chart window.
5. In the Graph Setting area, set Smoothed Target Speed to 50.
6. Click Start Trace
.
The message Waiting for trigger and data collection completion is
displayed.
7. Click Run Program
to run the program.
The program runs and the data is uploaded. A graph of the motion is displayed.
8. Study the graph, particularly the Position Error, shown by default in
yellow, and decide whether the control coefficients are set appropriately.
Figure 23: Sample Chart of Position Error
XtraWare User Manual 37
Operating the XtraDrive Using XtraWare
4.7. Charts
The Charts option provides a graphical display of signals over a specified time period. Two analog signals and two digital I/O signals can be displayed.
4.7.1. The Chart Main Window
Select the Charts option from the View menu to display the Chart Main window (Figure 24).
Figure 24: Chart Main Window
38 XtraWare User Manual
4.7.1.1. Trigger
A trigger is a device used to specify exactly when data collection should begin. The trigger can be made conditional on any of a range of aspects of the servo operation. For example, you can specify that data collection should begin after the /COIN signal is set ON or after the speed feedback exceeds 100 rpm.
A trigger condition is specified by four settings:
Source - Trigger object selection
Specifies the variable on which the trigger is conditional. Any one of the variables listed in the Y1, Y2, I/0 –1 and I/O – 2 fields can be selected from the drop-down menu.
Figure 25: Trigger Selection (1)
Operating the XtraDrive Using XtraWare
Slope - Edge Type
Specifies in which direction across the trigger Level the Source must
change to trigger data collection.
Figure 26: Trigger Selection (2)
As the type of slope, select:
Rising Edge: Data collection is triggered when the value of the
Source rises from below the trigger Level to above the trigger Level, i.e., when the change is from LO to HI in I/O.
Falling Edge: Data collection is triggered when the value of the
Source falls from above the trigger Level to below the trigger Level, i.e., when the change is from HI to LO in I/O.
Data Change: Data collection is triggered when the value of the
Source crosses the trigger Level in either direction.
No Trigger: Data collection will start at the same time as Start Trace
is clicked. All other trigger settings are irrelevant.
Level - Trigger Level
Specifies the threshold value of the Source at which data collection is triggered. The units for the setting are the same as those of the trigger
XtraWare User Manual 39
Operating the XtraDrive Using XtraWare
object selected in Source. The trigger level cannot be set if the trigger object is I/O 1 or I/O 2.
Pre-Trigger (0% to 99%)
A buffer of data is collected even prior to the trigger condition being met. This allows XtraWare to include the period before the trigger in the graph. The Pre-Trigger setting specifies how long this period should be, as a percentage of the duration of the graph after the trigger.
4.7.1.2. Graph Settings
For all of the graph settings described below, you can select the scale (available values are 1, 2, 5, 10, 25, 50, 100, 500, 1000) and the color in which the results will be displayed.
X – Sampling Time Interval
Specifies the time interval for obtaining trace data (default: 25ms). The total trace time for which results are obtained is the sampling time interval multiplied by 10.
Y1 / Y2 – Sampled Channel
Available values are:
Target Speed Smoothed Target Speed Acceleration Motor Speed Position Error Torque Reference
I/O 1 / I/O 2 – Sampled Digital I/O
Select the sampled output and input signals.
4.7.1.3. Show
Select the objects that will be displayed in the graph.
4.7.1.4. Caption
Enter the caption to be displayed in the graph.
40 XtraWare User Manual
4.7.1.5. Chart Toolbar
The chart toolbar is shown below.
Figure 27: Chart Toolbar
The toolbar icons are explained in the following table.
Table 12: Chart Toolbar Icon Definitions
Option ICON DESCRIPTION
Operating the XtraDrive Using XtraWare
Save Chart
Open
Up one zoom level
Reset zoom
Start Trace
Enable Measure
Show markers
Driver Units
Saves a copy of the trace graph to a specified file.
Loads a trace data file.
Restores the previous zoom level.
Restores the area shown in the window to its normal size.
Starts the trigger searching. Click the icon again to cancel the search.
Measures the delta values of X, Y1 and Y2 by right-clicking and dragging the mouse. The values are displayed on the respective axes.
Displays information on current cursor location.
Toggles graph units between user units and encoder counts.
Save graph as picture
Save
XtraWare User Manual 41
Saves the graph in bmp format enabling you to view the graph with other software packages.
Saves graph data in Excel format (*.csv).
Operating the XtraDrive Using XtraWare
4.7.2. Using Zoom
The view of an area selected by the mouse can be magnified.
¾ To zoom in on an area:
1. Position the mouse at one corner of the area you want to select.
2. Hold down the left mouse button and drag to the opposite corner.
A white area will appear around the selected area.
3. Release the left mouse button.
The selected area of the graph is enlarged.
4. Click Reset zoom
to view the original graph.
5. Click Up one zoom level
Figure 28: Chart Zoom Feature
to view the previous zoom level.
42 XtraWare User Manual
4.7.3. Starting the Trace
¾ To start a trace:
1. In the Chart main window, click Start Trace . A message Waiting for trigger and data collection completion is
displayed
Operating the XtraDrive Using XtraWare
2. To cancel the trace, click Start Trace
to run the program.
When the conditions are met and the trigger is applied, a message
Uploading data is displayed.
3. Click Cancel if you want to halt the data sampling process, otherwise
wait until the process ends. The Chart main window is displayed once the specified data has been
obtained.
Notes:
1. Sometimes the trigger cannot be detected in under 2 ms due to the characteristics of the detection period.
2. If the sampling time is increased, XtraWare may continue to wait for the trigger even after the trigger has been applied. XtraWare waits because data for the sampling time is saved in the XtraDrive after the trigger has been applied.
4.7.4. Printing a Chart
The chart and data of the Chart main window can be printed.
again. Otherwise, click Run
¾ To print a chart:
1. Select the Print Chart option from the File menu while the chart is
open.
XtraWare User Manual 43
Operating the XtraDrive Using XtraWare
4.8. Mechanical Analysis
Controlling a system (amplifier, motor, and load) requires knowledge of its mechanical restrictions, such as resonance and anti-resonance frequencies.
The mechanical analysis (FFT) option samples and analyzes 2000 speed data points. The speed is a response to sinusoidal torque frequency commands. The response is displayed as a graph of the gain (dB) and phase angle (degree) versus frequency (Hz in log scale). Using the graph, the relevant parameters can then be adjusted in order to reduce the effect of the mechanical restrictions.
Note:
The process uses the predefined parameters of Notch Filter (Pn408.0, Pn409, Pn40A) and does not take control gains into consideration.
¾ To start mechanical analysis:
1. Click FFT or select Mechanical Analysis from the Tools menu. A
Warning message is displayed (Figure 29):
Figure 29: Mechanical Analysis Warning Message
44 XtraWare User Manual
Operating the XtraDrive Using XtraWare
2. Click OK to open the Mechanical Analysis window (Figure 30).
4.8.1. Mechanical Analysis Window
Figure 30: Mechanical Analysis Window
Accurate measurement of the frequency characteristics depends on the settings of the following parameters:
Sampling Time [μsec] (Measurement Frequency [Hz], Excitation Time
[ms]) If the sampling time is shortened, a higher frequency can be measured
and the excitation time is shortened. However, frequency resolution deteriorates and measurement accuracy is reduced at low measuring frequency. The measuring frequency and excitation time depend on the sampling time. To begin with, set the sampling time to a small value. Then reset it to a more appropriate value in accordance with the results produced.
Excitation Amplitude [±%/Rated torque] Range: 1 to 300%
Must be set to a value below the Torque Limit. Select the size of the reference amplitude applying excitation to the machine as a percentage of the ratio of size to rated torque.
A larger excitation amplitude tends to give more correct measurements, but an excessively large amplitude can cause overspeed (A.51) and overcurrent (A.10) alarms. Problems with the load inertia and the
XtraWare User Manual 45
Operating the XtraDrive Using XtraWare
balance would cause alarms, and accurate measurements would be impossible.
Note:
Accurate measurement is not possible if the torque is restricted during excitation. Refer to the XtraDrive User Manual for details on the Torque Limit function.
Allowable Rotations [Rotation] Range: ±1 to 1000 rotations
The number of Allowable Rotations must be set so the measurements
can be taken safely. Set the motor revolutions so the setting is within the operable range. Select the limit of motor rotations during measurement. If the allowable number of rotations is exceeded, the zero clamp function will cause the motor to stop and measurements will be halted. Consider the deceleration ratios for the pulley radius, ball screws, and so on, and then select a number of motor rotations. When reducing the number of motor rotations, also reduce the excitation amplitude and the sampling time.
The allowable rotations acts as restriction for each excitation period.
In multiple excitation applications, the excitation start position might shift. Check the range of motion each time excitation is applied.
Detection of the allowable rotation in the XtraDrive may be delayed
by a maximum of 2ms. If so, operation may exceed the settings due to factors such as inertia size and interference from speed. Include a
margin when setting the allowable number of rotations.
No. of Executions [Set] Range: 1 to 5
Select the number of times that the measurements should be taken for an average measurement to be calculated. A motion set is a back-and­forth operation that starts excitation or measurement from the forward side and excitation/measurement from the reverse side. More measurement iterations tend to yield more accurate measurements, but the time required for measurement increases.
Excitation Signal (fixed): Excites the machine with cycle wave. Graph Setting: Select the graph scale or leave the default setting of
AUTO for automatic scale setting. Select the colors of the lines used in the graph of the measurement results.
Caption: Enter the caption to be displayed in the graph.
46 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.8.2. Mechanical Analysis Toolbar
The mechanical analysis toolbar is shown below.
Figure 31: Mechanical Analysis Toolbar
The following table explains the function of each icon:
Table 13: Description of Mechanical Analysis Toolbar Icons
Option ICON DESCRIPTION
Save Chart
Open
Print
Up one zoom level
Reset zoom
Enable Measure
Show markers
Saves the current analysis include the settings and the graph.
Opens a previously saved analysis.
Prints the currently displayed chart and its corresponding data.
Restores the previous zoom level.
Restores the area shown in the window to its normal size.
Dragging the cursor by left-clicking the mouse enables the measurement of the difference (delta) between the ends of the line. The delta values are displayed in each axis label. Left­clicking in a new location starts a new measurement.
Shows exact value of a point. A yellow cross reflects the movement of the mouse and the exact value can be seen in each axis label.
Save graph as picture
Export graph data
XtraWare User Manual 47
view the graph without the need for the XtraWare software.
Saves graph data in Excel format (*.csv).
Saves graph in bmp format enabling you to
Operating the XtraDrive Using XtraWare
4.8.3. Running the Mechanical Analysis
To perform a mechanical analysis
1. Run the motor to excite the machine and measure the frequency
characteristics.
2. Run the process by pressing the START button.
Warning:
The motor will begin moving once Start has been pressed.
Once the process is completed, a graph is displayed. The values of resonance and anti resonance frequency values (if any) are displayed at the bottom right corner of the graph.
Figure 32: Sample Mechanical Analysis Output
48 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.9. ECAM (Electronic Cam)
Cam creates motion according to a specified profile, depending either on the position of a master axis or on time elapsed. The ECAM feature allows you to specify the position that a slave axis must reach, depending on the position of a master axis or on the time elapsed.
The XtraDrive allows up to four profiles to be specified per project. Each profile can be comprised of a maximum of 16 segments, and may contain up to 256 data points.
4.9.1. ECAM Profile Characteristics
The following must be considered when designing a profile:
Up to four different profiles can be defined simultaneously. Each profile can be divided into a maximum of 16 segments. An ECAM table may contain up to 256 data points. To avoid exceeding
this limit, do not specify unnecessarily small Master Step values.
The maximum slave step is 32767 user position units.
The maximum master step (after scaling) is 32767 counts.
4.9.2. Installing ECAM
To enable the ECAM functionality, see the document Instructions for License Setting.
4.9.2.1. Verifying that ECAM is Installed
¾ To verify that ECAM is installed:
1. Open XtraWare.
2. From the Communication menu, select On-Line to enter on-line mode.
3. Click Upload Project
4. Open the File menu. If the Download Cam option in the File menu is enabled, the installation
was successful.
to upload a project from the XtraDrive.
4.9.3. ECAM Workflow
When working with ECAM, the following process is followed:
Designing the ECAM Profile:
You define the profile using XtraWare. XtraWare automatically generates a Master-Slave table. The Master-Slave table is downloaded to the XtraDrive.
XtraWare User Manual 49
Operating the XtraDrive Using XtraWare
Programming an Application:
CAM motion is engaged or disengaged upon external events or logical
conditions.
Running a Program:
The profile table can be adjusted by applying a shift or offset, or by
scaling the master or slave positions.
4.9.4. ECAM Profiles
A profile defines the relationship between the motion of the master and the motion of the slave. The profile dictates the required slave position for a given master position. The graph below illustrates a typical profile.
Figure 33: Example of an ECAM Profile
A profile consists of a number of segments. For example, the profile shown consists of four segments: the first stretches from Master Position 0 to 100, the second from 100 to 200 and so on. You need only specify the start and end points of each segment; XtraWare interpolates between those points according to shape specified. XtraWare can interpolate along straight lines and sinusoidal curves. You define the resolution (the distance between consecutive data points in the profile) with which the curve must be generated. The profile created should be smooth to ensure smooth motion.
4.9.4.1. Time based Profiles – Virtual Axis
XtraWare also allows you to specify a time based profile, where the XtraDrive’s internal clock generates the master pulses. A pulse is generated every 125 μs. In this case, the Master Position axis is in fact a time axis.
50 XtraWare User Manual
4.9.5. Creating a Profile
Profiles are defined in the Electronic CAM window.
4.9.5.1. Adding a Profile
¾ To add a profile to your project:
1. Select Electronic CAM from the Tool menu, or click Electronic Cam
on the toolbar.
The Electronic CAM window is displayed.
2. Enter a number that you will use to identify the profile in the Profile Number field.
3. Click Add Profile.
The profile is added to the Profile List.
4.9.5.2. The Position Setting Tab
Profiles are defined on the Position Setting tab of the Electronic CAM window.
Operating the XtraDrive Using XtraWare
¾ To open the Position Setting tab:
1. Click the Position Setting tab. The Position Setting tab is displayed. Each field is explained below.
Figure 34: Position Setting Tab
Segment#: Each segment is automatically assigned a number. Master Start: The first segment starts at master position 0. Each
subsequent segment starts at the position at which the previous segment ended. The master position is defined in terms of master encoder counts.
Master End: Specifies the master position at the end of the segment.
If a time based profile is being created, Master End specifies the time at which the segment ends. For example, if the segment is to span 100 ms, the difference between the Start and End values must be 800 ms as the clock generates eight pulses per millisecond.
Slave Start: The first segment starts at slave position 0. Each
subsequent segment starts at the position at which the previous segment ended. The slave position is defined in terms of position user units.
XtraWare User Manual 51
Operating the XtraDrive Using XtraWare
Slave End: Specifies the slave position at the end of the segment. Master Step: Specifies the distance required between the points that
are interpolated between the start and end points. The greater the step size, the lower the resolution will be. When the start and end points are to be joined simply by a straight line, set Master Step to the distance between the start and end points, as no points need be interpolated between them.
Curve Shape: Specifies whether the start and end points of the
segment are to be joined by a straight line, by a portion of a sinusoidal graph, or by a user-defined array.
4.9.5.3. Defining the Master and Slave End Points
¾ To define the master and slave end points of each segment
that makes up the profile:
1. Enter the master position (in terms of encoder counts or clock pulses) at the end of the first segment in the Master End field.
2. Enter the slave position (in position user units) at the end of the first segment in the Slave End field.
4.9.5.4. Defining the Segment Resolution
The resolution is set by specifying the distance between successive points in the segment:
¾ To set the resolution:
1. Enter the distance (in encoder counts or clock pulses) between the points that XtraWare should generate by interpolation in the Master Step
field. A lower setting will result in more points being generated and in a smoother motion.
4.9.5.5. Defining the Interpolation Method
Once the end points and the resolution of a segment have been specified, specify how the positions of the remaining points in the segment must be
calculated. The number of points generated is dependent on the Master Step setting.
52 XtraWare User Manual
Operating the XtraDrive Using XtraWare
¾ To set the interpolation method:
1. Click in, or tab to, the Curve Shape field.
2. Click the
icon that is displayed in the Curve Shape field.
The Curve Shape window is displayed.
Figure 35: Curve Shape Window
3. Select a curve shape from the drop-down menu: Straight Line: Points will be generated by interpolation to join the
start and end points with a straight line.
Array: Instead of selecting a shape for XtraWare to generate by
interpolation, you can specify all the points directly. See section
4.9.5.6, Specifying an Array.
sin(-90 to 90), sin(0 to 90), sin(-90 to 0): Points will be
generated by interpolation to join the start and end points with the required section of a sinusoidal graph.
4. Click OK. A new line for the next segment is displayed in the Position Setting tab
with the Master Start and Slave Start fields filled in automatically.
5. Continue filling in the table until every segment in the profile has been
defined.
4.9.5.6. Specifying an Array
Instead of specifying a curve shape along which points must be interpolated, XtraWare allows you to specify each point directly. You can either specify the points within the XtraWare interface, or you can import a file created in a spreadsheet program.
The number of points to be specified is dependent on the Master Step setting. For example, consider the following specification.
Figure 36: Example of End Point Specification
The length of the segment is 1000 master counts and the Master Step is 20. The number of points in the segment, including the start and end points is thus 51.
XtraWare User Manual 53
Operating the XtraDrive Using XtraWare
¾ To open the Curve Shape window:
1. First specify the values of Master End, Slave End and Master Step, as
explained previously in sections
2. Click in, or tab to, the Curve Shape field.
3. Click the The Curve Shape dialog box is displayed.
4. Select Array from the Curve Shape window. A table is displayed in the Curve Shape window. Each row corresponds
to one point in the segment. For the example shown above, a table with 51 rows will be displayed. The slave values for the first and last points are entered automatically, based on the Slave Start and Slave End values specified. Only the slave values need be entered – the master values are calculated automatically, based on the end points and the master step value.
icon that is displayed in the Curve Shape field.
4.9.5.3 and 4.9.5.4.
Figure 37: Example of Curve Shape Window with Array Table
Entering the values directly into the table
¾ To enter the values into the Curve Shape table:
1. Enter the values in the Slave Value column. Note that the first and last
values are entered for you, according to the values you assigned to
Slave Start and Slave End.
2. Click OK. The Curve Shape window is closed. Array will be displayed in the Curve
Shape column of the Position Setting table.
54 XtraWare User Manual
Operating the XtraDrive Using XtraWare
Importing the values into the table
XtraWare allows you to import data into the array table. This allows you to prepare an array in a spreadsheet and then import it.
The following specifications must be adhered to when creating the file:
The number of rows in the spreadsheet must be the same as the
number of rows in the table displayed in the Curve Shape window.
The slave values of the first and last points must be the same as those
in the table displayed in the Curve Shape window.
The spreadsheet table may have any number of columns. The slave values must be located in the right-most column. The values may have any number of digits after the decimal point, but
XtraWare will import only the integer part of each value. For example,
1.79 will be imported as 1.
The file must be saved in CSV format. The file must not be in use by other software while being imported into
XtraWare.
A sample spreadsheet is shown in Figure 38 below.
Figure 38: Sample Spreadsheet for Array Import
¾ To import the values into the Curve Shape table:
1. Click Import in the Curve Shape window. The Import window is displayed.
XtraWare User Manual 55
Operating the XtraDrive Using XtraWare
2. Select the CSV file in which the array is saved.
3. Click Open. The Curve Shape window is redisplayed, and the array table is
completed with the values specified in the imported file. Note that only the integer part of each value will be imported. For example, 1.79 will be imported as 1.
Figure 39: Example of Curve Shape Menu with Completed Array Table
4. Click OK. The Curve Shape window is closed. Array will be displayed in the Curve
Shape column of the Position Setting table.
4.9.5.7. Saving A Profile
After a profile has been created, it must be saved.
¾ To save a profile:
1. Click Save in the Cam Profile File area. The Save Cam Profile dialog box is displayed.
2. Enter a name for the profile file in the File name field, select a folder in which to save the file, and click Save. The file is saved with an .XDP
extension.
56 XtraWare User Manual
Note:
After downloading a profile, it is saved in the XtraDrive. Unlike parameters and programs which can be uploaded from the XtraDrive to XtraWare, ECAM tables cannot be uploaded. Thus, it is important that profiles are saved on a disk for backup purposes.
4.9.5.8. Completing a Profile
¾ To complete your profile definition:
1. Once you have completed the profile, click Finish.
2. The Electronic Cam window is closed.
4.9.6. Loading a Profile
You can load and use profiles that have previously been saved. It does not matter if the profile was originally written for a different project.
¾ To load a profile:
Operating the XtraDrive Using XtraWare
1. Select Electronic CAM from the Tool menu, or click Electronic Cam
on the toolbar.
The Electronic CAM window is displayed.
2. Enter a number that you will use to identify the profile in the Profile Number field.
3. Click Add Profile. The profile is added to the Profile List.
4. Click on the Position Setting tab.
5. Click Open in the Cam Profile File area. The Open Cam Profile dialog box is displayed.
6. Select the file to open, and click Open. The segments of the opened profile are listed in the Position Setting
tab.
4.9.7. Editing a Profile
4.9.7.1. Inserting Additional Profile Segments
¾ To insert a segment between existing segments in a profile:
1. Click any field in the row of the segment before which the new segment
should be inserted.
2. Click Insert.
A new line is inserted. Enter the required data to define the new segment.
XtraWare User Manual 57
Operating the XtraDrive Using XtraWare
4.9.7.2. Deleting a Segment
¾ To delete a segment:
1. Click any field in the row of the segment that is to be deleted.
2. Click Delete.
The selected segment is deleted.
4.9.7.3. Editing Values in the Position Setting Table
¾ To edit an entered value:
1. Click the field that you would like to change.
2. Enter the new value.
The value is changed, and the table values are automatically updated:
If the value of a Master End position is changed, all subsequent
Master End values are automatically adjusted so as to maintain the size of the segments as they were before the change. Changing a Master End value therefore affects only the size of the segment that the point ends. (The Master Start values are also updated to match the revised Master End values.)
Changing the value of a Slave End position does not result in
subsequent Slave End values being updated – only the next Slave Start value is updated.
4.9.8. Deleting a Profile
¾ To delete a profile:
1. Select the profile to be deleted from the Profile List.
2. Click Delete Profile.
Warning:
Clicking Delete Profile deletes the profile immediately – you will not be asked for confirmation.
58 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.9.9. Viewing the Master-Slave Table
The Data List tab displays all the interpolated points through which the slave will move, listed per segment.
¾ To view the Master-Slave table:
1. Open the Data-List tab.
2. Click on one of the segments listed on the left panel of the Data List tab.
The master-slave table is displayed on the right, listing all of the interpolated points, as well as the specified start and end points of the selected segment.
Figure 40: Data List Table
XtraWare User Manual 59
Operating the XtraDrive Using XtraWare
4.9.10. Viewing the Data Graph
The data graph graphically represents the specified table. The dots along the curve represent the interpolated points.
¾ To view the data graph:
1. Open the Data Graph tab.
The data graph is displayed.
Figure 41: Data Graph
4.9.11. Printing from the Electronic Cam Window
The contents of each of the Position Setting, Data List and Data Graph tabs
can be printed:
¾ To print from the Electronic Cam Window:
1. Select the profile to print from the Profile List.
2. Select the tab to be printed.
3. Click Print. The Print dialog box is displayed.
60 XtraWare User Manual
4. Make any necessary changes to the settings shown and click Print.
4.9.12. The Cam List Window
By default, the Cam List window is displayed on the project screen. If the window is not displayed, ensure that Cam list is checked in the View menu.
Figure 42: Cam List Window
Download size: Indicates the number of data points that will be
downloaded to the XtraDrive when the Download Cam button is pressed.
Profile#: The profiles are identified in the Cam List by their numbers. Download: Check the checkboxes corresponding to all profiles that
should be downloaded to the XtraDrive when the Download Cam button
Operating the XtraDrive Using XtraWare
is pressed.
Size: The number of data points in each profile.
¾ To view or edit a profile:
1. Click anywhere in the row corresponding to the profile number that you
would like to view or edit.
The Electronic Cam window is displayed with the Position Setting tab
displaying the selected profile.
4.9.13. Downloading Profiles to the XtraDrive
A profile is not transferred to the XtraDrive until you download it.
¾ To download a profile:
1. Ensure that the relevant Download checkboxes in the Cam List window
are checked.
2. Click Download Parameters
The profiles are downloaded to the XtraDrive.
Note:
After downloading a profile, the profile is saved in the XtraDrive, but unlike parameters and programs, which can be uploaded from the XtraDrive to XtraWare, profiles cannot be uploaded.
Thus, it is important that profiles are saved on a disk for backup purposes.
on the toolbar.
XtraWare User Manual 61
Operating the XtraDrive Using XtraWare
4.9.14. Programming with Electronic Cam
Programming commands are used to initiate and terminate movement according to an ECAM profile.
4.9.14.1. ECAM_ENGAGE
Format: ECAM_ENGAGE <Profile_ID> <Mode>
This command is used to initiate motion according to an ECAM profile. You must specify the profile number according to which the slave must move, as well as whether the motion should continue indefinitely (Cyclic mode), or only until the profile has been completed once (Non Cyclic mode).
Figure 43: Programming an ECAM_ENGAGE Command
4.9.14.2. ECAM_DISENGAGE
Format: ECAM_DISENGAGE
This command is used to terminate ECAM motor motion. ECAM_DISENGAGE will cause the motion to stop only once the current profile is completed. To stop the motion immediately, use the STOP_EX command.
62 XtraWare User Manual
4.9.14.3. ENGAGE_VIRTUAL_AXIS
Format: ENGAGE_VIRTUAL_AXIS <Profile ID> <Direction>
This command is used to start ECAM motion when a time based profile is being used. In this case, the XtraDrive clock acts as the master and generates a pulse every 125 μs (8 pulses every millisecond). In this case, the horizontal axis of the profile is in terms of clock ticks. You must specify the profile number according to which the slave must move, as well as whether the profile should be followed in the positive or negative direction.
Figure 44: Programming an ENGAGE_VIRTUAL_AXIS Command
Operating the XtraDrive Using XtraWare
4.9.15. Modifying a Profile using Variables
The XtraDrive includes functionality that allows you to stretch and shift a profile without having to redefine each segment. Simply by adjusting the values of variables, you can:
Stretch the profile horizontally by adjusting the Master scale. Stretch the profile vertically by adjusting the Slave scale. Shift the profile horizontally. Offset the profile vertically.
4.9.15.1. Profile Scaling
The Master scale can be adjusted by multiplying it by a fraction A/B. If A/B is larger than one, the profile will be stretched. If A/B is less than one, the profile will be contracted.
A, the numerator, is defined by the variable ECAM_Master_scale_num. B, the denominator, is defined by the variable ECAM_Master_scale_den.
For example, if a scaling factor of 2/3 was applied to the profile shown below, the Master axis would be contracted by a third.
XtraWare User Manual 63
Operating the XtraDrive Using XtraWare
Figure 45: Sample Profile Before Adjustment
Figure 46: Sample Profile After Master Axis Scaling
Similarly, the profile can be stretched or compressed vertically by multiplying the Slave scale by a fraction C/D. If C/D is larger than one, the profile will be stretched. If C/D is less than one, the profile will be contracted.
C, the numerator, is defined by the variable ECAM_Slave_scale_num.D, the denominator, is defined by the variable ECAM_Slave_scale_den.
The scaling factors cannot by changed while ECAM is engaged.
¾ To apply scaling:
1. Set the variables ECAM_Master_scale_num, ECAM_Master_scale_den,
ECAM_Slave_scale_num and ECAM_Slave_scale_den using the SET_VAR command.
Note:
When using a virtual axis, it is recommended that scaling only be used to scale the graph down, that is, A/B and C/D should be set to values lower than one. If a profile is stretched, a lack of sufficient data points will result in a profile that is not smooth. When designing a profile, you should therefore design it for the largest movements that could possibly be required, so that it will only ever be necessary to scale the profile down, not up.
64 XtraWare User Manual
Note:
The scaling factors discussed above do not affect the size of the shift or offset, if defined.
4.9.15.2. Shift
By applying a positive shift, the profile graph is shifted in the negative direction along the master position axis. Conversely, by applying a negative shift, the profile graph is shifted in the positive direction along the master position axis.
Operating the XtraDrive Using XtraWare
Figure 47: Illustration of the Application of Shift
The shift is specified as an absolute distance from the origin of the profile graph.
In the case of a cyclic profile, the next profile will be followed as it was originally specified, unless a different shift is specified.
¾ To apply a shift:
1. Set the value of the variable ECAM_Shift using the SET_VAR command.
Note:
The size of the shift is not affected by scaling the master axis
XtraWare User Manual 65
Operating the XtraDrive Using XtraWare
4.9.15.3. Offset
By applying an offset, you can shift a profile vertically. A positive offset shifts the profile upward, increasing the slave position reached at each master position. A negative offset shifts the profile downward, reducing the slave position reached at each master position. The following graphic illustrates a positive offset.
Figure 48: Illustration of the Application of a Positive Offset
¾ To apply an offset:
1. Set the value of the variable ECAM_Offset using the SET_VAR command.
Note:
The size of the offset is not affected by scaling the slave axis.
Both shifts and offsets can be applied during motion. This will usually result in a sudden, jolting motion as the target slave position is adjusted instantly across a discontinuity. When applying a shift before engaging ECAM motion, ensuring that the profile is shifted to a point at which the slave position is zero will ensure a smooth initial motion. Applying an offset will always result in a sudden change to the target slave position.
When the application of a shift or offset does result in a sudden change to the target slave position, the resulting motion will be constrained by the maximum torque settings, not by the default profile settings. The maximum torque settings in each direction are defined by the variables Forward_Torque_Limit and Reverse_Torque_Limit. (Use the TORQUE_LIMITS command to temporarily reduce those values.) Reducing the limits will result in smoother motion at a discontinuity caused by a shift or offset.
66 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.9.16. Monitoring Master and Slave Positions
The variable ECAM_Master_profile_position reflects the current position of the master.
The variable ECAM_Slave_profile_position reflects the current position of the slave, as dictated by the profile.
4.9.17. Serial Communication and ECAM
This chapter has described how ECAM profiles are created and downloaded to the XtraDrive using XtraWare. ECAM profiles can also be sent to the XtraDrive by a host, using serial communication. For more information on using serial communication, see Chapter
4.9.17.1. ECAM Commands for Serial Communication
The following commands are used to send an ECAM profile to the XtraDrive, using serial communication. More information on these commands is available in Chapter
ECAM_TABLE_BEGIN: Clears any existing table from the XtraDrive
and initializes the new table.
ECAM_PROFILE: Specifies the identifying number of the profile that is
to be loaded.
ECAM_SEGMENT: Defines the range of the master values covered by
the next segment that is to be defined, and specifies the size of the increments between consecutive points.
ECAM_POINTS: Specifies the difference between the slave positions of
consecutive points.
ECAM_TABLE_END: Finalizes the ECAM table that has been loaded.
5, Command Reference.
6, Serial Interface Protocol.
4.9.17.2. Example of Using Serial Communication to Send an ECAM Table to the XtraDrive
The code that follows downloads an ECAM table as specified in Table 14: Sample ECAM Table, and illustrated in Figure 49: Sample ECAM Profile.
ECAM_TABLE_BEGIN
ECAM_PROFILE 1
ECAM_SEGMENT 200 10 0
ECAM_POINTS 4 0 2 3 4
ECAM_POINTS 4 6 6 8 9
ECAM_POINTS 4 9 11 12 12
ECAM_POINTS 4 13 14 14 15
ECAM_POINTS 4 15 15 16 16
XtraWare User Manual 67
Operating the XtraDrive Using XtraWare
ECAM_SEGMENT 100 100 0
ECAM_POINTS 1 140
ECAM_SEGMENT 200 10 0
ECAM_POINTS 4 15 16 15 15
ECAM_POINTS 4 15 14 14 13
ECAM_POINTS 4 12 12 11 9
ECAM_POINTS 4 9 8 6 6
ECAM_POINTS 4 4 3 2 1
ECAM_TABLE_END
Figure 49: Sample ECAM Profile
68 XtraWare User Manual
Table 14: Sample ECAM Table
Operating the XtraDrive Using XtraWare
XtraWare User Manual 69
Operating the XtraDrive Using XtraWare
4.10. Registration and Latching
The latching function is used to capture the position of the motor encoder or external encoder when signaled to do so by a digital input. Latching is performed within 62.5μs of the digital input being received.
The registration function is used to stop motion in a predefined distance once an input has been received. For example, a MOVE_H command could have been used to cause the motion shown below. Registration terminates the motion prematurely after an input has been received. The solid line in the graphic below illustrates the motor motion that results due to the input changing from 0 to 1. The dashed line illustrates how the motor would have moved had the input not been received.
Figure 50: Illustration of Motion Terminated by Registration
In the diagram:
D1: The delay between the input being received and registration
beginning.
D2: The predefined registration distance. The dashed line in the Velocity graph represents the motion that would
have taken place had the input not been received.
Note:
Only input 6 (CN1-46) is used to trigger registration. There is no need to set In_6 to function as a latch input.
70 XtraWare User Manual
4.10.1. Latching Workflow
The registration process is described below. Detailed instructions for the use of the commands and variables are provided in the sections that follow.
Define a condition for latching using the LATCHING_TRIGGER
command. Possible conditions are:
Input 6 (connected at CN1-46) changes from 0 to 1 (Rising Edge). Input 6 (connected at CN1-46) changes from 1 to 0 (Falling Edge).
Start motion:
The registration process can be applied in the following motion
modes: Position, Velocity, Hunting, Pulse-Train, Analog Speed. See section
After 62.5ms of the condition being met:
The variable Latched_position_ready changes from 0 to 1. The variable Latched_motor_position is set to the current position of
the motor, in position user units.
The variable Latched_master_position is set to the current position of
the master (if in use), in encoder counts.
Perform the next step only once the Latched_position_ready variable
has changed from 0 to 1.
Use the command WAIT_VAR <Latched_position_ready> or assign an
interrupt conditional on this variable.
Define the distance from where the input is received to where the motor
must stop using the REGISTRATION_DISTANCE command.
The deceleration caused by registration is defined by the variable
Profile_acceleration. When specifying the registration distance, ensure that it is sufficiently long for the motor to be able to decelerate to a stop at the profile acceleration.
The motor decelerates to a stop.
Under certain circumstances, the motor will not stop at the point
command by REGISTRATION_DISTANCE. See Troubleshooting.
5.3, Motion Modes.
Operating the XtraDrive Using XtraWare
4.10.2,
XtraWare User Manual 71
Operating the XtraDrive Using XtraWare
4.10.2. Troubleshooting
In certain circumstances, the motor will not stop at the point specified by the registration process. The value of the variable Motion_status indicates how the motion ended.
1. The motor traveled further than the registration distance, but not as far
as the target position of the original motion command. This will occur if the registration distance is not sufficiently long for the
motor to be able to decelerate to a stop at profile acceleration (see section
12.2.2, Profile Acceleration). Either increase the registration
distance, or increase the profile acceleration.
2. The motor stopped at the target position specified by the original motion
command, as if registration had not occurred. This will occur if the latching condition was not met. To ensure that the
motor will stop by registration, increase the distance to be traveled specified by the motion command.
4.10.3. Commands
Two commands are required when using latching: one to enable and define a condition for latching, and another to define the stopping distance once the condition has been met.
4.10.3.1. LATCHING_TRIGGER
Format: LATCHING_TRIGGER <Condition>
This command enables latching and specifies the condition that must be specified for latching to begin. Specifically, once this condition has been met, the variable Latched_position_ready is set from 0 to 1.
Figure 51: Programming a LATCHING_TRIGGER Command
The three conditions that can be chosen are:
Off: Setting this condition cancels any previous LATCHING_TRIGGER
command.
Rising Edge: Registration will be triggered when Input 6 (which is
connected at CN1-46) changes from 0 to 1.
Falling Edge: Registration will be triggered when Input 6 (which is
connected at CN1-46) changes from 1 to 0.
72 XtraWare User Manual
Figure 52: Rising and Falling Edge Conditions
4.10.3.2. REGISTRATION_DISTANCE
Format: REGISTRATION_DISTANCE <Distance>
This command causes the motor to decelerate to a stop a specified distance from the point at which the motor position was latched (Latched_motor_position). The distance over which the deceleration occurs is specified by the <Distance> argument, which is specified in user position units.
Note the following:
Operating the XtraDrive Using XtraWare
The rate at which the motor will decelerate is governed by the profile
acceleration (See section 12.2.2, Profile Acceleration).
The motor will stop at the requested position unless the distance
required for the deceleration exceeds the remaining motion distance.
The variable Motion_status indicates whether the motion ended as
commanded by the REGISTRATION_DISTANCE command. See section
4.10.4.3, Motion_status.
This command executes immediately and it should thus be preceded in
the program by a command that delays its execution until latching has been completed. Use the command WAIT_VAR Latched_position_ready = 1 or an interrupt conditional on this variable to ensure that REGISTRATION_DISTANCE is executed only once latching has been completed.
4.10.4. Registration Variables
There are four variables related to registration. Latched_position_ready acts as a flag to indicate when the latching condition has been met. The Latched_motor_position and Latched_master_position variables record the positions of the controlled motor and of the master (if applicable) at the instant the condition is met. Finally, the Motion_status variable indicates whether the registration movement was performed.
4.10.4.1. Latched_motor_position
This variable records the position of the motor when the latching condition was met. Because the sampling time is 62.5 μs, the accuracy of the latching
XtraWare User Manual 73
Operating the XtraDrive Using XtraWare
is dependent on the motor speed and the exact moment in the sampling interval at which latching takes place. The position is recorded in terms of user position units.
4.10.4.2. Latched_master_position
This variable records the position of the master axis when the latching condition was met. Because the sampling time is 62.5 μs, the accuracy of the latching is dependent on the motor speed and the exact moment in the sampling interval at which latching takes place. The position is recorded in terms of master counts.
4.10.4.3. Motion_status
This variable indicates how the motion ended. Motion_status has four possible states:
0 (Not in motion): Motor not in motion. 1 (Stopped by registration): The latching condition was met during
motion, and the motion was stopped by registration.
2 (Motion stopped but not in registration requested position):
The latching condition was met during motion, but the registration distance exceeded the remaining motion distance. The motion thus ended normally, but further than the registration distance.
3 (Still in motion): The latching condition has not been met, and the
motor is still in motion.
4.10.4.4. Latched_position_ready
This variable indicates whether or not the latching condition has been met. The variable has two possible states:
0: The latching condition has not yet been met. 1: The latching condition has been met.
This variable is automatically set to 0 by the LATCHING_TRIGGER command. It is set to 1 once the latching data has been processed (this may take up to 4 ms).
4.10.5. Registration Example
The following short example program illustrates the use of the commands and variables discussed above.
Speed 300
Sets the speed for the MOVE_H command.
LATCHING_TRIGGER Rising Edge
Sets latching condition.
74 XtraWare User Manual
Operating the XtraDrive Using XtraWare
MOVE_H 5000
Starts motion.
WAIT_VAR Latched_position_ready = 1
Delays next command until variable changes to 1.
REGISTRATION_DISTANCE 100
Starts registration movement to stop 100 user position units after latching condition is met.
XtraWare User Manual 75
Operating the XtraDrive Using XtraWare
4.11. Interrupts
When an event for which an interrupt has been defined occurs, program execution is postponed while the specified interrupt service routine is executed. This allows the XtraDrive to react to events regardless of when they occur. Typical interrupt events include the onset of an emergency situation or changes in user inputs or in user or system variables.
4.11.1. Interrupt Events
Interrupt events can be either:
External, such as a change in an input from one value to another,
or
Internal, such as a variable value meeting a given condition.
4.11.2. Multiple Interrupts
The XtraDrive provides for eight different interrupts to be specified for a single program. Each interrupt is assigned an identifying number from 0 to
7. The identifying number also assigns priority, where:
Interrupt 0 has the highest priority. Interrupt 7 has the lowest priority.
Only one interrupt can be assigned to each priority level.
If multiple interrupts occur simultaneously, the interrupt service routines will be run, one at a time, in order of priority.
If, while an interrupt routine is being executed, a new interrupt of a higher priority occurs, the program will exit the present interrupt service routine and handle the higher priority interrupt service routine. Once that service routine has been completed, the program will continue handling the lower priority interrupt service routine. Once all the required service routines have been executed, the program will continue at the return point specified by the last interrupt service routine completed.
4.11.3. Interrupt Response Time
The maximum response time to the highest priority interrupt is 2 ms. Each lower priority interrupt is handled only once all higher priority interrupt service routines have been completed.
76 XtraWare User Manual
4.11.4. Interrupt Masks
Using masks, you can specify which interrupt events need be handled, and which need not be. This allows you to specify interrupt service routines for a number of possible events, and then to deactivate them from within the program as required.
If no mask is specified, the program will not react to any interrupt event. An interrupt mask must therefore always be specified if interrupt are to be used.
Operating the XtraDrive Using XtraWare
See section
4.11.6.2, Interrupt_mask.
4.11.5. Interrupt Handling
The process that occurs when an interrupt occurs is summarized below. Detailed instructions on the use of the various variables and commands are provided in the sections that follow.
Event Occurs:
External event, such as a change in an input value
or
Internal event, such as a system variable meeting some condition.
Interrupt is registered:
The relevant bit in the variable Interrupt_request is set to 1.
If the registered interrupt is masked in Interrupt_mask, the program
flow is interrupted:
The XtraDrive stops retrieving commands from the user program
buffer.
The XtraDrive executes the interrupt service routine for the highest
priority interrupt received.
The XtraDrive clears the relevant bit in the variables Interrupt_request
and Interrupt_pending to indicate that the interrupt has been cleared.
The XtraDrive executes the interrupt service routines for any other
outstanding interrupts, in order of priority.
The XtraDrive continues running the program:
Either from the program line where it was initially interrupted
or
From another location specified in the interrupt service routine.
4.11.6. Interrupt Variables
The XtraDrive uses three variables (registers), each of which is a system variable. Each variable consists of eight bits, one for each interrupt labeled 0 to 7.
XtraWare User Manual 77
Operating the XtraDrive Using XtraWare
These variables are:
Interrupt_request: Lists interrupt events that have occurred. Interrupt_mask: Used to specify which interrupt to ignore. Interrupt_pending: Lists the interrupts that are to be handled.
Each of these variables is discussed in detail below.
4.11.6.1. Interrupt_request
When an interrupt event occurs, the corresponding bit in the Interrupt_request variable is set to 1.
Once the corresponding interrupt service routine has been completed, the bit in the variable is reset to 0.
The values of the bits are read/write, therefore interrupts can be reset from within the program using the SET_VAR command. This allows you, for example, to clear all interrupts from within one interrupt service routine.
Clearing an interrupt cancels the execution of the associated interrupt service routine. However, if an interrupt is cleared from within its own interrupt service routine, the interrupt service routine will be completed first.
The values of the bits of Interrupt_request are set using the SET_VAR command. The value of the variable must be set in decimal format. For example, to set bits 0 and 1 to 1, and all other bits to 0, Interrupt_request would have to be set to 3, which in binary form is 0000011.
4.11.6.2. Interrupt_mask
By setting a mask, you can specify to which interrupts the XtraDrive should react and which should be ignored. This allows you to specify interrupt service routines for a number of interrupts, and to then enable or disable each interrupt from within the program.
By setting a bit in the variable to 1, the corresponding interrupt is enabled.
Setting a bit corresponding to an interrupt that has already occurred to 0 does not prevent the execution of its interrupt service routine, but does prevent the interrupt from being handled again.
The values of the bits of Interrupt_mask are set using the SET_VAR command. The value of the variable must be set in decimal format. For example, to set bits 1 and 2 to 1, and all other bits to 0, Interrupt_mask would have to be set to 6, which in binary form is 0000110.
Note that by default, all bits in Interrupt_mask are set to 0, and thus by default none of the interrupts will be handled. The command SET_VAR must be used to change the value of the mask variable so as to enable an interrupt.
78 XtraWare User Manual
Operating the XtraDrive Using XtraWare
The Interrupt_mask variable is reset to zero each time the program is started (by the RUN command or the auto start switch). Therefore, the Interrupt_mask must be set each time.
4.11.6.3. Interrupt_pending
The Interrupt_pending variable indicates which interrupts are to be handled. The value of a bit in Interrupt_pending is only set to 1 (indicating that the interrupt is to be handled) if both of the following conditions are met:
The interrupt event has occurred and the corresponding bit in
Interrupt_request has been set to 1.
You have enabled the interrupt in the mask register, Interrupt_mask.
Once the corresponding interrupt service routine has been completed, the bit in the variable is reset to 0.
Interrupt_pending is a read-only variable, and its values thus cannot be changed by the user.
4.11.6.4. Example of Interrupt Variable Functioning
Interrupt_mask:
To specify that only interrupts 3 and 7 be handled, should their conditions be met, bits 3 and 7 in the variable Interrupt_mask must be set to 1 and all other bits must be set to 0, as shown:
Bit#
7 6 5 4 3 2 1 0
Setting 1 0 0 0 1 0 0 0
Variable value: Interrupt_mask = 136
Interrupt_request:
If the interrupt conditions for interrupts 1, 3 and 4 are met, then bits 1,3 and 4 in the variable Interrupt_request will be set to 1 and all other bits will be set to 0.
Bit# 7 6 5
Setting 0 0 0 1 1 0 1 0
Variable value: Interrupt_request = 26
4 3 2 1 0
XtraWare User Manual 79
Operating the XtraDrive Using XtraWare
Interrupt_ reg:
Because only bit 3 is set to 1 in the Interrupt_mask variable, only interrupt 3 will be handled; interrupts 4 and 1 will be ignored. Only bit 3 in Interrupt_pending will be set to 1, as it is the only bit set to 1 in both Interrupt_request and Interrupt_mask:
Bit# 7 6 5 4 3 2 1 0
Setting 0 0 0 0 1 0 0 0
Variable value: Interrupt_pending = 8
4.11.7. Interrupt Commands
Commands are used to signal the beginning and the end of each interrupt service routine. The commands INT and EXT_INT signal the beginning of interrupt service routines, and specify the internal or external interrupt conditions respectively. The command INT_RETURN signals the end of the interrupt service routine, and specifies the program line to which to return.
4.11.7.1. EXT_INT
Format: EXT_INT <Priority> <Input_Number> <Edge>
This command indicates the beginning of an interrupt service routine when the interrupt is conditional on the value of an external input. The argument <Priority> specifies the interrupt priority. <Priority> is specified as a value from 0 to 7, where 0 is the highest priority and 7 is the lowest. <Input_Number> specifies the number of the digital input to be monitored. <Edge> specifies whether the interrupt is to be triggered when the value of the digital input changes from 0 to 1 (Rising), from 1 to 0 (Falling), or whenever it changes (Both).
Figure 53: Programming an EXT_INT Command
4.11.7.2. INT
Format: INT <Priority> <Variable> <Condition> <Value>
This command indicates the beginning of an interrupt service routine, and is used when the interrupt is conditional on the value of an internal variable. The argument <Priority> specifies the input priority. <Priority> is specified
80 XtraWare User Manual
as a value from 0 to 7, where 0 is the highest priority and 7 is the lowest. <Variable> specifies on which internal variable the interrupt is conditional. Any XtraDrive variable can be used. <Condition> and <Value> specify the interrupt condition.
As shown in Figure 54, any of the relational operators can be specified for <Condition>. <Value> is entered in decimal format.
Figure 54: Programming an INT Command
4.11.7.3. INT_RETURN
Operating the XtraDrive Using XtraWare
Format: INT_RETURN <Label>
This command signals the end of an interrupt service routine. <Label> specifies the program label to which the program must proceed once the interrupt service routine has been completed.
Setting <Label> to –1 specifies that the program must simply continue running from the point at which the interrupt occurred.
If an interrupt service routine of a lower priority interrupt is executed after a higher priority interrupt service routine, the program will continue from the position defined by the last INT_RETURN command.
Figure 55: Programming an INT_RETURN Command
XtraWare User Manual 81
Operating the XtraDrive Using XtraWare
4.11.8. Interrupt Example
The following example program illustrates the use of interrupts. (The indented lines comment on the lines above.)
SET_VAR Interrupt_mask 3
Activates Interrupt 0 and 1.
LABEL 2
SET_OUTPUT 1 OFF
Sets Output 1 value to 0.
WAIT_INPUT 1 = 1 -1
Waits for In 1 to become True.
CONTROL ON
Starts the servo.
MOVE_D 655360 -1
Moves motor 655360 UU at profile speed.
SET_OUTPUT 1 OFF
Sets Output 1 value to 0.
END
Program ends.
INT 0 Target_velocity >= 400
Interrupt service routine 0: Runs if Target_velocity variable is equal to or exceeds 400.
10. SET_OUTPUT 1 ON
Sets Output 1 value to 1.
11. INT_RETURN -1
Returns to program line at which the interrupt occurred.
12. EXT_INT 1 1 Falling
Interrupt service routine 1: Runs if In 1 becomes False.
13. STOP_EX Emergency Servo OFF
Stops the motion and turns the servo off.
14. INT_RETURN 2
Returns to program to label 2.
82 XtraWare User Manual
Operating the XtraDrive Using XtraWare
The program will execute differently depending on whether or not In 1 changes during motion, as explained below.
Case 1: In 1 does not change during motion
Figure 56: Interrupt Example – Output Chart Case 1
From the chart:
The motor started moving after In 1 became true. As the motor target speed reached 400, output 1 was set to ON as
interrupt 0 was invoked as a result of its condition (Target_velocity>=400) being met.
The program returned to the MOVE_D command. Once the motor completed its motion, the output was set to OFF.
XtraWare User Manual 83
Operating the XtraDrive Using XtraWare
Case 2: In 1 changes during motion
Figure 57: Interrupt Example – Output Chart Case 2
From the chart:
The motor started moving after In 1 became true. As the motor target speed reached 400, output 1 was set to ON as
interrupt 0 was invoked as a result of its condition (Target_velocity>=400) being met.
In 1 became false. The motor was stopped at the emergency deceleration by the interrupt
service routine for interrupt 1.
The program jumped to label 2. Output 1 was set OFF.
Note:
If both interrupts occur simultaneously, the interrupt of priority 0 will be handled as in case 1, and then the interrupt of priority 1 will be handled as in case 2. The program will then return to label 2.
84 XtraWare User Manual
Operating the XtraDrive Using XtraWare
4.12. Master-Slave Synchronization
For master-slave applications, synchronization is generally started by a digital input. Starting the synchronization process as quickly as possible thereafter is extremely important to ensure accurate synchronization. Any delay will result in an unwanted offset between master and slave positions.
The command MOVE_R is used to commence synchronization. Conditioning the MOVE_R command using the WAIT_INPUT command will result in a delay of up to 2 ms, which may cause too great a position error between the master and slave.
The New_move_enable flag can be used to reduce the delay to
125 μs.
4.12.1. Using New_move_enable to Reduce Response Time
The New_move_enable input can be used to reduce the response time to 125 μs. A parameter, Pn2D1.1, is set to activate this feature. Once the flag has been set, all motion commands (except when in Speed Control mode, see section received. The remainder of the program will continue to run. It is important that a WAIT_INPUT command (or any other wait statement) be issued after the motion command that is to be delayed, to ensure that the rest of the program is also delayed.
5.3 Motion Modes) will be delayed until the input has been
4.12.2. Overriding New_move_enable
The New_move_enable function can be overridden by setting the variable Override_new_move_enable to 1. Doing so results in all following motion commands being run without the program waiting until a New_move_enable input is received.
4.12.3. Example Program for a Flying Shear Application
The program below controls the implementation of a simple flying shear. The parameter Pn2D1.1 is set to 0, mapping the New_move_enable input to input terminal CN1-40.
1. LABEL 1
2. MOVE_R 0
3. WAIT_VAR Follower_synchronized = 1
4. SET_OUTPUT 1 ON
5. WAIT_VAR Position_demand_value >= 1000
6. SET_VAR Override_new_move_enable 1
7. GO_D 0 -1
8. SET_VAR Override_new_move_enable 0
XtraWare User Manual 85
Operating the XtraDrive Using XtraWare
9. GO_TO 1
10. END
The command MOVE_R 0 (line 2) is suspended until an input is received at CN1-40. Once the slave is synchronized to the master (line 3), Output 1 is set On (line 4).
Once the Position_demand_value variable has exceeded 1000 (line 5), the New_move_enable function in disabled (line 6). Therefore, the GO_D function (line 7) is run immediately, irrespective of the state of the New_move_enable input.
The New_move_enable input is then re-enabled (line 8), and the program returns to the beginning (line 9).
See MOVE_R in Chapter
5, Command Reference.
86 XtraWare User Manual
5. Command Reference
This chapter provides a reference for the use of all XtraWare commands. Before the details of the actual commands are presented, some general topics relating to XtraWare’s handling of commands are presented:
5.1 XtraWare Modes: Describes the three modes of XtraDrive operation,
as they relate to command handling.
5.2 SCB and UPB Command Flushing: Describes how commands are
processed through the XtraDrive’s command memory buffers.
5.3 Motion Modes: Explains the differences between different classes of
motion commands.
5.4 Motion Command Buffer: Explains how the motion command buffer
(MCB) processes motion commands.
The actual command reference tables are then presented:
5.5 XtraWare Commands: Reference tables for programming
commands.
5.6 Serial Communication Commands: Reference tables for serial
commands.
Command Reference
XtraWare User Manual 87
Command Reference
5.1. XtraWare Modes
Three modes of operation are available:
Program Mode. Sequential Mode. Immediate Mode.
5.1.1. Program Mode (User Program Buffer UPB)
In this mode, a program (a group of commands) is downloaded into the UPB (User Program Buffer) of the driver. Program commands have the highest priority.
Program execution is activated by the RUN command or by clicking RUN on the toolbar.
Motion commands in program mode are first calculated and then inserted into the motion command buffer (MCB). This enables the setting of an output or insertion of a certain term immediately after the motion begins until it ends. Commands with the suffix _D are fetched to the MCB. Only after their completion (i.e., the MCB is empty) is the next command fetched.
5.1.2. Sequential Mode (Sequential Command Buffer SCB)
In this mode, each command is placed in the SCB (Sequential Command Buffer) and processed sequentially. If no program is running, a command in the SCB is executed immediately after the previous command in the SCB has been executed.
In sequential mode, motion commands that are executed through the MCB are handled as follows: A motion command fetched from the SCB is moved into the MCB. The MCB will then execute the motion command after the previously sent motion command has been completed.
Note:
When you issue a motion command (MOVE, MOVE_D, GO, GO_D, SLIDE), the motion is calculated internally by the controller and then placed in a “motion queue” inside the motion command buffer (MCB). Therefore, changes made in profile commands (ACCELERATION, SPEED, JERK) in Immediate mode do not affect motions that are already in the MCB.
88 XtraWare User Manual
Command Reference
5.1.3. Immediate Mode (Immediate Command Buffer ICB)
In immediate mode, commands are placed in the ICB and executed immediately. If a program is running or sequential commands are being executed, an immediate command is fetched only when a delay in the program or the sequential commands occurs. For example, when a MOVE_D command is executed, it pauses the execution of subsequent commands. During that pause, commands from the immediate command buffer can be fetched and executed. An exception is the STOP_EX command, which is executed immediately.
5.2. SCB and UPB Command Flushing
Motion command flushing from the SCB or UPB depends on the command type:
5.2.1. Motion Commands With _D Suffix
These commands are flushed from the SCB or UPB only when the corresponding movement is terminated according to the precision requirement setting, that is, subsequent commands in the buffer are executed immediately following movement termination of the _D command. For example, setting an output will occur at the end of the movement.
5.2.2. Motion Commands Without _D Suffix
These commands are transferred to the MCB, and are flushed from SCB or UPB immediately following execution. This enables you to enter a number of motion commands. While the motion commands are being executed by the driver, other commands can be executed sequentially.
XtraWare User Manual 89
Command Reference
5.3. Motion Modes
The motion commands are divided into Motion modes as described below. The current motion mode can be read from the Motion_mode variable.
Position: Motion commands (MOVE, GO, MOVE_D, GO_D) are
calculated and a trajectory movement speed and duration are determined.
Velocity: The velocity command (SLIDE) can be sent and changed at
any time while keeping acceleration and jerk within the limits defined by the relevant variables.
Torque: The TORQUE command is immediately applied to the motor.
The torque changing rate being limited by the Torque_slope variable.
Speed Control: A speed control loop is closed on the reference
command instead of the position control loop that is normally used (SPEED_CONTROL).
Homing: Homing commands (HARD_HOME, HOME_SW, HOME_SW_C,
HOME_C) start an automatic search for the home position according to the homing parameter values.
Hunting: While in this mode, both the target position and the motion
profile (see section 12.2, Motion Profile) can be adjusted during motion. The revised settings will be applied even to the motion in progress. Note that changing the jerk time (see section 12.2.3, Profile Jerk Smoothing Time) while in hunting mode does not take effect until the motion mode is changed.
Pulse Train: A reference position command is given by pulse-train
from an external source (MOVE_R).
Analog Speed: A reference speed command is given by analog input
from an external source and the position control loop is closed on the reference value (SLIDE_ANALOG).
Analog Torque: A reference torque command is given by an analog
input from an external source and the position control loop is closed on the reference value (TORQUE_ANALOG).
ECAM: In ECAM mode, you specify the position that a slave axis must
reach, depending on the position of a master axis or on the time elapsed.
90 XtraWare User Manual
Loading...