Power PMAC IDE
Power PMAC IDE
^3 Power PMAC
^4O016-E-01
April 20, 2017
Operating Conditions
All Delta Tau Data Systems, Inc. motion controller products, accessories, and amplifiers contain static
sensitive components that can be damaged by incorrect handling. When installing or handling Delta Tau
Data Systems, Inc. products, avoid contact with highly insulated materials. Only qualified personnel
should be allowed to handle this equipment.
In the case of industrial applications, we expect our products to be protected from hazardous or
conductive materials and/or environments that could cause harm to the controller by damaging
components or causing electrical shorts. When our products are used in an industrial environment, install
them into an industrial electrical cabinet or industrial PC to protect them from excessive or corrosive
moisture, abnormal ambient temperatures, and conductive materials. If Delta Tau Data Systems, Inc.
products are directly exposed to hazardous or conductive materials and/or environments, we cannot
guarantee their operation.
TOOLS ......................................................................................................................................... 21
System Setup ................................................................................................................................. 22
Clock Setup............................................................................................................................... 22
Hardware Diagnosis ................................................................................................................ 25
Motor Setup .............................................................................................................................. 30
EtherCAT Setup ............................................................................................................................ 54
EtherCAT Setup Using the Etherlab Stack: ............................................................................. 54
Interface Overview: Etherlab Stack ......................................................................................... 56
Interface Overview: Acontis Stack ........................................................................................... 61
Configuring an EtherCAT Slave Drive: Etherlab Stack .......................................................... 62
Configuring EtherCAT Input/Output Devices .......................................................................... 82
Configuring an EtherCAT Devices: Acontis Stack .................................................................. 85
Plot ................................................................................................................................................ 88
Step 1 – Possible Data Sources ................................................................................................ 90
Step 2 – Data to Sample ........................................................................................................... 92
Step 3 – Data Processing ......................................................................................................... 92
Step 4 – Plotting ....................................................................................................................... 95
Gathering and Plotting ............................................................................................................ 96
1
Saving and Loading Plot Configurations............................................................................... 101
Selected Presets ...................................................................................................................... 103
Scope ........................................................................................................................................... 105
Task Manager.............................................................................................................................. 111
Tuning ......................................................................................................................................... 124
Tuning Window Layout .......................................................................................................... 125
Position Loop Interactive Tuning........................................................................................... 128
Interactive Tuning Guidelines ................................................................................................ 146
Current Loop Tuning ............................................................................................................. 151
Open Loop Test ...................................................................................................................... 152
Position Loop Auto Tuning .................................................................................................... 156
Trajectory Prefilter Setup ...................................................................................................... 158
Adaptive Control Setup .......................................................................................................... 159
Interactive Filter Setup .......................................................................................................... 160
Gain-Scheduled Adaptive Control Setup ............................................................................... 162
Cam Learning Control Setup ................................................................................................. 163
Terminal Window ....................................................................................................................... 164
Position Window......................................................................................................................... 167
Watch Window ........................................................................................................................... 170
Status ........................................................................................................................................... 179
Errors Display ............................................................................................................................. 184
Unsolicited Messages.................................................................................................................. 186
Download Firmware ................................................................................................................... 188
Standard Firmware Download Procedure ............................................................................ 188
Firmware update procedure for Hypervisor based PowerPMAC ......................................... 191
Encoder Conversion Table.......................................................................................................... 192
Setup Variables ........................................................................................................................... 195
Compensation Table Setup ......................................................................................................... 196
Backup Restore ........................................................................................................................... 201
Backup page ........................................................................................................................... 201
Restore page ........................................................................................................................... 203
Verify page ............................................................................................................................. 205
Recovery Disk page ................................................................................................................ 206
Jog Ribbon .................................................................................................................................. 207
Commands .................................................................................................................................. 208
2
Adding Projects ...................................................................................................................... 210
Adjusting File Properties ....................................................................................................... 211
Building and Downloading the Project ................................................................................. 211
The C Language Folder ......................................................................................................... 213
The Documentation Folder .................................................................................................... 214
The Configuration Folder ...................................................................................................... 215
The Log Folder....................................................................................................................... 219
The PMAC Script Language Folder ...................................................................................... 220
Project Encryption ...................................................................................................................... 221
Downloading the C Source .................................................................................................... 223
3
INTRODUCTION
The Power PMAC Integrated Development Environment (IDE) software is based on the Visual Studio
2008 programming environment. It is used to develop, debug, and test Power PMAC programs developed
in Delta Tau’s proprietary Power PMAC Script language or in the C programming language. The
programs are organized as a project that includes folders like PMAC Script Language, C Language, etc.
The programming environment supports program debugging capabilities and allows the user to insert
breakpoints and step through the program. It supports setup tools to detect, configure, and diagnose
Power PMAC hardware through its System Setup utility. The Power PMAC IDE also supports setup of
EtherCAT and MACRO devices.
This manual attempts to thoroughly explain how to use the IDE and how to set up your system using the
System Setup software. If, however, you ever get stuck while reading this manual, please call Technical
Support at 818-717-5656, 8 am — 5 pm PST.
Introduction
1
DIFFERENCES BETWEEN V2.X AND V3.X
Overview: Changes from V2.x
Downloading the
IDE 2
On the option page select International Settings. On the right panel under Language combo box choose
the language. The languages will be automatically filled if the those languages are installed at the time of
PowerPMAC IDE installation.
a. support features like light bulb to suggest the fix or improved error and warning
notification,
TO
Downloading the
IDE 3
Also shows the code if you hoover the mouse on collasped section
c. support Go to def for subprograms and Go to Declaration for variables, add the typed
variable if it is not declared before and will add it to golbaldefinition.pmh file as a
potential light bulb fix.
d. similar addition for call subprog wil be added to first file in the libraries folder.
e. reads the value from PMAC and displays like
C language debugger
A full featured GNU debugger integrated with modern Visual studio debug interface that supports
majority of the debugger functionalities and interfaces. Starting, stopping, breaking, setting break points,
stepping, checking the execution stack, fully integrated watch table, local variables, Auto display, tooltip,
and many other modern debugging functionalities.
Sample Screen shot:
Downloading the
IDE 4
DOWNLOADING THE IDE
The IDE is available on Delta Tau’s website and on the Delta Tau Forums according to the following
links:
Install the IDE after downloading it by executing the setup.exe file contained within the IDE folder you
downloaded.
Downloading the
IDE 5
OBTAINING THE POWER PMAC MANUALS
You can find the Power PMAC User Manual and the Power PMAC Software Reference Manual on the
FileDepot section of Delta Tau’s forums, which can be found at http://forums.deltatau.com.
You can access FileDepot by clicking on the link in the upper right corner of the Delta Tau Forums web
page, as highlighted by a red box in the screenshot of the Forums web page shown below:
Simply register to create a free user account and then you can download any manuals that you want. On
the FileDepot page, you can find the User Manual and Software Reference Manual underneath the
“Manuals” tab as highlighted by the red box below:
Your PC can be connected to PMAC directly via a crossover cable or a straight cable, or through a
network switch. If you are using a network card dedicated for Power PMAC communication, and thus are
connecting directly from your PC’s network card to the Power PMAC, then you must set up a static IP for
that network adapter on the same subnet as Power PMAC’s IP address. In Windows 7, you can do this by
clicking StartControl Panel, and then clicking on Network and Sharing Center. Then, click on “Change
adapter settings,” which is usually in the leftmost pane of the window. Right-click the adapter which you
have connected to Power PMAC and then click “Properties.” Click Internet Protocol Version 4
(TCP/IPv4) and then click Properties:
Upon connecting, the IDE will try to communicate with Power PMAC. If this is the first time the PC is
communicating to Power PMAC, and if you are using a network switch or hub and your PC is not on the
same subnet as Power PMAC, then the routing question dialog box will appear asking for automatic
configuration of the PC network settings (see screenshot below). Press OK to continue.
Upon successfully connecting, the IDE will open in a default layout displaying the IP address.
Near the bottom of the screen in the left pane, click PowerPMACNetwork Settings and then the
following window should appear, whose functions are annotated below:
For the CPU type PowerPC,460EX, if the 2nd interface “eth1” has
been preconfigured, the above screen can be used to change its
settings.
For CPU type “x86,Hypervisor” MotionCore, the screen looks slightly different and the procedure is as
follows:
1. First, Network settings can only be changed locally on the host computer. Otherwise, the user will
get following message:
4. Delta Tau is in the process of making an additional network interface available so that users will
be able to connect to the x86,Hypervisor “MotionCore” externally. We will notify users when
that interface is available and will promptly write the procedure as well.
For CPU type “x86” Linux computers hosting the MotionCore, the
above options are disabled. All Test and Apply buttons are disabled as
well. The following message will be displayed in this case: “Network
settings change options are not available for CPU type: “x86” at this
Note time.”
If this button is not showing, right click on a blank, gray space in that toolbar area and make sure “Delta
Tau Controls” is checked, as shown below:
You can also reestablish communication through the Communication Setup area of the Options window
as described in the section of this manual immediately before this section.
Note that within the Documentation folder in each of these example projects there is a text file explaining
the purpose of the project and how to run it.
IDE Project
Examples
14
IDE LAYOUT
Default Layout
The IDE screen by default looks like this:
Watch variables’
values change
here in the Watch Monitor motor measurements in the Position, Velocity,
Window and Following Error windows here
You can move around windows by clicking and dragging. If you right-click the top of a window, you can
choose to float the window, dock it, tab it, hide it automatically, or hide it, as shown below:
This is common to all windows in the IDE. The Auto Hide function will only appear if this document is
tabbed.
IDE
Layout 15
Menus
The IDE has ten dropdown menus at the top of its main screen as shown below:
File: This section describes dialog boxes in Visual Studio that pertain to the File menu. The options are
described below:
IDE
Layout 16
Create a new project or file
Open a project or file
Add a new or existing project to the Solution
Close the file presently open in the Editor
Close the presently open Project Solution
Save the file presently open in the Editor
Save an instance of the current Editor file at a specified location in a specified file format
Select a language encoding scheme and specify characters to be inserted at the end of each line
Save all files presently open in the Editor
Not implemented
Not implemented
Set up page layout options
Print the contents of the active control
Open a recently opened Editor file
Open a recently used Project
Close the Power PMAC IDE
Edit — This section describes dialog boxes in Visual Studio that pertain to the Edit menu. These options
are applicable to the file opened in the Editor and the project system. The options are described below:
Add a file’s contents to the location in the current editing file at the cursor’s location
IDE
Layout 17
View — This section describe dialog boxes in Visual Studio that pertain to the View menu.
Not implemented
Not implemented
Open the currently opened Editor file in a different editor program
Open the Solution Explorer
Open the Bookmark tab page in the Output Window (cf. Default Layout)
Open the Build Error tab page in the Output Window (cf. Default Layout)
Open the Output Window
Open the Properties Window for the file currently selected in the Solution Explorer
Open the Task List tab page in the Output Window (cf. Default Layout)
Open the Find Result tab page in the Output Window
Open the IDE Command Window (not Terminal Window)
Display the current file from the Editor in Full Screen mode
Not implemented
Project — This section describe dialog boxes in Visual Studio that pertain to the Project menu:
Starts the PLC Debugger to debug the PLC open in the Editor
Project Properties
IDE
Layout 18
The Project Properties dialog (opened with the Project Properties button shown above) contains many
useful settings:
Specify the number of the first ptr variable (M-Variable) you define
Specify the number of the first global variable (P-Variable) you define
Specify the number of the first csglobal variable (Q-Variable) you define
IDE
Layout 19
Build — This section describe dialog boxes in Visual Studio that pertain to build menu:
Debug: This section describe dialog boxes in Visual Studio that pertain to debug menu.
IDE
Layout 20
TOOLS
From within the IDE, the tools are listed underneath the Tools menu and the Delta Tau menu.
The Tools menu shows System Setup, Plot, Scope, TaskManager, and Tune:
The Delta TauView menu shows Terminal, Position, Watch, Status, Errors Display, and Unsolicited
Messages:
Delta TauConfigure shows Download Firmware, Encoder Conversion Table, Setup Variables, and
Comp Tables:
Tools
21
System Setup
The System Setup tool can be used to detect, diagnose, troubleshoot, and configure hardware, such as
Axis Interface cards, I/O cards, motors, and encoders.
You can access the System Setup Tool by clicking ToolsSystem Setup:
Clock Setup
Clicking System Setup opens this screen:
On this first screen you can set up the global clock frequencies for your system. Type in the frequency
you want (in kHz) and click “Accept” on the right side.
Hardware Diagnosis lists the accessories in your system which you can click to configure
Cancel or
Accept
“Motors” lists all of the motors you changes here
have activated and the setup steps
associated therewith. Click “Add
Motor” to add another motor.
Tools
22
If the System Setup software detects the EtherCAT option but does
not detect a Master Gate, it will automatically force Power PMAC to
use its internal clock by setting Sys.CPUTimerIntr = 1. For
EtherCAT, the servo period must be multiple of 62.5 usec. Upon
accepting the clock settings, issue save and $$$ in the Terminal
Note Window for changes to take effect. Then, check the value of
Sys.ServoTime in the Watch Window to ensure that it is counting up
continuously before proceeding in the System Setup process.
You can also change the PWM frequency for each channel on your axis interface cards, if you have any.
To change this, right-click on the channel whose PWM frequency you want to change and then select one
of the possible options displayed, as shown below:
The four tabs at the bottom of the screen also display useful information. The tabs are displayed below.
The Output tab shows every command that is being sent to Power PMAC:
The PMAC Error tab shows internal IDE errors that the System Setup generates, and also displays any
parameter changes that are being made to the System Setup window itself:
The Setup Messages Tab displays what setup-related parameters have been changed within the System
Setup window:
Tools
23
The Debug Messages Window shows any error messages from the System Setup window which can be
used for debugging purposes:
You can change the background and text color and the font by right-clicking the window and selecting
PropertiesAmbient:
You can open up the Device dialog to be used for starting communication of this window with PMAC, or
for changing communication parameters, by right-clicking the System Setup window and going to
PropertiesDevice.
Tools
24
Hardware Diagnosis
Pressing the Next button ( ) advances you to the Hardware Diagnosis part of the System Setup. Here,
System Setup shows you various parameters associated with the accessories in your system in a graphical
manner in order that you may adjust these parameters for setup or diagnosis purposes.
Name and
model
information
for your
board is The type of chip and number of
shown here channels are described here
This field describes the
Click this channel’s hardware
dropdown
menu to select
different
channels
This screen represents the typical Hardware Diagnosis for an axis interface card. The screen will appear
similarly for ACC-24E2x.
The three kinds of output signals these axis interface accessory cards (ACC-24E2, ACC-24E2A, ACC-
24E2S, and ACC-24E3) can have are DAC, PFM, and Direct PWM. Selecting this output signal type in
the “Output” area of the screen will show characteristic related to that output signal type.
Tools
25
For PFM output:
This slider shows the This button disables the motor
PFM output from 0% to and manually enables output
100% pulse rate from the channel for diagnostic
purposes
Tools
26
The Position, Compare, Flags, and ADC Data tabs all show information related to these categories. Each
tab is annotated below:
The Position tab displays position feedback information and also status bits related to the encoder
attached to this channel:
ACC24E3[i].Chan[j].ServoCapt
ACC24E3[i].Chan[j].LossStatus
ACC24E3[i].Chan[j].HomeCapt
ACC24E3[i].Chan[j].CountError
ACC24E3[i].Chan[j].SerialEncDataA
ACC24E3[i].Chan[j].SerialEncDataB ACC24E3[i].Chan[j].LossCapt
ACC24E3[i].Chan[j].Atan
The Compare tab shows the current position of this encoder, and also the values stored in:
ACC24E3[i].Chan[j].CompA
ACC24E3[i].Chan[j].CompB
ACC24E3[i].Chan[j].CompAdd
Tools
27
The Flags tab:
The ADC Data tab shows the sinusoidal encoder ADCs’ and amplifier ADCs’ results:
Tools
28
Digital I/O Cards
The Hardware Diagnosis page for digital I/O cards is much simpler than for axis interface cards. This
screen just shows the data registers in the card, lighting each bit in each bank with a green light if the bit
is high, or with a red light if the bit is low:
This box
displays what
kind of
input/output
configuration This area displays information
this card has. about the name and model of This area displays information
Some cards’ this accessory about the kind of IC that this
configurations card uses
can be changes
while others are
fixed at a
certain number
of inputs and
outputs. For You can double-click one of
cards that can these rectangles to toggle its
be state if it is configured as an
reconfigured, output
“the ctrlReg”
field under this
card’s structure
configures this.
Tools
29
Motor Setup
After concluding the setup and/or diagnosis of your system hardware, you can proceed to the Motor Setup
either by clicking the Next button ( ) until you reach the motor setup screen, or you can click on the
motor you want to set up in the left pane of the System Setup Window:
At the top of the screen, the amplifier, motor, and feedback information for your system is displayed:
This area describes the name of the This area describes the manufacturer
amplifier you have selected, its part name of the motor you are using, its
number, its control mode, and its part number, and its type This area describes the type of
signal type feedback being used for this motor
Tools
30
Amplifier Information
This screen of the motor setup permits you either to select your amplifier from a list of Delta Tau
amplifiers or to enter your own amplifier information if the amplifier you have is not listed (e.g. if you are
using a 3rd-party amplifier): Click this button to
Select your amplifier’s Manufacturer delete this amplifier
here or add a new amplifier entry from your database of
amplifiers
Select the Part Number of your
amplifier here or enter it in the field
below if adding a new entry
Make sure you verify that the contents of each of these fields
specifying your amplifier’s parameters are correct before moving on,
as they will be used in subsequent setup calculations.
Note
If you need to add a new amplifier entry into the database, click on the dropdown menu next to
“Manufacturer” and then click “Add New…” as shown below:
After you are done entering the Part Number and all of the other amplifier parameters, click to store
your entry.
Once you have finished entering all of your amplifier parameters, click to save your changes, and
then click the Next ( ) button to proceed to the next step in the Motor Setup process.
Tools
31
Amplifier Parameters
The amplifier parameters which you need to enter are described in greater detail below:
Amplifier Manufacturer
Name: The name of the company which makes you amplifier.
Part Number: A unique part number to identify this amplifier’s model.
Power Ratings
Maximum Input Voltage
o Voltage (Volts): Specify the maximum bus voltage which you can apply to your
amplifier.
o Type: Specify VAC if the number you typed in the Voltage field right above this one is
AC voltage, or specify VDC if that number is DC voltage.
Continuous Current
o Continuous Current (Amps): Specify the continuous current rating for your amplifier.
o Unit: Specify whether this is Amps RMS (type Amp_RMS) or Peak Amps (type
AMP_Peak).
Instantaneous Current
o Instantaneous Current (Amps): Specify the instantaneous current rating for your
amplifier.
o Unit: Specify whether this is Amps RMS (type Amp_RMS) or Peak Amps (type
AMP_Peak).
Time Allowed (Seconds): Specify the maximum amount of time your amplifier can tolerate its
instantaneous current specification. Usually this is around 2.0 seconds, but it can vary between
amplifiers.
Tools
32
Input Voltage (VDC): Specify the actual amount of voltage [VDC] you are applying to your
amplifier.
Amplifier Fault Polarity: If your amplifier expects a low-true logic signal for an amplifier fault,
set this to LowTrue. If your amplifier expects a high-true logic signal for an amplifier fault, set
this to HighTrue.
Tools
33
Motor Information
The Motor Information step of the Motor Setup process is annotated below:
Click this button to
Select your motor’s manufacturer Select your motor’s part number here or enter delete this motor from
here, or add a new motor entry it in the field below if adding a new entry your database of
amplifiers
Make sure you verify that the contents of each of these fields
specifying your motor’s parameters are correct before moving on, as
they will be used in subsequent setup calculations.
Note
Motor Parameters
The motor parameters which you need to enter are described in greater detail below:
Motor Manufacturer
Name: The name of your motor’s manufacturer.
Part Number: Your manufacturer’s part number for this motor.
Motor Specifications
Motor Type: The type of motor, whether Brush or Brushless.
Nominal RPM: The rated continuous RPMs for this motor.
Maximum RPM: The maximum possible RPM rating.
Linear Motor: Set this to True if using a linear motor, else False.
Tools
34
Motor Built-In Feedback
Absolute: Set to True if this motor has an absolute feedback sensor, else False.
Feedback Type: Specify what kind of feedback this motor has, or None otherwise.
Resolution: Specify the resolution of the encoder in counts per revolution. For serial protocols,
use units of Least Significant Bits (LSB). For linear motors, use the number of encoder counts per
electrical cycle of the motor.
Hall Sensor Available: Set to True if this motor has a Hall Sensor it can use for feedback.
Instantaneous Current
o Instantaneous Current (Amps): The amount of current [Amps] which the motor can
sustain for only a finite period before being damaged. This time is specified in “Time
Allowed” below.
o Current Unit: Select Amp_Peak if the instantaneous current limit is in units of Amps
Peak; select Amp_RMS otherwise.
Time Allowed (Seconds): The maximum amount of time during which the motor can sustain the
amount of current specified by the Instantaneous Current limit.
Rating
Maximum Voltage (VDC): The maximum amount of DC voltage which can be supplied to the
motor before damaging the motor.
Tools
35
Feedback Type
The Feedback Type setup is annotated below:
Feedback Parameters
The feedback parameters you need to enter are described in greater detail below:
Amplifier Control/Signal
Control Type: Select the type of control signal (Position, Velocity, Torque, Sinusoidal, Direct
PWM, or Direct Micro stepping) that the amplifier connected to this Axis Interface’s channel
supports.
Signal Type: Select signal type (Analog, Direct PWM, or Step & Direction).
Feedback Type
Primary Feedback: Specify what kind of feedback that this motor uses for positioning.
Commutation Feedback: Specify what kind of feedback that this motor uses for commutation
(applies only to commutated motors).
Dual Feedback: Set to True if this motor uses two separate forms of feedback simultaneously
(e.g. one encoder for position feedback and another encoder for velocity feedback). Otherwise,
set this to False.
Tools
36
available are: Four Guess Method, Stepper Method, and Absolute Sensor. In the four-guess
method, Motor[x].PhaseFindingDac specifies the magnitude of the torque command input to the
commutation algorithm that is used for each of the four guesses of the commutation phase angle,
and held for the period specified by Motor[x].PhaseFindingTime. In the stepper-motor method,
Motor[x].PhaseFindingDac specifies the magnitude of the phase current that is forced into
phases, ramped up over the period specified by Motor[x].PhaseFindingTime to lock the motor
like a stepper motor at a known commutation phase angle. If you select Absolute Sensor mode,
there will be no physical outputs to phase the motor, but rather PMAC will simply read the
absolute sensor’s position to determine the phase reference.
Hardware Interface
Proceeding to the Hardware Interface step of the System Setup will show this screen:
This part of the System Setup configures command control signals being produced from Axis Interfaces
in your system and amplifier-related flags which these Axis Interfaces read from or send to the amplifier.
For UMAC, these Axis Interfaces will usually be ACC-24E2, ACC-24E2A, ACC-24E2S, or ACC-24E3.
Each field is described in detail below:
Amplifier Control/Signal
Control Type: Displays the type of control signal (Position, Velocity, Torque, Sinusoidal, Direct
PWM, or Direct Micro stepping) that the amplifier connected to this Axis Interface’s channel
supports.
Signal Type: Displays selected signal type (Analog, Direct PWM, or Step & Direction).
In this page these two parameters are read only and to make a change
go back to Command and Feedback type page.
Note
Amplifier Interface
Amplifier Advanced Interface Mode: Setting this to True permits you to obtain the AmpEna and
AmpFault bits from different locations than the address of the channel which produces the
Tools
37
command signal. Setting this to False assumes that AmpEna and AmpFault come from the
channel which produces the command signal (Command Signal Channel; see next field).
Command Signal Channel: Specify the structure of the channel which sends the command control
signal to your amplifier.
Amplifier Fault Level: Select Low True if your amplifier expects a Low-True signal to indicate
an amplifier fault. Select High True if your amplifier expects a High-True signal to indicate an
amplifier fault.
Amplifier Enable Signal Output Channel: Specify the structure of the channel which produces
this motor’s amplifier enable signal.
Amplifier Fault Signal Input Channel: Specify the structure of the channel which produces this
motor’s amplifier fault signal.
Feedback Interface
Dual Feedback Interface Mode: If your motor has separate encoders for position and velocity
feedback, select True.
Primary Feedback Channel: Select the structure of the primary feedback channel (typically, the
position feedback channel).
Secondary Feedback Channel: Select the structure of the secondary feedback channel (typically,
the velocity feedback channel).
Tools
38
Flag Interface
Hardware Overtravel Limits Input Channel: Select the Axis Interface channel which reads the
hardware overtravel limits.
Interactive Feedback
The Interactive Feedback screen displays real-time plots of the feedback devices associated with your
motor on the right side, and fields containing feedback-related data. The purpose of this screen is to help
you determine whether your encoder feedback is working properly. You can try physically moving your
encoder by hand and observing whether you see the feedback changing on the screen.
Press this to
pause/unpause
the plotting
Press this to
clear the plot
The left axis of the plot shows the units of the encoder output’s waveform, while the bottom axis shows
time passing in units of seconds. “ServoCapt,” the red curve, is EncTable[x].PrevEnc, that is, the ECT
output before being scaled by EncTable[x].ScaleFactor. “Motor Input,” the blue curve, is Motor[x].Pos,
that is, that scaled output of the ECT entry.
Tools
39
If you observe that the “Motor Input” curve is not changing as you
spin the encoder, make sure you clicked “Accept” on the previous
screen (the Hardware Interface screen).
Note
Position Captured on Servo Clock: This is the encoder’s position captured at PMAC’s servo
frequency.
Encoder Loss Detection Status Bit: This field shows the status (0 or 1) of the encoder loss
detection status bit, Motor[x].EncLoss.
Encoder Conversion Table Result: Shows the result of the Encoder Conversion Table (ECT)
entry associated with this encoder.
Motor Actual Position: Plots the position of the motor after being read by the encoder and
processed by the ECT entry. This is the Motor[x].ActPos structure.
Motor Actual Velocity: Plots the velocity of the motor after the motor’s position is read by the
encoder and then numerically differentiated. This is the Motor[x].ActVel structure.
Encoder Direction: Specify whether the positive direction of the motor is Counter Clockwise or
Clockwise (for Rotary Encoders only).
ECT Scale Factor: The ECT will read the encoder’s address, perform the shifting specified in
EncTable[x].index1 and EncTable[x].index2, and then multiply this value by the ECT Scale
Factor, EncTable[x].ScaleFactor, before producing the final output of the ECT entry.
Motor Position Input Scale Factor: This field sets or shows Motor[x].PosSf, which specifies the
scale factor by which the actual position value read at the register specified by Motor[x].pEnc is
multiplied before being used in actual-position calculations in the outer (usually position) loop of
the motor.
Motor Velocity Input Scale Factor: This field sets or shows Motor[x].Pos2Sf, which specifies the
scale factor by which the actual position value read at the register specified by Motor[x].pEnc2
is multiplied before being used in actual-position calculations in the inner (usually velocity) loop
of the motor.
Tools
40
The screen appears as follows for a a serial encoder (in this example, from a Panasonic MSMD082S1S’s
encoder):
Various read-only
registers and
parameters The interactive
pertaining to your feedback can be seen
encoder are shown here
here in the center
Various
configurable Select whether to show
parameters for your the single-turn register,
encoder are shown multi-turn register, or
in this area the Motor-Encoder
register on the plot
Tools
41
Safety
The Safety portion of the setup contains two screens: one screen for configuring I2T Protection, which is a
feature in PMAC which limits current and voltage outputs in order to prevent damaging motors and
amplifiers, and one screen (Servo Safety) for configuring following error limits and software position
limits in order to prevent damage to your machine. The first screen, for I2T Protection, appears as follows:
Check this box to disable I2T Protection (to This graph shows the maximum time
disable this is not recommended!) allowed at various currents
Enter your
continuous
current
limit here
Enter the
maximum
amount of
time allowed
at the
instantaneous
current limit
here
When entering the Continuous Current, Instantaneous Current, and Max Time Allowed limits on this
screen, use RMS values, and make sure to use the smallest of these values between your motor and your
amplifier/drive. For example, if your motor can handle 4 Amps continuous, but your amplifier can only
do 3 Amps continuous, use the smaller of the two values, which is 3 Amps from the amplifier, on this
screen.
In the bottom left corner of the screen, under “Calculated Values,” there are three fields:
Continuous Servo Output: This is the calculated continuous output limit from the servo loop in
units of a 16-bit DAC, calculated based on the limits you enter for Continuous Current,
Instantaneous Current, and Maximum Time Allowed, under the “Data Input” area of this screen.
If you click “Accept,” this value will be written to Motor[x].I2TSet.
Integrated Servo Output Limit: This is the maximum output from the servo loop’s integrator
based on the current limits you entered. If you click “Accept,” this value will be written to
Motor[x].I2TTrip.
Maximum Servo Output Limit: This is the maximum value which the servo loop can output. If
you click “Accept,” this value will be written to Motor[x].MaxDac.
In the bottom right corner of the screen, under “Present Values,” there are three fields:
Continuous Servo Output: The continuous servo output limit which you presently have in Power
PMAC (before clicking “Accept” to accept your new values).
Integrated Servo Output Limit: The maximum output limit of the servo loop’s integrator which
you presently have in Power PMAC (before clicking “Accept” to accept your new values).
Maximum Servo Output Limit: The maximum output limit of the servo loop which you presently
have in Power PMAC (before clicking “Accept” to accept your new values).
Tools
42
The second screen, for Servo Safety, appears as follows:
Accept
changes here
There are four fields in this window which are described below:
Fatal Following Error: This field sets the motor’s fatal following error limit, Motor[x].FeFatal.
Warning Following Error: This field sets the motor’s warning following error limit,
Motor[x].FeWarning.
Software Positive Position Limit: This field sets the motor’s software positive position limit,
Motor[x].MaxPos.
Software Negative Position Limit: This field sets the motor’s software negative position limit,
Motor[x].MinPos.
The units of these limits as displayed in the fields are all “motor units” (m.u.) relative to the motor zero
position as defined by the most recent of: power-up/reset, homing or absolute position read, or
commanded pset, pload, or pclr offset.
Motor[x].MaxPos must be greater than Motor[x].MinPos (in an absolute sense) in order for either limit
to be active, so setting these two limits equal is a good way to disable them.
You can also disable any of these quantities by clicking the “Disable” checkbox next to the limit you want
to disable.
Tools
43
Test and Commission the Motor
This window performs a series of tests to ensure that the motor is working properly. The tests which it
runs depends on which kind of motor you are using. You can either select “Auto” to allow the window to
test and configure your motor for you, or you can select “Manual” to manually specify parameters for
each test and execute them sequentially (one at a time). In the manual screen, each step in the testing
process is listed with a Step Number, Description, Progress, and Result; for example:
“Progress” shows how far along the test has progressed. “Result” will state whether the test passed
(“Pass”) or failed (“Fail”). The tests listed here depend on whether you are using a Brush motor or a
Brushless motor.
Brush Motors
If you are using a brush motor, this window will run three tests:
“MotorNumber” selects for which motor you will execute the test.
“Magnitude (%)” selects what percentage of the total output magnitude permitted by
Motor[x].MaxDac to output to the motor for the test.
“Duration (msec)” specifies how long to output voltage to the motor during the test.
“Iterations” specifies how many times to output voltage to the motor. Each iteration consists of
applying the magnitude of output specified in “Magnitude (%)” in the positive direction, and then
once again in the negative direction.
Tools
44
A correct Open Loop Test should appear as follows, where a positive output command produces positive
encoder motion, and a negative command produces negative encoder motion:
If your motor’s motion is the inverse of this (i.e. a positive command produces negative motion and a
negative command produces positive motion), try changing the direction of your encoder decode
structure. This structure is Gate1[i].Chan[j].EncCtrl for Gate1-Style Axis Interfaces and
Gate3[i].Chan[j].EncCtrl for Gate3-Style Axis Interfaces. For Quadrature Encoders, to change the
direction of the encoder decode using these structures, change the structure’s value to 7 if it was 3, or to 3
if it was 7. You can also try swapping two leads of the motor.
There are two parameters you can adjust when executing this test manually:
Tools
45
Tune Servo Loop
This test will perform an open loop command to the motor, observe how it moves, and then calculate
gains for the servo loop automatically. The gains which the test adjusts are as follows:
Usually, this automatic calculation is enough to get a motor moving, but is not recommended as a “final”
tuning; you should perform interactive fine tuning in order to achieve your desired performance goals. For
more details on performing interactive fine tuning, please refer to the section labeled “Tuning the Servo
Loop in the IDE” in the Power PMAC User’s Manual.
There are five parameters you can adjust when executing this test manually:
Tools
46
Brushless Motors
If you are using a brushless motor, this window will run eight tests:
The only parameter to specify when executing this test manually is the motor number (MotorNumber):
The only parameter to specify when executing this test manually is the motor number (MotorNumber
below):
Tools
47
Voltage Six Step Text
This test forces voltage through the motor’s phases in order to commutate it one revolution. The test
measures how many counts per electrical cycle in order to set Motor[x].PwmSf, Motor[x].PhaseOffset,
and Motor[x].PhasePosSf.
During the test, you should see a plot showing the ADC results for the current values on phases A (red)
and B (blue) on the vertical axis, moving with Time (horizontal axis):
“MotorNumber” is the number of the motor on which you want to perform this test.
“Magnitude” is the amount of voltage you want to apply to the motor in units of 16-bit DAC
bits.
“Commutation Size” is an input from the user; it specifies how many counts per commutation
cycle. It is in units of the LSB of the register to which this motor’s Motor[x].pPhaseEnc
structure points.
Tools
48
Tune Current Loop
This test will command current to your motor’s phases and then calculate gains for the motor’s current
loop. The current loops gains are stored in the following structures: Motor[x].IiGain, Motor[x].IpfGain,
and Motor[x].IpbGain.
The parameters you can vary when executing the test manually are shown below:
“MotorNumber” is the number of the motor on which you want to execute this test.
“Magnitude” is the amount of current to put through the motor’s phases in units of 16-bit DAC
bits.
“Duration” is how long to apply current to the phases [msec].
“Desired Bandwidth” is where you specify how much bandwidth you want the current loop to
have [Hz].
After the test tunes your current loop, it will plot the current loop’s response, which should look more or
less like this, where the actual current (red) rises to the desired current (blue):
Desired current is on the left axis in units of 16-bit DAC bits and time is on the horizontal axis in units of
milliseconds.
Often, the automatic tuning is adequate, but if you would like to interactively fine-tune your current loop,
please refer to the the section labeled “Tuning the Servo Loop in the IDE” in the Power PMAC User’s
Manual for details regarding how to do that.
Tools
49
Current Six Step Test
This test forces current through the motor’s phases in order to commutate it one revolution. The test
measures how many counts per electrical cycle your motor has in order to set Motor[x].PhasePosSf.
There are three parameters you can set when manually executing the test:
“MotorNumber” is the number of the motor on which you want to perform this test.”
“Magnitude” is the amount of current you want to apply to the motor in units of 16-bit DAC
bits.
“Commutation Size” is an input from the user; it specifies how many counts per commutation
cycle. It is in units of the LSB of the register to which this motor’s Motor[x].pPhaseEnc
structure points.
Tools
50
Open Loop Test
This test issues an open loop command to your motor, outputting voltage to it without closing the servo
loop. The purpose of this test is to ensure that a positive output command produces positive motion on the
motor, and that a negative output command produces negative motion. There are four parameters you can
adjust in the Open Loop Test when using “Manual” mode:
“MotorNumber” selects for which motor you will execute the test.
“Magnitude (%)” selects what percentage of the total output magnitude permitted by
Motor[x].MaxDac to output to the motor for the test.
“Duration (msec)” specifies how long to output voltage to the motor during the test.
“Iterations” specifies how many times to output voltage to the motor. Each iteration consists of
applying the magnitude of output specified in “Magnitude (%)” in the positive direction, and then
once again in the negative direction.
A correct Open Loop Test should appear as follows, where a positive output command produces positive
encoder motion, and a negative command produces negative encoder motion:
If your motor’s motion is the inverse of this (i.e. a positive command produces negative motion and a
negative command produces positive motion), try changing the direction of your encoder decode
structure and rephasing the motor (for commutated motors). This structure is Gate1[i].Chan[j].EncCtrl
for Gate1-Style Axis Interfaces and Gate3[i].Chan[j].EncCtrl for Gate3-Style Axis Interfaces. For
Quadrature Encoders, to change the direction of the encoder decode using these structures, change the
structure’s value to 7 if it was 3, or to 3 if it was 7. You can also try swapping two leads of the motor and
rephasing.
If the Open Loop Test’s response is not inverted from the picture above, but rather is erratic, try rephasing
the motor or retuning your current loop (see the Tuning section of this manual for more details on tuning).
Tools
51
Phase Reference Search
This test establishes a phase reference for your motor, i.e. it tries to align the rotor with a phase in order to
maximize the motor’s torque output. There are four parameters you can vary for this test:
“MotorNumber” is the number of the motor on which you want to execute this test.
“Phasing Method” determines which automatic phasing routine to use:
o Set to 1 to use Stepper Method
o Set to 2 to use the Two-Guess Method
“Magnitude” is the amount of current to apply to the motor when phasing [16-bit DAC bits].
“Phase Search Time” is how long to apply current to the motor before setting the phase position
to 0
Usually, this automatic calculation is enough to get a motor moving, but is not recommended as a “final”
tuning; you should perform interactive fine tuning in order to achieve your desired performance goals. For
more details on performing interactive fine tuning, please refer to the section labeled “Tuning the Servo
Loop in the IDE” in the Power PMAC User’s Manual. There are several parameters you can adjust for
this test:
Tools
52
“MotorNumber” is the number of the motor on which you want to perform this test.
“Magnitude” is the voltage magnitude as a percentage of the maximum output limit set by
Motor[x].MaxDac.
“Duration” specifies how long to output voltage to the motor [msec].
“Minimum Move Size” specifies the minimum required distance [motor counts] the motor must
travel before the test will register the move as successful and proceed to calculate the servo loop
gains.
“Velocity Mode”: Set this to 1 if the amplifier expects a velocity signal; set this to 0 otherwise
(e.g. for torque mode).
Once the test is complete, it will plot the motor’s step response, which should look something like this:
The motor’s actual position (blue) should rise to meet the desired position (orange). On this plot, the left
axis is Actual Position in motor units, the horizontal axis is Time [sec], and the right axis is the Servo
Command in units of a 16-bit DAC, which is the output from the servo loop.
Once you are done, make sure you click “Accept” (see the red box in the image below) to save all of your
changes:
Tools
53
EtherCAT Setup
Power PMAC supports EtherCAT when Power PMAC is ordered with the EtherCAT option, which
consists of a PCI Express accessory board plugged directly into the Power PMAC CPU.
Powe PMAC Firmware greater than version 2.1.x.x will support two types of EtherCAT Master stack;
Etherlab (current stack) and Acontis. Downloading the appropriate FW will decide the supported stack.
The default is Acontis stack firmware. A system structure variable Sys.EcatType will state the stack
type. If it is 1 (default), then its Acontis;if it is 0, then it is the Etherlab stack.
If for some reason user wants to switch the stack, it is possible by reloading the firmware:
powerpmac_arm.deb is for the Etherlab stack.
Powerpmac_armposix.deb is for the Acontis Stack (this is the default FW on IPC
and uEtherlite)
The motor setup procedure is the same for both stacks. The difference is in setting up the EtherCAT
devices. The Etherlab stack will use the current setup steps to set up EtherCAT. For Acontis, a third-party
tool is needed to set up the EtherCAT devices. The tool will eventually be part of the Power PMAC IDE.
The EtherCAT setup program automatically reads the available list of PDOs (Process Data Objects) from
the device after successfully connecting. If the PDOs are not available from the device directly, the user
must manually provide the device’s XML file from the device’s vendor.
Setup expects the user to complete all the necessary hardware connections, and if it is a drive, then the
separate configuration of the drive, typically by means of the drive’s manufacturer’s software. The Power
PMAC tuning utility can be used only if the EtherCAT drive is used in torque mode.
The System Setup tool automatically creates the Master nodes (control nodes associated with EtherCAT
Masters) in the tree by detecting the presence of EtherCAT masters. If you do not see the Master[n]
(where n is the Master’s number) node in the tree view, then you do not have the EtherCAT option. If you
do have the EtherCAT option installed, EtherCAT devices connected to the Master are detected
Tools
54
automatically on startup and displayed under the Master[n] node in the System Setup tree. Power PMAC
supports a maximum of 4 Masters.
The detected EtherCAT devices are categorized as an “Amplifier,” “IO Device,” “Communication
Device,” or “Unknown Device.” The setup software reads the device type object address 0x1000 from the
device to determine its category. The device’s manufacturer must write to this address in order to indicate
what type of device it is; this is a mandatory parameter. Most devices are “IO Devices.” Typical examples
of Communication Devices are Profibus Master or Slave. If the device is an Amplifier (a.k.a a Drive),
then to set up the amplifier, it must be listed under the Amplifier node. This rule is the same for the other
kinds of EtherCAT devices.
Tools
55
Interface Overview: Etherlab Stack
Master Node
Upon selecting a Master Node, the setup software will display a summary of the devices connected (refer
to the image below on the left side of the screen). It shows the License Status, Slave Status, and
Master[n] (n = Master Number) data transactions.
Data
transactions
between
master and
slave
Tools
56
Context Menu
Right-click on the Master node in the left pane of the System Setup window to open the context menu as
shown in the image below:
Reset All Motors: This option is used to reset the all of the detected EtherCAT Masters. This command
affects all Masters present.
Scan Devices: This command will scan for new devices connected to Master[n]. This command will not
configure the Slave.
Configure Master[n]: This command will detect and configure the Slave connected to Master[n]. For
the EtherCAT setup to work, this command must be used in the beginning of the setup process. The setup
tool will generate an error if you did not first configure the Master node before trying to configure the
PDOs (Process Data Objects). The error is displayed in the Setup Messages.
Tools
57
Export EtherCAT Variables: This command will generate .pmh and .h files that can be kept in the
Power PMAC project. A file dialog box will be opened and you will be asked to enter the file name. This
name will be used to generate a file containing PDO mappings. A typical file looks like this:
----------------------------.h file------------------
//------------------------------------------------------------------------------
// <auto-generated>
//This code was generated by a Deltatau Data Systems Inc.
//Day : Friday, September 14, 2012, Time : 12:00:00 AM
//
//Changes to this file may cause incorrect behavior.
//</auto-generated>
//------------------------------------------------------------------------------
#define Controlword pshm->ECAT[0].IO[0]
#define AOOutputsChannel1Analogoutput pshm->ECAT[0].LPIO[0]
----------------------------.h file end------------------
----------------------------.pmh file-------------------
//------------------------------------------------------------------------------
// <auto-generated>
//This code was generated by a Deltatau Data Systems Inc.
//Day : Friday, September 14, 2012, Time : 12:00:00 AM
//
//Changes to this file may cause incorrect behavior.
//</auto-generated>
//------------------------------------------------------------------------------
#define Controlword ECAT[0].IO[0]
#define AOOutputsChannel1Analogoutput ECAT[0].LPIO[0]
----------------------------.pmh file end-------------------
IDE version 1.6.x and above will create an additional file (ecatactivate0.cfg for Master[0] or
ecatactivate1.cfg for Master[1]) that includes the EtherCAT startup variables created from the “Step 2:
Configure the EtherCAT Device” Startup menu.
IDE version 1.6.x and newer automatically adds these files to the current project if the project is open in
the IDE:
The .pmh file is added to the “\PMAC Script Language\Global Includes” folder.
The .h file will be added to “\C Language\Include” folder.
The EtherCAT startup variable file ecatactivate0.cfg/ecatactivate1.cfg will be added to
“Configuration” folder.
Append Device: This menu will allow you to add the device to the appropriate category (e.g. IO Device,
Amplifier, or Communication Device). This option is very useful when configuring EtherCAT in Offline
Mode.
Export EtherCAT Setup from Power PMAC: This menu option exports the current EtherCAT setup in
.xml file format. This option is very useful when used with EtherCAT Offline Mode. You can set up the
EtherCAT devices in Offline Mode and then export the setup. You can then use this .xml file on other
Power PMACs to which the real EtherCAT devices are connected (or on this same Power PMAC when
you later connect it to the EtherCAT devices) and use the Import EtherCAT Setup to PMAC option to
load all the settings.
Import EtherCAT Setup to PMAC: This menu option imports the .xml file generated by the Export
EtherCAT Setup from Power PMAC option and loads it to the Power PMAC. As explained in the
previous menu option, this is useful for loading the EtherCAT device setup which was configured in
Offline Mode.
Tools
58
Load New Device File
If you do not find the list of available PDOs under the Input or Output node, then the device does not
store the PDO information in its flash memory. In this case, the user needs to load the device’s XML file
manually. To get to the Select EtherCAT Device screen below, right-click the device and then click
“Append Device” as shown below:
Deletes the
selected device
from the list
In the screen above, a Copley Xenus Plus device is selected to be updated. Next, select “Update Device
File” as shown in the screen below.
This will update the device file previously added from the Add New Device File option.
Tools
60
Interface Overview: Acontis Stack
Master Node:
In Acontis stack mode, only the master node will be displayed.
Power PMAC Firmware greater than version 2.1.x.x will support two types of EtherCAT Master stack:
Etherlab (current stack) and Acontis (default). A system structure variable Sys.EcatType will state the
stack type. If it is 1 (default), then it is Acontis; if it is 0, then it is Etherlab. The motor setup procedure is
the same for both stacks. The difference is in setting the Ethercat devices. The Etherlab stack will use the
current setup steps to set up ethercat. For Acontis, a third-party tool is needed to set the ethercat devices.
The tool will eventually be part of the Power PMAC IDE.
Download .eni
Displays the list of
file to
slaves connected to
PowerPMAC
the master and their
statuses
Browse to .eni
file
Data
transactions .eni file path
between
master and
slave
Tools
61
Context Menu:
Right-click on the Master node in the left pane of the System Setup window to open the context menu as
shown in the image below:
Export EtherCAT Variables: This command will generate .pmh and .h files that can be kept in the
Power PMAC project. A file dialog box will be opened and you will be asked to enter the file name. This
name will be used to generate a file containing PDO mappings. A typical file looks like this:
----------------------------.h file------------------
//------------------------------------------------------------------------------
// <auto-generated>
//This code was generated by a Deltatau Data Systems Inc.
//Day : Friday, September 14, 2012, Time : 12:00:00 AM
//
//Changes to this file may cause incorrect behavior.
//</auto-generated>
//------------------------------------------------------------------------------
#define Controlword pshm->ECAT[0].IO[0]
#define AOOutputsChannel1Analogoutput pshm->ECAT[0].LPIO[0]
----------------------------.h file end------------------
----------------------------.pmh file-------------------
//------------------------------------------------------------------------------
// <auto-generated>
//This code was generated by a Deltatau Data Systems Inc.
//Day : Friday, September 14, 2012, Time : 12:00:00 AM
//
//Changes to this file may cause incorrect behavior.
//</auto-generated>
//------------------------------------------------------------------------------
#define Controlword ECAT[0].IO[0]
#define AOOutputsChannel1Analogoutput ECAT[0].LPIO[0]
----------------------------.pmh file end-------------------
The generated files are automatically added to the current project if the project is open in the IDE:
The .pmh file is added to the “\PMAC Script Language\Global Includes” folder.
The .h file will be added to “\C Language\Include” folder.
The EtherCAT startup variable file ecatactivate0.cfg/ecatactivate1.cfg will be added to
“Configuration” folder.
Enable EtherCAT:
This command enables the EtherCAT slave and command to change its state to OP (Operational) mode.
On Success, the Master node’s Deactivated status will change to Activated; otherwise, an error will be
displayed under the “Setup Messages” tab.
If using an amplifier in cyclic position mode, tuning the drive must be completed prior to using the
EtherCAT configuration tool with Power PMAC. This tuning is typically done separately from PMAC.
The way you tune it depends on the drive, often involving the 3rd party’s software. If you are instead
Tools
62
using the amplifier in cyclic torque mode, then the drive can be tuned using the IDE’s Tuning program
(discussed in the previous section of this manual), since Power PMAC will in that case be closing the
servo loop for the drive.
Note
The required clock rate for your device should be found in the device’s manual. Most EtherCAT devices
accept the following clock periods: 250 μsec, 500 μsec, and 1 msec. Set the Power PMAC servo clock
frequency to one of the required frequencies as shown below:
If the frequency is not a multiple of 62.5 μsec, then when you try to enable the EtherCAT device by right-
clicking on one of the task nodes (whether Foreground or Background), the setup program will generate
the following error:
Tools
63
Step 2: Configure the EtherCAT Device
Select the EtherCAT slave. On the right side there are five tab pages:
Tab List
(0:0) here
indicates the
slave's index
Device Details
(0) and its
position (0) in
the EtherCAT
network
The tabs (General, DC, Startup, State Machine, Slave FW Update, and Diagnostics) shown on the right
pane of the screen shown above are described below:
Tools
64
General
The General tab is a property grid showing the information read from the device and how it is connected.
The first five properties provide the device information. The next five properties show how the device is
connected to the Power PMAC master.
SlaveIndex
The physical location of the device relative to the Power PMAC master, independent of “Alias.” If you
see -1 in SlaveIndex property, then the EtherCAT slave is not configured. In this case, right-click on the
master and select Configure Master[n] in the context menu. This will set the valid slave index. The valid
slave address must be ≥ 0.
AbsoluteDevicePosition
The physical location of the device on the network.
Alias
The Alias is the unique identification of a slave device. Most of the EtherCAT Devices have DIP switches
for setting the “Alias” number. The network location of Devices with different “Alias” numbers can be
changed without causing conflict in EtherCAT operation. In some drives, on power up, the Alias is set to
the hardware DIP switch (hardware “Alias”), and some others maintain their software “Alias” number
even after recycling power. To be consistent, it is recommended to use the hardware “Alias” if it exists. If
an “Alias” of zero is selected (whether in hardware or in software), the device will use the previous
device “Alias” number and the “Position” (see next entry) will increment by one.
Position
The EtherCAT device’s position on the network relative to its Alias.
IsDetectedByECATNetwork
If “YES,” the device is detected by the network; else, “NO”. This property is useful when the setup
program is used to set up the devices in Offline Mode and then later go online by connecting the actual
devices. This will be explained later in the Offline EtherCAT setup. If the SlaveIndex is greater than or
equal to zero, then the General tab page setting is complete.
DC (Distributed Clock)
Power PMAC master supports EtherCAT’s distributed clocks feature. It synchronizes the slave clocks on
the bus to the reference clock (which is the local clock of the first slave with distributed clocks) and to the
master clock (which is the local clock of the master). Some EtherCAT devices may not need distributed
clocks. Please check your device’s reference manual for its distributed clock requirement.
Tools
65
This value is read
from the device’s
xml file
The user must set the following structures manually from the IDE terminal window or include it in a file
such as “global definitions.pmh” within the IDE project (in the PMAC Script LanguageGlobal Includes
folder):
Tools
66
To determine whether the Distributed Clocks are working properly, put ECAT[n].DCClockDiff into a
Watch Window and observe its value as shown below:
It should be fluctuating around a nonzero value. It should not be drifting indefinitely either positively or
negatively. If it is drifting, the Distributed Clocks are not working, and you will most likely not be able to
control servos.
You can adjust DCRefMinus and DCRefPlus in a manner similar to interactively tuning a servo loop. If
you see that DCClockDiff varies about a certain value more positively than negatively, try increasing
DCRefMinus or maybe decreasing DCRefPlus. If it varies more negatively than positively, try increasing
DCRefPlus or maybe decreasing DCRefMinus. The goal is to cause the DCClockDiff to vary as little as
possible about a certain nonzero value (this value may be different between different systems).
Tools
67
Startup
This tab allows user to select the drive’s initialization parameters. The user can add initialization
parameters from the list of dictionary objects. The setup software will display the parameters read from
the device. Other required parameters can be added by selecting the “Add New from Dictionary Object”
button (as shown in the image below).
In this example, Cyclic Sync Position mode is selected. There are eight possible modes per EtherCAT
specifications. The slave’s manufacturer decides which modes are supported. The list of available modes
is displayed in the “Value” column and the current value from the slave device is read and displayed in
the “EtherCAT Device Value” column.
Startup parameters load to the drive when the ecatsdo command is issued. If you want to use a mode
other than cyclic position, then select the available mode from the list. Make sure that the mode is
supported by the slave manufacturer.
Tools
68
The Dictionary Objects list is available from the device’s XML file provided by the slave’s manufacturer.
The objects should appear like those shown in the image below:
In the next screen, select “Position Offset” from the dictionary object and then add it (by clicking the Add
button) to the Startup tab as shown below:
Tools
69
Once the parameters are added, select Accept to load the parameters in the drive. You can see the
command used to load the startup parameters to the drive in the Output tab. This may be a helpful
reference if you want to see exactly which commands the System Setup program is transmitting.
The Setup program generates an initialization file (called ecatactivate<n> where n is master number; the
brackets do not show up in the filename) and stores the startup settings therein. The file is on the Power
PMAC at the following location:
/var/ftp/usrflash/Project/Configuration.
If you issue SAVE, Power PMAC reads the initialization parameters from this file every $$$ or power
cycle and then loads them into the slave device using “ecatsdo” command.
State Machine
This tab allows user to change the slaves’ states manually:
This option is for checking the drive or device functionality. This state machine must be implemented by
the EtherCAT slave’s manufacturer.
Initially, this tab shows the current state. This selection is possible if the slave device is in a deactivated
state.
Tools
70
Slave Firmware Update
This option allows the user to update the slaves’ firmware using the FoE (File over Ethernet) method. To
use this feature, the EtherCAT slave must support FoE.
To upload the firmware, put the slave into Bootstrap Mode. Select Update and it will open the File Open
dialog box. Select the appropriate file (consult with the slave’s manufacturer for the file type) and then
press Open. This will start the firmware upload process.
Tools
71
Diagnostics
This option will read some preselected EtherCAT slave registers and display their lengths and values. To
read from or write to the slaves’ registers, the user needs to select the appropriate options, offset address,
and data, and then select the Write button as shown below:
The register value which was read will be displayed in the “Setup Messages” tab. Any error in reading the
register will be displayed in the “Debug Messages” tab.
Reviewing these five tab pages completes the settings for the device.
Tools
72
Step 3: Map the Process Data Objects (PDOs)
The next step is mapping the PDOs (Process Data Objects). There are two types of PDOs: RxPDO
(receive data from slave) and TxPDO (transmit data to slave). After expanding the slave node from the
tree view, you will see two sub-nodes, input and output. “Input” lists all the TxPDOs and “Output” lists
all the RxPDOs. The input node represents input to Power PMAC and the output node represents output
from Power PMAC.
1. Update the device XML file (refer to the Update Device File section of this manual).
2. Add the PDO manually (for advanced users).
In our example, the list is available. The example is for Cyclic Position Mode, so the drive needs position
feedback.
Tools
73
The next steps are as follows:
1. Select 0x1600 from the PDO list grid. Upon selecting this PDO, in the PDO content list you will
see the list of RxPDOs. The position command mapping address is 0x607a. The list of TxPDOs
and RxPDOs is standard and the details can be found in the slave manufacturer reference manual.
Refer to the Output Setup screen.
2. Once you know that the required parameters are available in the PDO, press “Load PDOs to
PMAC.” The output of this command is displayed in the bottom output tab page as shown below:
This column specifies the PDO read
User-defined parameter name.
location. External: Read from the
Indicates whether the PDO This name can be exported as
device’s XML file. Local: Read from
List is required to be mapped a variable to be used in PLCs,
the device. Manual: Added manually.
motion programs, or C code.
Use the Export option from
the Master’s context menu
Tools
74
Configuring Input PDOs
Select the input sub-node under the MCDHT3520B01 slave. Upon selecting this, the right side will
display the
list of PDOs. If you do not see the list, the setup software did not find the built-in input PDO list from
the slave. In this case, you have two choices:
1. Update the device .xml file (refer to the update device file section)
2. Add the PDO manually (for advanced users)
In our example, the list is available. The example is for Cyclic Position Mode, so the drive needs a
position command.
The remaining steps are as follows:
1. Select 0x1a00 from the PDO list grid. Upon selecting this PDO, in the PDO content list you will
see the list of TxPDOs. The feedback mapping address is 0x6064. The list of Tx and Rx PDOs is
standard and the details can be found in the slave manufacturer’s reference manual. Refer to the
input setup screen.
2. Once you know that the required parameters are available in the PDO, press “Load PDOs to
PMAC.” The output of this command is displayed in the bottom output tab page as shown in the
image below.
This completes the EtherCAT side of the configuration of the EtherCAT slave Copley drive.
Tools
75
Step 4: Motor Setup
Now that we have configured EtherCAT, we need to set up a motor to work on the EtherCAT Link. From
within the System Setup tool (to get there from within the IDE, click ToolsSystem Setup), click on
“Add Motor” and then type the motor number of the motor you wish to control over EtherCAT.
Then, click on “Amplifier Information” and select the amplifier manufacturer and part number of the
amplifier you want to use. After selecting that, click on “Accept”.
If the EtherCAT setup is successfully completed and the slave device can be activated, then the amplifier
will be added to the list of available amplifiers automatically.
Information template
updates in every step Select the Copley amplifier Select the appropriate part number These parameters must
if there is more than one match with the
parameters in the XEL-
230-18’s General tab
Control modes
supported by
slave vendor
From IDE version 2.1.1.x new properties are added to make the ECAT motor setup easier. Entering
appropriate value in this field will automatically load the data in the Hardware Interface page.
Tools
76
Any EtherCAT drive used as a slave always comes with its own motor, so you can skip the Motor
Information sub-node. If you click the node, it will display motor information.
Next, select the appropriate feedback type. In our case, the feedback will come from the slave device.
Click on “Feedback Type” and select “ECAT” as the primary feedback, and then click “Accept.”
Feedback selection
changes are reflected on
the information template.
Tools
77
Next, select the Hardware interface. Here, you will associate the EtherCAT connection with Power
PMAC motor and encoder structures.
From IDE version 2.1.1.x and above these fields will be automatically set if the information on the
Amplifier Page is set correctly.
For this example, choose Cyclic Position as the control type under the Amplifier Control/Signal tag.
Select “Commanded Pos” (#x607a), “Controlword” (#x6040), “Statusword” (#x6041), and
“Actualmotorposition” (#x6064) under the amplifier interface property tag. Press “Accept.”
Tools
78
Indicates on Accept that the
interface settings were accepted,
otherwise it will display the error in
Red
This completes the Motor Setup section. At this point, you have successfully set up the EtherCAT slave
drive and then connected it to the Power PMAC structures. Now you are ready to move the motor.
At this point you are ready to test the setup. First, activate the slave device. Go to Master[0]
DeactivatedTaskForeground, right-click thereupon, and then click on “Activate Foreground Task.”
This command enables the EtherCAT slave and command to change its state to OP (Operational) mode.
On Success, the Master node’s Deactivated status will change to Activated; otherwise, an error will be
displayed under the “Setup Messages” tab.
Now, click on the interactive feedback node to check the motor feedback.
Tools
79
Move the motor to see the feedback
if the settings were accepted;
otherwise, it will display an error in
Configure safety parameters here Red
If you see the encoder move in the positive direction when you move the encoder in the positive direction
and vice versa, the feedback is working properly.
Next, you need to move the motor. If you want, you can set the parameters like following error and other
safety-related parameters on the Safety step shown in the motor setup list (see image above). Typically,
these setting are set in the slave, but setting the safety parameters also in Power PMAC provides
additional safety.
Make sure the motor is not loaded and can be safely moved freely
before continuing to the next steps.
Caution
Open the Jog Ribbon. In the example, motor 1 is the EtherCAT motor. Select motor 1 and press Stop to
close the loop, or use #1J/ from the Terminal Window. Use the JogPlus and JogMinus buttons to move
the motor as shown below:
Tools
80
Troubleshooting
Symptom: Upon issuing the command to enable the drive, the drive will not close the loop.
Solution: Open the status window and select the ECAT Status tab (as shown below) to see the errors such
that you can isolate the problem further.
Tools
81
Configuring EtherCAT Input/Output Devices
This section assumes that the device is wired correctly and powered up. This example uses the Beckhoff
I/O Devices EL1014 and EL2004. The first step for any EtherCAT device, including I/O Devices, is to set
up Power PMAC’s servo clock as described in detail in Step 1 of the EtherCAT drive setup example
earlier in this manual. After setting up the clocks in Power PMAC correctly, make sure the master node is
deactivated. Right click on “Master[0] Deactivated” and then click on “Configure Master[n]” where n
is the Master Number:
Now you should be able to see all your I/O Devices as shown below:
If the mappings are not displayed under the “Read From” column, then you can update the device XML
Tools
82
file (refer to the Update Device File section of this manual), or you can add the entries manually. To add
the entries manually, contact the device vendor for indices.
Once you obtain the valid indices, add a mapping in the top section, provide the correct index and then in
the bottom section, select the “Add From Dictionary Objects” button and select the appropriate object to
add.
If the mappings are displayed, then the next part is to map them to Power PMAC structures. Select an
entry in the “PDO List” section and an entry in the “PDO Content section” and use the drop down list to
add the input to Foreground or Background.
Generally, you should always use Foreground tasks. Use Background tasks only if the Power PMAC
servo tasks are consuming more than 80% of the Power PMAC’s CPU time. You can check this by
clicking ToolsTask Manager and then observing the percentage amount that PMAC spends time on
various tasks.
You can also add all of the PDOs in a given PDO List by pressing the “Load PDOs to PMAC” button.
This will automatically add all of the PDOs for that list to the foreground task.
In this example, add Input 1 and Input 2 to the Foreground Task List. You can expand the task node on
the left side and check under “Foreground Task” to find the Ecat[0].IO[1] entry.The setup program
adds some default names for these quantities. You can change these names to make them more
appropriate to your application if desired by clicking on the name in the field and then renaming it.
After exporting variables and adding header files to your project, you can use these names to access the
variables in Script PLCs, Motion Programs, or C programs (see “Export EtherCAT Variables: ” in this
manual).
Activate the EtherCAT device by right-clicking on the Foreground Task under the task node and then
changing the input state. The state will be displayed under the “IOData” column.
Tools
83
Configuring Setup Output Slave Devices
The output device in this example is a Beckhoff EL2004. Expand the EL2004 node and select Output.
Upon selecting this, you will see the four outputs on the right side.
In this example, add Output 1 to the Foreground Task List. You can expand the task node on the left side
and check under Foreground Task to find the Ecat[0].IO[2] entry.
The setup program adds default variable names initially. You can change these names to make them
appropriate to your application. When you export variables and add header files to projects, you can use
these names to access them in PLCs, Motion Programs, or C programs.
Activate the EtherCAT device by right-clicking on the Foreground Task under the task node and then
write a “1” (without the quotes) in the IOData column. The output state will be changed thereby.
Tools
84
Configuring an EtherCAT Devices: Acontis Stack
The required clock rate for your device should be found in the device’s manual. Most EtherCAT devices
accept the following clock periods: 250 μsec, 500 μsec, and 1 msec. Set the Power PMAC servo clock
frequency to one of the required frequencies as shown below:
If the frequency is not a multiple of 62.5 μsec, then when you try to enable the EtherCAT device by right-
clicking on one of the task nodes (whether Foreground or Background), the setup program will generate
the following error:
Tools
85
Step 2: Configure the EtherCAT Device
To configure Ethercat devices using Acontis stacks requires the third-party tool. The name of the tool is
EC-Engineer. EC-Engineer is installed as part of the IDE installation version 2.1.1.x or greater.
If the software installed correctly, then the EC-Engineer icon will be displayed on the desktop.
Use EtherCAT Master Unit ODT to configure the ECAT network. The screen will look like…
Start configuring the ECAT network by right-clicking the ODT master node. Please use the
documentation provided with the EC-Engineer tool to configure the network and then generate the ENI
file
Configure the network in configuration mode and then select Export ENI button to generate the ENI file..
Tools
86
Step 3: Load the configuration to PowerPMAC
In this the ENI file used that was created in step 2. Click on the Master Node under system setup and you
will see the following:
Select the Master node and then use Browse button to select the ENI file to download to Power PMAC.
Select the Download ENI file button to download. Upon successfully downloading, a message will be
displayed in the setup message window. If the download fails, an error message will be displayed in the
message window.
Right-click on the Master node if the ENI file download is successful and select Enable EtherCAT. This
will change the ECAT device’s status to OP mode.
Tools
87
Plot
The Plot window can be used for gathering data from within Power PMAC and plotting it afterward. This
tool cannot be used for real-time plotting; the Scope tool should be used for that. The user configures the
Plot window through four steps:
These steps are outlined at the top of each pane in the Plot window, as shown below:
Tools
88
In the main plot window, clicking on the Gather Options menu will list some options to change how a
gather is performed.
Legacy Mode
Legacy Mode causes the Plot to gather data in the same method used prior to IDE version 2.1. Data
begins to be stored in a buffer on Power PMAC when the Gather button is pressed until the Gather Max
Samples is reached. When the Upload button is pressed, the data is stored in a file on Power PMAC and
then transmitted to the user’s PC and formatted for plotting.
Legacy Mode will be automatically enabled when the Plot control is connected to a device with firmware
older than 2.0.2.64, or when the device is detected as being under heavy load. Devices detected as being
under heavy load may have Legacy Mode disabled, but they are at increased risk of the gather being
interrupted or data being lost. If either condition occurs, the user will be notified. The screenshot below
demonstrates the indication that legacy mode is enabled:
Auto Plot
Auto Plot saves the user from needing to press the Upload Data and Plot Data Buttons. When
Gather.Enable changes from a value of 3 or 2 to 1 or 0 a plot is generated using the current settings in
the Plot Control. Auto Plot may only be enabled while Legacy Mode is disabled.
Tools
89
Step 1 – Possible Data Sources
There are three tabs in the Plot Window underneath the heading “Step 1 – Possible Data Sources”: Quick,
Detailed, and Manual.
Quick Plot
The Quick tab only displays motors that have been enabled (i.e. Motor[x].ServoCtrl > 0).
Selecting the enabled motor automatically puts commonly used motor structures into Step 2’s and Step
3’s panes.
Detailed Plot
The Detailed tab shows all of the available structure trees whose structures you can plot. Click the plus
button ( ) next to each structure tree’s name in order to display all of the elements or substructures within
that tree:
Tools
90
Then, you can click the check box to the left of the structure or element which you want to include in Step
2 as a data source to sample.
Manual Plot
Clicking the Manual tab permits you to type a structure name manually if you know the exact structure
name:
For example, you could type Motor[1].ActPos here if you wanted to gather that structure directly.
Tools
91
Step 2 – Data to Sample
In this step, select the data source you actually want to sample. To do this, click the data source and then
click the double right arrow ( ) button to add the data source to the Data Processing field for use in Step
3:
You can click the double left arrow ( ) button to remove an item from Step 3 and put it back into Step 2.
All data is by default not scaled (i.e. it is multiplied by a scale factor of 1) and has an offset of 0. In order
to modify the scale factor or the offset, first select the data source you want to scale, and then click “Scale
Factor” or “Offset” (as shown in the red box below):
Tools
92
This opens the “Process Data” window as seen below:
The various elements of the Process Data screen are described below, each description corresponding to
the superscripted red numbers superimposed over the screenshot above:
Offset (2):
This number will be added to the product of your data item and the scale factor, as shown in Process (4).
Process (4):
Process is the result/output of the data processing. In other words “Process” is equal to the expression
shown to the right. By default, the process is simply to multiply the data item you selected by the Scale
Factor (1) and then add the Offset (2).
Tools
93
Available Process (5):
This dropdown menu shows you all of the processes which you can include in the Process (4) equation:
The functionality of each process in the list is described in the table below:
After selecting the process you want to use, click the button to the right of the dropdown menu to
add that process to your Process (4) equation.
Insert (7):
Click this button to insert the data processing entry into Step 3’s list of items back on the main Plot
screen.
Update (8):
Click this button to update this entry, if it already exists, with the settings you have selected.
Tools
94
Cancel (9):
Click this button to cancel modifying this entry.
Step 4 – Plotting
In this step of the plotting process, you can choose which items to plot on which axes. The axes available
are the Left Axis, the Right Axis, and the Horizontal Axis.
To add an item to an axis, select the Data Source you want to add from Step 3’s list of items, and then
click the double right arrow button ( ) next to the list box for the axis to which you want to add this item:
Click the arrow ( ) indicated by the superscripted red “1” shown in the image below to add your
data source to the Left Axis.
Click the arrow ( ) indicated by the superscripted red “2” shown in the image below to add your
data source to the Right Axis.
Click the arrow ( ) indicated by the superscripted red “3” shown in the image below to add your
data source to the Horizontal Axis.
Tools
95
Click the double left arrow button ( ) next to each axis’s list box to remove that item from the axis:
Click the arrow ( ) indicated by the superscripted red “4” shown in the image above to remove
your data source from the Left Axis.
Click the arrow ( ) indicated by the superscripted red “5” shown in the image above to remove
your data source from the Right Axis.
Click the arrow ( ) indicated by the superscripted red “6” shown in the image above to remove
your data source from the Horizontal Axis.
Sampling Settings
The sampling settings controls in Step 1 allow you to set how many samples you want to gather per data
source and the sampling period for gathering:
The “Sample Period” is in units of servo periods. For example, if you set the sample period equal to 1,
you will sample every servo period.
“Max Gather Samples” specifies the maximum number of data points to sample per source.
Grabbing the slider underneath “Sampling Settings” will show you how many seconds of data you will
gather based on the “Max Gather Samples” and the “Sample Period” settings you chose.
Tools
96
Gathering
To start gathering the data, click the “Gather Data” button as shown in the red box below:
You will see the progress meter, which is located beneath the “Upload Data” button (surrounded by a blue
box in the image above), fill up with green as the data is being gathered. Once that meter is full with
green, click “Upload Data.” You can also stop the data in the middle of it being gathered by clicking the
“Stop” button which replaces “Gather Data” (surrounded by a red box in the image above) while data is
being gathered.
After you have clicked “Upload Data” and the data has been uploaded, you can click “Plot Data”
(surrounded by a purple box in the image above). This button will be grayed out until the data has been
successfully uploaded.
Tools
97
Plot Tools
Clicking the “Plot Data” button opens a plot of your selected data sources. In this example, the actual
position of motor 1 is being plotted on the Left Axis as a function of time on the horizontal axis:
Open Plot
Allows you to open a plot you saved previously with the “Save Plot” command.
Save Plot
Allows you to save the contents of this current plot and the plot formatting settings in the “*.ppp” file
format.
Tools
98
source. Subsequent rows contain the data points in double precision. The leftmost column is the first data
source for the Horizontal Axis you selected. Subsequent columns are to the right. The next column is the
next data source for the Horizontal Axis. After that, subsequent columns consist of the Left Axis data
sources in order, and then the Right Axis data sources.
For example, motor 1’s actual and commanded position are on the Left Axis, actual and commanded
velocity on the Right Axis, and Time on the Horizontal Axis, as shown below:
Then the exported data file will appear as such (only the first few rows are being shown):
Time(sec) Motor[1] Act Position Motor[1] Cmd Position Motor[1] Act Velocity Motor[1] Cmd Velocity
0.000000 73153818.000000 73153818.000000 5000.000000 5000.000000
0.002000 73153828.000000 73153828.000000 5000.000000 5000.000000
0.004000 73153838.000000 73153838.000000 5000.000000 5000.000000
0.006000 73153848.000000 73153848.000000 5000.000000 5000.000000
0.008000 73153858.000000 73153858.000000 5000.000000 5000.000000
0.010000 73153868.000000 73153868.000000 5000.000000 5000.000000
0.012000 73153878.000000 73153878.000000 5000.000000 5000.000000
0.014000 73153888.000000 73153888.000000 5000.000000 5000.000000
This can easily be imported into, for example, Microsoft ExcelTM for further processing if desired.
Tools
99
Tools for Filtering Data and Creating Power Spectra
Clicking the View menu will show some tools for filtering your data and plotting power spectra:
FFT
This tool will perform a Fast Fourier Transform (FFT) of your data. You can choose whether to filter the
signals or not, or whether to plot the vertical axes in units of decibels (dB). If you choose to filter the data,
the IDE will perform a Hanning window filter on the data. If not, it will use a Uniform/Rectangular
window. The Horizontal Axis will not be logarithmic.
Smooth
This tool will filter the signals you chose to plot with a moving average whose order can be set from 0 to
10:
The default filter order is 2. The filter sums groups of points (the number of points in the sum is equal to
the order of the filter) and then divides by the order of the filter. The equation of the filter is as follows:
1
𝑝𝑖 = 𝑁 ∑𝑁
𝑘=0 𝑎𝑘 ,
where pi is a point on the plot, where i runs from 0 to the total number of points on the plot, N is the order
of the moving average filter, and ak is a point of data in the group of points of size (N + 1) presently being
processed by the filter.
Tools
100
Saving and Loading Plot Configurations
In the main Plot window, clicking on the File menu will list several tools:
New Plot
This tool wipes this Plot window of all settings and shows a default, blank Plot window.
The Plot Window will retain the plot settings you have chosen for this
project until you click New Plot to wipe it clean.
Note
Tools
101
Open Configuration File
Opens a configuration file containing the plot settings you previously saved by clicking “Save
Configuration File” in this Plot Window.
Tools
102
Selected Presets
Selected Presets allow for rapidly switching the gathered and plotted items to previously saved selections.
Once the plot contains the setup to be saved, type a name for the setup in the “Selected Preset” field
(boxed in blue in the image) and press the “Save” button (boxed in red):
To switch to a different preset, select the item in the “Selected Preset” field’s dropdown menu:
Alternatively, pressing the Enter key while your cursor is in the “Selected Preset” field while the field
contains the name of a previously saved preset will load that preset. In order to delete a preset, type its
name in the selected preset field or select it from the dropdown and press the delete button. To overwrite
Tools
103
an existing preset with different options, select it from the dropdown menu or type its name in the
Selected Preset field, change the Sampling, Gather, Processing, and/or Plot options, and press the Save
button.
Tools
104
Scope
The scope tool permits the user to plot data in near real-time. The interface looks like this:
Under the “Detailed” tab on the left, you can select the structure you want to scope. Click the plus button
( ) to expand the structure tree, right-click the structure, and then click “Add Command to Channel” as
shown below:
Tools
105
Alternatively, you can click the “Manual” tab and type in the command which you want to add to the
channel:
You must know the exact structure name in order to do this. After typing the command, click “Add” to
add it to the channel.
You can delete the command from the channel by clicking the Delete button ( ). You can select this
channel as the primary vertical axis by clicking the button. You can change properties of this
channel by clicking the Properties button ( ).
Tools
106
When you click the Properties button, the Channel Details dialog box will pop up, looking like this:
On this screen, you can choose the minimum and maximum limits and the minor and major units for the
vertical axis which this command occupies. Note that these scales will only be used if you have selected
“Manual Scale” under Graph Properties on the main Scope window.
You can also choose whether to show minor and major gridlines. You can also change the symbol type to
represent each data point. The symbol types you can choose are shown below:
Make sure to click the “Save” button when you are finished making changes and want to leave the
Channel Details window.
Tools
107
Back to the main Scope window, you can choose whether to have the IDE automatically scale the Scope
window’s limits based on the size of the data by clicking on “Auto Scale” (surrounded by a red box in the
image below) under Graph Properties:
If you want to use your own scaling instead, then select “Manual Scale” (surrounded by a purple box in
the image above) and make sure to set your limits in the Properties menu (opened by clicking on the
button for the channel whose limits you want to modify). You can also change the color of the Scope’s
background by clicking on the Background Color button (surrounded by a blue box in the image above).
You can change the seconds per division by clicking on the SEC / DIV button. You can select divisions
of 2, 5, 10, 50, 100, 200, 500, or 1000 msec.
You can specify the plotting period by typing in the value you want (in units of servo cycles) to the right
of “Gather Servo Cycles.” The Scope window will calculate for you the number of msec which the
number of servo cycles you chose occupies. The speed at which gathered points are plotted is calculated
automatically. It appears next to “Plotting is behind by x” below the live scope as “Filter = x” which
indicates that 1 of every x points is plotted. All data up to the allowed buffer size is retained for “Graph
all Data points” even if it is not plotted live. You can see how far behind the plot is at the bottom of the
plotting area; it looks like the following (surrounded by the red box in the image below):
Tools
108
Scope Controls
A number of tools are available for manipulating the Scope plot area, as highlighted in the red box in the
image below:
Tools
109
The table below describes the functionality of each of the buttons:
Tools
110
Task Manager
The Task Manager:
Provides information about the Power PMAC CPU and about programs running thereon
Permits you to start and stop programs
Displays which servo and phase algorithms your motors are using
CPU Information
The first tab of the Task Manager is the CPU Information tab:
Tools
111
The table below describes the fields beneath “CPU Information:”
Field Description
Power PMAC Type This field states which type of Power PMAC form factor in which this CPU
resides (e.g. UMAC, Brick, etc.)
Firmware Version The version number of the firmware installed on this Power PMAC CPU
Total Memory The total RAM with which this CPU is equipped
CPU Temperature The present operating temperature of this CPU in degrees Celsius
CPU Frequency The frequency at which this CPU is clocked in MHz
Firmware Date The date of the build of the firmware installed on this CPU
Free Memory The amount of RAM presently unused
CPU The PowerPC CPU’s revision in this Power PMAC
The next section of this tab is the “PMAC Memory Overview.” In this section, there are three columns:
Buffer, Total Memory, and Used Memory, whose purpose is as follows:
The table below describes each buffer beneath “PMAC Memory Overview” in the Buffer column:
Buffer Description
Program Buffer Allocates space for motion programs and PLC programs written in Script
User Buffer Allocates space for general purpose use
Table Buffer Allocates space for compensation tables (position and torque)
LookAhead Buffer Allocates space for the Special Lookahead feature
SyncOps Buffer Allocates space for Synchronous Operations (i.e. Synchronous M-Variables)
Symbols Buffer Allocates space for variable names
You can see the exact amount of memory allocated for each buffer by typing the size command into the
Terminal Window, and the exact amount of free memory within those buffers with the free command.
Tools
112
Tasks
The Tasks tab shows four categories of tasks being executed on the Power PMAC CPU:
The purpose of each column shown in the Tasks tab is described below:
Column Name Description
Tasks Lists which task whose properties are being described in the columns to this right
of this one
Frequency The frequency with which this task occurs
Calculation Time The average time this task requires to finish
Peak Time The largest measured amount of time this task has taken to finish since startup
% Task Time The percentage of total CPU time this task consumes on average
Tools
113
Clicking each task in the Task column will show details about that task in the Details box at the bottom of
the Task Manager window.
Tools
114
Clicking on Real Time Interrupt will show:
How often the Real-Time Interrupt (RTI) is serviced
How many motion programs occupy how much space of PMAC’s memory
Whether the Real-Time PLC (PLC 0) is active
Whether the user-written Real-Time Interrupt C Program (RTICPLC) is active:
PLCs
Clicking the PLCs tab lists all Background C Applications, Script PLCs, Real-Time C PLCs
(RTICPLCs), and Background C PLCs (BGCPLCs) running on PMAC presently:
Tools
115
The “Details” box at the bottom of the window shows various properties about the program. The table
below describes these properties:
The user can start a program by clicking on the program in the list and then clicking on the
button, or stop the program by clicking . To refresh the list of programs, press .
Programs
The programs tab lists all motion programs in PMAC:
Tools
116
The Type column shows the type of the program
The Name column shows the name (if it has been named) or number of the program
The Coord column shows the number(s) of the coordinate system(s) which is presently running
this program (more than one coordinate system can be running the same program simultaneously)
The Size column shows the amount of RAM the program occupies
The Running column shows whether the program is running presently
The user can start a program by clicking on the program in the list, clicking on the Start Option menu, and
then selecting Start . This option will be grayed out if the coordinate system (CS) column for the slected
row displays “Not Assigned.” In this case, use the second menu option, “Assign CS and Start.” Selecting
this menu will show a dialog box with which the user can specify in which coordinate system to start the
program. In this window, the coordinate system numbers are entered separated by a comma or, you can
enter just one CS number. Stop the program by clicking . To refresh the list of programs,
press .
Tools
117
SubPrograms
The SubPrograms tab shows all subprograms in PMAC:
Tools
118
Servo
The Servo tab shows which servo algorithms are being used for which motors:
This tab shows whether the user-written code library is active; that is, whether the user is using any real-
time C routines in the IDE project.
Tools
119
The IDE recognizes that the user is using real-time C routines if the build action on usrcode.c (in the
IDE’s Solution Explorer under C LanguageRealtime Routines) is set to Compile, as shown in the
screenshot below:
Tools
120
Phase
The Servo tab shows which servo algorithms are being used for which motors:
This tab shows whether the user-written code library is active; that is, whether the user is using any real-
time C routines in the IDE project. The IDE recognizes that the user is using real-time C routines if the
build action on usrcode.c (in the IDE’s Solution Explorer under C LanguageRealtime Routines) is set
to Compile, as shown in the screenshot below:
Tools
121
There are four columns on the Phase tab:
The “Motor” column shows each motor number ranging from 0 to the value of (Sys.MaxMotors
- 1)
The “Algorithm” column shows which phase algorithm is being used for this motor. At the time
of writing this manual, the phase algorithms available are as follows:
o “Standard Phase”: PMAC’s standard, default motor commutation algorithm
o “Using function {user function here}”: This is the user-written phasealgorithm, which the
user needs to have written in C code and then set this motor to use that algorithm. In the
example screenshot above, the servo algorithm is named “user_phase.” See the
“Configuring User-Written Phase Algorithms” section of this manual under the “Project
System” header for more details on configuring user-written phase algorithms.
The “PhaseCtrl” column shows whether this motor is commutated
The “CurrentLoop” column shows whether PMAC is closing a digital current loop for this motor
Tools
122
OS Resources
The OS Resources tab shows all of the processes (also known as threads) running on PMAC. You can
choose either to show only PMAC processes (i.e. processes related to PMAC’s tasks listed in the Tasks
tab), or all processes, including processes that may be running in the background and are not part of
PMAC’s tasks:
There are five columns on the “OS Resources” (Operating System Resources) tab:
The “PID” column shows the Process ID number for this thread
The “User” column shows with which user this process is associated
The “%CPU” column shows what percentage of the CPU’s time this process consumes
The “Mem Used” column shows how much RAM this thread consumes.
The “Command” column shows the name of the Process; that is, the name of the function which
this thread is executing
The amount of RAM used shown in the “Mem Used” column consists
of the sum of the actual RAM the program occupies and the shared
memory shared between each program using Delta Tau’s C Libraries.
Thus, for example in the screenshot above, seeing “236m” for several
programs does not mean that each one occupies 236 MB but rather
Note that they all are roughly the same size and share the same library
space, bringing their total up to 236 MB.
Tools
123
Tuning
The Tuning tool can be used to tune current loops and position (servo) loops for your motors. “Tuning”
refers to the process of adjusting the gains in the control loop until the desired performance level is
achieved. You can also use the Tune tool to configure filters for the position and velocity loops and also
trajectory prefilters.
Although the System Setup software provides “automatic tuning” of the servo loop, this automatic tuning
is only intended as a starting point. It might get the motor to jog but probably will not tune your motor to
the exact performance specifications you desire. Thus, we recommend always using the Tuning software
to do your own interactive tuning in order to obtain the performance goals you desire.
Tools
124
Tuning Window Layout
Clicking the “Tune” button in the menu shown above opens up this screen, which is the default layout for
the Tuning Window:
Select various tabs, different screens of the
Tuning Window, here
Close the loop with this button Choose various options for your move here Configure cross-
coupling gains here
Open the if using gantry cross-
loop with this coupling
button
Choose which items to
Click this to plot on the left and
phase the right axes here
motor with (horizontal axis is
the phasing always Time)
method with
which you
programmed Indicates
the motor whether a
previously Shows whether Shows which Indicates trajectory
Some motor Shows PMAC’s the motor is servo algorithm whether a filter prefilter is
status bits are servo algorithm’s independent or the motor is is being used in active for this
This box displayed here block diagram gantry-coupled using the position motor
indicates loop for this
whether the motor
Info, Output, Debug, Error, and Warning tabs display various information
motor is
generated by Tuning Window
commutated
The first tab that opens by default is the “Position Loop Interactive Tuning” tab, permitting you to
command various test trajectories to the motors, observe the motor’s response, and then adjust the servo
loop gains accordingly.
To refresh this window, right-click and click Refresh, or hit CTRL+R on your keyboard. You can also
connect this window to another device by right-clicking and clicking PropertiesConnect to Device:
Tools
125
If you want to create a file containing values used to calculate servo loop filter or trajectory prefilter
parameters that have been configured in Power PMAC, right-click on a blank gray space on the tuning
screen and then click “Upload Filter File” as shown in the red box below:
The file (filterinfo.flt) is added to the Configuration folder in your IDE project as shown in the red box
below:
This file contains values that the Tuning software uses to calculate filter gains. Understanding the file’s
contents is not important for the user. If this file is present in the Configuration folder, when you open the
Tuning software window, the software will load these settings into the Tuning window in order that you
may see what filter settings are currently being used. The Tuning software will also compare the values
from this file against the filter parameters currently in PMAC and will give a warning if they differ. If
they differ, and you want to retain the filter gains specified in the file, rather than the filter gains currently
in PMAC, go to the Tuning window corresponding to the filter (for Servo filters, go to Interactive
TuningFilter Calculators; for Trajectory Prefilter, click on the Trajectory Prefilter tab) you want to
change, and then click CalculateImplement. Note that this file does not contain PMAC parameters, but
rather values used to calculate filter-related PMAC parameters.
Tools
126
Output Windows
The windows at the bottom of the screen contain much useful information. Each tab contains a different
type of information. There are five tabs as shown below:
Info
This tab displays any changes that the Tuning window made to Power PMAC parameters.
Output
This window displays any I/O stream text that the window might print.
Debug
This window announces what operations the window is trying to perform; for example, it will announce
that it is preparing a step move, or that a trapezoidal move just finished successfully.
Error
The Error tab will show any errors that the window reports. For example, the Error window will print an
error message if the Tuning window tries to command the motor to move for its Automatic Tuning
procedure and the motor’s Minimum Move is not made.
Warning
Gives any programming warnings that the window reports.
Tools
127
Position Loop Interactive Tuning
In the screenshot of the Position Loop Interactive Tuning window above (right under the heading “Tuning
Window Layout”), the servo loop gains and other parameters related to servo control are shown within a
green box. You can adjust these on the fly and the program will change the associated parameter for you
within PMAC.
Since the servo loop gains change on the fly as you alter them in the
Tuning window, make sure you enter only safe gains in order not to
damage your motor or cause it to go unstable, potentially damaging
Caution equipment or people.
If you want to know the exact structure with which the gain parameters listed here are associated, just
hover your mouse cursor over the parameter and a tooltip will appear with the structure name. In the
example screenshot below, we hover over “Derivative Gain 1” and see that the associated structure is
Motor[x].Servo.Kvfb:
Test Trajectories
In the purple area in the screenshot of the Position Loop Interactive Tuning screenshot above, the various
test trajectories which you can command to your motor are shown. These test trajectories can be useful
for identifying characteristics of your motor and tuning it systematically. There are eight different test
trajectories available: Step, Ramp, Parabolic Velocity, Trapezoidal Velocity, S-Curve Velocity,
Sinusoidal, Sinesweep, and User Defined. Most users only need to use Step and Parabolic Velocity as
these can be used to tune Kp, Kd, Ki, Kvff, Kaff, and Kfff. The other moves are available to simulate the
kind of moves to which you might subject your machine in order that you may optimize the servo loop’s
gains to get the performance you want during these kinds of moves.
Tools
128
Along the top of the window are three menus: File, View, and Tools.
File lets you open a plot you have previously saved, save this plot, or save the plot’s data in a raw data
file:
Clicking View allows you to subject the plot to a Fast Fourier Transform (FFT) or to smooth the data out
with a filter:
FFT
This tool will perform a Fast Fourier Transform (FFT) of your data. You can choose whether to filter the
signals or not, or whether to plot the vertical axes in units of decibels (dB). If you choose to filter the data,
the IDE will perform a Hanning window filter on the data. If not, it will use a Uniform/Rectangular
window. The Horizontal Axis will not be logarithmic. This is an example screenshot of the above Step
move transformed with an FFT with filtering and with logarithmic axes:
Tools
129
Smooth
This tool will filter the signals you chose to plot with a moving average whose order can be set from 0 to
10:
The default filter order is 2. The filter sums groups of points (the number of points in the sum is equal to
the order of the filter) and then divides by the order of the filter. The equation of the filter is
1
𝑝𝑖 = 𝑁 ∑𝑁
𝑘=0 𝑎𝑘 ,
where pi is a point on the plot, where i runs from 0 to the total number of points on the plot, N is the order
of the moving average filter, and ak is a point of data in the group of points of size (N + 1) presently being
processed by the filter.
Tools
130
Move Options
You can select a few options that apply to all moves directly beneath the test trajectories section of the
window:
Note that if you select “Repetitive Move,” the move you selected will execute repeatedly until you click
“Stop Repetitive Move” on the dialog box that pops up when you tell the tuning window to perform the
move you have selected:
The number of iterations are shown at the bottom of this dialog box.
Trajectories
The various trajectories available are described below:
Step
The Step move commands a discontinuous change in desired position to the motor, dwells, and then
returns to the starting position. The motor then tries to immediately react to move to the new position.
The only parameters you need to set are the Step Size in
motor units, which is the magnitude of the instantaneous
discontinuous change in position commanded to the motor,
and the Step Time in milliseconds, which is how long the
desired position dwells before returning to the starting
position. You can set these parameters in the Tuning window
as shown to the left.
Tools
131
Once you are ready to command the move, click “Do a Step Move.” An example Step move appears
below:
The commanded position is shown in red (Motor[x].DesPos), the actual position in green
(Motor[x].ActPos), and the servo command (Motor[x].ServoOut) in yellow.
This move is especially useful for determining the values of Kp, Kd,
and Ki. See the “Tuning Guidelines” below for more details.
Note
Plotting the servo command on the right axis is always recommended for the Step move. This is because
that way you can see when the servo command has saturated. You can tell the servo command has
saturated when its value truncates and becomes completely flat, indicating that the servo command has
reached its limit, Motor[x].MaxDac. At this point, increasing Kp will not help you to improve the
motor’s performance.
Tools
132
Ramp
The Ramp trajectory commands a linear increase in motor position in the positive direction for a certain
distance and then reverses that command for the same distance, returning the motor to its starting
position. The parameters you can select for this move are as shown below:
Click “Do a Ramp Move” when you are ready to move the
motor.
Tools
133
Parabolic Velocity
The Parabolic Velocity move commands a parabolic velocity trajectory first in the positive direction and
then in the opposite direction to the motor. The parameters you can specify for this motor are shown
below:
“Move Size” is the distance [motor units] the motor will first travel in the positive direction
before reversing and traveling the same distance in the opposite direction.
“Move Time” is the time span [msec] within the motor will traverse the distance specified in
“Move Size” in the positive direction, and then that same distance in the opposite direction within
the “Move Time” time span again.
You should see a move similar to that which is shown in the following screenshot:
This move is especially useful for determining the values of Kaff, Kvff,
and Kfff. See the “Tuning Guidelines” below for more details.
Note
Tools
134
Trapezoidal Velocity
This trajectory commands a trapezoid-shaped velocity profile to your motor, first in the positive direction
and then in the negative direction. Below are the parameters you can adjust for this move:
“Move Distance” is the total distance [motor units] the motor will move in the positive direction
before reversing and traveling that same distance in the opposite direction.
“Velocity” is the maximum speed [motor units per second] commanded to the motor at the peak
of the velocity profile.
“Acceleration Time (TA)” is the time span [msec] over which the motor will accelerate to the top
speed specified in “Velocity” right above this field.
“Number of Repeats” is how many times to execute the forward-and-back motion path.
Tools
135
S-Curve Velocity
The S-Curve Velocity trajectory commands a cubic B-Spline shape to the motor’s velocity first in the
positive direction and then in the negative direction. The parameters you can specify are shown below:
“Move Distance” is the total distance [motor units] the motor will move in the positive direction
before reversing and traversing the same distance in the opposite direction.
“Velocity” is the peak speed [motor units per second] commanded to the motor in each direction.
“Acceleration Time (TA)” is the time span over which the motor will accelerate to the speed
specified in the “Velocity” field immediately above this field.
“Number of Repeats” is the number of times the motor should perform the forward-and-back
motion path.
Tools
136
Sinusoidal
This trajectory commands a sine wave position signal to the motor. The parameters you can adjust are as
follows:
Tools
137
Sinesweep
Sinesweep commands a sine wave position signal to the motor. This signal is different from the
Sinusoidal test trajectory in that while the Sinusoidal trajectory remained at a constant frequency, the
Sinesweep trajectory’s frequency increases either linearly or logarithmically (at the user’s choice) over a
time span the user specifies. The parameters you can vary are as follows:
“Start Frequency” is the initial frequency [Hz] of the sine signal at the start of the move.
“End Frequency” is the final frequency [Hz] of the sine signal at the end of the move. The signal
should reach this frequency by the end of the “Sweep Time” [sec] you specify in the field
immediately below this one.
“Sweep Time” is the time span [sec] over which the sine wave will be commanded to the motor;
this is the time span over which the sine wave’s frequency will increase either linearly or
logarithmically as specified in the “Sweep Method” parameter two fields below this one.
“Move Size” is the amplitude [motor units] of each period of the sine wave.
“Sweep Method” describes the manner in which to increase the frequency of the wave being
commanded to the motor. Selecting Linear will increase the frequency (f(t) below) linearly such
that the frequency change with time (t below) follows the following formula:
where fend is the “End Frequency” you specified, fstart is the “Start Frequency” you specified, and Tsweep is
the “Sweep Time” you specified. Selecting Logarithmic will increase the frequency logarithmically
according to the following equation:
𝑡
𝑓𝑒𝑛𝑑 𝑇𝑠𝑤𝑒𝑒𝑝
𝑓(𝑡) = 𝑓𝑠𝑡𝑎𝑟𝑡 ∙ ( )
𝑓𝑠𝑡𝑎𝑟𝑡
Tools
138
You should get a plot similar to what follows:
User Defined
The final test trajectory available is user-defined (i.e. the user designs it by writing a motion program).
This is equivalent to adding a motion program to your project and running it, but doing this in the Tuning
software has a few advantages, namely that the motion program is only downloaded temporarily to be run
once each time, and the Tuning software automatically gathers and plots the motor’s response. This
makes designing your own move (e.g. a move similar to that which your machine might actually
experience once it is commissioned) and testing therewith to see if your servo loop gains produce the
performance that you desire much easier.
You can type in your motion program in the provided area and then click “Download and Run the Motion
Program.” You need to know how to write motion programs in order to do this. For more details on
writing motion programs, please refer to the Power PMAC User’s Manual, the section labeled “Writing
and Executing Script Programs in the Power PMAC.” The motor you have selected will be assigned to
Cordinate System 0, Axis X, and your program will be run in Motion Program 999.
Tools
139
For example, a simple motion program:
Tools
140
Filter Calculator
Clicking on the Filter Calculator on the Position Loop Interactive Tuning tab opens this screen:
This screen permits you to design Single Notch, Single Notch/Low Pass, Double Notch, Double
Notch/Low Pass, and Low Pass filters for the Position Loop, and a Low Pass filter for the Velocity Loop.
The Filter Calculator should be used by Advanced Users only, that is,
those who are familiar with filters and the parameters associated
therewith. These filters consist of bilinear transformations,
computations in the continuous time domain, and then a Tustin
Note discretization process.
Tools
141
Position Loop Filters
Single Notch
Under the single notch tab, you will see these parameters:
Specify here the natural frequency [Hz] whose effect you want
the Notch filter to suppress
Check this box if you do not want to manually enter the values
for the “Filter Frequency Specifications” below, and want the
window to calculate them for you
Specify the damping ratio [unitless] for the lightly damped zero
Specify the damping ratio [unitless] for the heavily damped pole
frequency
This filter’s tab’s layout looks much like the Single Notch tab, but has one more field for the user to
specify the low pass filter’s cutoff frequency:
Specify here the natural frequency [Hz] whose effect you want
the Notch filter to suppress
Check this box if you do not want to manually enter the values
for the “Filter Frequency Specifications” below, and want the
window to calculate them for you
Specify the damping ratio [unitless] for the lightly damped zero
Specify the damping ratio [unitless] for the heavily damped pole
Specify the low pass filter’s cutoff frequency [Hz] here frequency
Tools
142
Double Notch
This filter type consists of two notch filters, each of whose resonant frequencies you may specify
separately. The configuration screen for this filter contains two sets of the same parameters listed under
the Single Notch screen (see Single Notch above for the description of the fields):
Low Pass
This filter attenuates frequencies above the cutoff frequency which you specify:
Tools
143
Velocity Loop Filters
In the Velocity Loop filter page, you can configure 1st or 2nd order Butterworth Low Pass filters for your
motor’s feedback and feedforward velocity loops separately:
This indicates
whether a filter is
active on the
Position Loop
Tools
144
Set Gantry Cross-Coupling Gains
This feature is only available if your motor is using the Gantry Cross-Coupled servo algorithm (i.e. when
Motor[x].Ctrl=Sys.GantryXCtrl). This screen shows PID gains for each motor:
“Current” shows which gains are presently in PMAC. “Proposed” are the gains the window suggests for
this pair of motors. “Implement” implements the proposed gains, causing “Current” and “Proposed” to
become the same. “Restore” will revert the effects that “Implement” caused.
This screen shows the block diagram for the Standard servo algorithm in Power PMAC.
This particular screenshot above is from the Standard servo algorithm. If you have chosen any other servo
algorithm, this diagram will change as well. This diagram is disabled if you are using a custom servo
algorithm.
The Servo Block Diagram shows only the Standard servo algorithm. If
you are using any other servo algorithm, this diagram will not apply to
your motor.
Note
Tools
145
Interactive Tuning Guidelines
PMAC’s Servo Algorithm must be configured to properly control any given system with motors and
amplifiers. Configuration is done by adjusting setup structures pertaining to the PID gains. Friction
Feedforward is also needed. The most basic servo loop gains correspond to structures as follows:
The user should connect the load to the motor before tuning the servo
loop.
Note
The process of determining proper values of PID gains is called “Tuning.” The procedure for tuning is as
follows:
1. Set Motor[x].Servo.SwZvInt (Motor xx PID Integration Mode) – can be changed on the fly as
needed
=1, position error integration is performed only when Motor xx is not commanding a move
=0, position error integration is performed always
2. Using the Step Response, tune the following parameters in this order:
Proportional Gain, Kp (Motor[x].Servo.Kp)
Derivative Gain, Kd (Motor[x].Servo.Kvfb)
Integral Gain, Ki (Motor[x[.Servo.Ki)
3. Using the Parabolic Move, tune the following parameters in this order:
Velocity Feedforward, Kvff (Motor[x].Servo.Kvff)
Acceleration Feedforward, Kaff (Motor[x].Kaff )
Friction Feedforward, Kfff (Motor[x].Kfff)
Tools
146
Steps 2 and 3 should be performed in the Interactive Tuning window in Tuning:
Commanded
Position [cts]
Time
[msec]
Now, compare your motor’s actual position to the commanded position profile. Depending how the actual
position looks, adjust the servo loop gains until you achieve the desired response.
Tools
147
Observing the table below, match your actual position response to one of the response shapes below, and
then adjust the appropriate gain as listed next to each plot. In each of the figures below, the vertical axis
corresponds to Commanded Position [cts], and the horizontal axis to Time [msec]:
Overshoot and
Oscillation Position Offset
Cause: Cause:
Too much Proportional Friction or Constant
gain or Force
too little Damping Fix:
Fix: Increase Ki
Decrease Kp Increase Kp
Increase Kd
Physical System
Sluggish Response Limitation
Cause: Cause:
Too much Damping or Limit of the
too little Proportional Motor/Amplifier/Load
gain and gain combination
Fix: Fix:
Increase Kp or Evaluate Performance
Decrease Kd and
maybe add Kp
Typically, one should start by increasing Kp until one observes the “Overshoot and Oscillation” condition
(upper left corner’s plot), and then increase Kd and Ki until the performance goals for the step response
are achieved. Be sure when executing the step response that you plot the Servo Command on the Right
Axis (see red box in image on right below).
Tools
148
Step 3 (Tuning Kvff, Kaff, and Kfff)
Select “Parabolic Velocity” under the “Trajectory Selection” in the Interactive Tuning Window. Select a
move size and speed that will simulate the fastest, harshest moving conditions you expect your machine
to experience. Tune the motor at these settings, and then the motor should be able to handle all easier
moves.
After commanding the Parabolic Velocity move, the commanded Velocity Profile and Acceleration
Profile should look like this:
Velocity Acceleration
Commanded Commanded
Profile Profile
Observing the table below, match your actual position response to one of the response shapes below, and
then adjust the appropriate gain as listed next to each plot. In each of the plots below, the vertical axis
corresponds to Actual Velocity [cts/msec], and the horizontal axis to Time [msec]:
High Vel./F.E.
Correlation
High Vel./F.E.
Cause: Friction
Correlation
Fix:
Cause: Damping
Add Kfff
Fix: Increase Kvff
and/or turn on Integral
Gain (Ki)
High Acc./F.E.
High Acc./F.E. Correlation
Correlation Cause:
Cause: Inertial Lag Physical System
Fix: Limitation
Increase Kaff Fix:
Use softer acceleration
or add more Kfff
Tools
149
Negative Vel./F.E. High Vel./F.E.
Correlation Correlation
Cause: Cause: Damping
Too much Velocity & Friction
Feedforward Fix:
Fix: Increase Kvff first
Decrease Kvff Possibly adjust Kfff
The aforementioned guidelines are just for tuning the PID parameters.
For more details on configuring filters or custom servo algorithms,
please consult the other areas of this manual pertaining thereto, or
check the Power PMAC User’s Manual’s “Setting Up the Servo
Note Loop” section.
Tools
150
Current Loop Tuning
This tab has three subtabs, Simple Auto-Tune, Auto-Tune, and Interactive Tune. The first subtab is
Simple Auto-Tune:
Pull this slider to the right to increase the desired bandwidth of the current loop
Once you have performed the autotuning, you can click this button to perform it again
Adjusts Motor[x].IpbGain
Specify how long to apply the
excitation to the motor when tuning
the current loop
Adjusts Motor[x].IaBias
Press this to start the tuning process
Adjusts Motor[x].IbBias
Press this to remove power from the
motor
Tools
151
Open Loop Test
There are three sub tabs under the Open Loop Test tabs, Step Test, Sinusoidal Test, and Sinesweep Test.
The Step test instantaneously commands first positive voltage to your motor and then negative voltage:
This should produce a plot similar to what follows (this is with two repetitions):
If your encoder feedback is working properly, you should see positive actual velocity (pink) when the
servo command (yellow) is positive, and negative actual velocity when the servo command is negative. If
your actual velocity is the opposite of what the previous sentence describes, try changing the encoder
decode direction of your Axis Interface and rephase your motor (if it is commutated). The encoder decode
for Gate1-Style Axis Interfaces is in Gate1[i].Chan[j].EncCtrl. For Gate3-Style, it is in
Gate3[i].Chan[j].EncCtrl. To reverse the direction, if this structure is a 3, change it to 7, and vice versa.
This only applies to quadrature encoders.
Tools
152
Deactivate your bus power and allow the amplifier’s capacitors to
discharge fully before swapping motor phases (as described
below) in order not to shock yourself. Receiving the discharge of
WARNING bus capacitors can be fatal!
Another way to change your motor’s direction is by swapping two phases of your motor leads and then
rephasing the motor.
Tools
153
The Sinesweep Test applies a sine wave voltage signal to the motor. This signal is different from the
Sinusoidal Open Loop Test in that while the Sinusoidal test remains at a constant frequency, the Sinsweep
test’s frequency increases either linearly or logarithmically (at the user’s choice) over a time span the user
specifies:
“Start Frequency” is the initial frequency [Hz] of the sine signal at the start of the move.
“End Frequency” is the final frequency [Hz] of the sine signal at the end of the move. The signal
should reach this frequency by the end of the “Sweep Time” [sec] you specify in the field
immediately below this one.
“Sweep Time” is the time span [sec] over which the sine wave will be commanded to the motor;
this is the time span over which the sine wave’s frequency will increase either linearly or
logarithmically as specified in the “Sweep Method” parameter two fields below this one.
“Sweep Method” describes the manner in which to increase the frequency of the wave being
commanded to the motor. Selecting Linear will increase the frequency (f(t) below) linearly such
that the frequency change with time (t below) follows the following formula:
where fend is the “End Frequency” you specified, fstart is the “Start Frequency” you specified, and Tsweep is
the “Sweep Time” you specified. Selecting Logarithmic will increase the frequency logarithmically
according to the following equation:
𝑡
𝑓𝑒𝑛𝑑 𝑇𝑠𝑤𝑒𝑒𝑝
𝑓(𝑡) = 𝑓𝑠𝑡𝑎𝑟𝑡 ∙ ( )
𝑓𝑠𝑡𝑎𝑟𝑡
Tools
154
This is an example plot of a linear sweep:
Tools
155
Position Loop Auto Tuning
This tab can automatically tune your motor. This is a good starting point for finding gains that can get
your motor moving. It is recommended, however, to do Interactive Tuning after this in order to achieve
the performance goals you desire.
There are two subtabs on this tab, Simple Auto-Tune and Advanced Auto-Tune. The first is Simple Auto-
Tune:
Click here to start the autotuning Once the autotuning has been
process performed, you can click here to
recalculate the gains
Tools
156
Specify the percentage of the maximum
Advanced Auto-Tune offers you several more options for tuning your motor: permissible output as specified by
Motor[x].MaxDac
Select the type of control signal Specify the amount of time to apply
your amplifier receives here voltage to the motor during the test
Tools
157
Trajectory Prefilter Setup
The Trajectory Prefilter Setup permits you to enable the Trajectory Prefilter feature of Power PMAC and
configure whether to use it as a Notch Filter, a Low Pass Filter, or both, as there are two filters available
which you can apply to your trajectories. The Trajectory Prefilter filters any trajectory that PMAC
generates before commanding it to the motor in order to prevent low frequency oscillations from
occurring at your machine’s end effector. The Setup screen appears as follows:
Select what kind of filters you want to use for the two filters
The filter coefficients offered. Then, for Notch, type the resonant frequency [Hz] you
currently in PMAC are want to filter in the box. For Low Pass, type the cutoff
in the Actual column frequency [Hz] in the box Click this button to
and the coefficients that automatically calculate
the Prefilter Setup tool the filter specifications
calculates are listed based on the frequency
under the Proposed you entered to the left
column
Clicking “Show Prefilter Block Diagram” shows this screen, demonstrating the algorithm used for the
prefilter:
Tools
158
Adaptive Control Setup
The Adaptive Control Setup tab contains parameters related to setting up Adaptive Control:
Just type in the parameters you want in order to configure Adaptive Control and then click “Set Adaptive
Control” to enable the feature. Click “Restore to Regular Servo” to remove the feature. Click “ON” to
turn the feature on, or “OFF” to turn it off.
Tools
159
Interactive Filter Setup
Selecting the “Interactive Filter Setup” tab on the Position Loop Interactive Tuning window will open up
the following screen:
On the “Specify Position and Velocity Loop Filters” tab, you can choose which filters to add to your
system, and then select the associated parameters for those filters by either typing in the parameter, or by
adjusting the parameter by using a slider. At the bottom of the screen, you can choose various move
trajectories to execute on this motor in order to test your filter. With this tool, you can interactively adjust
your filters and observe their effects easily and flexibly.
Tools
160
The “Specify Trajectory Prefilter” tab shows similar settings, permitting you to select various types of
prefilters, adjust their associated parameters, and then execute moves at the bottom of the screen in order
to observe the effects of the filters:
Tools
161
Gain-Scheduled Adaptive Control Setup
Gain Scheduled adaptive control is a variation of the adaptive control algorithm. In the standard adaptive
control algorithm, the control gains are updated such that the closed loop bandwidth of the system
remains the same (i.e. the same closed-loop performance) when the overall estimated gain changes (i.e.
when the load changes).
In the gain-scheduled adaptive control algorithm on the other hand, the control gains are updated such
that the closed loop bandwidth and the damping ratio change in a linear fashion depending upon the
estimated gain or load changes.
The setup parameters Estimation Minimum DAC and Estimation Time are the same as in standard
adaptive control. The user has to specify the minimum plant gain (i.e. at maximum inertia), the maximum
plant gain (i.e. at minimum inertia), the desired bandwidth, and desired damping ratio corresponding to
the two cases above.
Tools
162
Cam Learning Control Setup
Cam learning control algorithm is a spatial (position-based) iterative control algorithm where the torque
compensation table for a target motor following its source cam table is automatically filled. The control
law is a proportional learning control law and is given as:
where k is the cycle number for the cam profile, ULC(k) is the control effort at cycle k, KLC is a
proportional learning gain, and e(k) is the following error at cycle k. Note that the above control law is an
integrator in the cyclic base; that is, if the disturbances acting on the target motor are not time varying, it
will eliminate the following errors at steady state.
The user has to specify the source cam table, the learning gain, the minimum error in terms of motor
units, and the maximum compensation torque. The software checks if there are active cam tables and
populates the combo box accordingly.
The minimum error acts like a dead zone in that the torque compensation table value for a cam zone will
stay the same if the following error at the specific zone is less than this value at the last iteration.
The maximum compensation DAC specifies the maximum and minimum values for the torque
compensation table values.
The cycle time specifies the time for the total cam profile in terms of seconds.
The live tuning feature allows the user to tune the learning gain via providing the maximum and RMS
following error values for each cycle.
Tools
163
Terminal Window
The Terminal Window is a text parser into which the user can enter commands to send to PMAC. The IP
address of the device to which this window is presently talking is displayed at the top of the window
(surrounded by a red box in the image below):
Type the command you want to send into the command entry box and press the Enter key on your
keyboard to transmit the string to PMAC.
If your command produces a response from PMAC, the Terminal Window will show the response.
You can copy text from the window by highlighting it with your mouse and pressing CTRL+C on your
keyboard. If you want to select all of the text in the window, click on the window and press CTRL+A,
and then CTRL+C to copy it.
You can paste text into the text parser by clicking in the command entry box and pressing CTRL+V on
your keyboard.
You can also drag and drop commands from the Editor Window or the Watch Window into the command
entry box of the Terminal Window.
If there is a command about which you want more detail, you may type it into the command entry box
and press the F1 key on your keyboard.
You can kill all motors by clicking on the command entry box and pressing CTRL+ALT+K on your
keyboard.
If you want to save the whole contents of the Terminal Window, right-click the window and then click
PropertiesControlSave Buffer to File. You can also copy the contents to your operating system’s
clipboard by clicking PropertiesControlCopy Buffer to Clipboard. If you want to clear the contents
of the Terminal Window, click PropertiesControlClear Buffer.
Tools
164
There are more properties you can modify by right-clicking the window and then clicking
PropertiesControlGeneral, which opens this screen:
Tools
165
You can change the device to which this window speaks by right-clicking the window, clicking on
PropertiesDevice, and then you can change the IP Address listed in the Device Properties box that pops
up:
Once you have changed the IP Address to that which you want, click the “Test” button to see if you can
connect successfully, and then click “Apply” if the test was successful.
You can change the color scheme and fonts of the window by right-clicking the window and then clicking
on PropertiesAmbient. This window will pop up:
In this window, you can change the text’s font and the colors of various types of commands and responses
as desired.
One or more commands may also be inputted by selecting them in a text file, whether from the Editor
Window or an external program (e.g. Notepad or Microsoft WordTM), and drag-dropping them into the
command text box of the Terminal Window.
Tools
166
Position Window
The Position Window can show either position, velocity, and following error for your motors, as shown
below:
To put three of these windows into your IDE workspace and enable one of them to show position, one to
show velocity, and one to show following error, is useful and common for simultaneously monitoring
these quantities.
You can change a Position Window into a Velocity Window or a Following Error Window by right-
clicking the window, clicking on Type, and then on Position, Velocity, or Following Error depending on
what you want to show (see the screenshot below):
You can change the number of motors that is being displayed by right-clicking the window and then
clicking PropertiesControlGeneral, which shows this window:
The “NoOfMotors” field indicates how many motors to show on the Position Window. The
“UpdatePeriod” field shows how often, in units of msec, to refresh the data in the window.
Tools
167
By default, the Position Window shows the motor’s position in units of motor counts, the Velocity
Window shows the motor’s speed in units of motor counts/msec, and the Following Error Window shows
the motor’s following error in units of motor counts. However, you can change this by right-clicking on
the window and then clicking PropertiesControlMotor Specific, which shows this window:
You can select your motor number with the control labeled “Motor Number.” The table below describes
the functionality of each field below “Motor Control:”
You can change the color scheme and fonts of the window by right-clicking it and then clicking on
PropertiesAmbient, which opens this screen:
Tools
168
You can also choose which device to which this window communicates by right-clicking the window and
then clicking PropertiesDevice, and then you can change the IP Address listed in the Device Properties
box that pops up:
Once you have changed the IP Address to that which you want, click the “Test” button to see if you can
connect successfully, and then click “Apply” if the test was successful.
You can change the motor-specific control properties of one or more motors simultaneously by Ctrl-
clicking to select them in the Position Window before going to the Properties window. Motors may be
deselected by Ctrl-clicking them again in the Position Window. If no motors are selected, changes may
be made by selecting a motor using the control labeled “Motor Number.”
Tools
169
Watch Window
You can put commands and variables into the Watch Window in order to monitor their value at the rate
you specify. By default, the Watch Window consists of four columns as shown below:
If you input a valid command, the IDE transmits the command you
type into the “Command” column repeatedly. Make sure you are
sending a safe command or add some more commands to the “Unsafe
Commands List” by right-clicking the window and clicking
Caution PropertiesControlEdit Unsafe Commands. Some examples of
typical unsafe commands are kill, $$$, save, out, etc.
Click in the text entry box underneath “Command” and type the command or variable name you want to
monitor and press Enter. The response, if there is one, will be shown in box underneath “Response.”
If you want to duplicate one line, right-click the line and drag it down to an empty row. If you want to
delete a row, select the row and press the Delete key on your keyboard.
You can also drag and drop commands from the Editor Window, the Terminal Window, or a text file
from an external program (e.g. Notepad or Microsoft WordTM) into the command entry box of the Watch
Window. Multiple commands may be dragged and dropped into a Watch Window command row box in
order to create many new entries at once.
Tools
170
If you want to send a valid command once: mark the checkbox in the “Click to Send” column, click in the
text entry box underneath “Command”, type the command, press Enter, and then push the button in the
“Send Once” column.
You can change some general properties of the Watch Window by right-clicking the window and then
clicking PropertiesControlGeneral, which opens this window:
Tools
171
There are two fields in the “Control Properties” box:
“DisplayComment” [True/False], when set to True, will show an additional column in the Watch
Window in which you can write your own personal notes to annotate that row, as shown in the
example screenshot below:
There are many other features of the Watch Window which can be accessed by right-clicking the window
and then clicking PropertiesControl as shown below:
Tools
172
This menu contains 7 commands whose functionality is described in the table below:
Command Functionality
Insert Variable Adds a new row to the Watch Window
Save Watch Table Saves the variables entered into the Watch Window into a *.wtb file
Restore WatchTable Loads a *.wtb file (see Save Watch Table)
Clear All Variables Clears all variables entered into the Watch Window
Display Format Opens a new dialog box to change how the data is displayed in the Watch
Window (see Display Formatting below)
Edit Unsafe Commands Opens a file called “unsafecmdfile.txt” to which you can add unsafe
commands. Add each command on a new line. The Watch Window will then
not transmit these commands to the PMAC.
Sort Command Column Upon clicking this the first time, the Watch Window will sort the commands
you have entered alphabetically top-to-bottom. Clicking this again will sort it
alphabetically bottom-to-top, and so on.
Tools
173
Display Formatting
You can change how the data in the Watch Window is displayed by right-clicking the Watch Window and
then clicking PropertiesControlDisplay Format, which opens this window:
Under the “Display Filter” heading, there are six options for how to format the numbers shown in the
Watch Window for this entry:
“None” will not affect the formatting of this entry; the entry will be shown in its default data type
formatting
“Integer” will force the number to be a whole number. You can enter a scale factor for your data
in the “Scale Factor” box if desired:
“Float” will force the Watch Window to display fractional information for this number. You can
enter a scale factor in the “Scale Factor” box and also specify the number of decimal points in the
“Decimal Places” box:
Tools
174
“Hex” will force the number into a hexadecimal format. You can enter a scale factor into the
“Scale Factor” box and also a mask in the “Mask” box:
The number you enter into the “Mask” box needs to be in hexadecimal format preceded by the
symbol “0x” (without the quotation marks). The IDE will then bitwise “AND” this mask with the
response before displaying it in the Watch Window.
“Binary” will show the number as a sequence of bits indicate by 0s and 1s. You can enter a scale
factor in the “Scale Factor” box and also a numerical mask in the “Mask” box:
The number you enter into the “Mask” box needs to be in hexadecimal format preceded by the
symbol “0x” (without the quotation marks). The IDE will then bitwise “AND” this mask with the
response before displaying it in the Watch Window.
You can also adjust the number of bits to display in the “# of bits to display” box and the index of
the least significant bit (LSB) in the “Starting bit index” box. The Watch Window will shift right
your data the number of bits in the “Starting bit index” box and truncate any number of bits
greater than the “# of bits to display.”
If you check “Add “.” after every 4,” then there will be a comma between each group of 4 bits
when displaying your binary number in the Watch Window’s Response column.
Tools
175
“Octal” will force the number into a base-8 numerical format. You can enter a scale factor in the
“Scale Factor” box and also a numerical mask in the “Mask” box:
The number you enter into the “Mask” box needs to be in hexadecimal format preceded by the
symbol “0x” (without the quotation marks). The IDE will then bitwise “AND” this mask with the
response before displaying it in the Watch Window.
Tools
176
You can change the color scheme and fonts of the window by right-clicking it and then clicking on
PropertiesAmbient, which opens this screen:
You can also choose which device to which this window communicates by right-clicking the window and
then clicking PropertiesDevice, and then you can change the IP Address listed in the Device Properties
box that pops up:
Once you have changed the IP Address to that which you want, click the “Test” button to see if you can
connect successfully, and then click “Apply” if the test was successful.
Tools
177
Safety Notes
As previously stated, if you input a valid command, the IDE transmits the command you type into the
“Command” column repeatedly. Make sure you are sending a safe command or add some more
commands to the “Unsafe Commands List” by right-clicking the window and clicking
PropertiesControlEdit Unsafe Commands. Some examples of typical unsafe commands are kill, $$$,
save, out, etc.
If you transmit an invalid command, the Watch Window will only transmit the command once and then
the invalid response will be highlighted in red and will remain in the response area of the Watch Window
and will not be transmitted again.
Note that there is a structure named Sys.NoShortCmds which will force the user to input the full name of
online commands. If Sys.NoShortCmds=0, you can type in, for example, #1k to kill motor 1. If you set
Sys.NoShortCmds=1, you must type, for example, #1kill to kill motor 1; you must give it the full name.
This feature can be useful because, for example, if you type an invalid variable name containing a k (as in
the kill command), or r (as in the run command), or j (as in the jog command), or a (as in the abort
command), then the Watch Window will transmit that invalid variable name and the PMAC will parse it
and try to execute whatever command it can recognize within the invalid variable name. For example, if
you have no valid variable named “MyVar” declared in the entire project, or if you had it formerly there
but deleted it, but you still put “MyVar” into the Watch Window or transmit “MyVar” in a string from
your HMI program communicating with PMAC, PMAC will interpret this as first an abort command
because of the a in MyVar, and then a run command, because of the r in MyVar.
Tools
178
Status
The Status Window actually contains five tabs, each giving the status of a different set of information:
Motor Status
The first tab is the Motor Status tab, which gives status information about motors. Each status field name
listed in the Description column comes from a motor status structure. The full name of the motor status
structure starts with “Motor[x].”, where x is the motor number, and ends in the name listed in the
Description column of the Motor Status Window. For example, in the Description column, the first entry
is TriggerMove, which corresponds to the Motor[x].TriggerMove structure. For example, for motor 1,
this is Motor[1].TriggerMove.
You can select which motor whose status to monitor by typing the motor number into the box next to the
“Motor” label as shown below:
The dot to the right of this box shows whether the motor is activated: when green, the motor is activated;
when red, the motor is not activated.
Tools
179
Coordinate Status
The second tab is the Coordinate Status tab, which gives status information about Coordinate Systems.
Each status field name listed in the Description column comes from a Coordinate System status structure.
The full name of the motor status structure starts with “Coord[x].”, where x is the Coordinate System
number, and ends in the name listed in the Description column of the Motor Status Window. For
example, in the Description column, the first entry is TriggerMove, which corresponds to the
Coord[x].TriggerMove structure. For example, for Coordinate System 1, this is Coord[1].TriggerMove.
You can select which motor whose status to monitor by typing the motor number into the box next to the
“Coordinate System” label as shown below:
Tools
180
Global Status
The third tab is the Global Status tab, which give status information about configuration settings which
affect PMAC globally:
Each status field name listed in the Description column comes from a System status structure. The full
name of the motor status structure starts with “Sys.” and ends with the name in the Description column.
For example, the first entry in the Description column is “NoClocks,” which corresponds to the
Sys.NoClocks structure.
Tools
181
MACRO Status
The fourth tab is the MACRO Status tab, which gives information about MACRO communication if
MACRO is being used with this system.
Each status field name listed in the Description column comes from a MACRO status structure. All of the
entries in the Description columns except for PwrOnErrCntr and RingBrkStationNum come from the
Macro.Status[x] structure tree, where x is the ring number, which ranges from 0 to 3. For example, the
first entry is Active, which for ring 0 corresponds to the structure Macro.Status[0].Active.
PwrOnErrCntr and RingBrkStationNum correspond to Macro.RingTest[x].PwrOnErrCtr and
Macro.RingText[x].RingBrkStationNum, respectively, where x is the ring number, which ranges from
0 to 3.
You can select your ring number by typing the number into the box labeled “Ring No” as shown below:
You can select your station number by typing the station number into the box labeled “Station No” as
shown above.
The “Type” label indicates what kind of MACRO Station the device to which the Status Window is
presently talking is. Typically, this will be a Power PMAC Ring Controller, but it can also be a Power
PMAC Master and not necessarily a Ring Controller, depending on how your controller is configured.
Tools
182
ECAT Status
The last tab is the ECAT Status tab, which gives information about EtherCat communication if it is being
used with this system.
This window provides information about both the EtherCAT Master and the Slave. You can select your
EtherCAT ring number by typing it into the box labeled “EtherCAT No” as shown below:
You can selec the Slave number by typing it into the box labeled “Slave No” as shown above.
The “Type” label describes what kind of EtherCAT device the device to which this Status Window is
speaking is. In the screenshot above, “Type” shows “N/A,” indicating that this device is not EtherCAT-
capable. If it is EtherCAT-capable, it will indicate whether you are communicating with an I/O device or
an amplifier.
Tools
183
Errors Display
The Error Display window displays all errors that Power PMAC reports and appears as follows:
This window starts the background process “geterrors” in Power PMAC. This window reports not only
errors, but also certain status updates which Power PMAC reports.
Right-clicking the window and going to PropertiesControlClear Errors will permit you to clear all of
the information presently shown in the Error Display window:
Going to “General” opens a screen containing several properties of the Error Display window:
For the four masks, just click on the row containing the mask and the button will appear
Tools
184
You can change the color scheme and fonts of the window by right-clicking it and then clicking on
PropertiesAmbient, which opens this screen:
You can also choose which device to which this window communicates by right-clicking the window and
then clicking PropertiesDevice, and then you can change the IP Address listed in the Device Properties
box that pops up:
Once you have changed the IP Address to that which you want, click the “Test” button to see if you can
connect successfully, and then click “Apply” if the test was successful.
Tools
185
Unsolicited Messages
The Unsolicited Messages window displays messages sent to the host computer from Power PMAC over
the eight Unsolicited Response ports (Ports 0 – 7):
These messages can be sent from a C program using the Send() function or from a Script program using
the SEND command. The host PC can also send messages to Power PMAC through these ports. Upon
opening this window, the “sendgetsends” process starts on Power PMAC, which receives all of the
messages. In the IDE, Port 0 is enabled at startup; Ports 1 – 7 are disabled. After sending a command
from the host to Power PMAC, the status of the port must be checked. Possible status codes include the
following:
You can clear the messages by right-clicking in the window and selecting PropertiesControlClear
Messages:
Tools
186
Selecting “General” opens a window containing several properties of the Unsolicited Messages window:
Buffer0, when True, will cause the window to read messages on Port 0
Buffer1, when True, will cause the window to read messages on Port 1
Buffer2, when True, will cause the window to read messages on Port 2
Buffer3, when True, will cause the window to read messages on Port 3
Buffer4, when True, will cause the window to read messages on Port 4
Buffer5, when True, will cause the window to read messages on Port 4
Buffer6, when True, will cause the window to read messages on Port 4
Buffer7, when True, will cause the window to read messages on Port 4
ActivateSendPort, when True, permits the PC to send message to PMAC via the ports
Logfilepath indicates where the log file is stored (see below)
LogUnsolicited, when true, will log this window’s contents in the file at Logfilepath
SendPortNumber indicates which port the PC should use for sending messages to PMAC
Each bit of the “mode word,” Sys.SendFileMode, can be set to 1 to enable or to 0 to disable sending and
receiving ASCII strings on each port. Each bit in this 8-bit word represents one port. For example, to
enable all ports, set Sys.SendFileMode=$FF. To enable just Port 0, set Sys.SendFileMode=$1.
Selecting “Ambient” loads the following window where font and color can be chosen for each Port’s text:
Tools
187
Download Firmware
Under the “PowerPMAC Firmware” tab, click the “Download Firmware” button. On clicking the button
it will ask whether it is acceptable to issue $$$*** (Global Reset) before updating the firmware. If you
click “Yes,” then the Power PMAC will be reset to factory default. It will then prompt you to browse for
the firmware file you want to download. It is recommended to issue $$$*** and make sure that the Power
PMAC is at factory default stage before downloading firmware, because the firmware download process
does not kill the C background programs that are already executing. In this case, the firmware update
process may not update all the files.
Tools
188
The firmware filename should be “powerpmac.deb”:
Wait for the IDE to finish downloading the firmware file and then for Power PMAC to reboot. If it does
not reconnect successfully after rebooting, click “Communication Setup” (see the red box in the image
below):
Then, click “Apply” (see the red box in the image below):
If you still cannot communicate, cycle power on the UMAC rack and use the “Communication Setup”
again until you can connect.
Tools
189
Tools
190
Firmware update procedure for Hypervisor based PowerPMAC
Updating firmware on a Hypervisor computer hosting Power PMAC has a slightly different procedure.
The steps are as follows:
1. You must be logged onto the computer hosting Power PMAC. Remote SSH sessions do not
support firmware updates. If the IDE is running remotely using a remote SSH session, then you
will get the following message:
2. Once logged into the host computer either locally or using a remote desktop login session, the
user can use the regular procedure to update firmware.
Tools
191
Encoder Conversion Table
The Encoder Conversion Table (ECT) window is for setup purposes and should only be used by advanced
users. Its purpose is to configure the fields within the EncTable[x] structure. The main tab of the ECT
window appears as follows:
This box selects which entry number to use
This button downloads the selected ECT entry to PMAC
You can refresh the information on this window by right-clicking and selecting
PropertiesControlRefresh:
If you select “Clear Messages,” the information in the output area at the bottom of the window will be
cleared.
Tools
192
Selecting “General” will show a screen showing some properties of the ECT window:
LogAllMessages, when true, will cause debug messages, such as errors and exceptions)
from the ECT window to be printed in the main Output window of the IDE (the Delta Tau
Log window)
ShowEncoderZero, when true, will treat Motor 0’s encoder as a real encoder, permitting
the user to use ECT entry 0 as a standard entry. By default, Motor 0 is a “phantom motor,”
and as such its associated ECT entry is not treated like a standard entry by default.
Clicking “Ambient” permits you to change font colors and sizes as shown:
Clicking “Device” brings up the Device dialog, permitting you to change which IP address to which the
IDE is talking:
Tools
193
Clicking the “PowerPMAC Structure” tab shows the following:
This tab displays all of the fields of the EncTable[x] structure which you can configure through this tab.
Just type in the value to which you want to set the field you want to modify. For more detail on what each
field does, please refer to the Power PMAC Software Reference Manual.
Clicking the “Encoder Plot” tab displays a scope of the presently selected Encoder Conversion Table
entry’s output (Not yet implemented):
You can start and stop the ECT scope by clicking the Start and Stop buttons, respectively. Right-clicking
on this tab will show a number of properties you can adjust:
Selecting Copy will copy the plot image to the Windows clipboard
Save Image As will open a dialog box to save the plot area as an image
Page Setup opens a dialog box to format the output size and orientation for printing
Show Point Values displays the numerical value of points on the plot
This button zooms in and zooms out when clicked, depending on the previous zoom state
Tools
194
Setup Variables
The Setup Variables screen permits you to monitor or modify variables in Power PMAC which are related
to global system setup, motor setup, coordinate system setup, encoder conversion table setup, or the setup
of specific accessories in the system:
This button saves your system’s setup
This button opens a configuration file you variables to a file which can be easily Click here to search for the structure you
have saved previously, containing setup loaded later from this window typed into the “Find” bar to the left of this
variables for configuring your system button
Tools
195
Compensation Table Setup
The Power PMAC Comp Table Setup window is used for setting up Compensation Tables in Power
PMAC (i.e. the members of the CompTable[x] structure). PowerPMAC Compensation Tables can be
configured for 1D, 2D or 3D compensations. The main window for a 1D Compensation Table appears as
follows:
Source
Motor
Positions
Tools
196
A 2D Compensation Table appears as follows:
Source
Motor #2
Positions
The 3D Compensation Table design is still in development and will be supported in the next release of the
IDE.
Tools
197
The Comp Table Setup grid contains three sections:
A. Configurable items in the property grid are categorized into three sections:
1. The “CompTable Configuration” includes the following items:
a) Comp Table Number: runs from 0 to 255.
b) Comp Table Dimension: allows the user to select the dimension of the Compensation
Table from three choices: 1D-Linear; 2D-Planar or 3D-Volumetric.
c) Source Motor: Depends upon the dimension of the Compensation Table: 1 for Linear,
2 for Planar and 3 for Volumetric. User has the option to select the motor number for
each source motor. For 1D, only SourceMotor1 is displayed; 2D, SourceMotor1 and
SourceMotor2; 3D, SourceMotor1–SourceMotor3.
d) Number of Targets: Power PMAC Compensation Tables support up to 8 target
addresses. The number of targets depends on the correction type. The correction type
“Actual Position – Inner and Outer Loops” requires two addresses for each target
motor, yielding a maximum of 4 target motors. All other correction types require
only one address for each target motor and therefore support up to 8 motors.
Depending on the number of targets, the grid will show TargetMotor1,
TargetMotor2, …, up to TargetMotor8.
e) Correction Type: There are 6 different types of corrections as shown below:
Note that the “Actual Position - Outer and Inner loops” option requires two addresses
for each target motor. All other types require only one address for each target motor.
f) Target Motors: specify the motor number for each target.
2. “Data Properties” grid items include three parameters for each dimension:
a. “First Data Point” is the table’s starting point in motor units in the given dimension.
b. Total Span specifies the length of the compensation table in motor units.
c. “Number of Zones” is equal to the number of sections between the First Data Point
and the Last Data Point, which can be computed as (First Data Point + Total Span).
3. “Comp Table General Properties” include:
a. Interpolation method: Linear or cubic.
With linear (first-order) interpolation, the correction in the dimension of the source is
calculated as a linear fit between the points on either side of the present position. It
can have sudden changes in slope as it passes a point in the table, which may result in
noticeably rough motion.
With cubic (third-order) interpolation, the correction in the dimension of the source is
calculated as a cubic fit using two points on either side of the present position. The
slope of the correction is always continuous, yielding smooth motion. This
interpolation takes about twice the calculation time of first-order interpolation.
Tools
198
b. Rollover: If set to True, then the first and last point correction will be forced to be the
same. If not specified, or a number different from the first point’s value is entered as the
last point, then the correction at the last point is automatically set to the value at the first
point.
B. Data Values for each Dimension
Based on the Data Properties grid items, enter data values at equally spaced points
between first and the last point.
For 1D Tables, a 1D list of points is generated. Each correction value you enter into the
list corresponds to the CompTable[n].Data[i] structure, where n specifies the
Compensation Table number and i specifies the 1st dimension point index.
For 2D Tables, a 2D Data Grid is generated. Each correction value you enter into the 2D
grid corresponds to the CompTable[n].Data[j][i], where n specifies the Compensation
Table number, j specifies the 2nd dimension point index and i specifies the 1st dimension
point index.
C. At the bottom of the screen, three buttons are provided for the user’s convenience to achieve the
following tasks:
1. Load Data prompts the user to open a data file corresponding to a previously configured
Compensation Table. If the dimension in the property grid and data values (given by a
comma separated file) match, then the values are appropriately added in the data grid.
2. Download allows the user to download complete Compensation Table configurations and
data values to Power PMAC. This should be done after the Table is crafted using this tool.
3. Upload button uploads Table number n corresponding to the table selected in the
CompTableNumber field and its data values from Power PMAC and displays the complete
configuration on the screen.
Ambient Properties: The Log window’s appearance is configurable through the Ambient Properties
page, which can be accessed by right-clicking anywhere on the Comp Table Setup window except in the
Log space itself, and then selecting Ambient. Background Color, Font and Color for normal messages as
well as Error messages can be configured. The window appears as follows:
Tools
199
Control Properties: Allows the user to configure whether to display or hide normal messages. Error
messages are always displayed even if this flag is set to False. This window can be accessed by right-
clicking anywhere on the Comp Table Setup window except in the Log space itself, and then selecting
Control. The window appears as follows:
Tools
200
Backup Restore
The Backup Restore window has four pages: Backup, Restore, Verify, and Recovery Disk.
Backup page
In the first of four main pages “Backup,” the screen looks like the following:
1. The first screen that appears when you click on Backup Restore, there are two radio buttons. The
first (i.e. the “Typical” backup) makes a backup of all PMAC-related settings and files. The
second button (i.e. the “Disk Image” backup) makes a backup of all PMAC-related settings and
files, plus the Linux operating system.
2. If the Disk image option is selected, the main page displays all possible local USB drives as well
as shared drive son the host computer for the destination of the image like show below:
Tools
201
If the selected drive is a shared folder on the host computer, then it requires login credentials for
the shared drive to mount that folder on power PMAC before we can create image on this
destination. The credentials screen appears like below:
Clicking on the Backup Tab shows only one option: “Save PowerPMAC active parameters before
backup.” If checked, the Backup Restore program will back up not only what has been
downloaded to Power PMAC, but also what has been typed in or changed since the last
download.
3. In addition to the Typical backup and Disk Image options, the above screen allows user to
manage previously created project restore points “usrflash.x” like shown below:
If the previous restore points are occupying large space in Power PMAC and the save process
fails due to lack of space on the Hard Disk, then user has the option to delete previous restore
points to free space on the Hard Disk by clicking the Delete button next to the restore point. Note
that Power PMAC automatically creates a restore point every time the save command is issued.
Tools
202
Upon pressing Delete, you will see a dialog like the following:
Note:
1. For the CPU type “x86,Hypervisor” there is no need for previous restore points and therefore are
not listed in the above screen.
2. The Disk Image option is not needed and therefore is hidden from the main screen when
communicating to a CPU type “x86,Hypervisor.”
Restore page
Clicking on the “Restore” button shows this screen:
The Restore screen has different choices for different CPU types. For CPU types “PowerPC,460EX” and
“PowerPC,XPM86xxx”, this screen offers 4 choices:
1. Firmware, project, setup parameters and kernel restore from a .tar file backup/
2. Regular restore, plus restores network settings. If selected, this will replace your IP Address, Subnet
Mask, and Default Gateway settings with those from the backup configuration in addition to
firmware, project, setup parameters and the kernel.
Tools
203
3. In the third choice user can restore project only files from previously saved restore points. Remember,
these restore points are already stored on Power PMAC:
4. The fourth choice allows you to restore complete image of the system from a previously saved disk
image either stored locally on a USB disk or a shared drive on the host computer:
Note: Similar to the Backup screen, for the CPU type “x86,Hypervisor”, there are no previously saved
restore points and therefore 2nd and 3rd options are disabled for this type of CPU.
If the selected drive is a shared folder on the host computer, then it requires login credentials for that drive
to mount that folder on Power PMAC before it can restore the image from the source disk.
Tools
204
Clicking “Proceed” will cause the program to prompt you to browse for the backup file. It wants a “.tar”
backup file that was generated using the Backup Restore program previously.
Verify page
Clicking on the “Verify” button shows this screen:
This screen allows you to compare either the Active or the Saved configuration in your Power PMAC
against a backup file that has been previously created. Clicking “Proceed” will show you the differences
between these two configurations highlighted in blue as shown below:
Further, this page now has a program implemented to generate the difference in the files.
Tools
205
Recovery Disk page
The final main page is “Recovery Disk.” On this page, you can create a recovery disk that can be saved to
a USB or SD drive for restoring various settings on Power PMAC. The functionality of this tab depends
on the recovery option you select under the “Recovery Option” field. If you select “PowerPMAC
Firmware Install,” you must insert a USB or SD drive into the PC operating the IDE and then select a
firmware file (with .deb extension) on the PC to be installed into PMAC. For all other options, you must
be connected to a Power PMAC, and must insert the USB or SD drive into the Power PMAC. The tab
looks like this:
Tools
206
Jog Ribbon
The jog ribbon permits you to jog your motors one by one or your axes one by one. A jog move is simply
a point-to-point, constant velocity move. If you want to jog one motor in motor units, click on the “Jog
Motor” command.
Jog to a specified
absolute location Jog in the motor’s Jog in the motor’s
positive direction negative direction Zeros the motor’s
continuously while continuously while position
held held
Select the motor
you want to jog
Check to jog Deactivate the
Specify the location in incrementally, not amplifier channel
motor units to which to continuously corresponding to
jog when using the this motor
“JogTo” button
If “Jog
Closed-loop stop Incrementally” is
jogging. checked, input the
Equivalent to a J/ distance to jog here
command.
Tools
207
If you have already defined the axis definition statement for an axis, you can click on the “Jog Axis” tab
to jog that axis. Just select the coordinate system number under the “CS” dropdown menu, and then the
axis that you want in the dropdown menu beneath that one.
Deactivate the
amplifier channel (s)
corresponding to this
Select the axis you Check to jog
axis
want to jog incrementally, not
continuously
Specify the location in
axis units to which to If “Jog
jog when using the Closed-loop stop Incrementally” is
“JogTo” button jogging. checked, input the
Equivalent to an distance to jog here
abort command.
Commands
This menu option simply permits you to kill all motors if you wish. This is equivalent to issuing a
CTRL+ALT+K command in the Terminal window.
Tools
208
PROJECT SYSTEM
File Organization
Layout
Projects in the Power PMAC IDE are organized into a series of folders which can be navigated within the
Solution Explorer, which by default is the farthest right window in the IDE. You can open it again by
clicking ViewSolution Explorer from the main IDE screen, or press CTRL+ALT+L. The Explorer
appears as follows:
Project
System
209
Opening Project
You can open a new project or open an existing project by selecting File New or File Open menu as
shown in the picture.
PowerPMAC project template the general template can be used for any type of PowerPMAC.
PowerBrick_LV project template is specific to PowerBrick LV. This template provides the required
subprograms for PowerBrick LV stored under libraries folder.
Adding Projects
You can actually add a whole project to the current solution by right-clicking the solution’s name and
then clicking Add, then New Item or Existing Item to add a new or existing project:
Project
System
210
Adjusting File Properties
You can right-click any file, click Properties, and then see its properties. For example:
The Build Action box can be set to either Compile, Content, Embedded Resource, or None. For Script
Files, none of these options have any effect. For C program files (*.c file extension), setting this to
Compile will cause the file to be compiled. Any other setting will cause the file not to be compiled. All C
header files (*.h file extension) should be set to Content to be linked with the *.c files but not themselves
compiled.
By default the Solution configuration is in Release Mode. If the C-App or Script PLC is required to be
debugged, set the solution configuration to Debug Mode. Debug mode generates a bigger binary file size
and may fill up the PowerPMAC disk. It is a good practice to compile final version of the project in the
Release Mode to save space on the PowerPMAC.
Project
System
211
Second step to build and download your project to PMAC, just right-click your project’s name and click
“Build and Download All Programs” as shown below:
This will download the entire project to Power PMAC. You can also download only selected Script files
if you want by selecting the file (Shift+Click to select multiple files) and then select “Download Selected
Files.” The screenshot below shows, for example, downloading just PLC 1:
However, you must have already built and downloaded the entire project in order to be able to download
selected files. This is because the IDE must compile the C programs and map all variables as a whole; this
cannot be done individually. After the whole project is built and downloaded, you can download
individual files. The “Download Selected Files” feature is intended for development purposes, e.g.
making several iterations of changes to just one file, testing these changes without having to download the
whole project again.
Project
System
212
The C Language Folder
Background Programs
This folder contains the files for background C programs. These are applications that run in the free
background time of Power PMAC. You can add a new C application by right-clicking the Background
Programs folder and then clicking “Add a new Background C Application”:
Then just name the application and the IDE will create a new folder for that application’s source code
files underneath the Background Programs folder.
If you want the application to run at startup, right-click the application’s subfolder (e.g. called “capp1” in
the screenshot above), click Properties, and then in the Properties Window, select “Yes” in the “Run at
startup” field, as shown below:
CPLCs
This folder contains other folders which contain Background C PLCs (BGCPLCs) and Real-Time
Interrupt CPLCs (RTICPLCs). If you want to add a new BGCPLC, right-click the CPLCs folder and click
“Add a new User CPLC Project”:
Then select the new BGCPLC’s number and the IDE will create a new folder for that BGCPLC’s source
code.
You cannot add a new RTICPLC folder because only one RTICPLC is permitted in PMAC. You can find
it under the folder labeled “rticplc” under the “CPLCs” folder.
Project
System
213
Include
The Include folder contains C header files (*.h) which can be included by any of the C program files
(*.c).
Libraries
The Libraries folder contains subfolders which contain libraries you have written or included. If you want
to create a new subfolder for your library, right-click on Libraries and select “Add a new C Library
Project”:
Just name your library and the IDE will create a new subfolder in which you can put your source (*.c) and
header (*.h) files.
Realtime Routines
The Realtime Routines folder contains the source and header files for user-written servo and phase
algorithms. The source file is called usrcode.c and the header file is called usrcode.h.
usrcode.c contains the functions used in user-written servo and phase algorithms. usrcode.h contains the
prototypes of these functions and exports the functions as symbols. Please refer to the section of the
Power PMAC User Manual called Writing C Functions and Programs in Power PMACUser-Written
Phase Routines and User-Written Servo Routines for more details on how to write these files.
To learn how to associate motors with these routines, please see the section labeled “Configuring User-
Written Servo and Phase Algorithms” below.
Project
System
214
The Configuration Folder
This folder contains files which control what is run upon downloading your project to PMAC, upon
booting up PMAC, and upon issuing the save command. As of version 1.7.x.x of the IDE, its contents
appears as follows:
pp_custom_save.cfg
This file is automatically generated from pp_custom_save.tpl when you issue a save command to Power
PMAC. It contains a backup of the settings of any of the structures you added to pp_custom_save.tpl. If
this file is missing from the project (e.g. if you opened a project that was created before IDE version
1.7.x.x), it can be generated by right-clicking the Configuration folder and then clicking “Download
Config Files”.
pp_custom_save.tpl
Type any Power PMAC parameter in here whose value you want to be added to pp_custom_save.cfg
upon issuing a save command to Power PMAC. For example, if you type Motor[1].Servo.Kp into this
file and then issue a save command to Power PMAC, the value of this parameter (Motor[1].Servo.Kp=4
by default) will be written to pp_custom_save.cfg. If you want to add a whole structure tree, use the
backup command here. For example, if you want to back up every setting in the Motor[1] tree, add the
command backup Motor[1]. to pp_custom_save.tpl. If this file is missing from the project (e.g. if you
opened a project that was created before IDE version 1.7.x.x), it can be generated by right-clicking the
Configuration folder and then clicking “Download Config Files”.
Project
System
215
pp_disable.txt
This file is the first file loaded on the download of the entire project. This file should cause programs to
be aborted, PLCs to be disabled, motors to be killed, and buffers to be cleared, all for safety purposes. The
following is an example:
pp_inc_disable.txt
This file is the first file loaded on the download of an incremental project, that is, selected files. This file
should cause programs to be aborted, PLCs to be disabled, motors to be killed, and buffers to be cleared,
all for safety purposes. The following is an example:
pp_startup.txt
This file is the last file loaded on the download of the entire project. The commands within this file will
run when PMAC boots up. Typically, this file starts the first programs you want to run on PMAC upon
starting up. The recommended way of starting PMAC is to just enable PLC 1, which then initializes
whatever parameters and starts whatever other programs you want. The following is an example:
enable plc 1;
pp_inc_startup.txt
This file is the last file loaded on the download of an incremental project or selected files. Typically, this
file starts the first programs you want to run on PMAC upon starting up. The recommended way of
starting PMAC is to just enable PLC 1, which then initializes whatever parameters and starts whatever
other programs you want. The following is an example:
enable plc 1;
Project
System
216
Generating Configuration Files
Another feature of the Configuration Folder is the ability to generate Configuration Files, which are a file
containing only the structures which have been modified from their default settings since the last factory
reset ($$$***).
To access this feature, right-click the Configuration Folder, which shows this menu:
“Upload Config Files” will upload any Configuration Files which have been generated from PMAC to the
host computer. “Download Config Files” will download any configuration files which are stored on the
host computer to PMAC. “Generate Configuration File” will create a new configuration file containing
the settings presently in Power PMAC at the time you select this. Just name your configuration file and it
will be stored in the Configuration Folder:
Please note that you cannot put spaces or dots in this filename. In order to download a configuration file,
you must first select it to be downloaded. To do this, right-click the file you want to be downloaded and
then click “Check to Config Download”:
The file you selected will receive a red check mark to the left of its filename. Then, right-click the
Configuration folder and click “Download Config Files” to download this file.
Project
System
217
You can only have one configuration file checked at a time. To deselect the file, preventing it from being
downloaded, right-click it and then click “Uncheck to Not Config Download”:
Doing this will remove the check mark from the file and it will not be downloaded when you select
“Download Config Files.”
Project
System
218
The Log Folder
This folder contains the log files created when you download your project to PMAC. You should never
edit these files; they are for reference purposes only.
pp_proj.log
This file is a history log of files loaded to PMAC since Power On, $$$, $$$***, or downloading from the
IDE.
Each bit of the AutoDetect represents a card being detected at the 16 to 20 different possible addresses for
the particular card type. An “AddrErrDetect” non-zero value means that the gate-card was detected at a
second location.
This section logs the success or failure of loading the saved configuration variables.
This section logs the loading of the PMAC project files. This logging occurs after Power On, $$$, $$$***
and for each download from the IDE.
pp_error.log
This file is a log of any errors on the last loading of the project into the PMAC.
pp_error_hist.log
This file is a history log of any errors in the loading of the PMAC since Power On, $$$, $$$***, or
downloading from the IDE. It is broken up into the same three sections just like pp_proj.log, shown
above
Project
System
219
The PMAC Script Language Folder
This folder contains all of the programs and header files which are written in the Script language.
Global Includes
This folder contains all of the header files which you want to be downloaded before all other Script
programs are downloaded. These header files usually contain global, csglobal, and ptr variable
definitions which are used in the other programs. You can even initialize these variables in these header
files. These files can also contain preprocessor directives, such as #define statements.
Kinematic Routines
This folder contains the files containing Forward and Inverse Kinematic Subroutines. It is recommended
to make separate files for each subroutine.
Libraries
This folder contains the files containing subprograms, which can be called by any program written in
Script.
Motion Programs
This folder contains the files containing motion programs.
PLC Programs
This folder contains the files containing PLC programs.
Project
System
220
Project Encryption
To encrypt the project and then download the encrypted project to Power PMAC, do the following:
1. Right click on the project in the Solution Explorer and select Properties.
2. From the Properties window, you can choose one of the following 3 options (as shown in the
screenshot below) before downloading the project:
a. Do Not Encrypt Any File: This option is for downloading the project “as-is” (i.e. the
project will get downloaded to the Power PMAC without any encryption). The C source
files will be downloaded if the Download C Source File option is set to Yes. Otherwise,
no C source files will be downloaded.
b. Encrypt All Project Files: This option will force the IDE to encrypt all project files
before downloading them to the Power PMAC.
c. Encrypt Some Project Files: This option will allow only certain files within the project
to get encrypted and be downloaded to the Power PMAC. Once this option is selected,
the user should select the files that will be encrypted right-clicking the file, selecting
Properties, and then setting Enable Encryption to Yes (as shown in the screenshot
below).
Project
System
221
3. Project Password: Once the user selects any encryption option, they should provide a password to
be used by the encryption tool. The Power PMAC will use the same password to decrypt the files
and load them into Power PMAC. If the user does not provide a password, the project will not be
encrypted and the following message will be displayed:
4. Encryption Message: Any time the user changes the Project Encryption Option they will get a
message indicating that they should issue a $$$*** before downloading the project. Since some
files might be in Power PMAC, it is necessary to reset Power PMAC before downloading the
encrypted (or Original project) to the Power PMAC.
Project
System
222
Downloading the C Source
Users can choose whether or not to download C source files. By default, no C source files are
downloaded. To change this setting, do the following:
1. Right-click on the project and select Properties.
2. Locate the Download C Source Files option and select Yes or No.
3. If the user selects Yes, the project will download the C source files to the Power PMAC.
Any time the user changes the Download C Source Options, they will get a message indicating that they
should issue a $$$*** command before downloading the project. Since some of the C source files might
be in Power PMAC, it is necessary to reset the Power PMAC before downloading the project.
Project
System
223
ASSOCIATING MOTORS WITH USER-WRITTEN SERVO AND
PHASE ALGORITHMS
After you have properly written usrcode.c and usrcode.h, you can assign certain motors to run these
algorithms through the IDE. To do this, right-click the Realtime Routines folder and click on “User servo
setup”:
In this window, select the motor you want to associate with a user-written algorithm. Then, select the
User Servo or Phase algorithm which you want to associate with the motor you select with the dropdown
boxes on the right. Then, click “Apply” to apply your selection. You can disassociate all motors from
user-written algorithms by clicking “Clear All.”
You can add a new user-written algorithm function to the usrcode.c and usrcode.h files by clicking “Add
a New Function,” which opens this dialog box:
Just name your function, and then it will be generated in usrcode.c, and its prototype and symbol
exportation will be generated in usrcode.h.
The MACRO Project will be added to the PMAC Script language folder. The MACRO project contains a
default file named station1.pmh. The MACRO project acts as an independent project and its contents can
only be downloaded to the Power PMAC through a menu available by right clicking on the MACRO
folder. A MACRO file can also be downloaded by right-clicking on a MACRO file and selecting
Dowload Selected Files.
The MACRO project can be used to isolate the main system files from the MACRO-related files, such as
PLCs, local settings, and station settings.
To Upload a project, open the File menu and select “Upload Project from Power PMAC” menu option as
shown below:
The user will be asked to choose a folder in which the project will be uploaded. Within that folder, the
uploaded project will be created under a new folder with the following format : “IP Address” + “Time of
Day”. For example, 10.34.9.240_14_16_9 would represent a project uploaded with an IP Address of
10.34.9.240 on September 16, 2014.
If the uploaded project was encypted, then the IDE will prompt the user to enter a password. If the
password is incorrect, the project will get uploaded, but will not be decrypted. If the uploaded project in
not encrypted, then it will open in the IDE.
Associating Motors with User-Written Servo and Phase
Algorithms
226
The following is the input box for an encypted project:
The IDE will prompt the location of the uploaded project and it will open the project in the IDE. The
uploaded project will be added to the current opened solution.
If the uploaded project does not contain the source code for C
Libraries, then the uploaded project will show the files in the project
tree, but they will not exist. To be able to upload a full project with all
the source files, the project must be downloaded with the “Download
C Source Files” option enabled. To protect your source code, you can
Note encrypt the project. See the Project Encryption section of this manual
for more details.
Once these two steps are completed, you are ready to debug the program.
Select the context menu “Debug the selected PLC” to start the debugger. This will launch the Debug
environment (shown in the image below). In this environment, you can see the Terminal and the Watch
Window. You can customize the Debug environment by adding required controls from the Delta
TauView menu or from the Delta Tau toolbar. These controls are helpful in viewing the variables or
Debugger
228
debugging programs interactively. This layout is automatically stored by the Power PMAC IDE as the
Debug environment layout and is displayed every time you launch the Debugger thereafter.
You can set a breakpoint before or after the Debugger is launched by placing your mouse cursor onto the
line at which you want to break and then pressing F9. More information about Debug menu is available
under the IDE Layout section of this manual.
Debugger’s built-in
Watch Window.
Displays variables in
scope
Debugger
229
PLC execution will be stopped on the breakpoint indicated by a red dot to the left of the selected line as
shown below:
Once the program has stopped, you can check the Debugger’s Watch Window for the values of variables
that are in scope. In the current version of the IDE, the local variables are automatically displayed and the
user is not allowed to add other variables. You can add additional variables which you want to watch by
opening the standard IDE Watch Window (Delta TauWatch); you can set these variables’ values using
the Terminal Window.
Use F11 to step into function calls or use F10 to step over functions. To stop the debugger, simply press
the button from the toolbar, or press Shift+F5, or select the menu item DebugStop Debugging.
Once the debugging ceases, the standard IDE environment is launched.
Debugger
230
Debugging a Background C Application
After successfully downloading the Power PMAC project, right-click the Background C Application
(under Background Programs) that needs to be debugged as shown below:
Select the context menu “Debug the selected CApp” to start the debugger. This will launch the same
debug environment used when debugging a Script PLC.
You can set a breakpoint before or after the debugger is launched. If you want to set the breakpoint after
the debugger is launched, you need to make sure that the Background C Application is in a loop;
otherwise, the program excution will be completed and it will not encounter the break point. Breakpoints
can be set by pressing F9. More information about the Debug menu is available under in the IDE Layout
section of this manual.
Debugger
231
The application will stop at the breakpoint you set as shown below:
At this point, you can check the Debugger’s Watch Window for variables that are in scope as shown
below:
In the current version of the IDE, the variables are automatically displayed and the user is not allowed to
add the variables. You can add additional variables which you want to watch by opening the standard IDE
Watch Window (Delta TauWatch); you can set these variables’ values using the Terminal Window.
Debugger
232
Use F11 to step into a function or use F10 to step over a function. If you step into a function, the Call
Stack Window will display the calling sequence. The Debugger supports multiple levels of call-stacks.
To stop the debugger, simply press the button from the toolbar or press Shift+F5 on your keyboard or
select the DebugStop Debugging menu item. Once the debugging ceases, the standard IDE
environment is launched.
Debugger
233
MATLAB/SIMULINK TARGET FOR POWER PMAC
Installing the Power PMAC Target on MATLAB
By default, the MATLAB Component’s installation folder is installed with the Power PMAC IDE. If the
PC’s operating system is 32-bit, it can be found at:
3. Run the DT_installer.p file by either right-clicking on the file in MATLAB’s “Current Folder”
window and selecting “Run” or by typing DT_installer and pressing enter in MATLAB’s
“Command Window.” The installation interface should then launch.
4. Press Install and if your MATLAB version is 2013b, installation can complete successfully, as
shown in the screenshot below:
The following example shows how the user can design a PID algorithm in Simulink, use the Target to
generate the C code expressing the algorithm, and then deploy the C code through the Power PMAC IDE
as the control algorithm for any motor (virtual or real).
𝑌(𝑠) 183
= ,
𝑅(𝑠) 𝑠2
where Y(s) is the output from the motor and R(s) is the input to the motor.
Note that the values put for the derivative blocks need to be multiplied by this motor’s servo rate, which is
the rate at which the servo algorithm will be executed, and the integration gains need to be divided by that
value. For example if the algorithm is going to be used as the user-servo routine for Motor 1, then in the
Gain Value property of the derivative block, put the numerical value of
Motor[1].Servo.Kvfb*Sys.ServoPeriod*Motor[1].Stime,
for the integrator gain. In this example, Kvfb=1500 and Ki=0.01 are used and the servo rate is the default
value of Sys.ServoPeriod=0.00044274211. Motor[1].Stime=1 and Kp=45 are set. In other words,
1500*0.00044274211 and 0.01/0.00044274211 are the values put in the Gain values of the derivative and
the integrator gains, respectively.
The PPMAC_INPUT and PPMAC_OUT blocks can be used anywhere the user needs to have access to a
memory location in Power PMAC. Use PPMAC_INPUT to get data values from PMAC to use in the
algorithm and PPMAC_OUT to set (write) data values to PMAC. After you have put one of these blocks
into the model, you can double-click it to set the memory location with which it is associated. Double-
clicking an input block will bring up the following screen:
Pshm->P[1]
Pshm->Ddata[0]
Mptr->ServoOut
Mptr->IqCmd
Pshm->Motor[3].Kp
At this point, saving the test model as a different name and then working on the new model for code
generation is recommended.
Mptr->DesPos and Mptr->ActPos are used to have access to the desired position and actual position of
the motor that runs this servo algorithm, respectively. Pshm->P[1] is used as an input; its value will be
added to the corresponding connected signal. Pshm->P[2] is also used in an output block to get the value
of the connected signal and write it to P[2] for parameter monitoring or other purpuses.
The PPMAC_Servo_RTN block can only be used once in a model. The value of the connected signal to
this block will be written to Mptr->IqCmd, which is the DAC output of the motor running the servo
algorithm. If this block is used, the model needs to be built and the C code needs to be generated with the
PowerPMAC.tlc target, which generates servo algorithms, and not PowerPMAC_Traj.tlc, which
generates trajectories. PPMAC_Traj block can also be only used with the PowerPMAC_Traj.tlc target
and not PowerPMAC.tlc.
The models that include Deltau Tau’s PowerPMAC Library blocks can only be used for the purpose of
code generation and not simulation (i.e. they cannot be used in Simulink at runtime).
Setting PowerPMAC.tlc as the system target file forces the Simulink Coder and Embedded Coder to
generate C code that is compatible with Power PMAC’s memory structure and can be downloaded to
Power PMAC. If the servo rate is different than default it needs to be set here at the Solver pane under
Fixed-Step Size.
Apply the changes in the Model Configuration Parameters dialog box and save the model again. Return to
the dialog box and press the Generate Code button in the “Code Generation” pane. The C code will be
automatically generated and saved in MATLAB’s current folder. A report including the C code (.c source
and .h header files) will be automatically opened and saved in the same folder as well.
Right-click again on “Realtime Routines,” choose “User Servo Setup,” choose the number of the motor
that will execute this servo algorithm, select your User Servo’s name, and then press Apply, as shown
below:
Add any other necessary files to the project, right-click the Project, and then click “Build and Download.
The selected motor’s user servo algorithm will start running as soon as the motor is activated and enabled.
To activate the motor, issue Motor[1].ServoCtrl=1 and to enable it, isse #1j/. To verify that the motor is
using the user servo algorithm, check the value of Motor[1].Ctrl. If it is set to
UserAlgo.ServoCtrlAddr[i] then it is using the user servo algorithm.
The result of the step response from the Tuning software should now be compared with the step response
obtained from Simulink previously to see how closely the model matches the real response.
Here is how one can generate C code with tunable parameters. These parameters could then be changed
dynamically as the program is running.
The parameters Ki and Kd can be put as gains before the integrator and derivative blocks, respectively.
The values of 0.00044274211 and 1/ 0.00044274211 (i.e. the numerical values of the servo period and its
inverse, respectively) need to be set for the gains of the Integrator and Derivative blocks, respectively.
The numerical values of Kp=45, Ki=0.01 and Kd=1500 also need to be present in MATLAB’s base
workspace. To do so, type Kp=45; Ki=0.01; Kd=1500; in the MATLAB command window.
Before generating the C code, in the Simulink Model, click on the “DeltaTau” menu, then “Parameters,”
and then “Model Validation.” A message will ask if the parameter’s numerical values need to be attached
as a preload function to the model or not. If you click “Yes”, the next time the model is opened, the same
numerical values for Kp, Kd, and Ki will appear in MATLAB’s workspace. These numerical values will
be used only as an initial value for the parameters; the parameters could be changed later when deployed
in the Power PMAC IDE. In the “Model Validation” program, we check the model to make sure that only
acceptable Simulink blocks are being used. MATLAB does not yet support some Simulink blocks like the
“Discrete Derivative” and “Discrete Integration” for parameter tuning. Many other blocks like “Gain” and
“Constant” are supported. Using these two blocks with tunable parameters is often enough for many
Next, in the Simulink model window, click on the “Delta Tau” menu, then “Parameters,” and then
“Parameter Assignment.” A GUI will open which asks the user about the memory location in Power
PMAC to which the model parameters should be saved and from which to be updated when the project is
running. There are three options: Sys.DData[i] user buffer memory, Global Variables (P-Variables), or a
custom memory location as shown below:
The parameters will be updated every 500 servo cycles by default. This number can be changed using the
provided text box. The user can also change the initial values of the parameters here as well (in addition
to in the MATLAB workspace). The PMAC memory location is also displayed. The Power PMAC IDE
symbols correspond to the symbols that will be created in the Power PMAC IDE project. The user can
write to these variables (e.g. _Kp, _Ki, _Kd) and change the values of the adjustable parameters on the fly
through the Terminal Window, PLC, a motion program ,or in other C programs.
Click on the “Create files” button. When clicked, the model closes and a new model with the same name
but with an additional “_” suffix is created and opened. This model will be used for code generation. This
model has structured, tunable parameters. A new folder is also created in the same folder as the first
model. This folder is named after the first model with “_param_ppmac” suffix. This folder includes 3 text
files named “…_param_update.txt”, “…_param_initial.txt” and “…_MATLAB_definitions.pmh”, which
will be used later.
Start the process of code generation for the new model whose name ends with “_”. To do so, as explained
in the last section, in the Simulink model, open the “Model Configuration Parameters” dialog box from
the “Simulation” menu (or pressing Ctrl+E). In the “Code Generation” pane, go to “Target selection,”
then “System Target File.” Click “Browse” and choose the target. Choose “PowerPMAC.tlc” for general
math and/or control loop algorithm (user-servo) code or choose “PowerPMAC_Traj.tlc” for the custom
trajectory generation target. Tunable parameters are used in the same way for both these targets. After the
target is chosen, save the model, then go back to the “Model Configuration Parameters” dialog box. Go to
MATLAB/Simulink Target for Power
PMAC
247
the “Code Generation” pane and click on “Generate code”. The generated code will be saved in
MATLAB’s Current Folder and a report that includes the generated code will launch. The code is saved
in a folder named after the original model with the “__ppmac” suffix.
The Generated code can be deployed the same way as explained in the last section to the Power PMAC
IDE project, with the only difference being that the file named “…_MATLAB_definitions.pmh” saved in
the “…_param_ppmac” folder also needs to be put in the Power PMAC IDE project in the Script
LanguageGlobal Includes section. See the following picture for an example.
To tune the parameters on the fly, use the variable names created in the .pmh file. For example, command
“_Kp=44” in the terminal window to set the Kp parameter equal to 44.
“Trajectory Name” and “Time max” (in seconds) are the two parameters that need to be set for every
PPMAC_Traj block.
Trajectories are usually made using the Simulink source blocks. All the time parameters (if there are any
that need to be set in blocks) must be set in units of seconds. Frequencies must be set in Hz. To access the
“Source” blocks launch the “Simulink Library Browser”, then go to SimulinkSources. Most Simulink
blocks can also be used in the model. Delta Tau does not support the following “Source” blocks for
trajectory code generation using the PowerPMAC_Traj.tlc target:“Counter Limited”, “Digital Clock”,
“Enumerated Constant”, “Random Number”, “Unified Random Number,” and “Band Limited White
Noise.” Other “Source” blocks, however, can be used for this purpose. To check if other blocks in other
libraries are supported, check the Simulink Coder’s list for “Supported Blocks for Code Generation” in
MATLAB’s documentation.
The following image shows a model which has the same Sine Wave and Gain blocks but the Scope has
been replaced with a PPMAC_Traj block for which the trajectory name is set to SinTraj and the Max
Time set to 7 sec. The PPMAC_INPUT and PPMAC_OUT blocks can also be used in trajectory
generation models. In this example, a PPMAC_INPUT block with memory location address
Mptr->ActPos and a PPMAC_OUT block with address pshm->P[1] are used. This way, the signal that
is input to the PPMAC_Traj block, the desired position, is subtracted from the motor’s actual position and
thus the following error is written to the global variable P1, as shown below:
The PPMAC_Servo_RTN block cannot be used for trajectory generation models; it gives an error when
compiled with the PowerPMAC_Traj.tlc system target file. Since there is a tunable parameter K1 in this
Before initiating the Build and Download, a virtual motor (e.g. Motor 0) could be configured to run the
user-servo algorithm named “Trajectories.” This motor needs to be activated (Motor[0].ServoCtrl=1) to
run the “Trajectories” servo routine. To start running the trajectory that was named SinTraj for Motor 3
for example, set SinTraj_flag(3)=1. The trajectory will finish after 7 seconds and will automatically stop.
Appendix
253
Code / Define Text Group Possible error cause
0x9811000F Cannot add ISW Slave timer list full.
EC_E_TIMER_LIST_FULL slave to timer list
0x98110010 Timeout Multiple error sources.
EC_E_TIMEOUT
0x98110011 Open Failed ISW Multiple error sources.
EC_E_OPENFAILED
0x98110012 Send Failed LLA Transmit of frame failed.
EC_E_SENDFAILED
0x98110013 Insert Mailbox CFG Mailbox command couldn’t
EC_E_INSERTMAILBOX error be stored to internal
command queue.
Possible solution: Increas of
configurationvalue
dwMaxQueuedCoeCmds
0x98110014 Invalid ISW Unknown mailbox command
EC_E_INVALIDCMD Command code.
0x98110015 Unknown ISW Unknown Mailbox protocol or
EC_E_UNKNOWN_MBX_PROTOCOL Mailbox Protocol mailbox command with
Command unknown protocol
association.
0x98110016 Access Denied ISW Master internal software
EC_E_ACCESSDENIED error:
0x9811001A Product Key CFG Application is using
EC_E_PRODKEY_INVALID Invalid evaluation version of stack,
which stops operation after
30 minutes.
0x9811001B Wrong ENI Network information file is
EC_E_WRONG_FORMAT configuration empty or malformed.
format
0x9811001C Feature disabled APP Application tried to perform a
EC_E_FEATURE_DISABLED missing or disabled API
function.
0x9811001E Bus Config ENI Network information file and
EC_E_BUSCONFIG_MISMATCH Mismatch currently connected bus
topology does not match.
0x9811001F Error reading ENI Network information file
EC_E_CONFIGDATAREAD config file could not be read.
0x98110021 Cyclic ENI Network information file does
EC_E_XML_CYCCMDS_MISSING commands are not contain cyclic
missing commands.
0x98110022 AL_STATUS ENI Read of AL Status register is
EC_E_XML_ALSTATUS_READ_MISSING register read missing in cyclic part of given
missing in XML network information file.
file for at least
one state
0x98110023 Fatal internal ISW Master control state machine
EC_E_MCSM_FATAL_ERROR McSm is in an undefined state.
0x98110024 Slave error SLV Cannot address slave (no
EC_E_SLAVE_ERROR station address configured or
slave absent)
Appendix
254
Code / Define Text Group Possible error cause
0x98110025 Frame lost, IDX mismatch SLV An EtherCAT frame was lost on
EC_E_FRAME_LOST bus segment, means the
response was not received. In
case this error shows frequently
a problem with the wiring could
be the cause.
0x98110026 At least one EtherCAT SLV Received EtherCAT frame
EC_E_CMD_MISSING command is missing in the incomplete.
received frame
0x98110028 IOCTL APP This function cannot be used if
EC_E_INVALID_DCL_MODE EC_IOCTL_DC_LATCH_R DC Latching is running in mode
EQ_LTIMVALS invalid in „Auto Read“.
DCL auto read mode
0x98110029 Auto increment address SLV Network information file and bus
EC_E_AI_ADDRESS increment mismatch topology doesn’t match any
more. Error shows only, if a
already recognized slave isn’t
present any more.
0x9811002A Slave in invalid state, e.g. APP Mailbox commands are not
EC_E_INVALID_SLAVE_STA not in OP (API not callable allowed in current slave state.
TE in this state)
0x9811002B Station address lost (or SLV Slave had a powercycle.
EC_E_SLAVE_NOT_ADDRE slave missing) - FPRD to
SSABLE AL_STATUS failed
0x9811002C Too many cyclic commands ENI Error while creating network
EC_E_CYC_CMDS_OVERFL in XML configuration file information file within
OW configuration utility.
0x9811002D Ethernet link cable SLV EtherCAT bus segment not
EC_E_LINK_DISCONNECTE disconnected connected to network interface.
D
0x9811002E Master core not accessible RAS Connection to remote server
EC_E_MASTERCORE_INAC was terminated or master
CESSIBLE instance has been stopped on
remote side.
0x9811002F COE mbox send: working SLV CoE mailbox couldn’t be read on
EC_E_COE_MBXSND_WKC counter slave, slave didn’t read out
_ERROR mailbox since last write.
0x98110030 COE mbox receive: working SLV CoE Mailbox couldn’t be read
EC_E_COE_MBXRCV_WKC counter from slave.
_ERROR
0x98110031 No mailbox support APP Slave does not support mailbox
EC_E_NO_MBX_SUPPORT access.
0x98110032 CoE protocol not supported ENI Configuration error or slave
EC_E_NO_COE_SUPPORT information file doesn’t match
slave firmware.
0x98110033 EoE protocol not supported ENI Configuration error or slave
EC_E_NO_EOE_SUPPORT information file doesn’t match
slave firmware.
0x98110034 FoE protocol not supported ENI Configuration error or slave
EC_E_NO_FOE_SUPPORT information file doesn’t match
slave firmware.
0x98110035 SoE protocol not supported ENI Configuration error or slave
EC_E_NO_SOE_SUPPORT information file doesn’t match
slave firmware.
Appendix
255
Code / Define Text Group Possible error cause
0x98110036 VoE protocol not supported ENI Configuration error or slave
EC_E_NO_VOE_SUPPORT information file doesn’t match
slave firmware.
0x98110037 Configuration violates ENI Network information file contains
EC_E_EVAL_VIOLATION Evaluation limits configuration data for more
slaves than allowed, while using
evaluation version of stack.
0x98110038 Evaluation Time limit CFG Time limit (30minutes) of
EC_E_EVAL_EXPIRED reached evaluation version is reached,
hence master stack is stopped.
0x98110070 Master configuration not CFG The path to the master
EC_E_CFGFILENOTFOUND found configuration file (XML) was
wrong or the file is not available.
0x98110071 Command error while SLV Could not read from slave
EC_E_EEPROMREADERRO EEPROM upload EEPROM.
R
0x98110072 Command error while SLV Could not write to slave
EC_E_EEPROMWRITEERR EEPROM download EEPROM.
OR
0x98110073 Cyclic command wrong size ENI Error while creating a new cyclic
EC_E_XML_CYCCMDS_SIZ (too long) command. The size which was
EMISMATCH defined in the master
configuration xml does not
match to the size of the process
data.
0x98110075 Invalid output offset in cyc ENI Obsolete
EC_E_XML_INVALID_OUT_ cmd, please check
OFF OutputOffs
0x9811010e Command not executed APP / Slave disappeared or was never
EC_E_SLAVE_NOT_PRESE (slave not present on bus) SLV present.
NT
0x98110112 Cannot open system driver SYS System driver was not loaded.
EC_E_SYSDRIVERMISSING
0x9811011E Bus configuration not detected, Topology changed while
EC_E_BUSCONFIG_TOPOC Topology changed scanning bus
HANGE
0x98110123 VoE mailbox send: working SLV VoE mailbox couldn’t be written.
EC_E_VOE_MBX_WKC_ER counter
ROR
0x98110124 EEPROM assignment failed SLV Assignment of the EEPROM to
EC_E_EEPROMASSIGNERR the slave went wrong.
OR
0x98110125 Error mailbox received SLV Unknown mailbox error code
EC_E_MBX_ERROR_TYPE received in mailbox
0x98110126 Redundancy line break SLV Cable break between slaves or
EC_E_REDLINEBREAK between master and first slave
0x98110127 Invalid EtherCAT cmd in ENI BRW commands are not allowed
EC_E_XML_INVALID_CMD_ cyclic frame with with redundancy.
WITH_RED redundancy LRW commands with an
expected WKC>3 are not
allowed with redundancy
(Workaround: Use LRD/LWR
instead of
Appendix
256
Code / Define Text Group Possible error cause
LRW)
0x98110128 <PreviousPort>-tag is ENI If the auto increment address is
EC_E_XML_PREV_PORT_M missing not the first slave on the bus we
ISSING check if a previous port tag OR a
hot connect tag is available
0x98110129 DC is enabled and DC ENI Error in Configuration Tool.
EC_E_XML_DC_CYCCMDS_ cyclic commands are
MISSING missing (e.g. access to
0x900)
0x98110130 Data link (DL) status SLV Handled inside the master
EC_E_DLSTATUS_IRQ_TOP interrupt because of
OCHANGED changed topology
0x98110131 Pass Through Server is not PTS The Pass-Through-Server was
EC_E_PTS_IS_NOT_RUNNI running tried to be enabled/disabled or
NG stopped without being started.
0x98110132 Pass Through Server is PTS Obsolete. Replaced by
EC_E_PTS_IS_RUNNING running EC_E_ADS_IS_RUNNING
0x98110132 ADS adapter (Pass PTS API call conflicts with ADS state
EC_E_ADS_IS_RUNNING Through Server) is running (running).
0x98110133 Could not start the Pass PTS The Pass-Through-Server could
EC_E_PTS_THREAD_CREA Through Server not be started.
TE_FAILED
0x98110134 The Pass Through Server PTS Possibly because the IPaddress
EC_E_PTS_SOCK_BIND_FA could not bind the IP (and Port) is already in use or
ILED address with a socket the IP-address does not exist.
0x98110135 The Pass Through Server PTS -
EC_E_PTS_NOT_ENABLED is running but not enabled
0x98110136 The Link Layer mode is not PTS The Master is running in
EC_E_PTS_LL_MODE_NOT supported by the Pass interrupt mode but the Pass-
_SUPPORTED Through Server Through-Server only supports
polling mode.
0x98110137 No VoE mailbox received SLV The master has not yet received
EC_E_VOE_NO_MBX_RECE a VoE mailbox from a specific
IVED slave.
0x98110138 SYNC out unit of reference ENI Slave is selected as Reference
EC_E_DC_REF_CLOCK_SY clock is disabled clock in ENI file, but slave
NC_OUT_UNIT_DISABLED doesn’t have a SYNC unit.
Possible a ESI file bug.
0x98110139 Reference clock not found! SLV May happen if reference clock is
EC_E_DC_REF_CLOCK_NO removed from network.
T_FOUND
0x9811013B Mailbox command working SLV Mbx Init Cmd Retry Count
EC_E_MBX_CMD_WKC_ER counter error exceeded.
ROR
0x9811013C AoE: Protocol not APP / Application calls AoE-API
EC_E_NO_AOE_SUPPORT supported SLV although not implemented at
slave.
Appendix
257
Code / Define Text Group Possible error cause
0x9811016E AoE: Invalid NetID ENI Error from Configuration Tool.
EC_E_XML_AOE_NETID_IN
VALID
0x9811016F Error: Maximum number of CFG The maximum number of pre-
EC_E_MAX_BUS_SLAVES_ bus slave has been allocated bus slave objects are
EXCEEDED exceeded to small. The maximum number
can be adjusted by the master
initialization parameter
EC_T_INITMASTERPARMS.wM
axBusSlaves.
0x98110170 Mailbox error: Syntax of 6 SLV Slave error mailbox return value:
EC_E_MBXERR_SYNTAX octet Mailbox header is 0x01
wrong
0x98110171 Mailbox error: The Mailbox SLV Slave error mailbox return value:
EC_E_MBXERR_UNSUPPO protocol is not supported 0x02
RTEDPROTOCOL
0x98110172 Mailbox error: Field SLV Slave error mailbox return value:
EC_E_MBXERR_INVALIDCH contains wrong value 0x03
ANNEL
0x98110173 Mailbox error: The mailbox SLV Slave error mailbox return value:
EC_E_MBXERR_SERVICEN protocol header of the 0x04
OTSUPPORTED mailbox protocol is wrong
0x98110174 Mailbox error: The mailbox SLV Slave error mailbox return value:
EC_E_MBXERR_INVALIDHE protocol header of the 0x05
ADER mailbox protocol is wrong
0x98110175 Mailbox error: Length of SLV Slave error mailbox return value:
EC_E_MBXERR_SIZETOOS received mailbox data is 0x06
HORT too short
0x98110176 Mailbox error: Mailbox SLV Slave error mailbox return value:
EC_E_MBXERR_NOMOREM protocol can not be 0x07
EMORY processed because of
limited ressources
0x98110177 Mailbox error: The length SLV Slave error mailbox return value:
EC_E_MBXERR_INVALIDSI of data is inconsistent 0x08
ZE
0x98110178 Slaves with DC configured ENI The first DC Slave was not
EC_E_DC_SLAVES_BEFOR present on bus before configured as potential reference
E_REF_CLOCK reference clock clock.
0x9811017B Line crossed Cabling wrong.
EC_E_LINE_CROSSED
0x9811017C Line crossed at slave … Obsolete
EC_E_LINE_CROSSED_SLA
VE_INFO
Appendix
258