ACR Programmer Guide
ACR Programmer Guide
User Information
Warning — ACR series products are used to control electrical and
mechanical components of motion control systems. You should
test your motion system for safety under all potential conditions.
Failure to do so can result in damage to equipment and/or serious
injury to personnel.
ACR series products and the information in this 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 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 guide.
© 2003-2007 Parker Hannifin Corporation
All Rights Reserved
Technical Assistance
Contact your local automation technology center (ATC) or distributor.
ii Programmer’s Guide
Parker Hannifin
Table of Contents
User Information ......................................................ii
Table of Contents ....................................................iii
Change Summary .....................................................5
Getting Started .........................................................6
Application Description ..................................................................................... 6
Getting Started - Tutorial.................................................................................. 7
Servo Tuning - Tutorial................................................................................... 14
Programming Basics...............................................41
Aliases ......................................................................................................... 41
Program Labels ............................................................................................. 41
Remarks ....................................................................................................... 42
Command Syntax .......................................................................................... 42
Example Code Conventions ............................................................................. 45
Programs and Commands ............................................................................... 46
Kill All Motion Request vs. Kill All Moves ........................................................... 48
Program Flow ................................................................................................ 53
Parameters and Bits....................................................................................... 58
Parametric Evaluation .................................................................................... 61
Basic Setup.............................................................65
Before You Begin ........................................................................................... 65
Startup Programs .......................................................................................... 73
Resetting the Controller.................................................................................. 73
Memory ........................................................................................................ 73
Return to Factory Default................................................................................ 74
Configuration ................................................................................................ 74
iii
Parker Hannifin
Troubleshooting ...................................................183
Problem Isolation..........................................................................................183
Information Collection ...................................................................................183
Troubleshooting Table ...................................................................................184
Index....................................................................209
iv Programmer’s Guide
Parker Hannifin
Change Summary
The change summary below lists the latest additions, changes, and
corrections to the ACR Programmer’s Guide and the corresponding
section of ACR-View Online Help.
Revision C Changes
Document 88-028698-01C (ACR Programmer’s Guide) supersedes
document 88-028698-01B. Changes associated with this document
are notated in this section.
Topic Description
Application Examples Added section with sample code for a more in-
depth examination of the following topics: Basic
Motion, Enable Drive, Homing, Open Sample,
Teach Array.
Revision B Changes
Document 88-028698-01B (ACR Programmer’s Guide) supersedes
document 88-028698-01A. Changes associated with this document
are notated in this section.
Topic Description
0BChange Summary 5
Parker Hannifin
Getting Started
Use the tutorials in this section to guide you through the
configuration and tuning of your ACR series controller, and to help
you create a project and become familiar with the ACR-View
software.
Application Description
The tutorial leads you through setting up a sample application—a
three-axis system (an X-Y-Z gantry that moves a camera carriage)
controlled by a four-axis, standard ACR9000.
Axis 0—the X axis
Axis 1—the Y axis
Axis 2—the Z axis
Each axis uses a Parker BE341HQ motor powered by an Aries Drive,
and is leadscrew driven with a pitch of 5 rev/inch. In addition, the
application requires inputs 0-5 for hardware limit switches. The X and
Y axes have a maximum of 24 inch of travel; The Z axis has a
maximum of 6 inch of travel.
The I/O is as follows:
Output34 = Camera
Input 0 = X axis Positive Hardware Limit Switch
Input 1 = X axis Negative Hardware Limit Switch
Input 2 = Y axis Positive Hardware Limit Switch
Input 3 = Y axis Negative Hardware Limit Switch
Input 4 = Z axis Positive Hardware Limit Switch
Input 5 = Z axis Negative Hardware Limit Switch
Special Requirement: There is an area designated by a light curtain
connected to input 10, where the gantry cannot move to unless the
camera carriage is retracted (Z-axis at 5 inches). In normal
operations, the camera will not go into that area, but for safety
reasons, the Z-axis must retract if it crosses the light curtain. This is the
sole purpose of the Z-axis.
6 Programmer’s Guide
Parker Hannifin
Configuring Axes
The Project Workspace—found on the left side of the ACR-View
window—uses a tree structure to organize your project. Notice that
the Sample project appears at the top and below it is the ACR9000
controller you just added. Next, use the Configuration Wizard to set
up each axis.
Axis 0
6. In the Project Workspace, click Configuration Wizard.
7. Under Configuration Wizard, click Axis 0.
8. In the Axis 0 dialog box, do the following:
a. In the Axis Name (Alias) box, type X
b. In the Command Output list select DAC 0.
c. Click Next.
9. In the Drive/Motor dialog, click Next.
10. In the Feedback dialog, click Next.
1BGetting Started 7
Parker Hannifin
Axis 1
14. In the Project Workspace, click Axis 1.
15. In the Axis 1 dialog box, do the following:
a. In the Axis Name (Alias) box, type Y
b. In the Command Output list select DAC 1.
c. Click Next.
16. In the Drive/Motor dialog, click Next.
17. In the Feedback dialog, click Next.
18. In the Scaling dialog, do the following:
a. Under Specify Units, click Inches.
b. In the Transmission list, select Leadscrew
c. In the Transmission Details box (below the Transmission
list), type 0.2—this represents the number of inches per
revolution of the leadscrew.
d. Click Next.
8 Programmer’s Guide
Parker Hannifin
Axis 2
21. In the Axis 2 dialog box, do the following:
a. In the Axis Name (Alias) box, type Z
b. In the Command Output list select DAC 2.
c. Click Next.
22. In the Drive/Motor dialog, click Next.
23. In the Feedback dialog, click Next.
24. In the Scaling dialog, do the following:
a. Under Specify Units, click Inches.
b. In the Transmission list, select Leadscrew
c. In the Transmission Details box (below the Transmission
list), type 0.2—This represents the number of inches per
revolution of the leadscrew.
d. Click Next.
1BGetting Started 9
Parker Hannifin
Axis 3
27. In the Axis 3 dialog box, do the following:
a. In the Command Output list, click Not Used.
b. Click Next.
Configuring Masters
A master calculates trajectory and generates motion. You can
assign one or more axes to a master. Each master only performs
tasks for the axes assigned to it. In this sample application, the X and
Y axes operate a gantry system.
The motions of axes X and Y must be coordinated to make the
compound motion, so these axes are assigned to the same master.
Whereas the Z axis motion is not coordinated with other axes, so is
assigned to its own master.
Having assigned axes to their respective masters, you then define
the motion profile for each master (acceleration and deceleration
ramps, and velocity).
1. In the Masters dialog, assign axes X and Y to master 0:
a. In the Axes list to the left, select Axis 0 and Axis 1.
b. In the Masters list to the right, select Master 0.
c. Click Move Axes to Master.
d. Click Next.
10 Programmer’s Guide
Parker Hannifin
1BGetting Started 11
Parker Hannifin
Creating a program
This application requires two programs.
Program 0: Determines the motion the gantry (axes X and Y),
allowing a camera to take scans from various positions.
Program 1: Activates when the gantry (axes X and Y) crosses a
boundary marked by a light curtain. When the gantry passes
through the light curtain, input 10 turns on, which initiates retraction
of the camera (axis Z) to a safety position. When input 10 turns off,
the camera returns to its original position.
1. In the Project Workspace, select Program Editor. By default, it
opens Program 0.
2. In the Program Editor window under the comment 'TODO: edit
your program here, type the following (or copy and paste the
code to the program editor):
12 Programmer’s Guide
Parker Hannifin
1BGetting Started 13
Parker Hannifin
14 Programmer’s Guide
Parker Hannifin
Tuning Example
The tuning example assumes the following:
Green Commanded
Yellow Actual
1BGetting Started 15
Parker Hannifin
16 Programmer’s Guide
Parker Hannifin
1BGetting Started 17
Parker Hannifin
18 Programmer’s Guide
Parker Hannifin
1BGetting Started 19
Parker Hannifin
20 Programmer’s Guide
Parker Hannifin
7. With a loaded motor, we can see that the response has slowed
and the damping is weaker. Like before, we can increase the
PGAIN for a better response.
1BGetting Started 21
Parker Hannifin
22 Programmer’s Guide
Parker Hannifin
1BGetting Started 23
Parker Hannifin
System Configuration
The following section helps you understand how to configure your
ACR controller for use.
• Communication Levels
• Hardware Configuration
• Dedicated I/O
• End-of-Travel Limits
• Attachments
• Memory Allocations
Communication Levels
Communication channels are either at the "system" level or at a
"program" level. The command prompt indicates which level a
communication channel is currently at.
Certain commands are limited to a specific level. To determine at
which levels a command might be used, refer to the Prompt Level in
the command description.
System Level
The "system" level is where a communication channel is at after
power-up. The command prompt at this level is as follows:
The set of commands you can issue from the system level is limited.
You can return to the system level from any other level by issuing the
SYS command.
24 Programmer’s Guide
Parker Hannifin
Program/PLC Level
The "program" or “PLC” level lets you edit and run individual
programs or PLCs. The command prompt at the program level is as
follows:
Pnn>
The command prompt at the PLC level is as follows:
PLCn>
Where "nn" or “n” represents the currently active program number.
To select the program or PLC level from any other level, issue the
PROG or PLC command followed by the program number. For
example, the following selects program number 1 no matter which
level or program is active:
2BSystem Configuration 25
Parker Hannifin
Hardware Configuration
Before using an ACR controller, you must define for the firmware
what specific hardware is installed. The default configuration is as
follows:
CONFIG ENC8 DAC4 DAC4 ADC8
The command uses four arguments— encoders, module 0, module 1,
and module 2.
Encoder: The encoder argument is the number of encoder channels
installed.
NONE, ENC2, ENC4, ENC6, ENC8, ENC10
Module 0: The module 0 argument is the type of module installed in
the first SIMM socket.
NONE, DAC2, DAC4, STEPPER2, STEPPER4, DACSTEP2, DACSTEP4
Module 1: The module 1 argument is the type of module installed in
the second SIMM socket.
NONE, DAC2, DAC4, STEPPER2, STEPPER4
Module 2: The module 2 argument is indicates whether an ADC
module is installed in the third SIMM socket.
NONE, ADC8
In ACR-View, the New Controller Wizard determines the CONFIG
statement for you.
26 Programmer’s Guide
Parker Hannifin
Dedicated I/O
The ACR series controller contains I/O dedicated to Drive Enable,
Drive Reset, and Drive Fault signals. Refer to the appropriate
hardware manual for configuration.
The ACR series controllers also contain hardware and software end-
of-travel limits, and homing. In the ACR90x0, the default is the lowest
onboard inputs being assigned to the lowest axis. For example, axis 0
uses inputs 0, 1, and 2; axis 1 uses inputs 3, 4, and 5.
Input Assignment
For each axis, you can assign which inputs are used for positive and
negative hardware limits, and the input used for homing. The default
is that the lowest onboard inputs are assigned to the lowest axis—
axis 0 uses inputs 0, 1, and 2; axis 1 uses inputs 3, 4, and 5; and so on.
The Configuration Wizard can perform the setup for you, or you can
use the HLBIT command to assign the inputs manually (no
corresponding parameter exists).
The value you provide sets the input to use for the positive hardware
limit. The controller then sets the next contiguous input for the
negative hardware limit, and the next contiguous input is set for
homing.
For example, you want to assign input three as the positive
hardware limit for axis Y. The command HLBIT Y3 is sent; as a result,
input 3 becomes the positive hardware limit, input 4 becomes the
negative hardware limit, and input 5 becomes the homing input.
2BSystem Configuration 27
Parker Hannifin
End-of-Travel Limits
The ACR series controller can respond to hardware and software
end-of-travel limits, which prevent a motor’s load from traveling past
defined limits. You can use hardware and software limits regardless
of incremental or absolute positioning.
Software and hardware limits, typically, are positioned so that when
the load reaches the software limit, the motor/load starts
decelerating towards the hardware limit. This provides a smoother,
more graceful stop towards the hardware limit than if the hardware
limit, itself, were activated.
When a load reaches an end-of-travel limit (hardware or software),
the ACR controller stops the master and all attached axes. The stop
is made using the hardware or software deceleration rate—HLDEC or
SLDEC, respectively.
Hardware Limits
For each axis, you can set a pair of inputs to act as positive and
negative limits for hardware travel. Parameters 4600-4615 provide
Control and Status bits for software limits. You can enable the
individual positive and negative limits and set the active level for
each, as well as check the current and previous states of the limits.
NOTE: When a hardware limit is a hit, the KAMR (Kill All Motion
Request) Bit is also set. Before motion can resume, you must
clear the KAMR Bits for the affected master and its attached
axes.
28 Programmer’s Guide
Parker Hannifin
Software Limits
For each axis, you can set a pair of absolute positions that act as
software-based limits. Between these limits, unlimited motion can
occur. If a software limit is crossed, the controller stops motion for
that axis, its master, and attached axes.
Parameters 4600-4615 provide Control and Status bits for software
limits. You can enable the individual positive and negative limits, as
well as check the current and previous states of the limits.
NOTE: Software limits do not use the Kill All Motion Request (KAMR)
bits. Therefore, you can resume motion in the opposite
direction of the software limit. For example, if the
application encounters a positive software limit and stops,
the application can resume motion in the negative
direction.
2BSystem Configuration 29
Parker Hannifin
30 Programmer’s Guide
Parker Hannifin
Attachments
Attachments are a means of defining the hardware you have, and
how it connects together.
Software Attachments
Before using an ACR controller, define the feedback and signal
output for each axis. By default, each axis is attached to its
matching encoder and DAC output. Using the ATTACH AXIS
command, change the default attachments to fit your application.
By default, each encoder and DAC is set to the same index as the
axis to which it is attached. The default axis attachments are as
follows:
ATTACH AXIS0 ENC0 DAC0 ENC0
ATTACH AXIS1 ENC1 DAC1 ENC1
ATTACH AXIS2 ENC2 DAC2 ENC2
ATTACH AXIS3 ENC3 DAC3 ENC3
ATTACH AXIS4 ENC4 DAC4 ENC4
ATTACH AXIS5 ENC5 DAC5 ENC5
ATTACH AXIS6 ENC6 DAC6 ENC6
ATTACH AXIS7 ENC7 DAC7 ENC7
The ATTACH AXIS command has four arguments—axis, position,
signal, and velocity.
Axis: The axis argument determines to which axis you are making the
attachments.
AXIS0 through AXIS7
Position: The position argument determines what position feedback
is attached to the axis. You can use the following:
2BSystem Configuration 31
Parker Hannifin
Signal: The signal argument determines the signal output by the ACR
controller.
Attaching Axes
By default, each encoder and DAC is set to the same index as the
axis to which it is attached (for example, ATTACH AXIS0 ENC0 DAC0
ENC0). It is good programming practice to use the same index for
the feedback or signal output as the axis to which you are
attaching.
For example, to attach ADC 4 as position feedback, and DAC 4 as
the command signal to axis 4, send the following:
ATTACH AXIS4 ADC4 DAC4 ADC4
There is one exception—dual-loop feedback. With dual-loop
feedback, you can attach a second feedback source to an axis. In
this case, you must indicate which additional encoder is being used.
For example, to attach encoder 4 as position feedback, DAC 4 as
the command signal, and encoder 9 as the velocity feedback, send
the following:
ATTACH AXIS4 ENC4 DAC4 ENC9
32 Programmer’s Guide
Parker Hannifin
Master/Slave Attachments
Without master/slave attachments, motion cannot occur. So what
are masters and slaves?
Masters
Master are trajectory (or motion profile) generators for coordinated
motion. A master computes trajectories only for the slave or slaves
attached to that master. You can assign only one master to a
program.
The number of masters available is governed by the number of
programs available on each controller:
Attaching Masters
For a program to make motion, it must have a master and slaves
attached to it. Use the ATTACH MASTER command to designate
which trajectory generator to use with a program. When attaching
masters, observe the following:
For example, you might always use program zero for managing
communications, and program one for motion with master zero
attached. As another example, the ACR-View software uses the
same index for the master as the program to which it is being
attached (master zero attaches to program zero, master one
attaches to program one, etc.).
Setting up an application with independent axes is straightforward.
For example, a four-axis ACR9000 controls four independent axes;
you attach master and slave zero to program zero, master and slave
one to program one, and so forth. Each program uses a separate
master for each slave.
2BSystem Configuration 33
Parker Hannifin
Slaves
Each master uses its own set of dedicated slaves; slaves act as
simple placeholders for axes. By attaching an axis to a slave, you
are connecting the axis to a specific master.
You can attach one axis to one slave, and subsequently it is
attached to one master. The total number of slaves available differs
between controllers:
NOTE: You cannot assign an axis to more than one slave and
master. If necessary, you can disconnect the axis from its
master and attach it to a different master. For more
information, see the DETACH command.
34 Programmer’s Guide
Parker Hannifin
Attaching Slaves
As previously stated, for a program to make motion, it must have a
master and slaves attached to it. Once you have attached a
master, you can then attach the slaves. Each master contains its
own set of slaves, and each set of slaves is independent of the
slaves in other masters. When attaching to slaves, start with the first
available slave.
Use the ATTACH SLAVE command to designate which axis you are
attaching to a slave. When attaching slaves, observe the following:
2BSystem Configuration 35
Parker Hannifin
The ACR controller recognizes the axis name only in the program
where it is declared. For example, in program zero you give axes
zero and one the names ARM and UP, respectively. Other programs
do not recognize the axis names ARM and UP.
While you cannot use the axis names in other programs, you can
access those axes using their system names—AXIS0 and AXIS1.
Example
In the following example, program zero controls a two-axis machine.
Axis zero is given the axis name X, and axis one is given the axis
name Y.
PROG0
HALT
DETACH
ATTACH MASTER0
ATTACH SLAVE0 AXIS0 “X”
ATTACH SLAVE1 AXIS1 “Y”
36 Programmer’s Guide
Parker Hannifin
Memory Allocations
Memory allocation on the ACR series controllers is completely
customizable —you can assign controller memory to features and
functions that need it most for your particular application. Using the
Configuration Wizard, you can quickly allocate memory for the
following: programs, PLCs, global variables, local variables, arrays,
and communication stream buffers.
2BSystem Configuration 37
Parker Hannifin
System
At the SYS prompt, you can allocate memory for the following:
Program
At the PROG prompt, you can allocate memory for the following:
38 Programmer’s Guide
Parker Hannifin
2BSystem Configuration 39
Parker Hannifin
40 Programmer’s Guide
Parker Hannifin
Programming Basics
The following section explains some fundamental concepts of the
AcroBASIC programming language.
Aliases
Alternative names, called aliases, can be assigned to parameters,
bits, constants, and variables to make program code more
readable. Aliases are recognized globally (across user programs).
NOTE: Do not confuse aliases with axis names. You can assign an
axis name to an axis through the ATTACH SLAVE command.
Program Labels
Labels are program pointers which provide a method of branching
to specific locations, including subroutines, within the same
program. Labels can only be defined within a program and
executed with a GOTO or GOSUB from within the same program.
Observe the following rules when creating and using labels:
3BProgramming Basics 41
Parker Hannifin
Example
_START
GOSUB Label1
GOTO START
_Label1
PRINT “Inside Label1 subroutine”
RETURN
Remarks
You can add comments to a program. You can put a REM
statement by itself on a line, or you can place it on the same line
after a program statement.
When following a program statement with a REM statement, observe
the following: place a space, a colon (:), then another space
between the program statement and the REM statement.
Comments consume memory on the controller, and can affect
processing speed. By using an apostrophe (‘) in place of REM, the
controller strips comments on downloading the program. Unlike REM,
when using the apostrophe for comments, the comment must
appear on its own line.
REM this is a comment
‘ this is another comment
ACC 10000 : REM this comment follows a valid program statement
Command Syntax
The AcroBASIC programming language accommodates a wide
range of needs by providing basic motion control building blocks, as
well as sophisticated motion and program flow constructs.
The language comprises simple ASCII mnemonic commands, with
each command separated by a command delimiter (carriage
return, colon, or line feed). The command delimiter indicates that a
command is ready for processing.
The AcroBASIC programming language uses a parent daughter
approach. A parent can have daughter statements; a daughter
statement is considered a sub-statement of the parent.
You can issue many parent statements alone—some provide the
current status related to that particular command, others perform
an action. For example, issuing the DIM command at the system
level provides you with a report of the system dimensions.
Conversely, issuing the CLEAR command at the system level frees the
memory allocated to all programs.
42 Programmer’s Guide
Parker Hannifin
Description of Format
Each parent or daughter command shows the necessary elements
to correctly use that command. The following describes how to
interpret the command format presented to you in this guide:
3BProgramming Basics 43
Parker Hannifin
Example 1
ACC {rate}
In the ACC command, the lower case word rate is an argument.
Arguments act as placeholders for data you provide. If an argument
appears in braces or parentheses, the argument is optional.
For example, the following sets the acceleration ramp to 10,000 units
per second 2 .
ACC 10000
When you issue a command without an optional argument, the
controller reports back the current setting. Not all commands report
back, and some require you to specify an axis. For example, the
following reports the current acceleration rate in program 0.
P00>ACC
10000
44 Programmer’s Guide
Parker Hannifin
Example 2
FBVEL {AXIS {value}} {AXIS {value}} ...
Optional arguments can nest. This provides the flexibility to set data
for or receive reports on multiple axes. For example, the following
sets the velocity feedback gain for axes X and Y to 0.0001 and
0.0002 respectively.
FBVEL X 0.0001 Y 0.0002
Because the FBVEL command can report on multiple axes, you
specify at least one axis on which the controller is to report back.
P00>FBVEL X
0.0001
P00>FBVEL X Y
0.0001
0.0002
Example 3
IPB {AXIS {value}} {AXIS {(value1, value2)}} …
The AcroBASIC language provides programming shortcuts. You can
set positive and negative values for commands using one argument.
If the values differ, you can use two arguments. The command
format illustrates when this is possible. For example, the following sets
the in-position band for axis X to ±0.05 and for axis y to 3 and –1.
IPB X 0.05 Y(3, -1)
Notice that the two values for axis Y are given inside parentheses
and separated by a comma, as shown in the format of the
command.
Example 4
HALT {PROGx | PLCx | ALL}
The vertical bar indicates a choice between arguments. For
example, the HALT command lets you stop a user program or PLC
program or all programs.
HALT PROG0
HALT PLC5
HALT ALL
NOTE: In ACR Series example code, Axis0 is the X axis, and Axis1 is
the Y axis, unless otherwise specified.
3BProgramming Basics 45
Parker Hannifin
• To change the current master velocity, type VEL and then the
new value such as VEL 1000.
NOTE: Code changes made with this procedure are not reflected
in the program stored in ACR-View. To ensure your changes
are permanent, enter them in the ACR-View Program Editor
and download it to the controller.
46 Programmer’s Guide
Parker Hannifin
Running a Program
While the program starts, the controller returns to the SYS, PROG, or
PLC prompt. You can then enter immediate commands as the
program runs.
► To start a program, send the RUN command.
Listening to a Program
While a program is running, you can “listen” to it. The listen mode
displays data from the controller’s print statements and error
messages.
► To enable the listening mode on a running program, send the
LISTEN command.
► To exit the listening mode, press the ESC key (ASCII 27).
Halting a Program
You can stop motion and end program execution from the SYS,
PROG, and PLC prompts using the HALT command.
3BProgramming Basics 47
Parker Hannifin
Pausing a Program
Pausing a program places a feed hold on the current move and
suspends the program at the current command line.
► To suspend a currently running program, send the PAUSE
command.
• Attempt to stop the axis using the current setting for hard limit
deceleration, HLDEC.
48 Programmer’s Guide
Parker Hannifin
• Set the Kill All MOVES flag for the Master that is assigned to
that axis. This will stop and prevent any coordinated motion.
• Set the Kill All MOTION Request flag for any other axes on that
same Master.
Any motion command issued while this flag is set will result in an error
message “Associated Slave Kill Motion Request Active.” This is true if
any axis assigned to the same Master is commanded to move.
The user is responsible for clearing this flag.
To resume motion, first clear the Kill All Motion Request flag for the
axis (and any other axes on the same Master) and then clear the Kill
All Moves flag in the Master.
Enabling a drive using DRIVE ON command will clear the Kill All
Motion Request (KAMR) and Kill All Moves flag if the drive is not
currently enabled
This flag does not halt any programs or PLCs.
The KAMR flags may be cleared for all axes by issuing a CTRL-Y.
• Any axis on the Master receives a Kill All Motion Request (Axis
Flag). See Kill All Motion Request (KAMR) above.
3BProgramming Basics 49
Parker Hannifin
the DEC setting, wait until moves have stopped, then sets the Kill All
Moves flag. The Stop All Moves flag will clear after this sequence is
complete and acknowledged by the processor.
Flag Comparison
The following table shows the bit numbers for Kill All Motion Request
axis flags, and the bit numbers for Kill All Moves masters flags.
Kill All Motion Request
Quaternary Axis Flags
Axis Number
0 1 2 3 4 5 6 7
Axis Number
8 9 10 11 12 13 14 15
Master Number
0 1 2 3 4 5 6 7
Master Number
8 9 10 11 12 13 14 15
50 Programmer’s Guide
Parker Hannifin
Select Axis Flags in the first drop-down menu, Quaternary Axis Flags
in the second drop-down menu, and Quaternary Axis 0 Flags in the
third drop-down menu to display the Kill All Motion Request bit for
Axis 0. A green LED, as circled in red below, indicates that the flag is
set. All motion is stopped for this axis and all other axes on the same
master.
Select Master Flags in the first drop-down menu, Primary Master Flags
in the second drop-down menu, and Primary Master 0 Flags in the
third drop-down menu to display the Kill All Moves Request bit for
Master 0. A green LED, as circled in red below, indicates that the
flag is set.
3BProgramming Basics 51
Parker Hannifin
Example
This example uses terminal commands.
P00>ATTACH
ATTACH MASTER0
ATTACH SLAVE0 AXIS0 “X”
ATTACH SLAVE1 AXIS1 “Y”
REM ATTACH command will reply with information about what axes
REM are part of the Master group
P00>JOG FWD Y
REM Associated Slave Kill Motion Request is active. Y-axis motion
REM is prevented due to X-axis KAMR flag.
NOTE: Enabling drives using DRIVE ON command will clear the Kill
All Motion Request (KAMR) and Kill All Moves bits if the drive
is not currently enabled.
52 Programmer’s Guide
Parker Hannifin
Program Flow
Code is executed sequentially, following the order in which it is
written. But based on some input, you can shift code execution
elsewhere in a program using conditional statements. Using
conditional statements, you can create code that tests for specific
conditions and repeats code statements.
The conditional statement provides a logical test—a truth
statement—allowing decisions based on whether the conditions are
met. In the code, you create an expression and test whether the
result is true.
You can divide conditional statements into two sub-categories,
selection and repetition.
NOTE: Each level (or nest) uses 4 bytes of memory. For more on
memory use, see How Much Memory?
Selection
The selection structure controls the direction of program flow. Think
of it as a branch in your program. When the conditions are met, the
program moves to a different block of code. AcroBASIC provides
the following conditional statements:
• IF/THEN
• IF/ELSE/ENDIF
• GOSUB
• GOTO
IF/THEN
Programs need to run code based on specific conditions. The
IF/THEN statement lets a program test for a specific condition and
respond accordingly.
The IF portion sets of the condition to test; if the condition proves
true, the THEN portion of the statement executes. If instead the
condition proves false, the THEN statement is ignored and program
execution moves on to the next statement.
3BProgramming Basics 53
Parker Hannifin
Example
The following demonstrates several simple IF/THEN statements.
IF (BIT 24) THEN P0 = P0+1
IF (P0 > 4000) THEN GOSUB 100 : P0 = P0-1
IF/ELSE
The IF/ELSE statement provides a powerful tool for program
branching and program flow control. The IF/ELSE statement allows
you to run one set of code if the condition is true, and another set of
code if the condition is false. The IF/ELSE statement must end with
ENDIF.
When using an IF/ELSE statement, observe the following:
Example
The following demonstrates different actions based on conditions
being true or false. If the input (bit 24) is true, the long array
increments and axis X moves an incremental 25 units. If false, the
long array decrements and axis Y moves to absolute position 5.
IF (BIT 24)
LA0(1) = LA0(1)+1
X/25
ELSE
LA0(1) = LA0(1)-1
Y5
ENDIF
54 Programmer’s Guide
Parker Hannifin
ELSEIF Condition
The IF/ELSE statement can include the ELSEIF condition. The ELSEIF
condition lets you create a series of circumstances to test. There is
no practical limit to the number of ELSEIF conditions you can
include. However, they must come before the ELSE condition.
Here is how it works. When the IF condition is true, the subsequent
statements are executed. When the IF condition is false, each ELSEIF
statement is tested in order. When an ELSEIF condition tests true, the
subsequent statements are executed. When the ELSEIF condition test
false, the statements following ELSE condition execute. After
executing the statements following an IF, ELSEIF, or ELSE, the
program moves past the ENDIF to continue program execution.
When using the ELSEIF condition, you can omit the ELSE condition.
When the IF and ELSEIF conditions test false, statement execution
after the ENDIF continues. Think of it as creating a series of IF/THEN
statements.
GOSUB
The GOSUB branches to a subroutine and returns when complete.
You can use GOSUB and RETURN anywhere in a program, but both
must be in the same program. A procedure can contain multiple
RETURN statements. However, on encountering the first RETURN
statement, the program execution branches to the statement
directly following the most recently executed GOSUB statement.
Example
The following example demonstrates a simple GOSUB routine.
GOSUB Label1
…
_Label1
PRINT “Inside Label1 subroutine”
RETURN
GOTO
The GOTO statement provides an unconditional branch within a
procedure. You can only use the GOTO in the procedure in which it
appears.
You can nest GOTO statements in an IF/THEN statement.
3BProgramming Basics 55
Parker Hannifin
Example
The following demonstrates a simple GOTO statement. The program
sets output bit 32, then moves axis X one incremental unit in the
positive direction. The program pauses until the “Not in Position“ bit
768 is clear, then clears the output, waits 2 seconds, and goes to
LOOP1.
ACC10 DEC10 STP10 VEL1
_LOOP1
SET 32
X/1
INH -768
CLR 32
DWL 2
GOTO LOOP1
Repetition
The repetition structure—known as a loop—controls the repeated
execution of a statement or block of statements.
While the conditions remain true, the program loops (or iterates)
through the specific code. Typically, the repetition structure includes
a variable that changes with each iteration. And a test of the value
determines when the conditions of the expression are satisfied. The
program then moves to the next statement past the repletion
structure.
If the condition is not met, the loop does not execute. In many cases
that is acceptable behavior. Conversely, if the condition is always
met, then the loop does not end. An endless loop is probably not a
desired result, so be mindful when writing the loop conditions.
AcroBASIC also provides the following looping statements:
• FOR/TO/STEP/NEXT
• WHILE/WEND
FOR/TO/STEP/NEXT
When you expect to loop through a block of code for a number of
times, the FOR/NEXT loop is a good choice. It contains a counter, to
which you assign starting and ending values. You also assign a STEP
value (positive direction only), the value by which the counter
increments.
When the FOR/NEXT loop executes the first time, the end value and
the counter are compared. If the current value is past the end
value, the FOR/NEXT loop ends and the statement immediately
following executes. Otherwise, the statement block within the
FOR/NEXT loop executes.
On each encounter of the NEXT statement, the counter increments
and loops back to the FOR statement. The counter is compared to
the end value with each loop. When the counter exceeds the end
value, the loop skips the statement within, and proceeds to execute
the statement immediately following the FOR/NEXT statement.
56 Programmer’s Guide
Parker Hannifin
You can exit a FOR/NEXT loop before the counter is complete using
a BREAK statement. When the condition is met, the statement
immediately following the FOR/NEXT loop executes.
Example
The following demonstrates a FOR/NEXT loop with a BREAK
statement.
FOR LV0 = 0 TO 499 STEP 1
PRINT LA0(LV0), SA0(LV0)
DWL 0.01
IF (BIT 24)
BREAK
ENDIF
NEXT
WHILE/WEND
The WHILE/WEND loop executes as long as its condition remains true.
You can use the WHLE/WEND anywhere in a program.
The WHILE sets the condition, and is followed by statements you
want executed when the condition is true. When the condition is
false, the statement immediately following WEND executes. The
condition is evaluated only at the beginning of the loop.
When using a WHILE/WEND statement, observe the following:
Example
The following demonstrates a WHILE/WEND loop. While the encoder
position for axis 2 is less than 1500 units, the WHILE statement
evaluates as true. As the loop runs, the array acts as a counter,
incrementing with each loop; axis X move an incremental 25 units;
the program pauses for 1.5 seconds, then prints the current value of
the array; and if the input (bit 24) is set the loop breaks. When the
encoder count exceeds 1500, the condition is false and execution
moves past the WEND statement.
WHILE (P6176 < 1500)
LA0(1) = LA0(1) + 1
X/25
DWL 1.5
PRINT LA0(1)
IF (BIT 24)
BREAK
ENDIF
WEND
3BProgramming Basics 57
Parker Hannifin
INH
The INH command lets you inhibit program execution based on the
set or clear state of a specified bit.
Example
The following demonstrates inhibiting a program until a certain
condition is met.
INH 2 : REM wait until bit 2 = 1
INH -516 : REM wait until bit 516 = 0
IHPOS
The IHPOS command lets you inhibit program execution based on
the setpoint of a given parameter or a timeout is reached.
Example
The following demonstrates a variety of inhibits for encoder 1.
IHPOS P6160 (40000,5.5) : REM wait until ENC1 >40000, or 5.5 seconds
IHPOS -P6160 (40000,5.5) : REM wait until ENC1 <40000, or 5.5 seconds
IHPOS P6160 (40000,0) : REM wait until ENC1 >40000, no timeout
58 Programmer’s Guide
Parker Hannifin
• Request Bits: The bit is self clearing when processed by the DSP.
All request bits include “request” in the name. In most cases,
there are complimentary flags that perform the opposite
action. For example, the Run Request bit and the Halt Request
bit control the running and halting of programs.
• Master Parameters
• Master Flags
• Axis Parameters
• Axis Flags
• Object Parameters
• Program Parameters
• Program Flags
Example
The following demonstrates how to format parameters and bits.
Suppose your program refers to the current position for axis 0 (see
table P12288-P14199 Axis Parameters), and input 24 (see table Bit0-
Bit31 Opto-Isolated Inputs).
P12288
Bit24
3BProgramming Basics 59
Parker Hannifin
Example
The following demonstrates how to set at bit. All methods are valid.
SET 32
Bit32=1
SET Bit32
Example
The following demonstrates how to set at bit. All methods are valid.
CLR 32
Bit32=0
CLR Bit32
• -1 when set.
• 0 when clear.
You can use a question mark in place of the PRINT command. The
question mark is a shortcut in a terminal emulator.
Example
The following demonstrates how to view values stored in parameters
and bits. Parameter 6144 provides the current encoder position;
Bit24 provides the current state of input 24.
PRINT P6144
PRINT Bit24
?P6144
?Bit24
A Word on Aliases
Parameters and bits can use aliases. You only need to assign the
alias once, and then can use it throughout user programs. The alias
lets you provide a name that makes sense for programs, and makes
programs easier to read.
For more information, see Aliases.
60 Programmer’s Guide
Parker Hannifin
Programming Example
The following program creates a square. You can use ACR-View to
set up the controller. Then enter the program into program 0 and
download it to the controller.
RES X Y : REM reset encoder registers to 0 at startup
_LOOP
ACC 50 : REM set trajectory generator acceleration
DEC 50 : REM set trajectory generator deceleration
STP 50 : REM set trajectory generator stop ramp
VEL 5 : REM set target velocity
X5 : REM move axis to position
Y5 : REM move axis to position
X0 : REM move axis to position
Y0 : REM move axis to position
GOTO LOOP
ENDP
Before running the program, make sure you are at the program 0
prompt in the terminal emulator. The LRUN command lets you listen
to through a terminal to the PRINT statements and error messages.
This is the only way to view program errors.
► To run the program, type LRUN
When ready to exit the listening mode, press the ESC key (ASCII 27).
As the program runs, you can pause the program by setting the
Feedhold Request bit or sending the PAUSE command. The Feedhold
Request bit stops the axes using the deceleration value.
► To set the Feedhold Request bit, type SET 520.
You can resume the program by setting Cycle Start Request bit or
sending the RESUME command. The Cycle Start Request bit starts the
axes using the acceleration value.
► To set the Cycle Start bit, type SET 521.
While the program is in a feedhold, you can check the encoder
position of each axis.
► To view the axis X encoder position, type PRINT P6144.
► To view the axis Y encoder position, type ?P6160
Parametric Evaluation
Most commands take arguments. Often, those command-line
arguments are literals—values that are interpreted as they are
written. For example, axis numbers, bit index numbers, acceleration
or deceleration speeds, or positional values.
In addition to literals, you can use expressions (also called formulas).
The ACR controller can solve complex integer or floating point math.
To use expressions, you must enclose them in parentheses.
Expressions can use the following:
• Constants
• Variables
3BProgramming Basics 61
Parker Hannifin
• Parameters
• Bits
• Aliases
An expression is comprised of at least one operand and one or more
operators. Operands are values, whether numerals or variables.
Operators are symbols that represent specific actions. For example,
the plus sign (+) represents addition, and the forward slash (/)
represents division. In the expression
A+7
A and 7 are operands, and + is an operator.
• Powers
Parentheses
Using parentheses, you can group operations in an expression to
change the order in which they are performed.
Operational Order
For example, the expression
4+6/2
provides the answer 7, and not 5, because division performs before
addition. When a mathematical expression contains operators that
have the same rank, operations are performed left to right. For
example, in the expression
2+6/3*5-9
division and multiplication perform before addition and subtraction.
The first operation is 6 / 3; the second operation multiplies the result
2 by 5, which results as 10. In the third operation, add 2 to 10, which
results as 12. In the fourth operation, subtract 9 from 12 to produce
the final answer of 3.
62 Programmer’s Guide
Parker Hannifin
Nested Parentheses
You can also embed parentheses, where operations in the deepest
parentheses are performed first. For example, the expression
((7 + 3) / 2) * 3
contains embedded parentheses. From the example, the first
operation is 7+3, the second operation is 10/2, and the third
operation is 5*3, which results in 15 as the answer.
Examples
The following demonstrate some simple uses of expressions. The
examples assume memory space is allocated for the variables.
Example 1
The following causes axis X to move position to the resulting value of
the expression.
X(P0 + P2 * P30)
Example 2
When the following IF statement proves true, the message “OK”
prints.
IF(P0=1234) THEN PRINT “ok”
Example 3
The following concatenates strings $V1 and $V2, and sets string $V0
equal to the result.
$V0 = $V1 + $V2
Example 4
The following program generates a random number from 0 to 999.
As the program loops, it counts each loop. When the number equals
123, the program exits the loop and prints the count.
PROGRAM
DIM LV(2) : REM dimension 2 long variables
LV0=0 : REM set LV0 equal to 0
_LOOP1
LV1=RND(1000) : REM set LV1 equal to random number
LV0=LV0+1 : REM increment LV0 with each loop
IF (LV1<>123) THEN GOTO LOOP1
PRINT “Done in”;lv0;”tries”
ENDP
3BProgramming Basics 63
Parker Hannifin
Example 5
The following flashes the first 30 outputs in a random sequence.
PROGRAM
ENDP
64 Programmer’s Guide
Parker Hannifin
Basic Setup
Before You Begin
The tables in this section list commands according to the following
command groups:
Axis Limits Non-Volatile
Character I/O Operating System
Drive Control Program Control
Feedback Control Program Flow
Global Objects Servo Control
Interpolation Setpoint Control
Logic Function Transformation
Memory Control Velocity Profile
4BBasic Setup 65
Parker Hannifin
Axis Limits
Command Description
PM Position maintenance
Character I/O
Command Description
Drive Control
Command Description
66 Programmer’s Guide
Parker Hannifin
Feedback Control
Command Description
Global Objects
Command Description
4BBasic Setup 67
Parker Hannifin
Interpolation
Command Description
Logic Function
Command Description
Memory Control
Command Description
68 Programmer’s Guide
Parker Hannifin
Non-Volatile
Command Description
Operating System
Command Description
IP IP address
4BBasic Setup 69
Parker Hannifin
Program Control
Command Description
Program Flow
Command Description
70 Programmer’s Guide
Parker Hannifin
Servo Control
Command Description
Setpoint Control
Command Description
4BBasic Setup 71
Parker Hannifin
Transformation
Command Description
Velocity Profile
Command Description
72 Programmer’s Guide
Parker Hannifin
Startup Programs
You can set a program to automatically run on powering up or
rebooting the controller. The PBOOT command provides that ability.
Example
The following program runs on power-up, flashing output 32.
PROGRAM
PBOOT : REM PBOOT must appear as first line
REM Beginning of loop
_LOOP1
BIT 32 = NOT BIT 32
DWL 0.25
GOTO LOOP1
ENDP
• Cycle power.
Memory
Memory allocation is completely customizable on the ACR series
controllers. The DIM commands allocate memory to program and
PLC spaces, global and local variables, communication streams,
and aliases.
Once you have allocated memory, you cannot change it without
first clearing the memory space. Otherwise, you receive a “Re-
dimensioned block” error.
For information about memory allocation, see Memory Allocations.
4BBasic Setup 73
Parker Hannifin
Configuration
Because the ACR series controller is powerful and flexible, it requires
configuration for your particular application. There are two methods:
you can manually write the configuration code, or use the
Configuration Wizard in the ACR-View software.
As the number of axes increase, the code required to configure a
controller can be extensive. The Configuration Wizard helps ensure
all constituent devices are configured quickly and correctly.
The configuration code for different models of ACR series controllers
varies—dependant on each model’s distinct feature set and
options, as well as various drives, motors and encoders connected
to it. In addition, the firmware revision you have for a controller can
affect which features and AcroBASIC commands are available to
you.
74 Programmer’s Guide
Parker Hannifin
The wizard makes some choices for you behind the scenes. The
ACR9000 has the largest feature set, and typically requires
configuration for those features. The ACR1505 and ACR8020 may
require different configuration.
The Configuration Wizard, once completed, lets you review the
code it has generated. In that configuration code, you might find
code for features that do not apply to your specific controller. For
example, for an ACR9000 the wizard generates code for CANopen
defaults, though your particular controller may not have the
CANopen option. This does not impair the controller or its
performance.
NOTE: The wizard does not collect data in the same order in which
code is written.
The Code
The wizard generates the Primary System Settings automatically, and
does not collect data for this. If you are writing your own
configuration code, it is good coding practice to include the
following at the beginning. The controller is switched to the SYS
prompt. From there, all program execution is halted (HALT ALL), all
user programs and PLC programs are deleted (NEW ALL), all memory
allocations are cleared (CLEAR), and all slaves are detached from
their respective masters (DETACH ALL).
REM -- Primary System Settings for ACR Device
SYS
HALT ALL
NEW ALL
CLEAR
DETACH ALL
4BBasic Setup 75
Parker Hannifin
If you do not make any changes to the Memory defaults, the wizard
allocates additional memory to programs zero and one. In addition,
the wizard allocates memory to program 15, which stores wizard
data.
REM-----Allocate system memory-----
DIM PROG0(8192)
DIM PROG1(4096)
DIM PROG2(1000)
DIM PROG3(1000)
DIM PROG4(1000)
DIM PROG5(1000)
DIM PROG6(1000)
DIM PROG7(1000)
DIM PROG8(1000)
DIM PROG9(1000)
DIM PROG10(1000)
DIM PROG11(1000)
DIM PROG12(1000)
DIM PROG13(1000)
DIM PROG14(1000)
DIM PROG15(28672)
REM Some Global Memory is used by Wizard Generated Code
REM P0000 - P0099 Available for User programs
REM P0100 - P0200 Reserved for Software Limits Code
REM P0201 - P4095 Available for User programs
DIM P(100)
DIM DEF(20)
76 Programmer’s Guide
Parker Hannifin
The next section is specific to the ACR9000 and currently does not
apply to other ACR controllers. The Extended I/O section sets and
clears bits related to homing, hardware and software limits, and
drive faults—all performed behind the scenes and does not come
from user supplied data.
REM ACR Extended IO Settings
SET BIT8468
CLR BIT8464
CLR BIT8470
SET BIT8469
CLR BIT8453
CLR BIT8471
ENC0 SRC 0
ENC0 MULT 4
The next section is specific to the ACR9000 and does not apply to
other ACR controllers. From the Servo Gains dialog, the gain values
are fixed.
REM Axis Gains values
AXIS0 PGAIN 0.002441
AXIS0 IGAIN 0
AXIS0 ILIMIT 0
AXIS0 IDELAY 0
AXIS0 DGAIN 1e-005
AXIS0 DWIDTH 0
AXIS0 FFVEL 0
AXIS0 FFACC 0
AXIS0 TLM 10
AXIS0 FBVEL 0
The next section is specific to the ACR9000 and does not apply to
other ACR controllers. From the Fault dialog, the axis limit features
are enabled and values fixed. Then the DAC gain is fixed, and the
Axis is enabled.
REM Axis Limits
AXIS0 HLDEC 500
SET BIT16144
SET BIT16145
SET BIT16148
SET BIT16149
AXIS0 SLM (24,0)
AXIS0 SLDEC 500
CLR BIT16150
CLR BIT16151
DAC0 GAIN 3276.8
AXIS0 ON
4BBasic Setup 77
Parker Hannifin
AXIS1 IDELAY 0
AXIS1 DGAIN 1e-005
AXIS1 DWIDTH 0
AXIS1 FFVEL 0
AXIS1 FFACC 0
AXIS1 TLM 10
AXIS1 FBVEL 0
REM Axis Limits
AXIS1 HLBIT 3
AXIS1 HLDEC 100
SET BIT16176
SET BIT16177
SET BIT16180
SET BIT16181
AXIS1 SLM (24,0)
AXIS1 SLDEC 100
CLR BIT16182
CLR BIT16183
DAC1 GAIN 3276.8
AXIS1 ON
All the unused axes are turned off—this is done directly with the AXIS
OFF command rather than using bits designated for this purpose.
Turning off the axes reduces CPU load and increases system
performance.
REM Turn off any unused Axes
AXIS3 OFF
AXIS4 OFF
AXIS5 OFF
AXIS6 OFF
AXIS7 OFF
78 Programmer’s Guide
Parker Hannifin
In the program space, the attachments are made. If you are writing
your own configuration code, it is a good coding practice to
include the a DETACH statement before the ATTACH statements. The
Axis Name comes from the Axis dialog, the master/slave information
comes from the Masters dialog, and the acceleration, deceleration,
and stop ramps and velocity come from the Master dialog.
PROG0
DETACH
ATTACH MASTER0
ATTACH SLAVE0 AXIS0 "X"
ATTACH SLAVE1 AXIS1 "Y"
PROG1
DETACH
ATTACH MASTER1
ATTACH SLAVE0 AXIS2 "Z"
4BBasic Setup 79
Parker Hannifin
80 Programmer’s Guide
Parker Hannifin
4BBasic Setup 81
Parker Hannifin
Making Motion
Now that the controller is configured, it is ready to make motion. The
ACR controller can perform linear, circular, or more complex motion
with a single axis or multiple axes.
82 Programmer’s Guide
Parker Hannifin
Move Types
To command motion, use a command appropriate to the desired
type of motion, such as JOG (single-axis profile), CIRCW (Two-
Dimensional Clockwise Circle), CIRCCW (Two-Dimensional Counter
Clockwise Circle), SINE (Sinusoidal Move), or TARC (3-D Arc) The
MOV (Define a Linear Move) command activates linear-interpolated
motion.
When the user includes several axes in a single statement, the
controller coordinates the moves (meaning the axes complete their
respective moves at the same time.) Whereas, if each axis is written
as an independent statement, the controller treats them as
independent moves and they are performed one at a time.
The MOV command is not necessary for coordinated motion
because the controller recognizes an axis name and a value as
commanded motion, such as X500. When multiple axes are written in
a single statement, such as X500 Y100, the motion is coordinated.
NOTE : When commanding motion, you must use the axis name; the
axis number is not a valid way to indicate an axis. For more
information on Axis names, see Slaves and Axis Names.
Absolute Motion
Absolute motion is commanded with respect to the established
“home” or reference location.
To make a linear-interpolated move with the MOV command, use
the arguments axis target, specifying the axis name followed by the
target position.
Example 1
The following moves the X axis to the absolute position of 10 units.
MOV X10
Example 2
To command linear-interpolated motion without MOV, the axis and
position must be designated. The following also moves the X axis to
the absolute position of 10 units in an identical manner as Example
1.
X10
Example 3
If motion is commanded for multiple axes on a single line, the
controller treats it as coordinated motion. The X and Y axes
complete their respective moves at the exact same time.
X20 Y-30
5BMaking Motion 83
Parker Hannifin
Incremental Motion
Incremental motion is commanded relative to the current position.
To move an incremental distance (a distance “relative” to the
current position), use a slash mark ( / ) following the axis.
Example 1
In this example, the X axis moves an incremental distance of 20 units
from its current position. Then the Y axis moves a decremental
distance of 30 units from its current position.
X/20
Y/-30
Example 2
The X axis makes an incremental move, Y axis makes an absolute
move, and Z axis makes a decremental move. Written on the same
line, this is a coordinated move; all axes complete their moves at
the same time.
X/2 Y2 Z/-2
Example—Absolute Motion
The X axis is commanded to the following absolute positions:
X0
X100
X200
X300
X400
84 Programmer’s Guide
Parker Hannifin
Example—Incremental Motion
The X axis is commanded to the following relative positions:
X0
X/-400
X/500
X/200
X/100
Example
The following illustrates a coordinated move where the X axis
performs linear-interpolation and the Y axis performs sinusoidal
interpolation.
X2 SINE Y(0,90,90,100)
5BMaking Motion 85
Parker Hannifin
Immediate Mode
While a program is running, the master velocity can be changed for
a master (and all axes attached to it). The change is instantaneous,
and takes effect even if the axis or axes are moving.
Use the FOV (Set Feedrate Override) command to set a floating-
point scaling factor to adjust the master velocity. If a move is in
progress, the master uses the established acceleration or
deceleration ramp to adjust to the new velocity.
NOTE: The FOV command does not change the master velocity
permanently and the change is not saved. To make a
permanent change, adjust the master velocity in the
program code either manually or through the Configuration
Wizard.
Example
The following is typed in at the prompt by the user. It reduces the
master velocity for all attached axes to 75%, then 50%, and then
returns the velocity to 100%.
FOV 0.75
FOV 0.50
FOV 1.00
86 Programmer’s Guide
Parker Hannifin
• Stop: Use the STP (Set Stop Ramp) command to set the master
deceleration ramp used at the end of the next move. The
value is in units per second 2 .
When the stop ramp is set to zero, the move ends without
ramping down. This allows you to merge back-to-back moves.
The final velocity of the first move becomes the initial velocity
of the second move.
Motion profiles can be graphically represented. The following
illustrates the ACC, DEC, and STP values as a typical trapezoidal
motion profile.
5BMaking Motion 87
Parker Hannifin
Motion profile values for each master can be set in two ways:
► Through the Configuration Wizard.
► In a program using the appropriate motion profile statements
(ACC, DEC, STP, or VEL).
In either case, the program continues to use those motion profile
values until new values are commanded.
Example
The following example assumes a 1000 line encoder attached to a
motor. The MULT (Set Encoder Multipliers) command brings the value
to 4000. Then PPU X4000 sets the programming units to revolutions
(4000 pulses/rev) for the rest of the program. The X axis moves 200
revolutions at 20 revs/second, using 10 revs/second² ramps.
MULT X4
PPU X4000
ACC 10
DEC 10
STP 10
VEL 20
MOV X200
88 Programmer’s Guide
Parker Hannifin
Primary Setpoint
All profilers feed their commanded positions to a summation point,
and the result is the Primary Setpoint for each axis. See Figure 1.
In effect, the Jog, Gear, and Cam profilers act as offsets to the
Coordinated Motion Profiler. The example below demonstrates the
offset concept.
Example
Suppose an application cuts four diamond shapes from sheets of
stock. The program commands motion of axes X, Y, and Z. For
simplicity, this example focuses only on the X and Y axes.
Rather than plotting the cutting motion by providing the coordinates
for each diamond, the code in this example provides the
coordinates for one diamond and uses the Jog Profiler to offset the
coordinates for the remaining diamonds.
The axes are attached to a Coordinated Moves Profiler (see
Master/Slave Attachments). The cutting tool starts at coordinates (0,
0) in the lower left quadrant of the stock. Subsequent diamonds are
cut in sequence from upper left, upper right, and lower right
quadrants. The first shape is cut based on the following moves:
X-2 Y1
X0 Y2
X2 Y1
X0 Y0
5BMaking Motion 89
Parker Hannifin
To cut the third and fourth diamond shapes, jog statements again
shift the starting positions for axes X and Y. After each jog statement,
the coordinates of the first shape are reused.
JOG ABS X5
X-2 Y1
X0 Y2
X2 Y1
X0 Y0
JOG ABS Y0
X-2 Y1
X0 Y2
X2 Y1
X0 Y0
90 Programmer’s Guide
Parker Hannifin
For the second shape, the jog statement tells the Jog Profiler to start
the Y axis at 3 units. At the summation point, this data is added to
the values from the other profilers to yield a Y-axis setpoint of +3:
For the third shape, the jog statement adjusts the starting point
again, this time changing the X axis to 5. The Y axis has not been
jogged so it stays at its previous value of +3:
For the fourth shape, the jog statement adjusts the starting point for
the Y axis back to 0. The X axis has not been jogged so it stays at its
previous value of +5:
5BMaking Motion 91
Parker Hannifin
92 Programmer’s Guide
Parker Hannifin
5BMaking Motion 93
Parker Hannifin
• PPU (Set Axis Pulse per Unit Ratio)—sets the pulses per
programming unit for an axis, allowing convenient units for
motion profile such as inches, millimeters, or degrees. The PPU
for each axis is independent of that of other axes.
94 Programmer’s Guide
Parker Hannifin
REN Details
The REN command copies the actual position from the encoder into
the Secondary Setpoint of the servo loop. The values for the Primary
Setpoint register and for the Coordinated Moves Profiler’s offset are
then calculated backwards from the Secondary Setpoint. This action
removes the following error.
In the example in Figure 2, the actual position is 11. That number is
copied into the register for the Secondary Setpoint, and the Primary
Setpoint is then calculated (11).
The Jog, Gear, and Cam profilers’ offsets do not change. The values
in their registers are subtracted from the Primary Setpoint to get the
offset for the Coordinated Moves Profiler:
11–[2+3+4]=2
5BMaking Motion 95
Parker Hannifin
RES Details
The RES command is used to zero out the primary setpoint (RES), or
to preload positions into the Coordinated Moves Profiler and Actual
Position registers (example: RES X10).
See Figure 3 for a diagram of the profiler and summation registers for
the command RES X10. The values of the Coordinated Moves
Profiler, Primary and Secondary Setpoints, and Actual Position
registers have been changed to 10. The remaining profilers have
been changed to zero.
If RES is used without an axis and preload value, all the registers shown in
Figure 3 would be zero (0).
96 Programmer’s Guide
Parker Hannifin
No matter what the designed application is, the controller must first
be configured for coordinated (linear interpolated) motion. This
does not limit the user from simultaneously using the other motion
profilers—jog, gear, or cam. Information regarding which elements it
is working with is provided to the Coordinated Moves Profiler by the
master, slave, and axis attachment statements. The other motion
profilers look to the Coordinated Moves Profiler for the configuration
data. For more information about making attachments, see
Attachments.
When multiple axes are moving, the Coordinated Moves Profiler
computes the vector based on all the axes target points. The vector
moves at the values set through the motion profile (ACC, DEC, STP,
and VEL), and is scaled for each axis. Therefore, all axes start,
accelerate, decelerate, and stop at the same time.
When only one axis is moving, the ACC, VEL, and STP are the same
as the master.
NOTE: The Coordinated Moves Profiler typically uses the clock as its
timebase.
Example 1
Two axes are attached to the same master and instructed to move
to absolute positions: axis X to 25 millimeters and axis Y to 15
millimeters. All axes start, accelerate, decelerate, and stop together.
ACC 750 DEC 750 VEL 75 STP 750
X25 Y15
5BMaking Motion 97
Parker Hannifin
Example 2
Two axes are attached to the same master, and the program moves
one axis to an absolute position: axis X to 25 millimeters. As only axis
X is commanded to move, axis Y is not included in the motion
trajectory calculation.
ACC 750 DEC 750 VEL 75 STP 750
X25
98 Programmer’s Guide
Parker Hannifin
5BMaking Motion 99
Parker Hannifin
Jog Profiler
Each axis has a dedicated Jog Profiler which can, using a set of
motion profile values, control absolute, incremental, or continuous
motion for that axis. It can do this independently or in conjunction
with the other profilers (Cam, Gear, and Coordinated Moves).
NOTE: The Jog Profiler typically uses the clock as its timebase.
NOTE: The ACR controller uses the Jog Profiler for jogging and
homing routines. If the acceleration, deceleration, velocity,
and jerk values are set for jogging, those values are also
used for homing. Therefore, it is a good programming
practice to declare the motion profile at the beginning of
every jog subroutine. Doing so ensures the correct motion
values are used for a jogging or homing routine, regardless
how the program branches to a subroutine.
Example 1
Two axes are set to different acceleration, deceleration, and
velocities, and are moved the same distance.
JOG ACC X1000 Y500
JOG DEC X1000 Y500
JOG VEL X25 Y50
JOG INC X10 Y10
In the lower graph (position motion profile) of Figure 4, the curve between t0 and
t1 shows the change in position during the time it takes for the X axis to
accelerate from zero to the target velocity. Likewise, the curve between t2 and t3
shows the change in position during deceleration to zero. (The actual
acceleration and deceleration curves shown are approximated due to the
resolution of the graph.) The straight line between points P1 and P2 is where the
X-axis movement is a constant velocity.
Figure 5 looks at the movement for the Y axis, characterized by more gradual
slopes for acceleration and deceleration values of 500 in the velocity motion
profile (as compared to the X-axis’ values of 1000).
Again, the straight line between points P1 and P2 on the position motion profile is
where the Y-axis movement is a constant velocity.
Figure 6 shows the velocity motion profiles for both the X and Y axes
superimposed. The Y axis is dashed. Due to a higher JOG VEL value, the Y axis
finishes its commanded motion in less time than the X axis.
Figure 7 graphs the change in position for the X and Y axes. The Y axis is
dashed. The overall slope of the position curve for the Y axis is steeper,
reflecting its higher JOG VEL value (JOG VEL X25 Y50).
Comparing the first curve after t0 for the axes show that a higher acceleration
value presents as a more gradual curve (JOG ACC X1000 Y500).
Example 2
The JOG VEL value is changed while a single axis is in motion (on the
fly (OTF)).
JOG ACC X20
JOG DEC X25
JOG VEL X10
JOG INC X10
DWL 1.0
JOG VEL X5
Example 3
To illustrate sequential jog moves, two axes are attached to the
same program. The program moves each axis an incremental
distance of 10 units using two separate moves. The program waits
until the Jog Active Bit (Bit792) is off, indicating that Axis X has
finished its move, after which time the Y axis is commanded to move
to its incremental position. Figure 9 shows the velocity profile of this
example.
JOG ACC X1000 Y500
JOG DEC X1000 Y500
JOG VEL X25 Y50
JOG INC X10
INH -792
JOG INC Y10
JOG Commands
See the ACR Command Language Reference for detailed
information, including necessary arguments, on JOG (Single Axis
Velocity Profile) and its associated commands:
Figure 12 JOG REN Preloads the Coordinated Moves Profiler (JOG REN X2)
Figure 14 JOG RES Preloads the Jog Profiler (JOG RES X2)
Gear Profiler
The Gear Profiler controls motion for axes needing to match their
motion output to some form of input (see SRC command—Set
External Timebase—for available sources). The input source is usually
external, such as an electronic gearbox, trackball, follower axis, or
changes of ratio related to position.
NOTE: The Gear Profiler typically uses a source other than the
clock as its timebase.
Cam Profiler
The Cam Profiler controls motion for axes needing precise motion. It
uses an array of target points in relation to an externally sourced
timebase (see SRC command—Set External Timebase—for available
sources). By breaking the motion into discrete target points, the cam
arrives at the exact point needed.
The Cam Profiler provides linear interpolation between points,
regardless of how many points are necessary for the move. All
changes in motion are real time. The Cam Profiler does not compile
motion.
NOTE: The Cam Profiler typically uses a source other than the clock
as its timebase.
Homing
The homing operation is a sequence of moves that position an axis
using the Home Limit inputs. The goal of the homing operation is to
return the load to a repeatable starting location.
When the homing operation successfully completes, the controller
sets the absolute position register to zero, establishing a zero
reference position. For servo axes using analog feedback, the
controller sets the voltage register to zero.
The Jog Profiler controls homing operations. If the acceleration,
deceleration, velocity, and jerk values are set for jogging, those
values are also used for homing.
• Search for the selected edge at the velocity set with the JOG
VEL command (Set Jog Velocity).
• Return to the selected edge at the velocity set with the JOG
HOMVF command (Home Final Velocity). If the returning
direction is the same as the selected final direction, the profile
is complete. Otherwise, find the edge again in the selected
final direction (using the velocity set with the JOG HOMVF
command).
Example
The homing routine sets the conditions for homing; a motion profile,
the inputs related to homing, and homing velocity. In addition,
specific bit conditions are set out. The JOG HOME command then
starts the homing process.
The WHILE/WEND statement (Loop Execution Conditional) causes the
program to wait until the homing conditions it contains are met. In
the first AND statement, axis 0 cannot have found home and cannot
have failed to find home. The second AND statement does the same
for axis 1. Once conditions are met, the code within the WHILE/WEND
statement is executed.
Finally, the program prints that the Y axis homing is successful, and
initiates Z channel homing (MSEEK command—Marker Seek
Operation) for axis X. When axis X has successfully completed the Z
channel homing, the program prints that X axis homing is successful.
JOG VEL X10 Y10 : REM Set axes jog parameters used during homing
JOG ACC X100 Y100
JOG DEC X100 Y100
ENDP
Homing Subroutines
Typically, the homing code is a subroutine in a program. The Jog
commands define the motion (JOG ACC, JOG DEC, JOG HOME, JOG
HOMVF, JOG JRK, and JOG VEL), and three bits in the Quinary Axis
Flags (Bit16128-Bit16639) control other aspects of a homing routine.
Figures A and B show the homing operation when the Home Backup
Enable, Home Negative Edge Select, and Home Negative Final
Direction bits are clear (Quinary Axis Flags, Bit16128-Bit16639).
Figure A
Homing Profile
Attributes:
• JOG HOME X1
• Home Backup
Enable (bit
index 24) is
clear.
• Home Negative
Edge Select (bit
index 25) is
clear.
• Home Negative
Final Direction
(bit index 26) is
clear.
Figure B
Homing Profile
Attributes:
• Home Backup
Enable (bit
index 24) is
clear.
• Home Negative
Edge Select (bit
index 25) is
clear.
• Home Negative
Final Direction
(bit index 26) is
clear.
Figure C
Homing Profile
Attributes:
• JOG HOME X1
• Home Backup
Enable (bit index
24) is set.
• Home Negative
Edge Select (bit
index 25) is clear.
• Home Negative
Final Direction (bit
index 26) is clear.
Figure D
Homing Profile
Attributes:
• JOG HOME X1
• Home Backup
Enable (bit index
24) is set.
• Home Negative
Edge Select (bit
index 25) is set.
• Home Negative
Final Direction (bit
index 26) is clear.
Figure E
Homing Profile
Attributes:
• JOG HOME X1
• Home Backup
Enable (bit index
24) is set.
• Home Negative
Edge Select (bit
index 25) is clear.
• Home Negative
Final Direction (bit
index 26) is set.
Figure F
Homing Profile
Attributes:
• JOG HOME X1
• Home Backup
Enable (bit
index 24) is set.
• Home Negative
Edge Select (bit
index 25) is set.
• Home Negative
Final Direction
(bit index 26) is
set.
Figure G
Homing Profile
Attributes:
• Home Backup
Enable (bit
index 24) is set.
• Home Negative
Edge Select (bit
index 25) is set.
• Home Negative
Final Direction
(bit index 26) is
set.
Figure H
Homing Profile
Attributes:
• Home Backup
Enable (bit index
24) is set.
• Home Negative
Edge Select (bit
index 25) is clear.
• Home Negative
Final Direction (bit
index 26) is set.
Figure I
Homing Profile
Attributes:
• Home Backup
Enable (bit index
24) is set.
• Home Negative
Edge Select (bit
index 25) is set.
• Home Negative
Final Direction (bit
index 26) is clear.
Figure J
Homing Profile
Attributes:
• Home Backup
Enable (bit index
24) is set.
• Home Negative
Edge Select (bit
index 25) is clear.
• Home Negative
Final Direction (bit
index 26) is clear.
Limit Detection
The Configuration Wizard assists with setting up the Hardware and
Software Limits Detection.
When limits are enabled, motion stops when the load encounters a
limit. If the load hits a hardware limit, motion stops at the rate set by
the HLDEC; if the load hits a software limit, motion stops at the rate
set by the SLDEC.
Setpoint Compensation
There are two mechanical characteristics that the controller takes
into consideration and compensates for: hysteresis losses and non-
linear position error, which are processed by the Backlash Generator
and Ballscrew Profiler, respectively.
Following Error
The Secondary Setpoint is compared with the value of the Actual
Position received from a feedback device. See Figure 17. The
difference between the Secondary Setpoint and Actual Position is
called the Following Error:
Following Error = SSP - ACT POS
The controller makes adjustments to the motor position through a
constant cycle of comparison and correction. Following Error is used
by the PID loop (servo control algorithm) to keep the Actual Position
equal (or approaching equal to) the Secondary Setpoint.
Application Examples
The sample programs in this section provide more in-depth
examination of the following topics:
Basic Motion
Enable Drive
EPL Network
Homing
Open Sample
Teach Array
Basic Motion
PROGRAM
END
'ABSOLUTE MOVES
X0
X100
X200
X300
X400
INH -516
RETURN
X/-800
X/500
X/200
X/100
INH -516
RETURN
X/50
X400
INH -516
RETURN
ENDP
Enable Drive
PROGRAM
END
'SUBROUTINE OF ENABLEDRIVE
_ENABLEDRIVE
ENDP
EPL Network
#DEFINE ResetEPLNetwork BIT150
PROGRAM
END
'SUBROUTINE OF EnableEPLNetwork
_EnableEPLNetwork
DWL 0.2
ENDP
Homing
Homing Example 1
PROGRAM
END
'SUBROUTINE HOMING
_HOMING
JOG VEL X1 Y1 : REM Set axes jog parameters used during homing
JOG ACC X10 Y10
JOG DEC X10 Y10
HLBIT X0 Y3
'X uses PosEOT (input0), NegEOT (input1), Home (input2)
'Y uses PosEOT (input3), NegEOT (input4), Home (input5)
RETURN
ENDP
Homing Example 2
Homing Example XYZ System
PROG0
PROGRAM
GOSUB EnableDrives
GOSUB HomeAll
REM insert application code here
END : REM end program
_EnableDrives
DRIVE ON X Y Z
DWL 0.15
REM wait 150ms for servos to enable before commanding moves
RETURN
_HomeAll
HLIM X3 : REM enable limits
HLIM Y3 : REM enable limits
HLIM Z3 : REM enable limits
JOG ACC X500 : REM set jog accel for homing
JOG DEC X500 : REM set jog decel for homing
JOG VEL X100 : REM set jog velocity for homing
JOG HOMVF X25 : REM set jog final velocity for homing
JOG ACC Y300 : REM set jog accel for homing
JOG DEC Y300 : REM set jog decel for homing
JOG VEL Y75 : REM set jog velocity for homing
JOG HOMVF Y15 : REM set jog final velocity for homing
JOG ACC Z100 : REM set jog accel for homing
JOG DEC Z100 : REM set jog decel for homing
JOG VEL Z25 : REM set jog velocity for homing
JOG HOMVF Z5 : REM set jog final velocity for homing
REM now find the Z markers for each axis encoder for
REM more accurate positioning
REM MSEEK uses master move profile settings
ACC 250
VEL 50
DEC 250
STP 250
JRK 1250
_ HomeFailed
IF (BIT 16199) THEN PRINT “ Z Homing Failed”
IF (BIT 16135) THEN PRINT “ X Homing Failed”
IF (BIT 16167) THEN PRINT “ Y Homing Failed”
END
ENDP
Open Sample
PROGRAM
END
'SUBROUTINE OPENPORT
_OPENPORT
_LOOP2
PRINT #1, "Program terminated"
CLOSE #1
RETURN
ENDP
Teach Array
PROGRAM
END
_Teach
RES X : REM Reset position to zero
DRIVE OFF X : REM DISABLE DRIVE, teach points by manually move motor.
'Print to the terminal "points to teach" and stores value into String
‘Variable 0
INPUT; "Enter number of points to teach (value must greater than 0) = ";
$V0
'Stores the Value of String Variable 0 into Long Variable 1
LV1 = VAL($V0)
PRINT ""
PRINT LV1
RETURN
ENDP
MODE 0 No Conversion
MODE 2 No Conversion
Transmitting
If the character to be sent is either a 0x7F or a character in the
range of 0x00 to 0x1F, the character is 'XORed' with 0x40 and
proceeded with a '#' character. Otherwise, the byte is sent normally.
For example, if the character to be sent is 0x01, the character is
transmitted as a "#A" string. ( 0x01 XOR 0x40 = 0x41 = 'A' ) The special
case where the character to be sent is the '#' character is handled
with the two character "##" string.
Receiving
When receiving control prefix encoded data, a '#' character is
thrown away and causes the next character to be read from the
data stream. If the character is in the range of 0x3F to 0x5F, the
character is 'XORed' with 0x40 to decode the true value. Otherwise,
the character is used exactly as read from the stream.
Transmitting
If the character to be sent is greater than 0x7F, the character is
'ANDed' with 0x7F and proceeded with the '&' character. Note that
the AND may result in a control code which must then handled by
control character prefixing. The original character may also need to
be sent with control character prefixing.
For example, if the character to be sent is 0xC2, the character is
transmitted as a "&B" string. ( 0xC2 AND 0x7F = 0x42 = 'B' ) As another
example, if character to be sent is 0x83, the character is transmitted
as the three character "&#C" string. ( 0x83 AND 0x7F = 0x03 (control
character) ) The special case where the character to be sent is the
'&' character is handled with the two character "#&" string.
Receiving
When receiving high bit encoded data, '#' characters are handled
as normal control character prefix sequences. If the received
character is neither a '#' nor a '&' character, the character is used
exactly as read from the stream.
If the received character is the '&' character, it is thrown away and
causes the next character to be read from the data stream. This
new character may be a '#' character, which will initiate control
prefix decoding sequence. The result is a value in the range of 0x00
to 0x7F, which is then 'ORed' with 0x80 to re-establish the high bit in
the data.
Packet Request
Packets are requested by sending a four-byte binary request record.
The following is a list of the bytes contained in this record:
Data Field Description
Isolation Mask
The isolation mask acts as a filter to select only the specific data
required (for example, actual position for AXIS 2, AXIS 3 and AXIS 5.)
If a bit is set in this mask, the corresponding data field is allowed to
return in the data packet. In order to return all eight fields, the
isolation mask must be 0xFF. Mask Bit0 is used to isolate the first field
in a group and Bit7 is used to isolate the last field.
Parameter Access
The following is a list of groups and what the isolation mask will
isolate:
Group Description Isolation Usage
Packet Retrieval
Packet Header
After a packet request is received, the ACR2000/ACR8000/ACR8010
responds by sending back a four-byte packet header. This header is
a direct echo of the request record. The echoing allows host
software to do asynchronous sampling. A request can be sent by
one part of the program and packet retrieval can be done by a
centralized receiver. This routine would recognize the 0x00 in the
header as an incoming packet and act accordingly.
In a synchronous retrieval mode, it is possible for extra data to be in
front of an incoming packet header. This would occur if there is any
ASCII data pending at the time of the request, such as during a LIST.
In order to retrieve a packet correctly, the host software must be
able to process this data while waiting for the packet header to
arrive. This should not be a problem, however, if all system echoing is
turned off and no ASCII data retrieval is being done.
Packet Data
After the packet header is received, the data arrives as a set of four
byte fields. The bits in the isolation mask determine the number of
fields and what they apply to. If the mask is 0xFF, a total of eight
fields (32 bytes) would follow. The first field to be returned
corresponds to the bit position of the lowest bit in the mask that is
set.
Usage Example
This example requests actual positions from axis 2, 3 and 5:
Output: 00 30 02 2C
Input: 00 30 02 2C 20 21 22 23 30 31 32 33 50 51 52 53
Actual Positions:
AXIS2: 0x23222120
AXIS3: 0x33323130
AXIS5: 0x53525150
Packet ID Codes
Code Packet Type Description
Usage Example
This example requests current position from axis 0 parameter P12288:
Output: 00 88 00 30
Input: 00 88 00 30 10 11 12 00
Transmit Packet
Data Field Data Type Description
Receive Packet
Data Field Data Type Description
Transmit Packet
Data Field Data Type Description
Receive Packet
None.
Transmit Packet
Data Field Data Type Description
Receive Packet
Data Field Data Type Description
Transmit Packet
Data Field Data Type Description
Receive Packet
None.
The command returns the header and peek address followed by the
requested data.
Transmit Packet
Data Field Description
Receive Packet
Data Field Description
Conversion Codes
Code Source Destination
Usage Example
NOTE: Addresses shown are for example only. Addresses will vary
from card to card, depending on system memory
allocation.
Output: 00 90 00 03 00 50 40 00
Input: 00 90 00 03 00 50 40 00 10 11 12 13 20 21 22 23 30 31 32 33
Receive Packet
None.
Conversion Codes
Code Source Destination
Usage Example
NOTE: Addresses shown are for example only. Addresses will vary
from card to card, depending on system memory
allocation.
This example pokes data into three words, starting at poke address
0x405000:
Output: 00 91 00 03 00 50 40 00 10 11 12 13 20 21 22 23 30 31 32 33
Transmit Packet
Data Field Description
Receive Packet
Data Field Description
Parameter Codes
Code Mnemonic Description
Usage Example
NOTE: Addresses shown are for example only. Addresses will vary
from card to card, depending on system memory
allocation.
Output: 00 92 05 02
Input: 00 92 05 02 00 80 40 00
Transmit Packet
Data Field Data Type Description
Receive Packet
Data Field Data Type Description
Usage Example
NOTE: Addresses shown are for example only. Addresses will vary
from card to card, depending on system memory
allocation.
Output: 00 93 00 30
Input: 00 93 00 30 31 50 40 00
Transmit Packet
Data Field Data Type Description
Receive Packet
None.
Usage Example
NOTE: Addresses shown are for example only. Addresses will vary
from card to card, depending on system memory
allocation.
This example uses the Binary Mask Command to clear all of the
Opto-isolated Outputs and then set Output 32. The data address for
Opto-isolated Outputs Parameter P4097 is assumed to have been
previously returned using the Binary Parameter Address Command
on the previous page.
Output: 00 94 00 00 43 60 40 00 FF FF FF FF 01 00 00 00
Transmit Packet
Data Field Data Type Description
Receive Packet
None.
Usage Example
This example uses the Binary Parameter Mask Command to clear all
of the Opto-isolated Outputs and then set Output 32.
Output: 00 95 01 10 FF FF FF FF 01 00 00 00
Header Code 0
Enable Rapid Move Modes flag disabled—default cleared value:
Data Field Data Type Description
Bit 2 STP Ramp Activate Sets STP equal to DEC, else STP 0
The enabled mode for this flag (Secondary Master Flag Bit Index 5
Set) uses the following Header Code 0 definition. This Header Code 0
definition is compatible with ACR2000/ACR8000/ACR8010 Firmware
Versions 1.17.05 and above, and is not compatible with AcroCut/
AcroMill Software Versions 1.15.00 and below. The Move Modes for
this header code are defined following the header code definitions.
Header Code 0
Enable Rapid Move Modes flag enabled—set value:
Data Field Data Type Description
Bit 0 Move Mode Bit 1 Selects the move mode for this move
along with Header Code 0 Bit 2.
Bit 2 Move Mode Bit 0 Selects the move mode for this move
along with Header Code Bit 0.
Header Code 1
Data Field Data Type Description
Header Code 2
Data Field Data Type Description
Header Code 3
Data Field Data Type Description
Bit 5 Block Skip Check Sets the master Block Skip Check
Header Code 4
Data Field Data Type Description
Bit 1
Bit 2
Bit 5
Bit 6
Bit 7
Header Code 5
Data Field Data Type Description
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Header Code 6
Data Field Data Type Description
Header Code 7
Data Field Data Type Description
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
The following Move Modes definition applies to Header Code 0 used
with the Master Enable Rapid Move Modes flag set.
Move Modes
Bits 0 and 2 in Header Code 0 indicate which type of move mode is
contained in the binary move packet as follows:
Bit 1 Bit 0 Move Mode
(Header Code 0 Bit 0) (Header Code 0 Bit 2)
Example 1
The following illustrates Move Mode 0—Feed Continuous:
Example 2
The following illustrates Move Mode 1—Feed Cornering:
Example 3
The following illustrates Move Mode 2—Feed Stopping:
Example 4
The following illustrates Move Mode 3—Rapid:
Linear Moves
The bits in header code 2 indicate which target positions are
contained in the binary move packet. If the "incremental target" bit
in header code 3 is set, the targets are relative to the current target
positions of the slaves; otherwise, the targets are absolute. The
"floating point data" bit in header code 3 indicates that the target
data is in IEEE floating point format, otherwise they are long integers.
Arc Moves
When the "arc mode" bit in header code 1 is set, a circular arc is
generated using two of the first three slaves attached to a master.
Any slaves that are given a target position, but are not part of the
circular interpolation, are executed as normal linear moves. This
allows for helical interpolation.
The "arc plane" bits in header code 1 are combined to generate a
number from 0 to 3 that defines the primary and secondary axes for
the arc as follows:
Arc Plane Primary Axis Secondary Axis
0 Slave 0 Slave 1
1 Slave 1 Slave 2
2 Slave 2 Slave 0
3 Reserved Reserved
Binary SET
Data Type Description
Binary CLR
Data Type Description
Usage Example
Binary Output Description
1C 08 02 Set bit 520 ( 0x0208 )
1D 20 00 Clear bit 32 ( 0x0010 )
Binary Format
Data Type Description
Usage Example
This example uses the following IEEE conversions:
0.500 = 3F000000
0.123 = 3DFBE76D
Binary Format
Data Type Description
Usage Example
This example uses the following IEEE conversions:
0.500 = 3F000000
0.123 = 3DFBE76D
Description
Global user variables (see Variable Memory Allocation) can be read
and set using the Binary Peek and Poke Command interface.
NOTE: A maximum word count of 255 can be used when using the
Binary Peek and Poke Command interface.
ACR1200 0x400008
ACR1500 0xC08008
ACR2000 0x400008
ACR8000 0x403E08
ACR8010 0x403E08
ACR8020 0x400009
Additional Features
CANopen
The CANopen feature on ACR series controllers provides
standardized network communication and flexible configuration for
motion control.
Any digital input or output of any node that appears in this table will
not appear in the standard mapping of CANopen digital I/O. In
other words, each I/O bit is controlled by only one flag. In addition,
this table represents the maximum amounts of I/O that can appear
at XIO flag parameters 4104-4111. For example, if P32771= 1 and
Node 0 only has 32 physical inputs and outputs, only flag parameters
4104 and 4105 have meaning.
For available bit rates and constraints of bus length, see the CiA
Draft standard 301, version 4.02, table 2. The default bit rate is
125Kbit/second. Bit rate and master node numbers are saved with
the ESAVE command.
node of the example above, and the timing in the table below, the
time using a PIO-347 would be 12 milliseconds, and using a PIO-337
would be two milliseconds.
Node Type Base time time/digital point time/analog point
(milliseconds) (microseconds) (microseconds)
PIO-337 1 15 40
Reserved 11267
Status Flags
SW Rx Overflow 11272
HW Rx Overflow 11273
Reset Network R/W When set this flag will reset all of the
Extended I/O nodes. This may be
needed if there is a baud rate, node
ID, wiring change, unrecoverable error
or a loss in communications.
Reserved P32774
Reserved P32782
Reserved P32783
The CANopen STATUS LED table below gives the possible LED
indicator states and the corresponding CAN state and controller.
The only normal states are “PRE-OPERATIONAL” and “OPERATIONAL”.
Any red in the CAN LED indicates a problem. All states listed below
are consistent with CiA DR-303-3 “Indicator Specification”, although
not all possible states listed in that document can occur in the
ACR9000. In addition, the ”off” and “blinking red” indications are
unique to the ACR9000, not included and not conflicting with the
states listed in CiA DR-303-3 “Indicator Specification”.
The CANopen status LED is located just below the CANopen
connector on the ACR9000.
CANopen STATUS CiA DR 303-3 Description Possible
LED CAN state ACR9000
state(s)
The Bus State Description table below gives the possible bus states
and the corresponding CAN LED indicator state. The only normal
states are “READY TO START” and “NETWORK STARTED”. Any red in
the CAN LED indicates a problem.
Bus State Description (parameter P32779) Bus CAN LED State
State
EXCESS BUS ERRORS. The controller chip has too 6 One Red blink
many bus errors. One possible reason would be inside blinking
incorrect bit rate on one or more modules. Green
BUS OFF. The CAN controller is bus off, and the 10 Solid Red
network must be re-started.
The Node ID must be set by the user to match the node ID settings
on the actual nodes. All other node information is filled in by the
controller after the network is started. The node information is saved
with the ESAVE command, and user applications may use it to verify
expected network configuration, or make run time application
decisions.
This information could serve as a source for a front-end software GUI
that displays bus and node status, although no configuration would
be possible. Another possibility would be to implement a sort of
“Network Configuration Verify” command that would allow the
application to easily verify that the configuration is the same every
time.
In the table below, nodes are numbered 0-3, like all other ACR
objects. This is the node number, from the ACR9000 point of view.
The node ID is the setting on that node’s DIP switch, and must be
between 1 and 127, but may not conflict with the chosen Master
node ID.
Description/Node number 0 1 2 3
For each node, the lowest bit number for extended digital inputs
block of that node will correspond the lowest numbered digital input
on that node on the network. Numbering will proceed upward for all
the digital inputs on that numbered node. The same process occurs
for the Digital Outputs. This continues until the actual number of
digital inputs and outputs on the network or maximum number (512)
of digital I/O is reached. For example, the first digital input on node
0 is bit 11520, and the first digital input on node 2 is bit 13568.
Each node will have an information parameter block, described
later in this text. This block will contain, among other things, the
number of bytes of digital inputs and outputs. Digital I/O are
assigned in blocks of eight, so the number of bits assigned to each
node is a multiple of eight. For example, suppose node 2 has 12
digital inputs. Node 2’s inputs would be bits 13568-13579, even
though the node status parameter indicates that it has two bytes of
inputs. The same numbering rules apply to digital outputs.
For example a 0-10V DAC would take values of 0-32767, and a ±10V
device would take values of –32768 to 32767. However, a ±5V
device would also take values of –32768 to 32767. To translate from
this raw binary number to the range and units being controlled or
measured, ACR9000 employs entered offsets and gains.
An offset has the same units as the user units of the analog value, for
example volts or milliamps, and translates the center of the analog
range to a value that allows a gain to be applied. A DAC gain has
the units of full-scale binary resolution per user unit. The DAC range is
16-bit or 65536 DAC counts, regardless of the actual DAC resolution.
For example, suppose a 12-bit DAC asserts –10V to +10V, where a
value of 32768 will assert –10V and 32767 will assert +10V. In this
case, the offset is 0V, and the gain is (65536/20 = 3276.8). If the user
wants to assert 7.5V, a value of 7.5 *3276.8 = 24576 must be written
to the DAC.
The process is different for an ADC. An ADC gain has the units of full-
scale user units. For example, if the input of the analog device were
a maximum of +/- 10V, then the gain would be 10. Alternatively, if
the input of the analog device were a maximum of +/- 20ma, then
the gain would be 20. Internally the raw analog count value is
normalized such that +/-1.0 represents full scale positive and
negative before the user gain is applied, and user offset added.
The ACR9000 automatically performs this arithmetic so that the
analog values appear to the user as user units, not raw DAC or ADC
counts. The user must know the analog range of the DAC or ADC in
order to calculate the appropriate gain for entry into the ACR9000
parameter structure. Offset values will usually be zero unless an
actual physical offset is required. ACR9000 uses default values for
gains and offsets if the user does not overwrite the defaults. All
default-offset values are zero. All default ADC gains are ten (10.0),
and all default DAC gains are 3276.8.
The DAC and ADC values, gains, and offsets are accessed in blocks
of eight parameters each, as shown in the table below. Since each
node may accommodate all 32 analog inputs and outputs, a range
of 512 bits is reserved for each node. The parameter numbers
correspond to a range of 33280-33791 for the lowest numbered
node, 33792-34303 for the next node, etc. The table below shows the
parameter mapping for the lowest number node. For each higher
number node, add 512.
These tables appear similar to the other parameter tables for ACR
DACs and ADC’s, but there is no relationship in function. Nor do the
other DAC and ADC commands have any function for ACR9000
extended analog I/O. The DAC commands assume their use as
command outputs for drives, and ACR9000 does not have the type
of ADCs that are assumed by other ADC commands.
Saved Parameters
All the parameters required to set up the extended I/O network are
saved with the ESAVE command, and automatically recalled on
power up. In addition, some of the parameters determined by the
controller, such as the total number of analog and digital I/O, are
also saved with the ESAVE command. This allows an application to
compare the total I/O expected before the network is started with
the actual amount found when the network is started. The exact
parameters saved and recalled are P32768 through P32778, the
node IDs for each node, and the gains and offsets for all DAC and
ADC parameter blocks of each node.
Example 1
The following example uses two Parker I/O nodes. The first,
configured as node 3, has a PIO-337, four digital inputs, four digital
outputs, four analog inputs (0 to 10 VDC) and two analog outputs (0
to 10 VDC). The second, configured as node 4, has a PIO-347, four
digital inputs, four digital outputs, four analog inputs (0 to 10 VDC)
REM MORE CODE MAY BE NEEDED HERE TO ENSURE THE NETWORK IS OPERATIONAL
Example 2
PROGRAM
GOSUB EnableCANopen
END
_EnableCANopen
INH -11265 : REM INHIBIT PROGRAM UNTIL START NETWORK HAS FINISHED
ENDIF
RETURN
ENDP
Drive Talk
The Drive Talk feature on ACR series controllers provides
communication with Aries drives through the Axis connectors. You
can include Drive Talk in programs and PLC programs. Machine
builders, for example, could configure and monitor drive data—such
as motor and drive temperatures, drive under or over voltages, and
excessive torque—through a custom HMI status panel.
Drive Talk lets you:
Communication
The Axis connectors provide an RS-485 communication interface to
the drive through the COM2 port. Parker drives supporting Drive Talk
automatically detect RS-232/485 on power up; therefore, the drives
must be connected to ACR series controller before being powered
up. Otherwise, the drives set the communication interface as RS-232.
Auto-Addressing
You can have the controller automatically assign address numbers
to drives that are connected and use the Drive Talk feature.
By default, auto-addressing is disabled. When enabled, an ACR
controller assigns addresses only to the Aries drives connected and
powered up.
For all Aries drives, the default address is zero—zero represents a
non-address to the drive. Therefore, the first acceptable address is
one.
The ACR controllers assigns each drive an address relative to the axis
to which the drive is connected. As the numbering for controller
axes begins with zero and the drives cannot accept an address of
zero, the addressing scheme is “off” by one. This is best illustrated
through an example.
For example, you have a eight axis ACR controller, and axes 0, 1, 4,
and 7 are connected to drives with the Drive Talk feature. The auto-
address sequence is as follows: the drive connected to axis 0 is
assigned address “1”; the drive connected to axis 1 is assigned
address “2”; the drive connected to axis 4 is assigned address “5”;
and the drive connected to axis 7 is assigned address “8”.
Enabling Auto-Addressing
► To enable auto-addressing, set the “Auto Address Request” bit
(bit index 0, Drive Talk Drive-Control Flags).
Configuration
You can get and send the configuration data of an Aries drive. On
power up the controller does not contain any drive configuration
data. When you get drive configuration data, the controller stores it
in the “Drive Talk Parameters”.
Upload
► To upload configuration data, set the “Get Configuration
Request” bit (bit index 1, “Drive Talk Drive-Control Flags”).
Download
► To download configuration data, set the “Send Configuration
Request” bit (bit index 2, “Drive Talk Drive-Control Flags”).
NOTE: Be sure all Aries drives are connected to the ACR controller
before power up (due to the Aries communication auto-
detect—see the section titled Communication, above).
Example
The following example demonstrates the set up for two axes with
Aries drives:
OPEN DTALK “COM2:9600,N,8,1” AS #1 REM OPEN PORT
P28672=1 : REM SET DEVICE NUMBER FOR DRIVE 1
P28928=1 : REM SET DEVICE NUMBER FOR DRIVE 2
P28673=0 : REM SET DRIVE TALK AXIS1 TO ARIES DRIVES
P28929=0 : REM SET DRIVE TALK AXIS2 TO ARIES DRIVES
CLR 11122 : REM RESET TIMEOUT
CLR 11123 : REM RESET TIMEOUT
CLR 11124 : REM RESET TIMEOUT
SET 10505 : REM GET TPE AXIS0 USING GET DRIVE DATA
SET 10500 : REM UPDATE DATA AXIS0 USING
REM GET_DRIVE_DATA_REQUEST
SET 10537 : REM GET TPE AXIS1 USING GET DRIVE DATA
SET 10532 : REM UPDATE DATA AXIS1 USING
REM GET_DRIVE_DATA_REQUEST
?P28693 : REM SHOW TPE AXIS0 ON TERMINAL
?P28949 : REM SHOW TPE AXIS1 ON TERMINAL
SET 10500 : REM GET TPE AXIS1 USING GET DRIVE DATA
SET 10532 : REM UPDATE DATA AXIS1 USING
REM GET_DRIVE_DATA_REQUEST
?P28693 : REM SHOW TPE AXIS0 ON TERMINAL
?P28949 : REM SHOW TPE AXIS1 ON TERMINAL
NOTE: When set in the “pass through” mode, the ACR controller no
longer accepts AcroBASIC commands.
NOTE: You can only use the DTALK command to set the controller
into the “pass through” mode. Subsequent communication
with the Aries drive is performed through a terminal, using
the Aries command language. Do not use the DTALK
command in a ACR controller program or PLC.
Example
The following example opens a Drive Talk session, then enters the
“pass through” mode.
P00>OPEN DTALK "COM2:9600,N,8,1" AS #1 : REM OPEN DRIVE TALK PORT FOR REM
DEVICE NUMBER 1
P00>P28672=1 : REM SET AXIS0’S DEVICE NUMBER FOR DTALK
REM TO 1, MUST MATCH THE OPEN COMMAND ABOVE
P00>P28673=0 : REM SET AXIS0 TO AN ARIES DRIVE
P00>CLR11122 CLR11123 CLR11124 : REM CLEAR ALL TIMEOUT BITS
P00>SET11104 : REM START AUTO ADDRESS
P00>DTALK X : REM START TALKING DIRECTLY TO THE DRIVE
P00>
Inverse Kinematics
Kinematics is a branch of mechanics that provides a mathematical
means of describing motion. Inverse kinematics looks at a position
and works backwards to determine the motions necessary to obtain
that position.
Robotic applications frequently use inverse kinematics. Algorithms
describe the mechanical system, and translate the rotational motion
of robotics into Cartesian coordinates. Consequently, an end user
provides simple Cartesian coordinates for an application, and the
inverse kinematics calculates necessary movements to reach that
position.
Suppose an application has a cutting tool at the end of a 4-axis
robotic arm, and an HMI. The controller, using algorithms developed
by the application builder, transforms the motion target-points from
Cartesian coordinates to rotational coordinates to position the arm
joints and cutting tool. Once transformed, the controller interpolates
the target points to generate a motion path. See the illustration
below:
Example
The following program results in a circle instead of a straight line
because of the transformation described in program 7 (PROG7).
PROG7
PROGRAM
P12361= sin( P12360) : REM Describe transformation in PROG7
P12617= cos(P12360) : REM Describe transformation in PROG7
ENDP
PROG0
ATTACH MASTER0
ATTACH SLAVE0 AXIS0 "X"
ATTACH SLAVE1 AXIS1 "Y"
PPU X 2000 Y 2000 : REM Scale commands to engineering units
ACC 100 DEC 100 STP 0 VEL 0
INVK PROG7 : REM Tell MASTER0 where the transformation are
INVK ON : REM Turn on the Kinematics
PROGRAM0_start
X / 0.2 : REM Incremental move in Cartesian space
GOTO start
Troubleshooting
When a system does not function as expected, the first thing to do is
identify and isolate the problem. When this is accomplished, steps
may be taken toward resolution.
Problem Isolation
The first step is to isolate each system component and ensure that
each component functions properly when it is run independently.
This may require dismantling the system and putting it back together
piece by piece to detect the problem. If additional units are
available, it may be helpful to exchange them with the system’s
existing components to help identify the source of the problem.
Determine if the problem is mechanical, electrical, or software
related, and note whether it can be recreated or is repeatable.
Random events may appear to be related, but they are not
necessarily contributing factors to the problem.
There may be more than one problem. Isolate and solve one
problem at a time.
Information Collection
Document all testing and problem isolation procedures. If the
problem is particularly difficult to isolate, be sure to note all
occurrences of the problem along with as much specific information
as possible. These notes may come in handy later, and will also help
prevent duplication of testing efforts.
Once the problem is isolated, refer to Table 1, Common Problems
and Their Solutions. If instructed to contact Parker Technical
Assistance, please refer to Technical Assistance for contact
information.
10BTroubleshooting 183
Parker Hannifin
Troubleshooting Table
This section includes a table of common problems and their solutions.
For locations of the ACR90x0 controllers’ status LEDs, and for non-problem indications, see Chapter 2,
Specifications, in the ACR9000 Hardware Installation Guide. Table 1 in this chapter only lists problem LED
indications.
Power status LED is There is no power to the controller. Check for disconnected power cable.
not on Check for blown fuse.
Verify the power source meets requirements outlined in
Chapter 2, Specifications, of the ACR9000 Hardware
Installation Guide.
Power status LED is There is inadequate power to the controller. 1. Verify the power source meets requirements outlined in
steady red Chapter 2, Specifications, of the ACR9000 Hardware
Installation Guide.
2. Remove all cables except power.
If the LED turns green after removing the cables, re-
attach the cables one at a time to determine which
cable or device is causing the problem.
If the LED does not turn green, contact Parker
Technical Assistance.
Power status LED is Controller encountered error during boot process. Contact Parker Technical Assistance.
alternating red/green
Axis status LED is not Axis is disabled with no fault (normal state for Enable drive.
on steppers or servo motors).
Axis status LED is red Axis fault. Motion on this axis is disabled during a Check for faulted drive. Enable drive. (Refer to Operation
fault state. section of this table.)
NOTE: The LED illuminates red whenever the drive Check for axis cable disconnected.
fault input is activated (drive faulted, no axis cable
connected, etc.)
CANopen LED
CANopen LED is red, Excess bus errors: At least one CAN controller error The controller chip has too many bus errors. One possible
single flash counter has reached or exceeded the warning level reason would be incorrect bit rate on one or more modules.
(too many error frames).
CANopen LED is red, Error control event: guard event (NMT-slave or NMT- Health Event: A node has stopped sending heartbeat or node
double flash master) has occurred. guard responses. The errant node will have a node state of 0
(dead). One possible reason would be node received overrun
Error control event: heartbeat event (heartbeat
caused by a cyclic period that is too fast for the node.
consumer) has occurred.
Another possible reason is the connection between the master
and slave has been severed.
CANopen LED is red, Sync error: SYNC message has not been received Object 0x1006 contains the sync cycle period in ms. The sync
triple flash within the configured communication cycle period cycle period time out should be the configured sync cycle
timeout. period multiplied by 1.5.
CANopen LED is off Controller is executing a reset. This is not a problem unless the controller is finished executing
a reset. If the LED does not turn on after a reset, check the
connection to the controller.
Ethernet link/activity: No Ethernet link is detected. Check for the correct type of cable.
yellow LED is off Verify the cable pinout matches the ACR90x0. (See the section
“Ethernet and ETHERNET Powerlink Connectors” in Chapter 2,
Specifications, of the ACR9000 Hardware Installation Guide.)
Ethernet speed: green Ethernet port is getting intermittent 10Mbps and Verify the Ethernet card in the PC is functioning correctly.
LED is flashing 100Mbps connection. Verify the ACR controller Ethernet port is functioning correctly.
10BTroubleshooting 185
Parker Hannifin
EPL link/activity: No Ethernet link is detected. Check for the correct type of cable.
yellow LED is off Verify the cable pinout matches the ACR90x0. (See the section
“Ethernet and ETHERNET Powerlink Connectors” in Chapter 2,
Specifications, of the ACR9000 Hardware Installation Guide.)
Ethernet speed: green Ethernet port is getting intermittent 10Mbps and Verify the Ethernet card in the PC is functioning correctly.
LED is flashing 100Mbps connection. Verify the ACR controller Ethernet port is functioning correctly.
Serial Communication
Problem Incorrect cable. Check that the serial cable is a null modem serial
communicating with communication cable.
controller
Incorrect COM port settings. Check COM port settings.
Bits per second: 38400
Data bits: 8
Parity: None
Stop bits: 1
Flow control: XON/XOFF
USB Communication
Communication Error: USB driver not installed. Reconnect ACR90x0 controller. Windows will detect new
17054 hardware.
Install the driver from Parker technical support or CD.
Communication Error: Using straight through (patch) Ethernet cable. Change to a crossover Ethernet cable.
11003
Communication Error: Using crossover Ethernet cable through router/hub. Change to a straight through Ethernet cable.
11010
Communication Error: Wrong computer IP address and/or subnet mask. Change IP address of computer in Ethernet card settings.
11003
Communication Error: Same IP address as ACR9000. Change IP address of computer in Ethernet card settings.
10061
Communication Error: Wrong IP address configured in ACR-View Enter in correct ACR9000 IP address.
11010 communication window.
Controller is not AMCSPCI driver card not installed correctly. Reinsert the ACR1505 or ACR8020.
present in Windows Check for compatible operating systems.
Device Manager
Operation
Drive will not enable Motion enable input is open. Check if 24 VDC is applied to the Motion Enable Input.
Verify by checking Status Panels Æ Bit Status Æ Bit 5646 indicates status of 24VDC Motion Enable Input.
Miscellaneous Control Flags.
Bit 5645 indicates if Motion Enable Input has been latched.
If both 5645 and 5646 are set, reapply 24V to Motion Enable
Input.
If only 5645, then SET 5647 to clear 5645 latch.
Encoder signal fault and/or encoder signal is lost. For Encoder Signal Fault: Check for incorrect termination.
Verify by checking Status Panels Æ Bit Status Æ Noise in the system can cause missed and/or false encoder
Encoder Flags. feedback values.
NOTE: Each encoder input has specific flag sets. For Encoder Signal Lost: Check feedback cables.
10BTroubleshooting 187
Parker Hannifin
Drive will enable, but Incorrect configuration for motor attached. Correct the configuration for servo or stepper through the
will not hold torque Configuration Wizard.
Servo motor running open loop. Disable drive and clear the appropriate Bit.
Verify that the drives are running open loop: Status
Panels Æ Bit Status Æ Axis Flags Æ Primary Axis
Flags.
(Each axis is indicated by Bit “Open Servo Loop.”)
Tuning gains are not set correctly. Refer to Servo Tuning Tutorial.
Check if the tuning gains are set too low: Status
Panels Æ Numeric Status Æ Axis Parameters Æ Servo
Parameters.
Torque limit is not set correctly. Example: TLM X1 indicates torque is limited to 10% of drive
Verify torque limit setting: Status Panels Æ Numeric motor capacity for axis X.
Status Æ Axis Parameters Æ Limit Parameters Æ
Plus/Minus Torque Limit.
Master Kill All Moves request is active. Clear the appropriate Master Kill All Moves Request Bit.
Verify: Status Panels Æ Bit Status Æ Master Flags. Also clear all associated Slave Kill All Motion Request Bits.
(Each master is indicated by Bit “Kill All Moves
Request.”)
Axis Kill All Motion Request is active. Clear the appropriate Axis ACR9000 Kill All Motion Request Bit.
Verify: Status Panels Æ Bit Status Æ Axis Flags Æ
Quaternary Axis Flags.
(Each axis is indicated by Bit “ACR9000 Kill All
Motion Request.”)
Master in feedhold or feedholding state. Set the appropriate Cycle Start Request Bit.
Verify: Status Panels Æ Bit Status Æ Master Flags.
(Each master is indicated by Bit “In Feedhold or
Feedholding.”)
Slave axis not attached to master. Correct the configuration through the Configuration Wizard and
Check the configuration by going into the correct download the setup code.
PROG level. Type ATTACH.
Jog or Master Velocity set to zero (no Master Assign Velocity or Jog Velocity values. Example: VEL 1 or JOG
Profile). VEL X 1.
Check these parameters by going into the correct
PROG level. Type VEL or JOG VEL.
Commanded feedrate override set to zero. Assign the appropriate feedrate override value.
Check the feedrate override by going into the correct Example: FOV 1 indicates a master feedrate of 1.
PROG level. Type FOV.
10BTroubleshooting 189
Parker Hannifin
Improper operation Feedback device counts are missing Check the feedback cable and connections.
Check the amplifier to send back correct signals.
(for PCI controller cards) Incorrect termination / Check that the correct type of resistor (termination or pull-up)
pull-up resistor. is installed for the type of encoder being used.
Servo motors make Incorrect tuning gain settings. Check tuning gain settings.
audible noise
Incorrect motor commutation. Verify drive settings, motor connections.
Incorrect commanded Incorrect move mode, absolute vs. incremental Make sure the move mode is correct ABS vs. INC.
distance or position
Incorrect PPU setting. Correct PPU setting for position or distance.
Incorrect commanded Check the commanded velocity by going into the Assign the appropriate velocity value. Example: VEL 10 or JOG
velocity correct PROG level. Type (for example) VEL or JOG VEL X 10.
VEL X.
Check the feedrate override by going into the correct Assign the appropriate feedrate override value. Example: FOV
PROG level. Type FOV. 1 indicates a master feedrate of 1.
Incorrect torque limit Verify Torque Limit setting by Status Panels Æ Assign the appropriate Torque Limit value. Example: TLM X1
Numeric Status Æ Axis Parameters Æ Limit indicates torque is limited to 10% of drive motor capacity.
Parameters Æ Plus/Minus Torque Limit.
“Not valid while in Tried to enable/disable axis while motion is Check if axis is making coordinated motion: Status Panels ÆBit
motion” message commanded. Status Æ Master Flags. (Each master is indicated by Bit “In
received Motion.”)
Axis has encountered Positive/Negative End-of- Clear the appropriate Positive/Negative End-of-Travel Limit
Travel (EOT) Limits. Encountered Bit. Clear any Master Kill All Motion Request Bit,
Check if EOT limits have been encountered: Status and any Axis Kill All Motion Request Bits.
Panels Æ Bit Status Æ Axis Flags Æ Quinary Axis
Flags. (Each axis is indicated by Bit
“Positive/Negative EOT Limit Encountered.”
I/Os not working Positive/Negative End-of-Travel (EOT) Limits not Check that the associated inputs toggled:
working. If using onboard I/O: Status Panels Æ Bit Status Æ
Check the wiring of the limits, referring to their Onboard I/O and User Flags (0-3).
respective hardware installation guides. If using Expansion I/O: Status Panels Æ Bit Status Æ
Check if the Positive/Negative EOT Limits are CANopen Flags (ACR9000).
enabled: Status Panels Æ Bit Status Æ Axis Flags Æ NOTE: A triggered output will create a contact closure, not a
Quinary Axis Flags. (Each axis is indicated by Bit
voltage source.
“Positive/Negative EOT Limit Enable.”)
I/O not working Incorrect I/Os wiring. Check wiring and external circuitry. Refer to ACR9000
properly Hardware Installation Guide.
Servo motor runs Analog output / encoder multiplier mismatch. If encoder feedback is correct for appropriate direction, change
away; Verify analog output by Status Panels Æ Numeric “DAC GAIN” to the opposite value.
Status Æ Object Parameters Æ DAC Parameters. If encoder feedback is not correct for appropriate direction,
Verify encoder input by Status PanelsÆ Numeric change “ENC MULT” to the opposite value.
Status Æ Object Parameters Æ Encoder Parameters.
Amplifier has an analog input offset. Correct the analog offset in the amplifier.
Electrical noise. Reduce electrical noise or move the product away from the
noise source.
Improper shielding. Use shielded, twisted pair wiring for encoder inputs,
DAC/stepper outputs, and ADC inputs.
Improper wiring. Check wiring for shorts, opens, and mis-wired connections.
10BTroubleshooting 191
Parker Hannifin
Error Handling
This section on error handling addresses error checking and
recovery, which is to be programmed into each application. Error
handling is then done automatically as the application runs, and is
helpful in diagnosing problems.
REM Generic Two-axis Error Checking and Recovery Routine for ACR9000
' ****************************DISCLAIMER***************************
' While precautions have been taken in the preparation of this note,
' Parker and the author assume no responsibility for errors or
' omissions. Neither is any liability assumed for damages resulting
' from the use of the information contained herein.
PROGRAM
PBOOT : REM program will execute when controller power is turned on
_LoopStart
REM --- Print out errors to a terminal if "PrintErrors" bit is set
IF (PrintErrors)
'OPEN "COM1:38400,n,8,1" AS # 1
'OPEN "STREAM1:" AS #1 : REM for USB
'OPEN "STREAM2:" AS #1 : REM for Enet, 1st connection
OPEN "STREAM3:" AS #1 : REM for Enet, 2nd connection
ELSE
CLOSE #1
ENDIF
SET 5647 : REM request reset of the MEI input latched status
REM flag (bit 5645)
INH -5647 : REM wait until request has finished
REM Clear axis KAMR flags
CLR XKillAllMotion
CLR YKillAllMotion
$V0 = "Motion Enable Input is good"
ENDIF
REM - Check CANopen (PIO) status (only needed if using CANopen I/O)
IF (P32779 > 0)
IF (P32779 = 2)
$V1 = "CANopen status is good"
CANopenErrorCode = 0
ELSE IF (P32779 = 1)
$V1 = "CANopen is ready to start (SET 11265)"
CANopenErrorCode = 0
ELSE IF (P32779 > 2 AND CANopenErrorCode = 0)
REM prevents recursive error display
CANopenErrorCode = P32779
SET ErrorOccurred
$V1 = "CANopen network problem occurred."
ENDIF
ENDIF
IF (HaltProgOnError)
HALT PROG0 : REM stop program 0 and kill interpolated motion
REM (MOV, CIRCW, CIRCCW, SINE)
ELSE
PAUSE PROG0 : REM issue RESUME PROG0 or CLR1048 to
REM resume main prog
ENDIF
IF (XNegHardEOT)
XErrorCode = 4
$V2 = "Negative Hardware End-of-travel hit, Axis 0"
CLR XNegHardEOT : REM EOT flag is not automatically
REM cleared, program must clear it
ENDIF
REM -- Use only for servo axes !!! Encoder Signal Lost or Fault
IF (NOT XDriveEnabled AND (XErrorCode = 0) AND (XEncoderFault OR
XEncoderLost))
XErrorCode = 6
$V2 = "Axis 0 disabled due to encoder fault"
ENC 0 RES : REM try to reset encoder
ENDIF
IF (XErrorCode = 0)
$V2 = "No errors on axis 0"
REM XErrorCode should be cleared/acknowledged by HMI/operator
REM interface
ENDIF
REM -- Use only for servo axes !!! Encoder Signal Lost or Fault
IF (NOT YDriveEnabled AND (YErrorCode = 0) AND (YEncoderFault OR
YEncoderLost))
YErrorCode = 6
$V3 = "Axis 1 disabled due to encoder fault"
ENC 1 RES : REM try to reset encoder
ENDIF
REM if none of the errors above, then possible Drive Fault Input
REM caused error.
IF (YErrorCode = 0)
$V3 = ""
REM Drive Fault
IF (YDriveFault)
$V3 = $V3 + "Latched Drive Fault, Axis 1."
ELSE
$V3 = "Other fault (user set KAMR bit, EPL Network Fault, etc.)"
ENDIF
YErrorCode = 7 : REM no separate code for drive fault vs.
ENDIF
IF (YErrorCode = 0)
$V3 = "No errors on Axis 1"
REM YErrorCode should be cleared/acknowledged by HMI/front end
REM application
ENDIF
IF (MEIErrorCode > 0)
PRINT #1, "MEI Error ";MEIErrorCode;" -> ";$V0
REM Motion Enable Input status
ENDIF
IF (CANopenErrorCode > 0)
PRINT #1, "CANopen Error ";CANopenErrorCode;" -> ";$V1
REM CANopen status
ENDIF
IF (XErrorCode > 0)
PRINT #1, "Axis 0 Error ";XErrorCode;" -> ";$V2 : REM Axis 0
REM status
ENDIF
IF (YErrorCode > 0)
PRINT #1, "Axis 1 Error ";YErrorCode;" -> ";$V3 : REM Axis 1
REM status
ENDIF
PRINT #1, "" : REM print a blank line between error messages
GOTO LoopStart
_CheckTime
REM This implements a "clock" for showing time since power up or
REM reboot, assuming P6916 is not set by user. P6916 resets to zero
REM at 2**31 (2^31). P6916 is a free-running clock in milliseconds
REM only full days are left. Only works up to <25 days.
REM remove excess hours and convert what's left to days
days = (hours - ExcHours)/24
ENDP
Appendix
The appendix contains supplemental materials not directly
related to any specific ACR series controller discussion.
IP Addresses
An IP address is an identifier for a device on a TCP/IP network.
Every device connected to the Internet must use a unique IP
Address.
The IP address is comprised of a 32-bit binary address that is
subdivided into four 8-bit segments known as octets. Because
people do not generally think in binary, the address is expressed
in dotted decimal format. Each binary octet is converted to a
decimal number ranging from 0 to 255, with each octet
separated by a decimal point. For example, an IP address in
dotted decimal format looks like the following:
192.168.10.120
12BAppendix 201
Parker Hannifin
• Class A range. The first 8 bits are for the network ID; The
remaining 24 bits are for the host ID.
• Class B range. The first 16 bits are for the network ID; The
remaining 16 bits are for the host ID.
• Class C range. The first 24 bits are for the network ID; The
remaining 8 bits are for the host ID.
The number of bits used for the network ID determine how many
hosts a given address can support. Class A networks provide a
small number of network IDs but a very large number of host IDs.
And class C networks provide a huge number of network IDs but
a small number of host IDs.
Before a computer or router can send data, it has to identify the
network ID through the address class. Each class is assigned a
range of numbers.
Address First octet in dotted Excluded from Internet,
Class decimal format Allowed for Intranet
begins with
A 0 to 127 10.0.0.0 to
10.255.255.255
127.0.0.0 to
127.255.255.255
Subnets
As networks increase in size, it becomes more complex to deliver
information. Subnets provide a logical way to break apart
network addresses into smaller, more manageable groups. There
are additional benefits including more efficient communications
between devices, and increases to the overall network capacity.
Subnet IDs
When sending data from one host to another, routers use the
network ID (see above) in the IP address to locate the network.
On finding the network, the network is searched for the specific
host. With a great deal of network traffic this proves
cumbersome. Under these circumstances, an IP address does not
provide enough information for routers and host devices to
efficiently locate a host device.
12BAppendix 203
Parker Hannifin
Subnet Masks
A subnet mask determines how many bits after the network ID
are used for the subnet ID. As the subnet ID increases, the
number of host IDs available for that network decrease. Similarly,
a smaller subnet ID allows you to increase the number of hosts on
the network. For simplicity, this discussion only looks at complete
octets in dotted decimal format, and does not explore
converting partial masks from binary to decimal.
12BAppendix 205
Parker Hannifin
Example 1
The following example configures an eight axis
ACR8000/ACR8010 board for eight axis of open-loop steppers
(two stepper output modules); also included on the board is an
analog input module (ADC input module):
CONFIG NONE STEPPER4 STEPPER4 NONE
ATTACH AXIS0 STEPPER0 STEPPER0
ATTACH AXIS1 STEPPER1 STEPPER1
ATTACH AXIS2 STEPPER2 STEPPER2
ATTACH AXIS3 STEPPER3 STEPPER3
ATTACH AXIS4 STEPPER4 STEPPER4
ATTACH AXIS5 STEPPER5 STEPPER5
ATTACH AXIS6 STEPPER6 STEPPER6
ATTACH AXIS7 STEPPER7 STEPPER7
ESAVE
Example 2
The following example configures an eight axis
ACR8000/ACR8010 board for four closed-loop servos and four
open-loop steppers (one DAC output module and one stepper
output module):
CONFIG ENC4 DAC4 STEPPER4 NONE
ATTACH AXIS0 ENC0 DAC0
ATTACH AXIS1 ENC1 DAC1
ATTACH AXIS2 ENC2 DAC2
ATTACH AXIS3 ENC3 DAC3
ATTACH AXIS4 STEPPER4 STEPPER4
ATTACH AXIS5 STEPPER5 STEPPER5
ATTACH AXIS6 STEPPER6 STEPPER6
ATTACH AXIS7 STEPPER7 STEPPER7
Example 3
The following example configures an eight axis ACR8010 board
for two closed-loop servos with two commutator and two
open-loop steppers (one DAC output module and one stepper
output module):
CONFIG ENC4 DAC4 STEPPER4 NONE
ATTACH AXIS0 ENC0 CMT0 ENC0
ATTACH AXIS1 ENC2 CMT1 ENC2
ATTACH AXIS4 STEPPER4 STEPPER4
ATTACH AXIS5 STEPPER5 STEPPER5
ATTACH AXIS6 STEPPER6 STEPPER6
Example 4
The following example configures a four axis ACR1500 with four
on-board stepper outputs or a four axis ACR2000 with one
stepper output module for four open-loop steppers. Also
included on the board is an analog input module (ADC input
module).
Example 5
The following example configures a two axis ACR1200 with two
on-board stepper outputs or a four axis ACR2000 with one
stepper output module for four open-loop steppers. Also
included on the board is an analog input module (ADC input
module).
Example 6
The following example configures a four axis ACR1500 with two
on-board DAC outputs for two closed loop servos. Also included
on the board is an analog input module (ADC input module).
12BAppendix 207
Parker Hannifin
Example 7
The following example configures a 2 axis ACR1200 with one on-
board DAC output and one on-board stepper output for one
closed loop servo and one open-loop stepper. Also included on
the board is an analog input module (ADC input module).
Index
AcroBASIC syntax...............................42, 44
commands ............................. 46 communication
syntax ................................... 42 troubleshooting .............. 186, 187
aliases communication levels .................. 24
bits .................................. 41, 60 plc program ............................ 25
constants ............................... 41 system ................................... 24
DEFINE .................................. 41 user program .......................... 25
parameters........................ 41, 60 CONFIG .. See hardware configuration
variables ................................ 41 configuration
attachments example ................................. 75
axis firmware revision..................... 79
attaching ....................... 31, 32 global varaibles ....................... 80
names ................................ 36 reserved resources .................. 79
masters ................................. 33 user groups ............................ 81
attaching ............................ 33 cycling power ............................. 73
slaves .................................... 34 dedicated I/O
attaching ............................ 35 drive
names ................................ 36 enable ................................ 27
software................................. 31 fault ................................... 27
axes reset .................................. 27
names ................................... 36 homing................................. 119
bits drive
aliases ................................... 60 input
clearing.................................. 60 enable ................................ 27
overview ................................ 58 fault ................................... 27
printing.................................. 60 reset .................................. 27
setting ................................... 59 Drive Talk
using ..................................... 59 auto-address......................... 176
branching bits ...................................... 175
repetition ............................... 56 configuration flags ................. 176
selection ................................ 53 drive status flags ................... 177
CANopen error flags ............................ 177
AcroBASIC.............................165 parameters ........................... 175
analog pass through mode ................ 179
inputs................................171 RS-232................................. 175
outputs..............................171 RS-485................................. 175
bit starting ................................ 178
rate ..................................162 stopping ............................... 178
resulution ..........................171 end-of-travel limits........... See limits
bus states .............................169 EPL network ............................. 126
health period .........................164 errors
heart beating protocol.............164 documenting ......................... 183
information parameters...........165 error handling ....................... 192
LED status.............................168 sample program .................... 192
mapping digital I/O ................161 factory default ............................ 74
network configuration .............162 feedback
node control ................................... 93
address .............................162 formulas .................................... 61
availability .........................161 hardware configuration
guarding protocol ...............164 CONFIG .................................. 26
ID 170 homing
speed ................................163 backup enable.........113, 115, 117
parameters bits ...................................... 113
extended I/O......................171 commands............................ 113
saving ...............................173 dedicated I/O ........................ 119
start network.........................164 direction ............................... 111
transmission cycle ..................163 example code................. 112, 127
change summary .......................... 5 final direction ................. 113, 117
commands jogging................................. 111
format ................................... 43 limit deceleration ................... 119
immediate mode ..................... 46 limit detection ....................... 119
209
Parker Hannifin