iv Atlas Digital Amplifier Complete Technical Reference Related Atlas Digital Amplifier User’s Manual Description of the Atlas Digital Amplifier electrical and mec
iv Atlas Digital Amplifier Complete Technical Reference Related Atlas Digital Amplifier User’s Manual Description of the Atlas Digital Amplifier electrical and mechanical specifications along with a summary of its operational features.
Atlas® Digital Amplifier Complete Technical Reference Performance Motion Devices, Inc. 1 Technology Park Drive Westford, MA 01886 Revision 2.0 February, 2017 NOTICE This document contains proprietary and confidential information of Performance Motion Devices, Inc., and is protected by federal copyright law. The contents of this document may not be disclosed to third parties, translated, copied, or duplicated in any form, in whole or in part, without the express written permission of Performance Motion Devices, Inc. The information contained in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form, by any means, electronic or mechanical, for any purpose, without the express written permission of PMD. Copyright 19982017 by Performance Motion Devices, Inc. Atlas, Magellan, ION, Magellan/ION, Juno, Pro-Motion, C-Motion and VB-Motion are registered trademarks of Performance Motion Devices, Inc. ii Atlas® Digital Amplifier Complete Technical Reference Warranty PMD warrants that its products shall substantially comply with the specifications applicable at the time of sale, provided that this warranty does not extend to any use of any PMD product in an Unauthorized Application (as defined below). Except as specifically provided in this paragraph, each PMD product is provided "as is" and without warranty of any type, including without limitation implied warranties of merchantability and fitness for any particular purpose. PMD reserves the right to modify its products, and to discontinue any product or service, without notice and advises customers to obtain the latest version of relevant information (including without limitation product specifications) before placing orders to verify the performance capabilities of the products being purchased. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement and limitation of liability. Unauthorized Applications PMD products are not designed, approved or warranted for use in any application where failure of the PMD product could result in death, personal injury or significant property or environmental damage (each, an "Unauthorized Application"). By way of example and not limitation, a life support system, an aircraft control system and a motor vehicle control system would all be considered "Unauthorized Applications" and use of a PMD product in such a system would not be warranted or approved by PMD. By using any PMD product in connection with an Unauthorized Application, the customer agrees to defend, indemnify and hold harmless PMD, its officers, directors, employees and agents, from and against any and all claims, losses, liabilities, damages, costs and expenses, including without limitation reasonable attorneys' fees, (collectively, "Damages") arising out of or relating to such use, including without limitation any Damages arising out of the failure of the PMD product to conform to specifications. In order to minimize risks associated with the customer's applications, adequate design and operating safeguards must be provided by the customer to minimize inherent procedural hazards. Disclaimer PMD assumes no liability for applications assistance or customer product design. PMD does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of PMD covering or relating to any combination, machine, or process in which such products or services might be or are used. PMD's publication of information regarding any third party's products or services does not constitute PMD's approval, warranty or endorsement thereof. Atlas® Digital Amplifier Complete Technical Reference iii Related Documents Atlas® Digital Amplifier User's Manual Description of the Atlas Digital Amplifier electrical and mechanical specifications along with a summary of its operational features. Magellan® Motion Control IC User's Guide Complete description of the Magellan Motion Control IC features and functions with detailed theory of operations. Magellan Motion Control Developer's Kit User's Manuals How to install, configure, and operate the DK58000 series, DK55000 series, and MC58113 series Magellan Motion Control IC Developer's Kits. Pro-Motion® User's Guide User's guide to Pro-Motion, the easy-to-use motion system development tool and performance optimizer. Pro-Motion is a sophisticated, easy-to-use program which allows all motion parameters to be set and/or viewed, and allows all features to be exercised. iv Atlas® Digital Amplifier Complete Technical Reference Table of Contents 1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.1 Atlas Digital Amplifier Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2 Typical Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Features and Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.4 Atlas Developer's Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2. Functional Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1 Operational Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2 Physical Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3 Mechanical Mounting Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3. Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1 Drive Ratings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3 Environmental Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.4 Safety and Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.5 DC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.6 AC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.7 Pin Descriptions and Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.8 Signal Interfacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.9 Connection Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.10 Heat Sink Grounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.11 Atlas Conversion Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.1 Functional Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.2 Internal Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.3 Notes on Command Mnemonics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.4 Commutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.5 Current Loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.6 Power Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.7 Status Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.8 Safety Processing Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.9 Step Motor Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.10 User Memory Space & Buffers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.11 Trace Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.12 Power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4.13 Non-Volatile (NVRAM) Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.14 Writing and Reading NVRAM Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.15 SPI Communications Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5. SPI Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.1 SPI Communications Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5.2 Packet Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 5.3 Sending a Voltage or Torque Output Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.4 Sending an Amplifier Disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.5 Sending a NOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.6 Sending Atlas Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Atlas® Digital Amplifier Complete Technical Reference v 6. Instruction Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 A. Atlas Developer's Kit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 A.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 A.2 Installation and Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 A.3 Atlas Carrier Card Reference Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 A.4 L-Bracket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 B. Application Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 B.1 Brushless DC Atlas with Single-Axis MC58113 Motion Control IC. . . . . . . . . 167 B.2 DC Brush & Step Motor Atlas with Multi-Axis Magellan . . . . . . . . . . . . . . . . . . 170 B.3 Step Motor Atlas Operating In Pulse & Direction Mode . . . . . . . . . . . . . . . . . . 172 B.4 DC Brush Atlas with PIC Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 B.5 Step Motor Atlas with ARM Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 B.6 Atlas Interfacing Via a Daughter Card. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 B.7 Multi-Motor Atlas with Single-Axis MC58113 Motion Control IC . . . . . . . . . 182 vi Atlas® Digital Amplifier Complete Technical Reference List of Figures 1-1 Single Axis Magellan With Atlas Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1-2 Multi Axis Magellan With Atlas Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1-3 Direct Host Microprocessor With Atlas Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1-4 Direct Host Microprocessor With Atlas Amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1-5 Atlas Force Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1-6 Developer Kit Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2-1 Vertical Unit - Ultra Compact Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2-2 Horizontal Unit - Ultra Compact Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2-3 Vertical Unit - Compact Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2-4 Horizontal Unit - Compact Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2-5 Horizontal & Vertical Unit Mounting Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2-6 Recommended Atlas Unit Thermal Transfer Material Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2-7 Atlas Torque Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3-1 Timing Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3-2 Atlas Pinouts - Ultra Compact, Vertical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3-3 Atlas Pinouts - Ultra Compact, Horizontal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3-4 Atlas Pinouts - Compact, Vertical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3-5 Atlas Pinouts - Compact, Horizontal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3-6 Signal Interfacing ~Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3-7 Signal Interfacing FaultOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3-8 Brushless DC Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3-9 DC Brush Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3-10 Step Motor Pulse and Direction Mode Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3-11 Step Motor SPI Communication Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4-1 High Level System Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4-2 Internal Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4-3 Commutation Control Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4-4 Phasing Reference Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4-5 Current Loop Control Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4-6 Individual Phase Control Calculation Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4-7 Field Oriented Control Calculation Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4-8 Third Leg Floating Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4-9 Power Stage Control Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4-10 Current Foldback Processing Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4-11 Pulse and Direction Signal Input Mode Control Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4-12 User Memory Space and Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4-13 Example Motion Trace Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4-14 Trace Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4-15 High-Level Format of a PSF (PMD Structured Data Format) Memory Space . . . . . . . . . . . . . . . . . . . 75 4-16 PSF Data Segment Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4-17 Initialization Commands Segment Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4-18 Parameter List Segment Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4-19 Format of Parameter Assignment Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4-20 Example PSF Memory Space Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4-21 SPI Communications Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4-22 Sending a Voltage or Torque Output Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5-1 SPI Communications Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5-2 Sending a Voltage or Torque Output Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5-3 Amplifier Disable Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Atlas® Digital Amplifier Complete Technical Reference vii 5-4 NOP Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5-5 Send Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 5-6 Query Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 A-1 Developer Kit Components (four-axis version shown) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 A-2 Connecting DB9 Cable to Carrier Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 A-3 Component Placement of Vertical and Horizontal DK Carrier Cards (four-axis version shown) 158 A-4 Vertical Unit Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 A-5 Horizontal Unit Pinouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 A-6 Vertical and Horizontal Compact to Ultra Compact Package Signal Converters . . . . . . . . . . . . . . 163 A-7 Mounting Atlas to L-bracket Plates (four-axis, vertical version shown) . . . . . . . . . . . . . . . . . . . . . . . 165 A-8 Top and Front Views of Four-Axis Horizontal Atlas DK L-bracket Vertical Plate . . . . . . . . . . . . . . . 166 A-9 Top and Front Views of One-Axis Horizontal Atlas DK L-bracket Vertical Plate . . . . . . . . . . . . . . . . 166 B-1 Brushless DC Atlas With Single-Axis Magellan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 B-2 DC Brush & Step Motor Atlas With Multi-Axis Magellan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 B-3 Step Motor Atlas Operating In Pulse & Direction Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 B-4 DC Brush Atlas With PIC Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 B-5 Step Motor Atlas With ARM Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 B-6 Atlas Interfacing Via A Daughter Card #1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 B-7 Atlas Interfacing Via A Daughter Card #2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 B-8 Multi-motor Atlas With MC58113 Motion Control IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 viii Atlas® Digital Amplifier Complete Technical Reference 1. Introduction 1 In This Chapter Atlas Digital Amplifier Overview Typical Applications Features and Functions Atlas Developer's Kits 1.1 Atlas Digital Amplifier Overview Atlas Digital Amplifiers are single-axis amplifiers that provide high performance torque control of brushless DC, step motor, and DC Brush motors. They accept digital torque commands from an external source and are used directly for motor torque control applications, or in conjunction with higher level controllers for velocity or positioning applications. Their very compact size and range of power output levels make them an ideal solution for single-card machine controllers that require high performance in a small envelope. Atlas digital amplifiers provide many advanced control features including user-programmable gain parameters, performance trace, field oriented control, and I2t current management. Atlas amplifiers are powered from a single supply voltage, and provide automatic protection from overcurrent, undervoltage, overvoltage, overtemperature, and short circuit faults. The Atlas digital amplifier family has been designed to work seamlessly with PMD's Magellan family of motion control ICs. Alternatively, they can be used with dedicated FPGAs, digital signal processors, or general purpose microprocessors. Communication to/from Atlas amplifiers is via SPI (Serial Peripheral Interface) using a simple, packet-oriented protocol. For step motors, in addition to the SPI format a dedicated pulse & direction input mode is provided. Atlas amplifiers are packaged in plastic and metal solderable modules and are available in an ultra compact package size with a total footprint of 1.4 inch2 (9.0 cm2) and a compact package size with a footprint of 2.6 inch2 (16.8 cm2). They come in three power levels; 75 watts, 250 watts, and 500+ watts and utilize standard through-hole pins for all electrical connections. Atlas amplifiers are provided in both vertical and horizontal mounting configurations and have integral attachment tabs to allow for a variety of mechanical mounting and heat sink options. The following table shows the available configurations of the Atlas Digital Amplifiers: P/N Step Motor MD241048/02VB MD241048/02HB MD241048/05VB MD241048/05HB MD141056/25VB MD141056/25HB Power Level (continuous) Voltage Size Mounting Style Motor Type Low (75W) Low (75W) Medium (250W) Medium (250W) High (500+W) High (500+W) 12-48V 12-48V 12-48V 12-48V 12-56V 12-56V Ultra compact Ultra compact Ultra compact Ultra compact Compact Compact Vertical Horizontal Vertical Horizontal Vertical Horizontal Step Motor Step Motor Step Motor Step Motor Step Motor Step Motor Atlas® Digital Amplifier Complete Technical Reference 9 1 Introduction Brushless DC MD231048/02VB MD231048/02HB MD231048/05VB MD231048/05HB MD131056/25VB MD131056/25HB DC Brush MD211048/02VB MD211048/02HB MD211048/05VB MD211048/05HB MD111056/25VB MD111056/25HB Multi-Motor MD281048/02VB MD281048/02HB MD281048/05VB MD281048/05HB MD181056/25VB MD181056/25HB Low (75W) Low (75W) Medium (250W) Medium (250W) High (500+W) High (500+W) Low (75W) Low (75W) Medium (250W) Medium (250W) High (500+W) High (500+W) Low (75W) Low (75W) Medium (250W) Medium (250W) High (500+W) High (500+W) 12-48V 12-48V 12-48V 12-48V 12-56V 12-56V 12-48V 12-48V 12-48V 12-48V 12-56V 12-56V 12-48V 12-48V 12-48V 12-48V 12-56V 12-56V Ultra compact Ultra compact Ultra compact Ultra compact Compact Compact Vertical Horizontal Vertical Horizontal Vertical Horizontal Ultra compact Ultra compact Ultra compact Ultra compact Compact Compact Vertical Horizontal Vertical Horizontal Vertical Horizontal Ultra compact Ultra compact Ultra compact Ultra compact Compact Compact Vertical Horizontal Vertical Horizontal Vertical Horizontal Brushless DC Brushless DC Brushless DC Brushless DC Brushless DC Brushless DC DC Brush DC Brush DC Brush DC Brush DC Brush DC Brush Multi-motor* Multi-motor* Multi-motor* Multi-motor* Multi-motor* Multi-motor* *Multi-motor motor type allows the Atlas to be configured by the user to drive either Step Motor, Brushless DC, or DC Brush motor type. This manual provides a description of the electrical and mechanical specifications for the Atlas Digital Amplifiers, along with a summary of its operational features. For complete documentation on all aspects of the Atlas Digital Amplifier including a programmers command reference refer to Atlas® Digital Amplifier Complete Technical Reference. For more information on the Magellan Motion Control IC consult the Magellan Motion Control IC User's Guide. 1.2 Typical Applications The following section provides overview diagrams of typical applications utilizing the Atlas amplifier products. 1.2.1 Single Axis Positioning Motion Controller The diagram below shows a PMD MC58113 Motion Control IC sending torque commands to an Atlas Amplifier to provide positioning control of a brushless DC, DC Brush, or Step Motor. Figure 1-1: Single Axis Magellan With Atlas Amplifier Brushless DC, DC Brush, or Step Motor 10 Atlas® Digital Amplifier Complete Technical Reference 1.2.2 Multi Axis Positioning Motion Controller Introduction 1 The diagram below shows a PMD Magellan MC58000 series or MC55000 series multi-axis motion control IC being used with two or more Atlas Amplifiers to provide control of brushless DC, DC Brush, or Step Motors in a positioning application. If desired each axis can control a different motor type, so that, for example, brushless DC motors can be used along with step motors in the same controller. Brushless DC, DC Brush, or Step Motor Figure 1-2: Multi Axis Magellan With Atlas Amplifiers Brushless DC, DC Brush, or Step Motor 1.2.3 Microprocessor-Based Motion Controller The diagram below shows the Atlas Amplifier being driven by a general purpose microprocessor that provides high level path generation and servo loop closure and outputs continuous desired torque commands or desired position increments for step motors to the Atlas Amplifier via the SPI (Serial Peripheral Interface). Brushless DC, DC Brush, or Step Motor Figure 1-3: Direct Host Microprocessor With Atlas Amplifiers 1.2.4 Stand Alone Step Motor Amplifier The diagram below shows the Atlas Amplifier being directly driven by pulse & direction signals. These signals may come from a microprocessor, a control card, or any other existing motion control device that outputs pulse & direction signals. In this mode the Atlas unit operates `stand-alone,' and utilizes configuration control parameters previously stored into the Atlas unit's NVRAM (non-volatile) memory. Atlas® Digital Amplifier Complete Technical Reference 11 1 Introduction Figure 1-4: Direct Host Microprocessor With Atlas Amplifiers Step Motor There are a few options for configuring Atlas units for stand alone operation: · Pro-Motion can be used with the Atlas Developer's Kit to program Atlas units · The user can develop their own NVRAM programming system by utilizing the SPI (Serial Peripheral Interface) Atlas command protocol. For more information refer to the Atlas® Digital Amplifier Complete Technical Reference. · PMD offers custom pre-configured Atlas units. For more information contact your local PMD sales representative. 1.2.5 Force Control The Brushless DC and DC Servo Atlas units can be used for general purpose force control applications such as remote teleoperation, force feedback, solonoid actuation, and any other general purpose valve/actuator control where a precisely controllable current is needed. In this application the torque command may be sent continuously by the host microprocessor or from time to time as required by the application. In either case the Atlas provides very accurate current/torque control resulting in smooth and precise application of force. Figure 1-5: Atlas Force Control 1.3 Features and Functions The Atlas family of amplifiers provide an extensive list of functions, including: · Available in Brushless DC, DC Brush, Step Motor, and multi-motor motor types · High performance all-digital power amplifier · Works with Magellan ICs, FPGAs or microprocessor-based controllers · Digital SPI interface eliminates analog +/- 10V signals · Available in 75W, 250W, and 500W+ power levels · Rugged plastic solderable module format uses standard through-hole pins · Total power output to 1Kilowatt · Available in ultra compact 1.05" x 1.05" x .53" (27mm x 27mm x 13mm) size or compact 1.52" x 1.52" x .60" (39mm x 39mm x 15mm) size 12 Atlas® Digital Amplifier Complete Technical Reference · Horizontal and vertical mount configurations Introduction 1 · Includes rugged mechanical tab mounts · Supply voltage range of 12V up to 56V · High current output up to 14A continuous, 25A peak · Digital current loop with choice of standard A/B or Field Oriented Control (FOC) · Direct signal pulse and direction input · I2t current foldback limiting · Overcurrent, overvoltage, undervoltage, overtemperature, and SPI command watchdog timeout protection · Single DC supply operation. · Enable input and FaultOut output safety interlock signals · SPI (Serial Peripheral Interface) up to 8 MHz · Performance trace of up to 1,020 words and four simultaneous variables · 1,024 word non-volatile parameter storage · Microstepping control with up to 256 microsteps per full step · Signal conditioning buffers and analog filters on all I/O signals · Fully RoHS compliant and CE marked 1.4 Atlas Developer's Kit To simplify development, an Atlas Developer's Kit is available, shown in Figure 1-6. Atlas® Digital Amplifier Complete Technical Reference 13 1 Introduction Figure 1-6: Developer Kit Components $7/$6 '. &$55,(5 &$5' $66(0%/< $7/$6 $03/,),(5 /%5$&.(7 $66(0%/< $7/$6 '. '% &20081,&$7,216 &$%/( The following software and hardware components are included in every Atlas Developer's Kit: · Pro-Motion CD and User's Guide · C-Motion and VB-Motion SDK CD, including PDFs of all Atlas documentation · Atlas DK DB9 communications cable For the following components, you will provide information that will specify how you want the DK tailored for your exact development needs: · Specific Atlas units to be included (motor type, power level) · Atlas carrier card (horizontal or vertical, 1 or 4 axis version) The carrier cards are designed for direct use with the compact Atlas format. For each ultra compact Atlas ordered a converter card is provided that allows the ultra compact Atlas to be plugged into the compact carrier card socket directly. The L-bracket provides a stable mechanical base from which you can conveniently connect and operate your prototype system motors. With the vertical plate, the Atlas units have additional heat sinking, which can be extended further by connecting the vertical plate to your own heat sink or cold plate. Electrical connection to the Atlas DK carrier card is made by DB9 connector, and by jack screw connectors. Designers who plan to use the Atlas in conjunction with PMD's Magellan Motion Control ICs can connect the Atlas DK to the Magellan DK card, purchased separately. For more information on this product see one of the available Magellan Motion Control IC developer's kit user's manuals. Refer to Appendix A, "Atlas Developer's Kit" for complete information on ordering, setting up and operating the Atlas DK. 14 Atlas® Digital Amplifier Complete Technical Reference 2.Functional Characteristics 2 In This Chapter Operational Specifications Physical Dimensions Mechanical Mounting Options 2.1 Operational Specifications Operating Parameter Motor types supported: Communication format: SPI clock frequency range: Torque command rate: Current measurement resolution: Current loop type: Current loop resolution: Current loop rate: Current loop modes: Safety functions: Output limiting: Command modes: PWM rate: PWM generation modes: Pulse & direction rate: Microsteps per full step: Trace capture modes: Trace trigger modes: Trace buffer size: NVRAM storage size: Value Brushless DC, DC Servo, Step Motor SPI (Serial Peripheral Interface) 2.0 MHz to 8.0 MHz up to 9.7 kHz 12 bits P, I (proportional, integral) with Integral limit 16 bits 19.530 kHz individual phase, field oriented control, third leg floating over current detect, programmable over temperature detect, programmable overvoltage detect, programmable under voltage detect, programmable I2t current foldback, SPI command watchdog timeout Programmable I2t energy, current, and voltage limit SPI voltage, SPI torque, pulse & direction signal 20 kHz, 40 kHz, 80 kHz, or 120 kHz sinusoidal, space vector modulation, standard single-phase 1.0 M Pulses/sec up 256 per full step one time, rolling-buffer internal clock, external by controller 1,020 16-bit words 1,024 16-bit words Atlas® Digital Amplifier Complete Technical Reference 15 2 Functional Characteristics 2.2 Physical Dimensions 2.2.1 Vertical Unit, Ultra Compact Package Figure 2-1: Vertical Unit Ultra Compact Package 2.2.2 Horizontal Unit, Ultra Compact Package Figure 2-2: Horizontal Unit - Ultra Compact Package 16 Atlas® Digital Amplifier Complete Technical Reference 2.2.3 Vertical Unit, Compact Package Functional Characteristics 2 Figure 2-3: Vertical Unit Compact Package 2.2.4 >PP@ LQFKHV Horizontal Unit, Compact Package >PP@ LQFKHV Figure 2-4: Horizontal Unit - Compact Package Atlas® Digital Amplifier Complete Technical Reference 17 2 Functional Characteristics 2.3 Mechanical Mounting Options Atlas amplifiers are provided in two separate package sizes, ultra compact and compact, and in two separate mounting configurations; vertical and horizontal. There are some very low power applications where the Atlas unit may be mounted without mechanical attachment to the screw tabs. In such cases mechanical attachment to the PCB occurs via the electrical solder connections. Most applications however will utilize the Atlas unit's integral screw tab mounts to rigidly connect the Atlas to the PCB, to a heat sink, or to some other mechanical support. As shown in Figure 2-5 there are a number of Atlas mounting options available when using the Atlas screw tabs. The choice of the mounting hardware depends on the demands of the application. The following table provides information related to the mechanical screw tab mounts: Atlas Package Ultra Compact Compact Recommended screw type M2.0 M2.5 Maximum screw head diameter 4.2 mm 5.4 mm Maximum screw body diameter 2.2 mm 2.8 mm 18 Atlas® Digital Amplifier Complete Technical Reference THERMAL TRANSFER MATERIAL SCREWS (M2.0 or M2.5) STANDOFF Functional Characteristics 2 THERMAL TRANSFER MATERIAL SCREWS (M2.0 or M2.5) STANDOFF Figure 2-5: Horizontal & Vertical Unit Mounting Options HEAT SINK STANDOFF HEAT SINK STANDOFF HEX NUT (M2.0 or M2.5) HEX NUT (M2.0 or M2.5) A B Horizontal Unit, Mechanical Mount Through Heat Sink to PCB Horizontal Unit, Mechanical Mount to PCB THERMAL TRANSFER MATERIAL THERMAL TRANSFER MATERIAL SUPPORT/COLD PLATE SUPPORT/COLD PLATE SCREWS (M2.0 or M2.5) SCREWS (M2.0 or M2.5) C D Horizontal Unit, Mechanical Mount to Support/Cold Plate Vertical Unit, Mechanical Mount to Support/Cold Plate 2.3.1 Mounting Guidelines Atlas amplifiers, while designed to be robust and easy to install, contain active electronics that can only function reliably when the mechanical integrity and operating environment of the Atlas is maintained. The next three sections Atlas® Digital Amplifier Complete Technical Reference 19 2 Functional Characteristics provide important recommendations and guidelines for the configuration, selection, placement, mounting method, and installation procedure for Atlas amplifiers. Choice of vertical or horizontal Atlas. The horizontal configuration of Atlas is recommended for applications where the Atlas is not mechanically mated to a supporting plate and where vibration or movement-related forces may be present. When the Atlas unit is mechanically mated to a supporting plate, either the horizontal or the vertical configuration may be used. Figure 2-5C and Figure 2-5D show the Atlas unit mechanically mated to a supporting plate. Attaching Atlas to a supporting plate. Some Atlas applications will utilize a supporting plate for heat removal or for enhanced mechanical stability. For Atlas installations that may be subject to vibration or movement-related forces and that utilize a supporting plate, special care should be taken to insure that there is no movement between the circuit card that the Atlas is soldered or socketed to and the supporting plate which the Atlas is mechanically attached to. Such movement could result in damage to the Atlas unit, the circuit card, or the supporting plate. Attaching Atlas to a free-standing heatsink. Some Atlas applications will utilize a free standing heat sink, such as is shown in Figure 2-5A and Figure 2-5B. Free standing heat sinks are recommended with horizontal Atlas units but are not recommended for use with vertical Atlas units. When mounting Atlas units with free standing heat sinks special care should be taken where vibration or movement-related forces may be present. These forces, acting on the additional mass of the heat sink, may impart excessive mechanical stress on the Atlas resulting in damage to the Atlas unit, the circuit card, or the heat sink. Depending on the nature and magnitude of the forces, in these applications mounting the Atlas to a supporting plate may be preferred. Choice of socket or solder connection to the circuit card. For best electrical contact to the printed circuit board (PCB), connection by soldering to the Atlas is generally recommended. This is particularly true for Atlas units that are not mated to a supporting plate. When the Atlas unit is mounted to a supporting plate either solder or socket electrical connections may be used, with solder connections recommended for applications benefitting from rigid connection of the Atlas to the PCB, and sockets being recommended when greater mechanical isolation of the PCB from the mechanical support is desired. Some of the electrical ratings of the Atlas may not be achievable when electrical connection to the Atlas is via sockets rather than via soldering. It is the responsibility of the user to determine whether a particular motor output current and voltage rating may be achieved with a given socket. 2.3.2 Thermal Transfer Materials Thermal transfer materials in the form of thermal tape, pads, paste, or epoxy may be used to improve thermal transfer between the Atlas' metal plate and an attached heat sink or supporting plate. These materials improve thermal conductivity by filling in air gaps that form when two metallic surfaces are mated. Figure 2-5 shows a typical application of a thermal transfer material between the Atlas and a heat-removing metal surface. The following guidelines may be helpful in selecting and sizing the thermal transfer material best-suited to your application. The capacity of thermal transfer materials to transfer heat (known as the bulk conductivity) is much lower than that of metals such as aluminum or copper. Therefore, in general, the thinner the transfer material the better. Thickness of the material is only precisely controllable for thermal pads and thermal tapes, with thermal pads providing the thinnest available interfaces beginning at 5 mils (.127 mm) or even less. For use with Atlas amplifiers thermal transfer materials that are thicker than 40 mils (1.0 mm) are not recommended regardless of the material used. When using thermal paste or thermal epoxy glue the thickness should be carefully controlled via a silk screen or other wet film application process. The Atlas unit itself should not be used to squeeze non-uniformly applied paste or epoxy flat during installation. Doing so may result in damage to the Atlas. 20 Atlas® Digital Amplifier Complete Technical Reference Functional Characteristics 2 Whether using tape, pads, paste, or epoxy, as shown in Figure 2-6, the thermal transfer material that is used as the interface should not extend to the area under the Atlas' tabs because this may reduce the amount of compression that occurs in the thermal transfer area. The following table provides dimensions for the applied thermal transfer material for the two available Atlas package sizes: Atlas Package Size Ultra Compact Compact Maximum Pad Dimensions .1.00" x .95" (25.4 mm x 24.1mm) 1.40" x 1.50" (35.6 mm x 38.1 mm) .95" (24.1) 1.40" (35.6) Figure 2-6: Recommended Atlas Unit Thermal Transfer Material Dimensions 1.00" (25.4) 1.50" (38.1) 2.3.3 Atlas Installation There are a number of precautions and procedures that should be followed to maintain the electrical and mechanical integrity of the Atlas unit during installation. Soldering Atlas units in place. Applications that utilize Atlas units that are not mechanically mated to a heat sink or that are mated to a self-standing heat sink may utilize a standard soldering process without special precautions or procedures. Applications that involve Atlas units mated to a supporting plate and that will be soldered to the PCB should take special care to insure that the solder joints are not stressed by the supporting plate once installed. The recommended method to achieve this is to mechanically mate the Atlas to the supporting plate before soldering the Atlas into the PCB. If, for whatever reason, this is not possible, then special care should be taken to insure that the Atlas is precisely aligned with the supporting plate after soldering and before mechanical attachment so that upon mechanical attachment no stress is placed on the Atlas unit, the solder contacts, or the PCB. Mounting surface flat and clean. Thermal performance as well as safe operation of the Atlas requires that the surface that the Atlas is mounted to be flat and clean, free of dust, grease, or foreign objects. The recommended maximum deviation of the mating surface flatness is 3 mils (.076 mm). Mechanical mounting limits. Applications that will utilize a mechanical attachment to the Atlas via the Atlas's mounting tabs should take special care not to overstress the mechanical tabs. Regardless of the attachment method, which is most commonly screws but may also be clips or inserts, the linear force applied to each mechanical tab should not exceed certain values as shown in the following table and the accompanying Figure 2-7. Atlas Package Size Ultra Compact Compact Maximum Direct Force Screw Type, Corresponding Per Tab Maximum Rotary Torque 25 pounds (111 N) M2.0 x .40, 11.0oz-in (.078 N-m) 35 pounds (156 N) M2.5 x.45, 12.5oz-in (.088 N-m) Atlas® Digital Amplifier Complete Technical Reference 21 2 Functional Characteristics Figure 2-7: Atlas Torque Specifications 11.0 Oz-in (.078 N-m) - Ultra Compact Package 12.5 OZ-in (.088N-m) - Compact Package M2.0 or M2.5 Screw Mechanical mounting procedure. Atlas units that are mated to a heat sink or mechanical plate should be attached by progressively tightening both of the Atlas unit's tabs. This means that one screw may be tightened, followed by the other, than back to the first etc. until the desired torque at each screw has been achieved. Following this procedure is particularly important when installing Atlas units over paste or epoxy, where the subsurface layer will undergo compression and movement before settling to a final installed position. To ensure that proper contact exists between the Atlas and the entire thermal transfer material substrate, and to ensure that the Atlas unit is not damaged via mechanical overstress, the user should carefully apply equal torque increments to each tab screw, never exceeding at any point the torque limit on either tab of 25 lbs (111 N) linear force or 11.0 oz-in (.078 N-m) rotary torque using a M2.0 x .40 screw for the ultra compact Atlas package, and 35 lbs(156N) linear force or 12.5oz-in (.088 N-m) rotary torque using a M2.5 x .45screw for the compact Atlas package. . It is the responsibility of the user to ensure that all Atlas units have been installed within the above prescribed mechanical stress limits and following the above described procedures. Failure to observe any of the above recommended procedures and limits may result in incorrect operation or failure of the Atlas during operation. 22 Atlas® Digital Amplifier Complete Technical Reference 3.Electrical Specifications 3 In This Chapter Drive Ratings Absolute Maximum Ratings Environmental Ratings Safety and Compliance DC Characteristics AC Characteristics Pin Descriptions and Pinouts Signal Interfacing Connection Overview Heat Sink Grounding Atlas Conversion Factors 3.1 Drive Ratings 3.1.1 Low Power Units (P/Ns MD2x1048/02xB) Specifications* Nominal supply voltage Continuous current Peak current (per phase) Maximum continuous power DC Brush Motor 12-48 VDC 1.5 ADC 3.8 A 72 W Brushless DC Motor 12-48 VDC 1.5 Arms 3.8 A 88 W Step Motor 12-48 VDC 1.5 Arms 3.8 A 102 W * transformer isolated power supply, T < 40° C A coldplate or a heatsink in an environment with sufficient airflow can be used to achieve the above drive ratings. For temperature operation beyond the standard 0-40° C range, above-listed ratings may change. Contact your PMD representative for additional information on Atlas extended temperature operation including higher temperature drive ratings. 3.1.2 Medium Power Units (P/Ns MD2x1048/05xB) Specifications* Nominal supply voltage Continuous current Peak current (per phase) Maximum continuous power DC Brush Motor 12-48 VDC 7.0 ADC 12.5 A 336 W Brushless DC Motor Step Motor 12-48 VDC 12-48 VDC 5 Arms 4.5 Arms 12.5 A 12.5 A 294 W 305 W Atlas® Digital Amplifier Complete Technical Reference 23 3 Electrical Specifications * transformer isolated power supply, T < 40° C A coldplate or a heatsink in an environment with sufficient airflow can be used to achieve the above drive ratings. For temperature operation beyond the standard 0-40° C range, above-listed ratings may change. Contact your PMD representative for additional information on Atlas extended temperature operation including higher temperature drive ratings. 3.1.3 High Power Units (P/Ns MD2x1056/25xB) Specifications* Nominal supply voltage Continuous current Peak current (per phase) Maximum continuous power DC Brush Motor 12-56 VDC 14.0 ADC 25.0 A 670 W Brushless DC Motor Step Motor 12-56 VDC 12-56 VDC 10.0 Arms 9.0 Arms 25.0 A 25.0 A 590 W 610 W * transformer isolated power supply, T < 40° C A coldplate or a heatsink in an environment with sufficient airflow can be used to achieve the above drive ratings. For temperature operation beyond the standard 0-40° C range, above-listed ratings may change. Contact your PMD representative for additional information on Atlas extended temperature operation including higher temperature drive ratings. 3.2 Absolute Maximum Ratings Parameter HV voltage range, low power units HV voltage range, medium power units HV voltage range, high power units ~Enable voltage range SPISI, SPIClk, ~SPICS voltage range SPISO voltage range FaultOut voltage range FaultOut output current 5V output current, low power units 5V output current, medium power units 5V output current, high power units Rating 0 V to +52 V 0 V to +52 V 0 V to +60 V -10 V to +24 V -0.5 V to 6.5 V -0.5 V to 3.7 V -0.3 V to 24 V -35 uA to 50 mA 50 mA 50 mA 100 mA All voltage values are with respect to GND unless otherwise noted. 24 Atlas® Digital Amplifier Complete Technical Reference 3.3 Environmental Ratings Specification Operating ambient temperature Maximum base plate temperature Storage temperature Reflow soldering temperature Humidity Altitude Contamination Value 0 to 40 C 75 C -20 to 85 C 300 C (1.5mm for 10 seconds) 0 to 95%, non-condensing Up to 2,000 meters without derating Pollution Degree 2 Electrical Specifications 3 3.4 Safety and Compliance Specification CE Electrical safety Hazardous materials Flammability Enclosure Standard LVD: EN60204-1 EMC-D: EN61000-6-1, EN61000-6-3, EN55011 Designed to UL508C, UL840 and EN60204-1 RoHS compliant UL94-HB IP20 3.5 DC Characteristics 3.5.1 SPISI, SPIClk Schmitt-trigger Input V+, Positive-going input threshold voltage V-, Negative-going input threshold voltage VT, Hysteresis V+-VIIN, input current Min 1.6 V 0.9 V 0.6 V Max 2.0 V 1.2 V 1.0 V ±1 uA Conditions Input voltage is 5.5 V or GND 3.5.2 SPISO VO, output voltage VOH, Logic 1 output voltage VOL, Logic 0 output voltage IOZ, input current when ~SPICS is "1" Min 0 3.2 V 2.4 V Max 3.3 V 0.1 V 0.7 V 10 uA Conditions IOH=-100 uA IOH=-16 mA IOL=100 uA IOL=16 mA VO = 0 to 3.7 V Atlas® Digital Amplifier Complete Technical Reference 25 3 Electrical Specifications 3.5.3 ~SPICS VIH, Logic 1 input voltage VIL, Logic 0 input voltage IIN, pull-up current Min 2 V TYP Max Conditions 0.8 V -500 uA 3.5.4 ~Enable Schmitt-trigger input V+, Positive-going input threshold voltage V-, Negative-going input threshold voltage VT, Hysteresis V+-V- Min 1.6 V 0.9 V 0.6 V Max 2.0 V 1.2 V 1.0 V Conditions 3.5.5 FaultOut Output impedance with Logic 1 output VOL, Logic 0 output voltage Min 148 Kohm Max 152 Kohm 0.25 V Conditions IOH=-100 uA IOL=10 mA 3.5.6 5V Min Max Voltage tolerance, low power units -5% 5% Voltage tolerance, medium power units -5% 5% Voltage tolerance, high power units -5% 5% Short circuit protection Not available Conditions Output current 0-50 mA Output current 0-50 mA Output current 0-100 mA 26 Atlas® Digital Amplifier Complete Technical Reference 3.6 AC Characteristics Electrical Specifications 3 T1 SPIClk T3 T2 T4 T9 ~SPICS T5 T6 SPISO SPISI data is valid T7 T8 data must be valid See Figure 3-1 for timing numbers. Timing Interval TSPI, SPI clock cycle time Pulse duration, SPIClk high Pulse duration, SPIClk low SPIClk high to SPISO valid delay time SPISO date valid time after SPIClk low SPISI setup time before SPIClk low SPISI valid time after SPIClk low ~SPICS low to first SPIClk high Last SPIClk low to ~SPICS high No. T1 T3 T4 T5 T6 T7 T8 T2 T9 Min 125 nsec (0.5 TSPI-10) nsec (0.5 TSPI-10) nsec 0 nsec 30 nsec (0.5 TSPI-6) nsec 400 nsec 0.5 TSPI Max 30 nsec Figure 3-1: Timing Diagrams 3.7 Pin Descriptions and Pinouts All Atlas units regardless of package size or mounting configuration provide a common set of signals and functions however the pin addresses and number of pins for various functions are different between the ultra compact Atlas units and the compact Atlas units. In addition, the pin addresses are different between the horizontal and vertical mounting configurations for each package size. The following sections provide detailed pinouts for the two Atlas packages; ultra compact and compact, and the two mounting configuration; horizontal and vertical. All Atlas unit pins are 0.1 inch spacing and 0.025inch pin width. Atlas® Digital Amplifier Complete Technical Reference 27 3 Electrical Specifications 3.7.1 Atlas Pinouts - Ultra Compact, Vertical Figure 3-2: Atlas Pinouts Ultra Compact, Vertical 17 15 13 11 9 7 5 3 1 18 16 14 12 10 8 6 4 Pin Name 1 HV 3 Motor A 5 Motor C 7 Motor D 9 NC (No Connect) 11 ~Enable 13 GND 15 SPISO 17 SPIClk/Pulse Pin Name 2 4 Pwr_Gnd 6 Motor B 8 NC (No Connect) 10 NC (No Connect) 12 FaultOut 14 5V 16 ~SPICS/AtRest 18 SPISI/Direction The ultra compact Atlas vertical package is keyed so that it is installation direction dependent. It has no physical pin installed at the Pin #2 location. 3.7.2 Atlas Pinouts - Ultra Compact, Horizontal Figure 3-3: Atlas Pinouts Ultra Compact, Horizontal 65 4321 17 15 13 11 9 7 18 16 14 12 10 8 Pin Name Pin Name 1 Motor D 2 Motor C 3 Motor B 4 Motor A 5 HV 6 Pwr_Gnd 7 SPISI/Direction 8 SPIClk/Pulse 9 SPISO 10 ~SPICS/AtRest 28 Atlas® Digital Amplifier Complete Technical Reference 11 5V 12 13 FaultOut 14 15 GND 16 17 NC (no connect) 18 GND ~Enable NC (no connect) NC (no connect) 3.7.3 Atlas Pinouts - Compact, Vertical Electrical Specifications 3 19 17 15 13 11 9 7 5 3 1 20 18 16 14 12 10 8 6 4 2 Figure 3-4: Atlas Pinouts Compact, Vertical Pin Name Pin Name 1 Pwr_Gnd 2 Pwr_Gnd 3 HV 4 HV 5 Motor A 6 Motor A 7 Motor B 8 Motor B 9 Motor C 10 Motor C 11 Motor D 12 Motor D 13 ~Enable 14 FaultOut 15 5V 16 GND 17 ~SPICS/AtRest 18 SPISI/Direction 19 SPIClk/Pulse 20 SPISO The compact Atlas package provides additional power output via doubling of the HV, Pwr_Gnd, and Motor output pins. To achieve the rated unit power output be sure that both pins are connected. The compact Atlas vertical package is not keyed and therefore care should be taken to install in the correct orientation. 3.7.4 Atlas Pinouts - Compact, Horizontal 11 9 7 5 3 1 12 10 8 6 4 2 Figure 3-5: Atlas Pinouts Compact, Horizontal 22 21 20 19 18 17 16 15 14 13 Atlas® Digital Amplifier Complete Technical Reference 29 3 Electrical Specifications Pin Name 1 Motor D 3 Motor C 5 Motor B 7 Motor A 9 HV 11 Pwr_Gnd 13 5V 15 ~Enable 17 GND 19 SPISO 21 SPIClk/Pulse Pin Name 2 Motor D 4 Motor C 6 Motor B 8 Motor A 10 HV 12 Pwr_Gnd 14 GND 16 FaultOut 18 ~SPICS/AtRest 20 SPISI/Direction 22 GND The compact Atlas package provides additional power output via doubling of the HV, Pwr_Gnd, and Motor output pins. To achieve the rated unit power output be sure that both pins are connected. 3.7.5 Pin Descriptions Pin Name HV Pwr_Gnd Motor A Motor B Motor C Motor D ~Enable FaultOut SPIClk/Pulse SPISO Direction Description DC power to Atlas module, referenced to Pwr_Gnd. The DC power source should be a transformer isolated power supply. For the compact Atlas package two pins carry this signal, so care should be taken to connect both pins. Power return for HV, Motor A, Motor B, Motor C and Motor D. For the compact Atlas package two pins carry this signal, so care should be taken to connect both pins. For greatest EMI protection double shielded cables on the motor winding A, B, C, and D should be used with the inner shield connected to Pwr_Gnd and the outer shield connected to chassis ground. Motor output pin A. Used with Brushless DC, DC Brush, and Step Motors. For the compact Atlas package two pins carry this signal, so care should be taken to connect both pins. Motor output pin B. Used with Brushless DC, DC Brush, and Step Motors. For the compact Atlas package two pins carry this signal, so care should be taken to connect both pins. Motor output pin C. Used with Brushless DC, and Step Motors. For the compact Atlas package two pins carry this signal, so care should be taken to connect both pins. Motor output pin D. Used with Step Motors. For the compact Atlas package two pins carry this signal, so care should be taken to connect both pins. Input ~Enable is an active-low input. Should be tied or driven low for Atlas motor output to be active. Output FaultOut is high impedance when active. It provides programmable fault indication, and is low when inactive. Input SPI input clock or Pulse signal. Pulse is used when Atlas is set to pulse & direction signal mode, and causes a position change command upon a high to low transition. Selection of signal interpretation for this pin is via the SPI communications bus. The default signal interpretation is SPIClk. Output SPI data master in slave out signal. It goes to high impedance when ~SPICS is high. This pin is not used if Atlas is operating in pulse & direction signal mode. 30 Pin Name SPISI/Direction ~SPICS/AtRest GND 5V Electrical Specifications 3 Direction Description Input SPI data master out slave in signal or Direction signal. Direction is used when Atlas is set to pulse & direction signal mode, and indicates the step direction. Low means the position decreases upon a high to low transition of the Pulse signal, and high means the position increases. Selection of signal interpretation for this pin is via the SPI communications bus. The default signal interpretation is SPISI. Input ~SPICS signal or AtRest signal. ~SPICS enables SPI communication when transitioning low. The SPI block is disabled when ~SPICS is high. AtRest is used when Atlas is set to pulse & direction signal mode, and indicates that the step motor holding current should be used rather than the drive current. Selection of signal interpretation for this pin is via the SPI communications bus. The default signal interpretation is ~SPICS. Ground return for ~Enable, FaultOut, SPI or pulse & direction signals and 5V. 5V output used to drive external circuitry. Atlas® Digital Amplifier Complete Technical Reference 31 3 Electrical Specifications 3.8 Signal Interfacing 3.8.1 ~Enable ~Enable and FaultOut signals are typically used to implement a safety interlock between the Atlas module and other portions of the system. ~Enable is an active low input that must be tied or driven low for the Atlas power output to be active. Its input buffer is shown in Figure 3-6. The circuit accepts signals in the range of 0-24V and has TTL compatible, Schmidt trigger thresholds. It has a pull-up to 5V to allow direct interfacing to open collector enable sources without external pull-up resistor and a 1.3kHz R-C low-pass filter to reject noise. Figure 3-6: Signal Interfacing ~Enable ~Enable 5V 5V 10k 22k 5.6n Figure 3-7: Signal Interfacing FaultOut 3.8.2 FaultOut FaultOut is asserted high when a fault occurs. The external controller can select which fault conditions drive the FaultOut signal. An Atlas FaultOut output circuit is shown in diagram Figure 3-7. This circuit can continuously sink 50mA when pulled low. It has a 150kohm pull-up resistor to 5V. Its voltage range is 0 to 24V. 5V 150k FaultOut Q1 32 Atlas® Digital Amplifier Complete Technical Reference 3.9 Connection Overview 3.9.1 Brushless DC Motors Electrical Specifications 3 External Controller Optional Enable FaultOut HV Pwr_Gnd Motor A SPI SPICS SPIClk SPISI SPISO Atlas® Digital Amplifier Motor B Motor C 3 - Phase Brushless DC Motor Optional Hall Sensors Optional Encoder Feedback Hall & Encoder Figure 3-8: Brushless DC Connections The following table summarizes the recommended connections when connecting Atlas amplifiers to brushless DC motors Type Power Communication Motor Miscellaneous Required Connections HV, Pwr_Gnd ~SPICS, SPISO, SPISI, SPIClk, GND Motor A, Motor B, Motor C ~Enable Optional Connections FaultOut If Atlas is used as part of a higher level position controller, as shown in the Figure 3-8, the Brushless DC motor provides feedback signals to the external controller. Commonly, both Hall sensor signals and a position encoder are used, but only one or the other is needed in a minimal configuration. In this configuration the external controller generally consists of a PMD Magellan Motion Processor or a programmable microprocessor or DSP-type device. Alternatively, Atlas can be operated by an external controller as a standalone device, driving the motor at commanded voltage or torque levels and not part of a higher-level servo controller. In this configuration, the external controller can be either a microprocessor-type device, or a logic device such as an FPGA (field programmable gate array). Atlas functions as a power block providing amplification, current control, and safety management of the amplifier and motor. Atlas does not directly accept Hall signals or encoder signals, so to operate with a brushless DC motor the motor's current phase angle must be provided by the external controller through the SPI interface. The Atlas does not support direct Hall signal inputs. To operate the Atlas with a Brushless DC motor, continuous motor phase angle is provided by the external controller, via either Hall inputs or an encoder. Atlas® Digital Amplifier Complete Technical Reference 33 3 Electrical Specifications 3.9.2 DC Brush Motors Figure 3-9: DC Brush Connections Optional External Controller Enable FaultOut HV Pwr_Gnd SPI SPICS SPIClk SPISI SPISO Atlas® Digital Amplifier Motor A Motor B DC Brush Motor Optional Encoder Feedback Encoder The following table summarizes the recommended connections when connecting Atlas amplifiers to DC Brush motors. Type Power Communication Motor Miscellaneous Required Connections HV, Pwr_Gnd ~SPICS, SPISO, SPISI, SPIClk, GND Motor A, Motor B ~Enable Optional Connections FaultOut If Atlas is used as part of a higher level servo controller, as shown in Figure 3-9, an encoder provides position or velocity feedback signals to the external controller. In this configuration the external controller generally consists of a PMD Magellan Motion Processor or a programmable microprocessor or DSP-type device. Alternatively, Atlas can be operated by an external controller as a standalone device, driving the motor at commanded voltage or torque levels. In this configuration the external controller can be either a microprocessor-type device, or a logic device such as an FPGA (field programmable gate array). 34 Atlas® Digital Amplifier Complete Technical Reference Electrical Specifications 3 3.9.3 Step Motors in Pulse & Direction Signal Mode External Controller Enable FaultOut HV Pwr_Gnd Pulse Direction AtRest Motor A Atlas® Digital Amplifier Motor B Motor C Motor D Optional Encoder Feedback 2 - Phase Step Motor Encoder Figure 3-10: Step Motor Pulse and Direction Mode Connections The following table summarizes the recommended connections when connecting Atlas amplifiers to two-phase step motors when using the pulse & direction signal mode. In this mode the external controller provides position commands to Atlas via pulse and direction signals. Type Power Communication Motor, Phase A+: Motor, Phase AMotor, Phase B+: Motor, Phase B-: Miscellaneous Required Connections HV, Pwr_Gnd Pulse, Direction, GND Motor A Motor B Motor C Motor D ~Enable Optional Connections AtRest FaultOut These connections apply to bipolar motors. If connecting to unipolar motors do not connect the center tap. In this configuration the external controller generally consists of an off-the-shelf motion control card or module, a programmable microprocessor or DSP-type device, or a FPGA (field programmable gate array). The external controller provides a continuous stream of pulse and direction commands, along with (optionally) an AtRest signal to control the torque. To initially set up and store its application-specific configuration parameters, Atlas is programmed using the SPI interface and then commanded to convert to pulse & direction signal mode. FaultOut signal input to external controller is strongly recommended when the Atlas is used in Pulse & Direction signal mode. Atlas® Digital Amplifier Complete Technical Reference 35 3 Electrical Specifications 3.9.4 Step Motors Using SPI Communications Figure 3-11: Step Motor SPI Communication Connections Optional External Controller Enable FaultOut HV Pwr_Gnd Motor A SPI SPICS SPIClk SPISI SPISO Atlas® Digital Amplifier Motor B Motor C Motor D Optional Encoder Feedback 2 - Phase Step Motor Encoder The following table summarizes the recommended connections when connecting Atlas amplifiers to two-phase step motors when using the SPI communications channel. In this mode the external controller provides position commands to Atlas via the SPI interface. Type Power Communication Motor, Phase A+: Motor, Phase AMotor, Phase B+: Motor, Phase B-: Miscellaneous Required Signal Connections HV, Pwr_Gnd ~SPICS, SPISO, SPISI, SPIClk, GND Motor A Motor B Motor C Motor D Optional Signal Connections ~Enable FaultOut These connections apply to bipolar motors. If connecting to unipolar motors do not connect the center tap. In this configuration the external controller generally consists of a PMD Magellan Motion Processor, a programmable microprocessor or DSP-type device, or a FPGA (field programmable gate array). The external controller provides a continuous stream of position commands or individual phase torque output commands to control the motor position. 3.10 Heat Sink Grounding The heat sink may be left ungrounded or may be connected to chassis ground for best EMI protection. The heat sink should not be connected to the Atlas Pwr_Gnd. 3.11 Atlas Conversion Factors The following table provides electrical conversion factors for the various Atlas units. These factors convert Atlas command values specified via the Atlas unit's digital SPI interface (referred to as counts) to physical quantities such as amperage or volts, and vice versa. For more information on the Atlas functions related to these conversion factors see Chapter 4, Operation. 36 Atlas® Digital Amplifier Complete Technical Reference Electrical Specifications 3 Unit Amps Volts All Low Power All Medium Atlas Power Atlas .231 mA/count .763 mA/count 1.361 mV/count 1.361 mV/count Temperature .0039°C/count .0039°C/count Foldback Energy .0059 A2sec/count .064 A2sec/count All High Power Atlas 1.526 mA/count 1.361 mV/count .0039°C/count .256 A2sec/count Example Usage To command a torque of 3.5A to the high power Atlas a value of 3,500mA/1.526mA/count = 2,294 counts is specified. A command request to read the Atlas unit's DC Bus voltage gives a value of 12,345. This corresponds to a voltage of 12,345 counts * 1.361 mV/count = 16.8 volts. A command request to read the Atlas unit's internal temperature gives a value of 7,890. This corresponds to a temperature of 7,890 counts * .0039°C/count = 30.8°C. To command a foldback energy of 50A2sec to the high power Atlas a value of 50A2sec/.256 A2sec/count = 195 counts is specified. 3.11.1 Atlas Settings Defaults and Limits The following table provides default and limit values for all Atlas units. Quantity Overtemperature Overtemperature Limit Overtemperature Hysteresis Voltage Overvoltage Limit Undervoltage Limit All Low Power Atlas Default: 75.0°C Low Limit: 0 High Limit: 75.0°C Default: 5.0°C Low Limit: 0 High Limit: 25.0°C Default: 52.0 V Low Limit: 10.0 V High Limit: 52.0 V Default: 10.0 V Low Limit: 10.0 V High Limit: 48.0 V All Medium Power Atlas Default: 75.0°C Low Limit: 0 High Limit: 75.0°C Default: 5.0°C Low Limit: 0 High Limit: 25.0°C Default: 52.0 V Low Limit: 10.0 V High Limit: 52.0 V Default: 10.0 V Low Limit: 10.0 V High Limit: 48.0 V All High Power Atlas Default: Low Limit: High Limit: Default: Low Limit: High Limit: 75.0°C 0 75.0°C 5.0°C 0 25.0°C Default: Low Limit: High Limit: Default: Low Limit: High Limit: 60.0 V 10.0 V 60.0 V 10.0 V 10.0 V 56.0 V Atlas® Digital Amplifier Complete Technical Reference 37 3 Electrical Specifications Quantity Current Foldback Continuous Current Limit, Brushless DC Motor Continuous Current Limit, DC Brush Motor Continuous Current Limit, Step Motor Energy Limit, Brushless DC Motor Energy Limit, DC Brush Motor Energy Limit, Step Motor All Low Power Atlas Default: 2.12 A Low Limit: 0.0 A High Limit: 2.12 A Default: 1.50 A Low Limit: 0.0 A High Limit: 1.50 A Default: 2.12 A Low Limit: 0.0 A High Limit: 2.12 A Default: 2.95 A2sec Low Limit: 0.0 A2sec High Limit: 2.95 A2sec Default: 3.63 A2sec Low Limit: 0.0 A2sec High Limit: 3.63 A2sec Default: 2.95 A2sec Low Limit: 0.0 A2sec High Limit: 2.95 A2sec All Medium Power Atlas Default: 7.07 A Low Limit: 0.0 A High Limit: 7.07 A Default: 7.00 A Low Limit: 0.0 A High Limit: 7.00 A Default: 6.36 A Low Limit: 0.0 A High Limit: 6.36 A Default: 31.9 A2sec Low Limit: 0.0 A2sec High Limit: 31.9 A2sec Default: 32.2 A2sec Low Limit: 0.0 A2sec High Limit: 32.2 A2sec Default: 34.7 A2sec Low Limit: 0.0 A2sec High Limit: 34.7 A2sec All High Power Atlas Default: Low Limit: High Limit: Default: Low Limit: High Limit: Default: Low Limit: High Limit: Default: Low Limit: High Limit: Default: Low Limit: High Limit: Default: Low Limit: High Limit: 14.1 A 0.0 A 14.1 A 14.0 A 0.0 A 14.0 A 12.7 A 0.0 A 12.7 A 127.5 A2sec 0.0 A2sec 127.5A2sec 128.7 A2sec 0.0 A2sec 128.7 A2sec 138.9 A2sec 0.0 A2sec 138.9 A2sec For more information on Atlas overtemperature safety functions see Section 4.8.2, "Overtemperature Fault." For more information on Atlas overvoltage and undervoltage safety functions see Section 4.8.4, "Undervoltage Fault." For more information on Atlas Current Foldback safety functions see Section 4.8.9, "Current Foldback." 38 Atlas® Digital Amplifier Complete Technical Reference 4. Operation 4 In This Chapter Functional Overview Internal Block Diagram Notes on Command Mnemonics Commutation Current Loop Power Stage Status Registers Safety Processing Functions Step Motor Control User Memory Space & Buffers Trace Capture Power-up Non-Volatile (NVRAM) Storage Writing and Reading NVRAM Data SPI Communications Overview 4.1 Functional Overview External Controller Enable FaultOut SPI Command Protocol NVRAM Atlas® Digital Amplifier Brushless DC DC Brush Step Motor Figure 4-1: High Level System Diagram Optional Encoder Feedback Atlas Digital Amplifiers are single-axis devices for torque or voltage-mode control of three-phase brushless DC motors, DC Brush motors, or two-phase step motors. They accept a stream of desired torque or voltage values from an external controller and perform all current loop processing and switching bridge control to continuously drive the motor coils to the specified, commanded values. Atlas® Digital Amplifier Complete Technical Reference 39 4 Operation In addition to providing a stream of torque or voltage commands, the external controller is used to set up operational parameters needed by Atlas such as control gains, safety-related parameters, and other information. These parameters may be provided to Atlas at each power up, or stored non-volatilely on Atlas so that they no longer need to be loaded at each power-up. See Section 4.12, "Power-up" for more information on non-volatile parameter storage. Communication to/from Atlas occurs via an SPI interface and associated protocol that uses packet-oriented commands to specify various Atlas parameters, and, if desired, request status information from Atlas. This protocol has been designed for maximum speed and flexibility so that torque or voltage commands can be continuously sent to Atlas even while the external controller queries Atlas for various information. See Chapter 5, "SPI Communications" for more information on the SPI interface. When Atlas is used in a higher level system such as a servo-based velocity or position controller, torque commands are typically sent to Atlas continuously, at the motion controller's servo rate. For most systems this rate is in the 1,000 to 10,000 samples per second range. However Atlas may also be used with direct voltage or torque control applications that utilize Atlas to specify a desired output value just once after power-up, or only occasionally as required by the application. To disable Atlas operations it may be powered down, the Enable signal may be de-asserted, or various commands that result in Atlas operations being suspended may be sent by the external controller to Atlas through the SPI interface. In addition, there are several conditions where Atlas automatically shuts down for safety-related reasons. These may include short circuit detection, under and over voltage protection, I2t current limiting, and amplifier over temperature detection. See Section 4.8, "Safety Processing Functions" for more information on emergency stop and related functions. 4.2 Internal Block Diagram Figure 4-2: Internal Block Diagram HV 5V SPICS SPIClk SPISI SPISO DC Bus Logic Supply SPI Command Processor Bus Voltage ~Enable FaultOut AtRest Bus Monitoring + 3.3 V Atlas® Control Processor NVRAM Trace RAM Bus Voltage Power Stage Commutation A & Microstep B Control Pulse and Direction Counter Digital A Current Loop B Current Sense A B Motor C Outputs D Pulse Direction 40 Atlas® Digital Amplifier Complete Technical Reference Operation 4 Figure 4-2 shows the internal block diagram of Atlas. Here are summary descriptions of the major modules and functional areas: Commutation--this module utilizes internally generated information, or information provided by the external controller, to split up the desired overall torque command into individual phase commands to drive Brushless DC and step motors. Current Loop--this module inputs the desired current for each motor coil and uses the measured current feedback from each motor coil to develop PWM (pulse width modulation) output command values for the power stage.The current loop module may be disabled, in which case Atlas will drive the motor in voltage mode. See Section 4.5, "Current Loop" for more information on the current loop module. Power Stage--this module receives desired voltages for each motor coil and manages the Atlas unit's high performance MOSFET-based switching bridge to precisely drive the coils of the motor. See Section 4.6, "Power Stage" for a detailed description of this module. Status Registers--this module holds various status registers including an Event Status Register, a Drive Status register, a Drive Fault Status Register, a signal status, and an SPI Status Register. Safety Processing--this module manages Atlas unit safety-related functions including the internal temperature sensor, bus voltage error, the Enable input signal, current foldback, the FaultOut output signal, event action processing, and more. Step Motor Processing--this module implements step motor-specific features including microstep signal generation, holding current management, and Pulse, Direction, and AtRest signal processing. Memory Buffers--this module provides user-accessible memory for trace and setup parameter configuration storage. Trace--this module provides a facility for continuously storing up to four simultaneous Atlas variables in the memory buffers. Power-up & Non-Volatile Initialization Storage--this modules manages the power-up sequence and provides the ability to store selected parameter into the Atlas unit's non-volatile memory. SPI Command Processor--This module, described in the next chapter, manages all communications to/from the external controller. 4.3 Notes on Command Mnemonics For simplicity, throughout this and subsequent chapters, we will use a mnemonic-style nomenclature to indicate external controller commands sent to Atlas. Such commands are sent over an SPI (serial peripheral interface) connection, using a packet-based protocol designed to control all aspects of Atlas unit's operation. Atlas supports over 65 commands through this powerful and flexible protocol. For example, to set the proportional current gain, the command: SetCurrentLoop is used. The actual data packet sent to Atlas to effect the SetCurrentLoop command is a specific sequence of signal states on the SPI data lines, not the mnemonic itself. However to more easily illustrate command sequences, the mnemonic format will be used throughout this manual. See Chapter 5, "SPI Communications" for complete command details, along with other aspects of the SPI protocol. Atlas® Digital Amplifier Complete Technical Reference 41 4 Operation 4.4 Commutation Figure 4-3: Commutation Control Sequence SPI Voltage or Torque Command Motor Output (PWM or DAC) Phase A Command Phase B Command Phase C Command To current loop or power stage Phase Angle Brushless DC motors have three phases (generally referred to as A, B, and C) separated from each other by 120 electrical degrees. The process of splitting up the overall torque command into constituent phase commands is called commutation. Figure 4-3 provides an overview of the control sequence when a brushless DC motor is controlled by Atlas. The first step is that the external controller specifies the desired motor voltage or torque command to the Atlas. This command is then commutated into constituent phase-specific values. This process applies to step motors as well as Brushless DC motors, however for step motors the process is called microstepping. See Section 4.9, "Step Motor Control" for a detailed discussion of step motor control with Atlas amplifiers. DC Brush motors are single phase devices, and do not require commutation. Once commutated, the individual commands for the A, B, and C phases are output either directly to the power stage or to the current loop module (depending on whether current control has been requested). If output to the current loop module, additional calculations are performed using the measured current through each winding to determine a final phase command. See Section 4.5, "Current Loop" for details. 4.4.1 Determining Phase Angle Atlas does not directly accept commutation inputs such as Hall sensors, so phase angle information must be provided by the external controller via the SPI interface. Phase angle in this context means the position of the motor within its overall electrical cycle. Whether or not the electrical phase angle corresponds directly to the mechanical motor angle depends on how many poles the motor has. The most common brushless DC motor configuration has four poles (two pole pairs), meaning it traverses two full electrical cycles for each rotation of the motor. In this example therefore, the mechanical angle would be half of the electrical angle. The phase angle that is provided to Atlas by the external controller is encoded as a 12 bit word, consisting of the instantaneous electrical angle of the rotor. A minimum angle of 0 corresponding to an electrical phase angle of 0.0°, and a maximum value of 4,095 corresponding to a value of 359.9°. Phase angles expressed to Atlas are always positive and have a maximum value of 360.0°. This means a motor that moves in the negative direction from a position angle 42 Atlas® Digital Amplifier Complete Technical Reference Operation 4 of 0.0 will `wrap' around to a value of 360.0°. Conversely, a position angle that moves past 360.0° wraps to a value of 0.0°. To actually send the phase angle to Atlas it is combined with the motor voltage or torque command into a single SPI command packet. Since the phase angle and torque must be provided at each command update cycle, this provides an efficient approach for continuously transmitting Brushless DC motion command packets. See Chapter 5.3, "Sending a Voltage or Torque Output Value" for complete word format and protocol information. 4.4.2 Phasing with Hall Sensors As the previous section indicates, to control a Brushless DC motor the external controller continuously provides phase information to Atlas. Typically, the external controller utilizes either Hall sensors or position encoders to determine this information. If the external controller directly inputs Halls converting the three incoming hall signal states to a commanded phase angle is straightforward. The table shows how to convert an instantaneous hall sensor reading for the most common Hall encoding scheme to an output command phase angle sent to Atlas over the SPI interface. Hall A 0 1 1 1 0 0 Hall B 0 0 0 1 1 1 Hall C 1 1 0 0 0 1 Phase angle to send to Atlas in degrees 0° 60° 120° 180° 240° 300° 12-bit phase angle word 0 683 1,365 2,048 2,731 3,413 Atlas® Digital Amplifier Complete Technical Reference 43 4 Operation 4.4.3 Phasing with an Encoder Figure 4-4: Phasing Reference Signals Phase Currents A B C A-B B-C C-A Phase-tophase BEMF Votages Hall A Hall B Hall C Phase 180 240 300 0 Angle in degs 60 120 180 Figure 4-4 shows the relationship between a range of references signals such as Hall signals, and common manufacturer-provided motor control waveforms. Note that these waveforms apply when the motor torque command is positive. If negative, the sign of the "Phase Currents" and "Phase to phase BEMF Voltages" is inverted. If the external controller uses an encoder to update the phase angle, the phase angle can be sent to Atlas with significantly finer resolution than with Hall sensors (which resolve only to within 60 electrical degrees). Greater commutation resolution allows the motion to be smoother and more efficient. However there are a few important considerations when using an encoder for commutation compared to Hall sensors. The first is that care should be taken to correctly update the phase angle at the encoder wraparound point. This is the point at which the largest encoder value transitions to the smallest, or vice versa (depending on the motor direction). At these points, the phase angle must still be smoothly and correctly updated as if an encoder wrap had not occurred. The second is that if an incremental encoder is used and there is the possibility of losing counts, it is important that this be corrected by the external controller. The most common approach toward accomplishing this is to utilize the encoder's Index pulse signal to record a fixed phase angle for the motor, and thereafter compare the incremental encoder reading at each occurrence of the Index pulse. Please refer to the Magellan Motion Processor User's Manual for more information on this technique. The third is known as phase initialization. In the case of incremental encoders, at power-up there is no explicit correlation between the encoder position and the rotor angle, therefore the phasing must be initialized. By contrast, 44 Atlas® Digital Amplifier Complete Technical Reference Operation 4 for absolute encoders or certain measuring devices such as resolvers, the phasing may be explicitly known from the encoder angle. Consult the manufacturer's data sheet for more information. 4.4.4 Phase Initialization for Incremental Encoders If an incremental encoder is used to provide continuous phase angle information to Atlas, some method is needed to correlate measured motor angles with phase angle. There are a few commonly used approaches to accomplish this. The first and simplest is to use Hall sensors. Upon initialization, the table in Section 4.4.2, "Phasing with Hall Sensors" is used to set up the phase angle. As the motor rotates thereafter, the encoder updates the phase angle. For highest accuracy, the phase angle at the transition of one Hall state to another is used. In this manner the initial accuracy, equal to one Hall state width of 60° can be improved to just a few electrical degrees, depending on how accurately the Hall sensors were originally aligned by the motor manufacturer. If Hall sensors are not available, a technique called algorithmic initialization can be used. In this approach, the brushless DC motor coils are energized in a specific sequence and the resultant motor reactions are used to determine the initial phase angle. Particularly for free-wheeling motors such as spindles, centrifuges, fans, and similar devices, this approach can work well. However a detailed discussion of this is beyond the scope of this manual, so consult your PMD representative for more information. 4.5 Current Loop The next section describes a number of concepts that apply even when the current loop is not enabled. All Atlas users should therefore read this section, whether they plan to operate the Atlas with a current loop, or without a current loop in voltage mode. Voltage Command Current Command P Proportional I Integral I limit Figure 4-5: Current Loop Control Flow Foldback Processing Power Stage to motor coil Measured Current Digital current control is a technique used with DC brush, brushless DC, and step motors for precisely controlling the current through each winding of the motor. By controlling the current, response times are improved and motor efficiency is increased. Figure 4-5 provides an overview of Atlas unit's current controller. For single-phase motors such as DC brush, one current loop per axis is used. For brushless DC motors, two current loops are used and the third phase command is Atlas® Digital Amplifier Complete Technical Reference 45 4 Operation derived from the other two phases. When driving step motors, two current loops are used, one for the phase A coil, and one for the phase B coil. There are three overall methods of current control provided by Atlas, however not all methods are used with all motor types. The first method is individual phase control. See Section 4.5.2, "Individual Phase Control" for a description. See Section 4.5.3, "Field Oriented Control" for a description of the second method, FOC (Field Oriented Control). See Section 4.5.4, "Third Leg Floating Control" for a description of the third approach, called `third leg floating.' The table below summarizes which current control modes are available with the three motor types supported by Atlas, along with the default configuration for that motor type. Current Control Method Individual Phase Control Field Oriented Control Third Leg Floating Brushless DC (default) DC Brush (default) Step Motor (default) The large majority of applications will use FOC to drive Brushless DC or step motors. FOC usually provides the highest top speeds and more energy efficient operation of the motor compared to individual phase control. Third leg floating is an option that should generally only be considered for Hall-commutated motors. In that configuration, third leg floating can sometimes provide a higher top speed than FOC. Finally, individual phase control is always used with DC Brush motors, and may, under certain specialized conditions, provide improved performance for Brushless DC motors over FOC. To select which type of control method will be used, use the command SetCurrentControlMode. To read the value set using this command, use GetCurrentControlMode. 4.5.1 Enabling and Disabling the Current Loop If during normal operation the current loop is disabled, then the output from the commutation module will pass directly to the power stage module, with no current control being performed. The most common use of this is to run the amplifier in voltage mode, which may be useful under some conditions for calibration or testing. Even when operated in the voltage mode, the user must still select the current control method. This is because selection of this control method also affects aspects of the power stage, specifically the use of space vector PWM, versus sinusoidal PWM, versus standard single-phase PWM generation. To disable the motor output module the command SetOperatingMode is used. The value set using this command can be read using GetOperatingMode. A previously disabled current loop module may be re-enabled in a number of ways. If output was disabled using the SetOperatingMode command, then another SetOperatingMode command may be issued. If disabled as part of an automatic safety event-related action (see Section 4.8.9, "Current Foldback" for more information), then the command RestoreOperatingMode is used. The default condition of the current loop module is disabled, therefore to begin motor operations, the external controller must send a SetOperatingMode command enabling the current loop module. 46 Atlas® Digital Amplifier Complete Technical Reference Operation 4 To read the instantaneous actual state of the operating mode, the command GetActiveOperatingMode is used. 4.5.2 Individual Phase Control Command Reference Error 2 Kp 64 ILimit PWM Limit Output Figure 4-6: Individual Phase Control Calculation Flow < > 256 Ki 256 Integrator Sum Anti Windup -1 Z Actual Current When individual phase control mode is selected Atlas utilizes the commanded current for each motor winding provided by the commutation module, along with the actual measured current provided by circuitry within the power stage, to perform current loop calculations. As can be seen in Figure 4-6, the desired current and measured current are subtracted to develop a current error, which is passed through a PI (proportional, integral) filter to generate an output voltage command for each motor coil. The output command for each coil is then passed to the power stage module to generate precise PWM (pulse width modulation) output signals, representing the applied voltage, that control the power stage's switching bridge. To enable individual phase control the command SetCurrentControlMode is used. The value set using this command can be read back using GetCurrentControlMode. Three parameters are set by the user to control the current loop; Kp, Ki, and Ilimit. Two of these are gain factors for the PI controller, and the other is a limit for the integral contribution. To set any of these three parameters the command SetCurrentLoop is used. To read back these parameters, the command GetCurrentLoop is used. For multi-phase motors, the values for the phase A and B loops can be set independently while for single-phase DC brush motors, only the phase A loop parameters are used. The values set using this command are buffered, meaning they are held by Atlas in a buffer but do not instantaneously become active. Buffered commands are activated using the SPI Header. See Section 5.2, "Packet Header" for details. It is the responsibility of the user to determine control parameters that are suitable for use in a given application. Atlas® Digital Amplifier Complete Technical Reference 47 4 Operation 4.5.2.1 Reading Current Loop Values To facilitate tuning there are a number of current loop values that can be read back as well as traced. To read back these values the command GetCurrentLoopValue is used. See Section 4.11.1.3, "Trace Variables" to specify these values for trace during automatic trace capture. The variables within the current loop that can be read or traced when the control loop mode is set to individual phase control are summarized in the following table. Refer to Figure 4-6 when viewing this table. Variable Name Phase A Reference, Phase B Reference Phase A Current, Phase B Current, Phase C Current Phase A Error, Phase B Error Phase A Integrator Sum, Phase B Integrator Sum Phase A Output, Phase B Output Function Brushless DC & microstepping motor: These registers hold the commanded (reference) currents for the phase A and phase B coils. DC Brush motor: Phase A Current holds the commanded (reference) current for the motor. Brushless DC: These registers hold the measured actual currents for the phase A, phase B, and phase C coils. Step motor: These registers hold the measured currents for the phase A, and phase B coils. DC Brush motor: Phase A Current holds the measured current for the motor. Brushless DC & microstepping motor: These registers hold the difference between the current loop reference and the measured current value (Phase A Current, Phase B Current). DC Brush motor: The Phase A Error register holds the difference between the current reference and the measured current value (Phase A Current). Brushless DC & microstepping motor: These registers hold the sum of the integrator for the phase A and B current loops. DC Brush motor: Phase A Integrator Sum holds the sum of the integrator for the current loop Brushless DC & microstepping motor: These registers hold the output command for the phase A and B current loop. DC Brush motor: Phase A Output holds the output command for the current loop 4.5.2.2 Individual Phase Control with Step Motors The Atlas unit's individual phase control mode is designed to work with both 3-phase brushless DC motors and 2phase step motors. When operating step motors in this mode (see Section 4.9, "Step Motor Control" for more information on operations with step motors), the basic method is identical. The same three current loop parameters described in Section 4.5.2, "Individual Phase Control" are set, and the readable parameters are also the same. 4.5.2.3 Individual Phase Control in Voltage Mode If Atlas is operated in individual phase control mode with the current loop disabled, then after commutation (Brushless DC motors) or microstep signal generation (step motors) the phase-specific commands are output directly to the power stage with no current loop performed. For example, if the incoming torque command provided by the external controller is 25% full scale, then for an Atlas that is operating with a bus voltage of 24V, the average voltage presented at the motor coil will be 25% of 24V or 6V. 48 Atlas® Digital Amplifier Complete Technical Reference Operation 4 For single phase motors such as DC Brush, the PWM generator directly outputs this external controller-commanded value to the power stage. For multi-phase motors such as brushless DC or step motor, the PWM generator outputs this commanded value after commutation (brushless DC motors) or microstep signal generation (step motors) to the power stage. See Section 4.6, "Power Stage" for more information on power stage operations. 4.5.3 Field Oriented Control Motor Command qReference 2 qFeedback dReference 0 (zero) dFeedback Kpq qError Kiq Kpd dError Kid 64 qOutput ILimitq 256 256 q Integrator sum -1 Z 64 AOutput Inverse Park Transform BOutput dOutput ILimitd 256 256 d Integrator sum Figure 4-7: Field Oriented Control Calculation Flow -1 Z Phase Angle Clarke, Park Transform Phase A Actual Current Phase B Actual Current Figure 4-7 provides an overview of the calculation flow when field oriented control (FOC) is selected. Instead of separating phases as individual phase control mode does, FOC combines them and "re-references" them to what are known as d (direct torque) and q (quadrature torque) reference frames. To enable field oriented control mode the command SetCurrentControlMode is used. The value set using this command can be read back using GetCurrentControlMode. For each control loop (d and q) three parameters are set by the user, Kp, Ki, and I limit. Two of these are gain factors for the PI (proportional, integral) controller that comprises the heart of the FOC controller, and the other is a limit for the integral contribution. Atlas® Digital Amplifier Complete Technical Reference 49 4 Operation To set these parameters the command SetFOC is used. To read back these parameters the command GetFOC is used. The values set using this command are buffered and are activated using the SPI header. See Section 5.2, "Packet Header" for details. It is the responsibility of the user to determine control parameters that are suitable for use in a given application. 4.5.3.1 Reading FOC Loop Values To facilitate tuning there are a number of FOC loop values that can be read back as well as traced. To read back these values the command GetFOCValue is used. See Section 4.11, "Trace Capture" to specify these values during automatic trace capture. Refer to Figure 4-7 for an overview of the FOC loop. The variables within the FOC loop that can be read or traced are summarized as follows: Variable Name q Reference, d Reference q Feedback, d Feedback q Error, d Error q Integrator Sum, d Integrator Sum q Output, d Output FOC Output, FOC Output Phase A Actual Current, Phase B Actual Current Function Are the commanded values input into the q and d loops. Note that d is always set to 0 (zero). Are the measured values for the q (quadrature) and d (direct) force after re-referencing from the actual measured current in the phase A, phase B coils. Are the differences, for the q loop and the d loop, between the loop reference and the loop measured value. Are the integrator sums for the d and q loops. Are the output commands of the q and the d loops. Are the FOC outputs in the , reference frame. Are the measured currents for the phase A and phase B coils. 4.5.3.2 FOC with Step Motors The Atlas unit's field oriented control algorithm is designed to work with both 3-phase brushless DC motors and 2phase step motors. When operating step motors in this mode (see Section 4.9, "Step Motor Control" for more information on operations with step motors), the basic method is identical. The same three FOC parameters described in Section 4.5.3, "Field Oriented Control" are set, and the readable parameters are also the same. 4.5.3.3 FOC in Voltage Mode If Atlas is operated in FOC mode with the current loop disabled, then after commutation (Brushless DC motors) or microstep signal generation (step motors) the phase-specific commands are output directly to the power stage with no current loop performed. However unlike the independent phase control mode, a space vector modulation scheme is used to generate the PWM signals and control the switching bridge. Space vector modulation is recommended for most applications because it provides a larger effective range of voltage drive capacity. See Section 4.6, "Power Stage" for more information on power stage operations. 50 Atlas® Digital Amplifier Complete Technical Reference 4.5.4 Third Leg Floating Control Operation 4 Kp qReference Command qError Ki 2 64 ILimit 256 256 q Integrator sum PWM Limit q Output Sel. < > A Output B Output C Output Figure 4-8: Third Leg Floating Control Anti Windup -1 Z Actual Current Leg A Current Sel. Leg B Current Leg C Current Figure 4-8 provides an overview of the calculation flow when third leg floating control mode is selected. Compared to individual phase control or FOC, third leg floating uses a different method in that only two of three legs are driven at any instant with the third, non-driven, leg floating. The actual driven and non-driven legs continuously change based on the phase, as does the leg current used as input to the current loop. In this way, as the motor rotates, each motor leg will go through a sequence of being driven for two cycles and then left floating for one. To enable third leg floating mode the command SetCurrentControlMode is used. The value set using this command can be read back using GetCurrentControlMode. Other than the method by which the motor phases are driven and the leg current is sensed, third leg floating is similar to FOC, however with only the q loop calculated. For the q current loop three parameters are set by the user, Kp, Ki, and Ilimit. Two of these are gain factors for the PI (proportional, integral) controller that comprises the heart of the third leg floating controller, and the other is a limit for the integral contribution. To set any of these parameters the command SetFOC is used. To read back these parameters the command GetFOC is used. The values set using this command are buffered and may be activated using the update bit of the SPI header. See Section 5.2, "Packet Header" for more information on command buffering. It is the responsibility of the user to determine control parameters that are suitable for use in a given application. The third leg floating control mode is applicable to Brushless DC motors only. Atlas® Digital Amplifier Complete Technical Reference 51 4 Operation 4.5.4.1 Reading Third Leg Floating Loop Values To facilitate tuning there are a number of third leg floating loop values that can be read back as well as traced. To read back these values the command GetFOCValue is used. See Section 4.11.1.3, "Trace Variables" to specify these values for trace. Refer to the diagram in Section 4.5.4, "Third Leg Floating Control" for an overview of the control loop. The variables that can be read or traced are summarized as follows: Variable Name q Reference q Feedback q Error q Integrator sum q Output q Actual Current Function Is the commanded value input into the q loop. Is the measured value of the q component of the current Is the difference between the measured q component of the current and the commanded q component. Is the integrator sum for the q loop. Is the output command of the q loop Is the measured current for the q current 4.5.4.2 Third Leg Floating in Voltage Mode If Atlas is operated in third leg floating mode with the current loop disabled then the external controller-provided torque command is used to specify PWM duty cycle (voltage) to two out of the three motor output terminals, one positive and one negative. The third terminal is put into a high impedance (floating) state. Which terminal is positive, negative, or floating depends on the controller-provided phase angle. 4.6 Power Stage Atlas contains a high performance MOSFET-based power stage that utilizes one or more switching bridges to drive the motor coils. The use of 3-phase and H-bridge topologies provides full 4-quadrant operation for all motor types. In addition, Atlas uses an advanced PWM switching scheme that minimizes the ripple current on the motor windings while maximizing the current loop performance. The fundamental frequency of the ripple current is twice the PWM frequency, and well out of the audible range in all cases. The PWM frequency is selectable between 20 kHz, 40kHz, 80kHz, and 120kHz to cover a broad range of motor inductances. In addition to the output bridge function, Atlas provides a current measurement function for use by the current loop module as well as by the safety processing module. Two channels of phase current feedback are provided for brushless DC and step motor current loops. For DC Brush motors feedback for one phase is provided. To set the Atlas unit's PWM rate the command SetPWMFrequency is used. To read this value, the command GetPWMFrequency is used. 52 Atlas® Digital Amplifier Complete Technical Reference Operation 4 PWM output selection · sinusoidal · space vector · single-phase Voltage command Phase A from current loop or SPI Phase B interface A B PWM Control C D Clock PWM bridge signal generator Figure 4-9: Power Stage +HV Control Flow AH pre- driver to AL coil pre- driver Only A bridge shown for clarity Mtr_Gnd In addition to the output bridge function, Atlas provides a current measurement function for use by the current loop module as well as by the safety processing module. Two channels of phase current feedback are provided for brushless DC and step motor current loops. For DC Brush motors feedback for one phase is provided. Three selectable control methods are provided; independent phase, field oriented control, and third leg floating. The choice of control method affects the power stage in the selection of the PWM generation technique. The table below shows this. Control Mode Independent Phase Field Oriented Control Third Leg Floating PWM Output Method sinusoidal space vector modulation standard single-phase To select the control method use the SetCurrentControlMode command. To read the value set using this command use GetCurrentControlMode. 4.6.1 PWM Output Limiting In some applications it may be desirable to limit the maximum allowed output of the power stage PWM generator. For example if the bus voltage is 36 volts, and the desired voltage limit for a particular motor is 18 volts, a PWM limit of 50% is programmed. Depending on the Atlas unit bus voltage and the effective inductance of the system being controlled, under some circumstances lowering the maximum PWM duty cycle may not fully limit the effective voltage experienced by the device. If this is the case for your system, you may consider increasing the Atlas unit PWM frequency, adding an inductor to the motor circuit, or consulting a PMD representative for more information. Atlas® Digital Amplifier Complete Technical Reference 53 4 Operation To set the PWM limit value the command SetDrivePWM is used. To read this value back the command GetDrivePWM is used. The programmed drive limit value affects the PWM duty cycle only. It does not limit the effective current that is delivered to the motor. To explicitly limit the current, the current foldback mechanism can be used. See Section 4.8.9, "Current Foldback" for more information. 4.6.2 Disabling the Power Stage During normal operation the Atlas unit's primary function is to drive the motor at the torque or voltage requested by the external controller. However there are a number of circumstances where it may be desirable to disable the power stage. In particular, the power stage may be disabled if certain safety-related conditions occur, or for system calibration. See Section 4.8, "Safety Processing Functions" for more information on Atlas safety processing. If the power stage module is disabled, all external controller-provided voltage or torque commands are ignored, and all bridge FETs are turned off. This has the effect of "free-wheeling" the motor, which means the motor may stop, coast, or even accelerate (if a constant external force exists such as a gravitational load) depending on the load, inertia, and configuration of the axis mechanics. To disable the power stage module the command SetOperatingMode is used. The value set using this command can be read using GetOperatingMode. The default condition of the power stage is disabled. Therefore to begin drive operations, a SetOperatingMode command must be sent to enable the drive stage module. 4.6.3 Enabling the Power Stage A previously disabled power stage module may be re-enabled in a number of ways. If output was disabled using the SetOperatingMode command, then another SetOperatingMode command may be issued. If this module was disabled as part of an automatic safety event-related action (see Section 4.8.9.3, "Current Foldback Event Processing" for more information), then the command RestoreOperatingMode is used. To read the instantaneous actual state of the operating mode the command GetActiveOperatingMode is used. Regardless of how the module is re-enabled, at the time that the re-enable operation is requested, the power stage module will begin normal operations within approximately 1.0 milliseconds. Care should therefore be taken to reenable the power stage when the motor axis is in a stable condition such that no abrupt motion occurs. If Atlas is in a condition where the current loop module also needs to be re-enabled, both the power stage and the current loop module should be enabled at the same time. This is normally the case when recovering from all safety processing conditions. See Section 4.8, "Safety Processing Functions" for more information. It is the responsibility of the user to manage the operation of the power stage so that appropriate safety conditions are maintained at all times. 54 Atlas® Digital Amplifier Complete Technical Reference 4.7 Status Registers Operation 4 In addition to various numerical registers that may be queried by the external controller, there are five bit-oriented status registers. These status registers conveniently combine a number of separate bit-oriented fields into a single register. These registers are Event Status, Drive Status, Signal Status, SPI Status, and Drive Fault Status Register. The external controller may directly query these four registers, or the contents of these registers may be utilized by other functional portions of Atlas, such as FaultOut signal processing. See Section 4.8.8, "FaultOut Signal" for more information on FaultOut processing. 4.7.1 Event Status Register The Event Status register is defined in the following table: Bit Name 0-6 Reserved 7 Instruction error 8 Reserved 9 Overtemperature fault 10 Drive exception 11 12 13-15 Reserved Current foldback Reserved Description May contain 0 or 1. Set when an instruction error occurs. This may be due to an incorrect command transmission, an Atlas-detected checksum error, or various other SPI interface command-related conditions. May contain 0 or 1. Set when an overtemperature fault occurs. Set when a drive exception event such as bus voltage fault, watchdog timer fault, overcurrent fault, or deassertion of the enable pin occurs that causes Atlas to disable output. May contain 0 or 1. Set when current foldback occurs. May contain 0 or 1. The command GetEventStatus returns the contents of the Event Status register. Bits in the Event Status register are latched. Once set, they remain set until cleared by an external controller instruction or a reset. Event Status register bits may be reset to 0 by the instruction ResetEventStatus, using a 16-bit mask. Register bits corresponding to 0s in the mask are reset; all other bits are unaffected. 4.7.2 Drive Status Register The Drive Status register is different than the Event Status register in that the contents are not latched, but rather continuously set and reset by Atlas to indicate the status of the corresponding conditions. The specific status bits provided by the Drive Status register are defined in the following table: Bit Name 0 Reserved 1 In foldback 2 Overtemperature 3 Reserved 4 In holding 5 Overvoltage Description May contain 0 or 1. Set 1 when in foldback, cleared 0 if not in foldback. Set 1 when currently in an overtemperature condition. Cleared 0 if currently not in an overtemperature condition. May contain 0 or 1. Set 1 when in a holding current condition. Cleared 0 if not in a holding current condition. Set 1 when currently in an overvoltage condition. Cleared 0 if currently not in an overvoltage condition. Atlas® Digital Amplifier Complete Technical Reference 55 4 Operation Bit Name 6 Undervoltage 7 Disabled 8-11 Reserved 12 Output clipped 13-14 Reserved 15 Drive not initialized Description Set 1 when currently in an undervoltage condition. Cleared 0 if currently not in an undervoltage condition. Set 1 when the Atlas unit's Enable pin is inactive. Cleared 0 when the Atlas unit's Enable pin is active. May contain 0 or 1. Set 1 when current loop output clipping is occurring. This occurs when the PWM limit value becomes the output of the current loop due to the fact that the desired output value of the current loop exceeds the PWM Limit value. Cleared 0 when output clipping is not occurring. May contain 0 or 1. Upon powerup this bit is set to 1. Cleared 0 when Atlas has finished its power-up initialization sequence and is ready for normal SPI command processing. The command GetDriveStatus returns the contents of the Drive Status register. 4.7.3 Signal Status Register The Signal Status register provides real-time signal levels for some Atlas hardware signals. The Signal Status register is defined in the following table: Pin Name 0-12 Reserved 13 Enable pin 14 FaultOut pin Description May contain 0 or 1. Set 1 when a high voltage is present at the Enable pin (enabled). Cleared 0 when there is a low signal (disabled). Set 1 when a high voltage is being output at the FaultOut pin (fault condition present). Cleared 0 when there a low is being output (fault condition not present). The command GetSignalStatus returns the contents of the Signal Status register. 4.7.4 SPI Status Register The SPI Status Register is used during SPI communications to provide a quick summary status of the overall Atlas amplifier. See Chapter 5, "SPI Communications" for more information on SPI communications processing. There is no way to set or clear the bits in this register. The bits in this register simply echo an amalgam of bits in various other status registers, as noted in the table below. To change the value of these bits it is therefore necessary to utilize the commands that are associated with those particular status registers. The SPI Status register is defined in the following table: Bit Name 0 In foldback 1 Overtemperature 2-3 Reserved 4 Overvoltage 5 Undervoltage Description Echoes the in foldback bit of the Drive Status register. Set 1 when in foldback, cleared 0 if not in foldback Echoes the overtemperature bit of the Drive Status register. Set 1 when currently in an overtemperature condition. Cleared 0 if currently not in an overtemperature condition. May contain 0 or 1. Echoes the overvoltage bit of the Drive Status register. Set 1 when currently in an overvoltage condition. Cleared 0 if currently not in an overvoltage condition. Echoes the undervoltage bit of the Drive Status register. Set 1 when currently in an undervoltage condition. Cleared 0 if currently not in an undervoltage condition. 56 Atlas® Digital Amplifier Complete Technical Reference Operation 4 Bit 6 7 8 9 10 11 12 13-15 Name Disabled Instruction error Reserved Over temperature event Drive exception event Output clipped Foldback event Reserved Description Echoes the Disabled bit of the Drive Status register. Set 1 when the Enable pin is inactive. Cleared 0 when the Enable pin is active. Echoes the Instruction error bit of the Event Status register. Set 1 when an instruction error occurs. This may be due to an incorrect command transmission, an Atlas-detected checksum error, or various other SPI interface command-related conditions. May contain 0 or 1 Echoes the overtemperature bit of the Event Status register. Set 1 when an overtemperature fault occurs. Echoes the drive exception bit of the Event Status register. Set 1 when a drive exception event such as bus voltage fault, watchdog timer fault, over current fault, occurs that causes Atlas to disable output. Echoes the output clipped bit of the Drive Status register. Set 1 when current loop output clipping is occurring. Cleared 0 when output clipping is not occurring. Echoes the foldback bit of the Event Status register. Set 1 when current foldback occurs. May contain 0 or 1. The SPI Status Register is not directly read via an Atlas command. It is read as part of SPI header processing. See Section 5.2.1, "Header Return Words" for more information. In addition, it may be selected as a traceable variable. See Section 4.11, "Trace Capture" for more information on tracing. 4.8 Safety Processing Functions Atlas provides a number of amplifier control features that automatically detect and manage safety-related conditions. In addition, Atlas can signal when various conditions, safety or otherwise, occur. The subsequent sections describe these features. 4.8.1 Overcurrent Fault Atlas supports automatic detection of excessive current output. This fault occurs when the motor, the wiring leading from Atlas, or Atlas unit's power stage becomes short circuited. An overcurrent fault will cause the following events to occur: · The current loop and power stage modules are disabled, thereby halting further motor output. · The Drive Fault Status register records an overcurrent fault condition. · The Event Status register records a drive exception condition. To recover from this condition the user should determine the nature of the fault using the GetDriveFaultStatus command. It may be desirable to power down Atlas to check connections or otherwise correct the Atlas-attached hardware so that the problem does not occur again. If the condition is resolved but Atlas is not power cycled, the following sequence should be used to restore the drive to normal operation: · Clear the fault condition using the ClearDriveFaultStatus command. · Clear the drive exception bit of the Event Status word using the ResetEventStatus command. It is not possible to re-enable the current loop or the power stage module if the drive exception bit is still active. Atlas® Digital Amplifier Complete Technical Reference 57 4 Operation · Re-enable the current loop and power stage modules using the RestoreOperatingMode command. If the overcurrent condition has been resolved, at the end of this sequence Atlas will resume normal operations. If the overcurrent condition has not been resolved, the overcurrent condition will immediately occur again, and the recovery sequence described above must be undertaken again. Over current faults are serious conditions and warrant the utmost precaution before re-enabling amplifier operation. It is the responsibility of the user to determine the cause and corrective action of any electrical fault. 4.8.2 Overtemperature Fault Atlas provides the capability to continually monitor and detect excessive internal temperature conditions. Such a condition may occur if excessive current is requested, if heat sinking of the Atlas unit is inadequate, or if some other problem results in elevated drive temperatures. To detect this condition a programmable temperature threshold is continuously compared to an internal temperature sensor. If the value read from the internal sensor exceeds the programmed threshold, an overtemperature fault occurs. In addition, a settable overtemperature hysteresis allows the user to ensure that the Atlas temperature drops by a specified number of degrees before allowing drive restart. To set the programmable temperature threshold or the programmable temperature hysteresis the command SetDriveFaultParameter is used. To read back these values the command GetDriveFaultParameter is used. The maximum allowed setting for the temperature threshold is 75.0° C, which is also the default value. The value set using the SetDriveFaultParameter command is in units of degrees C/256. For example, a value of 12,800 sets a threshold of 50° C. The maximum allowed value of the hysteresis parameter is 50° C, and the default value is 5° C. An over temperature fault will cause the following events to occur: · The current loop and power stage modules are disabled, thereby halting further motor output. · The Drive Fault Status register records an overtemperature fault condition. · The Event Status register records a drive exception condition. To recover from this condition the user should determine the nature of the fault using the GetDriveFaultStatus command. It may be desirable to power down Atlas to correct the condition. If the condition is resolved but Atlas is not power cycled, the following sequence should be used to restore the drive to normal operation: · Clear the fault condition using the ClearDriveFaultStatus command. · Clear the drive exception bit of the Event Status word using the ResetEventStatus command. It is not possible to re-enable the current loop or the power stage module if the drive exception bit is still active. · Re-enable the current loop and power stage modules using the RestoreOperatingMode command. If the overtemperature condition has been resolved, at the end of this sequence Atlas will resume normal operations. If the overtemperature condition has not been resolved, the condition will immediately occur again, and the sequence described above should be undertaken again. The instantaneous status of the overtemperature threshold comparison can be read using the command GetDriveStatus. 58 Atlas® Digital Amplifier Complete Technical Reference To read the current value of the temperature sensor the command GetTemperature is used. Operation 4 Overtemperature faults indicate that the internal safe limit of the drive temperature range has been exceeded. This potentially serious condition can result from incorrect motor connections, excessive power demands placed on the Atlas amplifier, or inadequate heat sinking. It is the responsibility of the user to operate Atlas within safe limits. 4.8.3 Overvoltage Fault Atlas provides the capability to continually monitor and detect excessive voltages on the incoming voltage supply. Such a condition may occur if there is a fault in the system power supply, if a large back EMF (electro motive force) is generated during motor deceleration, or if some other problem results in an elevated bus voltage. To detect this condition a programmable bus voltage threshold is continuously compared to the bus voltage sensor. If the value read from the internal sensor exceeds the programmed threshold, an overvoltage fault occurs. To read the current value of the bus voltage the command GetBusVoltage is used. To set the programmable overvoltage threshold the command SetDriveFaultParameter is used. To read back this value the command GetDriveFaultParameter is used. The maximum allowed setting for the overvoltage threshold is either 52.0 or 60.0 volts depending on the Atlas unit used. The minimum allowed threshold is 10.0 volts. The value set using the SetDriveFaultParameter command is in units of 1.361 mV/count. For example, a value of 14,695 sets a threshold of 14,695 * 1.361 mV/count = 20.00 volts. See Section 3.11.1, "Atlas Settings Defaults and Limits" for a complete list of Atlas limits and default temperature settings. An overvoltage fault will cause the following events to occur: · The current loop and power stage modules are disabled, thereby halting further motor output. · The Drive Fault Status register records an overvoltage fault condition. · The Event Status register records a drive exception condition. To recover from this condition the user should determine the nature of the fault using the GetDriveFaultStatus command. In most cases it is desirable to power down Atlas to correct the condition. If the condition is resolved but Atlas is not power cycled, the following sequence should be used to restore the drive to normal operation: · Clear the fault condition using the ClearDriveFaultStatus command. · Clear the drive exception bit of the Event Status word using the ResetEventStatus command. It is not possible to re-enable the current loop or the power stage module if the drive exception bit is still active. · Re-enable the current loop and power stage modules using the RestoreOperatingMode command. If the overvoltage condition has been resolved, at the end of this sequence Atlas will resume normal operations. If the overvoltage condition has not been resolved, the condition will immediately occur again, and the sequence described above should be undertaken again. Atlas® Digital Amplifier Complete Technical Reference 59 4 Operation The instantaneous status of the overvoltage threshold comparison can be read using the command GetDriveStatus. Overvoltage faults indicate that a serious safety condition has occurred. It is the responsibility of the user to operate Atlas within safe limits. 4.8.4 Undervoltage Fault Atlas also provides the capability to sense undervoltage conditions. To set the programmable threshold the command SetDriveFaultParameters is used. This value is compared to the value read from the drive DC bus, and if the value read is less than the programmed threshold, an undervoltage fault occurs. See Section 3.11.1, "Atlas Settings Defaults and Limits" for a list of undervoltage-related limits and defaults. Threshold units, recovery procedure, and all other aspects of this feature are the same as for overvoltage sense except that the bit status location in the Drive Fault Status register is different. Just as for overvoltage conditions, it is the user's responsibility to determine the seriousness of, and appropriate response to, an undervoltage condition. 4.8.5 Watchdog Timeout Atlas provides a programmable watchdog timer that can detect an unexpected lack of activity from the external controller. Typically, such a condition is due to an SPI communication problem or an external controller malfunction. Particularly when the external controller is used to provide higher level velocity or position control, a watchdog timeout may therefore represent a very serious condition. To effect the watchdog function Atlas monitors the amount of time between successive valid SPI torque or voltage commands from the external controller. If the amount of time between commands exceeds the programmed watchdog timer, the watchdog fault is triggered. To set the watchdog timeout value the SetDriveFaultParameter command is used. To read the value set using this command, GetDriveFaultParameters is used. The watchdog time value is in units of 51.2 uSec. For example a value of 100 indicates a timeout interval of 5,120 uSec or 5.12 mSecs. A value of zero (0) means the watchdog is disabled. A watchdog timeout fault will cause the following events to occur: · The current loop and power stage modules are disabled, thereby halting further motor output. · The Drive Fault Status register records a watchdog timeout fault condition. · The Event Status register records a drive exception condition. To recover from this condition the user should determine the nature of the fault using the GetDriveFaultStatus command. In most cases it is desirable to power down Atlas to correct the condition. If the condition is resolved but Atlas is not power cycled, the following sequence should be used to restore the drive to normal operation: · Clear the fault condition using the ClearDriveFaultStatus command. · Clear the drive exception bit of the Event Status word using the ResetEventStatus command. It is not possible to re-enable the current loop or the power stage module if the drive exception bit is still active. · Re-enable the current loop and power stage modules using the RestoreOperatingMode command. 60 Atlas® Digital Amplifier Complete Technical Reference Operation 4 At the end of this sequence Atlas will resume normal operations. This includes operation of the watchdog timer itself. Unless a zero value has been loaded into the watchdog timeout value (thereby disabling the watchdog timeout), Atlas will immediately begin counting SPI command intervals to determine if a another timeout has occurred. Watchdog timeout faults indicate that a serious safety condition has occurred. It is the responsibility of the user to operate Atlas within safe limits. 4.8.6 Drive Enable Atlas supports an Enable input signal that must be active for proper amplifier operation. This signal is useful for allowing external hardware to automatically shut Atlas down. The signal has an active low interpretation. The status of the Enable signal can be read using the command GetSignalStatus. If the Enable signal becomes inactive (goes high) the following events occur: · The current loop and power stage modules are disabled, thereby halting further motor output. · The Drive Fault Status register records a Disabled fault condition. · The Event Status register records a drive exception condition. To recover from this condition the user should determine the nature of the fault using the GetDriveFaultStatus command. It may be desirable to power down Atlas to correct the condition. If the condition is resolved but Atlas is not power cycled, the following sequence should be used to restore the drive to normal operation: · Clear the fault condition using the ClearDriveFaultStatus command. · Clear the drive exception bit of the Event Status word using the ResetEventStatus command. It is not possible to re-enable the current loop or the power stage module if the drive exception bit is still active. · Re-enable the current loop and power stage modules using the RestoreOperatingMode command. At the end of this sequence Atlas will resume normal operations. If the Enable signal is still inactive while the disable bit of the Event Status register is being cleared, this bit will immediately be set again, and the recovery sequence must be executed again. 4.8.7 Drive Fault Status Register To simplify recovery from drive-related faults Atlas provides a Drive Fault Status register. This register is read using the command GetDriveFaultStatus. The bits in this register use a latch mechanism, meaning they are set by Atlas, and cleared by the user. The following table indicates the contents of this register: Bit Name Description 0 Overcurrent Set 1 to indicate an overcurrent event due to a short circuit, overload in the drive output, or other such condition. 1-2 Reserved May contain 0 or 1 3 Operating mode mismatch Set 1 to indicate that Atlas received a torque command when output was not enabled. 4 Watchdog timeout Set 1 to indicate that the command watchdog has timed out. Atlas® Digital Amplifier Complete Technical Reference 61 4 Operation Bit 5 6 7 8-11 12 13-15 Name Overvoltage Undervoltage Disabled Reserved Current foldback Reserved Description Set 1 to indicate an overvoltage event in the supply bus voltage. Set 1 to indicate an undervoltage event in the supply bus voltage. Set 1 to indicate Enable signal was not asserted May contain 0 or 1 Set 1 to indicate a current foldback event May contain 0 or 1 To clear the bits in this register the command ClearDriveFaultStatus is used. 4.8.8 FaultOut Signal The Atlas unit's FaultOut signal is used to indicate an occurrence of one or more drive faults. This signal is active high, meaning it is high when a fault has occurred, and it is low when a fault has not occurred. The FaultOut signal is programmable, so that the user may determine what fault states result in the FaultOut signal becoming active. In particular, any bit condition of the Drive Fault Status register may be used to trigger activation of the FaultOut signal. This is done using the command SetFaultOutMask. The value set using this command can be read back using GetFaultOutMask. See Section 4.8.7, "Drive Fault Status Register" for more information on the Drive Fault Status register The bit mask specified using this command is ANDed with the Drive Fault Status register. If the result is non-zero, the FaultOut signal is driven active. For example if a watchdog timeout has occurred (bit 4 of the Drive Fault Status register and the mask has been set to a value of 0x10 (hexadecimal notation, equivalent to decimal value of 16) FaultOut will be active. The default value for the fault out mask is 0x71, indicating that FaultOut will go active whenever an overcurrent, overvoltage, undervoltage, or watchdog timeout event occurs. 4.8.9 Current Foldback Current foldback, also known as I2t foldback, is a general purpose tool to protect the drive output stage or the motor from excessive current. I2t current foldback works by integrating, over time, the difference of the square of the actual motor current and the square of a user-settable continuous current limit. When the integrated value reaches a user-settable energy limit, Atlas goes into current foldback. The default response to this event is to cause the current loop and power stage modules to be disabled. However it is also possible to program Atlas to attempt to clamp the maximum current to the continuous current limit value. Note that the Atlas unit's ability to do so depends on a properly functioning current loop. Atlas will stay in foldback until the integrator returns to zero. This is shown in Figure 4-10. 62 Atlas® Digital Amplifier Complete Technical Reference 10 Commanded Current Amps 5 0 Continuous current limit exceeded Integrated energy limit exceeded Operation 4 Figure 4-10: Current Foldback Processing Example Output Current 10 Amps 5 0 Integrated 30 Energy Amp2-sec 20 10 0 Time Each Atlas amplifier has particular default and maximum allowed values for both the continuous current limit and energy limit. These values are designed to protect the Atlas from excessive heat generation. Refer to Section 3.11.1, "Atlas Settings Defaults and Limits" for a complete listing of these defaults and limits. Setting continuous current limit and energy limit to less than the maximum supported by the Atlas is useful if the current limit is due to the motor, or to some other factor external to Atlas. To set the continuous current limit and the energy limit the command SetCurrentFoldback is used. The values set using this command can be read back using GetCurrentFoldback. The provided current value is an unsigned 16-bit integer. Refer to Section 3.11, "Atlas Conversion Factors" for applicable units and scale factors for the specific Atlas unit you are using. The instantaneous state of the current foldback mechanism (whether the foldback limit is active or not) is available in the Drive Status register and can be read using the command GetDriveStatus. If a foldback event has occurred, this event is recorded in the Event Status register as well as the Drive Fault Status register, and can be read back using GetEventStatus and GetDriveFaultStatus respectively. 4.8.9.1 Current Foldback in Voltage Mode Atlas unit's current foldback mechanism still operates when Atlas is in voltage mode (current loop disabled). When in this mode, the I2t energy calculations and condition testing are identical as when Atlas is operating in current control mode. Nevertheless, when in voltage mode, there is an important operational difference. In particular, if the limit is exceeded, rather than clamping the maximum current output to the programmable maximum continuous current limit setting, Atlas disables the power stage module, thereby halting further motor output. 4.8.9.2 Example I2t Calculations The following example may help illustrate use of current foldback: A particular motor has an allowed continuous current rating of 3 amps. In addition, this motor can sustain a temporary current of 5 amps for 2 seconds. Atlas® Digital Amplifier Complete Technical Reference 63 4 Operation In this example the continuous current limit would be set to 3 amps, and the energy limit would be set to: Energy Limit = (peak current2 - continuous current limit2) * time Energy Limit = (5A2 - 3A2) * 2 Sec Energy Limit = 32A2Sec Current foldback, when it occurs, may indicate a serious condition affecting motion stability, smoothness, and performance. It is the responsibility of the user to determine the appropriate response to a current foldback event. 4.8.9.3 Current Foldback Event Processing Atlas provides a programmable mechanism related to the current foldback condition. This can be useful for tailoring the response of the Atlas to best suit a specific application. The Atlas facility that handles this type of programmable response is called an event. Events allow event actions to be executed automatically once a specified condition occurs. In this case, the event condition is satisfied if Atlas is in a current foldback condition, and the following table describes the event actions that can be selected by the external controller: Action Name No Action Disable power stage and current loop Description No event-related action taken, current limited to continuous current limit Disables the power stage and the current loop module The command SetEventAction is used to specify both the condition and the action that should be taken. The external controller must specify that the condition is "current foldback," and also specify one of the two conditions from the table above. Upon occurrence, the programmed action is executed along with any related actions, such as setting the appropriate bit in the Event Status register. If a foldback event occurs when Atlas is in voltage mode (current loop not enabled), then the power stage will be disabled regardless of the setting of the event action. To recover from an event action the command RestoreOperatingMode is used. This command will reset Atlas to the operating mode previously specified using SetOperatingMode command. Note that if the event condition is still present, the event action will immediately occur again. Once programmed, an event action will be in place until reprogrammed. The occurrence of the event condition does not reset the programmed event action. The default action for the current foldback event is to disable the power stage and current loop. 4.9 Step Motor Control While many aspects of Atlas operation are similar between step motors and Brushless DC or DC Brush motors, Atlas provides a number of special features for supporting step motors. This section describes these special step motorspecific features. 64 Atlas® Digital Amplifier Complete Technical Reference Operation 4 Overall, Atlas provides two step-motor specific position command methods. These are summarized in the table below: Position Command Mode Pulse & direction signal input SPI pulse & direction Description Atlas directly supports input of hardware Pulse, Direction, and AtRest signals to interface with traditional external controllers that provide these signals. When operated in this mode, SPI communication is not available. This pulse & direction interface utilizes the external controller SPI interface to provide continuous position information to Atlas. Compared to pulse & direction signal input, this approach allows full use of the SPI communication interface. 4.9.1 Pulse & Direction Signal Input Mode Holding Current AtRest Asserted? Y N Drive Current Phase A Command Phase B Command To current loop or power stage Figure 4-11: Pulse and Direction Signal Input Mode Control Flow Pulse Direction Position Counter Microstep signal generation Figure 4-11 shows the control flow of the Atlas when used in pulse & direction signal input mode. The Atlas Pulse signal drives a counter which increments or decrements a step motor command position based on the state of the Direction signal. Pulse signals are expected to be active low, meaning that a position increment or decrement occurs when this signal transitions from high to low. The Direction signal indicates that a pulse received while the Direction signal is low is interpreted as a negative direction command, and a pulse received while this signal is high as a positive direction command. Atlas provides programmable microstepping resolution, which means that the incoming position data stream can be interpreted by the Atlas at various resolutions. The maximum is 256 microsteps per full step, and the default interpretation is 64 microsteps per full step. This means that in the default condition, for a standard 1.8° two-phase stepper, Atlas provides a resolution of 12,800 microsteps per mechanical motor rotation, or roughly .028 degrees of mechanical motion per incoming pulse. Note that the control resolution may not equal the actual system accuracy. To set the microstep resolution the command SetPhaseCounts is used. To read this value back, the command GetPhaseCounts is used. Phase counts are expressed as microsteps per electrical cycles and there are four full steps per electrical cycle. So for example, to set 256 microsteps per full step, the command SetPhaseCounts 1,024 is used. When actually connected to Atlas in pulse & direction signal mode, SPI communication is not available. Command examples in this section are therefore provided for use during setup, before pulse & direction signal mode is operational. Atlas® Digital Amplifier Complete Technical Reference 65 4 Operation 4.9.1.1 Setting the Motor Current When operating in pulse & direction input mode the current output by Atlas must be specified. Atlas supports two separate, programmable torques. The first is called the drive current and is used during normal step motor operations. The second is called the holding current and is used when the motor is stationary as indicated by the AtRest signal. This signal is typically set when the external controller's trajectory generator completes its move or shortly thereafter. AtRest is an active low signal, meaning when no motion is occurring this signal should be is set low, and set high when motion is occurring. To set both the drive current and the holding current the command SetCurrent is used. A value between 0 and 32,767 is set. The scaling of this command is determined by the particular Atlas you are using. See Section 3.11, "Atlas Conversion Factors" for details. To read this value, the command GetCurrent is used. 4.9.1.2 Pulse & Direction Signal Mode Operation Setup Because Atlas shares SPI bus signal pins with the Pulse, Direction, and AtRest pins it is not possible to operate the Atlas in the pulse & direction signal input mode while communicating via the SPI communication bus. To resolve this, Atlas is first connected in SPI mode, and the SPI interface is used to optimize the motion control application during application development and to download desired drive parameters to Atlas unit's non-volatile initialization storage memory. See Section 4.12, "Power-up" for more information on non-volatile initialization storage. Once Atlas has been fully prepared, to switch Atlas to pulse & direction signal input mode the command SetDriveCommandMode is used. This command takes effect immediately, so further SPI command processing is disabled, and the external controller should begin sending pulse & direction commands. Note that this command sequence is generally only performed during power-on initialization. See Section 4.12, "Power-up" for more information. Once the command mode has been set to pulse and direction signal, Atlas will be in pulse & direction signal mode and the SPI bus will no longer be functional until a subsequent power cycle occurs. 4.9.1.3 Recovering from Pulse & Direction Signal Mode It is possible to restore an Atlas that is functioning in pulse & direction signal mode to SPI operation. While this is an uncommon operation, it may be useful for testing, diagnosing a field problem, or to allow a production Atlas to be used for prototyping with optimization software such as PMD's Pro-Motion software. Here is how such a recovery is accomplished. For approximately 250 ms after power on Atlas will monitor its Pulse and Direction input signals for a special pattern. If detected, this recovery pattern will cause the Atlas to revert to SPI communication mode. The recovery pattern consists of a rising edge on the Pulse signal with the Direction signal set low, five pulses (ten edges) on the Direction signal, followed by a falling edge on the Pulse signal. The time between direction edges is required to be at least 500 us, and the AtRest/~SPICS signal should be low throughout the recovery pattern. Note that in this recovery pattern Direction signal edges occur while the Pulse input signal is high, contrary to normal pulse and direction input where a step is signaled by a high to low transition of the Pulse input, and all Direction edges should occur while Pulse is low. Note also that when in pulse and direction signal input mode the SPISO pin is in a high impedance state. Once the recovery pattern is recognized SPISO is driven low. 66 Atlas® Digital Amplifier Complete Technical Reference Operation 4 4.9.1.4 Fault Processing While in Pulse & Direction Signal Input Mode In order to allow recovery from safety-related faults such as overtemperature or current foldback while operating in pulse & direction signal input mode, an automatic recovery mode is available. While this mode is most often used when in pulse & direction signal input mode, it may in fact be selected even when SPI communications are available. Automatic event recovery mode is set using the SetDriveFaultParameter command, and may be read back using GetDriveFaultParameter. While in automatic recovery mode the Enable signal is used to request that the Atlas automatically attempt to reset a fault condition. After the FaultOut signal goes active, the external controller must delay a minimum of 150 uSec, but thereafter may request that the Atlas attempt to automatically recover by deasserting, and then asserting, the Enable signal. The Enable signal must be in the deasserted state for at least 150uSec for the request to be recognized. When an automatic recovery request is recognized by Atlas it behaves as though the command sequence ResetEventStatus 0, ClearDriveFaultStatus and RestoreOperatingMode has been sent to it by the external controller. As is the case when these commands are sent by the external controller, if the fault condition is still present when recovery is attempted, Atlas will immediately again disable itself, and a recovery procedure must once again be requested. If the fault has been corrected however, a recovery request will result in resumption of normal Atlas operation. While in automatic recovery mode, the FaultOutMask should be set to assert the FaultOut signal during a current foldback event. If not, the external controller will be unaware that Atlas is in a foldback condition, and therefore will not know when to request an automatic recovery via the Enable signal. 4.9.2 SPI Pulse & Direction Mode The SPI pulse & direction mode allows emulated pulse & direction information to be transmitted via the SPI bus. While it is possible to use this mode in a production application, this mode is most useful during development, when the values for various Atlas parameters are still being optimized, and full SPI communication is desired. When placed in this mode an incremental signed move distance is specified via the SPI command protocol at each external controller command. For example, a value of +7 specified by the external controller means the Atlas will move the step motor position forward 7 microsteps, and a command of -3 will cause the Atlas to move the step motor position backwards 3 microsteps. To accommodate the AtRest signal, the SPI protocol incorporates a bit which is utilized by Atlas in the same manner as the AtRest signal when in the hardware pulse & direction mode. See Chapter 5, "SPI Communications" for a complete description of the SPI command format. As was the case for pulse & direction signal mode, both a drive current and a holding current should be specified when using the SPI pulse & direction mode. To accomplish this the command SetCurrent is used. The values set using this commands can be read by the command GetCurrent. To assist with operation in this mode it may be useful to read the current step motor position. This 32 bit quantity can be read using the command GetCommandedPosition. 4.9.3 Current Control with Step Motors Current control when driving step motors occurs using either field-oriented control or independent phase control. See Section 4.5.3, "Field Oriented Control" for a detailed description of field-oriented control, and see Section 4.5, "Current Loop" for a detailed summary of the Atlas unit's current loop. Atlas® Digital Amplifier Complete Technical Reference 67 4 Operation To select field oriented control or current control the command SetCurrentControlMode is used. The value set can be read back using GetCurrentControlMode. 4.10 User Memory Space & Buffers Figure 4-12: User Memory Space and Buffers 68 Start Address (in Hexadecimal) 0X0000 0000 0X0000 03FD 0X2000 0000 0X2000 0400 Function Trace RAM (1,020 words) Reserved NVRAM (1,024 words) Reserved Atlas provides the ability to store or retrieve data from an internal user memory space. Figure 4-12 shows the user memory space for Atlas. There is a trace area, and an area that is used to store non-volatile setup commands that can be read back by the external controller. See Section 4.11, "Trace Capture" for more information on trace. See Section 4.12, "Power-up" for more information on Atlas operational configuration storage. Atlas provides access to the user memory space via a mechanism known as a buffer. Atlas allows up to four different buffers to be defined, allowing the overall user memory space to be partitioned in a manner most useful to the external controller. Typically, there will just be two buffers, one for the trace area, and one for the setup area. However this additional flexibility may be useful for storing temporary application specific data, or to set up multiple trace data storage areas. Buffers describe a contiguous block of memory and are defined by specifying a base address for the memory block and a block length. Once a buffer's base address and length have been defined, data values may be written to and read from the buffer. When defining memory buffers the memory space is treated as a sequence of 16-bit memory locations. Atlas allows any values to be used for the base address and length as long as these values result in addresses within the available user memory space. 4.10.1 Buffer Indexes In addition to the base address and length each buffer maintains a read index and a write index. The read index may be assigned a value between 0 and L-1 where L is the buffer length. The read index defines the location from which the next value will be read. Similarly, the write index ranges from 0 to L-1 and defines the location at which the next value will be written. When a value is read from the memory buffer, the read index is automatically incremented, thus selecting the next value for reading. The write index is incremented whenever a value is written to a buffer. If either index reaches the end of the buffer, it is automatically reset to 0 on the next read/write operation. 4.10.2 Buffer Access Commands The following table details the commands that set up, access, and monitor memory buffers. Command SetBufferStart GetBufferStart Arguments bufferID, address bufferID Description Sets the base address of a buffer. bufferID is either 0, 1, 2, or 3. Address is a 32-bit integer that defines the base address of the buffer. Returns the base address of the specified buffer. Atlas® Digital Amplifier Complete Technical Reference Command SetBufferLength Arguments bufferID, length GetBufferLength SetBufferReadIndex GetBufferReadIndex SetBufferWriteIndex GetBufferWriteIndex ReadBuffer16 bufferID bufferID, index bufferID bufferID, index bufferID bufferID Operation 4 Description Sets the length of the specified buffer. Length is a 32-bit integer. Atlas adds length to the current buffer base address (as set by the SetBufferStart instruction) to ensure that the buffer will not extend beyond the addressable memory limit. Returns the length of the specified buffer. Sets the read index for the specified buffer. Index is a 32-bit integer in the range 0 to length-1, where length is the current buffer length. Returns the value of the read index for the specified buffer. Sets the write index for the specified buffer. Index is a 32-bit integer in the range 0 to length-1, where length is the current buffer length. Returns the value of the write index for the specified buffer. Returns a 16-bit value from the specified buffer. The location from which the value is read is determined by adding the base address to the read index. After the value has been read, the read index is incremented. If the result is equal to the current buffer length, the read index is set to zero (0). 4.11 Trace Capture Figure 4-13: Example Motion Trace Capture Trace capture is a powerful Atlas feature that allows parameters and registers to be continuously captured and stored to the Atlas units' trace RAM user memory space. The captured data may later be downloaded by the external controller using standard memory buffer access commands. Data traces are useful for optimizing current loop performance, diagnosing SPI communications, capturing signal data, or assisting with any type of monitoring where a precise time-based record is required. Broadly speaking, there are three phases associated with data trace operations. In the first phase, the external controller specifies which parameters will be captured, and how the trace will be executed. In the second phase, Atlas captures the trace data. This can occur autonomously, or under external controller control. Finally, in the third phase the external controller retrieves the data. This can occur after the trace is complete, or concurrently with capture. 4.11.1 Trace Parameters To start a trace the external controller must specify a number of parameters. They are: Parameter Trace buffer Trace period Description The external controller must initialize and specify the memory buffer that will be used for the trace data storage area. See Section 4.10, "User Memory Space & Buffers" for more information on buffers. Atlas can capture the value of the trace variables for every single time cycle, every other cycle, or at any programmed frequency. This trace period of data collection and storage must be specified. Atlas® Digital Amplifier Complete Technical Reference 69 4 Operation Parameter Trace variables Trace mode Trigger mode Trace Start/Stop Description There are dozens of separate variables and registers within Atlas that may be traced; for example, the phase A current command, the current loop error, etc... The user must specify the variables that will be traced by Atlas. Atlas can trace in one of two modes: one-time, or rolling mode. This determines how the data is stored, and whether the trace will stop automatically or be stopped explicitly by the external controller. Atlas supports two different methods for determining the moment when data capture actually occurs. The first is internally, via the Atlas unit's internal clock cycle and the trace period defined above. The second is externally commanded by the external controller via the SPI communication protocol. See Chapter 5, "SPI Communications" for more information on the SPI protocol. Note that when external trigger mode is selected the trace period is not used. Atlas allows the external controller to control when trace capture starts and stops. Two overall conditions are supported; starting and stopping immediately via a command or via the trace bit of the SPI communication header. 4.11.1.1 Trace Buffer Atlas organizes its internal user memory space into data buffers. Each buffer is given a numerical ID. The trace buffer must always be ID 0 (zero). Before trace capture may be used, memory buffer 0 must be programmed with a valid base address and length. The size of the trace buffer determines the maximum number of data points that can be captured. For the large majority of applications the trace buffer will be set to a size of 1,020 words, which corresponds to the maximum available memory for trace. If the external controller specifies some of this area for other functions however, such as to store a previous trace, the trace buffer must be set to a smaller size. While trace data is being collected it is not legal to change the trace buffer configuration. If an attempt is made to change the base address, length, write index, or read index associated with buffer 0 while a trace is running the change will be ignored and an error will be flagged. 4.11.1.2 Trace Period The tracing system supports a configurable period register that defines the frequency at which data is stored to the trace buffer. The tracing frequency is specified in units of 51.2 uSecs. The command SetTracePeriod sets the trace period, and the command GetTracePeriod retrieves it. Note that if the trigger mode is set to external, the trace period is not used. 4.11.1.3 Trace Variables When traces are running one to four Atlas parameters may be stored to the trace buffer for each occurrence of the trigger. The four trace variable registers are used to define which parameters are stored. The command SetTraceVariable selects which traceable parameter will be stored by the trace variable specified. The values passed by this command specify the variable number of the parameter to be traced, and the variable ID. The command GetTraceVariable retrieves this same value. The following table shows all of the Atlas variables that can be traced along with the variable ID code that is used to select this variable for tracing. Variable ID Name Status Registers 12 Event Status 14 Signal Status 56 Drive Status Description The Event Status register The Signal Status register The Drive Status register 70 Atlas® Digital Amplifier Complete Technical Reference Operation 4 Variable ID Name Description 79 Drive Fault Status The Drive Fault Status register 80 SPI Status The SPI Status word Commutation/Phasing 7 Active Motor Command The external controller-commanded voltage or torque com- mand 17 Phase A Command The output command for phase A 18 Phase B Command The output command for phase B 19 Phase C Command The output command for phase C 29 Phase Angle Scaled The phase angle, scaled from 0 to 360° rather than in encoder counts. Current Loop 66 Phase A Reference The current loop reference for Phase A 67 Phase B Reference The current loop reference for Phase B 30 Phase A Error The current loop error for Phase A 35 Phase B Error The current loop error for Phase B 31 Phase A Actual Current The current loop actual current for Phase A 36 Phase B Actual Current The current loop actual current for Phase B 33 Phase A Integrator Contribution The current loop integrator contribution for Phase A 38 Phase B Integrator Contribution The current loop integrator contribution for Phase B 34 Phase A Current Loop Output The current loop output for Phase A 39 Phase B Current Loop Output The current loop output for Phase B Field Oriented Control 40 d Reference The FOC reference for d (direct) loop 46 q Reference The FOC reference for q (quadrature) loop 41 d Error The FOC d (direct) loop error 47 q Error The FOC q (quadrature) loop error 42 d Feedback The d (direct) feedback current 48 q Feedback The q (quadrature) feedback current 44 d Integrator Contribution The FOC integrator contribution for d (direct) 50 q Integrator Contribution The FOC integrator contribution for q (quadrature) 45 d Output The FOC output for d (direct) 51 q Output The FOC output for q (quadrature) 52 FOC phase A Output The FOC output for phase A 53 FOC phase B Output The FOC output for phase B 73 Alpha Current The FOC current component (stationary frame) 74 Beta Current The FOC current component (stationary frame) 31 Phase A Actual Current The FOC actual current for phase A 36 Phase B Actual Current The FOC actual current for phase B Motor Output 54 Bus voltage The bus voltage 55 Temperature The temperature of Atlas 68 I2t Energy Accumulated I2t foldback energy 75 Terminal A Output The PWM duty cycle for terminal A 76 Terminal B Output The PWM duty cycle for terminal B 77 Terminal C Output The PWM duty cycle for terminal C 69 Leg Current A The measured current in lower leg A 70 Leg Current B The measured current in lower leg B 71 Leg Current C The measured current in lower leg C 72 Leg Current D The measured current in lower leg D 78 Clip Factor Actual output as a fraction of commanded output Atlas® Digital Amplifier Complete Technical Reference 71 4 Operation Variable ID Name Miscellaneous 0 None 8 Atlas Time Description No trace variable is selected Atlas unit's processor time in units of cycles Setting a trace variable's parameter to zero will disable that variable and all subsequent variables. Therefore, if N parameters are to be saved at each trace period, trace variables 0 to (N1) must be used to identify the parameters to be saved, and trace variable N must be set to zero. 4.11.1.4 Trace Mode As trace data is collected it is written to sequential locations in the trace buffer. When the end of the buffer is reached the trace mechanism will behave in one of two ways, depending on the selected trace mode. If one-time mode is selected then the trace mechanism will stop collecting data when the buffer is full. If rolling-buffer is selected then the trace mechanism will wrap around to the beginning of the trace buffer and continue storing data, overwriting data from previous cycles. In this mode the trace will not end until explicitly commanded by the external controller. See Section 4.11.2, "Trace Start/Stop" for more information on trace stop/ start control. Use the command SetTraceMode to select the trace mode. The command GetTraceMode retrieves the trace mode. 4.11.1.5 Trigger Mode Atlas supports two separate methods for synchronizing data capture during trace operations; internal, under Atlas control, and external, under external controller control. If internal is selected, trace data capture occurs automatically as determined by the trace period variable described previously. If external is selected, a special bit in the SPI protocol format is used to command when the trace will occur. In external trigger mode an explicit command must be sent to prepare Atlas for tracing. This command resets various trace variables such as the write index so that they start the trace correctly initialized. To select trigger mode use the command SetTraceMode. The command GetTraceMode retrieves this same information. 4.11.2 Trace Start/Stop The external controller has the ability to control when trace capture starts and stops. Both the start condition and the stop condition can be independently programmed. The command that is used to specify how the trace will start is SetTraceStart, and the command that controls how it will stop is SetTraceStop. Two conditions are specifiable, the first is immediate, meaning that the trace starts or stops immediately upon receipt of the SetTraceStart or SetTraceStop command. The second condition specifies that the trace bit of the SPI header will control when trace starts and stops. Trace starts at the moment this bit is set to 1, and stops at the moment this bit is set to zero. Once a specified start or stop condition occurs, the condition is no longer active. This generally means that the condition should be reprogrammed for each trace operation. The commands GetTraceStart and GetTraceStop are used to retrieve the currently active trace start/stop conditions. Whether started immediately or via the SPI header trace bit, when the trace start condition occurs, all indexes are set to zero and trace data storage starts at the beginning of the buffer. 72 Atlas® Digital Amplifier Complete Technical Reference Operation 4 It is always necessary to specify a start condition for the trace to begin, however it is not necessary to specify a stop condition. If in rolling buffer mode, if no stop condition is specified then the trace will continue indefinitely. If in onetime buffer mode, the trace will continue till the end of the buffer is reached. See Section 5.2, "Packet Header" for detailed information of the SPI header packet format. 4.11.3 Trace Status Word Atlas provides a register that summarizes the instantaneous state of the trace process. This register can be read using the command GetTraceStatus, and is summarized below: Bit Name 0 Trace mode 1 Trace active 2 Write index wrap 3 Overrun 4 Trigger mode 5-15 Reserved Description Set to 0 when in one-time mode. Set to 1 when in rolling mode. Set to 1 when trace is active (currently tracing). Set to 0 if it is not. Set to 1 when trace capture has wrapped. Set to 0 if it has not wrapped. If 0, the buffer has not yet been filled and all recorded data is intact. If 1, the trace has wrapped to the beginning of the buffer; any previous data may have been overwritten if not explicitly retrieved by the external controller using the ReadBuffer16 command while the trace is active. Set to 1 when the write index laps the read index, indicating that data is not being read at a sufficient rate while operating in rolling mode, and that unread data is now being overwritten by Atlas. A 0 indicates that there is no overrun. Note that this bit is never set when operating in one-time trace mode. Set to 1 when Atlas is in external trigger mode. Set to 0 when Atlas is in internal trigger mode. May contain 0 or 1. 4.11.4 Downloading Trace Data Captured data may be downloaded by the external controller using standard buffer memory commands. See Section 4.10, "User Memory Space & Buffers" for a complete description of external memory buffer commands. When operating in one-time trace mode, the most common approach for downloading data is to allow the trace to finish, and then to read the entire buffer starting at read index 0. When operating in rolling mode, there are some additional considerations introduced by the fact that the write index can wrap, continuing to write data at buffer addresses already written during that trace. To assist with this the command GetTraceCount is available to retrieve the total number of captures that have occurred since the start of the trace. By comparing this number with the number of data capture sets retrieved by the external controller, the external controller can determine how many more data capture sets are available for retrieval. Also useful during rolling trace mode is the Overrun bit of the Trace Capture register. This bit indicates that Atlas has overwritten data that has not yet been read by the external controller. If the external controller's intention is to continually retrieve all data recorded, this indicates a problem. 4.11.5 Trace Data Format During each trace period each of the trace variables is used in turn to store a 16-bit value to the trace buffer. Therefore, when data is read from the buffer, the first value read would be the value corresponding to trace variable 1, the second Atlas® Digital Amplifier Complete Technical Reference 73 4 Operation value will correspond to trace variable 2, up to the number of trace variables used. This is shown in Figure 4-14 with three variables shown captured. Figure 4-14: Trace Data Format 74 Variable 1 Variable 2 Variable 3 Variable 1 Variable 2 Address +0 +1 +2 +3 +4 Along those lines, both the length of the trace buffer and the number of trace variables specified for capture affect the number of capture sets that may be stored. For example, if the trace buffer is set to the Atlas unit's maximum value of 1,020 words and two trace variables are specified, up to 510 trace samples can be stored. However if three trace variables are specified then 340 trace sets may be stored. If smaller trace buffer sizes are used it is recommended that the length be set to an even multiple of the number of trace variables being used. A simple solution is to verify that the trace buffer length is an even multiple of 12, since 12 is evenly divisible by all possible numbers of trace variables: 1, 2, 3, and 4. 4.12 Power-up After receiving stable power at the HV pins Atlas begins its initialization sequence. In a power-up where no user-provided initialization parameters have been stored this takes approximately 250 mSec. At the end of this sequence all parameters are at their default values, and both the current loop module and the power stage module are disabled. At this point Atlas is ready to receive commands and begin operation. Atlas also supports the ability to store initialization parameters that are applied during the power up sequence. For this purpose, Atlas supports a 1,024 word memory that is non-volatile (NVRAM), meaning the data stored will be available even after power to the Atlas is removed. Figure 4-12 shows the user memory space and the location of the NVRAM segment. The power-up initialization information stored in the NVRAM takes the form of Atlas command packets, however rather than being sent via SPI, these packet words are stored in memory. If the non-volatile initialization memory has been loaded with initialization information the power-up sequence detects this and begins executing the commands stored in the non-volatile memory. Note that processing stored commands may increase the overall initialization time depending on the command sequence stored. For more information on how the initialization commands are stored into NVRAM see Section 4.13, "Non-Volatile (NVRAM) Storage". 4.12.1 Initialization Command Processing If there are errors in the stored command sequence then an instruction error will be set so that the error can later be diagnosed. Atlas will abort initialization if it detects any error while processing commands. The external controller polls the Drive Status register to determine when initialization is complete. If an error is detected the external controller can send a GetInstructionError to diagnose the nature of the erroneous command processed during initialization. The order of initialization for most commands does not matter. However commands that enable Atlas for operation should be executed last in the sequence. This is because Atlas should not begin operations until all of the initialization parameters are loaded in. These commands include SetOperatingMode, which is used to enable Atlas modules, and SetDriveCommandMode, which is used to set Atlas to pulse & direction signal input mode. Atlas® Digital Amplifier Complete Technical Reference 4.12.2 Initialization-Specific Commands Operation 4 To make power-up initialization as flexible as possible there are a few commands that are only available during initialization. These commands are listed below: The command Update is used to activate buffered commands that would otherwise be made active (updated) using an SPI header command. The command InitializationDelay takes an argument which specifies a delay during stored command initialization processing. This command is useful in the case that the user wants Atlas to be ready for operation only when other hardware in the overall system is powered up. 4.13 Non-Volatile (NVRAM) Storage A primary purpose of the NVRAM is to allow Atlas initialization information to be stored so that upon power up it can be automatically loaded rather than requiring an external controller to perform this function. In addition however the NVRAM can be used for other functions such as labeling the stored initialization sequence, or for general purpose user-defined storage. All data stored in the Atlas NVRAM utlizes a data format known as PMD Structured data Storage Format (PSF). Users who rely only on PMD's Pro-Motion software package to communicate with Atlas and store and retrieve initialization parameters may not need to concern themselves with the details of PSF. Users who want to address the NVRAM from their own software, or who want to create their own user-defined storage on the Atlas NVRAM will utilize the PSF format details provided in the subsequent sections. 4.13.1 PMD Structured Data Format PSF Start Sequence PSF User Sequence PSF Segment Storage Area 0x0 Word 1 Word 5 0x0 Word 2 0x0 Word 3 Word 6 Word 7 Segment 1 Segment 2 0x1 Word 4 Word 8 Figure 4-15: High-Level Format of a PSF (PMD Structured Data Format) Memory Space Segment N... PSF (PMD Structured data Format) is a general purpose data storage format designed for use with non-volatile storage memory such as provided by Atlas Digital Amplifiers. PSF provides a method to store and label initialization information used by the Atlas during startup, as well as to allow user-defined storage in NVRAM. Figure 4-15 shows the overall format of a PSF-managed memory area. The PSF memory space begins with a 4-word start sequence and a 4-word user programmable sequence. Each word is 16 bits in size, as are future references to words in the following sections unless otherwise noted. The start sequence must contain, in order, the values 0x0, 0x0, Atlas® Digital Amplifier Complete Technical Reference 75 4 Operation 0x0, and 0x1. The user sequence can be specified by the user and may contain any values. The user sequence can be used for any purpose but is often used to identify the type of information stored in the PSF memory space. Following the eight words of sequence words are one or more data storage blocks known as segments, which are themselves structured memory blocks which must follow a specific format. 4.13.2 PSF Data Segments Figure 4-16: PSF Data Segment Format Header Word 1 Header Word 2 Header Word 3 Checksum Segment Type Identifier Reserved Header Word 4 Header Word 5 Data1 Data Length (low) Data Length (high) Data1 Data2 Data2 DataN... DataN... The central mechanism which PSF provides to store data is called a data segment. PSF data segments come with their own headers which allow structuring and data integrity checks of the PSF memory space. Figure 4-16 shows the format of a PSF data segment. The following section details each of the elements in this data structure. Checksum - is the ones complement of an 8-bit ones complement checksum with a seed of 0xAA. It is computed over the entire segment space including the header. If the checksum field is computed correctly then the checksum will be 255 (0xff). The size of this field is one byte. Segment type - specifies the formatting of the data stored in the segment. This 8 bit field encodes the values 0 through 255. Users may assign segment type values 192-255 for segment types of their own design while all other values are reserved. The size of this field is one byte. Data length low word & high word - contains a 32 bit value encoding the number of 16-bit words of data (data0, data1, etc...) included with this segment. Data segments can be defined such that a variable number of data words is expected or a fixed number of words is expected. Whether the number of data words varies or not, the data length word must always be specified correctly for the number of data words actually contained in the segment. Identifier - contains an unformatted 16-bit value that may be used for any purpose but is generally used to identify separate instances of multiply stored segments of the same segment type. For example if there was an array of stored segments, each of the same segment type, the identifier field might be used to identify a specific element within of the overall array of segments. Data0, Data1, etc... is the data that is being stored in this segment. The exact format of this data is determined by the segment type. 76 Atlas® Digital Amplifier Complete Technical Reference 4.13.3 Pre-Defined Segment Types Operation 4 There are two pre-defined Atlas PSF storage segment types. The Initialization Commands storage type defines the segment that holds configuration information used during power-up while the Parameter List segment holds information that is useful to label the contents of the Initialization Commands segment. During power up Atlas scans the NVRAM space for a properly formatted segment with type `Initialization Commands,' and if found it initializes the Atlas using the information provided. The Initialization Commands segment type is defined in detail in Section 4.13.4, "Initialization Commands Segment Type". A segment of type Parameter List, when preceding another segment and when containing certain specific values in the data, stores identification information associated with that segment. For example a human-readable name for the segment can be assigned along with information such as when the segment data was stored. This segment-identifying data is not utilized directly by Atlas but rather by software programs such as Pro-Motion. The Parameter List segment type is discussed in detail in Section 4.13.5, "Parameter List Segment Type". 4.13.4 Initialization Commands Segment Type Segment Header Segment Data Segment Header For Initialization Commands Segment Type (0x92) Command1 Command2 Command3 Command4... Figure 4-17: Initialization Commands Segment Format The Initialization Commands segment type selects a segment format that holds the PMD commands that are processed during powerup. The segment type value for the Initialization Commands segment type is 0x92. The overall format of this segment type is shown in Figure 4-17. Atlas commands stored into the segment data portion of the Initialization Commands segment is formatted exactly as if it were being sent by the external controller using the SPI protocol during normal SPI operations. See Chapter 5, "SPI Communications" for more information on the exact format of Atlas commands sent over the SPI protocol. The table below shows a portion of an example initialization command sequence. These example commands enable automatic event recovery mode, delay for 256 cycles so that other system components may initialize themselves, and enable motor output and current control. Segment Data Address Data1 Data2 Data3 Data4 Data5 Data6 Data7 Data8 Data9 Mnemonic SetDriveFaultParameter 2 1 InitializationDelay 0 256 SetOperatingMode 0x7 Stored Code (in hex) Comments 0xEF62 Opcode (0x62) and checksum 0x0002 Argument 1: event handling mode 0x0001 Argument 2: automatic event recovery 0x1F35 Opcode (0x35) and checksum 0x0000 Argument 1: time delay 0x0000 Argument 2: delay, high word 0x0100 Argument 2: low word 0xE865 Opcode (0x65) and checksum 0x0007 Argument 1: Enable output, current loop Atlas® Digital Amplifier Complete Technical Reference 77 4 Operation See Section 4.13.4, "Initialization Commands Segment Type" for an example of a complete PSF memory image including an initialization command sequence. See Section 4.12, "Power-up" for more information on initialization command processing during power up. 4.13.5 Parameter List Segment Type Figure 4-18: Parameter List Segment Format Segment Header Segment Data Segment Header For Parameter List Segment Type (0x90) Parameter Assignment Entry1 Parameter Assignment Entry2 Parameter Assignment Entry3... The Parameter List segment type provides a general purpose mechanism for the assignment of values to parameters. A major use of the Parameter List segment type is to allow human-readable identification information to be recorded and read back, thereby assisting with the identification of PSF-stored data. See Section 4.13.5.2, "Using the ID Segment Mechanism" for information on how this segment ID mechanism is used within the PSF system. The segment type value for the Parameter List segment type is 0x90. The overall format of this segment type is shown in Figure 4-18. The parameter list segment type contains one or more assignments of the general form: Parameter = Assigned Value Parameter specifies the name of the parameter being assigned. Assigned Value contains the value to assign to the parameter. Assigned Value may be formatted as a character string, an integer, a floating point number, or other formats depending on the Parameter being assigned. The data structure that is used to encode each such assignment in the Parameter List segment data area is called a parameter assignment entry. The following section details the format of this data structure. 78 Atlas® Digital Amplifier Complete Technical Reference 4.13.5.1 Parameter Assignment Entry Operation 4 Data1 Data2 Data3 Data4 Data5 Data6... Parameter2 Parameter1 Parameter4 Parameter3 Type Length Assigned Value1 AAssssiiggnneedd VVaalluuee20 Assigned Value3... Figure 4-19: Format of Parameter Assignment Entry Figure 4-19 shows the encoding of the data words for a parameter assignment entry. The Parameter field is specified as four byte-length ASCII characters. The Type determines the encoding of the Assigned Value data. This field has a length of four bits. The Length field determines the number of words contained in the Assigned Value. This field has a length of 12 bits. Assigned Value1, Assigned Value2, etc... hold the data words comprising the Assigned Value. Six specific parameters can be assigned for the purpose of segment identification. Note that not all of these parameters need to be recorded. If not found, Pro-Motion will simply not display the contents for those specific segment IDrelated parameters. The following table provides details on the six available segment-ID related parameters Parameter Field Encoding C, N, [0], [0] C,V,E,R D,E,S,C F,N,[0],[0] Data Encoding Length & Type Description The Assigned Value fields contain a The CN parameter specifies a general purpose name identifier for UTF-16 uni-code character string the segment to follow. An example name might be "X axis motor of a variable length set via the init. cmds." Note that the two unused parameter field words after length field. The type code for a "CN" are filled with zeroes. UTF-16 encoded string is 0. See above The CVER parameter specifies a version identifier for the segment to follow. An example version might be "version12.3." See above The DESC parameter specifies a general purpose comment for the segment to follow. An example comment might be "These gain factors were determined using the prototype unit in the engineering lab." See above The FN parameter specifies the script file name used to store or retrieve the data in the segment to follow. An example file name might be "xaxis.txt." Note that the two unused parameter field bytes after "FN" are filled with ASCII nuls. Atlas® Digital Amplifier Complete Technical Reference 79 4 Operation F,D,[0],[0] See above W,D,[0],[0] See above The FD parameter specifies the modification time of the script file used to store the data in the segment to follow. Times should be recorded in ISO-8601 format "YYYY-MM-DDThh:mm:ss", with hh recorded in 24 hour format. If desired only the year, month and day need be specified. The time portion of this assigned value is optional. An example assigned value might be "2017-0125T17:13:00" to store a date and time of January 25, 2017 at 5:13pm. Note that the two unused parameter field bytes after "FD" are filled with ASCII nuls. The WD parameter specifies the time that data in the segment to follow was written to NVRAM. See "FD" description for encoding and usage example. Note that the two unused parameter field bytes after "WD" are filled with ASCII nuls. 4.13.5.2 Using the ID Segment Mechanism Collectively the six parameters from the table above are known as an ID segment. ID Segments specify information for the data segment that immediately follows it in the NVRAM PSF memory space. When used to provide segment identifying information Pro-Motion, or a similar software program, takes ID information provided by the user and stores it in the correct format into the Parameter List segment. The same software program can later search the PSF memory space for segments of type Parameter List which hold the correct parameters to retrieve these assigned values for display to the user. For example if the segment name (see Section 4.13.5.1, "Parameter Assignment Entry" for the various types of ID information that can be stored) was specified and saved to NVRAM as "Axis 1 motor gains" by the user during development, Pro-Motion would read from an Atlas with unknown contents and retrieve this same string for display to the user. Other than checking the segment checksum the Atlas unit does not read or otherwise process the ID segment. ID segment information is recorded and retrieved by programs such as Pro-Motion for the convenience and utility of the user. Inclusion of an ID-containing segment is therefore optional. 4.13.6 User Defined Segment Types PSF is a highly flexible data storage system that allows the user to store and if desired, label via the ID segment mechanism structured data into the Atlas NVRAM. Other than ensuring that the overall NVRAM memory size is not exceeded and that the segment header format is followed there are no restrictions placed on what can be stored in the PSF memory space. Although not required, PMD recommends that each user-defined segment be preceded with an ID segment that identifies the contents as detailed in Section 4.13.5, "Parameter List Segment Type". Doing so will assist in keeping track of what data was stored, when, etc... It will also allow the user to develop software tools that can scan the content of the PSF NVRAM space and display a summary of what is stored there, or to utilize Pro-Motion to provide this function. 4.13.7 Complete Example PSF Memory Space Figure 4-20 provides a word-by-word example of an NVRAM image used to store PSF-formatted initialization commands along with associated segment ID content. 80 Atlas® Digital Amplifier Complete Technical Reference Addr Word 1 0x0000 2 0x0000 3 0x0000 4 0x0001 5 0x0005 6 0x0006 7 0x0007 8 0x0008 9 0x2D90 10 0x0000 11 0x0000 12 0x002D 13 0x0000 14 0x4E43 15 0x0000 16 0x0005 17 0x0049 18 0x006E 19 0x0069 20 0x0074 21 0x0031 22 0x5643 23 0x5245 24 0x0003 25 0x0031 26 0x002E 27 0x0032 28 0x4544 29 0x4353 30 0x0004 31 0x0074 32 0x0065 33 0x0073 34 0x0074 35 0x4E46 36 0x0000 37 0x0008 38 0x0066 39 0x0069 Contents Comments 0 PSF Start Sequence 0 0 1 5 PSF User Sequence 6 7 8 Chksm, seg. type Parameter List identifier Segment reserved length low length high `C', 'N' Assign CN = "Init1" nul, nul type, length "I" "n" "i" "t" "1" `C', `V' Assign CVER="1.2" 'E', 'R' type, length "1" "." "2" `D', `E' Assign DESC = "test" `S', 'C' type, length "t" "e" "s" "t" `F', `N' Assign FN = "file.txt" nul, nul type, length "f" "i" Operation 4 Addr Word Contents Comments 40 0x006c "l" 41 0x0065 "e" 42 0x002E "." 43 0x0074 "t" 44 0X0078 "x" 45 0x0074 "t" 46 0x4457 `W', `D' Assign WD = 47 0x0000 nul, nul "2017-01-25" 48 0x000A type, length 49 0x0032 "2" 50 0x0030 "0" 51 0x0031 "1" 52 0x0037 "7" 53 0x002D "-" 54 0x0030 "0" 55 0x0031 "1" 56 0x002D "-" 57 0x0032 "2" 58 0x0035 "5" 59 0xB992 chksum, seg. type Initialization Comments 60 0x0000 identifier Segment 61 0x0000 reserved 62 0x0009 length low 63 0x0000 length high 64 0xEF62 65 0x0002 SetDriveFault Parameter 2 1 66 0x0001 67 0x1F35 ExecutionControl 0 256 68 0x0000 69 0x0000 70 0x0100 71 0xE865 SetOperatingMode 7 72 0x0007 Figure 4-20: Example PSF Memory Space Image 4.14 Writing and Reading NVRAM Data The preceding sections described the format of data written to or read from the Atlas unit's NVRAM memory. The following section describes how writing and reading to the NVRAM memory space is accomplished. 4.14.1 Writing to NVRAM There are significant restrictions to writing to the NVRAM area. In particular it is not possible to erase and rewrite selected sections of the memory space. Only the special sequence described in this section can be used to write memory into the user NVRAM space. Atlas® Digital Amplifier Complete Technical Reference 81 4 Operation As detailed in Section 4.13, "Non-Volatile (NVRAM) Storage" if used, the NVRAM memory area should follow the PMD Structured data Format. Failure to do so may result in unexpected behavior of the Atlas unit during power up or during operation. If not used the NVRAM area does not need to be written to or otherwise initialized. Data stored into the NVRAM area must follow the PSF format detailed in Section 4.13, "Non-Volatile (NVRAM) Storage" . Failure to do so may result in unexpected behavior of the Atlas. The following sequence is used to store command initialization data or other data to the non-volatile memory area: 1 Send a DriveNVRAM command with an argument of NVRAMMode. Sending this command places Atlas in a special mode allowing it to store memory into the NVRAM. Before proceeding the external controller should delay 1 second or more. 2 Send a DriveNVRAM command with an argument of EraseNVRAM. This command will erase the entire NVRAM memory area. Before proceeding the external controller should delay four seconds or more. 3 For each 16-bit word of data that is to be written into the NVRAM area the command DriveNVRAM with an argument of Write is sent, along with the data word to be written. After each word is written Atlas increments an internal pointer so that subsequent data words are automatically stored in the correct location. 4 Check for NVRAM write completion by sending a NOP command until a valid checksum is returned. In most cases this will occur right away, however due to the nature of NVRAM writing there may be times when this takes up to a millisecond. Once a valid checksum is returned check the Instruction error bit of the returned SPI Status register. If an error is recorded the entire sequence described above must be repeated from step 2. If no error is recorded continue by repeating steps 3 & 4 until all data is written. 5 Once all data is successfully written the external controller should send a Reset command, which will cause Atlas to reboot and execute a power up sequence. Note that this power-up sequence will include processing the stored data sent using the above sequence. If an error occurs when processing NVRAM the Instruction Error event bit will be set and the GetInstructionError command may be used to read the error code. 4.14.2 Reading Non-Volatile Memory If desired, it is possible to directly read the NVRAM memory area using buffer commands. See Section 4.10, "User Memory Space & Buffers" for more information on Atlas buffer processing. To read the whole NVRAM area the buffer location should be set to 0x20000000 and the length should be set to 1,024. The standard ReadBuffer16 command can be used. It is not possible to write to the NVRAM area using the buffer commands. The procedure outlined in Section 4.14.1, "Writing to NVRAM" must be used to write data to the NVRAM area. 4.15 SPI Communications Overview Atlas uses an SPI (Serial Peripheral Interface) digital connection to communicate with the external controller. This connection is used to setup Atlas parameters, specify voltage or torque output values, monitor Atlas operation, as well as other functions. 82 Atlas® Digital Amplifier Complete Technical Reference Operation 4 SPI is a convenient interface because it is available on many microprocessors, provides relatively high speed communications, and uses only 4 signals; SPIClk (Clock), SPICS (chip select), SPISI (slave in), and SPISO (slave out). Atlas utilizes standard SPI signaling and timing control for the hardware interface and implements a higher level protocol on top of this. See Section 3.6, "AC Characteristics" to learn more about low-level hardware SPI signal timing, voltage levels, etc. Controller word 0 Atlas word 0 x t u0 Header data 1 SPI Status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 Atlas word 1 Header data 2 Atlas checksum Controller checksum 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 4-21: SPI Communications Protocol Overview Controller word 2-N Optional command Atlas word 2-N Optional command response 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 All communications to and from Atlas are in the form of a packet. Figure 4-21 shows the overall packet format. A falling edge of the chip select begins the packet, and a rising edge of the chip select ends the packet. All Atlas SPI packets are comprised of a two word header and one or more optional command words. The first two words of the packet are called the header and are used to specify a desired motor voltage or torque along with certain other functions such as when a trace starts and when a command update should occur. As shown in Figure 4-21 each SPI word sent from the external controller to Atlas results in a return word sent from Atlas to the external controller. In fact at a signal level, each outgoing bit is sent simultaneously with each incoming bit, providing full duplex communications. The external controller must receive and process data words sent to it by Atlas. These return words, depending on the context, contain transmission integrity information, status bits, or other useful information. 4.15.1 Sending a Voltage or Torque Output Value Controller word 0 0 t u 0 Data 1 Atlas word 0 SPI Status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 Data 2 Atlas word 1 Atlas checksum Controller checksum 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Generally the most frequently used header transaction is an instantaneous voltage or torque output request for output by the drive. If Atlas is used as part of a higher level velocity or position controller, then these values are continuously sent to Atlas at the servo sampling speed of the main motion controller, typically between 1 kHz and 10 kHz. Figure 4-22 shows the overall format of the header words when voltage or torque commands are being sent. Depending on the motor type and command mode being used the data words will be loaded one of several different ways. For a complete description of these fields, along with many other details of Atlas SPI operation, refer to the Atlas Digital Amplifier Complete Technical Reference. Figure 4-22: Sending a Voltage or Torque Output Value Atlas® Digital Amplifier Complete Technical Reference 83 4 Operation This page intentionally left blank. 84 Atlas® Digital Amplifier Complete Technical Reference 5.SPI Communications 5 In This Chapter SPI Communications Overview Packet Header Sending a Voltage or Torque Output Value Sending an Amplifier Disable Sending aNOP Sending Atlas Commands 5.1 SPI Communications Overview Atlas uses an SPI (Serial Peripheral Interface) digital connection to communication with the external controller. This connection is used to setup Atlas parameters, specify voltage or torque output values, monitor Atlas operation, as well as other functions. SPI is a convenient interface because it is available on many microprocessors, provides relatively high speed communications, and uses only 4 signals; SPIClk (Clock), SPICS (chip select), SPISI (slave in), and SPISO (slave out). Atlas utilizes standard SPI signaling and timing control for the hardware interface and implements a higher level protocol on top of this. See Section 3.6, "AC Characteristics" to learn more about low-level hardware SPI signal timing, voltage levels, etc. Controller word 0 Atlas word 0 x t u0 Header data 1 SPI Status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 Atlas word 1 Header data 2 Atlas checksum Controller checksum 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 5-1: SPI Communications Protocol Overview Controller word 2-N Optional command Atlas word 2-N Optional command response 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 All communications to and from Atlas are in the form of a packet. Figure 5-1 shows the overall packet format. A falling edge of the chip select begins the packet, and a rising edge of the chip select ends the packet. All Atlas SPI packets are comprised of a two word header and one or more optional command words. Atlas® Digital Amplifier Complete Technical Reference 85 5 SPI Communications 5.2 Packet Header The first two words of the packet are called the header and are used to specify a desired motor voltage or torque along with certain other functions such as when a trace starts and when a command update should occur. Here is a detailed description of the Atlas packet header: Field Bit data 1 0-11 12 u 13 t 14 x 15 data 2 0-15 Name Header data 1 Reserved Update flag Trace active flag Torque data flag Header data 2 Description Holds various data, the format of which depends on the state of the Torque data flag. This field is reserved, and should be loaded with a 0. A 0 in this field means that a buffered command update is not commanded. A 1 in this field results in an update of all buffered parameters. This field controls various trace-related activities. See Section 4.11, "Trace Capture" for details. A 0 in this field means that trace is not active. A 1 signals that a trace is active, or that a capture is requested. A 0 in this field means the header will contain a desired voltage or torque output value. A 1 means that it will contain a request for a disable operation or a NOP operation. Holds various data, the format of which depends on the state of the Torque data flag. The `x' bit field affects the format of other fields, in particular the data 1 and data 2 fields. Therefore care should be taken to correctly select the value of this field and associated data 1 and data 2 fields. The `t' and the `u' bit-fields do not affect the format of other fields, and may be set to any value at any time as desired by the external controller. These fields are a means for the external controller to synchronize activities for trace and update-related functions of Atlas. See Section 4.11, "Trace Capture" for more information on use of the trace active flag. 5.2.1 Header Return Words As shown in Figure 5-1 each SPI word sent from the external controller to Atlas results in a return word sent from Atlas to the external controller. In fact at a signal level, each outgoing bit is sent simultaneously with each incoming bit, providing full duplex communications. The external controller must receive and process data words sent to it by Atlas. These return words, depending on the context, contain transmission integrity information, status bits, or other useful information. The table below provides the contents of the data words returned by Atlas during header SPI transmissions. Field SPI Status word Atlas checksum Controller checksum Description Contains 16 bits of drive status, signal status, and event information that can be monitored by the external controller. See Section 4.7.4, "SPI Status Register" for a complete description of this word. Atlas checksum is the 8 bit, ones-complement checksum of four bytes: the low byte of SPI Status Word, the high byte of SPI Status Word, the Controller Checksum byte (see next field), and the byte value 0xAA. These four bytes along with the Atlas checksum received by the external controller should evaluate to a checksum of 0xFF. Controller checksum is the 8 bit, ones-complement checksum of five bytes: the low and high bytes of both previously received header words and the byte value 0xAA. These five bytes along with the controller checksum received by the external controller, should evaluate to a checksum of 0xFF. 86 Atlas® Digital Amplifier Complete Technical Reference SPI Communications 5 The external controller should verify both the Atlas and Controller checksum. Checksum errors of any kind may indicate a serious problem with external controller to Atlas communications. It it the responsibility of the user to determine the source of any communication problems and take appropriate corrective action 5.2.1.1 Example Checksum Calculations A ones-complement checksum is computed by adding each 8 bit byte as an unsigned quantity, and in case of a carry adding 1. Only the low 8 bits are kept for the final result. A seed of 0xAA is used to make sure that the checksum does not verify in the case that a data line is locked either high or low. Here is an example of header checksum calculations in the host: Assume the two words of the previously sent header were 0x6789 and 0xABCD. Assume that the just-received SPI Status Word has a value of 0x147A, and assume that the received Atlas and Controllers checksums are 0xDB and 0xEA respectively. First, we check the controller checksum-related fields. This is a ones complement addition as follows: 0x67 0x89 0xAB 0xCD 0xAA 0xEA + -----0XFF / high byte of header word 1 / low byte of header word 1 / high byte of header word 2 / low byte of header word 2 / checksum seed / received controller checksum The total indeed equals 0xFF, indicating that Atlas correctly received the previous two header words. Next, we check the Atlas checksum-related fields. This is a ones-complement addition as follows: 0x14 0x7A 0xEA 0xAA 0xDB + ---0xFF / high byte of received SPI Status Word / low byte of received SPI Status Word / received controller checksum / checksum seed / received Atlas checksum Atlas® Digital Amplifier Complete Technical Reference 87 5 SPI Communications 5.3 Sending a Voltage or Torque Output Value Figure 5-2: Sending a Voltage or Torque Output Value Controller word 0 0 t u 0 Data 1 Atlas word 0 SPI Status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 Data 2 Atlas word 1 Atlas checksum Controller checksum 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Generally the most frequently used header transaction is an instantaneous voltage or torque output request for output by the drive. If Atlas is used as part of a higher level velocity or position controller, then these values are continuously sent to Atlas at the servo sampling speed of the main motion controller, typically between 1 kHz and 10 kHz. Figure 5-2 shows the overall format of the header words when voltage or torque commands are being sent. Depending on the motor type and command mode being used the data words will be loaded one of several different ways. The following table shows this: Header Data Word Contents Description DC Brush Data 1 0 Must contain zero Data 2 Torque Contains a 16-bit signed integer representing the desired torque. The provided current value is an unsigned 16-bit integer with units of 1.526 mA/count. For example a specified value of 6,553 represents a current command of 1.526mA * 6,553 = 10.00 A. Brushless DC Data1 Phase angle Contains a 12-bit unsigned integer representing the electrical phase angle of the motor. A value of 0 equals 0.0°, and a value of 0xFFF represents 359.9°. See Section 4.4, "Commutation" for more information on phase control in brushless motors. Data 2 Torque Contains a 16-bit signed integer representing the desired torque. See the above description for the torque scaling. Step Motor SPI Pulse & Direction Mode Data 1 AtRest Indicator Bit 0 indicates whether the motor is at rest. If set to 1 motor is at rest and Atlas will use the pre-programmed holding torque. If set to 0 Atlas will use the pre-programmed drive torque. Data 2 Position increment Contains a 16-bit signed integer representing the relative position increment to move. See Section 4.9.2, "SPI Pulse & Direction Mode" for more information 88 Atlas® Digital Amplifier Complete Technical Reference 5.4 SPI Communications 5 Sending an Amplifier Disable Controller word 0 1 t u 0 1 checksum Atlas word 0 SPI Status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 0 Atlas word 1 Atlas checksum Controller checksum 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 5-3: Amplifier Disable Command Format The header can be used to rapidly disable Atlas motor output. This operation is identical to sending a SetOperationMode command with current loop and power stage modules disabled, however faster. To disable Atlas output, a 1 should appear in the `x' field (bit 15 of the first header word), the high four bits of Data 1 should be loaded with a 1, a checksum should be loaded into the low 8 bits of Data 1, and 0 should be loaded into Data 2. This is shown in Figure 5-3. The checksum byte should be loaded such that when the ones-complement checksum of all four bytes of the header words, the byte value 0xFF, and the transmitted checksum byte evaluate to 0xFF. If the checksum is not correct, Atlas will take no action as a result of this packet transmission. 5.5 Sending a NOP Controller word 0 1 t u 0 0 anything Atlas word 0 SPI Status word 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 5-4: NOP Command Format Controller word 1 anything Atlas word 1 Atlas checksum Controller checksum 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 There are times when it may be useful to send a header without providing a new torque command or disabling the drive. This might be the case, for example, when the external controller only wants to update the `t' (trace) header field or the `u' (update) fields. In addition, this may be useful to verify controller to Atlas communication without requesting a specific action. Such an operation is called a NOP (no operation) header transaction. To send a NOP to Atlas, a 1 should appear in the `x' field (bit 15 of the first header word), the high four bits of Data 1 should be loaded with a 0, the low byte of Data 1 can contain anything, and Data 2 can contain anything. This is shown in Figure 5-4. Atlas® Digital Amplifier Complete Technical Reference 89 5 SPI Communications 5.6 Sending Atlas Commands Header communication transactions, described in the preceding sections, always consist of two 16-bit words. As such, they are well suited to high speed operations such as continuously sending desired torque commands. In addition to header communications however, Atlas supports an extensive command set that specifies and queries a much larger number of registers and parameters. Throughout this manual we have illustrated the use of this command set with mnemonics, for example the commands SetOperatingMode or GetEventAction. Access to this full Atlas command set is supported within the SPI protocol using the command words shown in Figure 5-5. Commands are split into two overall groups, those that specify information to Atlas, and those that query information from Atlas. Processing of each type is somewhat different, and the following sections will describe both of these types of command operations. 5.6.1 Sending an Atlas Command Figure 5-5: Send Command Format Controller word 0 checksum opcode Atlas word 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 argument word 0 Atlas word 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 2 argument word 1 Atlas word 2 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 3 argument word 2 Atlas word 3 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 5-5 shows the overall format for commands that request an action or specify data to Atlas. The associated data fields begin at the third word of the overall SPI packet and consist of a checksum byte, an opcode byte, and one or more argument data words. The checksum is calculated by ones-complement adding a byte value of 0xAA and all bytes of all words of the command including the opcode and argument words, but not including any data words in the header. When evaluated, this checksum should give a value of 0xFF for the checksum. Each separate command mnemonic supported by Atlas is encoded with a unique 8 bit opcode. These opcodes, along with the argument fields of the command data word, are listed in Chapter 6, the Programmer Command Reference. Users familiar with PMD's Magellan, Navigator, or 1st generation motion processor products will note that the overall format of these commands are very similar to those products. 90 Atlas® Digital Amplifier Complete Technical Reference 5.6.2 Error Processing SPI Communications 5 If the command checksum shown in Figure 5-6 received by Atlas does not evaluate to 0xFF Atlas will return an SPI Checksum Error and set the instruction error bit of the Event Status register. In addition to such checksum errors the instruction error bit is set when an otherwise valid instruction or instruction sequence is sent when the Atlas unit's current operating state makes the instructions invalid, when an invalid opcode is sent, or when the arguments to a command are invalid. 5.6.3 Sending Commands that Query Information Controller word 0 0 Atlas word 0 checksum result status 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 1 0 Atlas word 1 result word 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Controller word 2 0 Atlas word 2 result word 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 5-6: Query Command Format Controller word 3 0 Atlas word 3 result word 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Figure 5-6 shows the overall return packet format for an Atlas command sent by the external controller that requests information from Atlas. Atlas returns a series of result words. The first such word contains a checksum byte such that the ones-complement sum of 0xAA, the checksum itself, and all the data bytes returned by Atlas evaluates to 0xff. This checksum is correct when the ones-complement sum of these bytes is 0xFF. This first result word also contains a signed 8-bit number containing the number of result words to follow. If this number is negative, an error has occurred, and the instruction error bit of the Event Status register is set. Subsequent result words hold the actual data being returned by Atlas. For example if the command GetOperatingMode is sent, the first result word will contain an 8-bit checksum in the high byte and the number 1 in the low byte indicating 1 data word to follow. The next result word will contain the actual 16-bit value of the operating mode register. During a read command, while the external controller is loading data from Atlas, it should write zeroes to the SPI bus. Similarly, during a write command by the external controller Atlas loads zeroes in the return word. Therefore it is recommended that the external processor check that these words have a zero. If not, this indicates that the external controller has become out of synch with Atlas indicating a communication problem. Atlas® Digital Amplifier Complete Technical Reference 91 5 SPI Communications 5.6.4 Interlacing Command Communications There may be situations where processing the entire Atlas command sequence in one contiguous SPI packet will place an undue burden on the external processor. This is particularly true if the external processor has a large number of axes to manage and a limited time slice to send information to each connected Atlas. To lower the worst case timing burden of sending and retrieving results from commands Atlas allows the command data stream to be interlaced with header operations. In other words Atlas does not require that each transmitted or received word associated with command processing occur in its entirety after a particular header transaction. The overall command data transmissions may occur over the course of several such header transactions. 92 Atlas® Digital Amplifier Complete Technical Reference 6. Instruction Reference 6 6.1 How to Use This Reference The instructions are arranged alphabetically, except that all "Set/Get" pairs (for example, SetFOC and GetFOC) are described together. Each description begins on a new page and most occupy no more than a single page. Each page is organized as follows: Name Syntax Buffered Motor Types Arguments Packet Structure Description Restrictions see The instruction mnemonic is shown at the left, its hexadecimal code at the right. The instruction mnemonic (in bold) and its required arguments (in italic) are shown with all arguments separated by spaces. Certain parameters and other data written to the motion processor are buffered. That is, they are not acted upon until the next command update. These parameters are identified by the word "buffered" in the instruction heading. The motor types to which this command applies. Supported motor types are printed in black; unsupported motor types for the command are greyed out. There are two types of arguments: encoded-field and numeric. Encoded-field arguments are packed into a single 16-bit data word. The name of the argument (in italic) is that shown in the generic syntax. Instance (in italic) is the mnemonic used to represent the data value. Encoding is the value assigned to the field for that instance. For numeric arguments, the parameter value, the type (signed or unsigned integer), and the range of acceptable values are given. Numeric arguments may require one or two data words. For 32-bit arguments, the high-order part is transmitted first. This is a graphic representation of the 16-bit words transmitted in the packet: the instruction, which is identified by its name, followed by 1, 2, or 3 data words. Bit numbers are shown directly below each word. For each field in a word, only the high and low bits are shown. For 32-bit numeric data, the high-order bits are numbered from 16 to 31, the low-order bits from 0 to 15. The hex code of the instruction is shown in boldface. Argument names are shown in their respective words or fields. For data words, the direction of transfer--read or write--is shown at the left of the word's diagram. Unused bits are shaded. All unused bits must be 0 in data words and instructions sent (written) to the motion processor. Describes what the instruction does and any special information relating to the instruction. Describes the circumstances in which the instruction is not valid, that is, when it should not be issued. For example, GetCommandedPosition is relevant only in pulse and direction mode. Refers to related instructions. Atlas® Digital Amplifier Complete Technical Reference 93 6 ClearDriveFaultStatus 6Ch Syntax Motor Types Arguments Packet Structure Description Restrictions see ClearDriveFaultStatus DC Brush None Brushless DC Microstepping ClearDriveFaultStatus checksum 6Ch 15 87 0 ClearDriveFaultStatus clears all bits in the Drive Fault Status register. A bit is cleared only if it has been read by GetDriveFaultStatus since the last detection of the fault condition, so that information on faults detected between GetDriveFaultStatus and ClearDriveFaultStatus is not lost. GetDriveFaultStatus (p. 102) 94 Atlas® Digital Amplifier Complete Technical Reference DriveNVRAM 30h 6 Syntax Motor Types Arguments DriveNVRAM Option Value DC Brush Name option Brushless DC Microstepping Instance NVRAM Mode Erase NVRAM Write Block Write Begin Block Write End Skip Encoding 0 1 2 3 4 8 Packet Structure Description value Type unsigned 16-bit Range See below None DriveNVRAM write checksum 30h 15 87 0 write option 15 0 write value 15 0 The DriveNVRAM command is used to program the non-volatile memory. This memory is used primarily for user-specified power-on initialization, but may also be used for storing arbitrary nonvolatile user data. The command DriveNVRAM 0 1 may be used to reset Atlas without executing the commands in NVRAM. This command is required in order to read NVRAM contents when they would configure Atlas in pulse and direction input mode. It may be used either in NVRAM or normal modes. Atlas must be put in a special mode of operation in order to program NVRAM, in this mode most Atlas commands are not supported, and will return an error code of NVRAM Mode (26). In order to enter NVRAM mode, use the command DriveNVRAM 0 0. While changing to NVRAM mode Atlas will not respond to SPI communications, so the controlling processor should use this sequence of operations: 1) Send the DriveNVRAM command 2) Wait for at least 500 microseconds 3) Send a NOP torque command 4) While the checksum read is wrong, repeat step (3) This sequence of operations should also be used with the Erase NVRAM, Write, and Block Write End commands, all of which may interfere with SPI communications for some time. The Instruction Error bit of the SPI status word should be checked after each such NVRAM operation, and the GetInstructionError command used to check error status if it is set. Atlas® Digital Amplifier Complete Technical Reference 95 6 DriveNVRAM (cont.) Description (cont.) Restrictions see NVRAM bits may be cleared individually, but may only be set as an entire block. This operation is called an erase, in the erased state each word reads as 0xFFFF. Typically NVRAM will be erased each time new initialization instructions are written, but this is not absolutely required. In order to erase NVRAM, use the command DriveNVRAM 1 0, and follow the wait sequence shown for entering NVRAM mode. After erasing NVRAM, 16-bit words may be written, beginning at location zero. After writing each word an internal pointer will be advanced to the next location. It is the user's responsibility to keep track of the current write position, it cannot be directly read. In order to write a single word, use the command DriveNVRAM 2 Value, where Value may be any 16-bit word. After writing the wait sequence should be followed. If it is desired to skip a sequence of locations that already have the correct values the command DriveNVRAM 8 N may be used, where N is the number of words to skip. No wait procedure is required after this command. In order to speed up long NVRAM writes a block write facility is provided. A block write is begun by using the DriveNVRAM 3 N command, where N is the number of words that will be written as a block. N may be at most 32. No wait procedure is required after this command. The values to write are provided using a torque-like command, the first header word of this command is 0x0F00, and the second word is the value to write to an internal buffer. Once all the values of a write block have been sent the command DriveNVRAM 4 checksum should be sent to start the actual write process. The checksum argument is a 16-bit ones complement checksum over all of the words to be written, if Atlas does not verify the checksum it will respond with an NVRAM checksum Error (25). If the checksum is verified then the success code will be returned, and the wait procedure should be followed. When all NVRAM operations are complete it is necessary to either power cycle Atlas or send a Reset command in order to exit NVRAM mode. It is not necessary to enter NVRAM mode in order to read the contents of NVRAM, that may be done by using the SetBufferStart command to specify the NVRAM base, 0x20000000, as the start of a buffer, and the ReadBuffer16 command to retrieve NVRAM values. Before entering NVRAM mode motor output must be disabled by setting the operating mode to 1. Most ordinary commands are not supported in NVRAM mode. SetOperatingMode (p. 144), GetInstructionError (p. 108), SetBufferStart, ReadBuffer16 (p. 121) 96 Atlas® Digital Amplifier Complete Technical Reference GetActiveOperatingMode 57h 6 Syntax Motor Types Arguments Returned Data Packet Structure Description Restrictions see GetActiveOperatingMode DC Brush None mode Brushless DC Microstepping Type unsigned 16 bits bit field GetActiveOperatingMode checksum 57h 15 87 0 First data word read mode 15 0 GetActiveOperatingMode gets the actual operating mode that the Atlas is currently using. This may or may not be the same as the static operating mode, as safety responses or programmable conditions may change the Active Operating Mode. When this occurs, the Active Operating Mode can be changed to the programmed static operating mode using the RestoreOperatingMode command. The bit definitions of the operating mode are given below. Name Bit -- 0 Motor Output Enabled 1 Current Control Enabled 2 -- 315 Description Reserved. 0: motor outputs disabled. 1: motor outputs enabled. 0: current control bypassed. 1: current control active. Reserved When the current loop is disabled, it operates by passing its input directly to its output, and clearing all internal state variables (such as integrator sums, etc.). GetOperatingMode (p. 144), RestoreOperatingMode (p. 125), Set/GetEventAction (p. 139) Atlas® Digital Amplifier Complete Technical Reference 97 6 GetBusVoltage 40h Syntax GetBusVoltage Motor Types Arguments DC Brush None Brushless DC Microstepping Returned Data voltage Type unsigned 16 bits Range 0 to 2161 Scaling 1.3612 mv/count Packet Structure GetBusVoltage checksum 40h 15 87 0 First data word read voltage 15 0 Description GetBusVoltage gets the most recent bus voltage reading from the Atlas. Restrictions see Get/SetDriveFault (p. 102) 98 Atlas® Digital Amplifier Complete Technical Reference GetChecksum F8h 6 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions GetChecksum DC Brush None Brushless DC Name checksum Type unsigned 32 bits Microstepping GetChecksum checksum F8h 15 87 0 First data word read checksum (high-order part) 31 16 Second data word read checksum (low-order part) 15 0 GetChecksum reads the Atlas internal 32-bit checksum value. The return value is dependent on the silicon revision number of the motion processor. Atlas® Digital Amplifier Complete Technical Reference 99 6 GetCommandedPosition Syntax Motor Types Arguments Returned data GetCommandedPosition None position Type signed 32 bits Microstepping Range 231 to 2311 Scaling unity 1Dh Units microsteps Packet Structure Description Restrictions see GetCommandedPosition checksum 1Dh 15 87 0 First data word read position (high-order part) 31 16 Second data word read position (low-order part) 15 0 GetCommandedPosition returns the commanded position. Commanded position is the instantaneous position value resulting from accumulated pulse and direction commands. The result is not meaningful unless Atlas is in pulse and direction mode, either hardware or SPIemulated GetDriveCommandMode (p. 135) 100 Atlas® Digital Amplifier Complete Technical Reference GetCurrentLoopValue 71h 6 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see GetCurrentLoopValue loopnum node DC Brush Brushless DC Microstepping Name phase node Instance Phase A Phase B Reference Actual Current Error -- (Reserved) Integral Contribution Output I2t Energy Encoding 0 1 0 1 2 4 5 6 10 value Type signed 32 bits Range/Scaling see below GetCurrentLoopValue checksum 71h 15 87 0 First data word write 0 phase node 15 12 11 87 0 Second data word read value (high-order part) 31 16 Third data word read value (low-order part) 15 0 GetCurrentLoopValue is used to read the value of a node in one of the digital current loops. See the product user's guide for more information on the location of each node in the current loop processing. Though the data returned is signed 32 bits regardless of the node, the range and format vary depending on the node, as follows: Node Reference Actual Current Error Integral Contribution Output I2t Energy Range 2^15 to 2^151 2^15 to 2^151 2^15 to 2^151 2^31 to 2^311 2^15 to 2^151 2^31 to 2^311 Scaling Dependent on unit* Dependent on unit* Dependent on unit* 100/2^22 100/2^15 100/2^31 Units Amps Amps Amps % max output % max output % max energy * See Section 3.11, "Atlas Conversion Factors" for correct scaling for the Atlas unit you are using. This command is only supported when the current control mode is Phase A /B. Set/GetCurrentLoop (p. 133), Set/GetCurrentControlMode (p. 130), Set/Get Current Foldback (p. 131) Atlas® Digital Amplifier Complete Technical Reference 101 6 GetDriveFaultStatus 6Dh Syntax Motor Types Arguments Returned Data Packet Structure Description GetDriveFaultStatus DC Brush None status Brushless DC Microstepping Type unsigned 16 bits see below GetDriveFaultStatus checksum 6Dh 15 87 0 First Data Word read DriveFaultStatus 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 GetDriveFaultStatus gets the Drive Fault Status register, which is used to report the cause of several disabling events. The table below shows the bit definitions of the Drive Fault Status register. Name Overcurrent Fault -- (Reserved) -- (Reserved) Operating Mode Mismatch Watchdog Timeout Overvoltage Fault Undervoltage Fault Disabled by ~Enable Current Foldback Overtemperature SPI Checksum Error -- (Reserved) Bit 0 3 4 5 6 7 8 9 10 1115 All of the fault bits are associated with the Drive Exception event, and indicate the cause of that event. When the Drive Exception event is raised motor output is always disabled. Operating Mode Mismatch means that a torque command was received when Atlas motor output was not enabled. Watchdog Timeout means that no valid communication was received from a controlling SPI processor for the watchdog period, which is set using the SetDriveFaultParameter command. Disabled means that an inactive ~Enable signal was seen. Overcurrent means that an excessive bus or bridge leg current was detected. Over Voltage and Under Voltage mean that the bus voltage was outside acceptable limits, which may be modified by using the SetDriveFaultParameter command. Current Foldback means that a current foldback event has ocurred. Overtemperature means that the internal temperature reading has exceeded the limit, which may be specified using the SetDriveFaultFaultParameter command. 102 Atlas® Digital Amplifier Complete Technical Reference GetDriveFaultStatus (cont.) 6Dh 6 Description (cont.) Restrictions see SPI Checksum Error means that an error was detected in the header (first two words) of an SPI packet, used for sending torque commands. Checksums are only used when sending an amplifier disable command. See Section 5.4, "Sending an Amplifier Disable" for more information. Checksum errors detected in other command processing are reported using the Instruction Error bit in the Event Status register, and in the Instruction Error register. All bits in the Drive Fault Status register are latched, and may be cleared by using the ClearDriveFaultStatus command, which unconditionally clears all bits. The Drive Fault Status register should be cleared before attempting to handle any disabling condition, so the cause of subsequent failures may be determined. ClearDriveFaultStatus (p. 94), Set/GetDriveFault Parameter (p. 136), GetEventStatus (p. 105), GetInstructionError (p. 108) Atlas® Digital Amplifier Complete Technical Reference 103 6 GetDriveStatus 0Eh Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see GetDriveStatus DC Brush None status Brushless DC Microstepping Type unsigned 16 bits see below GetDriveStatus checksum 0Eh 15 87 0 First Data Word read DriveStatus 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 GetDriveStatus reads the Drive Status register. All of the bits in this status word are set and cleared by Atlas. They are not settable or clearable by command. The bits represent states or conditions in the Atlas that are of a transient nature. Name -- In Foldback Overtemperature -- In Holding Overvoltage Undervoltage Disabled -- Clipping -- (Reserved) Initialization Bit(s) 0 1 2 3 4 5 6 7 811 12 1314 15 Description Reserved; not used; may be 0 or 1. Set to 1 when the unit is in the current foldback state the output current is limited by the foldback limit. Set to 1 when the overtemperature condition is present. Reserved; not used; may be 0 or 1. Set to 1 when the unit is in the holding current state the output current is limited by the holding current limit. Set to 1 when the overvoltage condition is present. Set to 1 when the undervoltage condition is present. The ~Enable signal is not currently asserted. Reserved; not used; may be 0 or 1. Set to 1 when drive output is constrained by PWM limit or by operating limits, 0 when drive output is set by the current loop. Set to 1 when processing initialization commands in NVRAM, 0 when initialization is complete. The In Holding bit is meaningful only when in pulse and direction mode, either hardware or SPIemulated. ClearDriveFaultStatus (p. 94) 104 Atlas® Digital Amplifier Complete Technical Reference GetEventStatus 31h 6 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see GetEventStatus DC Brush Brushless DC None status Type unsigned 16 bits Microstepping see below GetEventStatus checksum 31h 15 87 0 Data read Event Status 15 14 13 12 11 10 9876 54 32 10 GetEventStatus reads the Event Status register. All of the bits in this status word are set by the internal events and cleared by command. To clear these bits, use the ResetEventStatus command. The following table shows the encoding of the data returned by this command. Name -- Instruction Error Overtemperature Fault Drive Exception -- Current Foldback -- Bit(s) 06 7 8 9 10 11 12 13-15 Description (Reserved) Set to 1 when an instruction error has occurred. (Reserved) Set to 1 when an overtemperature condition has occurred. Set to 1 when a disabling drive fault has occurred. (Reserved) Set to 1 when current foldback has occurred. (Reserved) GetDriveFaultStatus (p. 102), GetDriveStatus (p. 104), ResetEventStatus (p. 124) Atlas® Digital Amplifier Complete Technical Reference 105 6 GetFOCValue 5Ah Syntax Motor Types Arguments Returned data Packet Structure Description GetFOCValue loop node Name loop node value Brushless DC Microstepping Instance Encoding Direct (d) 0 Quadrature (q) 1 Reference (d,q) 0 Feedback (d,q) 1 Error (d,q) 2 -- (Reserved) 3-4 Integral Contribution (d,q) 5 Output (d,q) 6 FOC Output (Alpha,Beta) 7 Actual Current (A,B) 8 I2t Energy 10 Type signed 32 bits Range/Scaling see below GetFOCValue checksum 5Ah 15 87 0 First data word write 0 loop node 15 12 11 87 0 Second data word read value (high-order part) 31 16 Third data word read value (low-order part) 15 0 GetFOCValue is used to read the value of a node of the FOC current control. Though the data returned is signed 32 bits regardless of the node, the range and format vary depending on the node, as follows: Node Reference (d,q) Feedback (d,q) Error (d,q) Integral Contribution (d,q) Output (d,q) FOC Output (Alpha,Beta) Actual Current (A,B) I2t Energy Range 2^15 to 2^151 2^18 to 2^181 2^15 to 2^151 2^31 to 2^311 2^15 to 2^151 2^15 to 2^151 2^15 to 2^151 2^31 to 2^311 Scaling 100/2^14 100/2^14 100/2^14 100/2^14 100/2^14 100/2^14 100/2^14 100/2^30 Units % max current % max current % max current % max current % PWM % PWM % max current % max energy 106 Atlas® Digital Amplifier Complete Technical Reference GetFOCValue (cont.) 5Ah 6 Description (cont.) Restrictions see Most of the nodes have units of % maximum current, and most have a scaling of 100/2^14. That is, a value of 2^14 corresponds to 100% maximum current. The range is extended to allow for overshoot in excess of maximum peak current, and thus values can be more than 100% of the maximum output current. The maximum current is the largest current that can be represented rather than the maximum that can be sourced or sensed. The maximum current can be calculated via the formula: Max = Current Scaling * 0x8000 For example for the high power Altas, using the scale factor from Section 3.11, "Atlas Conversion Factors", the maximum current = 1.526mA/count * 0x8000 counts = 50A. This command is only supported when the current control mode is set to FOC. Set/GetFOC (p. 141), Set/GetCurrentControlMode (p. 130) Set/Get Current Foldback (p. 131) Atlas® Digital Amplifier Complete Technical Reference 107 6 GetInstructionError A5h Syntax Motor Types Arguments Returned data Packet Structure Description GetInstructionError DC Brush None Brushless DC Type First Error unsigned 8 bits Second Error unsigned 8 bits Microstepping Range 0 to 1Ch 0 to 1Ch GetInstructionError checksum A5h 15 87 0 Data read Second Error First Error 15 87 0 GetInstructionError returns two 8 bit codes indicating command failures, and then resets both error fields to zero. Generally, this command is issued only after the instruction error bit in the Event Status register indicates that there was an instruction error. If only one command failure has occurred then the second error field will be zero; if no command failures have occurred then both fields will be zero. After powering up or receiving a reset command Atlas will set the instruction error bit, and set the first error field in the instruction error register to Processor Reset (1). Any error occurring during initialization from NVRAM will be recorded by the second error field. The error codes are encoded as defined below: Error Code No error Processor reset Invalid instruction -- (Reserved) Invalid parameter Trace running -- (Reserved) Block out of bounds -- (Reserved) Invalid Operating Mode restore after event-triggered change Invalid Operating Mode for command Invalid register state -- (Reserved) Bad SPI command checksum Incorrect SPI command protocol SPI command timing violation Encoding 0 1 2 3 4 5 6 7 8Eh 10h 11h 12h 13h, 14h 15h 16h 17h 108 Atlas® Digital Amplifier Complete Technical Reference GetInstructionError (cont.) Description (cont.) Restrictions see Error Code Invalid torque command Bad flash checksum Command not valid in flash mode -- (Reserved) Command valid only for initialization Encoding 18h 19h 1Ah 1Bh 1Ch GetEventStatus (p. 105), ResetEventStatus (p. 124) A5h 6 Atlas® Digital Amplifier Complete Technical Reference 109 6 GetPhaseAngle 2Ch Syntax Motor Types Arguments Packet Structure Description Restrictions see GetPhaseAngle None angle Brushless DC Type unsigned 16 bits Microstepping Range Scaling 0 to 2151 unity Units revolutions microsteps GetPhaseAngle checksum 2Ch 15 87 0 Data read angle 15 0 GetPhaseAngle returns the instantaneous commutation or microstepping angle as set by the last torque command. 0x10000, which is just out of range, corresponds to 360 degrees, or one revolution, and is equivalent to zero. None 110 Atlas® Digital Amplifier Complete Technical Reference GetPhaseCommand EAh 6 Syntax Motor Types Arguments Returned data GetPhaseCommand phase Name phase command Brushless DC Microstepping Instance Phase A Phase B Phase C Encoding 0 1 2 Type signed 16 bits Range 215 to 2151 Scaling 100/215 Units % output Packet Structure Description Restrictions see 15 write 15 read 15 checksum GetPhaseCommand 87 First data word 0 Second data word command EAh 0 phase 21 0 0 GetPhaseCommand returns the value of the commutated phase command for phase A, B, or C. These are the phase command values directly output to the current loop or motor after commutation. Scaling example: If a value of 4,489 is retrieved (EE77h) for a given phase, then this corresponds to 4,489*100/32,767 = 13.7% of full-scale output. Phase C is only valid when the motor type has been set for a 3-phase commutation. This command has no meaning when current control mode is set to FOC whether or not the current loops are enabled. When the current control mode is set to Phase A /B current loops, the values are the inputs to the current loops. When current loops are disabled, the value is the motor output command. SetCurrentControlMode (p. 130) Atlas® Digital Amplifier Complete Technical Reference 111 6 GetSignalStatus A4h Syntax Motor Types Arguments Returned data Packet Structure Description GetSignalStatus DC Brush Brushless DC None see below Type unsigned 16 bits Microstepping GetSignalStatus checksum A4h 15 87 0 Data read Signal Status 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 GetSignalStatus returns the contents of the Signal Status register. Each bit in the Signal Status register is set if the corresponding signal is high, and clear if the signal is low. The ~Enable signal is an input, and the FaultOut signal is an output. See SetFaultOutMask (p. 140) for more on how the FaultOut signal is controlled. The Signal Status register contains the value of the various hardware signals connected to the Atlas drive. The bit definitions are as follows: Description -- (Reserved) /Enable In FaultOut -- (Reserved) Bit Number 012 13 14 15 Restrictions see GetDriveFaultStatus (p. 102), GetEventStatus (p. 105) 112 Atlas® Digital Amplifier Complete Technical Reference GetTemperature 53h 6 Syntax Motor Types Arguments Returned Data Packet Structure Description Restrictions see GetTemperature DC Brush None Brushless DC Microstepping Type temperature signed 16 bits Range 2^15 to 2^151 Scaling 28 Units °C GetTemperature checksum 53h 15 87 0 First data word read temperature 15 0 GetTemperature gets the most recent temperature reading from the Atlas internal temperature sensor. Get/SetDriveFault (p. 98) Atlas® Digital Amplifier Complete Technical Reference 113 6 GetTime 3Eh Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see GetTime DC Brush None Brushless DC Microstepping Name time Type unsigned 32 bits Range 0 to 2321 Scaling unity Units cycles GetTime checksum 3Eh 15 87 0 First data word read time (high-order part) 31 16 Second data word read time (low-order part) 15 0 GetTime returns the number of cycles which have occurred since the motion processor was last reset. The time units are current loop cycles. 114 Atlas® Digital Amplifier Complete Technical Reference GetTraceCount BBh 6 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see GetTraceCount DC Brush None Brushless DC Name count Type unsigned 32 bits Microstepping Range 0 to 2321 Scaling unity Units samples GetTraceCount checksum BBh 15 87 0 First data word read count (high-order part) 31 16 Second data word read count (low-order part) 15 0 GetTraceCount returns the number of points (variable values) stored in the trace buffer since the beginning of the trace. If the trace mode is set to "rolling" and the buffer wraps, GetTraceCount returns the total number of samples written since trace was started. ReadBuffer16 (p. 121), Set/GetBufferLength (p. 126), Set/GetTraceMode (p. 148), Set/Get Trace Start (p. 150), Get/Set Trace Stop (p. 151) Atlas® Digital Amplifier Complete Technical Reference 115 6 GetTraceStatus BAh Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see GetTraceStatus DC Brush None Brushless DC Microstepping Name see below Type unsigned 16 bits GetTraceStatus checksum BAh 15 87 0 Data read Trace Status 15 0 GetTraceStatus returns the trace status. The definitions of the individual status bits are as follows: Name Roll Activity Data Wrap Overrun Not Empty Command Trigger Bit Number 0 1 2 3 4 5 6-7 8 9-15 Description Set to 0 when trace is in one-time mode, 1 when in rolling mode. Set to 1 when trace is active (currently tracing), 0 if trace is stopped either because of a command or filling the trace buffer. Set to 1 when trace has filled the buffer; when in rolling mode trace will then write at the beginning of the buffer, and data may be lost. Set to 1 when a trace buffer location has been written before the previously written value was read from buffer 0. If all trace reads are done using buffer 0 this bit indicates that data has been lost. Set to 1 when a trace buffer location has been written but has not been read from buffer 0. If all trace reads are done using buffer 0 this bit indicates that new trace data is available. Set to 1 when trace has been turned on by the controlling processor. In internal trigger mode this means that the last torque command had the trace bit set; in external trigger mode it means that at least one torque command had the trace bit set since trace activity was cleared by SetTraceMode (Reserved) Clear means internal trigger mode, a set of trace samples is taken based on the Atlas internal clock and the Trace Period register. Set means external trigger mode, exactly one set of trace samples is taken whenever a torque command with the trace bit set is received (Reserved) The Data Wrap and Overrun bits are cleared when trace goes from being off (Activity 0) to on (Activity 1), because of the detection of the programmed trace start condition. Set/GetTraceMode (p. 148), Set/Get Trace Start (p. 150), Set/Get Trace Stop (p. 151) 116 Atlas® Digital Amplifier Complete Technical Reference GetTraceValue 28h 6 Syntax Arguments Returned data Packet Structure Description GetTraceValue VariableID Name VariableID Name Value Instance Encoding see SetTraceVariable (p. 152) Type signed and unsigned 32bits GetTraceValue write checksum 28h 87 Data write 0h VariableID 15 87 0 read Value high word read Value low word GetTraceValue is used to read a single traceable value, without having to set up the trace buffer, trace mode, and so forth. The meaning of the variableID argument is exactly the same as in SetTraceVariable. Signed values are sign extended to 32 bits, unsigned values are zero extended. Atlas® Digital Amplifier Complete Technical Reference 117 6 GetVersion 8Fh Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions GetVersion DC Brush Brushless DC Microstepping None Name version Type unsigned 32 bits read read GetVersion checksum 8Fh 15 87 0 First data word product family motor type number of axes special # chips 31 28 27 24 23 20 19 18 17 16 Second data word product major customization code version version minor version 15 87 65 43 0 GetVersion returns product information encoded as shown in the preceding packet structure diagram. Individual data fields are encoded as defined in the following table. Name product family motor type motor type motor type motor type number of axes special # chips customization code product version major s/w version minor s/w version Description Atlas DC Brush Step Motor Brushless DC Mult. Motor Maximum number of supported axes (Reserved) None Other Encoding Ah 1 4 3 8 1 to 15 0 to 3 1 0 1 to 255 0 to 3 0 to 3 0 to 15 see 118 Atlas® Digital Amplifier Complete Technical Reference InitializationDelay 35h 6 Syntax Motor Types Arguments InitializationDelay option cycles DC Brush Brushless DC Microstepping Name option Instance 0 Encoding time delay Name cycles Type unsigned 32 bits Range 0-232 -1 Scaling unity Returned data None Packet Structure write checksum 35h 15 87 0 write option 15 0 write Delay (high order part) 15 0 write Delay (low order part) 15 0 Description Restrictions InitializationDelay is used to cause a fixed time delay during the processing of user initialization commands in the Atlas non-volatile memory, typically to allow some other system component to initialize or stabilize itself. The argument specifies the number of current loop cycles to delay. Normal Atlas processing of external signals, status registers, and motor outputs is enabled during the user initialization phase. InitializationDelay is valid only as an initialization command read from nonvolatile memory, it is not a valid SPI command. Atlas® Digital Amplifier Complete Technical Reference 119 6 NoOperation 00h Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see NoOperation DC Brush None None Brushless DC Microstepping NoOperation checksum 00h 15 87 0 The NoOperation command has no effect on the motion processor. It may be useful for verifying or synchronizing communications. 120 Atlas® Digital Amplifier Complete Technical Reference ReadBuffer16 CDh 6 Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see ReadBuffer16 bufferID DC Brush Brushless DC Name bufferID Type unsigned 16 bits Type data signed 16 bits Microstepping Range 0 to 3 Range 215 to 2151 15 write 15 read 15 checksum ReadBuffer 87 First data word 0 data word data (high-order part) CDh 0 bufferID 54 0 0 ReadBuffer16 returns the 16-bit contents of the location pointed to by the read buffer index in the specified buffer. After the contents have been read, the read index is incremented by 1. If the result is equal to the buffer length (set by SetBufferLength), the index is reset to zero (0). Set/GetBufferReadIndex (p. 127), Set/GetBufferStart (p. 128), Set/GetBufferLength (p. 126) Atlas® Digital Amplifier Complete Technical Reference 121 6 Reset 39h Syntax Motor Types Arguments Returned data Packet Structure Description Reset DC Brush None None Brushless DC Microstepping Reset checksum 39h 15 87 0 Reset restores the motion processor to its initial condition, setting all motion processor variables to their default values. Most variables are motor-type independent; however several default values depend upon the motor type of the Atlas. The motor-type independent values are listed here. Commutation Phase Angle Phase Counts Current Control Current Control Mode Current Loop Kp (both A and B loops) Current Loop Ki (both A and B loops) Current Loop Integration Limit (both A and B loops) FOC Kp (both d and q loops) FOC Ki (both d and q loops) FOC Integration Limit (both d and q loops) Holding Current Drive Current Motor Output Operating Mode Active Operating Mode PWM Frequency RAM Buffers Buffer Start (buffer 0) Buffer Length (buffer 0) Buffer Start (buffer 1) Buffer Length (buffer 1) Buffer Read Index (all) Buffer Write Index (all) Safety Current Foldback Event Action Watchdog Limit Trace Trace Mode Trace Period Trace Variables (all) Default Value 0 256 1 0 0 4000h 0 0 4000h 0 0 1 1 4875 0 1020 20000000h 1024 0 0 7 0 0 1 0 Buffered No No Yes Yes Yes Yes Yes Yes Yes No No No No No No No No No No No No No No No No 122 Atlas® Digital Amplifier Complete Technical Reference Reset (cont.) 39h 6 Description (cont.) Notes Restrictions see Default Value Low Power Medium Power High Power Buffered Overvoltage Limit 38,207 (52 V) 38,207 (52 V) 44,085 (60 V) N Undervoltage Limit 7348 (10 V) 7348 (10 V) 7348 (10 V) N Overtemperature Limit 19,200 (75°C) 19,200 (75°C) 19,200 (75 °C)) N Temperature Hysteresis 1280 (5°C) 1280 (5°C) 1280 (5°C) N Continuous Current Limit BLDC 9172 (2.12 A) 9264 (7.07 A) 9264 (14.14 A) N DC Brush 6486 (1.5 A) 9172 (7.00 A) 9172 (14.00 A) N Step 9172 (2.12 A) 8338 (6.37 A) 8338 (12.73 A) N Energy Limit BLDC 502 (3.0 A2s) 498 (31.9 A2s) 498 (127.5 A2s) N DC Brush 617 (3.6 A2s) 503 (32.2 A2s) 503 (128.7 A2s) N Step 502 (3.0 A2s) 542 (34.7 A2s) 542 (138.9 A2s) N The typical time before the device is ready for communication after a reset is 250ms for Atlas products. Not all of the listed variables are available on all products. See the product user's guide. Atlas® Digital Amplifier Complete Technical Reference 123 6 ResetEventStatus 34h Syntax Motor Types Arguments Returned data Packet Structure Description Restrictions see ResetEventStatus mask DC Brush Brushless DC Microstepping Name mask Instance Instruction Error Overtemperature Fault Drive Exception Current Foldback Encoding FF7Fh FDFFh FBFFh EFFFh None ResetEventStatus checksum 34h 15 87 0 Data write mask 15 0 ResetEventStatus clears (sets to 0) each bit in the Event Status register that has a value of 0 in the mask sent with this command. All other Event Status register bits (bits that have a mask value of 1) are unaffected. Events that cause changes in operating mode or trajectory require, in general, that the corresponding bit in Event Status be cleared prior to returning to operation. That is, prior to restoring the operating mode in cases where the event caused a change in it. Not all bits in ResetEventStatus are supported in some products. See the product user's manual. GetEventStatus (p. 105) 124 Atlas® Digital Amplifier Complete Technical Reference RestoreOperatingMode 2Eh 6 Syntax Motor Types Arguments Packet Structure Description Restrictions see RestoreOperatingMode DC Brush None Brushless DC Microstepping RestoreOperatingMode checksum 2Eh 15 87 0 RestoreOperatingMode is used to command Atlas to return to its static operating mode. It should be used when the active operating mode has changed due to actions taken from safety events or other programmed events. Calling RestoreOperatingMode will re-enable all loops that were disabled as a result of events. Before using RestoreOperatingMode to return to the static operating mode, the event status bits should all be cleared. If a bit in event status that caused a change in operating mode is not cleared, this command will return an error. If using Magellan, the RestoreOperatingMode command should be sent to a Magellan axis, rather than to an Atlas axis. Otherwise Magellan will immediately disable Atlas again. GetActiveOperatingMode (p. 97), Set/GetOperatingMode (p. 144), Set/GetEventAction (p. 139) Atlas® Digital Amplifier Complete Technical Reference 125 SetBufferLength GetBufferLength C2h C3h 6 Syntax Motor Types Arguments Packet Structure Description Restrictions see SetBufferLength bufferID length GetBufferLength bufferID DC Brush Brushless DC Name bufferID length Type unsigned 16 bits unsigned 32 bits Microstepping Range 0 to 3 1 to 230 1 15 write 15 write 31 write 15 checksum SetBufferLength 87 First data word 0 Second data word length (high-order part) Third data word length (low-order part) C2h 0 bufferID 21 0 16 0 15 write 15 read 31 read 15 checksum GetBufferLength 87 First data word 0 Second data word length (high-order part) Third data word length (low-order part) C3h 0 bufferID 21 0 16 0 SetBufferLength sets the length, in numbers of 16-bit elements, of the buffer in the memory block identified by bufferID. Note: The SetBufferLength command resets the buffers read and write indexes to 0. The GetBufferLength command returns the length of the specified buffer. The buffer length plus the buffer start address cannot exceed the memory size of the product. See Section 2.1, "Operational Specifications" for more information. The memory indicated depends on the buffer start. It may be necessary to decrease buffer length before changing buffer start. Set/GetBufferReadIndex (p. 127), Set/GetBufferStart (p. 128) Atlas® Digital Amplifier Complete Technical Reference 126 SetBufferReadIndex C6h GetBufferReadIndex C7h 6 Syntax SetBufferReadIndex bufferID index GetBufferReadIndex bufferID Motor Types Arguments Packet Structure Description Restrictions see DC Brush Brushless DC Name bufferID index Type unsigned 16 bits unsigned 32 bits Microstepping Range 0 to 3 0 to buffer length - 1 Scaling unity unity Units double words 15 write 15 write 31 write 15 checksum SetBufferReadIndex 87 First data word 0 Second data word index (high-order part) Third data word index (low-order part) C6h 0 bufferID 21 0 16 0 15 write 15 read 31 read 15 checksum GetBufferReadIndex 87 First data word 0 Second data word index (high-order part) Third data word index (low-order part) C7h 0 bufferID 21 0 16 0 SetBufferReadIndex sets the address of the read index for the specified bufferID. GetBufferReadIndex returns the current read index for the specified bufferID. If the read index is set to an address beyond the length of the buffer, the command will not be executed and will return error code 7, buffer bound exceeded. Set/GetBufferLength (p. 126), Set/GetBufferStart (p. 128) 127 Atlas® Digital Amplifier Complete Technical Reference SetBufferStart GetBufferStart C0h C1h 6 Syntax Motor Types Arguments Packet Structure Description Restrictions SetBufferStart bufferID address GetBufferStart bufferID DC Brush Brushless DC Name bufferID address Type unsigned 16 bits unsigned 32 bits Microstepping Range Units 0 to 3 - 0 to 231 1 double words 15 write 15 write 31 write 15 SetBufferStart checksum C0h 87 0 First data word 0 bufferID 21 0 Second data word address (high-order part) 16 Third data word address (low-order part) 0 15 write 15 read 31 read 15 GetBufferStart checksum C1h 87 0 First data word 0 bufferID 21 0 Second data word address (high-order part) 16 Third data word address (low-order part) 0 SetBufferStart sets the starting address for the specified buffer, in words, of the buffer in the memory block identified by bufferID. The starting address 0x2000 0000 is used to access NVRAM. 0x2200 0000 is used to access manufacturer NVRAM. When setting these addresses the buffer length must first be set to the length of the indicated NVRAM block or less. Note: The SetBufferStart command resets the buffers read and write indexes to 0. The GetBufferStart command returns the starting address for the specified bufferID. The buffer start address plus the buffer length cannot exceed the memory size of the product. See Section 2.1, "Operational Specifications" for more information. see Set/GetBufferLength (p. 126), Set/GetBufferReadIndex (p. 127) Atlas® Digital Amplifier Complete Technical Reference 128 SetCurrent GetCurrent 5Eh 5Fh 6 Syntax Motor Types Arguments SetCurrent option value GetCurrent option DC Brush Brushless DC Name option Instance Holding Current Reserved Drive Current value Type 16-bit unsigned Microstepping Encoding 0 1 2 Range 0 to 215 Scaling 100/215 Units % max output Packet Structure Description Restrictions write 15 write 15 write 31 write 15 write 15 read 31 checksum checksum SetCurrent 87 0 value GetCurrent 87 0 value 5Eh 0 option 21 0 16 5Fh 0 option 21 0 16 The SetCurrent command is used to set the output level (current, or voltage if the current loop is off) used during pulse and direction motor operation. The Holding Current option is used to set the output level when the AtRest signal is asserted, and the Drive Current option to set the output level when the AtRest signal is not asserted. The GetCurrent command is used to retrieve the output levels set by SetCurrent. Holding Current should be less than or equal to Drive Current; if it is greater then the Drive Current value will be used at all times. These commands are not meaningful except in pulse and direction mode. Atlas® Digital Amplifier Complete Technical Reference 129 SetCurrentControlMode GetCurrentControlMode 6 buffered 43h 44h Syntax Syntax Motor Types Arguments Packet Structure SetCurrentControlMode axis mode GetCurrentControlMode Name mode 15 write 15 Brushless DC Instance Individual phase FOC Third leg floating Microstepping Encoding 0 1 2 SetCurrentControlMode checksum 43h 87 0 First data word 0 mode 21 0 Description Restrictions see 15 read 15 GetCurrentControlMode checksum 44h 87 First data word 0 0 mode 21 0 SetCurrentControlMode configures Atlas to use either the Individual phase method, or the FOC method, or the Third Leg Floating method for current control. GetCurrentControlMode gets the buffered current loop mode. SetCurrentControlMode is a buffered command. It will not take effect until an update is done on the current loop by sorting the Update in a torque command. The value read by GetCurrentControlMode is the buffered setting. The Third Leg Floating mode is valid only for 3 phase brushless DC motor control. GetFOCValue (p. 106), Get/SetFOC (p. 141), GetCurrentLoopValue (p. 101), Get/SetCurrentLoop (p. 133) 130 Atlas® Digital Amplifier Complete Technical Reference SetCurrentFoldback GetCurrentFoldback Syntax Motor Types Arguments Packet Structure SetCurrentFoldback parameter value GetCurrentFoldback parameter DC Brush Name parameter value Brushless DC Microstepping Instance Encoding Continuous Current Limit 0 Energy Limit 1 Type unsigned 16-bit Range/Scaling see below 15 write 15 write 15 SetCurrentFoldback checksum 41h 87 First data word parameter Second data word value 41h 42h 6 0 0 0 Description GetCurrentFoldback checksum 42h 15 87 0 First data word write parameter 15 0 Second data word read value 15 0 SetCurrentFoldback is used to set various I2t foldback-related parameters. Two parameters can be set, the Continuous Current Limit, and the Energy Limit. The units of Continuous Current Limit are convertible to milliAmps, and represent percentage of maximum peak current, with scaling of 100/2^15. The range is from 0% to the factory default continuous current limit setting. The maximum current is the largest current that can be represented rather than the maximum that can be sourced or sensed. The maximum current can be calculated via the formula Max = Current Scaling * 0x8000 For example for the high power Altas, using the scale factor from Section 3.11, "Atlas Conversion Factors", the maximum current = 1.526mA * 0x8000 = 50A. The units of Energy Limit are convertible to Amp2Seconds, and represent the percentage of maximum energy, with scaling of 100/2^15. The range is from 0% to the factory default energy limit setting. Atlas® Digital Amplifier Complete Technical Reference 131 SetCurrentFoldback (cont.) 41h GetCurrentFoldback 42h 6 Description (cont.) Restrictions The Continuous Current Limit is used by the current foldback algorithm. When the current output of the drive exceeds this setting, accumulation of the I2 energy above this setting begins. Once the accumulated excess I2 energy exceeds the value specified by the Energy Limit parameter, a current foldback condition exists and the commanded current will be limited to the specified Continuous Current Limit. When this occurs, the Current Foldback bit in the Event Status and Drive Status registers will be set. When the accumulated I2 energy above the Continuous Current Limit drops to zero (0), the limit is removed, and the Current Foldback bit in the Drive Status register is cleared. SetEventAction can be used to configure a change in operating mode when current foldback occurs. Doing this does not interfere with the basic operation of Current Foldback described above. If this is done, the Current Foldback bit in the Event Status register must be cleared prior to restoring the operating mode, regardless of whether the system is in current foldback or not. When current control is not active, a current foldback event always causes a change to the disabled state (all loops and motor output are disabled), regardless of the programmed Event Action. Changing the operating mode from disabled requires clearing of the Current Foldback bit in Event Status. GetCurrentFoldback gets the maximum continuous current setting. Values of Continuous Current Limit greater than the factory setting for maximum continuous current are not allowed. see GetEventStatus (p. 105), ResetEventStatus (p. 124), GetDriveStatus (p. 104), RestoreOperatingMode (p. 125), GetActiveOperatingMode (p. 97) 132 Atlas® Digital Amplifier Complete Technical Reference SetCurrentLoop GetCurrentLoop buffered 73h 74h 6 Syntax Motor Types Arguments Packet Structure Description SetCurrentLoop phase parameter value GetCurrentLoop phase parameter DC Brush Name phase parameter value Brushless DC Microstepping Instance Phase A Phase B Both (A and B) Proportional Gain (KpCurrent) Integral Gain (KiCurrent) Integral Sum Limit (ILimitCurrent) Type unsigned 16 bits Encoding 0 1 2 0 1 2 Range/Scaling see below SetCurrentLoop checksum 73h 15 87 0 First data word write 0 phase parameter 15 12 11 87 0 Second data word write value 15 0 GetCurrentLoop checksum 74h 15 87 0 First data word write 0 phase parameter 15 12 11 87 0 Second data word read value 15 0 Set/GetCurrentLoop is used to configure the operating parameters of the individual phase digital current loops. See Section 4.5, "Current Loop" for more information on how each parameter is used in the current loop processing. The value written/read is always an unsigned 16-bit value, with the parameter-specific scaling shown below: Parameter Proportional Gain (KpCurrent) Integral Gain (KiCurrent) Integral Sum Limit (ILimitCurrent) Range 0 to 2^151 0 to 2^151 0 to 2^151 Scaling 1/64 1/256 1/100 Units gain gain/cycles % current * cycles A setting of 64 for KpCurrent corresponds to a gain of 1. That is, an error signal of 30% maximum current will cause the proportional contribution of the current loop output to be 30% of maximum output. Similarly, setting KiCurrent to 256 gives it a gain of 1, and the value of the integral sum would become the integral contribution to the output. The units of time for the integral sum are cycles. Atlas® Digital Amplifier Complete Technical Reference 133 SetCurrentLoop (cont.) GetCurrentLoop 6 buffered 73h 74h Description (cont.) Restrictions ILimitCurrent is used to limit the contribution of the integral sum at the output. Its effect depends on the value of KiCurrent. Setting ILimitCurrent to 1000 when KiCurrent is 10 means that the maximum contribution to the output is 1000 x 10 = 10,000 out of 2^15 - 1 or approximately 30.5% The phase argument can be used to set the operating parameters for the A and B loops independently. In most cases, the A and B loops will not require different operating parameters, so SetCurrentLoop can be used with a phase of 2, which sets both the A and B loops in a single API command. For GetCurrentLoop, a phase of 2 is not valid. Set/GetCurrentLoop are buffered commands. All parameters set are buffered, and will not take effect until an update is done on the current loop by setting the update bit in a torque command. The values read by GetCurrentLoop are the buffered settings. This command is only supported in products that include digital current control, and when the current control mode is individual phase. see GetCurrentLoopValue (p. 101), Set/GetCurrentControlMode (p. 130) 134 Atlas® Digital Amplifier Complete Technical Reference SetDriveCommandMode GetDriveCommandMode 7Eh 7Fh 6 Syntax SetDriveCommandMode mode GetDriveCommandMode Arguments Name format transport Instance BLDC Step DC SPI Pulse and Direction Encoding 0 4 7 0 1 Packet Structure Description SetDriveCommand mode write checksum 7Eh 15 87 0 write 15 transport format 0 GetDriveCommand mode write checksum 7Fh 15 87 0 write 15 transport format 0 SetDriveCommandMode may be used to change the means of commanding Atlas motor torque. The transport field specifies the physical interface used for torque commands, either the default Serial Peripheral Interface, or Pulse and Direction. See Section 4.9.1, "Pulse & Direction Signal Input Mode" for more information on pulse and direction mode. The format field specifies the layout of the torque command; in the Atlas only one format is supported for each motor type. See Section 5.3, "Sending a Voltage or Torque Output Value" for details. The format for pulse and direction input must be Step. Atlas® Digital Amplifier Complete Technical Reference 135 SetDriveFaultParameter 62h GetDriveFaultParameter 64h 6 Syntax Motor Types Arguments Packet Structure Description SetDriveFaultParameter parameter value GetDriveFaultParameter parameter DC Brush Name parameter value Brushless DC Microstepping Instance Overvoltage limit Undervoltage limit Recovery mode Watchdog limit Temperature limit Temperature hysteresis Type unsigned 16 bits Encoding 0 1 2 3 4 5 Range/Scaling see below SetDriveFaultParameter write checksum 62h 15 87 0 write parameter 15 0 write value 15 0 GetDriveFaultParameter write checksum 64h 15 87 0 write parameter 15 0 read value 15 0 SetDriveFaultParameter is used to set various operating limits and parameters affecting drive fault handling. Several aspects of fault handling may be controlled: · Bus voltage fault: Overvoltage limit, Undervoltage limit · How fault and event recovery is handled: Recovery mode · Communication watchdog: Watchdog limit · Overtemperature fault: Temperature limit, Temperature hysteresis The overvoltage and undervoltage limits are limits on bus voltage, and use the same scaling as the GetBusVoltage command. Whenever bus voltage is greater than the overvoltage limit an overvoltage drive fault will be signaled, if bus voltage is less than the undervoltage limit an undervoltage drive fault will be signaled. In either case a drive exception event will be raised and motor output disabled. The watchdog limit specifies the number of current loop cycles that may elapse without receiving a valid torque channel command from a controlling processor. If this limit is exceeded then a watchdog timeout fault will be signaled and a drive exception event raised, disabling motor output. The specified value is scaled by 8. For example, to specify that a watchdog timeout should occur after 16 cycles then the value should be 2. A value of zero disables the watchdog timeout. 136 Atlas® Digital Amplifier Complete Technical Reference SetDriveFaultParameter (cont.) GetDriveFaultParameter 62h 64h 6 Description (cont.) The temperature limit specifies a temperature above which an overtemperature drive fault is signaled and an overtemperature event raised, disabling motor output. After an overtemperature event the temperature must fall to the temperature limit minus the hysteresis value before the event and drive fault may be cleared. Both the overtemperature limit and the temperature hysteresis use the same scaling as the GetTemperature command. The recovery mode is an enumerated value, either commanded (0), or automatic (1). In the default commanded mode an explicit ResetEventStatus command is required after a disabling event to clear the responsible event bits. A ClearDriveFaultStatus command is not required, but is recommended to clear all drive fault status bits. In the automatic recovery mode Atlas will internally clear the event and drive fault status registers and attempt to automatically re-enable the commanded operating mode after a disabling event has occurred. Before automatic recovery will be attempted the controlling processor must acknowledge the fault by first driving the ~Enable line high, and then low. It is highly recommended that the SetDriveFaultOutMask command be used to trigger the FaultOut signal on any drive faults that will result in output being disabled, so that a controlling processor may recognize the fault. In the commanded recovery mode the SetOperatingMode command will signal an error if attempting to enable output when any disabling conditions are present, and the commanded operating mode will not be changed. In the automatic recovery mode the SetOperatingMode command will not fail under these circumstances, but will change the command (but not the active) operating mode. Restrictions see GetBusVoltage (p. 98), GetTemperature (p. 113), ResetEventStatus (p. 124), ClearDriveFaultStatus (p. 94), SetFaultOutMask (p. 140), SetOperatingMode (p. 144) Atlas® Digital Amplifier Complete Technical Reference 137 SetDrivePWM 23h GetDrivePWM 24h 6 Syntax Motor Types Arguments Packet Structure Description SetDrivePWM option value GetDrivePWM option DC Brush Brushless DC Microstepping Name option value Instance Limit Type 16-bit unsigned Range 0 to 2141 Encoding 0 Scaling 100/214 Units % max output SetDrivePWM write checksum 23h 15 87 0 write option 15 0 write value 15 0 GetDrivePWM write checksum 24h 15 87 0 write option 15 0 read value 15 0 The SetDrivePWM command is used to set the PWMLimit register, which limits the maximum PWM duty cycle, and hence the effective output voltage. The PWM limit is applied to each terminal individually, whether the current loop is enabled or not. The GetDrivePWM returns the current value of the PWMLimit register. Restrictions 138 Atlas® Digital Amplifier Complete Technical Reference SetEventAction GetEventAction 48h 49h 6 Syntax SetEventAction event action GetEventAction event Motor Types Arguments DC Brush Name event action Brushless DC Microstepping Instance Immediate -- (Reserved) Current Foldback None -- (Reserved) Disable Motor Output & Higher Modules Encoding 0 1-3 4 0 1-6 7 Packet Structure Description SetEventAction checksum 48h 15 87 0 First data word write event 15 0 Second data word write action 15 0 GetEventAction checksum 49h 15 87 0 First data word write event 15 0 Second data word read action 15 0 SetEventAction configures what actions will be taken by Atlas in response to a given event. The action can be either to modify the operating mode by disabling wafer output, or to take no action. When, through SetEventAction, one of the events causes an action, the event bit in the Event Status register must be cleared prior to returning to operation. For changes in operating mode, this means that the bit must be cleared prior to restoring the operating mode, either by RestoreOperatingMode or SetOperatingMode. GetEventAction gets the action that is currently programmed for the given event with the exception of the Immediate event, which cannot be read back. Restrictions see GetActiveOperatingMode (p. 97), RestoreOperatingMode (p. 125), Set/GetOperatingMode (p. 144) Atlas® Digital Amplifier Complete Technical Reference 139 SetFaultOutMask GetFaultOutMask 6 Syntax SetFaultOutMask mask GetFaultOutMask Motor Types Arguments DC Brush Name mask Brushless DC Instance see below Microstepping Encoding bitmask Packet Structure SetFaultOutMask checksum FBh 15 87 First data word write mask 15 FBh FCh 0 0 Description Restrictions see GetFaultOutMask checksum FCh 15 87 0 First data word read mask 15 0 SetFaultOutMask configures the mask on Drive Fault Status register bits that will be ORed together on the FaultOut pin. The FaultOut pin is active high, as are the bits in Drive Fault Status. Thus, FaultOut will go high when any of the enabled bits in Drive Fault Status are set (1). The mask parameter is used to determine what bits in the Drive Fault Status register can cause FaultOut high, as follows: Name Bit Overcurrent 0 -- (Reserved) 1-2 Operating Mode Mismatch 3 Watchdog Timeout 4 Overvoltage 5 Undervoltage 6 Disabled 7 Current Foldback 12 Overtemperature 13 SPI Torque Checksum Error 14 For example, a mask setting of hexadecimal 2060h will configure the FaultOut pin to go high upon Overtemperature Fault, or Bus Voltage Fault. The FaultOut pin stays high until all Fault enabled bits in Event Status are cleared. The default value for the FaultOut mask is 71h. GetFaultOutMask gets the current mask. . GetDriveFaultStatus (p. 102), ClearDriveFaultStatus (p. 94) 140 Atlas® Digital Amplifier Complete Technical Reference SetFOC GetFOC buffered F6h F7h 6 Syntax Motor Types Arguments SetFOC loop parameter value GetFOC loop parameter Name loop Brushless DC Instance Direct(d) Quadrature(q) Both(d and q) Microstepping Encoding 0 1 2 parameter Proportional Gain (KpDQ) 0 Integral Gain (KiDQ) 1 Integral Sum Limit (ILimitDQ) 2 value Type unsigned 16 bits Range/Scaling see below Packet Structure SetFOC checksum F6h 15 87 0 First data word write 0 loop parameter 15 12 11 87 0 Second data word write value 15 0 Description GetFOC checksum F7h 15 87 0 First data word write 0 loop parameter 15 12 11 87 0 Second data word read value 15 0 Set/GetFOC is used to configure the operating parameters of the FOC-Current control. See Section 4.5, "Current Loop" for more information on how each parameter is used in the current loop processing. The value written/read is always an unsigned 16-bit value, with the parameter-specific scaling shown below: Parameter Proportional Gain (KpDQ) Integral Gain (KiDQ) Integral Sum Limit (ILimitDQ) Range 0 to 2^151 0 to 2^151 0 to 2^151 Scaling 1/64 1/256 1/100 Units gain gain/cycles % current * cycles A setting of 64 for KpDQ corresponds to a gain of 1. That is, an error signal of 30% maximum current will cause the proportional contribution of the current loop output to be 30% of maximum output. Atlas® Digital Amplifier Complete Technical Reference 141 SetFOC (cont.) GetFOC 6 buffered F6h F7h Description (cont.) Restrictions see Similarly, setting KiDQ to 256 gives it a gain of 1; the value of the integral sum would become the integral contribution to the output. ILimitDQ is used to limit the contribution of the integral sum at the output. Its effect depends on the value of KiDQ. Setting IlimitDQ to 1000 when KiDQ is 10 means that the maximum contribution to the output is 1000 x 10 = 10,000 out of 2^15 - 1 or approximately 30.5%. The units of time for the integral sum are cycles. The loop argument allows individual configuration of the parameters for the D and Q current loops. Alternately, a loop of 2 can be used with SetFOC to set the D and Q loops with a single API command. A loop of 2 is not valid for GetFOC. Set/GetFOC are buffered commands. All parameters set are buffered, and will not take effect until an update is done on the current loop by sending a torque command with the Update bit set. The values read by GetFOC are the buffered settings. These commands are only supported in products that include digital current control, and when the current control mode is set to FOC. GetFOCValue (p. 106), Set/GetCurrentControlMode (p. 130) 142 Atlas® Digital Amplifier Complete Technical Reference SetMotorType Get Motor Type 03h 03h 6 Syntax SetMotorType axis type GetMotorType axis Motor Types Arguments DC Brush Name type Brushless DC Microstepping Instance Encoding Brushless DC (3 phase) 0 Microstepping (2 phase) 3 DC Brush 7 Packet Structure 15 write 15 checksum SetMotorType 87 Data 02h 0 type 3 2 0 Description Restrictions C-Motion API 15 read 15 checksum GetMotorType 87 Data 03h 0 type 3 2 0 SetMotorType sets type of motor being driven by Atlas. This operation sets the number of phases for commutation on the axis, as well as internally configuring the motion control IC for the motor type. The following table describes each motor type, and the number of phases to be commutated. Motor type Brushless DC (3 phase) Microstepping (2 phase) DC Brush Commutation 3 phase 2 phase None GetMotorType returns the configured motor type for the selected axis. The motor type should only be set once for each axis, either via NVRAM initialization during device startup, or immediately after reset using SetMotorType. Once it has been set, it should not be changed. Executing SetMotorType will reset many variables to their motor type specific default values. Only multimotor Atlases accept the SetMotorType command. When using multimotor Atlas with Magellan separate SetMotorType commands must be sent, first to Atlas, then to Magellan. PMDResult PMDSetMotorType (PMDAxisInterface axis_intf, PMDuint8 type) PMDResult PMDGetMotorType (PMDAxisInterface axis_intf, PMDuint8* type) Atlas® Digital Amplifier Complete Technical Reference 143 SetOperatingMode GetOperatingMode 6 Syntax SetOperatingMode mode GetOperatingMode Motor Types Arguments DC Brush Name mode Brushless DC Instance Type unsigned 16-bit Microstepping Encoding Range/Scaling see below Packet Structure SetOperatingMode checksum 65h 15 87 First data word write mode 15 65h 66h 0 0 Description GetOperatingMode checksum 66h 15 87 0 First data word read mode 15 0 SetOperatingMode configures the operating mode. Each bit of the mode configures whether a feature/loop is active or disabled, as follows: Name -- Motor Output Enabled Current Control Enabled -- Bit Description 0 Reserved 1 0: motor outputs disabled. 1: motor outputs enabled. 2 0: current control bypassed. 1: current control active. 3-15 Reserved When the current loop is disabled, it operates by passing its input directly to its output, and clearing all internal state variables (such as integrator sums, etc.). For example, to configure Atlas for current loop operation the operating mode would be set to hexadecimal 0007h. When Atlas is in the default event recovery mode SetOperatingMode will signal an error if an event that would disable motor output is present, and will not change any internal registers. The Invalid Operating Mode Restore error (10h) error will be signaled. An alternative event recovery mode (automatic recovery mode) may be set by using the SetDriveFaultParameter command, in this mode SetOperatingMode will not signal an error if a disabling event is present, but will instead change only the static operating mode, and leave the active operating mode as it is. For this reason the event recovery mode should be set first in during user initialization from nonvolatile memory, and the operating mode set afterwards. 144 Atlas® Digital Amplifier Complete Technical Reference SetOperatingMode (cont.) GetOperatingMode 65h 66h 6 Description (cont.) Restrictions This command should be used to configure the static operating mode. The actual current operating mode may be changed in response to safety events, or user-programmable events. In this case, the present operating mode is available using GetActiveOperatingMode. GetOperatingMode will always return the static operating mode set using SetOperatingMode. Executing the SetOperatingMode command sets both the static operating mode and the active operating mode to the desired state. GetOperatingMode gets the static operating mode. see GetActiveOperatingMode (p. 97), RestoreOperatingMode (p. 125), GetDriveFaultStatus (p. 102) Atlas® Digital Amplifier Complete Technical Reference 145 SetPhaseCounts GetPhaseCounts 6 Syntax Motor Types Arguments SetPhaseCounts counts GetPhaseCounts Name counts Instance Type unsigned 16 bits Microstepping Encoding Range 1 to 1024 Scaling unity 75h 7Dh Units microsteps Packet Structure Description Restrictions see SetPhaseCounts checksum 75h 15 87 0 Data write counts 15 0 GetPhaseCounts checksum 7Dh 15 87 0 Data read counts 15 0 For axes configured for microstepping motor types, the number of microsteps per full step is set using the SetPhaseCounts command. The parameter used for this command represents the number of microsteps per electrical cycle (4 times the desired number of microsteps). For example, to set 64 microsteps per full step, the SetPhaseCounts 256 command should be used. The maximum number of microsteps that can be generated per full step is 256, giving a maximum parameter value of 1024. GetPhaseCounts returns the number of counts or microsteps per electrical cycle. This command is useful only when driving miscrostepping motors in pulse and direction mode. 146 Atlas® Digital Amplifier Complete Technical Reference SetPWMFrequency GetPWMFrequency 0Ch 0Dh 6 Syntax SetPWMFrequency frequency GetPWMFrequency Motor Types Arguments DC Brush Brushless DC Name frequency Instance Type unsigned 16 bits Microstepping Encoding Range see below Scaling 125/32 Units Hz Packet Structure Description Restrictions see SetPWMFrequency checksum 0Ch 15 87 0 Data write frequency 15 0 GetPWMFrequency checksum 0Dh 15 87 0 Data read frequency 15 0 SetPWMFrequency sets the PWM output frequency (in kHz). To select one of the supported frequencies, pass the value listed in the SetPWMFrequency Value column as the frequency argument to this command. If the frequency specified is not supported the argument will be sampled down. Approximate Frequency 20 kHz 40 kHz 80 kHz 120 kHz PWM bit Resolution 10 9 8 7 Actual Frequency 19.531 kHz 39.062 kHz 78.124 kHz 117.187 kHz SetPWMFrequency Value 5,000 10,000 20,000 30,000 The PWM frequency can be changed only when motor output is disabled (e.g., immediately after powerup or reset). Atlas® Digital Amplifier Complete Technical Reference 147 SetTraceMode GetTraceMode B0h B1h 6 Syntax Motor Types Arguments Packet Structure Description Restrictions SetTraceMode mode GetTraceMode DC Brush Brushless DC Name roll mode Trigger Instance One Time Rolling Buffer Internal Trigger External Trigger Microstepping Encoding 0 1 0 1 write 15 write 15 checksum 0 SetTraceMode 87 Data Trigger 876 B0h 0 0 roll mode 1 0 write 15 read 15 checksum 0 GetTraceMode 87 Data Trigger 876 B1h 0 0 roll mode 1 0 SetTraceMode sets the buffer usage for the next trace. In One Time mode, the trace continues until the trace buffer is filled, then stops. In Rolling Buffer mode, the trace continues from the beginning of the trace buffer after the end is reached. When in the rolling mode, values stored at the beginning of the trace buffer are lost if they are not read before being overwritten by the wrapped data. The Roll Mode controls buffer usage. In One Time mode, the trace continues until the trace buffer is filled, then stops. In Rolling Buffer mode, the trace continues writing at the beginning of the buffer after the end is reached. When in the rolling mode, values stored at the beginning of the trace buffer are lost if they are not read before being overwritten by the wrapped data. The Trigger bit controls the timing of trace samples. In Internal Trigger mode the trace timing is controlled by the TracePeriod register and Atlas internal clock; a trace capture is done every TracePeriod. In External Trigger mode the trace timing is controlled by the trace bit in the SPI torque command; exactly one trace capture is done immediately after a set trace bit is received, so that trace timing is controlled externally. Internal trigger mode gives lower jitter and a higher possible trace sampling rate, but external trigger mode allows approximate synchronization with an external clock. GetTraceMode returns the value for the trace mode. see GetTraceStatus (p. 116), Set/GetTracePeriod (p. 149), Set/GetTraceStart (p. 150), Set/GetTraceStop (p. 151), Atlas® Digital Amplifier Complete Technical Reference 148 SetTracePeriod B8h GetTracePeriod B9h 6 Syntax Motor Types Arguments Packet Structure Description Restrictions SetTracePeriod period GetTracePeriod DC Brush Brushless DC Name period Type unsigned 16 bits Microstepping Range Scaling 1 to 2161 unity Units cycles SetTracePeriod write checksum B8h 15 87 0 Data write period 15 0 GetTracePeriod write checksum B9h 15 87 0 Data read period 15 0 SetTracePeriod sets the interval between contiguous trace captures. For example, if the trace period is set to one, trace data will be captured at the end of every chip cycle. If the trace period is set to two, trace data will be captured at the end of every second chip cycle, and so on. GetTracePeriod returns the value for the trace period. The trace period is used only in Internal Trigger mode. see Set/Get Trace Mode (p. 148) 149 Atlas® Digital Amplifier Complete Technical Reference SetTraceStart GetTraceStart Syntax Arguments SetTraceStart condition GetTraceStart Name condition Instance Immediate SPI Command B2h B3h 6 Encoding 0 6 Packet Structure write 15 15 write 15 15 checksum 0 checksum 0 SetTraceStart B2h 87 0 Data condition 0 87 43 0 GetTraceStart B3h 87 0 Data condition 0 87 43 0 Description see SetTraceStart sets the condition for starting a trace, and must be called before any tracing can be done. If the immediate condition is specified tracing will begin as soon as the command is processed. If the SPI Command condition is specified tracing will begin after an SPI command header is received with the trace bit set. GetTraceStart returns the value of the trace-start trigger. Once a trace is started the trace-start trigger is reset to zero. The trace start condition is not checked if trace is already running. When using External Trigger mode no trace samples will be captured unless the SPI command header trace bit is set. Set/GetBufferLength (p. 126), Set/GetTracePeriod (p. 149), Set/GetTraceMode (p. 148), Set/GetTraceStop (p. 151), GetTraceCount (p. 115), GetTraceStatus (p. 116) Atlas® Digital Amplifier Complete Technical Reference 150 SetTraceStop GetTraceStop Syntax Arguments SetTraceStop condition GetTraceStop Name condition Instance Immediate SPI Command B4h B5h 6 Encoding 0 6 Packet Structure write 15 15 write 15 15 SetTraceStop checksum B4h 87 0 Data 0 condition 0 87 43 0 GetTraceStop checksum B5h 87 0 Data 0 condition 0 87 43 0 Description see SetTraceStop sets the condition for starting a trace, and must be called to reset the internal trace state before starting again. If the immediate condition is specified tracing will stop as soon as the command is processed. If the SPI Command condition is specified tracing will stop after an SPI command header is received with the trace bit clear. GetTraceStop returns the value of the trace-stop trigger. Once a trace is stopped the trace-start trigger is reset to zero. The trace stop condition is not checked if trace is not running. Set/GetBufferLength (p. 126), Set/GetTracePeriod (p. 149), Set/GetTraceMode (p. 148), Set/GetTraceStart (p. 150), GetTraceCount (p. 115), GetTraceStatus (p. 116) Atlas® Digital Amplifier Complete Technical Reference 151 SetTraceVariable GetTraceVariable 6 Syntax Motor Types Arguments SetTraceVariable variableNumber variableID GetTraceVariable variableNumber DC Brush Name variableNumber Brushless DC Microstepping Instance Variable1 Variable2 Variable3 Variable4 variableID Status Registers Commutation/Phasing Current Loops Field Oriented Control Event Status Signal Status Drive Status Drive Fault Status SPI Status Active Motor Command Phase A Command Phase B Command Phase C Command Phase Angle Scaled Phase A Reference Phase B Reference Phase A Error Phase B Error Phase A Actual Current Phase B Actual Current Phase A Integral Contribution Phase B Integral Contribution Current Loop A Output Current Loop B Output D Reference Q Reference D Error Q Error D Feedback Q Feedback D Integrator Contribution Q Integrator Contribution D Output Q Output FOC Phase A FOC Phase B Alpha Output Beta Output Phase A Actual Current Phase B Actual Current B6h B7h Encoding 0 1 2 3 12 14 56 79 80 7 17 18 19 29 66 67 30 35 31 36 33 38 34 39 40 46 41 47 42 48 44 50 45 51 52 53 73 74 31 36 152 Atlas® Digital Amplifier Complete Technical Reference SetTraceVariable (cont.) GetTraceVariable B6h B7h 6 Arguments (cont.) Packet Structure Description Restrictions Motor Output Miscellaneous Bus Voltage 54 Temperature 55 I2t Energy 68 Terminal A Output 75 Terminal B Output 76 Terminal C Output 77 Leg Current A 69 Leg Current B 70 Leg Current C 71 Leg Current D 72 Clip Factor 78 None (disable variable) 0 Atlas Time 8 write 15 write 15 write 15 checksum variableID SetTraceVariable 87 First data word 0 Second data word 87 B6h 0 variableNumber 21 0 0 0 write 15 write 15 read 15 checksum variableID GetTraceVariable 87 First data word 0 Second data word 87 B7h 0 variableNumber 21 0 0 0 SetTraceVariable assigns the given variable to the specified variableNumber location in the trace buffer. Up to four variables may be traced at one time. All variable assignments must be contiguous starting with variableNumber = 0. GetTraceVariable returns the variable of the specified variableNumber. Example: To set up a three variable trace capturing the motor command, phase angle, and phase A current, the following commands would be used: SetTraceVariable 0 7 SetTraceVariable 1 29 SetTraceVariable 2 31 SetTraceVariable 3 0 When retrieving the traced variables from the list above the scaling may depend on the type of Atlas being used. See Section 3.11.1, "Atlas Settings Defaults and Limits" for scaling information. See also Figure 4-6, Figure 4-7 and Figure 4-8 for current loop, field oriented control, and motor output related variable scaling. see SetTracePeriod (p. 149) Atlas® Digital Amplifier Complete Technical Reference 153 6 Update Syntax Motor Types Arguments Packet Structure Description Restrictions see 1Ah Update DC Brush None Brushless DC Microstepping Update checksum 1Ah 15 87 0 The Update command should only be called from the nonvolatile initialization memory, when using SPI communication the update bit in the torque command should be set to command an update. Non-volatile initialization only. 154 Atlas® Digital Amplifier Complete Technical Reference A.Atlas Developer's Kit A In This Appendix Overview Installation and Getting Started Atlas Carrier Card Reference Information L-Bracket A.1 Overview $7/$6 '. &$55,(5 &$5' $66(0%/< $7/$6 $03/,),(5 Figure A-1: Developer Kit Components (four-axis version shown) /%5$&.(7 $66(0%/< $7/$6 '. '% &20081,&$7,216 &$%/( To simplify development with Atlas Amplifiers a developer's kit (DK) is available. In addition to documentation and software distribution media, the major elements of the DK are: · Atlas carrier card (comes in 1 or 4 axis version) · Atlas DK DB9 communications cable Atlas® Digital Amplifier Complete Technical Reference 155 A Atlas Developer's Kit · L-bracket base and, if vertical Atlas units are installed, vertical plate for heat sink attachment with associated mounting hardware (comes in 1 or 4 axis version) The base plate provides a stable mechanical base from which you can connect and operate your prototype system. With the vertical plate installed the Atlas units have additional heat sinking, which can be extended further by connecting the vertical plate to your own heat sink or cold plate. A.2 Installation and Getting Started In these instructions it is assumed that you have purchased one of the various Magellan Developer's Kits, which come with the Pro-Motion exerciser and tuning software. If you have not purchased a Magellan DK then you will still find these instructions useful, however you will use the detailed connections detailed in Section A.3, "Atlas Carrier Card Reference Information," to connect your system and begin operation. A.2.1 SPI Bus Connection You should plug in the provided 12" DB9 cable at the DB9 connection of the carrier card. Once you have plugged in the DB9 cable, you can skip forward to Section A.2.2, "Motor Connections," and continue from there. The DB9 connections used with the Atlas DK are not compatible with standard RS232 serial ports. Do not attempt to plug this connector directly into your PC. The SPI bus is not designed to operate external modules by cable connection, and therefore in production applications it is recommended that Atlas units be located on the same printed circuit card. Regardless of where Atlas is located, it is the responsibility of the user to ensure that SPI signals are noise free and within Atlas unit's timing specifications. Figure A-2: Connecting DB9 Cable to Carrier Card 156 Atlas® Digital Amplifier Complete Technical Reference A.2.2 Motor Connections Atlas Developer's Kit A Refer to Figure A-3 for detailed information on connector placement. For each Atlas, connect the motor using the chart below and the correct axis-specific 6-terminal jack screw plug on the carrier card, either J2, J5, J8, or J11 for axis 1, 2, 3, or 4 respectively. Use copper wire gauge 14AWG or larger to ensure that all current output requirements can be met. If you are using a one axis Atlas DK for motor connections and all other connections described in subsequent sections, refer to the description for axis numbers. Motor Type Brushless DC DC Brush Step Motor Use Motor Connections Motor A, Motor B, Motor C Motor A, Motor B phase A: Motor A, Motor B phase B: Motor C, Motor D Jackscrew Plug Labels Mtr A, Mtr B, Mtr C Mtr A, Mtr B Mtr A, Mtr B, Mtr C, Mtr D A.2.3 Power Connections For each Atlas, connect the bus supply voltage (HV) and the associated return ground signal at the correct axis-specific jack screw plug, either J1, J4, J7, or J10 for axis 1, 2, 3, or 4 respectively. Once again, utilize AWG 14 or larger to ensure that full current demand can be met while operating the unit. The power signals are labeled +HV and GND. For most installations you will use a single, common power supply to power all Atlas units. However this is not required. If desired, you can operate different Atlas units at different voltages by connecting to different DC supplies. While connecting power signals make sure that the power supply is off. A.2.4 Enable Signal Connection You must provide an `active' enable signal to allow Atlas to operate. There are a few options to accomplish this depending on how you plan to operate your system. A simple approach is to use a short piece of AWG 20 or larger wire to connect the GND connection on the spring clamp Phoenix connector to the Enable input (labeled ~Enab), either J3, J6, J9, or J12 for axis 1, 2, 3, or 4 respectively. For safety reasons, you may prefer to wire the enable input into a separate switch or E-stop button. Regardless of how it is accomplished, the enable signal must be driven active (low) for Atlas to operate. A.2.5 Installing and Connecting to the Magellan DK Card To set up and install the Magellan DK card refer to the Magellan Developer's Kit product that you are using. This manual will help you select jumper settings and make connections to the motor's encoders and other connections. Connect the Atlas DK's SPI bus cable to the appropriate Magellan DK card connector. Once all connections have been made you should power up the PC (but not the Atlas units) and follow the manual's direction for installing Pro-Motion software. You can run Pro-Motion, check for encoder feedback, etc.... but for axes that utilize Atlas amplifiers, motor output will not yet be operational. Atlas® Digital Amplifier Complete Technical Reference 157 A Atlas Developer's Kit A.2.6 Powering Up the Atlas Units Once all connections are made and Pro-Motion is installed and running you are ready to provide power to the Atlas units. Upon doing so verify that there is no motor movement, all power LEDs are lit, and none of the fault out LED indicators are lit. If any of these conditions are not true, power the Atlas units down and recheck connections. Once a normal power-up is achieved the Atlas units are ready for operation. You may now use Pro-Motion's Axis Wizard to install and operate your motors, or perform direct manual operations using Pro-Motion's various control menus. Congratulations! You have successfully installed the Atlas DK. A.3 Atlas Carrier Card Reference Information The following sections provides detailed information on the electrical characteristics of the Atlas DK carrier cards. There are four different designs of carrier card, representing vertical and horizontal Atlas mount options in both a one axis and four axis configuration. Figure A-3: Component Placement of Vertical and Horizontal DK Carrier Cards (four-axis version shown) The following descriptions apply for the 4-axis carriers, however the one-axis are similar, only missing axes 2-4. 158 Atlas® Digital Amplifier Complete Technical Reference Atlas Developer's Kit A A.3.1 J2, J5, J8, and J11 Motor Connectors J2, J5, J8, and J11 provide jack screw-style connections to the Atlas motor signals. J2, J5, J8 or J11 Connector Carrier Card Label Name Description Mtr D Motor D D Motor connection Mtr C Motor C C Motor connection Mtr B Motor B B Motor connection Mtr A Motor A A Motor connection. GND Mtr_Gnd Ground return for Motor and HV A.3.2 J1, J4, J7, J10 Power Connectors J1, J4, J7, and J10 provide jack screw-style connections to supply the Atlas power signals. J1, J4, J7 and J10 Connectors Carrier Card Label Name Description HV HV Motor Supply Voltage Pwr_Gnd Pwr_Gnd Ground return for Motor Supply A.3.3 J3, J6, J9, J12 Signal Connectors J3, J6, J9, and J12 provide jack screw-style connections to supply the Atlas signal connections. J3, J6, J9 and J12 Connectors Carrier Card Label Name Description ~Enab Enable Enable input Flt FaultOut FaultOut output GND GND Ground return for Enable and FaultOut signals A.3.4 Quick Connect Motor Type Chart Motor Type Brushless DC DC Brush Step Motor Connections Motor A, Motor B, Motor C Motor A, Motor B phase A: Motor A, Motor B phase B: Motor C, Motor D Atlas® Digital Amplifier Complete Technical Reference 159 A Atlas Developer's Kit A.3.5 J13 DB9 Connector A.3.5.1 SPI Communications J13 is used to provide SPI communications between the Atlas DK card and a Magellan DK card or the user's motion control system. Here are the pinouts for J13 when used for SPI communications Pin Name 1 ~SPICS3 2 ~SPICS2 3 Shield 4 GND 5 SPISO 6 ~SPICS1 7 ~SPICS4 8 SPIClk 9 SPISI J13 Connector Description SPI chip select for Atlas #3 SPI chip select for Atlas #2 Cable shield connection Ground SPI Slave Out SPI chip select for Atlas #1 SPI chip select for Atlas #4 SPI Clock SPI Slave In A.3.5.2 Pulse & Direction Mode J13 can also be used to provide pulse & direction signals to a single Atlas. Here are the pinouts for J13 when used in pulse & direction signal mode Pin Name 1 not used 2 not used 3 Shield 4 GND 5 not used 6 AtRest 7 not used 8 Pulse 9 Direction J13 Connector Description Cable shield connection Ground Pulse & direction mode AtRest signal Pulse & direction mode Pulse signal Pulse & direction mode Direction signal 160 Atlas® Digital Amplifier Complete Technical Reference A.3.6 Atlas Connections Atlas Developer's Kit A The carrier card connects to the Atlas units via sockets at J14, J15, J16, and J17. The tables below show the Atlas connections for these connectors A.3.6.1 Vertical Unit Connections 19 17 15 13 11 9 7 5 3 1 20 18 16 14 12 10 8 6 4 2 J14, J15, J16, & J17 Connectors Pin Name 1 Pwr_Gnd 3 HV 5 Motor A 7 Motor B 9 Motor C 11 Motor D 13 ~Enable 15 5V 17 ~SPICS/AtRest 19 SPIClk/Pulse Pin Name 2 Pwr_Gnd 4 HV 6 Motor A 8 Motor B 10 Motor C 12 Motor D 14 FaultOut 16 GND 18 SPISI/Direction 20 SPISO Refer to Figure A-3 for connector locations. Figure A-4: Vertical Unit Pinouts The pins are 0.1 inch spacing and 0.025 inch pin width. Atlas® Digital Amplifier Complete Technical Reference 161 A Atlas Developer's Kit A.3.6.2 Horizontal Unit Connections Figure A-5: Horizontal Unit Pinouts 11 9 7 5 3 1 12 10 8 6 4 2 22 21 20 19 18 17 16 15 14 13 J14A, J15A, J16A, & J17A Connectors Pin Name 1 Motor D 3 Motor C 5 Motor B 7 Motor A 9 HV 11 Pwr_Gnd Pin Name 2 Motor D 4 Motor C 6 Motor B 8 Motor A 10 HV 12 Pwr_Gnd J14B, J15B, J16B, & J17B Connectors 13 5V 15 ~Enable 17 GND 19 SPISO 21 SPIClk/Pulse 14 GND 16 FaultOut 18 ~SPICS/AtRest 20 SPISI/Direction 22 GND The pins are 0.1 inch spacing and 0.025 inch pin width. 162 Atlas® Digital Amplifier Complete Technical Reference Atlas Developer's Kit A A.3.7 Compact To Ultra Compact Package Signal Converters Figure A-6: Vertical and Horizontal Compact to Ultra Compact Package Signal Converters When ultra compact package Atlas units are installed in the Atlas DK, signal converter cards are installed between the DK carrier cards and the Atlas unit. Two converter formats are provided, one for horizontal Atlas units and one for Vertical units. These devices convert signals from the DK card's compact package format to the ultra compact format. These converters may also be used in other products designed for the compact package format such as the Prodigy/ CME Machine Controller cards. A.3.7.1 Vertical Ultra Compact Converter Pinouts The following section shows the connections provided by the vertical converter. Compact Package Pin 1, 2 3, 4 5, 6 7, 8 9, 10 11, 12 13 14 15 16 17 18 19 20 Ultra Compact Package Pin 4 1 3 6 5 7 11 12 14 13 16 18 17 15 Name Pwr_Gnd HV Motor A Motor B Motor C Motor D ~Enable FaultOut 5V GND ~SPICS/AtRest SPISI/Direction SPIClk/Pulse SPISO Atlas® Digital Amplifier Complete Technical Reference 163 A Atlas Developer's Kit A.3.7.2 Horizontal Ultra Compact Converter Pinouts The following section shows the connections provided by the horizontal converter. Compact Package Pin 1, 2 3, 4 5, 6 7, 8 9, 10 11, 12 13 14 15 16 17 18 19 20 21 22 Ultra Compact Package Pin 1 2 3 4 5 6 11 12, 15 14 13 12, 15 10 9 7 8 12, 15 Name Motor D Motor C Motor B Motor A HV Pwr_Gnd 5V GND ~Enable FaultOut GND ~SPICS/AtRest SPISO SPISI/Direction SPIClk/Pulse GND A.3.8 LED Indicators The Atlas DK carrier card has two LEDs. The green LED, when lit, indicates that Atlas is receiving valid power input power at HV. The red LED, when lit, indicates that an Atlas FaultOut condition is active. A.4 L-Bracket The Atlas DK comes with mounting plates that provide extra mechanical stability and heat sinking during prototyping. Depending on the type of Atlas that you are using, you will use just the base plate or the base plate and vertical plate in the "L" configuration. L-bracket hardware is provided in the one axis configuration and four axis configuration. Normally, the Atlas units and carrier cards are fully assembled into the L-brackets. If you ordered your DK components not assembled however, you can assemble these components yourself. To assist with this, an assembly drawing is shown in Figure A-7. All needed assembly components should be included with the shipment. In addition, you will need 1.5 mm and 2 mm hex wrenches to assemble the carrier card, Atlas units, and L-bracket together. 164 Atlas® Digital Amplifier Complete Technical Reference $7/$6 $03/,),(5 ; 6&5(:6 0 ; 6&5(:6 0 ; Atlas Developer's Kit A Figure A-7: Mounting Atlas to L-bracket Plates (fouraxis, vertical version shown) /%5$&.(7 $66(0%/< A.4.1 Mounting Atlas to Vertical Plate For compact package size vertical units two M2.5 BHCS (Button Head Cap Screws) or similar are used to attach the Atlas units to the vertical plate. For ultra compact units M2.0 screws are used. This is shown in Figure A-7. For best thermal performance, a material such as Sil-Pad, thermal grease, or phase change material should be utilized between metal interfacing layers. For horizontal units the Atlas unit is seated in the carrier via a socket. No mechanical hardware is used to attach the Atlas to a mechanical plate. Atlas® Digital Amplifier Complete Technical Reference 165 A Atlas Developer's Kit A.4.2 Mounting L-bracket to Other Hardware To maximize heat sinking capacity you may choose to mount the vertical L-bracket piece to your own hardware. For best thermal performance, a material such as Sil-Pad thermal grease or phase change material should be utilized between metal interfacing layers. To connect to the vertical plate use four (4) M4 screws threaded into the provided threaded holes in the vertical plate or use four (4) M3 screws with nuts and washers to fasten through from the front. The diagrams below show the location of these mounting holes for both the 4-axis and 1-axis vertical plates. Figure A-8: Top and Front Views of FourAxis Horizontal Atlas DK L-bracket Vertical Plate ; 0; + ; )520 23326,7( 6,'( Figure A-9: Top and Front Views of OneAxis Horizontal Atlas DK L-bracket Vertical Plate ; 0; % 7+58 $// ; 0; % ; )520 23326,7( 6,'( 166 Atlas® Digital Amplifier Complete Technical Reference B.Application Notes In This Appendix Brushless DC Atlas With Single-Axis MC58113 Motion Control IC DC Brush & Step Motor Atlas With Multi-Axis Magellan Step Motor Atlas Operating In Pulse & Direction Mode DC Brush Atlas With PIC Microcontroller Step Motor Atlas With ARM Microcontroller Atlas Interfacing Via a Daughter Card Multi-Motor Atlas With Single-Axis MC58113 Motion Control IC Application Notes B B.1 Brushless DC Atlas with SingleAxis MC58113 Motion Control IC The following schematic shows a Brushless DC Atlas Amplifier connected to a single-axis Magellan. B.1.1 Atlas Power Input and Motor Output Atlas is powered through pin pairs HV and Pwr_Gnd, and the power source is a transformer-isolated DC power supply. When unregulated DC power supply is used the output voltage with respect to its output power/current should meet the full Atlas operating range specification. Be aware that for motors operating with significant inertia, during deceleration, Atlas may convert excess kinetic energy to electrical energy and feed the energy back to the DC power supply input. The power supply therefore should be able to absorb or "dump" this regenerated energy so that the increased bus voltage will not trigger an Atlas over-voltage event, or otherwise damage the power supply or other attached devices. An input capacitor can be used to absorb the regenerated energy with E=C*V*deltaV where E is the kinetic energy, C is the capacitance of the input capacitance, V is the DC bus voltage and deltaV is the allowed voltage increase. For some regulated power sources the regenerated energy may interfere with the power source's operation. If that is the case, you may consider adding a diode between the regulated power source and the input capacitor bank. The Pwr_Gnd and GND pins are connected together inside the Atlas, and at a system level they refer to the same ground. Pwr_Gnd, the current return path for the power train, is paired with HV and may therefore be noisy. GND is the reference for the SPI signals and other digital control signals. These signals require a quiet ground reference. To ensure optimal performance, star grounding is recommended for component placement and layout. That is, Pwr_Gnd and GND should be connected to the system ground very close to Atlas, and the two ground paths should be kept away from each other. There is a third current return path stemming from the high frequency component of the motor winding current. Atlas drives motor windings with pulse-width modulated (PWM) signals. Although the sum of the average winding currents is zero, the high frequency PWM signal may couple to the ground plane and induce noise into other circuits. Therefore, depending on your application, you may consider utilizing a shielded motor cable to provide a current return path. If utilized, its ground point should be very close to, or the same, as Pwr_Gnd. B.1.2 Atlas SPI Interface Atlas receives control commands through an SPI interface and functions as an SPI slave. Atlas SPI communication is enabled when ~SPICS is pulled down. Atlas® Digital Amplifier Complete Technical Reference 167 B Application Notes To ensure optimal SPI communication, please consider the following layout recommendations: 1 Keep traces short and use 45 degree corners instead of 90 degree corners. 2 All SPI signal traces should be located next to a continuous ground plane, or if possible, between two continuous ground planes. 3 Keep traces away from other noisy and high speed signal traces. Alternatively, run ground traces along with these signals as a shield. 4 When multiple Atlas modules are used, keep the SPI signal stubs short. Note that the Atlas Development Kit layout can be used as a layout reference. B.1.3 Atlas ~Enable and FaultOut Signals Atlas has one dedicated input signal, ~Enable, which must be pulled low for the Atlas output stage to be active. FaultOut is a dedicated output. During normal operation it outputs low. When a fault occurs it will go into a high impedance state. In this example, FaultOut is pulled up by Vpullup through resistor R1. Vpullup can be up to 24V to meet the system requirement. For example, if the fault signal is wired to a 5V TTL input, Vpullup can be 5V. B.1.4 Magellan MC58113 Configuration In this schematic the SPI master is a single axis Magellan MC58113. Only the connections with Atlas are shown. For complete MC58113 wiring, please refer to the MC58113 electrical specifications. Depending on the Magellan commutation method selected the feedback signals HallA, HallB, HallC and ~Index are optional. 168 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-1: Brushless DC Atlas With Single-Axis Magellan Atlas® Digital Amplifier Complete Technical Reference 169 B Application Notes B.2 DC Brush & Step Motor Atlas with Multi-Axis Magellan The following schematic shows a two-axis application with one DC Brush Atlas Amplifier and one step motor Atlas amplifier controlled by a multi-axis Magellan. B.2.1 Atlas Power Input and Motor Output Atlas is powered through pin pairs HV and Pwr_Gnd, and the power source is a transformer-isolated DC power supply. In this application the two Atlases share the same power supply. Alternatively they could be powered independently so that different motor voltages could be used. For DC Brush motors pins MotorA and MotorB are wired to motor windings Motor+ and Motor-, respectively. Pins MotorC and MotorD are left un-connected. For step motors pins MotorA, MotorB, MotorC and MotorD are wired to motor windings A+, A-, B+ and B-, respectively. Please refer to B.1 for layout and wiring recommendations on power input and motor outputs. B.2.2 Atlas SPI Interface Atlas receives control commands through an SPI interface and functions as an SPI slave. Atlas SPI communication is enabled when ~SPICS is pulled down. Only one Atlas can be enabled at any given time. Please refer to B.1 for layout recommendation on SPI interface. B.2.3 Atlas ~Enable and FaultOut Signals Atlas has one dedicated input signal, ~Enable, which must be pulled low for the Atlas output stage to be active. FaultOut is a dedicated output. During normal operation it outputs low. When a fault occurs it will go into a high impedance state. In this example, FaultOut is pulled up by Vpullup through resistor R1. Vpullup can be up to 24V to meet the system requirement. Each Atlas may use a different Vpullup voltage, for example, if the fault signal is wired to a 5V TTL input, Vpullup can be 5V. B.2.4 Magellan MC58420 Configuration In this schematic the SPI master is a four-axis Magellan MC58420. Only the connections with Atlas are shown. For complete Magellan wiring, please refer to the MC58420 electrical specifications. The MC58420 is configured to default to Atlas motor output by tying pin 7, OutputMode0, to ground. In this example axis 2 and axis 3 are under control. The MC58420 sends torque commands to the DC Brush Atlas by pulling SPIEnable2 low, and sends position commands to the step motor Atlas by pulling SPIEnable3 low. 170 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-2: DC Brush & Step Motor Atlas With Multi-Axis Magellan Atlas® Digital Amplifier Complete Technical Reference 171 B Application Notes B.3 Step Motor Atlas Operating In Pulse & Direction Mode The following schematic shows Atlas operated in pulse & direction mode controlled by a single axis Magellan. Note that any source of pulse & direction signals, such as a microprocessor or other dedicated motion control IC, may be substituted for the Magellan in this schematic. B.3.1 Atlas Power Input and Motor Outputs Atlas is powered through pin pairs HV and Pwr_Gnd, and the power source is a transformer-isolated DC power supply. For step motors pins MotorA, MotorB, MotorC and MotorD are wired to motor windings A+, A-, B+ and B-, respectively. Please refer to B.1 for layout and wiring recommendations on power input and motor outputs. B.3.2 Atlas Pulse & Direction Interface When in pulse & direction signal mode, Atlas receives pulse, direction and AtRest signals as shown in the schematic. When operated in pulse & direction signal mode SPI communications are not available. B.3.3 Atlas ~Enable and FaultOut Signals Atlas has one dedicated input signal, ~Enable, which must be pulled low for the Atlas output stage to be active. FaultOut is a dedicated output. During normal operation it outputs low. When a fault occurs it will go into a high impedance state. In this example, FaultOut is pulled up by Vpullup through resistor R1. Vpullup can be up to 24V to meet the system requirement. For example, if the fault signal is wired to a 5V TTL input, Vpullup can be 5V. B.3.4 Magellan MC54113 Configuration In this schematic the SPI master is a single-axis Magellan MC54113 configured for pulse & direction signal output. Only the connections with Atlas are shown. For complete Magellan wiring, please refer to the MC58113 electrical specifications. 172 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-3: Step Motor Atlas Operating In Pulse & Direction Mode Atlas® Digital Amplifier Complete Technical Reference 173 B Application Notes B.4 DC Brush Atlas with PIC Microcontroller The following schematic shows a DC Brush Atlas amplifier connected to a Microchip Technologies' PIC microcontroller. Atlas receives torque commands through the PIC's SPI interface. A wide variety of microcontrollers, DSP-type devices, or FPGAs supporting SPI interfaces can control Atlas directly. Microchip's dsPIC33FJ64GS606 is used in this example. It supports encoder inputs and other feedback inputs. Users design their own motion control algorithms on the microcontroller, which in turn commands Atlas to drive the motor. B.4.1 Atlas Power Input and Motor Output Atlas is powered through pin pairs HV and Pwr_Gnd, and the power source is a transformer-isolated DC power supply. For DC Brush motors pins MotorA and MotorB are wired to motor windings Motor+ and Motor-, respectively. Pins MotorC and MotorD are left un-connected. Please refer to B.1 for layout and wiring recommendation on power input and motor outputs. B.4.2 Atlas SPI Interface Atlas functions as an SPI slave, receiving control commands from the PIC through its SPI interface. Atlas SPI communication is enabled when ~SPICS is pulled down. Please refer to B.1 for layout recommendation on SPI interface. B.4.3 Atlas ~Enable and FaultOut Signals Atlas has one dedicated input signal, ~Enable, which must be pulled low for the Atlas output stage to be active. FaultOut is a dedicated output. During normal operation it outputs low. When a fault occurs it will go into a high impedance state. In this example, FaultOut is pulled up by Vpullup through resistor R1. Vpullup can be up to 24V to meet the system requirement. For example, if the fault signal is wired to a 5V TTL input, Vpullup can be 5V. B.4.4 Microcontroller Configuration In this schematic, the host controller is Microchip's dsPIC33FJ64GS606. The microcontroller's SPI port (SDI1/ SDO1/SCK1) is used for SPI communication. In this example output pin #12 of U1 (PIC processor) is used to control Atlas' ~SPICS input. ~SPICS has an internal pull-up, therefore, during power up and after reset, the control pin should be in high-impedance or output high state to disable the SPI. Resistor R2 is optional. 174 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-4: DC Brush Atlas With PIC Microcontroller Atlas® Digital Amplifier Complete Technical Reference 175 B Application Notes B.5 Step Motor Atlas with ARM Microcontroller The following schematic shows a step motor Atlas amplifier connected to an STMicroelectronic's ARM microcontroller. Atlas receives torque commands through the ARM's SPI interface. A wide variety of microcontrollers, DSP-type devices, or FPGAs supporting SPI interfaces can control Atlas directly. STMicroelectronic's STR912FAZ44H6T is used in this example. Users design their own motion control algorithms on the microcontroller, which in turn commands Atlas to drive the motor. B.5.1 Atlas Power Input and Motor Outputs Atlas is powered through pin pairs HV and Pwr_Gnd, and the power source is a transformer-isolated DC power supply. For step motors pins MotorA, MotorB, MotorC and MotorD are wired to motor windings A+, A-, B+ and B-, respectively. Please refer to B.1 for layout and wiring recommendations on power input and motor outputs. B.5.2 Atlas SPI Interface Atlas functions as an SPI slave, receiving control commands from the ARM through its SPI interface. Atlas SPI communication is enabled when ~SPICS is pulled down. Please refer to B.1 for layout recommendation on SPI interface. B.5.3 Atlas ~Enable and FaultOut Signals Atlas has one dedicated input signal, ~Enable, which must be pulled low for the Atlas output stage to be active. FaultOut is a dedicated output. During normal operation it outputs low. When a fault occurs it will go into a high impedance state. In this example, FaultOut is pulled up by Vpullup through resistor R1. Vpullup can be up to 24V to meet the system requirement. For example, if the fault signal is wired to a 5V TTL input, Vpullup can be 5V. B.5.4 Microcontroller Configuration In this schematic, the host controller is ST's STR912FAZ44H6T. The microcontroller's SPI port is used for SPI communication. In this example output pin K7 of the U1 (ARM processor) is used to control Atlas' ~SPICS input. ~SPICS has an internal pull-up, therefore, during power up and after reset, the control pin should be in high-impedance or output high state to disable the SPI. 176 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-5: Step Motor Atlas With ARM Microcontroller Atlas® Digital Amplifier Complete Technical Reference 177 B Application Notes B.6 Atlas Interfacing Via a Daughter Card The following schematic shows an example of Atlas interfacing via a daughter card. B.6.1 Atlas Application Considerations Via a Daughter Card Ground placement is critical for Atlas operation. Atlas is powered through pin pairs HV and Pwr_Gnd with a transformer-isolated DC power supply. The Pwr_Gnd and GND pins are shorted inside the Atlas, and at a system level they refer to the same ground. Pwr_Gnd is the current return path for the power train, while GND is the reference for the SPI signals and other digital control signals. Also, there is another current return path from the high frequency component of the motor winding current. To ensure optimal performance, star grounding is recommended for component placement and layout. That is, Pwr_Gnd and GND should be connected to the system ground very close to Atlas, and the ground return paths should be kept away from each other. Please refer to B.1 for general layout and wiring considerations on power input and motor outputs. When Atlas is used with a daughter card, above grounding requirements might be difficult to implement at system level. For example, Atlas is installed close to the motor on a daughter card while the host controller resides in the mother board. The host controller controls Atlas through a cable, and too long a cable might compromise the module performance. Another example is that a single power supply powers multiple Atlas daughter card at different locations through long, separate, power cables. The long cables establish a current loop, and the ground current might interfere with normal Atlas operation. This application note provides some examples to address above issues. In the example schematic, PMD's Magellan IO and CP chips are used to control the two Atlas units on the daughter card(s). Because of the length of the connecting cable between the host board and daughter board(s), there are buffers added on the SPI bus on the host board in order to boost the signal driving and sinking capabilities. B.6.2 Atlas SPI Through Isolator Atlas receives control commands through an SPI interface and functions as an SPI slave; The SPI signals refer to its "local" ground. However, when Atlas is on a daughter card with a cable to the host controller, the host controller's local ground might be different, and SPI communication might see errors due to the ground difference/noise. An isolator can be used to "break" the ground so that Atlas and the host controller refer to their own grounds. In this example, U1 and U2 are digital isolators. Atlas refers to "side B" ground and the host controller to "side A" ground. Please note that the isolators have to meet the timing specification for Atlas communication because the isolator will add delay to the signals. The buffer U5 and U6 are to boost the signal driving and sinking capability after the isolator output. In this example, DB9 connector with shielded DB9 cable is used. When R3 is zero, the shield is connected to side A ground at the daughter card end. Similarly, on the Magellan side (on the mother board), buffer U7 and U9 are used to boost the signal driving and sinking capability, and, when R4 is zero, the shield is connected to side A ground at the host end. Depending on the design layout, a Schmitt trigger input or standard termination practice might be necessary for the application with long cables. B.6.3 HV and Pwr_Gnd High-Frequency Isolation When a single power supply powers multiple Atlas modules through long, separate, power cables, the long cables establish a current loop because they are shorted at both the power supply and the Atlas end. It will result in ground currents that might interfere with normal Atlas operation. 178 Atlas® Digital Amplifier Complete Technical Reference Application Notes B In this case, an L-C-L network can be used to provide high-frequency isolations among the modules. For example, for Atlas U3, C1 is between the Atlas HV and Pwr_Gnd. It serves as the bank capacitor for Atlas operation when necessary. L1 is between Atlas HV and power supply positive output. L2 is between Atlas Pwr_Gnd and power supply ground return. The current rating of L1 and L2 has to fit the Atlas operation current. L1 and L2 will bring in high impedance at high frequency to attenuate the ground current. A separated L-C-L network is used for Atlas U4 for optimum performance. Atlas® Digital Amplifier Complete Technical Reference 179 B Application Notes Figure B-6: Atlas Interfacing Via A Daughter Card #1 180 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-7: Atlas Interfacing Via A Daughter Card #2 Atlas® Digital Amplifier Complete Technical Reference 181 B Application Notes B.7 Multi-Motor Atlas with Single-Axis MC58113 Motion Control IC The following schematic shows multi-motor Atlas with single-axis MC58113 motion control IC. B.7.1 Atlas Power Input and Motor Outputs Atlas is powered through pin pairs HV and Pwr_Gnd, and the power source is a transformer-isolated DC power supply. Multi-motor Atlas can be configured to support DC brush motor, Brushless DC motor or step motor. For DC Brush motors pins MotorA and MotorB are wired to motor windings Motor+ and Motor-, respectively. Pins MotorC and MotorD are left un-connected. For Brushless DC motors pin Motor A, MotorB and MotorC are wired to motor windings A, B and C, respectively. Pin MotorD is left un-connected. For step motors pins MotorA, MotorB, MotorC and MotorD are wired to motor windings A+, A-, B+ and B-,respectively. Please refer to Section B.1, "Brushless DC Atlas with Single-Axis MC58113 Motion Control IC," for layout and wiring recommendations on power input and motor outputs. B.7.2 Atlas SPI Interface Atlas receives control commands through an SPI interface and functions as an SPI slave. Atlas SPI communication is enabled when ~SPICS is pulled down. Only one Atlas can be enabled at any given time. Please refer to Section B.1, "Brushless DC Atlas with Single-Axis MC58113 Motion Control IC," for layout recommendation on SPI interface. B.7.3 Atlas ~Enable and FaultOut Signals Atlas has one dedicated input signal, ~Enable, which must be pulled low for the Atlas output stage to be active. FaultOut is a dedicated output. During normal operation it outputs low. When a fault occurs it will go into a high impedance state. In this example, FaultOut is pulled up by Vpullup through resistor R1. Vpullup can be up to 24V to meet the system requirement. For example, if the fault signal is wired to a 5V TTL input, Vpullup can be 5V. B.7.4 Magellan MC58113 Configuration In this schematic the SPI master is a single-axis MC58113. Only the connections with Atlas are shown. For complete Magellan wiring, please refer to the MC58113 electrical specifications. 182 Atlas® Digital Amplifier Complete Technical Reference Application Notes B Figure B-8: Multi-motor Atlas With MC58113 Motion Control IC Atlas® Digital Amplifier Complete Technical Reference 183 B Application Notes This page intentionally left blank. 184 Index Symbols ~Enable 26 ~SPICS 26 A absolute maximum ratings 24 AC characteristics 27 amplifier disable, sending 89 application notes 167 Atlas commands, sending 90 Atlas Developer's Kit 13, 155 getting started 156 installation 156 overview 155 B brushless DC Atlas, single-axis magellan 167 brushless DC motors 33 buffer access commands 68 buffer indexes 68 buffers 68 C carrier card reference information 158 command mnemonics 41 commutation 42 compliance 25 connecting, to the Magellan DK Card 157 connection brushless DC motors 33 DC brush motors 34 overview 33 power 157 connections 161 motor 157 current control, step motors 67 current foldback 62 event processing 64 voltage mode 63 current loop 45 disabling 46 enabling 46 reading values 48 Atlas® Digital Amplifier Complete Technical Reference D DC brush & step motor Atlas, multi-axis magellan 170 DC brush Atlas, PIC microcontroller 174 DC brush motors 34 DC characteristics 25 ~Enable 26 ~SPICS 26 5V 26 FaultOut 26 SPIClk 25 SPISI 25 SPISO 25 disabling, power stage 54 drive fault status register 61 ratings 23 drive enable 61 Drive Status register 55 E electrical specifications 23 Enable signal connection 157 enabling, power stage 54 Encoder, phasing 44 environmental ratings 25 Event Status register 55 F fault overcurrent 57 overtemperature 58 FaultOut 26 FaultOut Signal 62 features 12 field oriented control 49 FOC loop values 50 step motors 50 voltage mode 50 functional overview 39 functions 12 185 H Hall sensors, phasing with 43 horizontal unit with tabs 17 without tabs 17 I individual phase control step motors 48 voltage mode 48 instruction reference alphabetical listing 93 overview 93 internal block diagram 40 J J1 & J2 jack screw connectors 159 J4 connectors 160 J5 DB9 conectors 160 L L-bracket 164 LED indicators 164 M Magellan DK Card, connecting to 157 motor connection 157 current, setting 66 mounting dimensions 16 options 18 to vertical plate 165 N non-volatile initialization storage 74 NOP, sending 89 O operation 39 operational specifications 15 overcurrent fault 57 overtemperature fault 58 overview 9 overvoltage fault 59 P packet header 86 phase angle, determining 42 phase control 186 individual 47 voltage mode 48 with step motors 48 phase initialization, incremental encoders 45 phasing, Hall sensors 43 phasing, with Encoder 44 physical characteristics 16 pin descriptions 27, 30 pinouts 27 Atlas horizontal unit 28 Atlas vertical unit 28 power connections 157 stage 52 power stage disabling 54 enabling 54 powering up, Atlas units 158 power-up 74 pulse & direction recovering from signal mode 66 signal input mode 65 signal input mode, fault processing 67 signal mode operation setup 66 PWM output limiting 53 R ratings absolute maximum 24 drive 23 environmental 25 reading third leg floating loop values 52 S safety 25 safety processing functions 57 current foldback 62 drive enable 61 drive fault status register 61 FaultOut Signal 62 overcurrent fault 57 overtemperature fault 58 overvoltage fault 59 undervoltage fault 60 watchdog timeout 60 set motor current 66 signal interfacing 32 ~Enable 32 Atlas® Digital Amplifier Complete Technical Reference FaultOut 32 Signal Status register 56 SPI bus connections 156 SPI communications overview 82, 85 SPI pulse & direction mode 67 SPI Status register 56 SPIClk 25 SPISI 25 SPISO 25 status Drive Status 55 Event Status 55 registers 55 Signal Status 56 SPI Status 56 step motor Atlas, ARM microcontroller 176 step motor Atlas, pulse & direction mode 172 step motor control 64 step motors pulse & direction signal mode 35 SPI communications 36 T third leg floating control 51 loop values, reading 52 voltage mode 52 trace buffer 70 capture 69 data format 73 data, downloading 73 mode 72 parameters 69 period 70 start/stop 72 status word 73 variables 70 trigger mode 72 U undervoltage fault 60 user memory space 68 V vertical unit with tabs 16 without tabs 16 voltage or torque output 83 voltage or torque output, sending 88 W watchdog timeout 60 Atlas® Digital Amplifier Complete Technical Reference 187 This page intentionally left blank. 188Acrobat Distiller 9.0.0 (Windows)