copley xenus power pmac setup for ethercat3. configuring the delta tau power pmac 3.1 system setup...

19
Project Documentation TN-0196 Draft A Copley Xenus Power PMAC Setup for EtherCAT Andrew Beard Instrumentation 2 May 2014

Upload: others

Post on 24-Aug-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Project Documentation TN-0196

Draft A

Copley Xenus Power PMAC Setup for EtherCAT

Andrew Beard Instrumentation

2 May 2014

Page 2: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page ii

REVISION SUMMARY:

1. Date: 2 May 2014 Revision: Draft A Changes: Initial Release

Page 3: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page iii

Table of Contents

1. Introduction......................................................................................... 1

1.1 HARDWARE ......................................................................................................... 1 1.2 SOFTWARE .......................................................................................................... 1

1.3 REFERENCE DOCUMENTATION ........................................................................ 1

2. Preparing the Copley Drive ................................................................. 2

2.1 HARDWARE SETUP............................................................................................. 2

2.2 SOFTWARE SETUP ............................................................................................. 2 2.2.1 MOTOR/FEEDBACK SETUP ....................................................................................... 3

2.2.2 AUTO PHASING ....................................................................................................... 4 2.2.3 TESTING MOTOR SETUP VIA CME2 .......................................................................... 5

3. Configuring the Delta Tau Power PMAC............................................. 7

3.1 SYSTEM SETUP ................................................................................................... 7

3.1.1 ADDING AND UPDATING THE DEVICE FILE .................................................................. 7 3.1.2 CONFIGURING AMPLIFIER INPUTS & OUTPUTS ........................................................... 8

3.1.3 CONFIGURING MOTOR ........................................................................................... 11 3.1.4 SAVING AND RESTORING CONFIGURATION .............................................................. 14

4. Homing ............................................................................................. 16

Page 4: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 1 of 16

1. INTRODUCTION

This document explains in detail how to configure a Copley Xenus Plus model XEL-230-8 for use on a

Delta Tau Power PMAC controller over an EtherCAT network. The Xenus is a compact digital servo

drive which functions as a motor amplifier and a full functioned servo controller. Its compact size,

powerful functionality and EtherCAT communication feature allow it to be flexibly located near motors

and other controlled hardware. In this configuration, the Delta Tau serves as a centralized EtherCAT

master and motion controller for potentially multiple remote drives. For this setup, a DKIST Polarization

Modulator Controller (PMC) device was configured.

1.1 HARDWARE

The following hardware was configured:

Copley Xenus Plus XEL-230-8

Delta Tau Power PMAC w/ EtherCAT (firmware version 1.6.0.30)

Allied Motion MF0210005-X0X brushless motor

Renishaw TONiC Ti0040 rotary encoder

1.2 SOFTWARE

The following software is required for configuration of the above hardware:

Copley CME2 (Windows)

DeltaTau PowerPMAC IDE (version 1.6 Windows)

Copley EDS/ESI Files

We used a Windows 7 Virtual Machine on a Linux host for this purpose.

1.3 REFERENCE DOCUMENTATION

The following reference documentation was helpful:

Copley Xenus Plus XEL-230-18 Data Sheet

Copley Xenus Plus Users Guide

CME2 Users Guide (Included with CME2)

Power PMAC Ethercat Setup Guideline130112 (from DeltaTau forums)

Ethercat Setup Example II (from DeltaTau forums)

Power PMAC IDE

Power PMAC Software Reference Manual

Power PMAC Users Manual

RotaryStage.doc (Vault SysDocs/3.0/3.1/….)

Page 5: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 2 of 16

2. PREPARING THE COPLEY DRIVE

There are several things that need to be done in order to prepare the Copley drive. This involves cabling

and initial software configuration via the CME2 tool provided by Copley.

2.1 HARDWARE SETUP

Detailed hardware setup is beyond the scope of this document - wiring and functionality of the Xenus is

described in detail in Chapter 4: Wiring, of the XEL User’s Manual. For the PMC, custom harnesses

were prepared according to the Xenus wiring specifications and the electrical design of the PMC

hardware. We do note that it was necessary for us to override the J5 safety mechanism in order to setup

and test our motor. Though eventually PMC hardware will support the J5 ‘safe torque off’ safety

mechanism, current PMC hardware does not. Since the amplifier will not be enabled unless these circuits

are actively driven, it was necessary to override these safety circuits. This can be done by creating a

