Because software controls machinery, test any software control for safety
under all potential operating conditions. Failure to do so can result in
damage to equipment and/or serious injury to personnel.
6000 Series products and the information in this user guide are the proprietary property of Parker Hannifin Corporation or its licensers, and
may not be copied, disclosed, or used for any purpose not expressly authorized by the owner thereof.
Since Parker Hannifin constantly strives to improve all of its products, we reserve the right to change this user guide and software and
hardware mentioned therein at any time without notice.
In no event will the provider of the equipment be liable for any incidental, consequential, or special damages of any kind or nature
whatsoever, including but not limited to lost profits arising from or in any way connected with the use of the equipment or this user guide.
Motion Architect is a registered trademark, and Motion Builder, Servo Tuner, Motion OCX Toolkit, CompuCAM and DDE6000 are trademarks
of Parker Hannifin Corporation.
Microsoft and MS-DOS are registered trademarks, and Windows, DDE, Visual Basic, and Visual C++ are trademarks of Microsoft Corporation.
Wonderware is a registered trademark, and InTouch and NetDDE are trademarks of Wonderware Corporation.
Motion Toolbox is a trademark of Snider Consultants, Inc.
LabVIEW is a registered trademark of National Instruments Corporation.
Technical Assistance
North America and Asia:
Compumotor Division of Parker Hannifin
5500 Business Park Drive
Rohnert Park, CA 94928
Telephone: (800) 358-9070 or (707) 584-7558
Fax: (707) 584-3793
FaxBack: (800) 936-6939 or (707) 586-8586
BBS: (707) 584-4059
e-mail: tech_help@cmotor.com
Internet: http://www.compumotor.com
Motion & Control
Contact your local automation technology center (ATC) or distributor, or ...
Europe
Parker Digiplan
21 Balena Close
Poole, Dorset
England BH17 7DX
Telephone: +44 (0)1202 69 9000
Fax: +44 (0)1202 69 5750
• Removed references to the Motion Architect User Guide. Motion Architect no longer
ships with the printed manual. An on-line Adobe Acrobat PDF version is available from our web
site (http://www.compumotor.com).
• Clarified Command Value Substitution guidelines with a “rule of thumb” (see page 6).
• Error programming correction:
the error program (see page 31).
• DLL documentation clarification and correction (see pages 51-62):
- WN956000.DLL is a
- The DLL functions SetNTParam, SetNTMultiCardAddress, and SetDevice return FALSE (“0”) if
the function is successful and TRUE (non-zero value) if the function is unsuccessful.
• Sending ERRLVL1 to the first unit in an RS-232 daisy-chain does not set all other units to
ERRLVL1. You must send ERRLVL1 to each unit individually. (see page 72)
• GOWHEN correction: A preset GO command that is already in motion
new profile using the GOWHEN and GO sequence of commands. (this is true as of rev 4.1 firmware)
DO NOT use the ERRORP CLR command to cancel the branch to
32-bit DLL to be used for Windows 95.
can (not “cannot”) start a
Rev C – summary of changes (MAJOR)
• Updated to accommodate 4.x firmware enhancements (see topics below) and the ZETA6104.
• The presentation of programming examples was modified so that you can copy them from the
Help system (in Motion Architect) or from the PDF file (on our www.compumotor.com web
site) and paste them directly into your program.
• Added documentation to support
• Incorporated the Following User Guide (see Chapter 6).
- Status Commands ............................................................. Page 232
• New back cover with quick-reference material.
(list of commands for common setup parameters)........ Page 78
(incorporated the Following User Guide).......... Page 191
all 6000 products.
READ ON...
for a summary of the enhancements implemented in firmware revision 4.x.
mmm
TopicDescription
Commanded Direction
Reversal (CMDDIR)
Enhancement: The commanded direction polarity reversal command (CMDDIR) is available for the
615n series, the 6270, and all stepper products (610n, AT6n00, 620n). The CMDDIR command
allows you to reverse the direction that the controller considers to be the “positive” direction; this
also reverses the polarity of the counts from the feedback devices. Thus, using the CMDDIR command,
you can reverse the referenced direction of motion without the need to (a) change the connections to
the drive or motor and the feedback device, or (b) change the sign of motion-related commands in
your program.
(SEE_PG._97_OR_101)
Compiled MotionNew Feature: (SEE_PG._163)
Related commands (new):
FOLRNF .... Numerator of Final Slave-to-Master Ratio, Preset Moves
GOBUF...... Store a Motion Segment in Compiled Memory
PLN ......... Loop End, compiled motion
PLOOP...... Loop Start, compiled motion
POUTA...... Output on Axis 1, compiled motion
POUTB...... Output on Axis 2, compiled motion
POUTC...... Output on Axis 3, compiled motion
POUTD...... Output on Axis 4, compiled motion
[
SEG]..... Number of Segments Available In Compiled Memory
TSEG........ Transfer Number of Segments Available, Compiled Memory
VF ........... Final Velocity
Existing commands, modified to support compiled motion:
GOWHEN .... Conditional GOs allowed in compiled motion
PCOMP...... Pre-Compile a Program
PRUN........ Run a Pre-Compiled Program
PUCOMP .... Un-Compile a Program
[
SS] ...... Bit #29 set if compiled memory 75% full, bit #30 set if 100% full
.............. Bit #31 is set if a compile (PCOMP) failed; cleared on power-up,
.............. reset, or after a successful compile. (See Status Reporting,
.............. Additions below for a list of typical causes.)
TRGFN...... Execute GOWHENs or start new master cycle in compiled motion
TSS ......... (see [ SS ] description above)
Contouring (Circular
Interpolation)
Continuous Command
Execution Mode
(COMEXC1)
Enhancement: As of Rev 4.1, contouring is now available for all multi-axis products, steppers
and servos.
(SEE_PG._153)
Enhancement: On-The-Fly changes (pre-emptive motion). In addition to velocity (V),
acceleration (A & AA), and deceleration (AD & ADA), you may now change the positioning mode (MC &
MA), the distance (D), and the Following ratios (FOLRN & FOLRD). These changes will affect the
subsequent GO command executed while moving; thus, this new enhancement is referred to as “preemptive GOs.” (SEE_PG._178)
When pre-processing subsequent moves, the subsequent move may now be executed as soon as the
next GO command is executed. Previous to revision 4.0, the subsequent move could not be executed
until all moves on all axes were completed.
Drive Configuration
& Reset
Enhancements:
New commands added to set up the drive component of the 610n: (SEE_PG._82)
DACTDP .... Enable/disable active damping for speeds greater than 3 rps.
.............. (config. procedure: see the ZETA6104 Installation Guide)
DAREN...... Enable/disable anti-resonance. Anti-resonance is inhibited at or
.............. below 3 rps, and if active damping is enabled.
DELVIS .... Enable/disable electronic viscosity for speeds at or below 3 rps.
.............. (config. procedure: see the ZETA6104 Installation Guide)
DAUTOS .... Enable/disable automatic current standby mode in which current
.............. to the motor (
& torque) is reduced by 50% if no pulses are sent
.............. for 1 second. Full current is restored upon the next pulse.
DMTIND .... Motor inductance (used only for active damping—DACTDP).
DMTSTT .... Motor static torque (used only for active damping—DACTDP).
DWAVEF .... Motor waveform (required for matching the motor to the drive).
615n only: As of Rev 4.1, you may use the new DRESET command to reset the internal drive
independent of the internal controller. The purpose of the DRESET command is to clear fault
conditions with the internal drive.
Encoder Polarity Reversal
(ENCPOL)
Enhancement: The encoder polarity reversal command (ENCPOL) is now available to all 6000
stepper products (AT6n00, 620n, & 610n). Previous to 4.0 the ENCPOL command was only
applicable to the 6270. The ENCPOL command is used to reverse the polarity (counting direction) of
the encoder feedback counts. This is an alternative to reversing the A+ and A- connections to the
encoder. (SEE_PG._97_OR_100)
Change Summary, page 2
TopicDescription
Error Checking
Conditions
Enhancements: (SEE_PG._31)
• 610n: The drive fault error (reported with error status bit #4 and axis status bit #14) can be caused
by any one or combination of the factors list below. To ascertain the exact cause, use the extended
axis status (TASX or ASX):
- Motor fault (disconnected/faulty motor cable or short in motor) — bit #1
- Low-voltage (power) — bit #2
- Maximum drive temperature (131°F, 55°C) exceeded — bit #3
• Error status enhancements
- Error bit #8 is set if a stop input (assigned with INFNCi-D) is activated.
- Error bit #10 is set if the target position specified for a pre-emptive GO or a registration move is
not achievable at the time the pre-emptive GO command is executed or the registration input is
activated. This condition also sets bit #30 in the axis status register (reported with TAS & AS).
To clear error bit #10 and axis bit #30, execute another GO command.
- Error bit #16 is set if a bad command was detected; clear with TCMDER.
• Related commands:
[
ER]...... Error Status (assignment or comparison)
ERROR ..... Error-Checking Enable
ERRORP.... Error Program Assignment
TER......... Transfer Error Status
Fast Status
(bus-based products)
Correction: The bit assignments for the Limits status in block 5 are
TLIM report. (SEE_PG._43)
Clarification: The input buffer is 256 bytes.
Following
Enhancements:
• The new Following Kill (FOLK) command allows you to limit what will kill the Following profile.
That is, it allows the slave to remain in synchronization with the master even after the occurrence
of a drive fault, user fault input, excess position error, or enable input.
• The new Numerator of Final Slave-to-Master Ratio, Preset Moves (FOLRNF) command designates
that the motor will move the load the distance assigned in the preset GOBUF segment, completing
the move at a final ratio of zero. FOLRNF applies only to the first subsequent GOBUF, which marks
an inter-mediate “end of move” within a Following profile. The FOLRNF command is only useful
for
compiled Following moves. (SEE_PG._166)
• The Following User Guide has been incorporated into this document (SEE_PG._192).
Homing
Clarification: Avoid using pause and resume functions during the homing operation. A pause
command (PS or !PS) or pause input (input configured with the INFNCi-E command) will pause the
homing motion. However, when the subsequent resume command (C or !C) or resume input
(INFNCi-E input) occurs, motion will resume at the
Memory Management
Enhancements:
• Compiled Memory status commands:
- System status (TSS & SS) bit #29 is set if compiled memory is 75% full,
bit #30 is set if compiled memory is 100% full
- TSEG & SEG report the number of available segments in compiled memory
• All stand-alone products are shipped with 150,000 bytes of memory. The -M option has thus been
eliminated for these products.
• The second field in the MEMORY command is re-defined to be for “compiled memory” (i.e., anything
compiled with the PCOMP command). (SEE_PG._12)
• These commands are automatically saved in non-volatile memory: (SEE_PG._33)
CMDDIR.... Commanded Direction Polarity (6104, 615n, 620n, 6270 only)
• The two basic ways of creating a complex profile are with compiled buffered motion, or with preemptive GOs. With compiled buffered motion, portions of a profile are built piece by piece, and
stored for later execution. Compiled buffered motion is appropriate for motion profiles with
motion segments of pre-determined velocity, acceleration and distance. With pre-emptive GOs, the
motion profile underway is pre-empted with a new profile when a new GO is issued. The new GO
both constructs and launches the pre-empting profile. Pre-emptive GOs are appropriate when the
desired motion parameters are not known until motion is already underway.
not the same as those for the
Servo products only.
beginning of the homing motion sequence.
Continued on next page
Change Summary, page 3
TopicDescription
On-The-Fly Motion
(continued)
• Affected Commands:
COMEXC .... COMEXC1 mode allows pre-emptive motion with buffered commands
TAS & AS .. Bit #30 is set if the load has already passed the target position
.............. (D) specified in a pre-emptive GO. (also sets error status bit #10)
TER & ER .. Error status bit #10 is set if axis status bit #30 is set.
Registration
Enhancements: (SEE_PG._182)
• New Commands:
REGLOD .... Registration Lock-Out Distance. Establishes a lock-out distance (measured from
.............. the start of motion to the current actual position) to be traveled before a
.............. registration move is allowed.
REGSS...... Registration Single-Shot. Allows only one registration move on the specified axis.
.............. Prevents other triggers from interrupting the registration move in progress.
• Axis status bit #28, reported by the TAS and AS commands, is set to 1 when a registration move
has been initiated by any registration input (trigger). Bit #28 is cleared (set to Ø) upon the next GO
command for that axis.
• If, when the registration input is activated, the registration move profile cannot be performed with
the specified parameters, the 6000 controller will kill the move in progress and set axis status bit
#30 (see TAS & AS). If error-checking bit #10 is enabled with the ERROR command, the controller
will also set error status bit #10 (see TER & ER) and branch to the assigned ERRORP error-handling
program. Axis status bit #30 and error status bit #10 are cleared (set to Ø) upon the next GO
command for that axis.
• As of revision 4.1, Registration is now available
all 6000 products (previous to 4.1, Registration
was available only for stepper products).
Serial Communication
Enhancements: (SEE_PG._70)
• BOT command was created to control the beginning-of-transmission characters for all
responses from the 6000 product.
• As of 4.0, the ECHO command was enhanced with options 2 and 3. The purpose is to
accommodate an RS-485 multi-drop configuration in which a host computer communicates
to the “master” 6000 controller over RS-232 (COM1 port) and the master 6000 controller
communicates over RS-485 (COM2 port) to the rest of the units on the multi-drop. For this
configuration, the echo setup should be configured by sending to the master the following
commands executed in the order shown. In this example, it is assumed that the master's
device address is set to 1. Hence, each command is prefixed with “1_” to address only the
master unit.
1_PORT2... Subsequent command affects COM2, the RS-485 port
1_ECHO2... Echo characters back through the other port, COM1
1_PORT1... Subsequent command affects COM1, the RS-232 port
1_ECHO3... Echo characters back through both ports, COM1 and COM2
TASX ....... Transfer extended axis status. Bit assignments are as follows:
.............. Bit #1: Motor fault (6104 only)
.............. Bit #2: Drive low voltage fault (6104 only)
.............. Bit #3: Drive over-temperature fault (6104 only)
.............. Bit #4: Drive fault input is active
TSEG ....... Transfer number of segments available in compiled memory
• New assignment/comparison operators:
SEG .......... Number of segments available in compiled memory
ASX .......... Extended axis status information
• Pre-emptive Motion and Registration status:
TAS & AS ... Axis status bit #28 is set if a registration move occurs.
................ Bit #30 is set if the profile specified for a pre-emptive GO or registration move
................ is not possible at the time of the GO or the registration input
................ (also sets error status bit #10).
TER & ER .... Error status bit #8 is set if a stop input (INFNCi-D) is activated.
................ Bit #10 is set if axis status bit #30 is set.
................ Bit #16 is set if a bad command is detected; cleared with TCMDER.
• Compiled profile status:
TSS & SS .... System status bit #29 is set if compiled memory is 75% full.
................ Bit #30 is set if compiled memory is 100% full.
................ Bit #31 is set if a compile (PCOMP) failed, cleared on power-up,
................ reset, or after a successful compile. Possible causes include:
................ - Errors in profile design (e.g., change direction while at non-
................ zero velocity, distance & velocity equate to < 1 count/system
................ update, preset move profile ends in non-zero velocity)
................ - Profile will cause a Following error (see TFS & FS status)
................ - Out of memory (see system status bit #30)
................ - Axis already in motion at the time of the PCOMP command
................ - Loop programming errors (e.g., no matching PLOOP or PLN,
................ more than 4 embedded PLOOP/END loops)
TSEG & SEGReport number of available segments in compiled memory.
• Drive Fault Input Status: As of revision 4.1, extended axis status ( TASX & ASX) bit #4 is now
available to check the drive fault input status whether or not the drive is enabled (DRIVE1) or
disabled (DRIVEØ). Previous to revision 4.1, the status of the drive fault input could only be
checked while the drive was enabled (DRIVE1) and was reported only with axis status (TAS & AS) bit
#14 and error status (TER & ER) bit #4. The branch to the error program has not been changed—the
error program is called only if the drive fault occurs while the drive is enabled.
• The INDUST command (which allows you to create your own custom status word based on other
status registers) now allows you to use the status bits from the extended axis status (see TASX
description above). In the syntax INDUSTi-ic, the options for “c” (the status register source) now
include L, M, N and O, representing the extended axis status registers for axes 1, 2, 3 and 4,
respectively. For additional details on creating a custom user status word, refer to the INDUST
command description.
• As of Rev 4.1, the TVELA command is now applicable to all stepper controllers using encoder
feedback (previously only for servos). For steppers, the TVELA command reports the current
velocity (in revs/sec) as derived from the encoder. The reported value is
The VELA assignment/comparison operator for TVELA is now available as of rev 4.0.
• The Target Zone mode allows you to define what the controller considers a “completed move,”
based on specified end-of-move distance, velocity, and settling time parameters. As of revision
4.0, the Target Zone mode is now applicable to
mode was available only for servo products). NOTE: Steppers require encoder feedback (and ENC1
mode) for this feature. (SEE_PG._105)
• Target Zone Commands:
STRGTE.... Target Zone Mode Enable/Disable
STRGTD.... Target Distance Zone
STRGTT.... Target Settling Timeout Period
STRGTV.... Target Velocity Zone
not affected by scaling.
all 6000 products (previous to 4.0, the Target Zone
Change Summary, page 5
New Commands in Revision 4.x
(including product compatibility)
CommandName
[Send Response to All PortsXXXXX
]Send Response to Alternate PortXXXXX
ASXExtended Axis StatusXXXXXXXXX
BOTBeginning of Transmission CharactersXXXXXXXXX
DACTDPActive DampingX
DARENAnti-ResonanceX
DAUTOSAuto Current StandbyX
DELVISElectronic ViscosityX
DMTINDMotor InductanceX
DMTSTTMotor Static TorqueX
DRESETDrive ResetX
DRPCHKRemote Port CheckXXXXX
DWAVEFWaveformX
FOLKFollowing KillXXXXX
FOLRNFNumerator of Final Slave-to-Master RatioXXXXXXXXX
FOLSNDFollowing Step & DirectionSSXXXXXXX
GOBUFStore a Motion Segment in a BufferXXXXXXXXX
PCOMP *Compile a ProgramXXXXXXXXX
PLNLoop End, Compiled MotionXXXXXXXXX
PLOOPLoop Start, Compiled MotionXXXXXXXXX
PORTDesignate Communications PortXXXXX
POUTAOutput on Axis 1, Compiled MotionXXXXXXXXX
POUTBOutput on Axis 2, Compiled MotionXXXXXXX
POUTCOutput on Axis 3, Compiled MotionXX
POUTDOutput on Axis 4, Compiled MotionXX
PRUN *Run a Compiled ProgramXXXXXXXXX
PUCOMP *Un-Compile a ProgramXXXXXXXXX
REGLODRegistration Lock-Out DistanceXXXXXXXXX
REGSSRegistration Single ShotXXXXXXXXX
[ SEG ]Number of Free Segment BuffersXXXXXXXXX
TASXTransfer Extended Axis StatusXXXXXXXXX
TSEGTransfer Number of Free Segment BuffersXXXXXXXXX
[ VELA ]Velocity (Actual) AssignmentSSXXXXXXX
VFFinal VelocityXXXXXXXXX
XONOFFEnable/Disable XON/XOFFXXXXX
AT6200
AT6400
AT6250
AT6450
610n
615n
620n
625n
6270
*
Modified to support compiled motion (previously, these commands supported only path contouring).
S
Applicable only to the standard (not OEM) version of the product.
Change Summary, page 6
TABLE OF CONTENTS
Overview
About This Manual.................................................... i
Organization of This Manual ................................. i
Programming Examples...................................... ii
Reference Documentation................................... ii
Assumptions of Technical Experience................... ii
Product Name References (What’s in a Name?)....... iii
Before You Begin .................................................... iii
Support Software .................................................... iii
Motion Architect................................................ iii
Motion Builder.................................................. iv
Motion Toolbox ................................................ iv
DOS Support Software ...................................... iv
Technical Support .................................................. iv
This manual is designed to help you implement the 6000 Series Product's features in your
application. Detailed feature descriptions are provided, including application scenarios and
programming examples. For details on each 6000 Series command, refer to the 6000 SeriesSoftware Reference.
Organization of This Manual
The feature descriptions are grouped into chapters as listed below.
ChapterInformation
Chapter 1.
Chapter 2.
Chapter 3.
Chapter 4.
Chapter 5.
Chapter 6.
Chapter 7.
Programming Fundamentals
Communication
Basic Operation Setup
User Interface Options
Custom Profiling
Following
Troubleshooting
Discussion of essential programming guidelines and standard
programming features such as branching, variables, interrupts, error
handling, etc.
Communication considerations, such as using Motion Architect,
DDE, DLL and OCX tools, bus communication registers, PC-AT
interrupts, DOS Support Disk communication files, RS-232 daisychains and RS-485 multi-drops, etc.
General operation setup conditions, such as number of axes, scaling
factors, feedback device setup, end-of-travel limits, homing, etc.
Considerations for implementing various user interfaces such as
programmable I/O, a joystick, an RP240, etc.
Descriptions of custom profiling features such as S-Curves, timed
data streaming, linear and circular interpolation, compiled profiles,
on-the-fly motion profiling, registration, and synchronized motion.
Feature descriptions and application examples for using Following
features.
Methods for isolating and resolving hardware and software
problems.
User Guide FeedbackPlease send your comments to our email address: 6000user@cmotor.com
Overview
i
Programming Examples
Programming examples are provided to demonstrate how the 6000 product's features may be
implemented. These examples are somewhat generalized, due to the diverse nature of the
family of 6000 Series products and their application; consequently, some attributes, such as
the number of axes used or the I/O bit pattern referenced, may differ from those available with
your particular 6000 product.
Additional sample programs can be found in the APP_PRGS sub-directory of the Motion
Architect directory (MA6000\APP_PRGS). These files may be opened and edited in Motion
Architect's Editor module, then downloaded using Motion Architect's Terminal module.
TIP: From the Help menu in Motion Architect and from our web site (www.compumotor.com),
you can access the online versions of this Programmer's Guide and the Software Reference. You
can copy the programming examples from these online documents and paste them into Motion
Architect's Program Editor. Then you can edit the code for your application requirements and
download the program using the Terminal Emulator. For additional tips on using the Editor and
Terminal, refer to page 2 in this manual or to the Motion Architect User Guide.
Reference Documentation
This document is intended to accompany the documents listed below, as part of the 6000
product user documentation set.
Reference DocumentInformation
6000 product installation guideHardware-related information specific to the 6000 Series product.
ONLINE ACCESS:
Online versions of this
Programmer's Guide and
the Software Reference
are available from the Help
menu in Motion Architect.
6000 Series Software Reference
INTERNET ACCESS:
These documents are also
available to view and print
from our web site
(www.compumotor.com).
Motion Architect User Guide
RP240 User Guide
User guides for optional software tools:☞
• Product description
• Installation instructions
• Drive information (packaged controller/drive products only)
• Hardware reference
• Troubleshooting procedures
• Servo tuning (procedures for tuning without Servo Tuner™)
• Electrical noise reduction techniques
*Detailed descriptions of all 6000 Series commands. Quick-
reference tables are also provided:
• Product-to-command compatibility table
• X-to-6000 language compatibility table
• ASCII table
Overview and user tips for Motion Architect features, and
guidelines for using the dynamic link library (DLL). This manual
is only available in Acrobat PDF format from our web site.
Detailed user instructions for the RP240 remote operator panel
(optional peripheral device for serial based products only).
Motion Builder Startup Guide
☞
Servo Tuner User Guide
☞
CompuCAM User Guide
☞
Motion Toolbox User Guide
☞
Motion OCX Toolkit User Guide
* Also available as an on-line hypertext utility, accessed from the Help menu in Motion Architect.
Assumptions of Technical Experience
To effectively use the information in this manual, you should have a fundamental
understanding of the following:
• Electronics concepts such as voltage, switches, current, etc.
• Motion control concepts such as motion profiles, torque, velocity, distance, force, etc.
• Programming skills in a high-level language such as C, BASIC, or Pascal is helpful
• IBM/compatible bus architecture and communication protocol (bus-based products only)
• If you are new to the 6000 Series Programming Language, read Chapter 1 thoroughly.
ii
6000 Series Programmer's Guide
Product Name References (What’s in a Name?)
This document sometimes uses one product name to reference an entire subset of the 6000
family (e.g, “AT6n50” refers to the AT6450 and the AT6250; “AT6n00” refers to the AT6200
and the AT6400). Unless otherwise noted, references to a standard product are applicable to the
OEM version as well (e.g., AT6400 and OEM-AT6400; 6200 and OEM6200).
Before You Begin
Before you begin to implement the 6000 controller's features in your application you should
complete the items listed below.
• Complete all the installation and test procedures provided in your 6000 product's
Installation Guide.
• If you are using a servo control product, complete the tuning procedures. If you are using
Servo Tuner, use the instructions in the Servo Tuner User Guide. If you are using
an empirical tuning method (not Servo Tuner), refer to the procedures provided in the
Tuning appendix of the product's Installation Guide.
• Keep the 6000 Series Software Reference close at hand to answer questions about
specific 6000 Series commands. If you are new to the 6000 Series Programming
Language, read Chapter 1 (Programming Fundamentals) thoroughly.
Support Software
These software development tools are available to help you program your 6000 Series product.
All 6000 Series products are shipped with Motion Architect, an intuitive Microsoft® Windows™
based programming tool. A brief description of Motion Architect's basic features is provided
below. For more detailed user information, refer to the Motion Architect User Guide.
• System Configurator and Code Generator: Automatically generate controller
code of basic system set-up parameters (I/O definitions, feedback device operations, etc.).
• Program Editor: Create blocks or lines of 6000 controller code, or copy portions of
code from previous files. You can save program editor files for later use in BASIC, C,
etc., or in the terminal emulator or test panel.
• Terminal Emulator: Communicating directly with the 6000 controller, the terminal
emulator allows you to type in and execute controller code, transfer code files to and from
the 6000 product. If you are using a bus-based 6000 controller, you can use this module
to transfer (download) the soft operating system.
• Test Panel and Program Tester: You can create your own test panel to run your
programs and check the activity of I/O, motion, system status, etc. This can be invaluable
during start-ups and when fine tuning machine performance.
• On-line Context-sensitive Help and Command Reference: These on-line
resources provide help information about Motion Architect, as well as interactive access
to the contents of the 6000 Series Programmer's Guide (this document) and the
6000 Series Software Reference.
• Dynamic Link Libraries: DLL device drivers are provided for bus-based controller
customers who wish to create a Windows-based application to interface with the controller.
Overview
iii
Add-On
Modules
Motion Builder™
Motion Toolbox™
Add-on modules for Motion Architect are available to aide in other programming and setup
tasks. These modules are available from your local Automation Technology Center (ATC) or
distributor. For detailed user information, please refer to the respective user guide.
• Servo Tuner™ (Tuning and Data Gathering Tool): Tune the servo drives and the 6000
servo controller and receive instant data feedback on customizable displays.
• CompuCAM™: CAD-to-Motion (CAM) software allows you to translate DXF,
HP-GL, and G-Code files into 6000 Series Language motion programs.
Motion Builder, a Microsoft Windows-based iconic
programming environment, allows expert and novice
programmers to easily program Compumotor’s 6000 Series
products without learning a new programming language or
syntax. Use Motion Builder to completely configure the
motion controller; program the motion with drag-and-drop
visual icons; compile, run and debug the program.
Motion Toolbox is a library of LabVIEW® virtual instruments (VIs) for Compumotor's 6000
Series controllers. Motion Toolbox allows LabVIEW programmers to develop motion
control systems for a wide range of applications including automated test and manufacturing,
medical and biotech, metering and dispensing, machine control, and laboratory automation.
Motion Toolbox provides developers with these capabilities:
• Motion control, including velocity, acceleration, deceleration, go, stop, kill, etc.
• Setup, control, and command file transfer
• Counter and timer configuration and control
• Indexer, encoder, and drive configuration
• Home, hardware limit, and soft limit configuration
• Jogging and joystick configuration
• I/O setup and function configuration
• Fast status querying of I/O, limit, home, motor and encoder position, velocity, etc.
DOS Support Software
In addition to Motion Architect, support software written for the DOS environment is
available for all 6000 Series products.
Details about these
software tools are
provided in Chapter 2,
Communication
.
The 6000 DOS Support Disk, which provides a program for terminal emulation and program
editing for serial (“stand-alone”) products, is available from your local ATC or distributor.
Bus-based products are shipped with a DOS support disk (see diskette labeled with the
product's name) that includes the soft operating system (.OPS file) and programs that
demonstrate how to communicate with the 6000 product.
Technical Support
For solutions to your questions about implementing 6000 product software features, first look
in this manual. Other aspects of the product (command descriptions, hardware specs, I/O
connections, graphical user interfaces, etc.) are discussed in the respective manuals listed above
in Reference Documentation (see page ii).
iv
If you cannot find the answer in this documentation, contact your local Automation
Technology Center (ATC) or distributor for assistance.
If you need to talk to our in-house application engineers, please contact us at the numbers
listed on the inside cover of this manual. (The phone numbers are also provided when you
issue the HELP command to the 6000 controller.)
6000 Series Programmer's Guide
CHAPTER ONE
Programming
Fundamentals
1
IN THIS CHAPTER
This chapter is a guide to general 6000 programming tasks. It is divided into these main topics:
Every 6000 Series controller is shipped with Motion Architect, a Windows-based
programming tool designed to simplify your programming efforts. The main features of
Motion Architect are briefly described below. For detailed user information, refer to the
Motion Architect User Guide.
• Setup Module: Provides dialog boxes for you to select basic system setup parameters
(I/O definitions, position feedback, etc.) and then automatically generates a fullycommented “setup program.”
• Editor Module : Create blocks or lines of 6000 controller code, or copy portions of
code from previous files. You can save program editor files for later use in BASIC, C,
etc., or in the terminal emulator or test panel.
• Terminal Module: Communicating directly with the 6000 controller, the terminal
emulator allows you to type in and execute controller code and transfer code files to and
from the 6000 controller.
• Panel Module: You can create your own test panel to run your programs and check
the activity of I/O, motion, system status, etc. This can be invaluable during start-ups
and when fine tuning machine performance.
• On-line Help and User Documentation: Under the Help menu, you will find
user information about Motion Architect, as well as interactive access to the contents of
the 6000 Series Programmer's Guide (the document you are reading right now)
and the 6000 Series Command Reference.
Add-on modules for Motion Architect are available to aide in other programming and set-up
tasks. These modules are available through your local Automation Technology Center.
• Servo Tuner™: Tune your servo controller and the attached servo drives and receive
instant data feedback on customizable displays. For detailed user information, refer to the
Servo Tuner User Guide.
• CompuCAM™: CompuCAM allows you to import 2D geometry from CAD
programs (DXF), plotter files (HP-GL), or NC programs (G-Code), and then translate the
geometry into 6000 motion programs. These programs can be further edited in Motion
Architect's Program Editor module and dowloaded to the 6000 controller from the
Terminal Emulator or Test Panel modules. A typical use of CompuCAM is to automate
the process for developing 6000 Series contouring code for an application. For detailed
user information, refer to the CompuCAM User Guide.
Side-by-Side Editor and Terminal Windows
Typically, the programming process is an iterative exercise in which you create a program,
This side-by-side
technique is
demonstrated in the
programming
scenario on page 8.
2
6000 Series Programmer's Guide
test it, edit it, test it ... until you are satisfied with the results. To help with this iterative
process, we suggest using Motion Architect's Editor and Terminal modules in a side-by-side
fashion (open an Editor session and a Terminal session and re-size the windows so that you
can see both at the same time). In doing so you can quickly jump back and forth between
editing a program (Editor function) and downloading it to the product and checking
programming responses and error messages (Terminal functions).
(see illustration below)
Command Syntax
Overview
The 6000 Series language provides high-level constructs as well as basic motion control
building blocks. The language comprises simple ASCII mnemonic commands, with each
command separated by a command delimiter. Upon receiving a command followed by a
command delimiter, the 6000 controller places the command in its internal command queue.
Here the command is executed in the order in which it is received. The command may be
specified as immediate by placing an optional exclamation point (!) in front of the command.
When a command is specified as an immediate command, it is placed at the front of the
command queue, where it is executed immediately.
The command delimiter can be one of three characters, a carriage return, a line-feed, or a colon
(:). Spaces and tabs within a command are processed as neutral characters. Comments can be
specified with the semicolon (;) character — all characters following the semicolon until the
command delimiter are considered program comments.
There is no case sensitivity with the command language. For instance, the command TSTAT
is the same as the command tstat.
Program Editor: Create and edit
programs, save them, and then
download them from the Terminal
module.
Terminal Emulator: Communicate directly with the
6000 controller. Download files containing
stand-alone commands and/or complete programs
or subroutines. Check system responses. Upload
programs from the 6000 controller.
Some commands contain one or more data fields in which you can enter numeric or binary
values or text. The A command (syntax: A<r>,<r>,<r>,<r>) is an example of a
command that requires you to enter numeric values (e.g., the A5,6,7,8 command assigns
acceleration values of 5, 6, 7, and 8 units/sec2 to axes #1, #2, #3, and #4 respectively). The
DRIVE command (syntax: DRIVE<b><b><b><b>) is an example of a command that
requires binary values (e.g., the DRIVE11ØØ command enables drives #1 and #2 and disables
drives #3 and #4). The STARTP command (syntax: STARTP<t>) is an example of a
command that requires text (e.g., the STARTP powrup command assigns the program called
“powrup” as the start-up program).
Chapter 1. Programming Fundamentals
3
Description of Syntax Letters and Symbols
The command descriptions provided within the 6000 Series Software Reference use
alphabetic letters and ASCII symbols within the Syntax description to represent different
parameter requirements (see example below).
INENInput Enable
TypeInputs or Program Debug Tools
Syntax Symbology
☞
Syntax<!>INEN<d><d><d>...<d>>
Unitsd = Ø, 1, E, or X
RangeØ = off, 1 = on, E = enable, X = don't change
DefaultE
ResponseINEN:*INENEEEE_EEEE_EEEE_EEEE_EEEE_EEEE_EEEE
See Also[ IN ], INFEN, INFNC, INLVL, INPLC, INSTW, TIN
aRepresents an axis specifier, numeric value from 1 to 4 (used only to elicit a
b
cRepresents a character (A to Z, or a to z)
dRepresents the values 1,Ø, X or x, E or e ; does not require field separator
iRepresents a numeric value that cannot contain a decimal point (integer values
rRepresents a numeric value that may contain a decimal point, but is not required
tRepresents a string of alpha numeric characters from 1 to 6 characters in length.
!Represents an immediate command. Changes a buffered command to an
,Represents a field separator. Commands with the symbol r or i in their Synt ax
response from the indexer)
*
Represents the values 1,Ø, X or x; does not require field separator between
values.
between values. E or e enables a specific command field. X or x leaves the
specific command field unchanged or ignored.
only). The numeric range varies by command. Field separator (,) required.
to have a decimal point. The numeric range varies by command. Field separator
(,) required.
The string must start with an alpha character.
immediate command. Immediate commands are processed immediately, even
before previously entered buffered commands.
description require field separators. Commands with the symbol b or d in their
Synt ax description do not require field separators (but they may be included).
See
General Guidelines
table below for more information.
@Represents a global specifier, where only one field need be entered. Applicable
< >Indicates that the item contained within the < > is optional, not required by that
[ ]Indicates that the command between the [ ] must be used within the syntax of
*
The ASCII character b can also be used within a command to precede a binary number. When the b is
used in this context, it is not to be replaced with a Ø, 1, X, or x. Examples are assignments such as
VARB1=b1ØØØ1, and comparisons such as IF(IN=b1ØØ1X1).
4
6000 Series Programmer's Guide
to all commands with multiple command fields. (e.g., @V1 sets velocity on all
axes to 1 rps)
command. NOTE: Do not confuse with <cr>, <sp>, and <lf>, which refer to the
ASCII characters corresponding to a carriage return, space, and line feed,
respectively.
another command, and cannot be used by itself.
General Guidelines for Syntax
TopicGuidelineExamples *
Neutral Characters:
• Space (
• Tab (
Command Delimiters:
• Carriage rtn (
• Line feed (
• Colon (:)
Comment Delimiter (;)All text between a comment delimiter and a
Field Separator (,)Commands with the symbol r or i in their
<sp>
<tab>
)
)
<cr>
<lf>
Using neutral characters anywhere within a
command will not affect the command.
(In the examples on the right, a space is
represented by
carriage return is
All commands must be separated by a
)
command delimiter. A carriage return is the
)
most commonly used delimiter. To use a line in
a live terminal emulator session, press ctrl/J.
The colon (:) delimiter allows you to place
multiple commands on one line of code, but
only if you add it in the program editor (not
during a live terminal emulator session).
command delimiter is considered
comments
Synt ax description require field separators.
Commands with the symbol b or d in their
Synt ax description do not require field
separators (but they may be included).
Axes not participating in the command need
not be specified; however, field separators
that are normally required must be specified.
<sp>
, a tab is
<cr>
.)
.
<tab>)
program
, and a
Set velocity on axis 1 to 10 rps and axis 2 to 25 rps:
V
<sp>
1Ø,
<sp>
25,,
<cr>
Add a comment to the command:
V 1Ø, 25,,
Set acceleration on axis 2 to 10 rps
A,1Ø,,
A,1Ø,,
A,1Ø,, : V,25,, : D,25ØØØ,, : @GO
Add a comment to the command:
V1Ø<tab> ;set velocity
Set velocity on axes 1-4 to 10, 25, 5 and 10 rps,
respectively:
V1Ø,25,5,1Ø
Initiate motion on axes 1, 3 and 4:
GO1Ø11
GO1,Ø,1,1
Set velocity on axis 2 to 5 rps:
V,5,,
<cr>
<lf>
<cr>
<cr>
<tab>
;set accel
<cr>
<cr>
2
:
<cr>
<cr>
<cr>
Global Command
Identifier (@)
Bit Select Operator (.) The bit select operator allows you to affect
Case SensitivityThere is no case sensitivity. Use upper or
* Non-visible characters are represented: space =
NOTE: The command line is limited to 80 characters (excluding spaces).
When you wish to set the command value
equal on all axes, add the @ symbol at the
beginning of the command (enter only the
value for one command field).
one binary bit without having to enter all the
preceding bits in the command.
Syntax for setup commands:
[commandname].[bit#]-[binaryvalue]
Syntax for conditional expressions:
[commandname].[bit#]=[binaryvalue]
lower case letters within commands.
right precedence.
<sp>
, tab =
<tab>
, carriage return (or enter key) =
Set velocity on all axes to 10 rps:
@V1Ø
<cr>
Enable error-checking bit #9:
ERROR.9-1
IF statement based on value of axis status bit #12:
IF(1AS.12=b1)
Initiate motion on axes 1, 3 and 4:
GO1Ø11
go1Ø11
VAR1=5+3*2
Result: Variable 1 is assigned the value of 16
(8*2), not 11 (5+6).
<cr>
<cr>
<cr>
<cr>
<cr>
<cr>
, line feed =
<lf>
.
Chapter 1. Programming Fundamentals
5
Command Value Substitutions
Many commands can substitute one or more of its command field values with one of these
substitution items (demonstrated in the programming example below):
VARB...... Uses the value of the binary variable to establish all the command fields.
VAR ....... Places current value of the numeric variable in the corresponding command field.
READ...... Information is requested at the time the command is executed.
DREAD.... Reads the RP240's numeric keypad into the corresponding command field.
DREADF .. Reads the RP240's function keypad into the corresponding command field.
TW ......... Places the current value set on the thumbwheels in the corresponding command field.
DAT ....... Places the current value of the data program (DATP) in the corresponding command field.
Programming Example: (NOTE: The substitution item must be enclosed in parentheses.)
VAR1=15 ; Set variable 1 to 15
A5,(VAR1),4,4 ; Set acceleration to 5,15,4,4 for axes 1-4, respectively
VARB1=b1101XX1 ; Set binary variable 1 to 1101XX1 (bits 5 & 6 not affected)
GO(VARB1) ; Initiate motion on axes 1, 2 & 4 (value of binary
; variable 1 makes it equivalent to the GO1101 command)
OUT(VARB1) ; Turn on outputs 1, 2, 4, and 7
VARS1="Enter Velocity" ; Set string variable 1 to the message "Enter Velocity"
V2,(READ1) ; Set the velocity to 2 on axis 1. Read in the velocity for
; axis 2, output variable string 1 as the prompting message
; 1. Operator sees "ENTER VELOCITY" displayed on the screen.
; 2. Operator enters velocity prefixed by !' (e.g., !'20).
HOMV2,1,(TW1) ; Set homing velocity to 2 and 1 on axes 1 and 2, respectively.
; Read in the home velocity for axis 3 from thumbwheel set 1
HOMV2,1,(DAT1) ; Set homing velocity to 2 and 1 on axes 1 and 2, respectively.
; Read home velocity for axis 3 from data program 1.
Not all of the commands allow command field substitutions. In general, commands with a
binary command field (<b> in the command syntax) will accept the VARB substitution.
Commands with a real or integer command field (<r> or <i> in the command syntax) will
accept VAR, READ, DREAD, DREADF, TW or DAT.
Assignment and Comparison Operators
Comparison and assignment operators are used in command arguments for various functions
such as variable assignments, conditional branches, wait statements, conditional GOs, etc.
Some examples are listed below:
• Assign to numeric variable #6 the value of the encoder position on axis #3 (uses the PE
operator): VAR6=3PE
• Wait until inputs #3 & #6 become active (uses the IN operator): WAIT(IN=bxx1xx1)
• Continue until the value of numeric variable #2 is less than 36: UNTIL(VAR2<36)
• IF condition based on if a target zone timeout occurs on axis 2 (uses the AS axis status
operator, where status bit #25 is set if a target zone timeout occurs): IF(2AS.25=b1)
The available comparison and assignment operators are listed below. For full descriptions,
refer to their respective descriptions in the 6000 Series Software Reference
(be sure to refer only to the commands in brackets—e.g., A is the acceleration setup command,
but [A] is the acceleration assignment/comparison operator).
RULE OF THUMB
6
6000 Series Programmer's Guide
* denotes operators that
have a correlated status
display command.
(e.g., To see a full-text
description of each axis
status bit accessed with
the AS operator, send
the TASF command to
the 6000 controller.)
See page 232.
A........... Acceleration
AD ......... Deceleration
ANI........ Voltage at the ANI analog inputs (servos with ANI option) *
ANV........ Voltage at the joystick analog channels *
AS ......... Axis status *
ASX........ Extended axis status (additional axis status items) *
CA ......... Captured ANI analog input voltage *
CNT........ Counter value (steppers only) *
D........... Distance
DAC........ Digital-to-analog converter (output voltage) value (servos only) *
DAT........ Data program number
DPTR...... Data pointer location *
DREAD .... Data from the numeric keypad on the RP240 (stand-alone products only)
DREADF... Data from the function keypad on the RP240 (stand-alone products only)
ER ......... Error status *
FB ......... Position of current selected feedback sources *
FS ......... Following status *
IN ......... Input status (input bit patterns provided in Chapter 3, page 107) *
INO........ “Other” input status (joystick inputs, and P-CUT or ENBL input) *
LDT........ Position of the LDT (hydraulic servos only) *
LIM........ Limit status (end-of-travel limits and home limits) *
MOV........ Axis moving status
NMCY...... Current master cycle number *
OUT........ Output status (output bit patterns provided in Chapter 3, page 107) *
PANI...... Position of ANI analog input, at 819 counts/volts unless otherwise scaled (servos) *
PC ......... Commanded position (servos only) *
PCA........ Captured ANI input position (servos with ANI option only) *
PCC........ Captured commanded position (servos only) *
PCE........ Captured encoder position *
PCL........ Captured LDT position (hydraulic servos only) *
PCM........ Captured motor position (steppers only) *
PE ......... Position of encoder *
PER........ Position error (n/a to OEM-AT6400) *
PM ......... Position of motor (steppers only) *
PMAS...... Current master cycle position *
PSHF...... Net position shift since constant following ratio *
PSLV...... Current commanded position of the slave axis *
READ...... Read a numeric value to a numeric variable (VAR)
SEG........ Number of segments available in Compiled Profile memory *
SS ......... System status *
TIM........ Timer value *
TW ......... Thumbwheel data read
US ......... User status *
V........... Velocity (programmed)
VAR........ Numeric variable substitution
VARB...... Binary variable substitution
VEL........ Velocity (commanded by the controller) *
VELA...... Velocity (actual, as measured by a position feedback device) *
VMAS...... Current velocity of the master axis *
Bit Select
Operator
Binary and Hex
Values
The bit select operator (.) makes it easier to base a command argument on the condition of one
specific status bit. For example, if you wish to base an IF statement on the condition that a
user fault input is activated (error status bit #7 is a binary status bit that is “1” if a user fault
occurred and “Ø” if it has not occurred), you could use this command: IF(ER=bxxxxxx1).
Using a bit select operator, you could instead use this command: IF(ER.7=b1).
Side Note: You can use a bit select operator to set a particular status bit (e.g., to turn on
programmable output #5, you would type the OUT.5-1 command; to enable error-checking
bit #4 to check for drive faults, you would type the ERROR.4-1 command). You can also
check specific status bits (e.g., to check axis 2's axis status bit #25 to see if a target zone
timeout occurred, type the 2TAS.25 command and observe the response).
When making assignments with or comparisons against binary or hexadecimal values, you
must precede the binary value with the letter “b” or “B”, and the hex value with “h” or “H”.
Examples: IF(IN=b1xØ1) and IF(IN=h7F). In the binary syntax, an “x’ simply means
the status of that bit is ignored. Refer also to Using Binary Variables (page 22).
Chapter 1. Programming Fundamentals
7
Related
Operator
Symbols
Command arguments include special operator symbols (e.g., +, /, &, ', >=, etc.) to perform
bitwise, mathematical, relational, logical, and other special functions. These operators are
described in detail, along with programming examples, at the beginning of the CommandDescriptions section of the 6000 Series Software Reference.
Programmable Inputs and Outputs Bit Patterns
The total number of inputs and outputs (I/O) varies from one 6000 Series product to another.
I/O pin outs,
specifications, and
circuit drawings are
provided in each 6000
Series product's
installation guide.
Consequently, bit patterns for the programmable I/O also vary by product. For example, the
AT6400's TRG-A trigger input is represented by programmable input bit #25, but the 6104's
TRG-A trigger input is bit #17. Bit numbers are referenced in commands like
WAIT(IN.13=b1), which means wait until programmable input #13 becomes active. To
ascertain your product's I/O offering and bit patterns, refer to Chapter 3 (page 107).
Creating Programs
A program is a series of commands. These commands are executed in the order in which they
are programmed. Immediate commands (commands that begin with an exclamation point [!])
cannot be stored in a program. Only buffered commands may be used in a program.
Debugging Programs:
Refer to page 231 for
methods to isolate and
resolve programming
problems.
A subroutine is defined the same as a program, but it is executed with an unconditional branch
command, such as GOSUB, GOTO, or JUMP, from another program (see page 23 for details
about unconditional branching). Subroutines can be nested up to 16 levels deep. NOTE: The
6000 family does not support recursive calling of subroutines.
Another kind of program is a compiled profile. Compiled profiles are defined like programs
(using the DEF and END commands), but are compiled with the PCOMP command and executed
with the PRUN command. A compiled profile could be a multi-axis contour (a series of arcs
and lines), an individual axis profile (a series of GOBUF commands), or a compound profile
(combination of multi-axis contours and individual axis profiles). For more information on
contours, refer to Contouring in Chapter 5, page 153. For more information on compiled
individual axis profiles, refer to Compiled Motion Profiling in Chapter 5, page 163.
Program Development Scenario
To best understand the process of developing 6000 programs, we invite you to follow along
on a program development scenario. The scenario covers these programming tasks:
1. Set up the programming environment (using Motion Architect's Editor and Terminal).
2. Create a simple motion program in the Editor.
3. Download the program, via the Terminal, to the controller.
4. Execute (run) the program from the Terminal.
5. Edit the program, redownload it, and run it again.
1. Set up Motion
Architect.
Typically, the programming process is an iterative exercise in which you create a program,
test it, edit it, test it ... until you are satisfied with the results. To help with this iterative
process, we suggest using Motion Architect's Editor and Terminal modules in a side-by-side
fashion (open an Editor session and a Terminal session and re-size the windows so that you
can see both at the same time). In doing so you can quickly jump back and forth between
editing a program (Editor function) and downloading it to the product and checking
programming responses and error messages (Terminal functions).
2. Define a program.Type in the commands as shown in the Editor window below. The Editor window also shows
program comments to help you understand the purpose of each command and the implications
of executing motion. Notice that the comments are placed after the comment delimiter (;).
NOTE: This is a programming example for single-axis motion. When programming
multiple axes, you would use the additional command fields. For example, the command for
setting the acceleration on axes one and two to 12 units/sec2 and axes three and four to 25
units/sec2 would be A12,12,25,25; and setting axes one and two to preset positioning
mode and axes three and four to continuous positioning mode requires the MCØØ11 command.
Use these
commands:
DEL EXAMPL
DEF EXAMPL
DRIVE1
MC0
MA0
LH3
(or LH0)
A25
AD25
V5
D8000
GO
END
The program is deleted (DEL EXAMPL) before it is
defined; this is done to avoid program errors and
unexpected motion when downloading the program
to the controller.
Make a habit of deleting before defining.
Program definition begins with the Begin Program
Definition (DEF) command followed by a program
name of ≤ 6 characters (e.g., DEF EXAMPL).
The End Program Definition (END) command ends
the program definition.
All buffered commands that you enter after DEF
and before END will be executed when the program
is run.
All text between the comment delimiter (;) and the
carriage return are considered “program comments.”
The warning at the beginning of this program file
comprises 8 lines of comments.
Chapter 1. Programming Fundamentals
9
3. Download the
program.
FIRST: Before you can download the program, you
must save it to your hard drive (select File/Save in the
Editor). The file is saved with a “.PRG” extension. In
the Save dialog box, name the file “EXAMPL.PRG”.
Follow these steps to download the program file to the
controller:
1. Power up the controller. Notice the power-up
message (like the one shown below) display in your
terminal emulator window.
Save the program first (Editor).
2. From the Transfers menu in the Terminal window,
Download the program (Terminal).
select Send Motion Program(s). From the dialog box,
select the EXAMPL.PRG file and click OK. The first
time you download the file, you will see two messages
display: “*UNDEFINED LABEL” and ”DELEXAMPL”
(on subsequent downloads of the same file, you would
instead see the message “NO ERRORS”).
TIP: If the controller is executing a program when you try to download a program
file, the program(s) from the program file will not download and the contents of the
program(s) will be displayed to the terminal emulator window. To prevent this error,
“kill” program execution (and motion) before downloading the program file — use
the !K command or the ctrl/K command (ctrl/K is an easier keystroke combination).
3. To verify that the EXAMPL program resides in the controller's memory, type the TDIR
command and press the carriage return or enter key.
Power-up message for the ZETA6104
controller.
10
Messages for first-time download
(subsequent download will yield the
message “NO ERRORS”).
The TDIR status command yields a
3-line response. The first line shows
the the EXAMPL program resides in
memory and uses 50 bytes. The
second line shows the status of
memory available for program
storage (this is where EXAMPL is
stored). The third line shows the
status of memory available to store
compiled motion profiles (programs
compiled with the PCOMP command).
6000 Series Programmer's Guide
4. Run the program.
Other methods of
executing programs are
listed in
Executing
Programs
(page 14).
WARNING: Executing this program will cause motion. If you coupled the motor(s)
to the load, make sure it is safe to move the load without damaging equipment or injuring
personnel.
To run the program from the terminal emulator, type
the name of the program (in this case it is EXAMPL)
and press the carriage return or enter key.
If you are using a stepper, the default resolution will
most likely be set to 25,000 steps per rev; therefore,
running the EXAMPL program should move the motor
about 1/3 rev.
If you are using a servo, the default resolution will
most likely be set to 4,000 counts per rev; therefore,
running the EXAMPL program should move the motor
about 2 revs.
5. Edit the program.To demonstrate the iterative nature of programming, let’s change distance of the move in the
EXAMPL program, redownload the EXAMPL.PRG file, and run the EXAMPL program.
Click this toolbar button to save the
➁
EXAMPL.PRG file before
downloading it to the controller.
Double the distance (D) command
➀
value from 8000 units to 16000 units
(change the comment as well).
Enter the name of the program (EXAMPL) to run
➃
the program and execute motion.
If you are using a stepper with default resolution
settings, the motor should move about 2/3 rev.
If you are using a servo with default resolution
settings, the motor should move about 4 revs.
Send (download) the EXAMPL.PRG
➂
program file to the controller.
Message indicates successful
download, overwriting the previous
version of the EXAMPL program that
exists in the controller's memory.
Chapter 1. Programming Fundamentals
11
Storing Programs
Programs and compiled profiles are stored in the controller's memory (non-volatile memory
for stand-alone products and volatile memory for bus-based products). Information on
controlling memory allocation is provided below (see Memory Allocation).
Storing Programs in Stand-Alone Products
If you are using a stand-alone (serial interface) product, programs and compiled profiles are
automatically stored in non-volatile memory (battery-backed RAM).
More information on other items that are stored in non-volatile memory is provided below.
Storing Programs in Bus-Based Products
If you are using a bus-based product, programs
and compiled profiles are stored in volatile
RAM memory (not battery-backed). Therefore,
you should backup your motionprograms to your computer's hard disk or
floppy disk to ensure their safety. This is
easily done with the Receive Motion Program
function of Motion Architect's Terminal
Emulator module (see diagram at right).
Memory Allocation
In general, your programs may already be stored on your computer, since most programs are
created with Motion Architect's Editor or with the 6000 DOS support software package (see
Program Development Scenario starting on page 8).
Application set-up parameters such as drive setup, feedback setup, I/O configuration, etc.,
should be placed in a set-up program that is called/downloaded and executed before performing
any other controller functions (see Creating and Executing a Set-Up Program on page 14).
Your controller's memory has two partitions: one for storing programs and one for storing
compiled profiles. The allocation of memory to these two areas is controlled with the
MEMORY command.
“Programs” vs. ”Compiled Profiles”
Programs are defined with the DEF and END commands, as demonstrated in the
Development Scenario
Compiled Profiles are defined like programs (using the DEF and END commands), but are
compiled with the PCOMP command and executed with the PRUN command. A
compiled profile could be a multi-axis
individual axis profile
(combination of multi-axis contours and individual axis profiles).
Programs intended to be compiled are stored in program memory. After they are
compiled with the PCOMP command, they remain in program memory and the
segments
memory. The TDIR command reports which programs are compiled as a compiled
profile (referred to here as a
For more information on multi-axis contours, refer to
153. For more information on compiled profiles for individual axes, refer to
Motion Profiling
(see diagram below) from the compiled profile are stored in compiled
starting on page 8.
contour
(a series of arcs and lines), an
(a series of GOBUF commands), or a
path
).
in Chapter 5, page 163.
compound profile
Contouring
Program
in Chapter 5, page
Compiled
12
6000 Series Programmer's Guide
MEMORY
command
syntax
(example)
MEMORY8ØØØØ,7ØØØØ
Memory allocation for Compiled Profiles (bytes).
Storage requirements depend on the number of
segments
in the compiled profile (1 segment consumes
72 bytes). A segment could be one of these commands:
Memory allocation for
Programs (bytes).
Storage requirements
depend on the number of
ASCII characters in the
program.
Contouring:Compiled Motion:
PARCM
PARCOM
PARCOP
PARCP
PLIN
GOBUF
PLOOP
GOWHEN
TRGFN
POUTA
GOBUF commands
may require up to 4
segments.
POUTB
POUTC
POUTD
The following table identifies memory allocation defaults and limits for 6000 Series products.
When specifying the memory allocation, use only even numbers. The minimum storage
capacity for one partition area (program or compiled) is 1,000 bytes.
FeatureAT6n00AT6n00-MAT6n50AT6n50-MAll Other Products
Total memory (bytes)64000150000040000150000150000
Default allocation
(program,compiled)
Maximum allocation for
programs
Maximum allocation for
compiled profiles
Max. # of programs150400010040 0400
Max. # of labels25060 00100600600
Max. # of compiled profiles 1008001003003 00
Max. # of compiled profile
segments
Max. # of numeric
variables
Max. # of string variables1001002 52525
Max. # of binary variables 1001002 52 525
When teaching variable data to a data program (DATP), be aware that the memory required for
each data statement of four data points (43 bytes) is taken from the memory allocation for
program storage (see Variable Arrays in Chapter 3, page 120, for details).
Using a memory allocation command (e.g., MEMORY39ØØØ,1ØØØ) will erase all existing
programs and compiled profile segments. However, issuing the MEMORY command without
parameters (i.e., type MEMORY
not affect existing programs or compiled segments.
Checking Memory Status
To find out what programs reside in your controller's memory, and how much of the available
memory is allocated for programs and compiled profile segments, issue the TDIR command (see
example response below). Entering the TMEM command or the MEMORY command (without
parameters) will also report the available memory for programs and compiled profile segments.
Sample response
to TDIR command
*1 - SETUP USES 345 BYTES
*2 - PIKPRT USES 333 BYTES
*32322 OF 33000 BYTES (98%) PROGRAM MEMORY REMAINING
*500 OF 500 SEGMENTS (100%) COMPILED MEMORY REMAINING
Two system status bits (reported with the TSS and SS commands) are available to check when
compiled profile segment storage is 75% full or 100% full. System status bit #29 is set when
segment storage reaches 75% of capacity; bit #30 indicates when segment storage is 100% full.
CAUTION
<cr>
to request the status of how the memory is allocated) will
Chapter 1. Programming Fundamentals
13
Executing Programs (options)
Following is a list of the primary options for executing programs stored in your controller:
MethodDescriptionSee Also
Execute from a terminal
emulator
Execute as a subroutine
from a “main” program
Execute automatically
when the controller is
powered up
Execute a specific program
with BCD weighted inputs
Execute a specific program
with a dedicated input
“Call” from a high-level
program
Execute from an RP240
(remote operator interface)
Execute from your own
custom Windows program
Execute from Motion
Architect's Panel module
Type in the name of the program and press enter.page 11
Use an branch (GOTO, GOSUB, or JUMP) from the main program
to execute another stored program.
Stand-alone products only. Assign a specific program as a startup
program with the STARTP command. When you RESET or cycle
power to the controller, the startup program is automatically
executed.
Define programmable inputs to function as BCD select inputs,
each with a BCD weight. A specific program (identified by its
number) is executed based on the combination of active BCD
inputs. Related commands: INFNCi-B, INSELP, INFEN.
Define a programmable input to execute a specific program (by
number). Related commands: INFNCi-iP, INSELP, INFEN.
Using a programming language such as BASIC or C, write a
program that enables the computer to monitor processes and
orchestrate motion and I/O by executing stored programs (or
individual commands) in the controller.
Execute a stored program from the RUN menu in the RP240's
standard menu system.
Bus-based products only. Use a programming language such as
Visual Basic and the DLLs provided on your Motion Architect disk
to create your own windows application to control the 6000 product.
Use Motion Architect's Panel module to create a test/operator
panel screen to execute programs and monitor the controller's
status (I/O, motion, axis, system, Following, etc.)
page 23
page 14
page 110
page 115
page 143
page 134
page 51
Motion
Architect
User Guide
Creating and Executing a Set-up Program
In most applications, you will benefit by having a set-up, or configuration, program that is
executed before performing any other controller functions. The set-up program contains
various set-up parameters specific to the general operation of your controller. Examples of
these parameters include scaling factors, I/O definitions, feedback device configuration, homing
operations, end-of-travel limits, drive configuration, program execution modes, etc. (more
detail on these features is provided in Chapter 3, Basic Operation Setup, page 77).
Use Motion Architect's Setup module to help you
create the basic configuration program. By simply responding
to a series of dialog boxes, a program is created with a specific
name (as if you created it in the usual process with the DEF
and END commands, as demonstrated on page 9). You can
further edit this program in Motion Architect's Editor module
if you wish. How you execute the set-up program depends on
which product form factor you are using: stand-alone or busbased.
14
6000 Series Programmer's Guide
Set-up Program Execution for Stand-Alone Controllers
If you created the set-up program in Motion Architect's Editor, you need to download it to the
6000 controller's non-volatile memory via the Terminal Emulator module (see Send Motion
Program under the Transfers menu). If you created the set-up program in the terminal
emulator, as in the example below, it is already stored to non-volatile memory.
Now that the set-up program is available, you can cause it to be executed automatically after
the 6000 controller is powered-up or reset. To do this, you must assign it as the power-up
start program with the STARTP command (see fourth line in example below).
Example
DEF setup; Define program setup
TREV; Report software revision
END; End of program setup
STARTP setup; Define program pwrup as the power-up program
RESET; Reset the controller
; After reset, you should see a message like this:
; *PARKER COMPUMOTOR 6201 MOTION CONTROLLER
; *NO REMOTE PANEL
If the program that is identified as the STARTP program is deleted by the DEL command, the
STARTP is automatically cleared. If you wish to prevent the assigned STARTP program frombeing executed, without having to delete the program, issue the STARTP CLR command.
Set-up Program Execution for Bus-Based Controllers
In most cases you will require the parameters in the setup program to be executed as soon as
possible so that subsequent parameters are based on the setup program. This can be done using
Motion Architect. A set up program can be defined (in Motion Architect’s Setup Module),
saved, and then downloaded in the Terminal Module (see Send Motion Program under the
Transfers Menu). Once the setup program has been stored in the controller, it may be run by
issuing the name of the setup program.
An alternative method would be to not store the setup parameters in a setup program, but have
them execute upon downloading to the controller. This can be done be defining the setup
parameters in the Setup Module of Motion Architect, but not specifying a setup program.
This will remove the DEF and END statements from the setup file, which you will download
the same way in Motion Architect’s Terminal Module. Because the statements execute upon
downloading, there is no need to issue a program name.
Program Security
Issuing the INFNCi-Q command enables the Program Security feature and assigns the
Program Access function to the specified programmable input. The “i” represents the number
of the programmable input to which you wish to assign the function.
The program security feature denies you access to the DEF, DEL, ERASE, MEMORY, and
INFNC commands until you activate the program access input. Being denied access to these
commands effectively restricts altering the user memory allocation. If you try to use these
commands when program security is active (program access input is not activated), you will
receive the error message *ACCESS DENIED.
For example, once you issue the INFNC22-Q command, input #22 is assigned the program
access function and access to the DEF, DEL, ERASE, MEMORY, and INFNC commands will
be denied until you activate input #22.
To regain access to these commands without the use of the program access input, you must
issue the INFENØ command to disable programmable input functions, make the required user
memory changes, and then issue the INFEN1 command to re-enable the programmable input
functions.
Chapter 1. Programming Fundamentals
15
Loading...
+ 238 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.