bds5 User
bds5 User
USER’S MANUAL
Old Number M93102 - ISSUE 3
New number MB5001H
BDS5 TECHNICAL MANUAL CONFIGURATION
CONFIGURATION TABLE
( USER’S MANUAL M93102 )
RECORD OF REVISIONS
ISSUE NO.
(Revision) DATE CHANGED PAGES/BRIEF DESCRIPTION OF CHANGE CHANGE NO.
Name: Title:
Company:
Street Address:
City: State: Zip:
Telephone: Fax:
Product:
Manual Part Number:
Please check the rating that best represents your opinion on each topic.
Signature: Date:
© Copyright 1993, Danaher Motion Kollmorgen. All rights reserved
Printed in the United States of America
NOTICE
Not for use or disclosure outside of Danaher Motion Kollmorgen except under written
agreement.
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system,
or transmitted by any means (electronic, mechanical, photocopying, recording, or
otherwise) without the written permission from the publisher. While every precaution has
been taken in the preparation of this book, the publisher assumes no responsibility for
errors or omissions. Neither is any liability assumed for damager resulting from the use
of the information contained herein.
This document is proprietary information of Danaher Motion Kollmorgen, furnished for
customer use ONLY. No other uses are authorized without written permission from
Danaher Motion Kollmorgen.
Information in this document is subject to change without notice and does not represent a
commitment on the part of Danaher Motion Kollmorgen. Therefore, information
contained in this manual may be updated without notice due to product improvements,
etc., and may not conform in every respect to former issues.
This product is covered by U. S. Patents:
4,447,771
4,479,078
4,490,661
Other (foreign patents pending)
U. L. is a trademark of Underwriter's Laboratories.
N. E. C. is a trademark of the National Electric Code.
Kollmorgen GOLDLine, BDS4, BDS5, and PSR4/5 are trademarks of Danaher Motion
Kollmorgen.
FOREWORD
The commitment to quality at Industrial Drives is our earth magnet development for the servo motor
first priority. In all aspects of our business: research, industry.
development, product design and customer service,
we strive to guarantee total quality. This pledge is Between 1974 and 1980, Industrial Drives continued
founded on a solid history of innovative technological to lead the industry in servo application innovations.
achievements dating back to 1948. One of the finest Our commitment to engineering excellence never
tributes to that achievement can now be seen at the waivered. In fact, that commitment grew stronger
Smithsonian which has on display the first stellar with the development of brushless submarine and
inertial navigation system developed by Dr. Charles submersible motors (visiting the Titanic graveyard),
Stark Draper. This system contains the first models multi-axis electronic drives and antenna pedestal
of torque motors built by the founding organization of drives (delivering unprecedented accuracy and
Industrial Drives. During the period of 1948 to 1960, revolutionizing the entire industrial automation
our "firsts" in the industry numbered more than a process).
dozen; they ranged from the simple but invaluable
(such as the direct-drive DC torque motor and movie The decade of the 1980's brought continued
theater projection motors) to the exotic: submarine advancements in technology and penetration of new
periscope drive motors for the U.S. Navy, electric markets requiring precise motion control. Already in
drives, Curtis Wright electric brake coils, and the fifth generation of brushless products, Industrial
numerous other innovations. Drives continues to lead the way with digital servo
positioning capability and our newest motor offering,
For more than a decade, Industrial Drives (known in the GOLDLINE Series, incorporating the very latest
the early days as part of Inland Motor Division of high-energy, rare earth magnets (neodymium iron
Kollmorgen) has continued to enhance its boron). Once again, we are setting the standards that
sophisticated engineering solutions to pioneer new others only hope to duplicate. Recently
product development. acknowledged by the Frost and Sullivan Foundation,
a leading market specialist in the motion control
The results of these and other efforts has encouraged industry, Industrial Drives and its parent, Kollmorgen
some of the most significant innovations in the servo Corporation, continue to rank first in servo
industry. We developed the application of servo technology.
motors and drives in the Machine Tool market. We
were the first with water-cooled servos, the integral Other achievements? Yes, too many in fact to
brake, the flux forcing concept and the brushless mention. Each achievement stands as a testimony to
motor. We developed the electronically commutated the committed quality and excellence in design
electric car motor. Industrial Drives pioneered rare technology. This constancy of purpose is unyielding
in an era of rapidly changing technology.
BDS5 HOW TO USE THIS MANUAL
This User’s Manual is designed to help you properly To assist you in understanding the material in this
operate a BDS5 Servo System. You do not have to manual, conventions have been established to
be an expert in motion control to utilize the system enhance reader comprehension. Explanations of
however this manual does assume you have the these conventions are as follows:
fundamental understanding of basic electronics and
motion control concepts. Many of these are • Safety warnings, cautions, and notes present
explained in the glossary of this manual. material that is important to user safety. Be sure
to read any safety notices you see as they could
The BDS5 is a programmable motion control device. prevent equipment damage, personal injury, or
An understanding of computer programming even death to you or a co-worker.
techniques will be beneficial to all users. For
applications that require complex programs, a • Bold text highlights other important information
professional programmer should be consulted. that is critical to system operations.
ABBREVIATIONS NOTICE:
CCW Counter Clockwise This manual is the second of a two part manual
CW Clockwise structure. The Installation and Setup Manual is
D/L Direction Limit intended to instruct the user on the installation
GC Goldline Cable procedures and practices to be used with the BDS5.
GCS Goldline Cable Set
LED Light Emitting Diode
NEC National Electrical Code
P/N Part Number
R/D Resolver-to-Digital
Regen Regeneration
TL Test Limits
UL Underwriters Laboratories
TABLE OF CONTENTS BDS5
TABLE OF CONTENTS
2.6.2.1 Interactive Mode ..................................... 2-10
CHAPTER 1. SYSTEM DESCRIPTION
2.6.2.2 Run Mode ............................................... 2-12
2.6.2.3 Monitor Mode......................................... 2-12
1.1 Introduction..................................................... 1-1
2.6.2.4 Single-Step Mode.................................... 2-12
1.2 Product Description ........................................ 1-1
2.6.2.5 Trace Mode............................................. 2-12
1.3 Features........................................................... 1-1
2.6.2.6 Other Modes ........................................... 2-13
1.4 Part Number Description ................................ 1-3
1.4.1 BDS5 Model Number .................................. 1-4
1.4.2 Compensation Module Model Number........ 1-5
CHAPTER 3. PROGRAMMING LANGUAGE
1.4.3 PSR4/5 Model Number................................ 1-6
1.4.4 ER-External Resistor Kit Model Number .... 1-7
3.1 Introduction..................................................... 3-1
1.4.5 Molex Assembly Tools ................................ 1-7
3.2 Instructions...................................................... 3-1
1.5 Specifications and Ratings .............................. 1-8
3.2.1 Comments .................................................... 3-1
1.6 Theory of Operation...................................... 1-12
3.3 Variables ......................................................... 3-1
1.7 Simplified Schematic Diagram
3.3.1 Variable Units .............................................. 3-2
and System Diagram ..................................... 1-13
3.3.2 Three Types of Variables............................. 3-2
3.3.3 Variable Limits ............................................ 3-2
3.3.4 Switches ....................................................... 3-2
CHAPTER 2. GETTING STARTED
3.3.5 Printing Variables ........................................ 3-2
3.3.6 Changing a Variable..................................... 3-3
2.1 Introduction..................................................... 2-1
3.3.7 Programming Conditions ............................. 3-3
2.2 Computer Requirements.................................. 2-1
3.3.8 Power-up and Control Variables.................. 3-3
2.3 Software Installation ....................................... 2-1
3.3.9 Initial Settings of Control
2.3.1 Backing Up the Disk(s)................................ 2-1
and User Variables....................................... 3-4
2.3.2 Software Installation .................................... 2-2
3.3.10 User Variables............................................ 3-7
2.3.2.1 Install on a Hard Disk ............................... 2-2
3.3.10.1 Indirect User Variables ........................... 3-7
2.3.2.2 Install on a Floppy Disk ............................ 2-2
3.3.11 User Switches............................................. 3-8
2.3.3 Establishing Communications...................... 2-3
3.3.12 Special Constants ....................................... 3-8
2.4 Motion Link Overview.................................... 2-4
3.4 Math ............................................................. 3-8
2.4.1 Menus and Windows..................................... 2-4
3.4.1 Hexadecimal ................................................ 3-8
2.4.1.1 Program..................................................... 2-4
3.4.2 Algebraic Functions ................................... 3-10
2.4.1.2 Variables ................................................... 2-4
3.4.3 Logical Functions: AND, OR....................... 3-9
2.4.1.3 Capture...................................................... 2-5
3.5 General Purpose Input/ Output ..................... 3-10
2.4.1.4 Scope ........................................................ 2-5
3.5.1 Whole Word I/O ........................................ 3-10
2.4.1.5 Options...................................................... 2-5
3.6 Fault Logic.................................................... 3-11
2.4.1.6 Help .......................................................... 2-6
3.6.1 Firmware Faults, Area 1............................. 3-13
2.4.1.7 Utilities ..................................................... 2-6
3.6.2 Fault Logic, Area 2 .................................... 3-13
2.4.2 Editor ........................................................... 2-7
3.6.3 Fault Latch, Area 3 .................................... 3-13
2.4.2.1 File ............................................................ 2-7
3.6.4 Ready Latch, Area 4................................... 3-13
2.4.2.2 Edit............................................................ 2-7
3.6.5 ACTIVE, Area 5 ........................................ 3-13
2.4.2.3 GOTO ....................................................... 2-8
3.6.6 Relay and STATUS Control, Area 6.......... 3-13
2.4.2.4 Insert/Delete.............................................. 2-8
3.6.7 Motor Brake............................................... 3-14
2.4.2.5 Cursor ....................................................... 2-8
3.6.8 Output Relay .............................................. 3-14
2.4.2.6 Help .......................................................... 2-8
3.7 Drive Control ................................................ 3-14
2.4.3 Types Of Data Files ..................................... 2-9
3.7.1 Direction Control, DIR .............................. 3-14
2.4.4 Using IBM-PC Compatibles ........................ 2-9
3.7.2 Position ...................................................... 3-14
2.5 Motion Link Setup Program............................ 2-9
3.7.2.1 Position Command and Feedback,
2.6 Processor Modes............................................. 2-9
PCMD & PFB......................................... 3-14
2.6.1 Prompts ........................................................ 2-9
3.7.2.2 Position Error, PE & PEMAX ................ 3-14
2.6.2 Descriptions of Modes ............................... 2-10
3.7.2.3 R/D Position, PRD.................................. 3-15
3.7.2.4 Sampling PFB, PCMD and PEXT .......... 3-15
i
BDS5 TABLE OF CONTENTS
ii
TABLE OF CONTENTS BDS5
iii
BDS5 TABLE OF CONTENTS
iv
LIST OF FIGURES BDS5
LIST OF FIGURES
1.1 BDS5 Model Number Scheme........................ 1-4 3.5 Macro Move Example #2.............................. 3-25
1.2 Compensation Model Number Scheme........... 1-5 3.6 Jog From (JF) Command .............................. 3-28
1.3 PSR4/5 Model Number Scheme ..................... 1-6 3.7 Jog To (JT) Command .................................. 3-29
1.4 External Regen Resistor Model 3.8 BDS5 Master/Slaving ................................... 3-34
Number Scheme.............................................. 1-7 3.9 BDS5 Control Modes.................................... 3-40
2.1 BDS5 Instruction Screen................................. 2-3 4.1 Sample Flowchart ........................................... 4-4
2.2 BDS5 State Table ......................................... 2-11 4.2 Auto/Manual Flowchart ................................ 4-31
4.3 Master/Slave Block Diagram ........................ 4-34
3.1 BDS5 Enable/Fault Logic Diagram .............. 3-12
3.2 A Simple Profile ........................................... 3-20 6.1 Critical Damping............................................. 6-2
3.3 S-Curve Profile ............................................. 3-21 6.2 Underdamping................................................. 6-2
3.4 Macro Move Example #1.............................. 3-25 6.3 Overdamping................................................... 6-2
6.4 Ringing............................................................ 6-2
v
LIST OF TABLES BDS5
LIST OF TABLES
1.1 BDS5 Model Number Scheme ........................ 1-4 4.4 Printing BDS5 Status .................................... 4-20
1.2 PSR4/5 Model Number Scheme...................... 1-6 4.5 Multi-Tasking Overview ............................... 4-24
1.3 External Regen Resistor Model 4.6 How to Enable Multi-Tasking ....................... 4-25
Number Scheme .............................................. 1-7 4.7 How to Disable Multitasking......................... 4-25
1.4 Specifications .................................................. 1-8 4.8 Four Idling Commands.................................. 4-26
1.5 Environmental Specifications........................ 1-12 4.9 To Execute AUTO$ ...................................... 4-30
1.6 Mechanical Specifications............................. 1-12 4.10 To Execute MANUAL$ .............................. 4-30
4.11 Common User Units.................................... 4-32
2.1 Cursor Control Keys........................................ 2-8 4.12 System Resolutions ..................................... 4-33
2.2 BDS5 Rules for Prompts ............................... 2-10 4.13 Setting External Units in
2.3 BDS5 Prompts............................................... 2-10 Master/Slave Systems.................................. 4-33
2.4 Monitor Mode Commands ............................ 2-12 4.14 English Conversion (12-bit
R/D Only).................................................... 4-35
3.1 Standard Units................................................. 3-2 4.15 Metric Conversion (12-bit
3.2 Power-Up State of Programmable Units ......... 3-4 R/D Only).................................................... 4-35
3.3 Rules For Math Expressions............................ 3-9 4.16 External Units Conversion .......................... 4-36
3.4 Output 1-8 Decimal Values ........................... 3-10 4.17 BDS5 Prompts............................................. 4-41
3.5 Input 1-16 Decimal Values............................ 3-11
3.6 PRD: Ranges and R/D Resolutions ............... 3-15
3.7 S-Curve Acceleration Chart .......................... 3-21 5.1 Multi-Tasking Debug Prompts ........................ 5-3
3.8 R/D Converter Accuracy ............................... 3-26 5.2 Segments for Different Moves ........................ 5-5
3.9 Encoder Resolution ....................................... 3-37 5.3 Error Severity Levels and Actions................... 5-8
vi
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
CHAPTER 1
SYSTEM DESCRIPTION
1-1
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
• ADVANCED MOTION CONTROL MOVES Quantities such as position, velocity, and acceleration
are automatically scaled into user-defined units. This
The simple language does not prevent you from feature lets you program the BDS5 in convenient units,
solving complex problems. The BDS5 has separate such as feet, inches, miles, RPM, and degrees.
acceleration and deceleration rates, as well as linear,
half S-curve, and full S-curve acceleration profiles. • SUPERIOR SERVO LOOP CONTROL
The BDS5 has Macro Moves for applications where
simple indexes cannot do the job. A Macro Move is a The BDS5 offers smooth, high-resolution control.
combination of up to 30 accelerations, traverses, and Standard BDS5 position repeatability is better than
decelerations, which are fully precalculated for faster one arc-minute, bidirectional. The BDS5 has a 32-bit
execution. You can program teach modes where position word. The BDS5 position loop completely
position end points can be changed by a factory eliminates the digital dither normally associated with
operator positioning systems. Long-term speed stability is
0.01%. The standard system converter (12-bit)
• MASTER/SLAVE - ELECTRONIC GEARBOX provides a resolution of 0.0005 RPM and a maximum
speed of 8000 RPM.
The electronic gearbox is used to link two motors
together so that the velocity of the slave is • SELF-TUNING
proportional to the velocity of the master. The ratio
can be from 32767:1 to 1:32767 and can be negative The BDS5 can tune itself. You do not have to be a
to allow the slave to move in the opposite direction. servo expert to set up a system quickly. Just specify
Also, the "index-on-gearing" feature permits phase the desired bandwidth, and let the BDS5 do the rest.
adjustments.
• POWERFUL MICROPROCESSOR
• MASTER/ SLAVE - PROFILE REGULATION
The heart of the BDS5 is the 16-bit processor that
With profile regulation you can control the slave's delivers high performance. The result: the BDS5 can
motion profile according to an external master motor control a motor and execute its motion program faster
or frequency. Profile regulation modifies the velocity than a standard positioner can.
and acceleration of the slave axis without affecting the
final position of the move. You can use profile • DIGITAL SERVO LOOPS
regulation to implement "feed rate override."
Both the position and velocity loops are totally digital.
• MOTION GATING AND REGISTRATION The digital loops give the BDS5 features not available
in standard velocity drives, such as self-tuning, very
The BDS5 can precalculate moves to begin motion low velocity offset, and digitally-adjustable servo
within one millisecond after a transition on the GATE tuning parameters. The optional analog input permits
input. This provides rapid and repeatable motion you to use the BDS5 as an analog velocity drive.
initiation. The BDS5 has the ability to capture the
current position within 25 microseconds after a • FEED-FORWARD GAIN
transition of the HOME input. This results in fast
homing and accurate registration sequences. The digital feed-forward gain reduces following error
and motion initiation delay, thereby increasing
• MATHEMATICS Algebraic math is provided for machine throughput.
commands such as:
• DIAGNOSTICS
X1 = 2 × ( X 2 + X 3)
The BDS5 offers a complete set of error diagnostics.
The BDS5 has 100 program labels, 50 user-definable When an error occurs, the BDS5 displays an English
variables, and 50 user-definable switches. It also has
15 mathematical/logical operations and over 150
system variables.
• USER UNITS
1-2
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
language error message. The BDS5 remembers the your IBM-PC (c) compatible computer. With this
last 20 errors even through power loss. In addition, package, the BDS5's programs and variables can be
the BDS5 lets you write your own error handler. retrieved from or saved to a disk drive. Also, on-line
During a fault condition, you can use the error handler help and a full screen editor are built into MOTION
to set outputs, alert an operator, and shut down your LINK.
process smoothly. The BDS5 offers trace and single-
step modes so that you can debug your program. The
BDS5 has complete fault monitoring, including travel • MENU-DRIVEN SOFTWARE
limit switches, feedback loss, and software position
limits, as well as hardware safety circuits (watchdogs) The BDS5's programming language allows you to
and checksums for more reliable and safer operation. write operator-friendly, menu-driven software. By
incorporating an INDUSTRIAL DRIVES Data Entry
• I/O Panel, or any other serial communications device, the
operator can be prompted for specific process data.
The BDS5 has up to 32 I/O sections that you connect
via ribbon cable to standard OPTO-22 compatible I/O • MONITOR MODE
boards or to INDUSTRIAL DRIVES I/O-32. The
I/O-32 provides either fixed 24-volt or removable, The BDS5 provides interactive communications and
industry standard, optically-isolated I/O in a permits all system variables and parameters to be
GOLDLINE style package. examined and modified at any time--even during
actual program execution or while the motor is
• SERIAL COMMUNICATIONS running.
1-3
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
UL Des ignator
Voltage and Cur r ent Ratings Us er Pr ogr am
O ptions Firm ware Vers ion
Motor and W inding R/D Res olution
LEGEND DEFINITION
A UL Designator
A UL Listed (standard)
V Non - UL Listed
B Voltage Rating
1 115 VAC
2 230 VAC
C Current Rating
03 3 Amps/Phase
06 6 Amps/Phase
10 10 Amps/Phase
20 20 Amps/Phase
30 30 Amps/Phase
40 40 Amps/Phase
55 55 Amps/Phase
D Mechanical Options (0 indicates standard feature)
0 Standard
E Communication Options
0 RS-232 (standard)
1 RS-422/RS-485
F Input Options
0 Encoder Input (standard)
1 Analog Input
2 Pulse Input
9 No Input
G I/O Options
0 8 I/O (standard)
1 32 I/O
H R/D Accuracy Options
0 8 ARC min (standard)
I Motor and Winding
Motor and Winding Specifies Motor Model Type, Winding
R/D Resolution R/D Resolution
2 12-Bit (4096 counts/rev)
4 14-Bit (16384 counts/rev)
Firmware Version Firmware Version (Assigned by Industrial Drives, not normally specified when ordering)
Most current firmware supplied -- unless otherwise specified.
User Program User Program (This is reserved for systems that are programmed by Industrial Drives. This
is not normally specified when ordering.)
1-4
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
203/204A
A B H
Current Rating
B-204-A-21.
1-5
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
P S R 4 / 5A - 2 2 0 - 0 0 0 3
A B C D E
LEGEND DEFINITIONS
A UL Designator
A UL Listed (standard)
V Non - UL Listed
B Voltage Rating
1 115 VAC
2 230 VAC
C Current Rating
12 12 Amps/Phase
20 20 Amps/Phase
50 50 Amps/Phase
75 75 Amps/Phase
D Mechanical Options
00 No Option (standard)
E Electrical Regen Options for 12 and 20 Amp Models Only
00 Standard Internal 40 W Regen (standard)
01 External Regen (230 VAC Only) 8.8 Ohms, 400 W., Requires ER-01 Resistor
Kit
02 External Regen (115 VAC Only) 5.5 Ohms, 200 W., Requires ER-02 Resistor
Kit
03 External Regen (230 VAC Only) 5.8 Ohms, 700 W., Requires ER-03 Resistor
Kit
E Electrical Regen Options for 50 and 75 Amp Models Only
00 No internal shunt regeneration (standard)
Requires external regeneration resistor kit ER-2X
1-6
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
NOTE
ER-01/XX
A B
LEGEND DEFINITIONS
A Resistor Rating
01 8.8 Ohms, 400 W., 230V, 12 & 20 Amp Models Only
02 5.5 Ohms, 200 W., 115V, 12 & 20 Amp Models Only
03 5.8 Ohms, 700 W., 230V, 12 & 20 Amp Models Only
20 4.5 Ohms, 500 W., 230V, 50 & 75 Amp Models Only
21 4.4 Ohms, 1000 W., 230V, 50 & 75 Amp Models Only
22 2.2 Ohms, 1000 W., 230V, 75 Amp Models Only
23 2.2 Ohms, 2000 W., 230V, 75 Amp Models Only
B Options
00 None available at this printing.
1.4.5 Molex Assembly Tools You can obtain the crimping and extraction tools from
your nearest Molex distributor or by contacting Molex
GOLDLINE series electronics (BDS4's, BDS5's, and at (708) 969-4550.
PSR4/5's) use Molex MINI-FIT JR. series connectors.
The necessary connectors and pins are included in Hand Crimping Tool Molex Order# 11-01-0122
your BDS5 and PSR4/5 connector kits.
Extractor Tool Molex Order# 11-03-0038
1-7
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
1-8
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
1-9
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
1-10
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
1-11
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
Operating Temperature*:
3, 6, & 10 AMP Units (Convection Cooled) 0o C to 45o C
20 Amp Units (Internal Fan Cooled) 0o C to 45o C
Drawing D-93030 shows a system overview. The BDS5 has 23 discrete inputs, including REMOTE
ENABLE which is on Connector C2 only. Note that
• MICROPROCESSOR SYSTEM two signals, HOME and CYCLE, can be input to the
BDS5 on two connectors, C2 and C7. Connector C2
The BDS5 is a digital positioner and servo drive provides these three signals with optical isolation.
combined into one unit. The velocity loop is 100% Connector C7 expects non-isolated TTL signals on a
digital. The BDS5 has battery backup RAM to 26-pin ribbon cable connector. Optional Connector
remember your program and most variables through C8 expects non-isolated TTL signals on a 50-pin
power-down. ribbon cable connector.
The BDS5 is based on a Resolver-to-Digital (R/D) The BDS5 has 10 discrete outputs. Notice that O1
converter. The R/D generates a tachometer signal for appears both on Connector C2 with optical isolation
your convenience. However, the BDS5 does not use and on Connector C8.
the analog tach signal.
• ENCODER INPUT
• SERIAL PORT
The BDS5 accepts external inputs in encoder format.
The BDS5 has a serial port for communications. This This can come from a master motor in a master/slave
port allows you to monitor the operation, issue system. Note that you must use a resolver, even if you
commands, and transmit a program. use a feedback encoder with the BDS5.
1-12
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
The BDS5 provides encoder format output derived The BDS5 has analog current loops. The current loop
from the R/D converter. compensation components are all contained in the
compensation module located on the front of the
• ANALOG INPUT (OPT1 CARD) BDS5. The current loop compensation changes when
you change the motor model. You must install the
As an option, the BDS5 can accept a ±10 volt analog correct compensation module when changing motor
input. This input is converted to digital format by the models.
BDS5. Gain and offset adjustments are made digitally
inside the BDS5, not with potentiometers.
1-13
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
24 VOLT DC
CUSTOMER
SUPPLIED
I/O DC C2-PIN 5 ALTERNATE POWER SOURCE
- + FOR REMOTE, HOME, AND C5-PIN 3
TXD
C2-PIN 15 CYCLE ONLY !
COMMON RS-232 C5-PIN 2
RXD
C2-PIN 9 +5
120 OHM 3 1
OPTICAL
REMOTE 1K
ISOLATOR J1
C5-PIN 6 4 2
C2-PIN 19 TD+
OPTICAL C5-PIN 7
HOME ISOLATOR TD-
5
120 OHM 7
C2-PIN 8 RS-485 J1 6 1K
OPTICAL
CYCLE ISOLATOR C5-PIN 8 8
C2-PIN 18 RD+
IN COMMON
C5-PIN 9
RD-
C7-PIN 9
INPUT BUFFERS
HOME
C7-PIN 13 AND PULL-UP
CYCLE
C7-PIN 11
LIMIT
C7-PIN 15
MOTION 74HC14
C7-PIN 17
GATE
C7 (EVEN PINS)
MICROCOMPUTER SYSTEM
C7 STANDARD I/O
C8 (EVEN PINS)
C8-PIN 33
MANUAL
C8-PIN 31
I1 MICROPROCESSOR
C8-PIN 29 INPUT BUFFERS
I2 AND PULL-UP
C8-PIN 27
I3
C8-PIN 25
I4
C8-PIN 23
I5
C8-PIN 21
I6
C8-PIN 19
I7
C8-PIN 17
I8
C8-PIN 15
74LS540
I9
C8-PIN 13
I10
C8-PIN 11 BATTERY
BACK-UP ROM
I11 RAM
C8-PIN 9
I12
C8-PIN 7
I13
C8-PIN 5
I14
C8-PIN 3
I15
C8-PIN 1
C2-PIN 11
ANALOG
DIFF CMD HI TO PULSE
C2-PIN 1 CONVERTER
DIFF CMD LO
OPTIONAL
C1-PIN 5
SN75175 CH A
IN A
IN A
C1-PIN 10
ENCODER
BDS5 SYSTEM OVERVIEW
TO
C1-PIN 4 DIGITAL
IN B SN75175 CH B
IN B
C1-PIN 9
1-14
BDS5 CHAPTER 1 - SYSTEM DESCRIPTION
ISSUE
2
D-93030
75155
"ACTIVE"
LED
SHULER
12-17-92
HARDWARE "SYS OK"
WATCHDOG LED
75156
"CPU"
COPY CODE
LED
"FAULT"
LED
75156
I
"RELAY"
RD TD LED
C2-PIN 17
"RELAY"
C2-PIN 16 RELAY
( N. O. )
C2-PIN 10
24 VOLT 01 HI
OPTICAL C2-PIN 20
ISOLATOR 01 LO
C8-PIN 35
STATUS
C8-PIN 47
OUTPUT BUFFERS 01
WITH OPEN
C8-PIN 45
COLLECTORS 02
C8-PIN 43
03
C8-PIN 41
04
C8-PIN 39
05
C8-PIN 37
06
ULN2803A C8 OPTIONAL I/O
C7-PIN 21
07
C7-PIN 19
08
C7-PIN 23
CYCLE
C7 STANDARD I/O READY
BUS + BUS -
ABSOLUTE
3.01K C2-PIN 4
VALUE 5 VOLTS = FULL SCALE
CIRCUIT I MONITOR
C2-PIN 14
COMMON
8 PIN 10 A-PHASE
9 CURRENT Ma
7 PIN 5 CURRENT
LOOP
SAMPLE
MOTOR
CURRENT
2 PIN 8 C-PHASE
SAMPLE
3 CURRENT Mc
1 PIN 3 LOOP
RESOLVER
COMPENSATION GND
CARD
C3-PIN 10 REF LO
C1-PIN 1
C3-PIN 7 SIN HI CH A OUT A
75174 C1-PIN 6
OUT A
RESOLVER
C3-PIN 1 SIN LO
TO
DIGITAL C1-PIN 2
C3-PIN 9 COS HI DIGITAL OUT B
CONVERTER CH B
TO 75174 C1-PIN 7
ENCODER OUT B
C3-PIN 3 COS LO
C1-PIN 3
CH Z OUT Z
75174 C1-PIN 8
OUT Z
1-15
CHAPTER 1 - SYSTEM DESCRIPTION BDS5
ISSUE
ISSUE
CUSTOMER I/O
4
4
MASTER (OPTO-22 COMPATIBLE)
ENCODER
A-84847
A-84847
R. FURR
1-14-91
MODEL No.
CYCLE READY
REV No.
EXTERNAL REGEN RESISTOR
ACTIVE
O7
C1
SYS OK
CPU
O8
FAULT
GATE
O1
RELAY
D.C. BUS
MOTION
T
O2
1
C2
REGEN
OVERLOAD
CYCLE
J1
BLOWN FUSE O3
LIMIT
O4
HOME
O5
C3
C5 C1 O6
MODEL No MODEL No
C4
STATUS
C2
SERIAL No SERIAL No
MANUAL
INDUSTRIAL INDUSTRIAL
I1
TERMINAL DRIVES
BDS5
DRIVES
PSR I2
I3
OR BUS+ BUS+
I4
BUS- BUS-
PC COMPATIBLE Ma La
I5
Mb Lb I6
Mc Lc
I7
I8
GND GND
I9
I10
I1
115 VAC, I2
1 PHASE I3
I4
I5
I6
COPY CODE
230 VAC,
3 PHASE
OR
115 VAC,
1 PHASE
I
GOLDLINE
MOTOR
1-16
BDS5 CHAPTER 2 - GETTING STARTED
CHAPTER 2
GETTING STARTED
• Standard Video Adapter (CGA, MDA, EGA, 1. From DOS, find either the DOS disk or directory
MCGA, and VGA). where DISKCOPY.COM is located
and type:
2-1
CHAPTER 2 - GETTING STARTED BDS5
3. Type:
2.3.2 Software Installation
A:
Motion Link can be installed on either a hard disk, 5-
1/4 floppy disks, or 3-1/2 floppy disks. Follow the 4. Type:
corresponding instructions below for the installation
that your system requires. FORMAT B:/S
2.3.2.1 Install on a Hard Disk 5. The Format program will ask you to hit a key
Use this procedure to install Motion Link on a hard to continue.
disk.
6. After the format is completed, your computer
1. Type: will prompt you to format more disks; answer
"N" to exit the Format command.
C:
7. Remove the DOS disk from the your computer.
Leave the formatted disk in the B-drive.
2. Make a subdirectory named ML5 on your hard
disk. Type:
8. Insert the Motion Link disk into the A-drive.
This disk should be in the disk holder in the
MD \ML5 front of this manual.
3. Change to subdirectory ML5. Type: 9. Copy all the files from the original Motion
Link disk onto your disk by typing:
CD \ML5
"COPY A:*.* B:".
4. Insert the Motion Link disk into the A-drive.
This disk should be in the disk holder in the 10. Label your disk as Motion Link. Include
front of this manual. today's date on the label.
5. Copy all the files from the Motion Link disk 11. Store the original Motion Link disk in a safe
onto the hard disk by typing: place. Do not use this disk, except to make
other copies.
COPY A:*.* 2.3.3 Establishing Communications
6. Store the original Motion Link disk in a safe This procedure will get you started using Motion
place. Do not use this disk, except to make Link after you have installed it:
other copies.
1. Connect and turn on your BDS5 as described in
the Installation and Setup Manual.
2-2
BDS5 CHAPTER 2 - GETTING STARTED
MOUSE INSTALLED
VGA w/ COLOR MONITOR
ML.CNF CONFIGURATION FILE FOUND
SCREEN COLORS
BDS5 PASSWORD======> <NONE> NORMAL FOREGROUND=>9
BAUD RATE==========> 9600 BAUD NORMAL BACKGROUND=>1
COM PORT===========> COM1: REVERSE FOREGROUND=>2
REVERSE BACKGROUND=>5
AUTOBAUD BDS5 B
AUTOBAUD PER ML.CNF A
BDS5 OFFLINE O
INTRO HELP H
QUIT X
2-3
CHAPTER 2 - GETTING STARTED BDS5
• CAPTURE - Start or stop capturing • NEW PROGRAM - This selection calls the
communications from the BDS5; retrieve Motion Link Editor, allowing you to enter a
previous capture files from disk; examine (edit) new program.
capture files.
Upon exiting the Motion Link Editor, you can store
• SCOPE - Retrieve, plot, print, and store the program to your computer disk and/or transmit it
PC-scope. to the BDS5.
2-4
BDS5 CHAPTER 2 - GETTING STARTED
last editing. Note that if you have selected an capture storage area before beginning to
item from either the PROGRAM or CAPTURE capture new communications.
menu since you last edited a variable file, this
selection is invalid. • STOP CAPTURE - This selection
terminates the communications capture. If
• FROM DISK - This selection retrieves a you want to examine the communications
variable file from your computer disk. Motion that were captured, select "EDIT" in this
Link will display all of the variable files menu.
currently on your disk and allow you to choose
the file you want. After you choose a variable 2.4.1.4 Scope
file, the Motion Link Editor is called, allowing • VIEW AGAIN - This selection lets you view
you to examine and change the variable file. playback data that was previously retrieved
from the BDS5.
• FROM BDS5 - This selection retrieves all of
the variables currently stored in the BDS5. • FROM DISK - This selection retrieves
After the variables are retrieved, the Motion recorded data from your computer disk.
Link Editor is called, allowing you to examine Motion Link will display all of the playback
and change the variable file. files currently on your disk and allow you to
choose the file you want. Playback files
• NEW VARIABLES - This selection calls the have the file type .CSV for "comma
Motion Link Editor, allowing you to enter a separated variables." This format is
new set of variables. compatible with most spreadsheets.
Upon exiting the Motion Link Editor, you can store • FROM BDS5 - This selection retrieves
the variable settings to your computer disk and/or playback data stored in the BDS5. After the
transmit them to the BDS5. playback data is retrieved, the data is plotted
and stored on disk.
2.4.1.3 Capture
• VIEW DATA - View the data in numerical
This is a communications (rather than graphical) format.
capture and is unrelated to
the BDS5 variables CAP and • PRINT PLOT - Print the plot on a line
CAPDIR which are for position printer.
NOTE capture.
2.4.1.5 Options
• EDIT - This selection allows you to examine • SELECT AXIS - This selection allows you
the communications that have been captured. to select options that are available to systems
Upon exiting the Motion Link Editor, you using RS-485 communications.
can store the captured data on your computer
disk. Note that if you selected an item from • BDS5 PASSWORD - This selection allows
either the PROGRAM or VARIABLES you to enter the password that you set in the
menu since you last captured BDS5 editor. If you set such a password in
communications or loaded a
communications capture file, this selection is the BDS5, Motion Link needs the password
invalid. to transmit new programs to the BDS5. If
you use this selection to change the
• FROM DISK - This selection allows you to password, then you should use the UPDATE
retrieve a capture file from disk and examine CONFIGURATION function below to write
it with the Motion Link Editor. a new configuration file.
2-5
CHAPTER 2 - GETTING STARTED BDS5
2-6
BDS5 CHAPTER 2 - GETTING STARTED
2-7
CHAPTER 2 - GETTING STARTED BDS5
• DELETE ENTIRE EDITOR ^K^Y - This Motion Link stores, retrieves, displays, and edits
selection clears the entire Motion Link three types of data files. Each type has a different file
Editor. extension or file type. File extension refers to the
characters in the file name that follow the period. For
example, the file TEST.BDS has the file extension
2.4.2.5 Cursor "BDS." The three types of files are:
Table 2.1 shows the cursor control keys. Special
keys are shown between greater than and less than BDS Programs for the BDS5. Programs are also
symbols; for example, the Home key is shown as called software. Programs are transmitted to
<Home>. the BDS5 and can be run indefinitely.
2-8
BDS5 CHAPTER 2 - GETTING STARTED
2.5 MOTION LINK SETUP PROGRAM 4. Once the BDS5 displays a prompt, it stops
transmitting until a new instruction and/or a
The Motion Link Setup Program is accessed through carriage return is received.
the Utilities Menu. Setup provides the following test
capabilities: These conventions are designed to allow efficient
communications between the BDS5 and a computer.
• Communicate with the BDS5 The last rule ensures that there is never a question
• Resolver Zeroing Test about which device is transmitting. If a ">" has been
• Tune Drive issued from the BDS5, then the BDS5 will not
• Drive Test transmit anything until a carriage return or escape has
• Drive Feedback
2-9
CHAPTER 2 - GETTING STARTED BDS5
been entered. The only exception is if you program showing each mode and how it interacts with the
the BDS5 to print a ">" from a PRINT or INPUT other modes.
command. The BDS5 will allow ">" in print
statements, though this is considered a poor practice 2.6.2.1 Interactive Mode
if you are using a computer to communicate with the The BDS5 normally powers-up in the Interactive
BDS5. mode. This mode allows you to start programs,
display and change variables, and enter motion
Similarly, the BDS5 will not accept input unless a ">" commands for immediate execution. The prompt
has been issued by the BDS5. The INPUT command (-->) is written to the screen, and the BDS5 awaits a
is the only exception to this rule. This rule can be new command. Your program is not running if the
awkward if you are using the BDS5 from a terminal; BDS5 is in the Interactive mode.
if an error occurs during the interactive or monitor
modes after the ">" has been displayed, the BDS5 Refer to Figure 2.2. There are many ways to enter the
will not print the error message until a carriage return Interactive mode. First, if the power-up label
or escape has been entered. (POWER-UP$) is not present, the BDS5 will power-
up in the Interactive mode. The BREAK (B)
The prompt for each mode is listed below. The only command and errors that break program execution
exception is the Run mode. This mode does not have cause the BDS5 to exit the Run mode and enter the
a prompt since input is not accepted from the serial Interactive mode.
port. Notice that the trace prompt does not end with
the ">." This is because the trace prompt does not
indicate that the BDS5 is waiting for input. If the
BDS5 is communicating within a multidrop
communication line, then the prompt is modified to
include a prefix which indicates the axis address. The
table below shows the prompts in both the normal
(non-multidrop) and multidrop configurations. Note
that the multidrop address is 65 or ASCII A.
Table 2.3. BDS5 Prompts
2-10
BDS5 CHAPTER 2 - GETTING STARTED
PROGRAMMING
MODES l-> i->
LOAD INSERT
">BDS" "I"
"<BDS" <Esc> or
PROGRAM <Esc> <CR><CR>
DUMP
<Esc>
<Esc> --> e->
INTERACTIVE "ED" EDIT
<Esc>
"DUMP"
<Esc>
SYSTEM "F" <Esc>
DUMP
"C"
f-> c->
FIND CHANGE
RUNNING POWER
MODES UP
STEP
POWER - UP POWER - UP
NOT PRESENT PRESENT
BDS5 <CR>
TASK "B", "K", "S", or "^X"
LEVELS --> S-->
"B", "K", "S", or "^X" SINGLE STEP
INTERACTIVE
ALARM A
"B" or "^X" <Esc> or
ALARM B
"SS OFF"
ALARM C "RUN" or "SS ON" "SS ON"
"RUN" <label>
VARIABLE
POWERUP
RUN <Esc>
MAIN AUTO PROGRAM
PROGRAM
MANUAL <Esc> ==>
2-11
CHAPTER 2 - GETTING STARTED BDS5
2-12
BDS5 CHAPTER 2 - GETTING STARTED
2-13
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
CHAPTER 3
PROGRAMMING LANGUAGE
J 10
3-1
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
3.3.1 Variable Units Monitor variables watch the system. You may
display their values or use them in calculations.
Some variables have implicit units associated with However, as a rule, you may not change them. The
their values. For example, all variables that monitor BDS5 automatically changes these variables to reflect
or control velocity have velocity units. In addition its status. Position feedback, PFB, is an example of a
there are acceleration units, current units, and monitor variable.
position units. Appendix E lists variable with its
units. Units are programmable; when shipped from • CONTROL VARIABLES
the factory the standard settings are as follows:
Control variables allow you to change or limit some
process in the BDS5. An example of a control
Table 3.1. Standard Units variable is current limit, ILIM. ILIM limits the
Acceleration RPM / Second maximum current the BDS5 can deliver. It can be
Units: changed at any time.
3-2
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
P PFB Print ILIM to make sure the change was carried out
properly.
The position feedback should now be displayed.
Assuming the motor and resolver are connected to the
BDS5, rotate the motor shaft about half a revolution. 3.3.7 Programming Conditions
Now, print PFB as above and notice that it has
changed to reflect the new position. Most variables can be changed, but some can be
changed only under certain conditions. For example,
the maximum acceleration level, AMAX, can be
3.3.6 Changing a Variable changed only when the BDS5 is disabled.
Attempting to change AMAX with the BDS5 enabled
Variables are changed with assignment instructions. will generate an error. The conditions under which a
An assignment instruction begins with the name of variable can be changed are called programming
the particular variable, followed by "=" and ending conditions. Some variables should never need to be
with the new value. One or more spaces can be changed after the BDS5 has left the factory; these
substituted for the "=". The following examples variables are called "factory settable." Attempting to
assign (or at least attempt to assign) ILIM a new change a factory settable variable will generate an
value: error. The programming conditions of all variables
are listed in Appendix E.
ILIM=10 ;CORRECT--ASSIGN A NEW
;VALUE TO ILIM Limits and programming
ILIM 10 ;CORRECT--THE '=' IS conditions for all variables are
;OPTIONAL shown in Appendix E.
ILIM10 ;INCORRECT--THERE MUST NOTE
;BE A SPACE OR '='
ILIM=10
P ILIM
3-3
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
3-4
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
GEAR Enable electronic gearbox. Set to 0 with your system. Use TUNE
on power-up and normally left at 0 for command to change if necessary.
preliminary operation.
KV Tuning gain #1 for integrating
GEARI Number of teeth on the input "gear" velocity loop. Leave at initial setting
for electronic gearbox. Initially set to for preliminary operation. The initial
1. Value of this variable does not value is listed on the Test and Limits
matter if GEAR is 0. (TL) sheet, which should be enclosed
with your system. Use TUNE
GEARO Number of teeth on the output "gear" command to change if necessary.
for electronic gearbox. Initially set to
3. Value of this variable does not KVI Tuning gain #2 for integrating
matter if GEAR is 0. velocity loop. Leave at initial setting
for preliminary operation. The initial
IDEN Current units denominator. Initially value is listed on the Test and Limits
set to 100 for percent. (TL) sheet, which should be enclosed
with your system. Use TUNE
ILIM Peak current limit. The initial value command to change if necessary.
is listed on the Test and Limits (TL)
sheet which should be enclosed with LPF Enables low pass filter. The low pass
your system. Normally set to IMAX. filter is often required to reduce noise
However, you may want to reduce it or torsional resonance. Leave at
for protection. The motor can initial setting for preliminary
normally run under no-load with 15- operation. Set to 1 if system is too
25% current, so you can set ILIM as noisy. The initial value is listed on
low as 15 or 25 during preliminary the Test and Limits (TL) sheet, which
operation. should be enclosed with your system.
INUM Current units numerator. Initially set LPFHZ Low pass filter break frequency. The
to 4095 for percent. low pass filter is often required to
reduce noise or torsional resonance.
KC Low speed "graininess" Leave at initial setting for preliminary
compensation. Almost always set to operation. Reduce value if system is
200. See discussion in the too noisy. The initial value is listed
Installation and Setup Manual where on the Test and Limits (TL) sheet,
a procedure for fine-tuning this which should be enclosed with your
variable is given. system.
3-5
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
PROP Enable proportional velocity loop. TRIP Enable position trip points.
This variable is set to 0 on power-up
and usually left at 0 for preliminary TQ Enable torque loop, which disables
operation. velocity loop. This variable is set to
0 on power-up and left at 0 for
PXDEN External position units denominator. preliminary operation.
Initially set to 1. Value of this
variable does not matter during initial
operation.
3-6
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
VOFF Offset velocity for electronic gearbox. numbers that range from -231 (-2,147,473,648) to
Reset to 0 whenever GEAR is turned 231 -1 (2,147,473,647). For example, if you want to
on. This variable should be left at 0 store PFB, the position feedback, at a particular time
for preliminary operation. and use it later in a calculation, you can assign PFB to
a user variable. Type the following line on the
VOSPD Overspeed setting. Initially set to terminal:
VMAX_1.2. This variable should be
left at this value for preliminary X1=PFB
operation, but it can be reduced for
protection.
Now, without moving the motor, print X1 and PFB
by typing:
VXDEN External velocity units denominator.
Initially set to VDEN. Value of this
variable does not matter during P X1 PFB
preliminary operation.
This print statement prints both X1 and PFB on one
VXNUM External velocity units numerator. line and should show them to have approximately the
Initially set to VNUM. Value of this same value. Note that when the motor is disabled, the
variable does not matter during position feedback can change slightly, so there may
preliminary operation. be a small difference in the values. Turn the motor
about one-half of a revolution and repeat the print
WATCH Enable the serial watchdog timer. statement from above. Notice that X1 has
This function disables the BDS5 if a remembered the old position feedback while PFB has
command is not received from the changed. X1 will not change unless you assign it a
serial port every WTIME new value.
milliseconds. Set to 0 on power-up.
WTIME See WATCH above. Initially set to
3.3.10.1 Indirect User Variables
1000.
An advanced method of accessing the values stored in
user variables is called indirect. With indirect user
X1..X250 User variables. Initially set to 0.
variables, the specified user variable "points" at
another user variable. Indirect references to variables
XS1..XS50 User switches. Initially set to 0.
have the format: X(Xn) where n is between 1 and
250. The value stored in the variable Xn specifies the
ZERO Puts the BDS5 in Resolver Zeroing
variable that X(Xn) refers to. This is best illustrated
mode. This is set to 0 on power-up.
with an example.
Zeroing mode is used only during
installation. If 1, BDS5 rotates the
Suppose you want to look at either X1 or X2 when
motor to the zero position. If 0, the
X10 is either 1 or 2. Type this example:
BDS5 controls the motor normally.
3-7
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
Indirect user variables are often used to look up data will result in "1" being printed, not "ON." Another
in tables. For example, they are often used in teach point to recognize is that the equal sign ("=") is
programs--programs that remember a large number of optional. The two statements
positions taught by the operator. In this case, many
user variables are used to remember positions, and O1=ON
one variable is used to point at the group. Use O1 ON
indirect references with caution since it is easy to
make mistakes with them.
produce identical results. The program can be more
readable if the "=" is not used with Y, N, ON, and
OFF.
3.3.11 User Switches
User switches are similar to user variables, except 3.4 MATH
that they can only take on values of 0 or 1. A user
switch can be used in place of a user variable if you
only need to store 0 or 1. An example of a good 3.4.1 Hexadecimal
place for a user switch would be to store information
for go/no-go decisions. This saves user variables for The BDS5 allows constants to be entered in
other places. hexadecimal, or hex. Hex is base 16 representation
3-8
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
8. Expressions are evaluated left to right. Like hex, logical math is often used when
programming computers. With logical functions, two
Valid math expressions can be substituted for numbers are converted to binary representation and
numbers in most instructions. A few examples of compared bit by bit. When the numbers are ORed, if
math expressions in assignment instructions follow: either bit is set, the result bit is set. With ANDing,
both bits must be set for the result to be set. Type in
X1=500 the following examples:
X1=5*100
P 1!2 ;THIS IS 3
3-9
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
3-10
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
OUT=OUT!7 ;SET 3 BITS WITH LOGICAL of which is labeled with an encircled number, 1-6.
;OR Note that this drawing is a functional diagram; it does
not directly represent the actual hardware and
software used to implement these functions.
which turns on O1, O2, and O3 without affecting O4 -
O8. The logical AND can be used to turn off several
Your BDS5 system should be mounted and wired as
bits:
described in the Installation and Setup Manual. The
AC Line to your PSR4/5 should not be turned on
OUT=OUT&7 ;CLEAR 5 BITS WITH initially for examples in this chapter. If the proper
;LOGICAL AND connections are not made, or the terminal is not
communicating, then see the Installation and Setup
turns off O4-O8 and does not affect O1-O3. Manual.
Note that the hex representation can be especially
useful when setting the higher bits:
AC LINE SHOULD NOT BE
TURNED ON.
O4 ON
O7 ON WARNING
O8 ON
OUT=OUT!0C8H
In Bits I8 I7 I6 I5
Value 128 64 32 16
In Bits I4 I3 I2 I1
Value 8 4 2 1
3-11
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
HARDWARE FAULTS
OVER TEMPERATURE
BUS VOLTAGE MICROPROCESSOR
+/-12 VOLT SUPPLY
OVER CURRENT
FEEDBACK LOSS
HARDWARE WATCHDOG
COMPENSATION BOARD
SOFTWARE FAULTS 2
FOLLOWING ERROR
OVERTRAVEL
GEARBOX OVERFLOW
INTERNAL ERRORS
MOTOR PARAMETERS OUT
OF RANGE
FIRMWARE FAULTS
UP FAIL
ROM CHECKSUM BLINK
TURN OFF " CPU "
SET COMMUNICATION LED
SOFTWARE WDOG
5 VOLT SUPPLY 1
LATCH
POWER UP RESET
3-12
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
As shown in Figure 3.1, firmware faults set a latch to Area 5 shows that ACTIVE will be on if both
turn off communications and blink the CPU LED. READY and REMOTE are on. This turns on the
The CPU LED blinks in cycles consisting of 2 to 8 ACTIVE LED. It also allows the BDS5 to actively
blinks and a pause. The number of blinks control the motor.
corresponds to the error number, which you can look
up in Appendix D. The only way to reset these faults REMOTE (Remote Enable) is an isolated input that is
is to power-down the BDS5. These faults are serious accessed from Connector C2 on the front of the drive.
and you should consult the factory if they occur. Do You can print REMOTE with the P command. It
not confuse these faults with autobauding on power- must be 1 to activate the BDS5. If you cannot turn
up. When autobauding, the CPU LED blinks at a REMOTE on, see the Installation and Setup Manual.
constant rate, about three times per second. Note that some faults "hide" the value of the
REMOTE input from the BDS5 microprocessor.
This does not normally matter because all faults must
be cleared before the drive will enable. If this
3.6.2 Fault Logic, Area 2 condition exists, the BDS5 will print REMOTE as "-
1."
The large OR gate in Area 2 combines three types of
faults: hardware, software, and firmware. The
circuits that generate these faults are typical of motor
controllers and are listed on the drawing. These 3.6.6 Relay and STATUS Control,
faults are errors that are serious enough to disable the Area 6
BDS5, as described in Appendix D.
Area 6 shows how software switch STATUS and the
relay work. You can configure STATUS to indicate
either drive READY (but not necessarily ACTIVE)
3.6.3 Fault Latch, Area 3 or drive ACTIVE. The difference is in how you want
to use STATUS. STATUS can be used for an
The latch in Area 3 turns on the FAULT LED, the
interlock. In this case, you want STATUS to indicate
FAULT software switch, and the FAULT output on
drive ACTIVE. If the BDS5 becomes inactive for
Connector C8. Any fault sets this latch; you can also
any reason (including the REMOTE input turning
write your program to turn it on if you detect a fault
off), then STATUS will turn off. As an alternative,
condition. The fault latch can be reset by:
you can use STATUS to indicate that the BDS5 is
ready for the REMOTE input to turn on. That is, if
1. Turning FAULT off,
REMOTE turns on, the BDS5 will be ACTIVE. In
2. Typing the enable command (EN), or
this case, you want STATUS to indicate drive
3. Powering down the BDS5.
READY.
3-13
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
STATMODE is off, then STATUS will indicate drive should remove the BDS5 from operation and contact
ACTIVE. the factory.
On power-up, the contacts are open until the BDS5 3.7.2.2 Position Error, PE & PEMAX
passes its power-up self tests. Then the contacts close PE is position error, sometimes referred to as
and the BDS5 begins normal operation. Note that if following error. It is the difference between PCMD
the BDS5 is set to autobaud on power-up, the and PFB. PE is zero when the BDS5 is disabled. PE
contacts will not close until after autobauding and is in position units.
establishing communications.
When the magnitude of the position error exceeds the
One way to use the relay is to interconnect it with the value stored in PEMAX, a Position Error Overflow
main power contactor. In this case, a hardware error is generated. This is a serious error,
watchdog fault will disconnect all power to the disabling the BDS5 immediately. Note that setting
system. PEMAX to some value will not limit the position
The SYS OK LED indicates that there is not a error. The position error depends on the control loop
hardware watchdog fault. If this LED goes out, you parameters and the application. Normally, you want
to set PEMAX to as low a level as will allow the
3-14
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
system to run reliably. Setting PEMAX too low can This command would print the expected results. This
generate nuisance errors since the position error has is because the BDS5 stores PCMD and PFB at the
some variation during motion. PEMAX is in position beginning of every command, then uses those stored
units. values when the command is executed. On the other
hand, if you type:
Position error is limited to protect the system.
Excessive position error can indicate a fault P PCMD "-" PRD " = " PCMD-PRD
condition. For instance, bearings wear out over the
life of a motor. The increased load from worn
the results may not be as expected. This is because
bearings can increase the position error during
PRD is not stored at the beginning of the command.
motion. In many cases position error is the first
If the motor is turning, the two references to PRD will
indication of wear.
produce different results. This command takes up to
6 milliseconds to execute, and PRD can change
3.7.2.3 R/D Position, PRD several times while this command is executing.
PRD is the output of the resolver-to-digital (R/D)
converter in counts. PRD is not in position units. If
your system has the standard 12-bit R/D converter,
then 4096 counts will equal one revolution. The
3.7.3 Velocity
following table shows the R/D ranges versus
resolution: 3.7.3.1 VCMD, VFB, VE, & VAVG
VCMD is the commanded velocity. Like PCMD,
Table 3.6. PRD: Ranges and R/D VCMD is generated internally from motion
Resolutions commands. VCMD is zero when the BDS5 is
R/D Resolution PRD Min PRD Max disabled. VCMD is in velocity units.
3.7.2.4 Sampling PFB, PCMD and VAVG is the average of VFB over the previous
16 milliseconds. Occasionally, the normal sample-to-
PEXT sample variation of VFB is undesirable. In these
When PFB and PCMD are used on the same line, cases, use VAVG.
they are always sampled during the same sampling
interval (millisecond). This allows you to use 3.7.3.2 Velocity Limits, VMAX &
PCMD, PFB, and a third variable called PEXT, VOSPD
which is discussed later in this chapter, without VMAX is the BDS5 maximum velocity. It depends
concern that the variables might be sampled at on the motor and the resolution of the R/D converter.
different times. For example: For standard systems with 12-bit R/D converters,
VMAX is less than or equal to 7500 RPM. For 14-bit
systems, VMAX is limited to 3000 RPM; 16-bit
P PCMD "-" PFB " = " PCMD-PFB
3-15
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
3.7.4.1 Motor Current, ICMD & IMON THE BDS5 WILL BE ENABLED
ICMD is commanded motor current. ICMD, like AND THE MOTOR WILL
PCMD and VCMD, is generated internally from TURN. SECURE THE MOTOR.
motion commands. ICMD is in current units. WARNING
IMON is the output of the current monitor circuit, and
it represents the magnitude of the motor current. At this point you should turn REMOTE on as
IMON is always positive, and it is in current units. described in the Installation and Setup Manual.
IMON is the digital conversion of the analog signal Type the following command to print the state of the
I_Monitor on Connector C2. REMOTE input:
3-16
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
3-17
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
3.7.8.3 Monitoring Current Limits AMAX is the maximum acceleration allowed for
There are two switches that provide information on almost all motion commands. The only exception is
current limiting. SAT is a switch that is on if the electronic gearbox. AMAX is the upper limit for the
current is limited by either ILIM or IFOLD. FOLD is normal acceleration rates, ACC and DEC. AMAX
a switch that is on if the current is limited by IFOLD should always be set below the acceleration level that
only. can damage your machine. Errors which stop motion
will decelerate the motor at AMAX; therefore, your
The operation of the foldback software is as follows: machine is subject to deceleration rates of AMAX at
any time. AMAX is in acceleration units, which are
If... IMON > ICONT then... IFOLD decreases RPM/second as a default. AMAX can be changed
If... IMON < ICONT then... IFOLD increases only when the BDS5 is disabled.
ICMD is never > ILIM ACC is the acceleration rate for most moves. ACC is
ICMD is never > IFOLD in acceleration units. ACC can be changed at any
time, although it must be less than AMAX.
In some cases, it may be desirable to know when Attempting to set ACC to a value greater than AMAX
foldback is just about to limit current below ILIM. will generate an error.
You can use IFOLD for this; if IFOLD is less than
ILIM, the foldback software is limiting current. If DEC is the deceleration rate for most moves. DEC is
IFOLD is larger than ILIM, but only by 5% or 10%, also in acceleration units. DEC can be changed at
then foldback software is about to limit current. any time. Attempting to set DEC to a value greater
than AMAX will generate an error.
3-18
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
3.8.1.3 Enabling Motion with MOTION The J 0 command also stops motion from any mode,
MOTION is a hardware input that enables or inhibits much like the STOP command. Unlike S, J 0
motion. If MOTION is on, motion is enabled; if decelerates at the rate specified by DEC.
MOTION is off, motion is inhibited. You can enable
the BDS5 if MOTION is off, but commanding motion The S command should not
will generate an error. If you do not need to connect be used as a part of normal
MOTION for your application, you must hardwire program operation. Use J 0.
MOTION on. See the Installation and Setup Manual NOTE
for instructions on how to hardwire MOTION.
Before continuing, make sure that MOTION is on. At any time, when motion is commanded, if the
Type the following command to print the state of the MOTION input turns off, an error is generated, and
MOTION input: all motion is stopped, as if the STOP command were
given. Also, any errors with a severity of 2 or 3 will
P MOTION ;MOTION SHOULD BE 1 stop motion in a straight line deceleration at a rate of
AMAX. Appendix D lists all errors and their
severity.
Many times, the MOTION input is controlled by the
normally-closed contacts of a push button. This push
button is often called "STOP," since pressing the 3.8.1.5 STOP and BREAK with
button opens the MOTION input and forces the Control X (^X)
motor to stop. Emergency Stop should not be You can execute a stop and break command with the
implemented with the MOTION input. Emergency control-X (^X) character. Control-X or ^X means
Stop should be connected to a contactor that removes that you hold down the control key (Ctrl) on your
power from the system. This is because an terminal (or IBM-PC) and press the X key. This has
emergency stop, which is for safety, should not the same effect as typing B, then S from your
depend on BDS5 functions to operate properly. terminal.
3-19
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
in series and connected to LIMIT; the contacts of Trip points are not limits in the sense that they do not
these switches must be closed for the BDS5 to be inhibit motion. Trip points convert position feedback
enabled. If the contacts open, the BDS5 will be to an on-or-off signal. Trip points are particularly
disabled, the motor will coast to a stop, and an error useful with alarms and the HOLD command, both of
will be generated. This limit is a safety device and which are presented in Chapter 4.
not part of normal program operation. Hardware
Travel Limits are always enabled. Position trip points require a lot of calculations. As a
result, they slow the execution of the user program by
3.8.2.2 Software Travel Limits, PMAX about 4%. If you are not using trip points, you can
disable them by typing:
& PMIN
Software Travel Limits limit the range of motion of
the motor. There are two software limits: maximum TRIP OFF
and minimum. If position feedback (PFB) moves
outside the software limits, an error is generated and When the BDS5 is powered-up, trip points are
motion stops. Software Travel Limits are intended as enabled.
a guard against motion that is out of range due to
improper operation or programming errors.
3.8.3 Profiles
PMAX is the maximum position allowed and PMIN
is the minimum. If PFB is greater than PMAX, When a positioner commands the motor to move from
negative motion is allowed, but positive motion is one point to another, it must control acceleration,
not. If PFB is less than PMIN, only positive motion deceleration, and traverse speed. The velocity of the
is allowed. PMAX and PMIN are in position units motion versus time is called the profile. Simple
and can be changed at any time. profiles begin and end at zero speed and have three
segments: acceleration, traverse, and deceleration.
Software Travel Limits are enabled with PLIM, You must specify ACC, the acceleration rate, and
which can also be changed at any time . If PLIM is DEC, the deceleration rate, before commanding the
on, software limits are active; otherwise, PMIN and move. The traverse speed and the distance to move
PMAX are ignored. PLIM is turned on at power-up. are specified in the move command itself.
If you have an application with boundaries which
should not be crossed, you are encouraged to use
Software Travel Limits.
3-20
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
Straight-Line 1
Modified Polynomial 2
Polynomial 3
Modified Sinusoid 4
Sinusoid 5
3-21
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
causes the motor to move 5000 counts at a peak This section will enable the
speed of 200 RPM. The profiles that were shown BDS5. The system may be
earlier as "A SIMPLE PROFILE" or "S-CURVE unstable. The motor may
PROFILE" could have been generated from this begin oscillating or run away.
example. Be prepared to disable the
BDS5 quickly. You can
As with the MA command, disable the BDS5 by turning
off (opening the contacts of)
MI 25000 LIMIT or REMOTE.
causes the motor to move 25000 counts, with the Turn on the AC line voltage. Type in the following
peak speed at the speed VDEFAULT. example:
For both the MI and MA commands, not specifying
speed reduces execution time and program size. EN
ACC 1000
Not specifying the speed in MI DEC 1000
commands reduces execution MI 4000 100
time.
NOTE This should cause the motor to rotate 4000 counts
with a traverse speed of 100 RPM. With the next
3.8.3.4 Incremental Move Example example the motor will repeat the move. Type:
SHOCK HAZARD!
VDEFAULT = 100
Large voltages from the AC MI 4000
line and the DC bus can cause
injury. Wire the BDS5 as Notice that the motor again moves 4000 counts.
WARNING
described in the Installation Now, to bring the motor back to the original position,
and Setup Manual. type:
MI -8000
3-22
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
(less than 5 milliseconds) traverse segment so that the motion to change direction without stopping first.
move still has three segments. However, since changing directions involves both
acceleration and deceleration, Jog commands that
The maximum time for an entire move is not limited. change direction of rotation use ACC or DEC,
However, the time for each acceleration or whichever is lower. Jog commands should be used
deceleration is limited to 30 seconds. If the with caution, since motion continues indefinitely.
acceleration rate is so low that this limit is exceeded,
then the BDS5 generates an error explaining that
either ACC or DEC is too low. This error is issued 3.8.5 NORMALIZE (NORM) Command
before the motion command begins. In this case ACC
or DEC must be increased, or the peak speed of the
NORM, the NORMALIZE command, is required if
move must be decreased.
you want to reset the BDS5 position feedback, PFB.
Often, you may want to set the position feedback to
3.8.3.6 Multiple Profile Commands some known value. For example, on power-up the
The BDS5 allows one succeeding move to be position feedback is set to zero. After a homing
calculated while the present move is being executed. sequence, you may need to reset the position register.
This reduces inter-index delay, the delay between This is done using NORM, the NORMALIZE
successive moves, almost to zero. When you are command. For example,
commanding motion from the Interactive mode (-->),
be careful not to type in two move commands while NORM 10000
another is executing (motion from the original
command is not complete). This generates an error.
If you are commanding motion from your program, sets PFB (position feedback) as well as PCMD
the BDS5 automatically pauses before calculating a (POSITION command) to 10000 in position units.
third motion profile, thus stopping this error from As an alternative, you can enter:
occurring.
PFB=10000
3.8.3.7 Profile Final Position, PFNL
If you want to keep track of the end position of the Setting PFB has the same effect as the NORM
present move, the variable PFNL (Position Final) is command. Use whichever you think makes your
provided. This variable contains the final position of program easier to understand.
a move. The variable can be used to compute the
distance remaining by combining it with PFB Now, type in:
(Position Feedback):
P PFB
P "DISTANCE TO GO " PFNL-PFB
;PRINT THE AMOUNT OF Now, normalize the position to 1000 with:
;POSITION TO GO TO
;FINISH THE MOVE NORM 1000
3-23
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
3.8.6 Zero Position Error (ZPE) distance (for Incremental moves). You also can
Command specify up to two velocities. If two velocities are
specified, then the first is the traverse speed and the
second is the ending speed.
The ZPE command zeros position error by setting
PCMD to PFB without changing PFB. There are
If one velocity is specified, then it is assumed to be
occasions when this will be necessary. For example,
the ending speed. In this case, the BDS5 uses the
if the BDS5 is run for some time as a velocity loop,
larger speed, either the beginning or ending speed, for
then position error can accumulate well beyond
the traverse speed. All velocities are specified greater
PEMAX. If the position loop is turned on with this
than zero. The BDS5 determines the direction based
condition, a position error overflow error will occur.
on the specified position. If no velocities are
To prevent the error, you must first zero the position
specified, then the BDS5 continues the Macro section
error, then turn the position loop on by entering:
at the beginning speed until the specified position is
reached.
ZPE
PL ON If you want to include a dwell in the middle of a
Macro move, use the Macro Dwell (MCD) command.
The ZPE command is also frequently used with In this command, you specify the time of the dwell in
clamping. See the explanation of clamping later in milliseconds. For example,
this chapter.
MCD 100 ;100 MSEC DWELL
3-24
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
1000 RPM
200 RPM
Figure 3.5. Macro Move Example #2
3-25
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
The limit of position is based on the R/D converter 3.8.9.2 Capture Direction, CAPDIR
accuracy as shown in Table 3.8. The capture is triggered when the HOME input
changes from 0 to 1, or vice versa. If CAPDIR is 1,
Table 3.8 R/D Converter Accuracy the capture occurs when the HOME input changes
from 0 to 1. If CAPDIR is 0, the capture occurs when
Resolution Maximum Position HOME changes from 1 to 0. CAPDIR can be
12 4095 changed at any time. Changing CAPDIR always
turns CAP off.
14 16383
16 65535 3.8.9.3 Speeding Up Homing
Sequences
MRD moves are not buffered. They are not allowed One application of capture is to speed up homing
when the BDS5 is jogging or if a move is in progress. sequences. Homing sequences traverse very rapidly
until the HOME switch is tripped. Then the motor
MRD moves can be used to improve the accuracy of decelerates to zero and begins to traverse at a medium
homing sequences. First, use the BDS5 to position speed in the opposite direction until the HOME
the motor as close as possible to the home limit switch trips again. Then the motor decelerates again
switch trip point. Then, use the MRD command to to a slow speed until the HOME switch trips again.
move the motor to a specified R/D position. In this Since the final speed was low, the distance to
case, the limit switch must be accurate only to one- decelerate is considered negligible, and the motor is
half revolution of the motor for the R/D moves to be assumed to be at home.
useful. Using capture, the approximate home location can be
determined when the motor is traversing at high
speed, eliminating the need for the medium speed
traverse. The following program illustrates this.
3-26
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
CAPDIR=1 After the BDS5 stops motion, the position error stays
CAP ON at approximately PECLAMP. Before commanding
J -5000 ;JOG AT -5000 RPM any new motion, you should zero the position error
;TO GET TO HOME with the ZPE command.
TIL CAP EQ 0 ;WAIT FOR
;CAPTURE TO Clamping can be used with all move and jog
;OCCUR commands. If jogs are used, the motion continues
J 0 ;STOP MOTION until the stop is found. If move commands are used,
MA PCAP 200 ;RETURN TO PCAP-- then motion does not continue past the specified
;APPROXIMATE endpoint, regardless of whether a part is found.
;HOME
J 1 ;JOG AT A LOW An example of clamping follows:
;SPEED TIL HOME
;CAN BE FOUND PECLAMP=1000 ;SET CLAMP = 1000
TIL HOME EQ 0 ;ONCE HOME IS ;POS UNITS
;CROSSED, STOP. CLAMP ON ;ENABLE
J 0 ;CLAMPING MODE
MA 100000 400 ;MOVE AT MOST
The capture position is accurate to 25 microseconds. ;100000 POS UNITS
The resulting error is proportional to speed. For ;IF THE MOTOR
example, for a 12-bit R/D converter, if the capture ;GETS ALL THE
were done while the motor was rotating at 5000 ;WAY TO 100000,
RPM, the error would be limited to about 1 degree. ;THEN THE STOP
If this is not close enough, you can jog the few bits ;WAS NOT
until the switch is tripped, or you can use the MRD as ;ENCOUNTERED.
discussed above. ;ASSUMED
;THE PART IS NOT
;THERE.
3.8.10 Clamping W0 ;DELAY UNTIL
;MOTION STOPS
Clamping stops BDS5 motion when the position error
exceeds a set point. This is used to determine that the IF PCMD EQ 100000 P "PART NOT
motor, usually through a lead screw, has run a part FOUND"
into a mechanical stop. The profile stops and the part ;IF PCMD = 100000 =
is held with limited torque. This is sometimes ;FINAL POSITION,
referred to as "Feed to Positive Stop." The stop is ;THEN THE PART
detected by watching position error; when position ;WAS NOT FOUND.
error exceeds the variable PECLAMP, the part is
assumed to have run into a stop. When a stop has
been detected, the BDS5 will hold the current at 3.8.10.1 Clamping and Homing
ILIM which should be set to the proper holding Clamping can be used to home your machine by
current. ILIM can be increased or decreased after the gently running the machine into a stop; this eliminates
stop has been detected. To enable clamping, turn the need for a home limit switch. In this case, you
CLAMP on. PECLAMP can be changed at any time. should reduce ILIM to a level just high enough to
overcome running friction at low speed. ILIM is
In general, clamping is done at low speeds with the lowered to reduce the torque exerted by the motor
current limited to some low level. After the clamp when the machine stop is encountered. Set
has occurred, the motor is assumed to be at zero PECLAMP to a level well above the normal
speed. When the clamp has occurred, you can raise following error; usually the position unit equivalent
or lower ILIM to set the holding torque as desired. of several hundred counts is sufficient. Then turn
You can tell whether a clamp has occurred by looking CLAMP on and jog, at low speed, toward the stop.
at SEG, the present motion segment. If SEG is 0, The BDS5 will run the machine into a stop and limit
then motion has stopped. current to ILIM. When SEG is equal to 0, the BDS5
3-27
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
You should be aware that if you replace your motor, The next graph shows the effect of the Jog To (JT)
you must repeat this process since the relationship of command. This example also assumes that the speed
PRD to the motor shaft position is different for each
motor.
3-28
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
2000 RPM
3. Begin move.
Position dependent commands must be used with
care. If you specify a position that has already
4. Wait for the BDS5 to capture.
passed, the BDS5 will generate ERROR 42, "MOVE
W/O TIME." Also, if the Jog To command is given
5. Use the captured position to set the endpoint of
so that ACC or DEC prohibits the profile from
the move.
reaching final speed before the specified position, the
BDS5 will generate ERROR 42. ERROR 41,
For example, the following code segment jogs at
"MOVE NEEDS MOTION," is generated if Jog To
2000 RPM and stops 4000 counts after the
or Jog From are commanded when the velocity is 0.
registration input transitions from low to high.
Finally, a position dependent jog that attempts to
change the direction of rotation will generate an error.
All of these errors stop motion. CAPDIR 1 ;SET CAPDIR FOR
;LOW TO HIGH
CAP ON ;ENABLE CAPTURE
3.8.11.1 Registration J 2000 ;BEGIN MOVE
The BDS5 allows you to combine the position TIL CAP EQ 0 ;WAIT FOR
capture with the Jog To command to implement ;POSITION
index-to-registration. One example of index-to- ;CAPTURE
registration is a conveyor belt on which items are JT PCAP+4000 0
placed in random positions. An optical sensor detects
the item upstream of the operation. The BDS5,
controlling the conveyor, continues at full speed and Note that the motor comes to rest 4000 counts after
stops the item where the operation will take place. the position that was captured, not 4000 counts after
The high-speed position capture works at all the JT command is executed. If 4000 counts was not
velocities and during accelerations. It is accurate to enough distance, ERROR 42, "MOVE W/O TIME"
25 microseconds (if Connector C2, Pin 19 is used) would be generated. This means that the commanded
and, therefore, will work properly on demanding speed change cannot be accomplished given DEC, the
index-to-registration applications. If the OPTO-22 deceleration limit. Note also that you must leave an
Connector (C7) is used with standard industrial additional 10-15 milliseconds for the TIL and JT
OPTO-22 style modules, the optical module may add commands to be executed.
as much as 25 milliseconds of delay, so be careful to
properly specify the optical coupling to the The JT command example given here brings the
registration switch. system to rest. As an alternative, you can change the
speed to any value the motor can run, as long as you
To implement index-to-registration, you usually jog do not attempt to change direction with one JT
the motor at a constant speed, capture the position command. For example, the following command
(with the registration device connected to the HOME replaces the above JT command when you want to
input), then use the Jog To command to stop the change speed to 100 RPM at 4000 counts past PCAP.
motor at an endpoint (normally a specified distance
beyond the registration input).
3-29
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
You might think the motor will first jog to 100 RPM,
then to 400 RPM (at 20,000 counts) and finally come
to rest at 30,000 counts. Actually, the motor will jog
to about 40 RPM and continue at that speed until it
3-30
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
X1 = 10000 ;X1 STORES THE request a speed reduction near an endpoint, so that
;ENDPOINT this may not be a problem.
MA X1 5000 ;BEGIN AT 5000
;RPM
TIL SEG EQ 0 GOSUB 25 3.8.12 External Inputs
;25$ WATCHES I1
;TO CHANGE External inputs are normally from a "master" motor.
;SPEED As a standard, these inputs are in digital encoder
B format. Examples of "master" motors include the
encoder-like output from another BDS5, output from
25$ an actual encoder, or a customer synthesized encoder
? I1 EQ 0 RET ;CHANGE ONLY IF signal. The external input can control motion in the
;I1 = 1 two BDS5 Master/Slave modes: electronic gearbox
J 1000 ;REDUCE SPEED and profile regulation. The BDS5, acting as the
;TO 1000 RPM slave, accepts commands from these external sources.
TIL SEG EQ 2 ;WAIT UNTIL SPEED The external input can also come from a feedback
;IS 1000 RPM encoder which is mounted to the motor; this encoder
JT X1 0 ;USE JT TO GET TO is occasionally used to improve the accuracy of the
;ORIGINAL BDS5.
;ENDPOINT AT NEW
;SPEED External inputs are connected to Channel A and
TIL SEG EQ 0 ;WAIT FOR MOTION Channel B inputs of the Encoder Equivalent
;TO STOP Connector.
B ;DONE
Your program has direct access to the external input
You must be careful not to begin the motion too late through the variables VEXT and PEXT. The
in the profile. For example, suppose I1 became 1 frequency of the external input is provided in VEXT.
after the profile was well into deceleration, and the VEXT is in external velocity units (VXNUM and
speed was, say 200 RPM. In this case, the JT VXDEN). PEXT is the accumulation of counts from
command would generate an error because by the the external input. PEXT can be set to any value
time it was executed, the motor position would be from the terminal or from your program at any time;
past X1, the original endpoint. This is because the this is equivalent to normalizing the external position.
unit would accelerate up to 1000 RPM before the JT PEXT is in external position units (PXNUM and
command was executed. In general, you must limit PXDEN). If the external input comes from a motor,
the time during which you are looking for the speed VEXT and PEXT represent the "master" motor's
change. After this point, the profile must either velocity and position, although you must properly
continue along the original profile or the endpoint calculate the external velocity and position units. In
must be extended. For example, the program section this way, PEXT, the master position, is similar to
beginning at label 25 could be re-written so that it PFB, the slave position. Likewise, VEXT is similar
watched a position trip point, X1-2000: to VFB. If the "master" motor has the same
resolution as the slave, then set PXNUM, PXDEN,
25$ VXNUM, and VXDEN equal to PNUM, PDEN,
? PFB GT X1-2000 RET ;DO NOT VNUM, and VDEN, respectively. Otherwise, see
;REDUCE Chapter 4 for more information on calculating the
;SPEED IF units.
; PFB >
;SETPOINT VXAVG is the average of VEXT over the previous
; 16 milliseconds. Occasionally, the normal sample-to-
;REST OF 25$ PROGRAM THE SAME sample variation of VEXT is undesirable. In these
; cases, use VXAVG in place of VEXT.
3.8.12.1 Analog Input
What value to use for the setpoint varies from one The standard BDS5 is configured with digital
application to another. These values must be set by external inputs. As an option, the BDS5 provides an
experience. On many applications, the input will not analog external input. Note, however, that you
3-31
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
cannot have both types of inputs at the same time. RESOLUTION MASTER is the resolution of the
For systems configured with analog inputs, the BDS5 master motor in counts/revolution.
converts the analog input to a pulse train, where 10
volts of input is equivalent to 2 MHz. If the analog If the master is a pulse train that does correspond to a
input is a velocity command, then use electronic motor or encoder, calculate GEARI and GEARO
gearbox Master/Slave mode to make the BDS5 a with:
velocity drive. See Appendix G for more
information. If the analog input is going to be used GEARI REVSLAVE × RESOLUTION SLAVE
for "feedrate override," use profile regulation. =
GEARO COUNTSMASTER
The analog external input is connected to the analog
input of the Customer I/O Connector. where:
Electronic gearbox is one of two BDS5 Master/Slave REVSLAVE and RESOLUTION SLAVE are as
modes. Refer to Figure 3.8 for a diagram of the two before.
modes. Electronic gearbox is used to link two motors
together so that the velocity of one is proportional to To enable the Gearbox mode, type:
the velocity of the other. The constant of
proportionality can be negative, allowing the GEAR ON
velocities to be in opposite directions.
If the ratio is not an integer, the BDS5 does not "drop
3.8.13.1 Gear Ratio, GEARI & GEARO pulses." The BDS5 keeps track of partial pulses to
In electronic gearbox, the command signal comes eliminate dropping pulses over time. If the number of
from the external input. The pulses are multiplied by pulses coming into the BDS5 is at a rate that is too
a gear ratio to form the position or velocity command. large, then ERROR 97, "GEAR OVERFLOW," will
The ratio is defined by two variables: input gear teeth be generated. This error can also be caused by the
(GEARI) and output gear teeth (GEARO). GEARI ratio of GEARO to GEARI being too large. Note that
must be between ±32767; GEARO must be between 1 large feed-forward (KF > 4000) is normally
and 32767. If the sign of GEARI is changed, then the undesirable in electronic gearbox systems because it
direction of rotation will be reversed. causes overshoot.
3-32
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
3-33
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
BDS5 Master/Slaving
Master Slave
Encoder
or
Digital Input
Motor BDS5 Conn. C1
or
Motor
or Analog Input
Conn. C2
Motor
BDS4
BDS5 Resolver
or Feedback
Pulse
Signal
or
Analog
Signal
Electronic Gearbox
Slave BDS5
Option
Card
GEARI
GEARO
PCMD
+
+
Motion Profile
Command Generation
Profile Regulation
Slave BDS5
Position PXDEN
PXNUM PEXT
Digital Input Conn. C1
X4
or Decode
Analog Input Conn. C2 A/D Velocity
VXDEN
VXNUM
VEXT
Option
Card
1
REGKHZ
Motion Profile
Command Generation PCMD
3-34
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
3.8.13.6 Gearbox, ACC/DEC, and To use profile regulation, you must determine:
Jogs
When the BDS5 is run as a velocity loop (PL off), 1. The maximum frequency of the external input.
acceleration and deceleration rates can be limited by Set REGKHZ to this value.
the variables ACC and DEC. This allows you to limit
the acceleration from external velocity commands 2. The desired speed of the move when the
that are otherwise unlimited. If you want the external input frequency is REGKHZ. Use this
acceleration and deceleration to be limited by ACC value as the commanded velocity of the profile.
and DEC, type:
The maximum frequency of the external input is
stored in the variable REGKHZ in kHz. The profile
RAMP ON ;LIMIT ACC AND
will execute normally (that is, at the specified velocity
;DEC WHEN PL IS OFF
and acceleration) when the external input frequency is
equal to REGKHZ. If the input frequency is less than
3.8.14 Profile Regulation REGKHZ, then the profile will move the specified
distance, but the acceleration and velocity will be less
This section describes profile regulation, one of the than, and in proportion to, the
BDS5 Master/Slave modes. Profile regulation allows
you to synchronize the rate of profile execution input frequency. The move will never go faster than
according to the external input. This modifies the specified in the original move command, even if the
3-35
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
input frequency goes above REGKHZ. However, the belt speed. The belt moves at about 200
input frequency should always be less than REGKHZ. inches/minute. An encoder has been placed on the
REGKHZ is only resolved to 1 kHz (for example, conveyor, and the maximum belt speed of 275
499.5 kHz is converted to 500 kHz). inches/minute is equivalent to 780 kHz on the
encoder. If the belt is at maximum speed, the profile
REGKHZ is somewhat arbitrary; it must be greater of the motor is to rotate one revolution at a peak
than the maximum frequency of the external input and speed of 400 RPM.
less than 2 MHz. Beyond those limits you can set it
to any frequency that is convenient and adjust the Solution:
commanded motion by changing the speed of the
profile. Connect the conveyor belt motor encoder to the input
channel of the BDS5, as shown in the Installation and
Setup Manual, "Wiring C1." The following program
The frequency of the external should be executed:
input should always be less
than REGKHZ.
NOTE REG ON ;ENABLE PROFILE
;REGULATION
3.8.14.2 Profile Regulation and REGKHZ=780 ;SET THE MAX
;EXTERNAL
Counting Backwards ;FREQUENCY TO
In general, if you use profile regulation, the external
;780
input should count forward (that is, VEXT should be
MI 4096 400 ;MOVE ONE
positive when VXNUM and VXDEN are positive). ;REVOLUTION AT
The profile regulation firmware allows the input to ;400 RPM
count backwards for up to 30000 counts. This is
useful for applications such as conveyor belts that
generally go forward, but can go backward for short In the case above, the MI move will generate a one-
distances. If the external input counts backwards, the revolution move at a speed proportional to the
Profile Regulation mode works as follows: external input frequency with 400 RPM the maximum
rate when the external input frequency is 780 kHz.
• The profile stops (that is, no motion is
commanded) during backward counting. Note that the belt speed virtually never reaches 275
inches/minute. However, REGKHZ must be higher
• The backward counting must be limited to than the worst case maximum belt speed. For
30000 counts. Otherwise, ERROR 64 is example, the above program can be modified to allow
generated. an even larger belt speed.
3-36
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
Table 3.9. Encoder Resolution CONTINUE normally looks at the velocity command
for 1 millisecond. If the velocity command is
R/D Resolution Encoder Lines/Revolution generated from the electronic gearbox or a regulated
profile, the velocity can vary considerable. The
12-bit 1024 CONTINUE command allows you to specify a time
period, up to 1 second, over which velocity command
14-bit 4096
is averaged. For example, if you entered:
16-bit 16384
CONTINUE 50
2. The encoder must be mounted directly to the
motor. It cannot be connected through the CONTINUE command would change the velocity
gearboxes, lead screws, or any other command to the average velocity command over the
mechanical device. previous 50 milliseconds. CONTINUE always sets
SEG to 1.
3. You must turn the switch EXTLOOP on. This
switch configures the BDS5 to close the The BDS5 provides several control loops. These
position loop with feedback from the external loops, or control algorithms, allow you to select the
input rather than from the resolver. best control method for your applications.
3-37
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
NOTE
3.9.1 Position Loop
The Position Loop input is the variable PCMD, the
Position command. The feedback is PFB, the 3.9.2 Velocity Loop
position feedback. The output is VCMD, Velocity
command, and its two tuning variables are KP, the The velocity loop takes its input from the position
position loop gain, and KF, the position loop feed- loop if PL is on. If PL is off, motion commands
forward gain. directly control the velocity command (VCMD). The
feedback is VFB, velocity feedback, and the
The position loop calculates the position error (PE) as difference of these two signals is VE, velocity error.
the difference of PCMD and PFB. As a secondary Velocity error can be used in two control loops:
command source, PCMD is differentiated proportional and integrating.
(d/dt)PCMD. The position loop then performs the
following calculations:
3.9.2.1 Proportional Velocity Loop
VCMD=KP_PE+KF_(d/dt)PCMD. If a proportional velocity loop is selected, then the
velocity error is multiplied by KPROP, the
The position loop is optional. If the switch PL is on, proportional constant, to generate ICMD, the current
then the position loop is enabled; if it is off, then the command. Proportional velocity loop is selected
position loop is bypassed. PL is turned on at power- when the PROP switch is on. PROP is turned off on
up. power-up.
The feed-forward gain reduces position error at high Proportional velocity loops are much easier to
speed. Without feed-forward, the velocity command stabilize than integrating loops, so they are often used
is generated only from position error; a large position during machine setup. However, they also allow
error is required to command a hi steady-state velocity error and therefore, they are
gh speed. If KF is large enough, then a high velocity generally replaced with integrating loops when the
command can be generated with little or no position machine is fully operational.
error. The BDS5 scales KF so that unity feed-
forward occurs when KF equals 16384. In other 3.9.2.2 Integrating Velocity Loop
words, if KF is 16384, no position error is required to If an integrating velocity loop is selected, then the
generate the velocity command in steady-state velocity error is integrated and multiplied by KVI, the
running conditions. KF should never be larger than velocity integration constant. Velocity feedback is
16384. In addition, larger KF makes the system more subtracted from this signal, then the signal is
responsive to commands. multiplied by KV, the velocity loop gain, to form
ICMD. This velocity loop is selected when PROP is
Unfortunately, large values of KF cause overshoot. off.
KP must be reduced to reduce overshoot. If you need
to minimize position error when the motor is turning,
you will need to optimize KF and KP. Typically, KF
ranges from 2000 to 10000.
3-38
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
NOTE
• No feed-forward (KF=0)
3-39
CHAPTER 3 - PROGRAMMING LANGUAGE BDS5
∫ dt
GEARING & + + + + KV
Kp KVI
PROFILE ICMD
GENERATION PCMD PE VE
- -
-
VCMD
PFB VFB POSITION LOOP w/ INTEGRATION
∫ dt
GEARING & d + + KV
KVI
PROFILE dt ICMD
PCMD VCMD VE
GENERATION
- -
3-40
BDS5 CHAPTER 3 - PROGRAMMING LANGUAGE
GEARING & d +
KPROP
PROFILE dt ICMD
PCMD VCMD VE
GENERATION
-
∫ dt
GEARING &
+ + + + KV
PROFILE Kp KVI
GENERATION PCMD PE VE ICMD
- -
-
VCMD
EXTERNAL
d
ENCODER
PEXT dt VEXT EXTERNAL POSITION LOOP w/ INTEGRATION
INPUT * [EXTLOOP = 1]
3-41
BDS5 CHAPTER 4 - USER PROGRAMS
CHAPTER 4
USER PROGRAMS
READ THIS ENTIRE SECTION CAREFULLY. Always hardwire safety functions. This
includes EMERGENCY STOP or ESTOP.
This section discusses programming practices. The You should not depend on your program for
BDS5 has a flexible language. You must follow safety functions because of three potential
proper programming principles to insure that the problems: 1) You can easily make
4-1
CHAPTER 4 - USER PROGRAMS BDS5
programming errors (software problem); 2) A People who are new to programming often
function on the BDS5 may not work in exactly have a natural distaste for writing flowcharts.
the way you expect it to in every condition Many view flowcharts as something between a
(firmware problem); and 3) A critical crutch and unnecessary work. Most
component in your system may fail and experienced programmers have a different
prevent the function from working (hardware view. The most important point about
problem). Remember, safety functions are flowcharts is that they are virtually required if
rarely exercised so that if one of these you need help over the telephone. Always
problems does occur, it can go undetected write flowcharts for programs that are longer
indefinitely. If personal safety is involved, than 20 to 30 lines.
always hardwire the function.
5. COMMENT YOUR PROGRAM.
2. USE CAUTION WHEN PROGRAMMING
EQUIPMENT PROTECTION FUNCTIONS. Always comment your programs. Comments
help explain your program to other people.
Keep in mind that others may need to modify
Use caution when your program in the future. Comments also
programming equipment- help you remember why you chose certain
protection functions. ways to do things.
CAUTION Programming errors can
damage your equipment. 6. AVOID SPAGHETTI CODE.
Sometimes you can hardwire equipment A program with too much branching is often
protection functions, but other times this is called spaghetti code because of the look of the
impractical and you must program the flowcharts. Avoid a lot of branching,
functions. If this is the case, be very careful. especially branching up (that is, towards the
Remember, if your program has an error, it can top of your program); logic in programs that
result in damage to your equipment. For branch down is more intuitive and thus, less
example, suppose you want to wire your motor prone to errors. If you do branch up, branch to
thermostat so that when a fault occurs, the the top of a major section. In most programs
present machine cycle continues until there should only be one or two places that you
complete. In this case, you must program the branch up to. Feel free to use small loops (2 or
function (hardwiring the thermostat would 3 lines) which, of course, repeatedly branch to
result in motion stopping the moment a the top of the loop. Avoid branching between
thermostat fault is encountered). Carefully test sections.
these functions.
7. AVOID USER SWITCHES THAT MODIFY
3. WRITE A SIMPLE SPECIFICATION FOR BLOCKS OF CODE.
YOUR APPLICATION.
Switches that modify functions can be difficult
Write an outline of all the functions your to understand. This is commonly done when
application will require before you start programmers attempt to use one block of code
programming. This will serve as a for two similar functions. If possible, write
specification. Everyone who is involved with two different blocks of code rather than trying
your system (customers, supervisors, co- to use one block for two functions.
workers, operators) should agree on the
specification. While last-minute requests for
program changes will still occur, this is a
reasonable step towards reducing the incidence
of such requests. 4.2.1 Example Application
4. WRITE A FLOWCHART OF YOUR
PROGRAM. Suppose you are working on a project that is defined
by someone besides yourself. It may be a co-worker,
a supervisor, a customer, or an operator. For this
4-2
BDS5 CHAPTER 4 - USER PROGRAMS
4-3
CHAPTER 4 - USER PROGRAMS BDS5
START
NORMALIZE TO ZERO.
NO SET ACC AND DEC.
IS STOP INPUT ON? TURN ON
REGISTRATION
YES
PRINT
WAIT FOR
"STOP HAS BEEN ISSUED" REGISTRATION MARK.
END
4-4
BDS5 CHAPTER 4 - USER PROGRAMS
1$ ;START OF
;PROGRAM
O1 OFF ;TURN OFF THE
;SAW OUTPUT
CAPDIR = 1 ;SET
;REGISTRATION
;DIR. POSITIVE
EN ;ENABLE BDS5
5$ ;BEGIN LOOP
IF I1 EQ 1 ;IS STOP INPUT ON?
GOTO 10 ;GOTO TO "STOP
;ROUTINE"
ELSE
NORM 0 ;NORMALIZE TO 0
ACC = X1 ;SET ACC
DEC = X2 ;SET DEC
CAP ON ;TURN ON CAPTURE
TIL I2 EQ 1 ;WAIT FOR START
;INPUT
O1 OFF ;TURN OFF SAW
;OUTPUT
J X3 ;START
MOVE
TIL CAP EQ 0 ;WAIT FOR
;REGISTRATION
JT PCAP+X4 0 ;SET END POSITION
;TO CAPTURED
;POSITION PLUS AN
;OFFSET (X4)
TIL SEG EQ 0 ;WAIT FOR MOTION
;TO STOP
O1 ON ;TURN ON SAW
;OUTPUT
GOTO 5 ;GO TO TOP OF
;LOOP
ENDIF
4-5
CHAPTER 4 - USER PROGRAMS BDS5
4.2.5 Customer Service The BDS5 has a simple editor which is built in, or
resident. As an alternative, you can edit your
If you need help with software or understanding program on a computer and transmit it to the BDS5.
BDS5 functions, you can contact the Regional Motion Link is a software package designed
Industrial Drives' Sales Office. Ask for the Sales specifically for this purpose. Motion Link runs on
Applications Engineer. Please observe the following IBM-PC's and compatibles, and it handles the
procedure: communications between the BDS5 and the
computer. Motion Link also features a full-screen
1. Contact Industrial Drives for each new editor.
problem. Occasionally, an applications sales
representative may refer you to the Engineering Editing with Motion Link is preferred because it has
Department if necessary. However, if you call more features than the resident editor, and it allows
later with a new problem, please ask for a you to save your program on disk. Having the
applications sales representative. program on disk is a significant advantage since it is a
simple matter to transmit, or download, the program,
2. Be prepared to provide the following items: should the BDS5 be replaced or multiple BDS5's be
programmed.
a. A written spec of the system;
a. Strip out sections of your program to help 1. Establish communication with the BDS5 as
locate a problem. discussed in Chapter 2.
b. Rewrite sections of your program that do not 2. Press the right arrow key to display the menu
conform to the programming practices bar. Select PROGRAM.
described in this chapter.
3. Select NEW.
c. Video tape your machine to help
demonstrate the problem. 4. Enter this program:
4-6
BDS5 CHAPTER 4 - USER PROGRAMS
4-7
CHAPTER 4 - USER PROGRAMS BDS5
indicating that you are in the Insert mode. Now type: FIND WHAT? EDITOR?
F->
;TEST LINE FOR LEARNING ABOUT THE
;EDITOR In this example, the Find command has a default
"FIND WHAT" string. The default is the find string
Press the escape key to exit the insert mode. Type: from the last Find command. If you enter an empty
line, the next line with "EDITOR" will be found. If
P 1 you do not want to use the default string from the last
Find command, type in the word or words you want
to find this time. Pressing the escape key will abort
and the BDS5 should respond with:
the F command.
1 ;TEST LINE FOR LEARNING ABOUT If the Editor cannot find the specified word, it will
THE EDITOR respond with "NOT FOUND" and return to the edit
mode:
You can specify the line you want to insert directly.
For example: NOT FOUND
E->
I 5
4.3.2.6 Change (C)
enters the Insert mode. The next line you type is The Change (C) command is similar to the Find
entered directly into the program as the new line 5. command. However, Change allows you to change
Subsequent lines, 6, 7, and so on, follow line 5. the string you found. Also, Change only searches the
current line. Use the P command to go to line 1 and
4.3.2.5 Find (F) print the line you typed from the previous discussion
The Find (F) command will search down through the of the Insert command. Type:
program memory for a particular word, letter, or
string of characters. For example, the Find command P 1
can be used to find the word "EDITOR" from the
Insert command above. From the Editor, type: and the BDS5 should respond:
FIND WHAT? C
F->
and the BDS5 will respond with:
then type:
CHANGE WHAT? "EDITOR"?
EDITOR C->
and the Find command will find line 1 since the word Again, "EDITOR" from the Find command is the
EDITOR occurs in that line. Now F can be used to default input. Press the return key to accept the
find the next line with "EDITOR." Type: default and the BDS5 will respond with:
4-8
BDS5 CHAPTER 4 - USER PROGRAMS
4.3.2.8 Size
The BDS5 program memory has space for about
16000 characters. If you want to see how much
memory is left, type:
4-9
CHAPTER 4 - USER PROGRAMS BDS5
4-10
BDS5 CHAPTER 4 - USER PROGRAMS
begins a subroutine at label 66. The RET command LE Less Than Or Equal To
returns from the subroutine and begins executing the EQ Equal To
program one line below the original GOSUB
command. NE Not Equal To
4-11
CHAPTER 4 - USER PROGRAMS BDS5
are optional, although at least one must be present. execution if X1 is less than 100 and greater than -100.
You could use:
Some examples of the ? command are:
? X1 LT 100 : GOTO 20
? X1 GT 5 P "X1 > 5" : P "X1 <= 5" ? X1 GT -100 : GOTO 20
? VFB GT 3000 P "HIGH SPEED" : P B
"LOW SPEED" 20$
? 2*X2-5 LE X1/100 GOSUB 40
? X1/2*2 EQ X1 GOTO 5 However, those four commands can be replaced by
;GOTO 5 IF X1 IS just one nested ? command:
;EVEN. DO
;NOTHING IF X1 IS
;ODD. ? X1 LT 100 ? X1 GT -100 B
? I4 EQ 1 J 2000 ;I4 IS A JOG
;BUTTON Nesting two ? commands is the same as ANDing the
two conditions. The example above only executes the
Note that each condition has an exact opposite: EQ B command if both X1 < 100 and X1 > -100.
& NE, LE & GT, and LT & GE are all pairs of Nesting of ? commands is limited by the number of
opposites. Since the ? command allows both TRUE- entries and the maximum length of a line. BDS5
command and FALSE-command, you have your commands are limited to 15 entries (the example
choice of which command to use in the condition. above has 9 entries: ? , X1, LT, 100, ?, X1, GT, -
For example, the two ? commands that follow have 100, and B). Since each level of ? command nesting
exactly the same effect: requires 4 entries, you cannot have more than three
levels of nesting. Also, a ? command must be less
than 80 characters long since it must fit on a single
? X1 EQ 10 B : P "X1 OK" line.
;BREAK IF X1 > 10
? X1 NE 10 P "X1 OK" : B
;BREAK IF X1 > 10 4.4.2.3 TIL COMMAND
The TIL is a single-line command that allows you to
specify a condition and a command to be executed
The ? command can be used to make a loop counter.
repeatedly until that condition is true. The TIL
Suppose you want to go to subroutine 25 twenty
command has the following format:
times. You could just write GOSUB 25 twenty times,
but it would probably be better to use a program
TIL condition FALSE-command
loop. The following statements show how the ?
command can be used to control that program loop:
FALSE-command is repeatedly executed as long as
the condition is false. If the condition is true at the
X30 = 1 ;X30 IS THE beginning of the TIL command, then FALSE-
;LOOP COUNTER command is never executed. In this case, program
12$ ;THE LOOP BEGINS execution continues to the next step. An example of
;AT 12$ the TIL command would be to print a line to the
GOSUB 25 ;GO TO operator continuously until the variable PFB is
;SUBROUTINE 25 greater than 10000. This statement delays program
X30 = X30+1 ;INCREMENT THE execution until the condition is true and also refreshes
;LOOP COUNTER the display while the program waits:
? X30 LE 20 GOTO 12
;EXECUTE LOOP 20
;TIMES TIL PFB GT 10000 P "WAITING FOR
... ;CONTINUE PROGRAM PFB > 10000"
4-12
BDS5 CHAPTER 4 - USER PROGRAMS
4-13
CHAPTER 4 - USER PROGRAMS BDS5
4-14
BDS5 CHAPTER 4 - USER PROGRAMS
label. On the other hand, if a single instruction is to been executed, all ENDIF's are automatically
be executed, the ? may be more readable. Usually, executed. This means that you cannot jump to a label
one form results in less program space or faster within any IF-THEN-ELSE structure. Note that
execution, and this may dictate which to use. jumping out of a control structure in such a manner is
However, if space or timing are not critical, use the a poor programming practice and should be avoided.
most readable form. Also, you may not jump to a label within an IF-
THEN-ELSE from outside the structure.
4.4.2.6 Nesting IF commands
You can nest IF commands. For example, the You cannot GOTO the middle
following program shows two levels of nesting: of an IF/ENDIF set. You
should never execute a RET
55$ from between an IF and
IF X1 GT 0 NOTE ENDIF.
IF X2 GT 0
P "BOTH X1 AND X2 > 0"
ELSE
P "ONLY X1 GT 0" 4.5 USING THE GENERAL PURPOSE
ENDIF INPUTS
ELSE
IF X2 GT 0 General purpose inputs can be used to control the
P "ONLY X2 GT 0" program. From Chapter 3 you may recall that these
ELSE inputs can be referred to one at a time using variables
P "NEITHER X1 NOR X2 > 0" I1-I16, or collectively IN. If the program must wait
ENDIF for a particular input to be on or off before
ENDIF continuing execution, the TIL command can be used:
B
TIL I5 EQ 0
You can nest IF commands indefinitely. You should
be careful to include all of the ENDIF's to close each
level of nested IF. All of the restrictions and options If this statement is executed from the program, the
that were listed earlier as applying to IF commands program will delay execution until I5 is 0.
also apply to nested IF's. The indentation shown
above is not required, but is present to make the If the program must wait for many inputs to be on or
program more readable. The BDS5 ignores the off, then the TIL command can be expanded. For
indentation. example, if inputs 1, 4, 5, and 6 must all be on, either
of the following TIL instructions can be used:
TIL I1+I4+I5+(1-I6) EQ 4
;ALGEBRAIC MATH
4-15
CHAPTER 4 - USER PROGRAMS BDS5
TIL I1&I4&I5&(1-I6) EQ 1
I/O Number 16 15 14 13 12 11 10 9
;LOGICAL MATH
I/O On? N N N N N N N N
Notice the use of (1-I6). This is a logical NOT, Binary Mask 0 0 0 0 0 0 0 0
because if I6 equals 1, then (1-I6) is 0, and if I6
equals 0, (1-I6) is 1. The logical NOT is useful when
checking to see if inputs are off. Since the condition must be in hex or decimal, it can
be expressed as:
If more than a few inputs must be tested, then
referencing them one at a time can be cumbersome. 0000000000011001 (BINARY) equals 19 (HEX) or
As an alternative, IN can be used. This can be 25 (DECIMAL),
demonstrated with the example above. If the program
must wait for inputs 1, 4, and 5 to be on and input 6 which equals 1+8+16 (DECIMAL).
to be off, logical math can be used to mask the inputs
that are not supposed to be tested: inputs 2, 3, and 7- Now the mask and the condition can be used in a TIL
16. A mask is a binary word with a 0 for each input instruction in the format:
that is not tested and a 1 for each that is. In this
example, the mask would be: TIL IN&mask EQ condition
or
Input Number 16 15 14 13 12 11 10 9
TIL IN&57 EQ 25 ;THIS USES
Test Input? N N N N N N N N
;DECIMAL. BOTH
Binary Mask 0 0 0 0 0 0 0 0 ;WORK.
Since the mask must be in hex or decimal, it can be This accomplishes the same function as the TIL
expressed as: instruction which refers to inputs one at a time.
However, using the IN word allows the function to be
0000000000111001 (BINARY) equals 39 (HEX) or done in a less cumbersome manner.
57 (DECIMAL),
4-16
BDS5 CHAPTER 4 - USER PROGRAMS
intermixed, limited only by the 80-character You can use print formatting to convert the program
maximum instruction length. The following units (RPM) to KRPM with the following print
command prints the speed on the terminal: command:
P "SPEED = " VFB " RPM" P "SPEED = " VFB[5.3] " KRPM"
Assuming VFB is 1962, the BDS5 will respond with: Assuming VFB was 1962, this command would
produce:
SPEED = 1962 RPM
SPEED = 1.962 KRPM.
Note that the text must be enclosed by double quotes,
and that text and/or variables must be separated by at The ".3" which follows the "5" in the format causes
least one blank space. the BDS5 to insert a decimal point three places from
the right of the number. To the operator, this is more
4.6.1.1 Printing Decimal Numbers convenient, though the programmer still must work in
Variables are normally printed as decimal integers in integer units.
a field which is 12 characters wide. Formatting can
be used to adjust the field width or to print decimal You also have the option of printing fewer than all
points. the digits which follow the decimal point. This also
can be specified in the format. For example, suppose
To change the width of the field, follow the variable you only wanted to print one digit after the decimal
name with the width enclosed in square brackets ([ ]). point. The print command from above would be
Referring to the above example, changed to limit the number of digits to be printed:
P "SPEED = " VFB[5] " RPM" P "SPEED = " VFB[5.3.1] " KRPM"
4-17
CHAPTER 4 - USER PROGRAMS BDS5
X1 = 255 Similarly,
P "X1 = " X1[H]
P "X1 = " X1[H3] XS1 = 0
P "USER SWITCH #1 IS " XS1[S]
will cause the BDS5 to print:
results in:
X1 = FFH
X1 = FFH USER SWITCH #1 IS OFF
Two's-complement notation is used when printing in In addition, you can print a switch as Y or N if you
hex. This means that printing negative hex values follow the switch with a bracketed Y ([Y]). For
requires the full field width of 9 characters. When example,
printing in hex format, the field must be wide enough
to include the appended "H." P XS1[Y]
4.6.1.4 Printing Binary Numbers will print either Y or N depending on whether XS1 is
To print a variable in binary format, follow the 1 or 0, respectively. This format is useful with the
variable name with a B enclosed in square brackets input command which we will discuss later. The
([B]). The variable will be printed in a field 33 input command allows the operator to respond with Y
characters wide, including an appended "B," or N and stores 1 or 0 in a BDS5 variable. This print
indicating binary. All of the leading zeros will be format allows you to print the previous answer on the
printed. The default field width of 33 can be reduced screen the way it was entered.
by following the "B" with the desired field width.
For example:
4.6.1.6 Printing Expressions
The P instruction is not restricted to printing only
X2 = 127 variables. In general, any numeric expression can be
P "X2 = " X2[B] formatted and printed. All the following examples
P "X2 = " X2[B10] are valid:
XS1 = 1
P "USER SWITCH #1 IS " XS1[S]
USER SWITCH #1 IS ON
4-18
BDS5 CHAPTER 4 - USER PROGRAMS
for which the number is an ASCII code. For pressing the G key). As Appendix B shows,
example, <Control>G produces 07 or the ASCII bell. You can
use the BDS5 to produce unprintable characters by
X6 = 65 preceding the appropriate character with the carat (^)
P "THE NUMBER " X6[2] " IS THE ASCII to signify an unprintable character. For example, the
CODE FOR " X6[C] following BDS5 command will sound the bell on
your terminal:
will result in:
P "^G"
THE NUMBER 65 IS THE ASCII CODE FOR A
You can also use the character format to print control
If the number is greater than 127 (that is, the eighth characters. For example:
bit is set), the BDS5 removes the eighth bit before
transmitting the character. For example: P 07[C]
P 65[C] " IS THE SAME AS " 128+65[C] also sounds the bell. The character format allows you
to print variables as ASCII codes. However, the
since the BDS5 removes the eighth bit of the easiest way to print control characters is normally
expression on the right, which has the end effect of with the carat (^). One reason for this is that control
reducing the number by 128. If the number is larger characters can be within text strings. For example:
than 255, the BDS5 divides the variable or expression
into four bytes and prints them out separately. For P "BELL = <CONTROL>G. ^G SOUNDS A
example: BELL"
4-19
CHAPTER 4 - USER PROGRAMS BDS5
You can use all formats and combinations with PS INPUT "ENTER NEW SPEED : " X2
that you did with P. These results are identical except
that the BDS5 status is appended onto the line.
This causes the BDS5 to print :
4-20
BDS5 CHAPTER 4 - USER PROGRAMS
Notice the bracketed 3 following X1 in the INPUT Use the BDS5 to enter the following program:
command. This causes the operator input to be
multiplied by 1000 (103) before it is stored in X1. 29$
The print statements that follow display X1 in inches P "TURN I1 ON"
(as the operator would prefer to see it), then in mils H I1 ON
(as the BDS5 motion commands process it). P "I1 IS NOW ON"
B
4-21
CHAPTER 4 - USER PROGRAMS BDS5
Now exit the Editor, turn input I1 off, and observe the W 0 ;WAIT FOR MOTION TO
action of the HOLD command by typing: ;STOP
W 1 ;WAIT FOR MOTION
RUN 29 ;COMMAND TO BEGIN
W 14 ;WAIT FOR SEGMENT 14
You can Hold for any switch except REMOTE and ;(MACRO MOVE)
user switches (XS11-XS50). User switches XS1-
XS10 are allowed with the HOLD command. These commands are similar; W 0 delays program
execution until the last motion command entered has
stopped. W 1 delays program execution until the last
motion command entered has started. W 14 waits for
4.7.2 DWELL (D)
segment 14 of the last motion command to begin.
Sometimes it is desirable to delay execution for a
In the example below, the WAIT command is used to
specified amount of time. The Dwell (D) command;
delay the calculations of the third move until the
is the easiest way to do this. The delay is specified in
second move has begun. The use of W 1 here allows
milliseconds. For example:
the third move to be calculated while the second is
being executed. Do not type in the following
D 1000 ;DWELL 1000 example--it is meant to run as a part of the user
;MILLISECONDS program.
delays execution for 1000 milliseconds or 1 second. MI 10000 100 ;BEGIN THE FIRST
The Dwell command can be demonstrated by typing ;MOVE
in the following simple program: MI 10000 200 ;CALCULATE THE
;SECOND MOVE
6$ ;WHILE
P "BEGIN 5 SECOND DWELL" ;THE FIRST IS IN
D 5000 ;PROGRESS
P "END 5 SECOND DWELL" W 1 ;DELAY PROGRAM
B ;EXECUTION UNTIL
;THE SECOND
Now exit the Editor and type: ;MOVE HAS
;STARTED
MI 10000 300 ;CALCULATE THE
RUN 6 ;THIRD MOVE AND
;PREPARE IT FOR
The result should be: ;EXECUTION
BEGIN 5 SECOND DWELL The WAIT (W) command and synchronization will
END 5 SECOND DWELL be discussed in more detail later in this chapter.
4-22
BDS5 CHAPTER 4 - USER PROGRAMS
MULTI OFF
4-23
CHAPTER 4 - USER PROGRAMS BDS5
3 ALARM C C$ Hardware or
Software Switch
4-24
BDS5 CHAPTER 4 - USER PROGRAMS
The following two tables show how to turn multi- When the first move finished, the first task would no
tasking on and off: longer be idled, and thus would proceed.
4.8.5.1 Pre-Execution Idle Apply DC bus power to your BDS5 and type:
A task can be idled by waiting for a condition before
executing a command. This is called a "pre-
RUN 1
execution idle" because the task is idled before
executing the command that causes the idle. There
are two conditions that can cause a pre-execution The result should be:
idle. A task about to execute a motion command (MI,
MA, or MCGO) will be idled if the motion buffer is FIRST MOVE PROCESSED
full. Also, a task about to execute a printing SECOND MOVE PROCESSED
command (P, PS, R, RS, or INPUT) will be idled UPPER TASK IDLED
until the previous printing command is finished. UPPER TASK IDLED
...
For example, the BDS5 can store up to two MI or UPPER TASK IDLED
MA commands. This was called buffering in Chapter UPPER TASK IDLED
3. This means that if you wrote a task with three MI THIRD MOVE PROCESSED
commands in a row, then the third MI command
could not be executed until the first move was The first and second moves are processed
complete. So that task would be idled until the first immediately. Then task level 5 is idled while the first
move finished. If there was another, lower-priority move finishes. While task level 5 is idle, the
task, it would execute until the first move finished. background task executes over and over, printing the
simple message on the screen.
4-25
CHAPTER 4 - USER PROGRAMS BDS5
RUN 1 A$ I1 ON
The result should be: You can follow the alarm definition with the code
MOVE PROCESSED that you want to execute when the alarm fires. For
UPPER TASK IDLED example, if I1 turned on, it might indicate an error
UPPER TASK IDLED condition. In this case you might disable the BDS5,
... turn off all outputs, and break execution. The
UPPER TASK IDLED following program would accomplish this using the A
alarm.
4-26
BDS5 CHAPTER 4 - USER PROGRAMS
4-27
CHAPTER 4 - USER PROGRAMS BDS5
is idle, the lower priority (11$) will run and ;TASK LEVEL 4
continuously increment X1.
VARIABLE$
4.8.7.1 Using Variable Input with INPUT "INPUT NEW DISTANCE" X11
Profiles INPUT "INPUT NEW SPEED" X12
You can use the variable input routine while the X1 = X11 ;LOAD X1 AND X2
BDS5 is executing motion profiles. However, you ;WITH
must be careful if you are changing parameters of X2 = X12 ; INPUT VALUES
motion. Specifically, if you are changing two or more END ;END VARIABLE$
parameters which you want to take effect at the same
time, you must write your program to store those ........................
values away. For example, suppose you are using the
;TASK LEVEL 5
variable input routine to prompt for speed and
distance. You might use a program like this:
20$
MI X1 X2
;TASK LEVEL 4 GOTO 20
VARIABLE$
Temporarily storing the input values in X11 and X12
INPUT "INPUT NEW DISTANCE" X1
guarantees that the MI command will execute with
INPUT "INPUT NEW SPEED" X2
either all new or all old values. Since there are no
END ;END VARIABLE$
idling commands between the commands that load X1
........................ and X2, there is no possibility for task level 5 to run
until X1 and X2 are both loaded or neither is loaded.
;TASK LEVEL 5
In addition, if the variable input routine changes
20$ variables that are used in different lines of task level
MI X1 X2 5, you probably should turn MULTI off at the
GOTO 20 beginning of the block of lines and back on at the
end. This prevents the variable input routine from
reloading the variables in the middle of block of lines.
If you type:
4-28
BDS5 CHAPTER 4 - USER PROGRAMS
4-29
CHAPTER 4 - USER PROGRAMS BDS5
If these conditions are met, the CYCLE READY The background task begins with BACKGROUND$.
output will turn on. Then, when CYCLE turns on, the You can then follow that label with various
BDS5 will begin executing the user program at statements, usually printing commands. For example,
AUTO$, and CYCLE READY output will turn off. enter the following program:
4-30
BDS5 CHAPTER 4 - USER PROGRAMS
* MANUAL SWITCH IS
AN INPUT ON
TYPE " RUN " CONNECTOR C8 - PIN 33
* * CYCLE SWITCH IS
AN INPUT ON
CONNECTOR C7 - PIN 13
YES
BREAK COMMAND
OR
ERROR
NO
ON GO TO
MANUAL * INTERACTIVE
SWITCH MODE
-->
OFF
CYCLE
SWITCH * * NO
POSITIVE
TRANSITION?
YES
SAMPLE SAMPLE
AUTO MANUAL
ROUTINE ROUTINE
AUTO$ MANUAL$
MI 4096 100 IF I1 EQ 1
END J 1000
ELIF I2 EQ 1
J - 1000
ELSE
J 0
EXECUTE EXECUTE ENDIF
AUTO MANUAL END
ROUTINE ROUTINE
4-31
CHAPTER 4 - USER PROGRAMS BDS5
INUM
4.9.1 User Units ILIM[basic units] = ILIM[user units] ×
IDEN
The BDS5 uses internal units, called BDS5-basic
units, that are very inconvenient to use. For example,
INUM and IDEN have a range of 0 to 231. For
velocity is in (1/65.536)*counts/second. User unit
standard current units (percent), INUM is 4095 and
constants scale the BDS5-basic units. For example, if
IDEN is 100. For example, when setting ILIM to 100
you type:
in Chapter 3, you typed:
VOSPD = 1000
ILIM=100 ;SET ILIM TO 100%
The following table shows some common user units. This sets ILIM to 4095 or 100% of full current.
When you typed:
P ILIM
4-32
BDS5 CHAPTER 4 - USER PROGRAMS
4.9.1.2 Other User Units VXDEN for external velocity (VEXT) and by
BDS5-basic units for position, velocity, and PXNUM and PXDEN for external position (PEXT).
acceleration vary with the system resolution. The Drawing A-84866 shows how external position and
resolution is determined by the R/D converter, which velocity come into a slave BDS5 and are displayed as
converts the position of the motor into a 12-, 14- or PEXT and VEXT.
16-bit number. The system resolution is indicated by
the model number. If the external input is a system with the same
resolution as your BDS5, set external units as
follows:
Table 4.12. System Resolutions
R/D Resolution Counts in One Revolution Table 4.13. Setting External Units in
Master/Slave Systems
12-Bit 4096
VXNUM = VNUM
14-Bit 16384
VXDEN = VDEN
16-Bit 65536
PXNUM = PNUM
PXDEN = PDEN
When shipped from the factory, the standard BDS5
user units are velocity in RPM, acceleration in
RPM/second, current in percent of full-scale, and If the command is something other than a motor of
position in counts. similar resolution, see "Machine Specific Units" in
the next section.
The velocity and acceleration units shown on
"COMMON USER UNITS" above are for the
standard 12-bit R/D converter. For 14-bit resolution,
multiply VNUM and ANUM by 4. For 16-bit
resolution, multiply by 16. Do not change VDEN or
ADEN.
VOSPD = 100
4-33
CHAPTER 4 - USER PROGRAMS BDS5
A+ 1 PDEN
PNUM PFS
A- 6
CONNECTOR 1/4 INTERNAL
B+ 2 ENCODER FEEDBACK
C1
B- 7
X VDEN VFS
65.536 VNUM
MICRO-
PROCESSOR
MASTER BDS5
MASTER ENCODER
A+
A-
B+
B-
PDEN
PNUM PFS
INTERNAL
FEEDBACK
X VDEN VFS
65.536 VNUM
A+ 5 PXDEN
PXNUM PEXT
A - 10
x4 EXTERNAL
CONNECTOR
B+ 4 DECODER FEEDBACK
C1
B- 9 X VXDEN
VEXT
65.536 VXNUM
MICRO-
PROCESSOR
SLAVE BDS5
4-34
BDS5 CHAPTER 4 - USER PROGRAMS
Table 4.15. Metric Conversion (12-bit R/D C. Calculate the corresponding machine velocity
Only) in your user units.
POSITION UNITS
D. Perform the operation indicated in the table
under VELOCITY UNITS and set
PNUM Motor Movement (In Radians)
= 651.8971 × VNUM/VDEN equal to this value.
PDEN Machine Movement (In Your Units)
E. If your R/D converter resolution is 14-bits,
VELOCITY UNITS multiply VNUM by 4. Multiply VNUM by 16
for a 16-bit system.
VNUM Motor Velocity (In Rad / Sec)
= 712.047 × The procedure to determine ANUM and ADEN is as
VDEN Machine Velocity (In Your Units) follows:
4-35
CHAPTER 4 - USER PROGRAMS BDS5
D. Perform the operation indicated in the table C. Perform the operation indicated in Table 4.16
under ACCELERATION UNITS and set under EXTERNAL VELOCITY UNITS and
ANUM/ADEN equal to this value. set VXNUM/VXNUM equal to this value.
4-36
BDS5 CHAPTER 4 - USER PROGRAMS
C. 10 RPM of the 0.1 pitch lead screw translates The Rotary mode forces all position-related variables
to 1 IPM of table velocity. to "roll-over" after position feedback (PFB) exceeds a
specified limit. The variables that are rolled over are
D. Refer to Table 4.14 under VELOCITY UNITS PFB, PCMD, and PFNL. The rotary distance (the
for the formula: specified limit before roll-over) is stored in
PROTARY. PROTARY is in position units.
VNUM/VDEN = 4473.92 * (10 / 1) = 44739.2
When ROTARY is on, the Rotary mode is enabled.
Select VNUM and VDEN: If PFB is greater than PROTARY, then PFB, PCMD,
and PFNL are decremented by PROTARY. If PFB is
VNUM = 447392 VDEN = 10 less than zero, then PFB, PCMD, and PFNL are
incremented by PROTARY. Note that DIR=0 does
Find ANUM and ADEN. not work well with the Rotary mode as PCMD , PFB,
and PFNL are always less than zero.
A. Refer to Table 4.14.
You cannot change PNUM, PDEN, or PROTARY
B. Select 10 RPM/second motor acceleration. when ROTARY is ON. In addition, you must
normalize PFB so that 0 < PFB < PROTARY before
C. A 10 RPM/second acceleration of the 0.1 pitch turning ROTARY ON. Enable the Rotary mode by
lead screw translates to 1 IPM/second of table typing:
acceleration.
ROTARY ON
D. Refer to Table 4.14 under ACCELERATION
UNITS for the formula:
4-37
CHAPTER 4 - USER PROGRAMS BDS5
4-38
BDS5 CHAPTER 4 - USER PROGRAMS
4.10.2 Prompts
4.10.4 Transmit/Receive Programs
The BDS5 issues a prompt when it is ready to receive
a new command. Prompts are discussed in Chapter 3. The BDS5 provides commands that allow programs
The BDS5 allows you to suppress the prompt to be transmitted and received without using the
characters by typing: Editor. These commands are intended for
applications which require that a computer directly
transmit and receive programs. This does not include
PROMPT OFF Motion Link, the software communications package
that is run from an IBM-PC or compatible. Refer to
PROMPT is turned on at power-up. Prompts are the Installation and Setup Manual for
particularly important when communicating with communications format.
computers, since the computer that is transmitting to
the BDS5 must wait for a prompt before beginning a
4.10.4.1 <BDS Command Receiving
new line. After the prompt is received, the computer
can transmit at the full baud rate, without inserting from the BDS5
delays. The <BDS command is used to send the BDS5 user
program through the serial port to the terminal or
computer. The transmission can be stopped by
sending an escape character. You should not rely on
4.10.3 Serial Watchdog the BDS5 to store all your programs. Keep back-up
copies elsewhere. The <BDS command will cause
The BDS5 provides a serial watchdog timer for the BDS5 to transmit the entire user program to your
applications where a command should be received computer. It cannot be issued in the Program mode.
from a computer on a regular basis. If a complete For example, from the terminal type:
command is not received from the serial port in the
specified time, an error will be generated that will
<BDS
disable the BDS5 and break the user program.
The serial watchdog is a safety feature that disables and the BDS5 will respond by printing out the entire
the BDS5 if the communications line breaks. The user program.
serial watchdog waits for a carriage return to signify a
completed command. It does not test the validity of 4.10.4.2 The >BDS Command
the command. For example, if your computer fails Transmitting to the BDS5
and begins sending random carriage returns, the serial The >BDS command is used to send a new user
watchdog will not generate an error. program through the serial port to the BDS5. The
transmission is ended by sending an escape character.
Note that this command writes over the contents of
4-39
CHAPTER 4 - USER PROGRAMS BDS5
the user program stored in the BDS5. This command 4.10.5 System Dump
allows the program to be directly entered, presumably
by a computer, to the BDS5. It cannot be issued in The BDS5 can transmit all variables in addition to the
the program mode. user program. This is called a system dump, and you
request it with the DUMP command. For example,
The >BDS command writes type:
over the entire user program.
DUMP
NOTE
and the BDS5 will provide pages of information
including the program, all BDS5 variables, user
The BDS5 issues the "l->" prompt to indicate that it
variables, and user switches. This also includes all
is ready to load a new program line. If you are
protected variables.
loading from a computer, you must wait for the
prompt before beginning to transmit a new line.
The system dump is provided so that the information
from the dump can be directly re-transmitted to any
The >BDS command is password protected. If a
BDS5. This changes all NON-PROTECTED
password was set in the BDS5 Editor, then it must be
variables. The DUMP command precedes protected
given in the >BDS command.
variables with a semicolon (";"). This makes the line
a comment so that when the line is re-transmitted, it
Typing in these examples will has no effect. If the ";" were not there, re-
erase the user program in the transmitting the dump information would generate an
BDS5. Do not type them in error when a protected variable was changed. Every
unless your program is line of the user program is preceded with a semicolon
NOTE backed up. for the same reason.
For example, if a password was not set in the Editor: 4.10.5.1 Version Dump
Your BDS5 will print out its firmware version at any
time with the DUMP VERSION command:
>BDS
DUMP VERSION
will begin transmitting the new program. If you press
the escape key before typing anything else, the
process will be aborted without changing the program
in the BDS5.
4.10.6 Multidrop Communications
If a password was set in the Editor, then the password
must follow the command. For example, if the
password was set as SECRET, type: This function is not available
for the RS-232 option.
>BDS SECRET
NOTE
and the BDS5 will accept programs directly from the
terminal. Multidrop communication allows you to have many
(up to 32) axes on one serial line. This is only
The user program is stored in battery backed-up supported with RS-485. When the BDS5 is in
memory. If the program changes because of a Multidrop mode, each axis must have a unique
hardware problem, the BDS5 issues a "USER address. This address is a prefix on all
PROGRAM CORRUPT" error. The >BDS communications to and from the BDS5. The address
command resets the user program memory, which is stored in variable ADDR. ADDR is set to 0 for
eliminates this condition. standard (single-drop) communications. Valid
addresses are 48 (ASCII '0') through 57 (ASCII '9')
and 65 (ASCII 'A') through 90 (ASCII 'Z') (see
4-40
BDS5 CHAPTER 4 - USER PROGRAMS
Appendix B). Note that the address must be set to "Ae>". In this way, each prompt from each axis is
before multiple units are connected to the same serial unique.
line.
Table 4.17. BDS5 Prompts
When the BDS5 powers-up in Multidrop mode it is
"asleep." When asleep, the BDS5 continues to Non-multidrop Multidrop
execute programs and control the motor properly, but (ADDR=0) (ADDR = 65)
it does not communicate over the serial line. The --> A->
BDS5 executes commands which normally print to
the serial port (P, PS, R, RS, INPUT, and errors) ==> A=>
except that the output is not sent to the serial s-> As>
transmitter. The delays incurred by printing are still
present. If you have print statements that delay the t.. At.
program when the axis is awake, you will have the e-> Ae>
same delays when it is asleep, even though no
characters are being transmitted. i-> Ai>
f-> Af>
When you transmit its address, the BDS5 wakes up
and communicates. The address is a backslash (\) c-> Ac>
followed by the ASCII character represented by
ADDR. For example, if your BDS5 has the RS-485
option, type: 4.10.6.1 Broadcast
You may want to send all BDS5's on the serial line a
ADDR=65 ;SET ADDRESS TO command simultaneously. This is called a broadcast.
;65=ASCII A You can broadcast by sending "\*." In this case, all
\A ;WAKE UP "A" BDS5's execute the command. During a broadcast,
P "THIS IS AXIS" ADDR none of the BDS5's can transmit, but all will receive
;PRINT ADDR and execute the command.
ADDR=0
;RESET DRIVE TO
;SINGLE-DROP 4.11 PROGRAM EXAMPLES
This section lists a typical application program as
This example sets the address well as a sample velocity drive program. Use these
to upper case A. programs as models for your own. This format uses
extensive comments. The assumption is that you are
NOTE using Motion Link so that these comments will not be
transmitted to the BDS5, as they would normally take
Setting ADDR to 65 makes this axis address "A" and an unacceptable amount of space. You are
automatically puts the BDS5 in Multidrop mode. encouraged to use comments because they make the
This axis then waits for the "\A." After this, BDS5 is program easier to understand and correct.
awakened and it remains awake until it receives a "\."
A backslash puts ALL drives on the serial line to For the velocity drive program first you must select
sleep. If you select an axis in multidrop, only that whether the input will be analog or digital (encoder
axis transmits and receives. equivalent). Be sure to set GEARI and GEARO for
your application.
During multidrop, the prompts are changed. If you
typed in the example from above, you would have
noticed the prompt in the above example going from
"-->" to "A->" after you typed in the second line. All
prompts in a multidrop system have the axis address
as the first character of the prompt. This allows you
to know which axis you are communicating with at all
times. For example, the edit prompt goes from "e->"
4-41
CHAPTER 4 - USER PROGRAMS BDS5
;
;NAME OF APPLICATION: PRETZEL MACHINE
;
;DATE A.E. NEUMAN
;
;REVISION HISTORY:
; 8-9-90 ADDED JOG BUTTONS
; 7-17-90 CORRECTED TEACH BUG
;
;
;-------------------------------------------------
;ALARM DESCRIPTION
;
; A$ WATCH THERMOSTAT
; B$,C$ NOT USED
; VARIABLE$ FILL X1 WITH SPEED
; BACKGROUND$ BACKGROUND PRINTING
;
;-------------------------------------------------
;
;I/O DESCRIPTIONS
;
;GENERAL PURPOSE INPUTS
; I1 JOG+ PUSH BUTTON
; I2 JOG- PUSH BUTTON
; I3 TEACH POSITION PUSH BUTTON
; I4 CONTACTOR INTERLOCK SWITCH
; I5 PLC INTERFACE
; I6 HOME REQUEST PUSH BUTTON
; I7 THERMOSTAT
;
;GENERAL PURPOSE OUTPUT
; O1 COOLING FLUID PUMP
; O2 SPINDLE MOTOR CONTACTOR
; O3 PLC INTERFACE
;
;DEDICATED I/O
; CYCLE CONNECTED TO PLC
; GATE NOT USED
; HOME CONNECTED TO HOME LIMIT SWITCH
; LIMIT CONNECTED TO OVERTRAVEL LIMIT SWITCH
; MANUAL NOT USED
; MOTION CONNECTED TO STOP PUSH BUTTON
; READY CONNECT TO PLC
; STATUS NOT USED
;
;-------------------------------------------------
;
;USER VARIABLES
; X1 STORE NUMBER OF CYCLES RUN
; X2 STORE LAST POSITION RUN TO
; X3 INTERMEDIATE CALCULATION
; X4 LOOP COUNTER
; X5 LOOP COUNTER
; X6-X250 NOT USED
4-42
BDS5 CHAPTER 4 - USER PROGRAMS
; ;
;USER SWITCHES
; XS1-XS50 NOT USED
;
;-------------------------------------------------
;
;APPLICATION PROGRAM
;
POWER-UP$ ;POWER-UP LABEL
PLIM OFF ;SOFTWARE LIMITS NOT USED HERE
;CONTINUE YOUR POWER-UP PROGRAM HERE
END
;
;
A$ I7 OFF
P "THERMOSTAT (INPUT I7) OPENED"
P "PROCESS BEING CLOSED DOWN"
DIS ;DISABLE THE BDS5
B ;BREAK PROGRAM EXECUTION
;
;
VARIABLE$
INPUT "ENTER NEW SPEED" X1
END
;
;
AUTO$ ;AUTO LABEL
;WRITE YOUR AUTO PROGRAM HERE
END
;
;
MANUAL$ ;MANUAL LABEL
;WRITE YOUR MANUAL PROGRAM HERE
END
;
...
;WRITE MORE OF YOUR PROGRAMS HERE
END
;
BACKGROUND$
;WRITE YOUR BACKGROUND PRINTING ROUTINE HERE
END
;
;
ERROR$ ;ERROR HANDLER
;WRITE YOUR ERROR HANDLER HERE
B ;END OF SAMPLE PROGRAM
4-43
CHAPTER 4 - USER PROGRAMS BDS5
4-44
BDS5 CHAPTER 5 - DEBUGGING
CHAPTER 5
DEBUGGING
5.1 INTRODUCTION Press the ENTER key and the response should be:
If the error occurs in a section of your program that is This example shows several characteristics of the
not time-critical, you can use single-stepping to help Single-Step mode:
track down the error. When you execute your
program in the Single-Step mode, each command is
printed out. The BDS5 waits for you to press the • All commands are preceded by the trace prompt:
ENTER key before executing the command. Use the
nested-IF example given previously in this manual.
S->
Enter the program, set X1 and X2 equal to 1, and turn
SS on by typing SS ON. Then begin execution at
label 55 by typing RUN 55. The following line
should be displayed:
• Print statements are active in the Single-Step
mode. Notice that the results of the P command
55$
are printed normally, as they are in the Trace
S-->
mode.
5-1
CHAPTER 5 - DEBUGGING BDS5
5-2
BDS5 CHAPTER 5 - DEBUGGING
T...MI 10000 10 ;START MOVE sections of your program a few lines at a time. (Of
T...P "MOVE PROCESSED" course, save the original program on your computer
MOVE PROCESSED for later use.) Remove lines that you do not think are
T...W 0 ;WAIT FOR MOVE involved in the problem. Removing lines that you
T.*.BACKGROUND$ suspect are causing the problem can provide false
T.*.P "UPPER TASK IDLED" leads; for example, the problem may be interaction
UPPER TASK IDLED between a section you removed (which was operating
T.*.D 250 ;DWELL 0.25 SEC. properly) and another, unsuspected section of your
T.*.END program (that was the actual source of the problem).
Your false suspicions can be incorrectly confirmed.
...
The best situation is when you can make a short
T.*.BACKGROUND$ (< 20 line) program demonstrate the problem. After
T.*.P "UPPER TASK IDLED" this, it is usually easy to determine the problem. If
UPPER TASK IDLED you get to the point where you cannot figure out your
T.*.D 250 ;DWELL 0.25 SEC. problem, call INDUSTRIAL DRIVES for help; we
T.*.END will be happy to help you. However, in order to make
efficient use of your time and ours, you must trim
(AT THIS POINT, ASSUME MOTION down your program to a few lines that are not
STOPS AND TASK 5 IS NOT IDLED) working. It is very difficult for even a skilled person
to help debug a large program over the telephone.
T...P "ALL MOTION STOPPED"
ALL MOTION STOPPED
T...B
5-3
CHAPTER 5 - DEBUGGING BDS5
5-4
BDS5 CHAPTER 5 - DEBUGGING
;SEGMENT 3 IS
Macro moves have up to 30 segments, where each ;STARTED
accel, decel, traverse, and dwell counts as a segment. O1 ON ;TURN ON OUTPUT
In each case, every move begins with the variable ;1
SEG equal to 1. As the move progresses, SEG is B
incremented. When all moves are complete, SEG is
set to zero. 5.5.4 WAIT (W)
You can use the SEG to determine when motion is
The WAIT (W) command can also be used for
complete, since SEG is zero when the BDS5 is not
synchronization. The WAIT command is W followed
commanding a profile. For example,
by the segment for which you want the program to
wait, or a 0 if you want the program to wait for
46$ motion to stop. WAIT is provided in addition to the
MA 10000 1000 TIL command because it takes less space in your
TIL SEG EQ 0 P "MOTION IN program. For example, W 3 performs a similar
PROGRESS" function to TIL SEG EQ 3.
B
The WAIT command provides a few special features
continually prints a message until motion stops. Note needed for motion synchronization. For example, in
that when SEG is zero, the BDS5 is not commanding the following program, the Wait delays execution
motion. However, because there is a lag between the until segment 2 of the second move.
command and the response of the motor, you may
want to insert a short delay after SEG is zero: MI -50000 1000 ;BEGIN THE FIRST
;MOVE
46$ MI -50000 1000 ;CALCULATE THE
MA 10000 1000 ;SECOND MOVE
TIL SEG EQ 0 P "MOTION IN W 2 ;WAIT FOR SEG 2
PROGRESS" ;OF THE SECOND
D 100 ;DWELL 100 MSEC-- ;MOVE
WAIT ;FOR MOTION TO SETTLE
;OUT. AT THIS POINT If TIL SEG EQ 2 were used in place of W 2, then
;MOTION SHOULD BE execution would delay until segment 2 of the first
;ZERO move. Since you normally want to wait for the
B specified segment of the last move calculated, the
WAIT command always applies to the last move.
The commands TIL SEG EQ 0 and W 0 are similar,
since both delay execution until motion profiles are The WAIT command never waits when motion has
complete. However, the W 0 command is an idling stopped. For example, if you entered this program:
command and thus allows lower level tasks to
execute. Also, the TIL command can be followed MI -50000 1000
with a statement (such as the P command above), TIL SEG EQ 4 ;BUG--DELAYS
which is executed continuously until motion stops. ;INDEFINITELY
If you want to synchronize to a segment, the SEG
variable can be used with the TIL command. For
the TIL command would delay execution indefinitely
example, suppose you want to turn on an output after
because SEG would never equal 4. However,
the decel of an MI move begins. The following
sequence can be used:
MI -50000 1000
W 4 ;BUG--DELAYS
47$
;UNTIL MOTION
O1 OFF ;TURN OFF OUTPUT
;STOPS
;1
MI -50000 1000 ;BEGIN THE MOVE
TIL SEG EQ 3 ;WAIT HERE UNTIL only delays until motion stops because the WAIT
command does not delay program execution when
5-5
CHAPTER 5 - DEBUGGING BDS5
motion has stopped. Normally, you should use the (thus, allowing motion to begin), the commanded
WAIT command when you are synchronizing motion motion will be "forgotten" by the BDS5.
to program execution. It is an idling command and
thus allows lower level tasks to execute; also, it takes In the following example, two MI commands are
less space, waits for the last motion program, and it entered and precalculated with GATEMODE on.
does not delay execution when motion has stopped.
Use the TIL command when you need a special GATEMODE ON ;ENABLE GATING
function, such as printing during the wait or if you MI 1000 100 ;PRECALC MOVES.
specifically want to stop lower level tasks from MOTION
executing. MI -1000 ;DELAYED TIL GATE
;IS HIGH
Another example of the WAIT (W) command is seen W 0 ;WAIT FOR MOTION
when using multiple JOG TO/JOG FROM ;TO START
commands. Normally, you should place a WAIT (W)
command between these commands. This is because,
This means no motion will take place until the
the initial traverse of a JOG FROM/JOG TO
hardware input GATE is high. If the above lines
command begins as soon as the command is entered.
were part of a program, the W command would delay
Usually, you will want the traverse to begin at the end
program execution until the GATE switch was on.
last specified acceleration segment. For example,
consider the Macro Move Example #1 in Chapter 3.
It could have been done with one JOG and two JOG
TO commands: 5.6 HINTS
J 1000 ;START MOTION The following section lists some hints addressing the
W 2 ;WAIT TIL JOG most common problems. Most result from a minor
;ACCEL IS DONE misuse or misunderstanding of a BDS5 function.
JT 10000 200 ;ENTER JT FOR
;FIRST DECEL If you change your program in the Motion Link
W 3 ;WAIT TIL JT DECEL Editor and the program function does not change, you
;IS DONE may have forgotten to transmit your updated program
JT 11000 0 ;ENTER FINAL to the BDS5.
;SEGMENT OF
;MOVE If you command motion with MI, MA, MCGO, J, JT,
or JF, and the motor does not move...
5.5.5 Gating Motion with GATE ...make sure GATEMODE is not preventing motion
(turn GATEMODE off if you are not
The GATEMODE variable allows you to pre- certain).
calculate a profile and begin motion within 1.5
milliseconds of a switch closure. To enable GATE,
turn on GATEMODE and follow it with either:
1. One or two MA or MI commands, ...make sure CLAMP is not preventing motion (turn
2. One or two Macro Go (MCGO) commands, or CLAMP off if you are not certain). If it is
3. One Jog or MRD command. CLAMP, try raising the clamp limit,
PECLAMP, somewhat. If that does not
When the hardware input GATE transitions from low help, turn CLAMP off. If you now get
to high, motion begins. GATE is on Connector C7, PE OVERFLOW errors, it may be because
Pin 17. After motion is begun, GATEMODE is the motor is undersized. See the hints for
turned off. You must re-enable GATEMODE for PE OVERFLOW errors below.
each move that you want gated. Also, you cannot
turn GATEMODE on when motion is commanded ...make sure REG is not preventing motion (turn REG
from Jogs, MA, MI, or MCGO commands. If you off if you are not certain). If REG is on, you
turn GATEMODE on and command motion, but turn may not be feeding in the master encoder
GATEMODE off before the GATE input turns on signal properly. Remember, it must always
5-6
BDS5 CHAPTER 5 - DEBUGGING
count up. Check VEXT. It should be ...if you get the error during constant speed, verify
greater than zero for profile regulation to that the AC line voltage is large enough.
work. Chapter 1 lists the BDS5 model numbers. If
the voltage you apply to the BDS5 is lower
...make sure ZERO is off. than the specified voltage, the motor will not
operate properly at high speed.
...make sure all tuning constants are well above zero.
Check KP, KV, KVI, and KPROP. Each If you get overspeed errors (ERROR 13)...
should be at least one hundred; generally,
they are above one thousand. ...if the error occurs occasionally, it may be because
you have the limit (VOSPD) set too low.
...make sure ILIM is not too small. If ILIM is below Raise it by 20% (or as high as 120% of
10%, the motor may not be able to overcome VMAX) and see if the problem is corrected.
frictional load.
...if it happens on acceleration, it may be because
...make sure you are commanding a speed that you your motor is not tuned properly. Is your
can see. The BDS5 can command speeds as motor overshooting or ringing? Retuning
low as .0004 RPM or about one revolution the motor should correct the problem.
every three days, depending on how you
program velocity units. If you have changed ...if it happens when the motor is rotating very slowly
VNUM or VDEN from the factory setting, so that you are sure that the speed is not near
temporarily restore them to see if the VOSPD, your resolver or R/D converter
problem goes away. may have failed. This is simple to confirm.
Disable the BDS5 and write a program that
If the motor moves and you get "PE OVERFLOW" continuously prints PRD. Rotate the motor
error (ERROR 25)... slowly by hand and observe PRD to see if it
skips several counts (do not be concerned if
...if the error occurs occasionally, it may be because PRD skips a few counts--look for skips of 50
you have the limit (PEMAX) set too low. counts or more). If PRD skips more than 50
Raise it by 20% and see if the problem is counts when the motor is rotating slowly,
corrected. contact the factory.
...use the BDS5 RECORD function to record ICMD If the system works differently on power-up than it
when a PE overflow occurs. If ICMD is does after your program starts running, remember that
saturating (that is, equal to ILIM for more many switches are reset on power-up. Your program
than a few milliseconds), you are may set a switch that is cleared, or clear one that is set
commanding motion that your motor cannot during the initial cycle. After that, the program may
perform. See hints on motor loading, ILIM, operate differently. You may also be setting or
ACC, DEC, and PEMAX below. If the clearing switches in your power-up routine that may
overflow occurs at high speeds and with low have the same effect.
ICMD (below ILIM), see the hint about
speed problem.
5.7 ERROR LOG
...make sure that the load does not exceed the
capability of the motor.
The BDS5 responds to a variety of conditions, both
internal and external, hardware and software, which
...make sure that ILIM is set high enough.
are grouped in a single broad category: errors. An
error indicates that there is a problem somewhere.
...if you get the error during acceleration or
More serious errors are grouped as faults.
deceleration, make sure ACC and DEC are
not set too high. If they are too high, the
commanded profile will exceed the
capability of the motor.
5-7
CHAPTER 5 - DEBUGGING BDS5
5.7.1 Error Levels since PROP is a switch and cannot be set to 2. If the
error comes from the program, the line number of the
The BDS5's response to an error depends on the offending entry is also printed. Use the Editor to
error's severity. There are four levels of severity, enter these lines at the top of the user program:
listed below in increasing order:
Table 5.3. Error Severity Levels and 11$
Actions PROP 2
B
1. Errors which cause warnings.
2. Errors which cause a program break and stop Exit the Editor and type:
motion, in addition to Level 1 Actions.
RUN 11
3. Errors which disable the system and set the
FAULT LED, in addition to Level 2 Actions.
and the response should be:
4. Errors which disable almost all BDS5
functions (including communications) and ERR 83 LINE 2 '2' ;BAD OR OUT OF
flash the CPU LED to indicate the error ;RANGE
number. These are called firmware errors.
This message shows that the error occurred on line 2.
When any error except a firmware error occurs, a You can enter the Editor and type:
message is displayed on the screen. The following
items are printed: the error number, the offending P 2
entry, and an abbreviated error message. For
example, disable the drive and type in a jog:
and the line:
DIS
PROP 2
J 100
will be displayed.
The BDS5 will respond with:
5-8
BDS5 CHAPTER 5 - DEBUGGING
Error History remains intact even through power- You may display messages for errors from 1 through
down. 999. If you type in an error number that the BDS5
does not recognize, it will respond with:
5-9
BDS5 CHAPTER 6 - COMPENSATION
CHAPTER 6
COMPENSATION
6-1
CHAPTER 6 - COMPENSATION BDS5
6-2
BDS5 CHAPTER 6 - COMPENSATION
6-3
CHAPTER 6 - COMPENSATION BDS5
The tune command does not always provide an You need to make several decisions: Is the unit
acceptable tuning. If not, you can tune the BDS5 underdamped? Is the system response too fast? Is
yourself. the system ringing? Is there a resonance present?
6.5 TUNING THE BDS5 YOURSELF Then, take the action listed on Drawing A-84888 in
the the Installation and Setup Manual.
If you use the TUNE command, and the resulting
There is a close relationship between the response of
tuning variables cause the system to oscillate, there
the system and the variable KVI. Response is often
are generally two reasons:
measured by the system bandwidth. Bandwidth is the
frequency with which the system response falls to
1. The bandwidth in the TUNE command is set
70% of the nominal response. For example, if your
too high for the system to function properly.
velocity command was a sine wave with peaks of
±100 RPM, the bandwidth would be the frequency
2. The low-pass filter is set too low (this only
that the response fell to a sine wave with peaks of
applies if LPF is on).
±70 RPM. The relationship between velocity loop
bandwidth and KVI is shown in Table 6.3.
6-4
BDS5 CHAPTER 6 - COMPENSATION
The motor should again begin turning. Now adjust RECORD <Number> <Time> <1 to 4 Variables>
KP until the motor is performing appropriately.
Table 6.4 shows the relationship between a properly
6-5
CHAPTER 6 - COMPENSATION BDS5
Records the velocity response of the BDS5 to a JOG • The system overshoots, sometimes excessively,
command. but does not ring or oscillate.
After data is recorded, you can use the PLAY • Reducing ACC and DEC eliminates the
command to print each point on the screen. However, problem.
Motion Link provides all the routines to retrieve, plot,
print, and store recorded data on your computer and • Turning off PL eliminates the problem.
line printer.
• The motor current is near or at saturation
The RECORD command is useful when tuning a during a large part of the move. Use the BDS5
system because you can display the BDS5 response to RECORD function to record ICMD. If ICMD
commands without an oscilloscope. However, it is is equal to ILIM for more than a few
not limited to tuning. For example, you can record milliseconds, then your system is saturated.
VCMD to plot a motion profile, or you can plot
VEXT to watch the external encoder/analog input. Overloading the motor can be corrected by the
You can also plot user variables to watch the following actions:
performance of your program.
6.7 PROBLEMS • Reducing ACC and DEC.
Some times there are problems tuning. Usually the • Reducing the load on the motor.
TUNE command will provide you with a tuning that
is either acceptable or close to acceptable. If not, you • Increasing ILIM (if it is less than IMAX).
can tune the system yourself. Sometimes there are
physical factors that prevent you from attaining the • Using a BDS5 with a higher current rating.
performance you need. These problems fall into four
categories: • Using a motor with more peak stall torque.
6-6
BDS5 CHAPTER 6 - COMPENSATION
6.7.3 Non-Linear Mechanics When your system has a resonance, it will have the
following characteristics:
BDS5 tuning is based on linear control theory. The
most important requirement of a linear motor • The system will make a clear, high pitch
controller is that the total reflected inertia should not (>500 Hz). Do not confuse this problem with
change substantially during operation. Load inertia compliance, which has a low pitch.
includes all the inertia reflected to the motor, such as
inertia through gearboxes and leadscrews. Inertia can If the system performance is poor because of
change in ways that are easy to understand, such as changing inertia, you can make the following
the inertia of a spool of cable decreasing when the corrections:
cable is unrolled. It can also change in less intuitive • Enable the low-pass filter (LPF) and reduce
ways, such as chain drives (which have load in one LPFHZ, if necessary.
direction but are unloaded in the other) and systems
with excessive backlash (where there is no load when • Reduce the bandwidth of the system.
gear teeth are not touching).
• Shorten the length and increase the diameter of
When the inertia changes, the system has the shafts and lead screws.
following characteristics:
6-7
CHAPTER 6 - COMPENSATION BDS5
6-8
BDS5 APPENDIX A - WARRANTY INFORMATION
APPENDIX A
WARRANTY INFORMATION
Industrial Drives, a Kollmorgen Division, warrants The terms and conditions of this Warranty are
that equipment, delivered by it to the Purchaser, will provided with the product at the time of shipping or
be of the kind and quality described in the sales in advance upon request.
agreement and/or catalog and that the equipment will
be free of defects in design, workmanship, and The items described in this manual are offered for
material. sale at prices to be established by Industrial Drives
and its authorized dealers.
A-1
BDS5 APPENDIX B- ASCII TABLE
APPENDIX B
ASCII TABLE
B-1
APPENDIX B - ASCII TABLE BDS5
B-2
BDS5 APPENDIX B- ASCII TABLE
B-3
BDS5 APPENDIX C - SOFTWARE COMMANDS
APPENDIX C
SOFTWARE COMMANDS
<Label>$ One or two digits followed by a dollar sign. When using GOSUB or GOTO, a user
variable can be used as <Label> if its value is between 0 and 99.
<Time> Specifies time in milliseconds. Must be between 0 and 2,147,483,647 (about 25 days).
<Logical> One of the following: GT, GE, LT, LE, EQ or NE for greater-than, greater-than-or-
equal-to, less-than, less-than-or-equal-to, equal-to, or not-equal-to, respectively.
<Expr> Any valid math expression. Valid math expressions include user variables, indirect
references to user variables, constants, algebraic and logical math operators,
parentheses.
X1*X2*X3
(X2-VFB)/VOFF
X1&07FH
PFB-PCMD
TMR1/100
(X1+X2)*(X1+(X2-X3))
<Position> Any valid expression for position. The result is assumed to be in position units. The
range is +/-2,147,483,647 counts. If your system has position units, then the limits are
the position unit equivalent of +/-2,147,483,647.
<Velocity> Any valid expression for velocity. The result is assumed to be in velocity units.
C-1
APPENDIX C - SOFTWARE COMMANDS BDS5
<Traverse> Any valid expression for velocity. The result is assumed to be in velocity units.
Traverse is used in macro-moves as the middle speed of three speed moves.
<End> Any valid expression for velocity. The result is assumed to be in velocity units. End is
used in macro moves as the end speed of two and three speed moves.
<Text> <Text> is any text string of characters. The control character symbol(^) converts the
succeeding character to a control character.
Constants-ON, ON and Y are equivalent to 1. OFF and N are equivalent to 0. The constants can be
OFF, Y, and N used in any expression and in response to the Input command.
C-2
APPENDIX C - SOFTWARE COMMANDS BDS5
C.2 COMMANDS
The following commands are the instructions used to program the BDS5.
; Comment. Comments can follow any instruction. Also, entire lines can be comments.
The semicolon must be preceded by a space unless it is the first character in a line.
Allowed on any line including the BDS5 Editor.
$ Labels. Labels can be 0-500 and cannot be repeated. They must be decimal constants.
They are allowed only from the user program. The following labels are special
purpose labels:
A$ A alarm label
B$ B alarm label
C$ C alarm label
VARIABLE$ variable input label
POWER-UP$ power-up label
AUTO$ AUTO label
MANUAL$ MANUAL label
ERROR$ error handler label.
BACKGROUND$ background label.
Alarm labels require that you specify the switch that starts the alarm and the state of the
switch (ON or OFF) that should trigger the alarm. If the switch is in the specified state
when execution is enabled, the alarm will be fired. Otherwise, the alarm is edge
sensitive. Specifying ON is actually specifying the positive edge.
Format: <Label>$
<Alarm Label>$ <Switch> <On/Off>
Example:
55$
BACKGROUND$
A$ I1 ON
C-3
BDS5 APPENDIX C - SOFTWARE COMMANDS
? Quick If. Conditionally executes one instruction if the condition is true, and another
instruction if the condition is false. Allowed from the interactive and monitor modes,
and the user program.
Example:
B Break program execution. Allowed from the user program or the monitor mode.
Format: B
CONTINUE Continue motion at the present speed. Turn REG and GEAR off. Optionally, you can
specify the number of milliseconds, up to 1 second, that you want the present speed
averaged over. If this time is not specified, the speed is averaged over 1 millisecond.
Format: CONTINUE
CONTINUE <time>
Example:
DUMP Display all the variables and the user program on the terminal, or display the version.
Allowed from interactive. Drive must be disabled.
C-4
APPENDIX C - SOFTWARE COMMANDS BDS5
Format: D <Time>
Example:
DIS Disable the BDS5. This command turns off the variable READY. Refer to Drawing
C-84732 for more information. Allowed from interactive mode, monitor mode, and
user program.
Format: DIS
Format: ED
Editor Commands:
ELIF Part of block if. Conditionally begins block execution. Allowed from the user
program. (See the IF command).
Example:
C-5
BDS5 APPENDIX C - SOFTWARE COMMANDS
ELSE Part of block if. Begins last block execution. Allowed from the user program. (See
the IF command).
Format: ELSE
EN Enable the BDS5 This command turns on the variable READY. Refer to Drawing C-
84732 for more information. Allowed from interactive mode, monitor mode, and user
program.
Format: EN
END End a task. If you are using multi-tasking, END ends that task. If there are no special
labels present in the program (except POWER-UP$), then END is equivalent to Break
(B). If there are special labels, the BDS5 becomes inactive waiting for a task to
resume execution.
Format: END
ENDIF Part of block if. Ends block if. Allowed from the user program. (See the IF
command).
Format: ENDIF
ERR Display an error message, display the error history, or clear the error history. Allowed
from interactive and monitor modes and user program.
Where <Error Number> is a valid error number and <Option> can be HIST or CLR.
Example:
Example:
GOSUB 25
GOSUB X3
C-6
APPENDIX C - SOFTWARE COMMANDS BDS5
Example:
GOTO 25
GOTO X5
H Delay (Hold-up) execution of a task until a switch is in the specified state. You can
use any switch except REMOTE and XS11-XS50 (XS1-XS10 are allowed.) H is an
idling command; if you are using multi-tasking, H suspends the task but lets other tasks
proceed. Allowed only from the user program.
Example:
H XS1 ON
H I1 OFF
Example:
IF PFB GT 100
... ;FOLLOW WITH ELSE, ETC
IF X1*X2 NE X4/(X5+5)
... ;FOLLOW WITH ELSE, ETC
C-7
BDS5 APPENDIX C - SOFTWARE COMMANDS
INPUT Prompt the operator for an input variable. If limits are specified, then make sure
operator stays within them. If they are not specified, then use the limits of the variable
being prompted for. W is an idling command (that is, if you are using multi-tasking,
INPUT suspends the task until the operator presses the enter key, but lets other tasks
proceed). Allowed only from the user program.
Where <Variable> is any valid, programmable variable. You can optionally specify
maximum and minimum limits (if you include one, you must include the other). {Min}
is the minimum input allowed and {Max} is the maximum input allowed.
If you specify decimal, the input received from the operator will be multiplied by
10^{decimal}. The BDS5 does not use floating point math internally. The input
command allows you to receive floating point input from the operator.
Example:
In the first example, if the operator entered 1.234, the BDS5 would store 1234.0 in X1;
that is, 1.234 is multiplied by 10^3 = 1000. Note that if you specify {decimal}, {Max}
and {Min} limit the value after the multiplication. In the above example, {Max} = -
5000 limits the operator to -5.000.
J Jog at a continuous speed. Allowed from the interactive mode and the user program.
Format: J <Velocity>
Example:
J 1000
J X1
JF Jog, but wait until the Position command (PCMD) crosses the specified position before
beginning accel/decel. Speed must not be zero when executing this instruction.
Allowed from the interactive mode and the user program.
Example:
JF 10000 10
JF 100*X1 4000
C-8
APPENDIX C - SOFTWARE COMMANDS BDS5
JT Jog at a continuous speed, but delay beginning accel/decel so that the Position
command will equal the specified position when the accel/decel is complete. Allowed
from the interactive mode and the user program.
Example:
JT -610000 100
JT 100*X45 -800
K Disable the drive and break the program. Allowed from interactive and monitor modes
and the user program. See Drawing C-84732 for more information.
Format: K
MA Move to the specified position at the specified speed. If the speed is not specified, it is
assumed to be VDEFAULT. Allowed from the interactive mode and the user program.
Example:
MCA Define an absolute macro-move section to the specified position at the specified
traverse and ending speeds. See Chapter 5 for descriptions of defaults. Allowed from
the interactive mode and the user program.
Example:
C-9
BDS5 APPENDIX C - SOFTWARE COMMANDS
MCD Define a macro-move dwell section for the specified time. This is only valid when the
previous macro-move section ended at zero speed. When used with the profile
regulation mode, time is inversely proportional to external input frequency. Allowed
from the interactive mode and the user program.
Example:
MCGO Execute a macro move. This is only valid when the last macro-move section ended at
zero speed. Allowed from the interactive mode and the user program.
Format: MCGO
MCI Define an incremental macro-move section for the specified distance at the specified
traverse and ending speed. See Chapter 5 for descriptions of defaults. Allowed from
the interactive mode and the user program.
Example:
MI Incrementally move the specified distance at the specified speed. If the speed is not
specified, it is assumed to be VDEFAULT. Allowed from the interactive mode and the
user program.
Example:
MOTOR Display the present motor drive combination. This command is used to determine the
motor for which your BDS5 was configured when it was shipped. This command is
not normally used by the customer.
Format: MOTOR
C-10
APPENDIX C - SOFTWARE COMMANDS BDS5
MRD Make an absolute move so that the output of the Resolver-to-Digital converter output
(PRD) will equal the specified value. A direction option indicates whether the motion
should be clockwise (CW), counter-clockwise (CCW), or whichever way is shortest
(no option specified). Allowed from the interactive mode and the user program.
Where R/D-Position is greater than 0 and less than the resolution of the Resolver-to-
Digital (R/D) converter. For the standard 12-bit resolution R/D converter, the upper
limit is 4095. Option is either CCW or CW.
Example:
NORM Normalize the Position command and position feedback to the specified position.
Allowed from the interactive mode and the user program when there is no commanded
motion.
Example:
NORM 1000
C-11
BDS5 APPENDIX C - SOFTWARE COMMANDS
P Print the variables specified with optional formats on a new line. Allowed from the
interactive and monitor modes and the user program.
Where {format} is the print format specifying field width and Hex output. The ellipsis
(...) indicates that the P can be followed by up to 15 different expressions and text
strings.
PS Print with status. This is identical to the P command, except status of the BDS5 is
displayed on the end of the printed line. See P for format and examples. Allowed
from the interactive and monitor modes and the user program.
PLAY Playback recorded points. This command prints all the variables that were recorded by
the last RECORD command. Normally, you should use Motion Link’s
PLAYBACK,FROM BDS5 command rather than the BDS5 PLAY command. Motion
Link formats, plots, and prints data in a much more readable form than does the BDS5.
R Refresh screen. This command is the same as the P command except that no line feed
is printed. This command can be used to overprint, the practice of refreshing the
display by printing a line with new values over the same line with old values. It is
generally used for status updating. See P for examples and formats. Allowed from the
interactive and monitor modes and the user program.
C-12
APPENDIX C - SOFTWARE COMMANDS BDS5
RD Delay program execution for a specified period of time, but use the external clock to
time the delay. REG need not be on for RD to function properly. Allowed only from
the user program.
Format: RD <Time>
Example:
RD 1000
RECORD Record 1-4 variables for a specified period of time. This command allows you to
record most BDS5 variables in real time for later playback. You cannot record PE,
REMOTE, TMR1, TMR2, TMR3, TMR4, VAVG, VXAVG, or any user switches.
Allowed from the user program or from the interactive mode.
RET Return from a subroutine. Allowed only from the user program.
Format: RET
RS Refresh screen with status. This command is identical to the R command, except status
of the drive is displayed at the end of the printed line. See P for format and examples.
Allowed from the interactive and monitor modes and the user program.
C-13
BDS5 APPENDIX C - SOFTWARE COMMANDS
RUN Run a program starting at the specified label. Allowed from the interactive mode. If
no label is specified, run multi-tasking.
Example:
RUN 4
RUN X1
RUN
S Stop motion using a deceleration of AMAX. Allowed from the interactive and monitor
modes and the user program.
Format: S
Example:
TUNE Tune the motor to a new load. This command is used if the motor needs to be re-tuned.
The tuning parameters (KP, KV, KVI, and KPROP) determine the motor stability and
response time. Often when the motor load is changed, tuning parameters need to be
reset. The Tune command specifies Bandwidth and Stability. Higher bandwidth will
produce faster response time. Higher stability will produce less overshoot, but noisier
performance. Allowed from the interactive mode and the user program.
Example:
TUNE 25 2
C-14
APPENDIX C - SOFTWARE COMMANDS BDS5
W Wait for a specified motion profile segment to start before continuing program
execution. W is an idling command (that is, if you are using multi-tasking, W suspends
the task but lets other tasks proceed). Allowed only from the user program.
Format: W <Segment>
Examples:
ZPE Clear the position error. This command is useful when enabling the position loop
when position error has been allowed to accumulate. Allowed from the interactive and
monitor modes and the user program.
<BDS Send (download) a program from the BDS5 Program Memory to the terminal.
Allowed from the interactive mode and the user program.
Format: <BDS
>BDS Receive (upload) a program from the terminal and store it in BDS5 program memory.
This command destroys the old program memory. A password may be specified. If
the editor password has been set and the password is incorrect or not specified, then an
error will result and the original program memory will remain. Allowed from the
interactive mode and the user program.
Example:
C-15
BDS5 APPENDIX D - ERROR CODES
APPENDIX D
ERROR CODES
D.1 INTRODUCTION
The BDS5's response to an error depends on the error's severity. There are four levels of severity, listed below in
increasing order:
See Chapter 5 for more information about error severity. The following is a complete list of errors generated by the
BDS5.
D-1
APPENDIX D - ERROR CODES BDS5
D-2
BDS5 APPENDIX D - ERROR CODES
PLIM OFF
D-3
APPENDIX D - ERROR CODES BDS5
P LIMIT
D-4
BDS5 APPENDIX D - ERROR CODES
You entered a motion command that calculated a motion profile where either
the acceleration or deceleration segment was more than 30 seconds long. You
must increase ACC or DEC or reduce the speed change of the move. This
error breaks program execution.
D-5
APPENDIX D - ERROR CODES BDS5
You attempted to insert an MCA segment after an MCI segment. This error
breaks program execution.
D-6
BDS5 APPENDIX D - ERROR CODES
You attempted to execute an instruction from the error recovery (the user’s
error handler or “ERROR$”) that is not allowed. This includes attempting to
enable the BDS5, GOSUB, and GOTO. This error breaks execution.
ROTARY OFF
to turn the rotary mode off. This error breaks execution if the instruction was
issued from the program.
MA 2000
Use incremental moves (MI and MCI) if you want to move beyond the rotary
limit. This error breaks execution if the instruction was issued from the
program.
D-7
APPENDIX D - ERROR CODES BDS5
You attempted to turn on the rotary mode when PFB was less than zero or
greater than PROTARY. Use the NORM command to normalize the position
to between 0 and PROTARY. This error breaks execution if the instruction
was issued from the program.
D-8
BDS5 APPENDIX D - ERROR CODES
In this case, the decimal point (following the “[”) is incorrect. Pay careful
attention to the rules for formats in Chapter 4. This error breaks program
execution if the instruction is issued from the user program.
D-9
APPENDIX D - ERROR CODES BDS5
You attempted an indirect reference to a user variable that does not exist.
For example:
X1 10000
P X(X1)
X(X1) refers to user variable X10000, which does not exist. The “P X(X1)”
will generate this error. This error breaks program execution if the instruction
is issued from the user program.
P”BAD COMMAND”
has an embedded quote after the “P”. This error breaks program execution if
the instruction is issued from the user program.
This line causes Error 89 since REMOTE is not allowed to fire an alarm.
D-10
BDS5 APPENDIX D - ERROR CODES
You specified too many points in a RECORD command. Only 1000 points
total can be recorded. For example, if you are recording four variables, they
can be recorded no more than 250 times, since 4*250 = 1000.
D-11
APPENDIX D - ERROR CODES BDS5
The variable BAUD contains a value that is not supported by the BDS5. This
error occurs during the autobaud sequence and so is never printed to the
terminal. You will only see it in the error history buffer. This error has no
action.
D-12
BDS5 APPENDIX D - ERROR CODES
An ELSE, ELIF, or ENDIF was encountered when there was no IF. This will
occur, among other times, if you use a GOTO to branch to the middle of an
IF/ELIF/ELSE/ENDIF block. This error breaks program execution.
D-13
APPENDIX D - ERROR CODES BDS5
The BDS5 variable AMPS is invalid. Contact the factory. This error breaks
program execution.
D-14
BDS5 APPENDIX E - VARIABLE QUICK REFERENCE
APPENDIX E
VARIABLE QUICK REFERENCE
E.1 INTRODUCTION
This appendix lists all the variables on the BDS5. All variables are shown with the required programming
conditions. For example, ABAUD has the programming condition "ALWAYS". This means ABAUD can be
changed at any time. Other variables require the BDS5 to be enabled or disabled. Others, such as feedback
variables, are never programmable. "FACTORY" variables can only be changed at the factory. Factory variables
program the BDS5 for the particular motor it will be controlling. The MOTOR command changes these variables as
necessary for the motor.
E-1
APPENDIX E - VARIABLE QUICK REFERENCE BDS5
E-2
BDS5 APPENDIX E - VARIABLE QUICK REFERENCE
E-3
APPENDIX E - VARIABLE QUICK REFERENCE BDS5
E-4
BDS5 APPENDIX E - VARIABLE QUICK REFERENCE
E-5
APPENDIX E - VARIABLE QUICK REFERENCE BDS5
A1-A16 Internal
ADVSLIP Internal
ADVSPD Internal
ADVLD Internal
ANGLD Internal Factory none
BSLIP Inductn Base Slip Factory mHz
FOLDD Foldback Delay Factory sec/100
FOLDR Foldback Reset Factory sec/100
FOLDT Foldback Const Factory sec/100
IBASE Inductn Base Amps Factory I
IMAG Induc Mag Current Factory I
IND Select Induction Factory None
IZERO Zeroing Current Factory I
MADV Enable Manual Adv Factory None
MANG Internal
MSLIP Manual Slip Factory None
POLES Motor Poles Factory Poles*128
SGOOSE Induction Angle Factory None
SLIP Induction Slip Never None
SLOPE Inductn Slip Slope Factory 1/10%
VADVTBL Angle Table Max Factory VEL
VBASE Inductn Base Speed Factory VEL
E-6
BDS5 APPENDIX F - COMMAND TIMINGS
APPENDIX F
COMMAND TIMINGS
This appendix gives approximate timings of representative commands. Command times are difficult to predict
because they depend on many factors, including whether the BDS5 is enabled, whether profile motion has been
commanded, whether electronic gearbox or profile regulation have been enabled and so on. The times listed here are
based on these conditions:
4. No profiles are being calculated. That is, the BDS5 is enabled, but not in motion.
Acceleration profiles increase the execution time by 40%-50%. If the GEAR mode is enabled, increase execution
time by 10% to 20%. Profile regulation increases execution time by as much as 20%. As you can see, if either gear
or profile regulation is enabled, and the BDS5 is executing the acceleration or deceleration portion of a motion
profile, then the times can be 60% greater than those shown here. These commands are not meant to represent the
worst case, but are only provided as an estimate of the execution times1.
1These times are based on tests run at Industrial Drives Electronic Lab. Reference Test 67 of May 21, 1990.
F-1
BDS5 APPENDIX F - COMMAND TIMINGS
O1 ON ;1.9 MSEC
O1 OFF ;1.9 MSEC
OUT=OUT!0C8H ;2.8 MSEC
P X1 ;3.5 MSEC
P X1[8] ;3.5 MSEC
P "X1=" X1 ;3.8 MSEC
? 1 EQ 1 O1 ON ;4.0 MSEC
F-2
BDS5 GLOSSARY
GLOSSARY
A device which creates mechanical motion by
Absolute Position converting various forms of energy to mechanical
energy.
Position referenced to a fixed zero position.
Adaptive Control
Absolute Positioning
A technique to allow the control to automatically
Refers to a motion control system employing position
compensate for changes in system parameters such as
feedback devices (absolute encoders) to maintain a
load variations.
given mechanical location.
Ambient Temperature
Absolute Programming
The temperature of the cooling medium, usually air,
A positioning coordinate reference wherein all
immediately surrounding the motor or another device.
positions are specified relative to some reference, or
"home" position. This is different from incremental
programming, where distances are specified relative
Amplifier
to the current position.
Electronics which convert low level command signals
to high power voltages and currents to operate a
AC Adjustable-Speed Drive servomotor.
All equipment required to adjust the speed or torque
of AC electric motor(s) by controlling both frequency
ASCII
and voltage applied to the motor(s).
(American Standard Code for Information
Interchange) This code assigns a number to each
AC Servo Drive numeral letter of the alphabet. In this manner,
information can be transmitted between machines as a
A servo drive used to control either or both
series of binary numbers.
synchronous or induction AC motors.
Back EMF
Acceleration
The voltage generated when a permanent magnet
The change in velocity as a function of time.
motor is rotated. This voltage is proportional to
Acceleration usually refers to increasing velocity and
motor speed and is present regardless of whether the
deceleration describes decreasing velocity.
motor winding(s) are energized or un-energized.
Accuracy
Bandwidth
A measure of the difference between expected
The frequency range in which the magnitude of the
position and actual position of a motor or mechanical
system gain expressed in dB is greater than -3 dB.
system. Motor accuracy is usually specified as an
angle representing the maximum deviation from
Baud Rate
expected position.
The number of binary bits transmitted per second on
Actuator a serial communications link (such as RS-232).
Glossary-i
GLOSSARY BDS5
information.
Cogging
A term used to describe non-uniform angular
velocity. Cogging appears as a jerkiness especially at
low speeds.
Byte
Command Position
A group of 8 bits treated as a whole with 256
possible combinations of ones and zeros, each The desired angular or linear position of an actuator.
combination representing a unique piece of
Glossary-ii
BDS5 GLOSSARY
Compliance
Commutator
The amount of displacement per unit of applied force.
A mechanical cylinder consisting of alternating
segments of conductive and insulating material. This
cylinder used in DC motors passes currents from the Computer Numerical Control
brushes into the rotor windings and performs motor
A computer-based motion control device
commutation as the motor rotates.
programmable in a numerical word address format.
A computer numerical control (CNC) product
typically includes a CPU section, operator interface
Compensation
devices, input/output signal and data devices,
The corrective or control action in a feedback loop software and related peripheral apparatus.
system which is used to improve system performance
characteristics such as accuracy and response time.
Control Systems or Automatic Control
Systems
Compensation, Feedforward
An engineering or scientific field that deals with
A control action which depends on the command only controlling or determining the performance of
and not the error to improve system response time. dynamic systems such as servo systems.
Daisy Chain
Compensation, Lead Lag
Glossary-iii
GLOSSARY BDS5
A term used to describe the linking of several The maximum torque that can be applied to an un-
RS232C devices in sequence such that a single data energized stepping motor without causing continuous
stream flows through one device and on to the next. rotating motion.
Daisy-chained devices usually are distinguished by
device addresses which serve to indicate the desired
destination for data in the stream. Dielectric Test
A high voltage breakdown test of insulation's ability
to withstand an AC voltage. Test criterion limits the
Damping
leakage current to a specified magnitude and
An indication of the rate of decay of a signal to its frequency, applied between the specified test points.
steady state value. Related to setting time.
Differential
Damping Ratio
An electrical input or output signal which uses two
Ratio of actual damping to critical damping. Less lines of opposite polarity referenced to the local
than one is an underdamped system and greater than signal ground.
one is an overdamped system.
Distributed Processing
DC Adjustable-Speed Drive
A technique to gain increased performance and
All equipment required to adjust the speed or torque modularity in control systems utilizing multiple
of DC motor(s) by controlling the voltages applied to computers or processors.
the armature and/or field of the motors.
Detent Torque
Glossary-iv
BDS5 GLOSSARY
Drive, Servo
Encoder
A motor drive which utilizes internal feedback loops
for accurate control of motor current and/or velocity. A type of feedback device which converts mechanical
motion into electrical signals to indicate actuator
position. Typical encoders are designed with a
Drive, Stepper printed disc and a light source. As the disc turns with
the actuator shaft, the light source shines through the
Electronics which convert step and direction inputs to
printed pattern onto a sensor. The light transmission
high power currents and voltages to drive a stepping
is interrupted by the patterns on the disc. These
motor. The stepping motor driver is analogous to the
interruptions are sensed and converted to electrical
servo motor amplifier.
pulses. By counting these pulses, actuator shaft
position is determined.
Duty Cycle
For a repetitive cycle, the ratio of an on time to total Encoder, Absolute
cycle time.
A digital position transducer in which the output is
representative of the absolute position of the input
Duty Cycle =
(On Time) ×100% shaft within one (or more) revolutions. Output is
(On Time + Off Time) usually a parallel digital word.
Encoder, Incremental
A position encoding device in which the output
represents incremental changes in position.
Dynamic Braking
A passive technique for stopping a permanent magnet
brush or brushless motor. The motor windings are Encoder, Linear
shorted together through a resistor which results in A digital position transducer which directly measures
motor braking with an exponential decrease in speed. linear position.
Glossary-v
GLOSSARY BDS5
Fall Time
Four Quadrant
The time for the amplitude of system response to
decay to 37% of its steady-state value after the Refers to a motion system which can operate in all
removal of a steady-state step input signal. four quadrants i.e. velocity in either direction and
torque in either direction. This means that the motor
can accelerate, run, and decelerate in either direction.
Feed Forward
A technique used to pre-compensate control a loop
Friction
for known errors due to motor, drive, or lead
characteristics. Provides improved response. A resistance to motion caused by surfaces rubbing
together. Friction can be constant with varying speed
(coulomb friction) or proportional to speed (viscous
Feedback friction) or present at rest (static friction).
A signal which is transferred from the output back to
the input for use in a closed loop system.
Full Load Current
The armature current of a motor operated at its full
load torque and speed with rated voltage applied.
Glossary-vi
BDS5 GLOSSARY
Home Position
Idle Current Reduction
A reference position for all absolute positioning
A stepping motor driver feature that reduces the
movements. Usually defined by a home limit switch
phase current to the motor when no motor motion
and/or encoder marker. Normally set at power up and
(idle) is commanded for a specified period of time.
retained for as long as the control system is
This reduces motor heating and allows high machine
operational.
throughput to be obtained from a given motor.
Host Computer
Incremental Motion
An auxiliary computer system which is connected to a
A motion control term that is used to describe a
controller or controllers. The host computer in
device that produces one step of motion for each step
distributed control systems is frequently involved
command (usually a pulse) received.
with controlling many remote and distributed motion
control devices. It may also be used for off-line tasks
such as program preparation, storage, and supervisory
Indexer
control and evaluation.
Electronics which convert high level motion
commands from a host computer, programmable
HP: Horsepower controller, or operator panel into step direction pulse
streams for use by the stepping motor driver.
One horsepower is equal to 746 watts. Since Power =
Torque x Speed, horsepower is a measure of a
motor's torque and speed capability (e.g. a 1 HP
motor will produce 35 lb.-in. at 1800 rpm).
Inertia
Hunting The property of an object to resist changes in velocity
unless acted upon by an outside force. Higher inertia
The oscillation of the system response about a
objects require larger torques to accelerate and
theoretical steady-state value.
decelerate. Inertia is dependent upon the mass and
shape of the object.
Hybrid Stepping Motor
A motor designed to move in discrete increments or Inertial Match
steps. The motor has a permanent magnet rotor and
An inertial match between motor and load is obtained
wound stator. These motors are brushless and phase
by selecting the coupling ratio such that the load
currents are commutated as a function of time to
moment of inertia referred to the motor shaft is equal
produce motion.
to the motor moment of inertia.
Glossary-vii
GLOSSARY BDS5
Limits
Properly designed motion control systems have
Loop, Velocity
sensors called limits that alert the control electronics
that the physical end of travel is being approached A feedback control loop in which the controlled
and that motion should stop. parameter is mechanical velocity.
Linearity
Mechanical Time Constant
Glossary-viii
BDS5 GLOSSARY
Motor, Stepping
Motor, AC
A specialized AC motor that allows discrete
A device that converts electrical alternating current
positioning without feedback. Normally used for
into mechanical energy. Requires no commutation
non-critical, low power applications, since positional
devices such as brushes. Normally operated off
information is easily lost if acceleration or velocity
commercial AC power. Can be single- or multiple-
limits are exceeded. Load variations can also cause
phase.
loss of position. If encoders are used, these
limitations can be overcome.
No Load Speed
Motor Constant
Motor speed with no external load.
The ratio of the motor torque to motor input power.
Glossary-ix
GLOSSARY BDS5
Open-Loop System
PLC
A system where the command signal results in
actuator movement but, because the movement is not Programmable Logic Controller. An industrial
sensed, there is no way to correct for error. Open control device that turns on and off outputs based
loop means no feedback. upon responses to inputs.
Position Error
Phase-Locked Servo System
The difference between the present actuator
A hybrid control system in which the output of an (feedback) value and the desired position command
optical tachometer is compared to a reference square for a position loop.
wave signal to generate a system error signal
proportional to both shaft velocity and position
errors. Position Feedback
Present actuator position as measured by a position
transducer.
Phase Margin
Glossary-x
BDS5 GLOSSARY
Rated Torque
Process Control
The torque producing capacity of a motor at a given
A term used to describe the control of machine or
speed. This is the maximum continuous torque the
manufacturing processes, especially in continuous
motor can deliver to a load and is usually specified
production environments.
with a torque/speed curve.
Pull-In Torque
Regeneration
The maximum torque at which an energized stepping
The action during motor braking, in which the motor
motor or synchronous motor will start and run in
acts as a generator and takes kinetic energy from the
synchronism.
load, converts it to electrical energy, and returns it to
the amplifier.
Pull-Out Torque
The maximum torque that can be applied to a Repeatability
stepping motor or synchronous motor running at
The degree to which the positioning accuracy for a
constant speed without causing a loss of synchronism.
given move performed repetitively can be duplicated.
Pulse Rate
Resolution
The frequency of the step pulses applied to a stepper
The smallest positioning increment that can be
motor driver. The pulse rate divided by the
achieved. Frequently defined as the number of steps
resolution of the motor/drive combination (in steps
or feedback units required for a motor's shaft to rotate
per revolution) yields the rotational speed in
one complete revolution.
revolutions per second.
Resolver
A position transducer utilizing magnetic coupling to
measure absolute shaft position over one revolution.
PWM
Resonance
Pulse Width Modulation. An acronym which
describes a switch-mode control technique used in The effect of a periodic driving force that causes
amplifiers and drivers to control motor voltage and large amplitude increases at a particular frequency.
current. This control technique is used in contrast to (Resonance frequency.)
linear control and offers the advantages of greatly
improved efficiency.
RFI
Radio Frequency Interference.
Quadrature
Refers to signal characteristics of interfaces to
positioning devices such as encoders or resolvers. Ringing
Specifically, that property of position
Oscillation of a system following sudden change in
state.
Ramping
Glossary-xi
GLOSSARY BDS5
Rise Time low level control signal into high voltage and current
levels top produce torque in the motor.
The time required for a signal to rise from 10% of its
final value to 90% of its final value.
Servo System
RMS Current An automatic feedback control system for mechanical
motion in which the controlled or output quantity is
Root mean square current. In an intermittent duty
position, velocity, or acceleration. Servo systems are
cycle application, the RMS current is equal to the
closed loop systems.
value of steady state current which would produce the
equivalent resistive heating over a long period of
time.
Settling Time
The time required for a step response of a system
RMS Torque parameter to stop oscillating or ringing and reach its
final value.
Root Mean Square Torque. For an intermittent duty
cycle application, the RMS torque is equal to the
steady state torque which would produce the same
Shunt Resistor
amount of motor heating over long periods of time.
A device located in a servoamplifier for controlling
regenerative energy generated when braking a motor.
Robot This device dissipates or "dumps" the kinetic energy
as heat.
A reprogrammable multifunctional manipulator
designed to move material, parts, tools, or specialized
devices through variable programmed motions for the
Single Point Ground
performance of a variety of tasks.
The common connection point for signal grounds in a
control wiring environment.
Robot Control
A computer-based motion control device to control
Slew
the servo-axis motion of a robot.
In motion control the portion of a move made at a
constant non-zero velocity.
Speed Regulation
Servo Amplifier/Servo Drive
For a speed control system, speed regulation is the
An electronic device which produces the winding variation in actual speed expressed as a percentage of
current for a servo motor. The amplifier converts a set speed.
Glossary-xii
BDS5 GLOSSARY
Torque
Stall Torque
The rotary equivalent to force. Equal to the product
The torque available from a motor at stall or zero
of the force perpendicular to the radius of motion and
rpm.
distance from the center of rotation to the point where
the force is applied.
Static Torque
The angle the shaft rotates upon receipt of a single Torque Constant
step command.
A number representing the relationship between
motor input current and motor output torque.
Typically expressed in units of torque/amp.
Stator
The non-rotating part of a magnetic structure. In a
motor the stator usually contains the mounting Torque Ripple
surface, bearings, and non-rotating windings or
The cyclical variation of generated torque given by
permanent magnets.
the product of motor angular velocity and number of
commutator segments.
Stiffness
The ability to resist movement induced by an applied Torque-to-Inertia Ratio
torque. It is often specified as a displacement curve,
Defined as a motor's torque divided by the inertia of
indicating the amount a motor shaft will rotate upon
its rotor, the higher the ratio the higher the
application of a known external force when stopped.
acceleration will be.
Transducer
Synchronism Any device that translates a physical parameter into
an electrical parameter. Tachometers and encoders
A motor rotating at a speed correctly corresponding
are examples of transducers.
to the applied step pulse frequency is said to be in
synchronism. Load torques in excess of the motor's
capacity (rated torque) will cause a loss of
Transfer Function
synchronism.
The ratio of the Laplace transforms of system output
signal and system input signal.
Tachometer
An electromagnetic feedback transducer which
Trapezoidal Profile
produces an analog voltage signal proportional to
rotational velocity. Tachometers can be either brush A motion profile in which the velocity vs. time profile
or brushless. resembles a trapezoid. Characterized by constant
acceleration, constant velocity, and constant
deceleration.
Tachsyn
Glossary-xiii
GLOSSARY BDS5
TTL Velocity
Transistor-Transistor Logic. The change in position as a function of time.
Velocity has both a magnitude and a direction.
Glossary-xiv
INDEX BDS5
INDEX
NOTE :
-A-
Basic Motion Commands................................... 3-18
A Simple Profile .............................................. F3-20 AMAX, ACC, & DEC .............................. 3-18
ACTIVE, Area 5 ................................................ 3-13 EN, STOP, & LIMITS.............................. 3-18
Alarms (Task Levels 1-3)................................... 4-26 Enabling Motion with MOTION .............. 3-19
Printing with Alarms ................................. 4-27 STOP (S) Command ................................. 3-19
Restrictions of Alarms............................... 4-27 STOP and BREAK with
Algebraic Functions ........................................... 3-10 Control X (^X).................................... 3-19
Allowed Tune Command Baud Rate, BAUD ............................................. 4-39
Stability Settings ....................................T6-4 BDS5 Conditions .............................................T4-11
AMAX, ACC, & DEC ....................................... 3-18 BDS5 Control Modes....................................... F3-40
Analog Input ...................................................... 3-32 BDS5 Enable/Fault Logic Diagram ................. F3-12
and PDEN ............................................... 4-37 BDS5 Instruction Screen.................................... F2-3
Application Flowchart.......................................... 4-3 BDS5 Master/Slaving ...................................... F3-34
Application Specification..................................... 4-3 BDS5 Model Number .......................................... 1-4
Auto Routine (AUTO$) ..................................... 4-29 BDS5 Model Number Scheme........................... F1-4
Auto/Manual Flowchart ................................... F4-31 BDS5 Model Number Scheme...........................T1-4
Autobauding....................................................... 4-38 BDS5 Prompts .................................................T2-10
Autobauding and MOTION ...................... 4-38 BDS5 Prompts .................................................T4-41
Baud Rate, BAUD .................................... 4-39 BDS5 Resident Editor.......................................... 4-7
Enabling Autobaud with ABAUD ............ 4-38 CHANGE (C) ............................................. 4-8
Setting the BDS5 to Autobaud.................. 4-38 DELETE (DEL).......................................... 4-9
Autobauding and MOTION ............................... 4-38 Editor Print (P)............................................ 4-7
Avoiding Idling.................................................. 4-26 FIND (F) ..................................................... 4-8
INSERT (I) ................................................. 4-8
NEW ........................................................... 4-9
-B- Next Line .................................................... 4-7
Password (PASS) ........................................ 4-7
Background (Task Level 6)................................ 4-30 Size ............................................................. 4-9
Restrictions of Background....................... 4-32 BDS5 Rules for Prompts..................................T2-10
Backing Up the Disk(s)........................................ 2-1 BDS5 State Table ............................................ F2-11
Basic Commands................................................ 4-10 Block-IF Restrictions and Options...................T4-14
BREAK (B) .............................................. 4-10 BREAK (B) ....................................................... 4-10
GOSUB and RET...................................... 4-11 Broadcast ........................................................... 4-41
GOTO ....................................................... 4-10 Building A Program........................................... 4-10
Labels........................................................ 4-10 Basic Commands........................................... 4-10
RUN.......................................................... 4-10 Conditional Commands................................. 4-11
-C-
Index-i
BDS5 INDEX
Index-ii
INDEX BDS5
Enabling the BDS5 ............................................ 3-16 Gating Motion with GATE .................................. 5-6
Enabling the Position Loop with PL .................. 3-16 Gear Ratio, GEARI & GEARO ......................... 3-32
Encoder Feedback.............................................. 3-37 Gearbox Example 1............................................ 3-32
Encoder Resolution..........................................T3-37 Gearbox Example 2............................................ 3-33
END Command.................................................. 4-23 Gearbox, ACC/DEC, and Jogs........................... 3-35
English Conversion (12-bit General Purpose Input/ Output .......................... 3-10
R/D Only) .................................................T4-35 Whole Word I/O ........................................... 3-10
Environmental Specifications ..........................T1-12 GOSUB and RET............................................... 4-11
ER-External Resistor Kit Model Number ............ 1-7 GOTO .............................................................. 2-8
Error Handler (ERROR$) .................................. 4-29 GOTO ............................................................ 4-10
Error History........................................................ 5-9
Error Levels ......................................................... 5-8
Error Log ............................................................. 5-8
-H-
DEP .............................................................. 5-8
Hardware Travel Limits ..................................... 3-19
Displaying Error Messages ............................. 5-9
Help .............................................................. 2-6
Error History................................................... 5-9
Help .............................................................. 2-8
Error Levels .................................................... 5-8
Hexadecimal ........................................................ 3-8
Firmware Errors .............................................. 5-9
Hints .............................................................. 5-6
Error Severity Levels and Actions .....................T5-8
HOLD (H).......................................................... 4-21
Establishing Communications.............................. 2-3
How to Disable Multitasking ...........................T4-25
Example Application............................................ 4-3
How to Enable Multi-Tasking..........................T4-25
External Inputs ................................................... 3-31
Analog Input ............................................. 3-32
External Regen Resistor Model -I-
Number Scheme............................................ F1-7
External Regen Resistor Model Idling ............................................................ 4-25
Number Scheme............................................T1-7 Avoiding Idling......................................... 4-26
External Units .................................................... 4-33 Post-Execution Idle................................... 4-26
External Units Conversion ...............................T4-36 Pre-Execution Idle .................................... 4-25
Idling Commands............................................... 4-21
-F- DWELL (D).................................................. 4-22
HOLD (H)..................................................... 4-21
WAIT (W) .................................................... 4-22
Fault Latch, Area 3 ............................................ 3-13
IF vs. ? ............................................................ 4-14
Fault Logic......................................................... 3-11
If Your System Is Completely Unstable............... 6-3
ACTIVE, Area 5 ........................................... 3-13
IF's with GOTO and GOSUB ............................ 4-15
Fault Latch, Area 3 ....................................... 3-13
IF, ELIF, ELSE, and ENDIF
Fault Logic, Area 2 ....................................... 3-13
Commands ............................................... 4-13
Firmware Faults, Area 1................................ 3-13
Incremental Move Example ............................... 3-22
Motor Brake.................................................. 3-14
Indirect User Variables ........................................ 3-7
Output Relay ................................................. 3-14
Initial Settings of Control
Ready Latch, Area 4...................................... 3-13
and User Variables....................................... 3-4
Relay and STATUS Control, Area 6............. 3-13
INPUT ............................................................ 4-20
Fault Logic, Area 2 ............................................ 3-13
INPUT and Decimal Point ........................ 4-21
Features .............................................................. 1-1
INPUT Limits ........................................... 4-20
File .............................................................. 2-7
Input 1-16 Decimal Values ..............................T3-11
FIND (F) .............................................................. 4-8
INPUT and Decimal Point ................................. 4-21
Firmware Errors ................................................... 5-9
INPUT Limits .................................................... 4-20
Firmware Faults, Area 1..................................... 3-13
INSERT (I) .......................................................... 4-8
Foldback Current, IFOLD.................................. 3-17
Insert/Delete......................................................... 2-8
Four Idling Commands ....................................T4-26
Install on a Floppy Disk ....................................... 2-2
Install on a Hard Disk .......................................... 2-2
-G- Instructions........................................................... 3-1
Comments ....................................................... 3-1
Index-iii
BDS5 INDEX
Integrating Velocity Loop .................................. 3-38 Manual Program (MANUAL $) ................ 4-30
Interactive Mode ................................................ 2-10 Power-Up Routine (POWER-UP$)........... 4-29
Interfacing with the Operator ............................. 4-16 Typical AUTO/MANUAL Programs........ 4-30
INPUT........................................................... 4-20 Manual Program (MANUAL $) ......................... 4-30
PRINT (P) ..................................................... 4-17 Master/Slave Block Diagram ...........................F4-34
REFRESH (R & RS) Commands .................. 4-20 Math .............................................................. 3-8
SERIAL Switch............................................. 4-21 Algebraic Functions ...................................... 3-10
Hexadecimal.................................................... 3-8
Logical Functions: AND, OR.......................... 3-9
-J- MCA, MCI, MCD, & MCGO ............................ 3-24
Mechanical Specifications................................T1-12
JOG (J) Command.............................................. 3-23
Menus and Windows ............................................ 2-4
Jog From (JF) Command..................................F3-28
Capture ........................................................ 2-5
JOG TO (JT) & JOG FROM (JF) ...................... 3-28
Help............................................................. 2-6
Changing Profiles During Motion .......... A3-30
Options ........................................................ 2-5
Multiple JF/JT Commands ........................ 3-30
Program....................................................... 2-4
Registration ............................................ A3-29
Scope........................................................... 2-5
Registration Example ................................ 3-29
Utilities........................................................ 2-6
Jog To (JT) Command .....................................F3-29
Variables ..................................................... 2-4
Metric Conversion (12-bit
-K- R/D Only)..................................................T4-35
Molex Assembly Tools ........................................ 1-7
Monitor Mode .................................................... 2-12
-L- Monitor Mode Commands ...............................T2-12
Monitoring Current Limits ................................. 3-18
Labels ............................................................ 4-10 Motion Commands ............................................. 3-18
Limiting Motion ................................................. 3-19 Basic Motion Commands .............................. 3-18
Hardware Travel Limits ............................ 3-19 Capturing Position......................................... 3-26
Software Travel Limits, PMAX Clamping ....................................................... 3-27
& PMIN .............................................. 3-20 CONTINUE .................................................. 3-37
User Position Trip Points, PTRIP1 Electronic Gearbox........................................ 3-32
& PTRIP2............................................ 3-20 Encoder Feedback ......................................... 3-37
Limiting Motor Current...................................... 3-17 External Inputs .............................................. 3-31
Continuous Current, ICONT ..................... 3-17 JOG (J) Command......................................... 3-23
Foldback Current, IFOLD ......................... 3-17 JOG TO (JT) & JOG FROM (JF) ................. 3-28
Monitoring Current Limits ........................ 3-18 Limiting Motion ............................................ 3-19
Logical Functions: AND, OR............................... 3-9 MACRO MOVES ......................................... 3-24
Low-Pass Filters................................................... 6-8 NORMALIZE (NORM) Command .............. 3-23
Profile Regulation ......................................... 3-35
-M- Profiles .......................................................... 3-20
R/D BASED MOVE (MRD) Command ....... 3-26
Machine Specific Units ...................................... 4-35 Zero Position Error (ZPE) Command............ 3-24
Macro Move Example #1................................... 3-25 Motion Link and Trace......................................... 5-2
Macro Move Example #1.................................F3-25 Motion Link Editor .............................................. 4-6
Macro Move Example #2................................... 3-25
Macro Move Example #2.................................F3-25
Index-iv
INDEX BDS5
Motor Current, ICMD & IMON ........................ 3-16 Position ............................................................ 3-14
Move Absolute (MA) Command ....................... 3-21 Position Command and Feedback,
Move Incremental (MI) Command .................... 3-22 PCMD & PFB.................................... 3-14
MULTI ............................................................ 4-23 Position Error, PE & PEMAX .................. 3-14
MULTI-TASKING ............................................ 4-23 R/D Position, PRD.................................... 3-15
Alarms (Task Levels 1-3).............................. 4-26 Sampling PFB, PCMD and PEXT ............ 3-15
Background (Task Level 6)........................... 4-30 Position Command and Feedback,
Enabling and Disabling Multi-tasking........... 4-23 PCMD & PFB......................................... 3-14
END Command............................................. 4-23 Position Error, PE & PEMAX ........................... 3-14
Idling 4-25 Position Loop..................................................... 3-38
Main Program Level (Task Level 5) ............. 4-29 Position Rotary Mode, ROTARY, &
MULTI.......................................................... 4-23 PROTARY................................................. 4-37
Multitasking and Autobauding...................... 4-23 Choosing PROTARY, PNUM,
Variable Input (Task Level 4)....................... 4-27 and PDEN ............................................. 4-37
Multi-Tasking Debug Prompts...........................T5-3 Rotary Mode and Absolute Moves ......... 4-38
Multi-Tasking Overview..................................T4-24 Post-Execution Idle............................................ 4-26
Multidrop Communications ............................... 4-40 Power-up and Control Variables.......................... 3-3
Broadcast .................................................. 4-41 Power-Up Control Loops ................................... 3-39
Multiple JF/JT Commands................................. 3-30 Power-Up Routine (POWER-UP$).................... 4-29
Multiple Profile Commands............................... 3-23 Power-Up State of Programmable Units ............T3-4
Multitasking and Autobauding........................... 4-23 PRD: Ranges and R/D Resolutions..................T3-15
Pre-Execution Idle ............................................. 4-25
PRINT (P).......................................................... 4-17
-N- Cursor Addressing .................................... 4-19
Printing ASCII Characters ........................ 4-18
Nesting ? Commands ......................................... 4-12
Printing BDS5 Status (PS) ........................ 4-20
Nesting IF commands ........................................ 4-15
Printing Binary Numbers .......................... 4-18
NEW .............................................................. 4-9
Printing Control Characters ...................... 4-19
Next Line ............................................................. 4-7
Printing Decimal Numbers........................ 4-17
Non-Linear Mechanics......................................... 6-7
Printing Decimal Points ............................ 4-17
NORMALIZE (NORM) Command ................... 3-23
Printing Expressions ................................. 4-18
Printing Hex Numbers .............................. 4-17
-O- Printing Switches ...................................... 4-18
Printing ASCII Characters ................................. 4-18
Options .............................................................. 2-5 Printing BDS5 Status .......................................T4-20
Other Modes ...................................................... 2-13 Printing BDS5 Status (PS) ................................. 4-20
Other User Units ................................................ 4-33 Printing Binary Numbers ................................... 4-18
Output 1-8 Decimal Values..............................T3-10 Printing Control Characters ............................... 4-19
Output Relay ...................................................... 3-14 Printing Decimal Numbers................................. 4-17
Overdamping........................................................ 6-2 Printing Decimal Points ..................................... 4-17
Overdamping...................................................... F6-2
Overloading the Motor......................................... 6-6
Index-v
BDS5 INDEX
Index-vi
INDEX BDS5
Index-vii
BDS5 INDEX
-W-
WAIT (W).......................................................... 4-22
WAIT (W)............................................................ 5-5
Whole Word I/O................................................. 3-10
-X-
-Y-
-Z-
Zero Position Error (ZPE) Command................. 3-24
---
<BDS Command Receiving from
the BDS5 ............................................... 4-39
Index-viii
BDS5 UPGRADE NOTICES
VERSION 3.0.x FIRMWARE HISTORY
FIRMWARE OBSOLETE/ MC
DATE LLL VERSION CURRENT/ VERSION DESCRIPTION OF CHANGES
S.O.
10-93 030 3.0.0 Obsolete MC2 • Added “MONITOR” switch to force Monitor
Rev 2 and mode during program run.
later • Added a serial port “ECHO” switch.
• Added “MSG” switch to control the Power-up
and Monitor messages.
• Added a fix for the Serial watchdog (took
35 sec to print).
• Added a random number command (“RAND”).
• Added Print Append command (“PA
and “PAS”).
• Changed the “RUN” command to work from
user program
• Added Real Time Trace commands
(“TRECORD” and “TPLAY”).
• Added an Electronic Cam mode (CAM
and PCAM).
• Enhanced “NORM” command to enable
Camming
• Moved position interrupt code around to make
CAM work properly. This reduced the loop
delay and increased BDS5 stability (i.e.
bandwidth).
• Stopped “CONTINUE” from working with
CAM.
• Made drive disable also disable Camming.
• Added “LPF” and “LPFHZ” to the
“DUMP TL” command.
• Added Extended User Registers “EXTDX”
for X251-X750.
• Added “CLEARX” command.
• Fixed the 16-bit R/D problem.
• Fixed motion bug due to multiple “J 0”
commands
• Eliminated micro register test to make more
room for code.
• Fixed bug that ignored Escape when
background was continuously printing.
• Fixed bug where error messages occasionally
printed the wrong line number.
• Added code to initialize the new Dallas Bat-
RAMS to prevent power-up and program crash
problems.
• Register based instructions will execute .3 msec
slower.
1
VERSION 3.0.x FIRMWARE HISTORY (Continued)
FIRMWARE OBSOLETE/ MC
DATE LLL VERSION CURRENT/ VERSION DESCRIPTION OF CHANGES
S.O.
10-93 030 3.0.1 Obsolete MC2 • Changed the lower limit of “PEMAX” from
Rev 2 and 0 to 1.
later • Force “PEMAX” to 1 if less than 1.
2-94 030 3.0.2b Obsolete MC2 • Enhanced the Message command (“MSG”) to
Beta Bug Fix Rev 2 and also suppress error messages.
(Shipped to later • Fixed error handler to properly handle more
some than one error.
customers for • Fixed ERROR$ to reliably execute to
test and completion on first error.
verification of • An error will now force off Monitor mode to
bug fixes) prevent program hang.
• Fixed Jog command (“J”) that could cause
software watchdog if executed during an error.
2-94 030 3.0.2 Obsolete MC2 • Functionally equivalent to BDS5 3.0.2b plus. . .
Rev 2 and • Current foldback fix
later • INPUT”” command fix
• Clear “LSTERR” to 0 on “EN”.
• Fixed Print problem due to program terminating
with an “END” while in Monitor mode.
KNOWN PROBLEMS
• On power-up the program corrupt message is
suppressed.
• The TPLAY command will not display the
newest trace line if the number of lines stored
exceed 1000.
• On power-up with a new uninitialized
BATRAM the BDS5 will often trigger a
software watchdog (this is an inconvenience to
the factory test people).
4-94 030 3.0.3 Obsolete MC2 • Fixed non-printing error message on power-up
Rev 2 and due to corrupt user program.
later • Fixed TPLAY to properly display the trace
information after the number of lines stored
exceed 1000.
• Fixed the factory initialization problem that
would cause a software watchdog trip due to the
user program being uninitialized in a new
BATRAM chip.
2
FIRMWARE OBSOLETE/ MC
DATE LLL VERSION CURRENT/ VERSION DESCRIPTION OF CHANGES
S.O.
5-94 030 3.0.4 Obsolete MC2 • Enhanced the CLEARX command to allow
Rev 2 and separate clearing of all User Registers or User
later Flags or both.
• Fixed LSTERR to work even if MSG=0.
• Fixed another factory initialization problem that
would cause a software watchdog trip on entry
to the User Program Editor due to the user
program being uninitialized in a new BATRAM
chip.
• Enhanced the Break (B) command to allow the
optional breaking of a user INPUT command (B
I).
• Enhanced the Error Recovery Task to cancel the
user INPUT command if it is active.
• Enhanced the Error Recovery Task to cancel a
Task idling command such as “H”.
11-94 030 3.0.5 Current MC2 • Added MONITOR=OFF support from the user
Rev 2 and program.
later • Fixed a problem with EXTLOOP.
• Added PCMD=PEXT when EXTLOOP=1 and
drive disabled.
• Fixed front panel LED initialization on power-
up.
• Syntax error in ERROR$ will break the
program.
• An invalid command will not allow any program
execution.
• An error occurring while in Monitor mode will
print the error message and return to Monitor
mode.
3
BDS5 UPGRADE NOTICE
VERSION 3.0.0
• It provides many new commands to control serial communications with.
• It provides the user with up to 750 user registers.
• It provides a real time trace function.
• It provides an electronic cam function.
• It provides a random number generator.
• It provides for using the run command from within the user program for purposes of restarting
a program.
• It provides up to 5% higher position loop bandwidth.
EXISTING APPLICATIONS
Please be aware that register based operations will run approximately .3 msecs slower (see next
page). This could cause a problem with older, time critical applications. Should this problem
occur with older applications - please contact the factory for the older firmware version 2.0.6.
UPGRADES
When upgrading older systems with 3.0.0. be sure to initialize the three new non-volatile flags for
proper operation:
• ECHO=1
• MSG=1
• EXTDX=0
1
BDS5 version 3.0.0 Firmware
BDS5300.DOC Rev 4 June 15, 1993
2
NORM <pos> {CAM} Used to enable the Cam at the Normalize position -
GEAR mode must be turned off before enabling
CAM, after which GEAR must be turned on to
start Camming.
DUMP {TL | VERSION} Added LPF and LPFHZ to DUMP TL
3
TRECORD START | STOP | CONTINUE Real Time Trace Record command. This can be
buried in the user program to control Real
Time Tracing.
Real Time Trace Playback command.
TPLAY - this will dump the entire Real Time Trace buffer
to the serial port.
TPLAY NEWEST <#lines> -this will output the newest # of lines.
TPLAY OLDEST <#lines> -this will output the oldest # of lines.
TPLAY <#lines> -this will output a # of lines.
TPLAY <line1> <line2> -this will output from <line1> to <line2>.
See the Output syntax below
Output Format: #<line> LINE <pgm line> <prompt> <command>
#<line> is the trace line number.
<pgm line> is the user program line number.
<prompt> is a modified trace prompt that in addition to indicating the trace mode and the multi-
drop address, also indicates the multi-task active.
• ta. indicates Alarm A$ was active
• tB. indicates Alarm B$ was active
• tC. indicates Alarm C$ was active
• tV. indicates Variable$ was active
• t.. indicates the MAIN PROGRAM ($-$500) was active
• t*. indicates BACKGROUND$ was active
• tI. indicates INTERACTIVE was active
• tM. indicates MONITOR was active.
<command> is the user program command that executed.
Output Example: #1 LINE 22 AT .. 5$ ;this indicates program trace line1 was
;at user program line 22 from the Main
;program task and it was a label (5$).
NOTE: When upgrading from an older version of firmware the following variable must be
initialized to insure proper operation of the BDS5. This is because they are not forced to default
power-up state and therefore will assume the value of the previously unitialized memory locations.
the flags ECHO and MSG should be set to 1 and the flag EXTDX should be set to 0 for 250 user
registers and set to 1 for 750 user registers. Remember that when EXTDX is enabled, it will
disable the PC-SCOPE and PC-TRACE features of the BDS5.
• ECHO=1
• MSG=1
• EXTDX=0
4
BDS5 TIMING TESTS
5
CAMMING with the BDS5
BDS5-CAM.DOC Rev 3 June 02, 1993
Conventional Cams
Conventional cams convert rotational motion to linear motion. As Figure 1 shows, the "command"
signal comes from a master-drive shaft which is fitted with a cam. The cam generates linear
motion on a follower. Cams are used when a specific profile must be generated each time a drive
shaft turns. The cam itself can have a wide variety of shapes. This leads to tone of the most
important features of cams: you can generate a wide range of linear motion profiles using only
constant rotational motion.
Electronic cams offer many advantages over conventional, mechanical cams. For example, the
profile of an electronic cam is much easier to change. These profiles can be changed without
machining parts, and without disassembling the machine. With electronic cams, the machine
comes off-line only for the few minutes it takes to load a new profile. another advantage is that
electronic cam profile are not subject to wear like their mechanical counterparts.
The profile of an electronic cam is stored in a table such a the one shown in Figure 2. This table
defines the relationship between the drive and follower positions. You define the table directly or
take it from an existing conventional cam. If the cam already exists, you determine the radius of
the cam profile at different angles as shown in Figure 3. Here, 4 radii are shown, though in
practice, many more are specified.
6
Figure 2. Electronic Cam Table
One of the most important features of an electronic cam is that the master drive can rotate in one
direction indefinitely. With conventional positioners, this will eventually cause an error because
the internal position counter will overflow. Also, the electronic cam controller must support gear
ratios between the drive shaft and the follower. Again, the drive can rotate indefinitely, and the
controller must not lose counts. The BDS5 has been designed with both of these criteria, allowing
it to serve as both a conventional positioner and as an electronic cam.
4.00" Radius
0°
2.75" Radius 90° 2.75" Radius
270°
180°
1.70" Radius
7
Setting up the BDS5
To use BDS5 camming, you need to follow these steps:
0°
1) Generating a Table
To generate a table, start with a graph, like the one
in Figure 2, showing the master drive position
versus the follower position. Divide this graph
into 128 evenly spaced sections. Each section
270° 90° represents about 2.81 degrees (360/128). Now
load the follower positions into the BDS5 user
variables X100-X227 as shown below:
180°
Figure 4
Dividing a CAM
Note that the beginning position (X100) should be close to the ending position (X227). This is
because this is an absolute electronic cam that will always cycle back to it's original starting
position. and begin the cam again. The next position after X227 is X100. when the cam table is
written it must wrap around so that position X227 and position X100 are close. If the positions are
not close the motor will jump and will possible trip out due to either an overspeed or a position
following error.
8
2) Scale the gearbox
The BDS5 processes the master drive signal through the gearbox so you can select the gear ratio
you need. You must select the gear ratio so that when the master rotates 360 degrees, 32,768
counts are generated in the BDS5. think of the 360 degree horizontal axis of Figure 2 as being
32.768 counts long. for example, suppose the sensor on the drive shaft were a 1000-line encoder.
Because of quadrature, the encoder would generate 4000 counts for every rotation. So the 4000
counts should be scaled through the gearbox to generate 32,768 counts. The gear ratio would be:
If you want to test your scaling, enable your BDS5 (without camming), turn GEAR ON, and rotate
the drive motor 360 degrees. The follower motor should rotate 32,768 counts (8 rev's for a 12-bit
system or 2 rev's for a 14-bit system).
1) rotate the drive to 90 degrees to line up with the 3.00 inch follower position, or
2) move the follower to 4.00 inches to line up with the 0 degree master-drive position.
The master and follower must line up somewhere in the cam table before you can proceed.
The same command both enables camming and aligns the master and follower. The BDS5 uses the
NORM command with "CAM" as the third entry. The form of the command is:
This command simultaneously aligns and enable camming. When camming is enabled, the
software switch CAM is on. To disable camming, you must reset the BDS5, disable the BDS5, or
enter the NORM command without the "CAM". You cannot directly change the value of CAM.
Note that the BDS5 must be enabled to use NORM with the "CAM" entry.
9
When the "NORM <Master Drive Position> CAM" command is executed, PCMD is determined
by the cam table and is set to the corresponding value for PCMD. PFB is set to the same value as
PCAM and therefore there is no PE (position error).
Returning to Figure 2, assume you know the follower to bed 4.00 inches. The master drive should
be at 0 degrees. You would normalize the position as follows:
EN
NORM 0 CAM
If you are using position units, the most convenient place to normalize for camming is when the
master drive is at zero. This is because the master drive position (PCMD) uses position units
(PNUM and PDEN) which are normally scaled for the follower. When you normalize to zero, the
units do not have any effect. However, if you want to normalize the master to a non-zero position,
you must
A) Determine the position of the drive master to which you will normalize;
B) Convert the position to counts where 360 degrees equals 32.768 counts;
For example, if you knew the follower to be 3.00 inches and you knew the drive to be at 90
degrees:
C) PNUM=1
PDEN=1
D) EN
NORM 8192 CAM
10
Finally, you must turn GEAR on. This connects the drive to the follower. If you want tot test your
system before you connect the master-drive, you can use VOFF. VOFF is the offset speed for the
electronic gearbox. For example, if the master drive is not moving and you turn GEAR ON and set
VOFF to 100 RPM, the position command will increase at a rate of 100 RPM. This has the same
effect as the encoder option input running at 100 RPM. For a 12-bit system, this is equivalent tot
the master drive rotating at 409,600 counts per minute; as 360 degrees is 32.768 counts, this is
equivalent to 12.5 (409,600/32,768) cycles through the cam table every minute.
PCMD is automatically in a "ROTARY" mode where the distance of one rotation is fixed at
32.768 counts. PCAM can be printed or recorded with PC-Scope. In fact, if you want to see your
cam profile, you can record PCAM and PCMD simultaneously. For example, the following line
records both positions for 0.5 seconds.
You can then use PC-Scope to verify your profile. Also, the PS and RS commands display
"CAMMING" if GEAR and CAM are both ON.
Limitations
There are several limitations for camming applications. These limitations reflect that many
functions of the BDS5 are not useful when caming. For example, profile commands (MI, MA, J,
JT, JF, MCGO) are not allowed. ROTARY must be OFF. Any error that disables the drive also
disables camming; you must re-normalize after such errors. Error 23, SOFTWARE
OVERTRAVEL, disables the BDS5 and breaks the user program; when camming is off, this error
only breaks the user program.
11
CAMMING DETAILS
by George Ellis 7/92
(Edited by Rick Furr June 02, 1993)
Camming is implemented as a modification of the BDS5 gearbox. As Figure 5 shows, the standard
gearbox produces PCMD by multiplying PEXT by the ratio GEARI/GEARO. PE is formed by
subtracting PFB from PCMD. Usually, PEXT is generated from another motor's feedback sensor.
In this way, a master motor position (PEXT) controls the slave motor position (PFB).
PFB
This method of controlling motors is limited. The only profile that is allowed is one where the
slave position is proportional to the master position. Often, applications require that a master
motor will be turning at a relatively constant speed, but the slave motor must execute a profile.
Actually, the BDS5 has "Profile Regulation", a mode where the rate of the slave profile is tied to
the master speed. At first we thought this would work for camming. Unfortunately, each time a
new profile is started, there are a few milliseconds when the master position is ignored. So,
although the rate of the profile is controlled by the master, the master phase and slave phase are not
locked together. Over time, the master position drifts with respect to the slave position.
12
To implement camming, a new approach had to be taken. We decided to modify the gearbox by
adding a look-up table. As Figure 6 shows, PEXT is processed by the gearbox to form PCMD.
PCMD is then used as an index into a CAM look-up table to produce a new variable, PCAM.
When camming is enabled, PCAM is used to form PE.
PFB
Interpolation
The BDS5 CAM Table only has 128 points but with the help of interpolation, the BDS5 is able to
generate a 32,768 point CAM. The interpolation algorithm will split each CAM table point into
256 linearly interpolated mid-point positions based on the master input. this is why the gear ratio
must be chosen so that each revolution of the Master Cam input generates 32.768 counts of PCMD
to the CAM table. This scaling is easily accomplished by programming the GEARI variable to
32,768 and then programming the number of counts generated by one revolution of the master
input CAM into GEARO. A example would be as follows:
The master input device is a 2,000 line encoder. Each revolution of this encoder would produce
8,000 (2,000x4) counts of position command. If it took two revolutions of the mater to make one
turn of the CAM then the master input would receive 16,000 (8,000x2) counts of position
command per turn of the CAM. this means that the variable GEARO should be programmed to
16,000
Note: The variable GEARO must be number between 0 and 32,767. The variable GEARI must
be a number between -32,768 and 32,767.
BDS5 MASTER/SLAVE
The next page will provide a more detailed block diagram of the Electronic Gearbox, Profile
Regulation, and Electronic CAM master/slave modes of the BDS5.
13
ELECTRONIC GEARBOX
C
DIGITAL VELOCITY
1 VXDEN
VEXT
X4 VXNUM
DECODE
A/D PXDEN
PEXT
OPT1 POSITION PXNUM
GEARI VOFF
C
ANALOG GEARO +
2
PCMD
+
MOTION PROFILE +
COMMAND GENERATION
PROFILE REGULATION
C
DIGITAL VELOCITY VXDEN
1 VEXT
X4 VXNUM
DECODE
A/D PXDEN
PEXT
OPT1 POSITION PXNUM
1
C REGKHZ
ANALOG
2
MOTION PROFILE
GENERATION PCMD
COMMAND
ELECTRONIC CAM
C
DIGITAL VELOCITY VXDEN
1 VEXT
X4 VXNUM
DECODE
A/D PXDEN
PEXT
OPT1 POSITION PXNUM
GEARI
VOFF
C
ANALOG
GEARO +
2
PCMD
CAM PCAM
+ TABLE
Set ratio for (X100-
BDS5 MASTER/SLAVE 360° of Master
X227)
RICK FURR = 32768 counts
06-03-93 A-93633M Issue2
14
TESTING
A simple test program was written. This test performs the following task:
1. Loads X100-X227 with a triangle wave where x100 = 0, x101 = 100, x102 =200, ... . The
mid point of the triangle wave is X164 so that X163 = 6300, X164 = 6400, X165, 6300,
X166 = 6200, ... [Lines 14-24]
3. Use VOFF to move PCMD through the cam cycle. VOFF is usually used with the
gearbox to add an offset speed. It was designed for use with analog input where a customer
may need to add an offset speed to adjust out error from a D/A converter. Here, we use it to
simplify the test (without VOFF, testing would require a second motor be connected to the
gearbox).
5) Calculate which segment this iteration is in (it repeats from segment 0 to segment 127
every 128 iterations) and store it in X2. [Line 38]
7) Wait until PCMD reaches the boundary. Store the commanded position (PCAM) [Lines
45-53]
8) Calculate error between what the command is (X4) and what is should be (X(X2)).
15
CAM TEST PROGRAM FOR THE BDS5
1 ;CAM TEST ghe 7/16/92
2 ;
3 ;use voff set to keep vcmd moving at a constant speed. Selected that
4 ;speed to be 20 RPM which is about 1365 counts/second. The entire
5 'cam cycle is 32768 counts. Each of the 128 segments is 256 counts.
6 ;So. 20 RPM cycles through the cam cycle at one cycle per 32768/1365
7 ;seconds or 24 seconds. Each of the 128 cycles requires 24/128 or
8 '187 msecs.
9
10 ;1$
11 ;This section loads cam variables with a triangular profile where
12 ;each segment is different from the last by 100 counts
13 ;First, load variables x100-x164
14 ;xi = 100 ;starting variable
15 ;2$ ;loop beginning
16 X(X1) = = (X1-100)*100 ;load the "up side" of the triangle
17 X1 = X1+1 ;increment the loop counter
18 ? x1 1e 164 goto 2 'test loop--keep going until X164
19 ;
20 ;Now, load variables X165-X227 with the "down side" of the counter
21 3$ ;loop beginning
22 X(X1) = X164-(X1-164)*100
23 X1 = X1+1 ;increment the loop counter
24 ? X1 LE 227 GOTO 3;test loop--keep going until X227
25 ;
26 ;Now, it's time to start the CAM
27 4$
28 PLIM OFF ;Standard line to enable
29 GEAR OFF ;Disable GEAR so we can enable CAM
30 EN
31 NORM 0 CAM ;Normalize and enable CAM
32 GEAR ON ;Now, we can enable GEAR
33 VOFF 20 ;Use offset speed of 20 RPM to go through
34 ; cam cycle
35 B ;Break back to Immediate mode
16
BDS5 SERIAL COMMUNICATIONS 1
DOC=BDS5COM1.DOC Rev 3 June 03, 1993
The following chart shows the various ASCII codes and formats that will be used in all examples
in this document.
17
The BDS5 is designed to easily interface with a human (via a standard dumb terminal) and is also
designed to interface to a general purpose computer. Part of this design involved the selection of
unique prompts for each of the BDS5's 9 modes. These unique prompts will allow the computer to
determine the BDS5's current mode.
The BDS5 will print a prompt to the serial port whenever it is ready to receive a character. The
BDS5 will echo each character transmitted to it.
The BDS5 will never print data to the serial port while a prompt or input statement is active. This
means that if an error occurred the BDS5 would hold the error message if a prompt was present or
if an input statement was active.
All error messages respond with the first three characters of "ERR".
The BDS5 can be programmed in the user program to print out data with the "PRINT" statement
and the background (BACKGROUND$) routine can be programmed to print out data on an
asynchronous interval with the "PRINT" statement.
The BDS5 can be programmed to enter an autobaud sequence on power-up or can be programmed
to a fixed baud rate on power-up. By setting "ABAUD=1" the BDS5 will autobaud on power-up.
After autobauding, the variable "BAUD" will contain the current baud rate.
The BDS5 can also be set to automatically power-up at a fixed baud rate. By setting "ABAUD=0"
and "BAUD=9600" the BDSD5 would power-up at 9600 baud.
The BDS5 can be reset to it's default serial conditions (Autobaud) by holding the MOTION input
off during power-up. This allows communications to be reestablished it au incompatible baud rate
was programmed into the BDS5.
18
RS-232 COMMUNICATIONS -- INTERACTIVE MODE
The interactive mode is the normal state the BDS5 will be in when it is not running a program.
The following are typical BDS5 response sequences.
The BDS5 will respond to a <cr> with a "<cr><lf>-->" character string while in the interactive
mode. The interactive prompt (-->) indicated that the BDS5 is ready for the next command.
-->"<cr>" "<cr><lf>"
"-->"
The BDS5 generates the same response with the <esc> character as it does with the <cr> (see
above) while in the interactive mode.
-->"<esc>" "<cr><lf>"
"-->"
The Jog command or any typical BDS5 command will generate the following response:
The Print command can be used to print the contents of any BDS5 variable. Remember that
variables print right justified so up to 11 Spaces could precede the value to be printed.
The BDS5 Print command can specify a format to use for printing the variable. The only
restriction is that if the format is too small "X"s will be printed.
{ASSUME PFB=1024}
-->"P PFB<cr>" "P PFB<cr><lf>"
"<8-SP>1024<cr><lf>"
"-->"
19
-->"P PFB[3]<cr>" "P PFB[3]<cr><lf>"
"XXX<cr><lf>"
"-->"
Any programmable variable (user and dedicated can be programmed with a value by using the
BDS5 equate function.
X1 1000" "X1=1000<cr><lf>"
"-->"
The BDS5 equate function will work with either an Equal Sign (=) or a Space.
The Run command can be used to enable the BDS5 multitasking by typing "RUN". Notice that
once the BDS5 has started running that the prompt does not return.
-->"RUN<cr>" "RUN<cr><lf>"
-->"RUN<cr>" "RUN<cr><lf>"
If an error occurs it will not print out if a prompt is present until a <cr> is received.
-->"<cr>" "<cr><lf>"
"<bell>ERR 17 FEEDBACK LOSS<cr><lf>"
"-->"
20
If the host was sending a command to the BDS5 and an error occurred before the command was
finished the BDS5 will ignore the command and respond with the following sequence.
-->"<cr>" "<cr><lf>"
"-->"
After an error with a severity level high enough to disable the drive the fault light will turn on. to
clear this light simply re-enable the BDS5 with the Enable command. The Enable command takes
a few seconds to complete and returns a prompt.
-->"EN" "EN<cr><lf>
<...time delay...>
"-->"
21
RS-232 COMMUNICATIONS -- RUNNING A PROGRAM
If a program is running -- then an ESCAPE character must be sent to get the attention of the BDS5.
The monitor mode will be active on getting the attention of the BDS5. A second ESCAPE will
drop the BDS5's attention and exit the monitor mode. The monitor mode will accept a sub-set of
the BDS5 commands. This subset includes:
? ; B DIS EN ERR K
MOTOR P PS R RS S ZPE
To enter the monitor mode while running a program send an <esc> character.
"<esc>" "<cr><lf>"
"ENTER MONITOR MODE. PUSH ESCAPE TO EXIT <cr><lf>"
"==>"
If the response is as follows then the <esc> has caused the BDS5 to exit the monitor mode. If this
is the case then send another <esc> to reenter the monitor mode.
"<esc>" "<cr><lf>"
"ENTER MONITOR MODE.
A single <cr> will return the following response. If there is no response then the monitor mode is
not active and an <esc> should be sent tot he BDS5 to enter the monitor mode.
"<cr>" "<cr><lf>"
"==>"
A Stop command will stop motion at AMAX and break the program. The interactive prompt will
be returned indicating that the BDS5 has stopped running the program.
==>"S" "S<cr><lf>"
"-->"
A Break command will stop at AMAX and break the program. The interactive prompt will be
returned indicating that the BDS5 has stopped running the program.
==>"B" "B<cr><lf>"
"-->"
22
A Kill command will disable the motor and break the program. The interactive prompt will be
returned indicating that the BDS5 has stopped running the program.
==>"K" "K<cr><lf>"
"-->"
Sending a command not allowed in the monitor mode will return the following response.
{ASSUME PFB=1024}
==>"P PFB<cr>" "P PFB<cr><lf>"
"<8-sp>1024<cr><lf>"
"==>"
{THE XXX MEANS THAT PFB WAS TOO BIG TO FIT INTO 3 SPACES}
==>"X1=1000" "X1=1000<cr><lf>"
==>
==>"X1.1000" "X1.1000<cr><lf>"
==>
23
==>"RUN<cr>" "RUN<cr><lf>"
"<cr><lf>"
"<lf>"
"<bell>ERR 63 'RUN'<28-sp>NOT AT THIS LEVEL<cr><lf>"
"==>"
{THE RUN COMMAND IS NOT ALLOWED IN THE MONITOR MODE}
A ^X will act like a "S"top and a "B"reak command. The BDS5 will respond to this command
while in the monitor mode, while in the interactive mode, or while running program.
24
==>"RUN 6" "RUN 6<cr><lf>"
{NOW A PROGRAM IS RUNNING AND NO PROMPT IS PRESENT}
25
UPLOADING & DOWNLOADING PROGRAMS
The BDS5 has two commands to allow the up-loading and down-loading of the BDS5 program
memory.
"<BDS" will print to the serial port each line of the program memory. Each program line is
terminated with a <cr><lf>. This command terminates with a "<cr><lf>-->" prompt.
-->"<BDS<cr>" "<BDS<cr><lf>"
"<Program Line #1><cr><lf>
"....."
"<Last Program Line #><cr><lf>"
"-->"
">BDS" will place the BDS5 into the program upload mode. On getting the first <cr> terminated
line the program memory will be erased. Each <cr> terminated line will respond with a
"<cr><lf>|->" prompt. Sending an <esc> tot he BDS5 will end the program upload mode. Upon
completing a program upload the host may request a special BDS5 checksum of the data stored in
memory. After receiving this special checksum the host may in future uploads use this value to
verify the BDS5 program has been uploaded error free.
-->">BDS<cr>" "BDS<cr><lf>"
"l->"
{THE l-> PROMPT INDICATES THE BDS5 IS READY TO RECEIVE A PROGRAM}
Recalculation of this checksum by the host is not possible because this is a special word checksum
of the BDS5's internal program memory with a varying offset. As stated earlier the most efficient
method of exploiting this checksum is to upload the BDS5 program, print out the checksum
variable, and then use that value for comparison of future uploads.
26
UPLOADING & DOWNLOADING SYSTEM VARIABLES
The BDS5 can print to the serial port two groups of internal variables. The first group is all of the
variables. The second group is a subset consisting of compensation specific variables.
"DUMP" will print to the serial port all variables from the BDS5.
"DUMP TL" will print to the serial port the compensation specific variables from the BDS5.
To upload non-factory variables to the BDS5 simply transmit each variable followed by a Space or
Equal Sign followed by the numerical value and terminated by a <cr>. Do not transmit the next
variable line until a prompt has been received. The prompt indicates that the BDS5 is ready to
receive the next variable or command.
-->"ABAUD=1<cr>" "ABAUD=1<cr><lf>"
"-->"
-->"X1=111234<cr>" "X1=111234<cr><lf>"
"-->"
Not all BDS5 variables are programmable and some variables are programmable at the factory
only. The factory protected variables contain motor specific information.
27
MULTIDROP COMMUNICATIONS
Multidrop communications will allow you to have up to 32 axes on serial communications line.
Each axis must have an unique address. The valid addresses are "0"-"9" and "A"-"Z". The Axis
Attention Character is a Backslash "\". The Backslash when followed by a valid Axis ID will wake
up the addressed axis. "\*" is a special Axis Broadcast All command that will wake-up all the axes
to respond to any transmitter command but no axis may transmit. The BDS5 prompts are slightly
different from the standard RS-232 prompts. The Multidrop prompts always print the Axis ID as
their first character. The normal first character is then slid over to the second position in the
prompt. The prompt terminates with a ">".
All handshaking will be identical to the above examples except the prompts will change as shown
in the above chart.
"\A<cr>" "<cr><lf>"
"A->"
28
BDS5 SERIAL COMMUNICATIONS 2
DOC=BDS5COM2.DOC Rev 4 July 13, 1993
• The BDS5 will transmit a unique prompt when it is ready to receive commands. The
interactive prompt will be "-->". If a prompt is not present, then the BDS5 is not listening to
the serial port.
BDS5 PROMPTS
MODE NON-MULTIDROP MULTIDROP
(ADDR=0) (ADDR=65)
INTERACTIVE --> A->
MONITOR ==> A=>
SINGLE-STEP s-> As>
TRACE t.. At.
EDIT e-> Ae>
LOAD 1-> A1>
EDIT/INSERT i-> Ai>
EDIT/FIND f-> Af>
EDIT/CHANGE c-> Ac>
29
Some of the more important serial commands that have been available in all versions of software
are in the following table:
30
BDS5 COMMUNICATIONS
The BDS5 will communicate over an RS-232 serial bus with simple ASCII commands.
• Each ASCII character transmitted to the BDS5 will be echoed back to the host. This echo will
allow a simple character by character verification that the data was properly received.
• Each ASCII command string will be terminated by an ASCII carriage return (<cr>).
• Upon receiving the <cr> the BDS5 will acknowledge the command by transmitting a
"<cr><lf>" followed by a system prompt ("-->"). The prompt is used to indicate what mode is
currently active in the BDS5 and that the BDS5 is ready to receive another command.
31
Additionally, for more communications capabilities, the following commands have been added to
firmware version 3.0.0:
Note, the BDS5 now has a full set of Print commands. These commands are P, PS, R, RS, PA, and
PAS. The only differences being the P and PS commands terminate the output string with a
<cr><lf>, the R and RS commands terminate the output string with just a <cr>, and the PA and
PAS commands do not terminate the output string at all.
The Monitor mode switch will cause the BDS5 to automatically enter the Monitor mode upon the
execution of a BDS5 program. This will in essence cause the BDS5 to always have the serial port
active and waiting for a command. Previously BDS5 required an <esc> character to be received in
order to activate the serial port while a user program was running.
32
APPENDIX A -- SERIAL PORT
BDS5 SERIAL
CONNECTOR
PIN NAME
1 SHIELD
2 REC
3 XMIT
4 N/C
5 COMMON
6 TD+
7 TD-
8 RD+
9 RD-
• The communications format will be 8-bit ASCII with 1 start bit, 1 stop bit and no parity bit.
• The communications data rate will be from 300 to 19,200 baud (bits-per-second). This rate is
programmed in the variable "BAUD".
• This BDS5 can autobaud to determine the communication rate when the flag "AUTOBAUD"
is enabled. Autobauding is performed by the BDS5 receiving a series of <cr>.
• The serial connector is optionally configurable to RS-485. RS-485 is enabled with the
addition of RS-485 receiver/driver chips and setting a valid multi-drop address in the variable
"ADDR".
BDS5 MULTI-DROP
PROTOCOL
\<address> Multidrop Axis Address
Valid addresses are 0-9
and A-Z.
\\ Multidrop Hang-up Axis
\* Multidrop Broadcast All
33
FIRMWARE UPGRADE NOTICE 3.02b
FEBRUARY 02, 1994
The Engineering department is releasing new beta level proms that fix some operational
problems with error recovery. These proms are replacements for the current factory default
prom version 3.0.1. The new prom is labeled 3.02b. The "b" indicates this prom is still in
beta release until the BDS5 firmware qualification tests are finished. This prom has passed
our initial qualification tests. This prom is being released early in an attempt to help our
customers. Please immediately forward any feedback from testing this prom to our field
service group, your success is very important to us.
• The error handler has been enhanced to allow execution of ERROR$ to completion even
in the event of additional errors. Before this the BDS5 was designed to automatically
break program execution on the second error.
• We also found that a Software watchdog error could be triggered if an error occurred
during the execution of the firmware code that sets up a Jog command. This has been
fixed.
Additional Note: The Beta version of the firmware is dedicating user register X100 and
X101 to capture diagnostic information during any error. Please avoid using this
register if possible.
1
Error Handler (ERROR$)
When a serious error occurs, the BDS5 breaks execution of your program and checks your
program to see if you entered ERROR$. If you did, the error handler (that is, the routine that
follows the ERROR$) is executed. All multi-tasking is suspended, including alarms, when the
error handler is being executed. See Chapter 10 for more information on the user's error
handler.
Errors can also cause the BDS5 to change modes. Some errors are serious enough to
cause the BDS5 to break program execution. Usually, this has the identical effect of issuing
a Break (B) command. As an option, you can write an error handling routine beginning at
label ERROR$.
This routine should be short and should end with a Break (B) command. ERROR$ is
provided as a graceful end to program execution and not as a means of automatically
restarting the program. The program can be restarted using the AUTO$ and the CYCLE
input. For example, you can set outputs or print a message. It is not intended to continue
the program as if the error never occurred.
ERRORS
The BDS5 responds to a variety of conditions, both internal and external, hardware and
software, which are grouped in a single broad category: errors. An error indicates that there
is a problem somewhere. More serious errors are grouped as faults.
The BDS5's response to an error depends on the error's severity. There are four levels of
severity, listed below in increasing order:
2
ERROR MESSAGES
When any error except a firmware error occurs, a message is displayed to the screen. The
following items are printed: the error number, the offending entry, and an abbreviated error
message. For example, disable the drive and type in a jog:
DIS
J 100
The error number (50), the offending entry (the whole line), and the error message (you
cannot command a jog when the drive is inhibited) are given on one 80-character line. The
error message starts at character 40 so that if a 40-character display is used, the error
message will not be printed. You can display the line directly, either with the Motion Link
editor (GOTO A LINE NUMBER selection or ^Q^I), or with the BDS5 Editor (P command).
Sometimes only an entry is bad and not the whole line. In this case only the bad entry is
printed. For example,
PROP 2
generates:
since PROP is a switch and cannot be set to 2. If the error comes from the program, the line
number of the offending entry is also printed. Use the Editor to enter these lines at the top of
the user program:
11$
PROP 2
B
RUN 11
This message shows that the error occurred on line 2. You can enter the Editor and type:
P 2
will be displayed.
DEP01
If your BDS5 prints to a Data Entry Panel (DEP-01) or any other 40 character wide display,
the standard error messages will not print properly. The problem is that error messages are
based on an 80 character wide display and the DEP-01 is only 40 characters wide. To
correct this problem, the BDS5 provides the DEP switch, which, when turned on, cuts all
error messages down to 40 characters. If your BDS5 prints to a DEP-01, type "DEP ON"
ERROR HISTORY
The BDS5 stores the twenty most recent errors in the Error History. To display
the entire Error History, type:
ERR HIST
This causes the Error History to be sent to the terminal, with the most recent error sent first.
When the BDS5 is powered up, a "DRIVE POWERED UP" message is inserted into Error
History even though this is not an actual error.
ERR CLR
ERR 50
You may display messages for errors from 1 through 999. If you type in an error number that
the BDS5 does not recognize, it will respond with:
4
THE USER'S ERROR HANDLER
When an error occurs, the BDS5 decides what needs to be done: disable the drive, print out
a message, and so on. This is called an error handler. Often, an application may require
that other actions be taken. A common example is setting the Output (O) word to turn off
some auxiliary machine such as a pump. These actions, which are very specific to the
application, must be handled in the user's program. In effect, you can write an error handler
for your application.
The User's Error Handler begins at the special label, ERROR$. Any error that breaks
execution of your main program will restart execution from ERROR$, if it exists. The error
handler provides instructions that need to be executed if an error interrupts your program.
Examples of error handler instructions include setting outputs, printing messages, and storing
information in user variables.
There are several restrictions that apply to the error handler; for example, GOTO, GOSUB,
and RET are not allowed. Normally, ERROR$ should be at the end of your program.
ERROR$ cannot be followed by POWER-UP$, AUTO$, MANUAL$, or any general purpose
labels (0$ through 500$).
Software travel limits are automatically enabled on power-up. If you use these limits, you
may have short sections of your program that disable them briefly. If an error occurs in one
of those sections, software limits will remain disabled until you enable them or until the next
power-up. For this reason, you should always enable travel limits from the User's Error
Handler if they are disabled from any section of your program.
WARNING
BE SURE TO TURN PLIM ON FOR THE FOLLOWING CONDITIONS!
2) your program disables Software Travel Limits at any point, even briefly.
5
Use the Editor to enter the following example program:
12$
JUNK ;this line generates an error
B
ERROR$
P "RUNNING SIMPLE ERROR HANDLER"
OUT 0 ;turn outputs off
B
RUN 12
LSTLBL
The BDS5 stores the last label that is executed in the variable LSTLBL. You may need to
know the last label that was executed to determine where the program terminated. Labels
are stored in LSTLBL as follows:
6
LSTERR
The variable LSTERR contains the error number of the most recent error. LSTERR is
especially useful in the User's Error Handler (the lines that follow ERROR$). It allows your
error handler to take special action based on a particular error number. For example, the
error handler from above can be expanded to include LSTERR:
12$
JUNK ;this line generates an error
B
ERROR$
P "SIMPLE ERROR HANDLER"
OUT 0 ;turn outputs off
? LSTERR EQ 28 P "THIS IS AN INVALID COMMAND"
B
RUN 12
NORM 0
;if ERROR OCCURS here, PFNL = 0
MA 1000 100
;if ERROR OCCURS here, PFNL = 1000
MA 2000 1000
;if ERROR OCCURS here, PFNL = 2000, even if the first
;move is still in progress.
You can use PFNL to tell which moves were calculated before the error occurred. You can
use PFB to tell which moves were actually processed.
7
FIRMWARE ERRORS
Firmware errors are an indication of a serious problem with the BDS5. These errors stop
communications, disable the drive, and flash the CPU LED. The CPU LED flashes several
times, then turns off and pauses. The number of flashes represents the error number.
These error numbers range from 2 to 5. Contact the factory should one of these errors
occur.
8
PROGRAM CYCLE AND ERROR PROGRAM CYCLE AND ERROR
RECOVERY USING AN ALARM WITH RECOVERY USING AUTO$ WITH THE
INPUT #1 CYCLE INPUT
1$ ;same as power-up$ 1$ ;same as power-up$
POWER-UP$ ;powerup auto start label POWER-UP$ ;powerup auto start label
PLIM OFF ;turn off software limits PLIM OFF ;turn off software limits
EN ;enable motor EN ;enable motor
END ;return to multi-tasking END ;return to multi-tasking
; ;
A$ I1 ON ;when input #1 = 1 AUTO$ ;MANUAL=0, CYCLE=1
MI 40960 100 ;move incremental MI 40960 100 ;move incremental
TIL PFB EQ PCMD ;wait for motion to stop TIL PFB EQ PCMD ;wait for motion to
stop
END ;return to multi-tasking END ;return to multi-tasking
; ;
ERROR$ ;error recovery ERROR$ ;error recovery
O1 ON ;turn O1 on O1 ON ;turn O1 on
D 5000 ;wait for 5 seconds to let D 5000 ;wait for 5 seconds to let
;OK2EN settle ;OK2EN settle
TIL OK2EN EQ 1 ;wait for OK to Enable TIL OK2EN EQ 1 ;wait for OK to Enable
O1 OFF ;turn O1 off O1 OFF ;turn O1 off
EN ;enable motor EN ;enable motor
END ;return to multi-tasking END ;return to multi-tasking
9
BDS5 FIRMWARE UPGRADE NOTICE
DOC=BDS5-304.DOC.R5 / FIRM-UP.DOC June 17, 1994
VERSION 3.0.4
UPGRADES
When upgrading older systems (pre version 3.0.0) with 3.0.4. Be sure to initialize the three new
non-volatile flags for proper operation:
1. ECHO=1
2. MSG=1
3. EXTDX=0
• Enhanced the CLEARX command to allow separate clearing of all User Registers or User
Flags or both.
• Enhanced the Break (B) command to allow separate the optional breakink of a user INPUT
command:
Syntax: B {I}
The “B I” command was designed to allow the user to break any active Input command because
Printing from all tasks are suppressed until completion of the Input command. Aditionally, any
Print while the Input command is active will HOLD the task at the Print command until the Input
has finished. This means that if, for example, a user needed to Print a message to the machine
operator during an Alarm condition, this would not work if an Input command was active. Now,
with the “B I” command, the user can imbed the “B I” command in the program prior to any critical
Print messages and thus cancel any active Input command.
1
BDS5 Firmware Upgrade Notice
DOC=BDS5-304.DOC.R5 / FIRM-UP.DOC June 17, 1994
A$ I1 ON Alarm on Input #1 On
O2 1 Output #2 Off
BI Break any active active INPUT cmnd
P “AN ALARM HAPPENED” Print an Alarm message
D 1000 Delay 1 sec
O2 0 Output #2 Off
END End Alarm task
• Fixed LSTERR to work even if MSG=0. Note: LSTERR will return the last error the BDS5
encountered since an Enable (EN) command.
• Fixed another factory initialization problem that would cause a software watchdog trip on
entry to the User Program Editor due to the user program being uninitialized in a new
BATRAM chip.
• Enhanced the Error Recovery Task to cancel the user INPUT command if it is active when a
system error occurs. This prevents the Error Handler from holding further program execution
after an error due to the INPUT command having control of the serial port. Normally, the
Error Handler first needs to print an error message to the serial port and then pass execution to
the ERROR$ user program label if it exists.
• Enhanced the Error Recovery Task to cancel a Task Idling command such as “H” and thus
allow the ERROR$ task to properly execute if it exists.
2
BDS5 FIRMWARE UPGRADE NOTICE
DOC=B5FU305.DOC.R8 / FIRM-UP.DOC JANUARY 27, 1995
VERSION 3.0.5
UPGRADES
When upgrading older systems (pre version 3.0.0) with 3.0.5. Be sure to initialize the three new
non-volatile flags for proper operation:
1. ECHO=1
2. MSG=1
3. EXTDX=0
1
Time (msec) Time (msec)
INSTRUCTION Ver 2.0.5 Ver 3.0.5
O1 ON 1.90 1.90
O1 OFF 1.90 1.89
OUT=OUT!0C8h 2.86 2.84
? 1 EQ 1 O1 ON 3.99 3.97
X1=X2 1.72 1.99
X1=X2+1 2.18 2.45
X1=X2-1 2.17 2.45
X1=X2*100 2.33
X1=X2/100 2.36 2.63
ZPE 1.20 1.69
NORM 0 2.00 2.69
O1 ON 2.07 2.03
(GEAR ON)
X1=X2+1 2.37 2.62
(GEAR ON)
2
Time (msec) Time (msec)
INSTRUCTION Ver 2.0.5 Ver 3.0.5
GOSUB 10 &10$ 1.60 1.37
GOTO 10 & 10$ 1.60 1.58
JT 40960 1000 ** 5.80 5.77
JF 40960 1000 ** 5.80 5.77
MA 40960 1000 ** 5.50 5.16
MA 40960 * ** 5.00 4.16
MCI 1000 1000 200 ** 11.00 11.12
MCI 1000 0
MCGO
MRD 1000 100 CW ** 3.50 3.17
NORM 0 2.00 2.50
PX1 3.50 4.52
PX1[8] 3.50 4.52
P”X1=“XI 3.80 5.02
GOSUB 120 & 120$ & 3.40 2.56
RET
TIL 1 EQ 0 2.60 2.44
ZPE 1.00 1.55
? 1 EQ 1 O1 ON 4.00 3.92
IF 1 EQ 0 9.00 9.46
X1=1
ELIF 1 EQ 0
X1=2
ELSE
X1=3
ENDIF
20$ 1.00 1.06
J 1000 ** n/a 3.10
MI 40960 1000 ** n/a 6.23
J 1000 (In Motion) ** n/a 3.66
3
10 seconds (10 / X1) to get the single loop time. time that Output #1 is ON while running the
Perform this operation twice, once with the program with the <instruction> and subtract
<instruction> and once without the from this amount of time the Output #1 is ON
<instruction>. Subtract the amount of time it while running the program without the
takes to run this program with the <instruction> <instruction>. The result is the amount of time
from the time to run without the <instruction>. it takes to execute the instruction.
The result is the amount of time it takes to
execute the instruction.
4$ 5$
X1=0 PLIM 0
TMR1=10000 EN
5$ O1 ON
X1=X1+1 <instruction>
<instruction> O1 OFF
? TMR1 GT 0 GOTO 5 W0
B D 1000
GOTO 5
4
BDS5 SERIAL COMMUNICATIONS 3
DOC=BDS5COM3.DOC Rev 5 JANUARY 31, 1995
There is a need for a more robust ASCII communications protocol for tight computer based
communications. Beginning with BDS5 firmware version 3.1.0, an enhanced serial
communications format will be available. The new protocol adds a serial 8-bit checksum to the
end of each BDS5 command. The BDS5 will process this checksum by comparing it to the actual
checksum of the command string. If the two checksums match, then the BDS5 will echo an
<ack>(06h) character to the serial port and then process the command. If the two checksums do
not match, then the BDS5 will echo an <nak> (15h) to the serial port and the command will not be
processed. The Serial Checksum mode is enabled by turning on the user flag SCKSUM. The
following format will be enabled when the Serial Checksum mode is enabled (SCKSUM=1) :
<command string><checksum><cr>
where :
example :
To calculate the checksum, each ASCII byte in the command should be summed excluding the
<cr>, then drop all but the least significant byte, this is the serial checksum. So the checksum of
“P PFB” is 48.
The only difference between this convention and that of the normal BDS5 is the addition of a
checksum. The checksum will consist of a hex byte represented by two ASCII characters (0-
9, A-F, or a-f).
If the command is valid and checksums, the BDS5 will execute the command and will respond
with :
“<command string><checksum><cr><lf><ack>-->“
where : <ack>=^F=06h=06d
If a checksum error is detected, then the BDS5 will ignore the command and will respond with :
1
“<command string><checksum><cr><lf><nak>-->“
where : <nak>=^U=15h=21d
A 16-bit checksum of the contents of the BDS5 program memory can also be printed to the serial
port. This checksum is contained in the variable :
“PGMCKSUM”
Notice that”[H]” has a checksum of 256 decimal or 0h, so the checksum of “P PGMCKSUM” is
the same as the checksum for “P PGMCKSUM[H]”.
Remember that once the Serial Checksum is turned on, it can only be turned off with a valid
checksum!. The following string will turn off the Serial Checksum :
“SCKSUM=043<cr>“
When entering a command with Serial Checksum enabled, backspaces (<bs>) will correct a typo
and will not themselves effect the checksum.
Also, after entering the BDS5 internal editor mode (ED), the serial checksum will be momentarily
turned off. Upon exiting the editor mode (<Esc>), the BDS5 will resume serial checksum
operation. To enter the editor, type “ED89”<cr>.
2
RS-485 can be used in conjunction with the new serial checksum feature for enhanced
communications.
3
The Echo flag when set to 0 will suppress echoing of all characters received by the BDS5 (this
includes the <cr><lf>termination sequence).
Prompt flag when set to 0 will suppress the BDS5 three character prompt when it is set to 0.
Please note that the BDS5 uses the prompt (-->, ==> etc.) to indicate to the user that it is ready for
another command. This means that until the prompt is transmitted, BDS5 is not listening to the
serial port. When the BDS5 prompt is suppressed, it may be necessary to wait a few milli-seconds
after each command before transmitting the next command.
<command string><checksum><cr>
\A<cr> ;select axis “A” (checksum not required for axis select)
<ack> ;command acknowledged
4
PROMPT=1<cr> ;turn on prompts
--> ;RS-232 prompt
5
BDS5 USER’s MANUAL M93102
PAGE 1 OF 2 PAGES
DESCRIPTION............................................................................................. FILENAME
Foreword.........................................................................................................AFM5 .DOC
PAGE 2 OF 2 PAGES
DESCRIPTION............................................................................................. FILENAME