custom D-Sub9 connector to make the ‘Override’ connections described in section 4.6 ‘Safe Torque Off

(J5)’ of the user’s manual.

In addition, we used EtherCAT to configure the Copley drive via CME2. In order to do this we

connected a CAT5 cable from a spare Ethernet port on the host machine directly to J7 on the Xenus drive.

The drive was not connected to AC power until instructed to do so.

2.2 SOFTWARE SETUP

The first step to setting up the Copley drive is to establish an EtherCAT communications link with the

device via CME2. To do so on our VM, it was necessary to ‘attach’ the network interface connected to

the drive. This is shown below in Oracle Virtual Box running on our Linux CentOS 6.5 host machine.

At this point, turn on the +24V supply voltage to the Xenus drive and start the CME2 application. CME2

should detect the Xenus drive over EtherCAT immediately and display the below screen. If not, you will

receive an error indicating that a drive was not found. Double check your connections and network setup

until CME2 is able to detect your module via EtherCAT.

Figure 1: Attaching EtherCAT Network Adapter to Virtual Machine

Page 6: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 3 of 16

CME2 Basic Setup

In CME2, proceed by selecting ‘Basic Setup’ from the ‘Amplifier’ menu or click the leftmost icon on the

toolbar. Select the ‘Change Settings’ button and you will then be guided through the initial configuration

of the amplifier. For the PMC, we selected the brushless rotary options in the ‘Motor Options’ section

followed by primary incremental for the motor feedback with other options set to ‘None’. For ‘Operating

Mode Options’ we selected ‘position mode’ with CANopen over EtherCAT as the command source.

Finally, under the miscellaneous options section we selected ‘Buffered Primary Feedback’.

2.2.1 Motor/Feedback Setup

Next select the ‘Motor/Feedback’ button from main page. Here, detailed parameters are entered in order

to assist CME2 in auto phasing the motor. Below are screenshots showing the parameters entered for the

PMC. These values can be found (or derived from) the data sheets for the motor and encoder.

Brake/Stop data was not entered for the PMC as it does not have a brake.

When done entering parameters, select ‘Calculate’. If all goes well, parameters will be calculated and a

summary will be displayed. If there are problems or CME2 detects something is awry, it will display an

error and you will need to recheck your numbers.

Figure 2: CME2 Main Screen

Figure 3: Motor Parameters for PMC

Page 7: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 4 of 16

Additionally, it was necessary for us to configure the 1st input in the ‘Input/Output’ section. This bit is

responsible for enabling the drive and thus if wrong will prevent the drive from functioning. Figure

shows how this was reconfigured for the PMC.

2.2.2 Auto Phasing

The drive should now be ready for auto phasing. Select ‘Amplifier->Auto Phase’ from the menu to start

the auto phase wizard. At this point you will need to enable the high voltage input to the drive in order to

move the motor. This wizard directs you through several steps, starting with an instruction to turn the

Figure 4: Motor Feedback Parameters

Figure 5: Calculated Parameters

Figure 6: IN1 Configuration

Figure 7: Auto Phase Wizard - Motor Wiring Setup

Page 8: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 5 of 16

motor in the positive direction. Once this is done, the wizard will proceed to the ‘Motor Wiring’ setup

shown below.

The motor will make small incremental moves during this time. Next the wizard will ask the user to

observe that the motor makes one complete revolution. This can take a few minutes as the drive

microsteps through an entire revolution.

The last function of the wizard is to initialize the phase. Press the ‘Initialize Phase’ button to proceed.

At this point, finish the wizard and save the configuration to the Xenus flash and the settings to a local

.ccx file.

2.2.3 Testing Motor Setup via CME2

The settings can be tested by using the CME2 ‘Control Panel’ from the Amplifier menu.

Figure 8: Auto Phase Wizard - Phase Count Test

Figure 9: Auto Phase Wizard - Motor Phase Initialize

Page 9: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 6 of 16

First verify that the ‘Actual Motor Position’ responds when moving the motor. The velocity will also be

calculated at this time. Next select the ‘Enable Jog’ check box and verify movement via the ‘Move NEG’

and ‘Move POS’ buttons. The velocity and acceleration can both be modified. At this point, the Xenus

drive is configured and CME2 can be exited. When exiting, CME2 will ask you if you’d prefer to

software enable the drive prior to exiting. Select yes.

Figure 10: CME2 Control Panel

Page 10: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 7 of 16

3. CONFIGURING THE DELTA TAU POWER PMAC

3.1 SYSTEM SETUP

Now that the Copley drive has an initial configuration, we can begin to configure the DeltaTau to control

the drive. The drive needs to now be connected to the DeltaTau EtherCAT card. Once done, make sure

the PowerPMAC itself is connected to the network and startup the Power PMAC IDE. At this stage you

should see something like the below screenshot.

As noted in the screenshot, the PowerPMAC servo period must be a multiple of 62.5 microseconds in

order to match the EtherCAT cyclic data update frequencies. Here we choose 8.000 kHz, but any legal

multiple should do. Click the ‘Accept’ button.

The Copley Xenus drive should be displayed under the ‘Amplifiers’ section of the EtherCAT bus it is

connected to. If not, check connections and setup before proceeding.

3.1.1 Adding and Updating the Device File

The DeltaTau must first be told how which configuration data and setup elements exist on the Copley

Xenus drive. It does this via XML setup files which contain the format, addresses and contents of

different setup data and cyclic data the Copley provides. Download the Copley EDS/ESI Files to a local

partition.

Next, right click on the XEL-230-18 amplifier in the amplifiers list and select ‘Add New Device File’ as

demonstrated in the figure below.

Figure 11: DeltaTau PowerPMAC System Setup

Page 11: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 8 of 16

Once added, navigate to the appropriate device and select ‘Update Device File’:

At this stage the IDE has enough information to configure the device.

3.1.2 Configuring Amplifier Inputs & Outputs

It is now necessary to configure the Copley drive via CAN-Over-EtherCAT (CoE) configurations. CoE is

a CAN based mailbox messaging format for configuring a EtherCAT device prior to transitioning the

device to the ‘operational’ stage.

Start by selecting the XEL-230-18 device and then selecting the ‘Startup’ tab. Select the desired mode

from the drop down menu as shown in the below figure.

Figure 12: Adding New Device File

Figure 13: Update Device File

Page 12: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 9 of 16

Click ‘Accept’ and verify that the amplifier is updated according to the ‘Setup Messages’ box.

Next we will configure the desired Input and Output process data objects (PDOs). These represent the

data objects that will be made available to the Power PMAC via the EtherCAT cyclic process data frame.

First select ‘Inputs’ and then select the ‘Add From Dictionary Objects’ button. Next find and add

#x6041, #x6064, #x2401 and #x2402 for ‘Status word’, ‘Actual motor position’, ‘Position Capture

Status’ and ‘Index Position on Capture’ respectively. Click ‘Load PDOs to PMAC’.

Figure 14: Copley Startup TAB

Page 13: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 10 of 16

Repeat this process for ‘Output’ PDOs, instead selecting #x6040, #x607a, #x2400 and #x2352 for

‘Control word’, ‘Profile target position’, ‘Position Capture Control’ and ‘Home Config’ objects.

Once done, we can activate the EtherCAT bus and verify that data is flowing to and from the drive.

Figure 15: Adding Status Word PDO from Dictionary

Figure 16: Mapping Input PDOs

Page 14: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 11 of 16

Note the ‘OP’ status of the module indicating that the EtherCAT status is operational.

3.1.3 Configuring Motor

Once we have verified that EtherCAT data is flowing from and to the module, it is time to setup the

motor. This is done by mapping process data to DeltaTau motor structures in the IDE. To begin, it is

necessary to deactivate the EtherCAT bus by right clicking on the bus and selecting ‘Deactivate Master[x]

Tasks’. Under PowerPMAC, Motors, select ‘Add Motor’. Enter a motor number for the motor (here

‘1’) and then select ‘Amplifier Information’. From the ‘Manufacturers’ drop-down menu, select the

Copley drive. This will populate all pertinent fields automatically.

Figure 17: Bus Activated

Figure 18: Amplifier Information

Page 15: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 12 of 16

Click ‘Accept’ to continue.

The ‘Motor Information’ page does not offer any options since this is an EtherCAT motor.

On the ‘Command/Feedback Information’ page, verify that the settings match the below screenshot. In

particular verify that ‘ECAT’ is selected for the ‘Primary Feedback’ mechanism. Click ‘Accept’ once

finished.

On the hardware interface page it is necessary to select the appropriate PDO mappings. The following

mappings need to be made:

Command Signal Channel -> Profile [Target Position]

Amplifier Enable Signal Output Channel -> Control [Word]

Amplifier Fault Signal Input Channel -> Status [Word]

Primary Feedback Channel->Actual [Motor Position]

Again click ‘Accept’ once the appropriate mappings have been made.

Figure 19: Command/Feedback Information

Page 16: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 13 of 16

Figure 21: Disable Following Error

Figure 20: Hardware Interface Mappings

Page 17: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 14 of 16

Once these settings have been made we can check for interactive feedback on the interactive feedback

page. To do so, first activate the EtherCAT network by right clicking on the foreground and background

tasks and selecting activate.

On the safety page it might be necessary to disable following error as shown below.

3.1.4 Saving and Restoring Configuration

Once the above configurations and settings are complete and tested, the setup can be saved to the PPMAC

via a save command. This will cause the setup to be remembered across resets and power cycles.

In addition, the configuration can be exported in the below two-step process for restoration on factory

reset PPMACs. The first necessary step is to save the EtherCAT setup which we created above. To do

this, right click the EtherCAT bus and select ‘Export EtherCAT setup from Power PMAC’ to save the

configuration. Do not confuse this with the similar option to ‘Export EtherCAT Variables’. Additional

configuration parameters such as the motor variables can be exported by selecting the ‘Setup Variables’

item from the DeltaTau->Configure menu. Next, select the motor and click ‘Save Configuration To File’.

These exported configurations can be restored using the reverse process. However, in this case one will

also need to reset the servo frequency. Again, don’t forget to save the setup so that it persists.

A backup of both of these files exist on the vault with the other documentation described at the beginning

of this document.

Additionally, it can be desirable to add or remove additional Process Data Objects (PDOs) after the initial

configuration described above. I have found that the DeltaTau IDE does not always allow for

Figure 22: Interactive Feedback

Page 18: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 15 of 16

modification of PDOs after initial configuration. Instead, the option to add PDOs is disabled as shown

below. Please see this DeltaTau forum thread for instructions on how to get around this.

Figure 23: Disabled Option to Add PDOs

Page 19: Copley Xenus Power PMAC Setup for EtherCAT3. CONFIGURING THE DELTA TAU POWER PMAC 3.1 SYSTEM SETUP Now that the Copley drive has an initial configuration, we can begin to configure

Copley Xenus Power PMAC Setup for EtherCAT

TN-0196 Draft A Page 16 of 16

4. HOMING

Once both the Copley drive and the DeltaTau have been configured it should now be possible to issue

basic move commands. In addition, basic PDO information from the drive will be available via the

ECAT[N] data structure on the DeltaTau. With an incremental motor such as that used in the PMC, the

next step is to home the motor to find the zero position. Due to the fact that this is a networked drive

rather than one which is part of the DeltaTau chassis, this step differs significantly from homing on those

systems. In particular homing with the EtherCAT drive cannot take advantage of the jog until index

feature on the DeltaTau. There are several different ways to home a motor using the Copley drive. The

technique covered here utilizes Copley’s support for position capturing on index.

The Renishaw encoders being used in the PMC contain 48 indices spaced at almost equidistant intervals

on the wheel. The difference between any two adjacent indices is set in a manner that encodes the two

index positions. In particular, for our 48 index, 960k count encoder wheel, even indices starting at 0 are

spaced 40k counts apart (e.g. index 0 @ 0 counts, index 2 @ 40k counts, etc). Odd indices are located at

count positions according to the formula N*20K + (N/2 + 1) * 40. The encoding allows one to determine

their exact position on the wheel (and thus the home position) by only reading two adjacent indices.

Additionally for the PMC, the index number decreases relative to the count.

Position capture on index can be enabled by setting the appropriate bit in the position capture control

PDO #x2400 (See the Copley CAN Programmers Guide). Once set, the encoder position upon index

trigger is placed into PDO #x2402. The motor is first instructed to move in a positive direction at a slow

homing speed. When an index is triggered the position is read from the PDO and stored in memory. The

process is then repeated until the next adjacent index is triggered. The difference is then calculated and

using the above formulas the indices are precisely determined and the home position is henceforth known.

Once known, the HomePosition setup element must be set explicitly for the motor being homed.

Note that using the DeltaTau home command will cause the motor to jog indefinitely. This is because

there is no index or trigger feedback connected to the DeltaTau hardware.

In addition to the above described homing technique, the Copley drive supports homing directly via it’s

network command set. Due to the special index encoding of Renishaw encoders, this technique was not

used here. It would however be useful for a situation where a single home trigger was available as an

input from the encoder.