Position control with Beckhoff host controller over EtherCAT

Before you start

Before operating this product, read the safety instructions in the following manuals:

This product is for industrial use only.

Electrical connections must be made by qualified electrical personnel.

Description

Step-by-step instructions will guide you through connecting a Beckhoff C6015 host controller to a MINAS A6 Multi servo drive system. You will also learn how to configure a PLC program and an HMI program using Beckhoff’s TwinCAT 3 Runtime and TwinCAT 3 Engineering software to perform a simple positioning task. Communication is achieved using EtherCAT.

Available software

The following software is available free of charge in our Panasonic Download Center.

The following software can be downloaded from Beckhoff’s Web site (https://www.beckhoff.de):

  • TwinCAT 3 Runtime software (Go to Download > Software > TwinCAT3 > Runtime)

  • TwinCAT3 Engineering software (Go to Download > Software > TwinCAT3 > Engineering)

Functional overview

A Panasonic MINAS A6 Multi servo drive system includes a power supply module, one or more 400V driver modules, and one or two motors connected to each driver module. Communication can be achieved through EtherCAT with any host controller that supports the CAN application protocol over EtherCAT (CoE).

Example

A servo drive system, consisting of an 15kW power supply module, an A-size 1.5kW two-axis driver module, and two servo motors with a rated power of 1.0kW and 1.5kW, is connected to a Beckhoff C6015 host controller by an Ethernet cable to communicate via EtherCAT.

Use the following accessories:

  • 1 x 400V AC power supply cable: Connects the MINAS A6 Multi power supply module to the main power supply (400V AC).

  • 1 x 24V DC power supply cable: Connects the power supply unit (24V DC) and the host controller.

  • 1 x grounding wire (M4 round terminal): Connects the PE terminals of the power supply module and the driver module.

  • 2 x Panasonic motor cable: Connects the motor and the driver module.

  • 2 x Panasonic encoder cable: Connects the encoder and the driver module.

  • 1 x Ethernet cable (used for EtherCAT communication): Connects the host controller and the driver module.

  • 1 x RJ11 communication cable (2 x RJ11 plug): Connects the power supply module and the driver module.

  • 1 x feed bus bar (50mm) with end cap for the DC link bus (535V DC to 675V DC): Connects the power supply module and the driver module.

  • 1 x feed bus bar (50mm) with end cap for the control bus (24V DC): Connects the power supply module and the driver module.

Set-up of a MINAS A6 Multi servo drive system with a Beckhoff C6015 host controller
  1.  (1) Power supply unit (24V DC)
  2.  (2) Beckhoff C6015 host controller with TwinCAT 3 Runtime software
  3.  (3) MINAS A6 Multi power supply module (400V AC, 15kW)
  4.  (4) Two-axis MINAS A6 Multi driver module (1.5kW)
  5.  (5) MINAS A6 servo motor B (1.5kW)
  6.  (6) MINAS A6 servo motor A (1kW)
  7.  (7) PC with TwinCAT 3 Engineering software

Wiring

Recommendations for wiring

It is the customer's responsibility to apply the countermeasures that they consider necessary to comply with current regulations on wiring, safety and reducing EMI.

Do not forget to meet the specifications indicated in the hardware manual for each of the devices being wired. If any specifications in the manual conflict with the information in this document, the manufacturer's manual takes preference.

For detailed information on reducing EMI, please refer to Recommendations for EMC-compliant wiring of servo drivers and motors.

Bottom side connectors of the servo drive system

The image shows the most important connectors of a power supply module (left) and a driver module (right). Please refer to the technical documentation for details about other connectors.

Bottom view of power supply module (left) and driver module (right)
(1)

X102: Main power supply (400V AC)

Connect the 400V AC main power supply cable to X102. Connect the PE terminals of the power supply module and the driver module by a grounding wire.

(2)

X11: Control power supply (24V DC)

Connect the 24V DC control power supply to X11.

(3)

X105A: Motor A, (4) X105B: Motor B

Connect the motor cable for servo motor A to X105A and the motor cable for servo motor B to X105B.

(4)

X9A: Encoder A, (6) X9B: Encoder B

Connect the cable of encoder A to X9A and the cable of encoder B to X9B.

Top side connectors of the servo drive system

The image shows the most important connectors of a power supply module (left) and a driver module (right). Please refer to the technical documentation for details about other connectors.

Top view of power supply module (left) and driver module (right)
(1)

X1: Internal communication connector on power supply module, (2) X1A: Internal communication connector on driver module

Connect X1 and X1A with the RJ11 communication cable.

(3)

X6A: EtherCAT communication connector on driver module

Connect an Ethernet cable between the EtherCAT connector of the host controller and X6A of the driver module.

In this example, we will define X103 as the EtherCAT connector.

Front side connectors of the servo drive system

The image shows the most important connectors of a power supply module (left) and a driver module (right). Please refer to the technical documentation for details about other connectors.

Front view of power supply module (left) and driver module (right)
(1)

X7: USB connector (for driver configuration) on driver module

The driver module is configured using the PC configuration software PANATERM. Use a commercially available USB A to mini-B cable to connect the PC to the driver module.

(2)

X104: DC link bus connectors on power supply module and driver module (535V DC to 675V DC), (3) X12: Control bus (24V DC) connectors on power supply module and driver module

Attach the bus bars to X104 and X12 to connect the DC circuits of the power supply module and the driver module.

(4)

Connectors for DC circuits without and with bus bars

Connectors of the Beckhoff C6015 host controller

The image shows the front view of the host controller. Connector X104 can be used to connect a monitor. Connectors X105 and X106 can be used to connect a keyboard, mouse or USB flash drive, if required.

Front view of Beckhoff C6015 host controller
(1)

X101: 24V power supply

Connect X101 to 24V DC.

(2)

X102: Ethernet connector

Connect an Ethernet cable between X102 and the Ethernet port of your PC.

(3)

X103: Ethernet connector

Connect an Ethernet cable between X103 and the X6A connector of the driver module.

In this example, we will define X103 as the EtherCAT connector.

(4)

X104: DisplayPort connector

Connect a monitor (optional).

(5)

X105: USB 2.0 connector

Connect a mouse or keyboard (optional).

(6)

X106: USB 3.0 connector

Connect a mouse or keyboard (optional).

Set up the host controller

Install TwinCAT 3 Runtime and establish an Ethernet connection

To install TwinCAT 3 Runtime on the host controller, connect a monitor to the DisplayPort connector (X104) of the Beckhoff C6015 host controller and a mouse to one of its USB connectors.

The download link can be found under Available software.

  1. Unzip the downloaded TwinCAT 3 Runtime file and copy the installation file to a USB flash drive.
  2. Connect the USB flash drive to one of the host controller’s USB connectors and execute the installation file.
  3. Set the IP address in your PC.

    In Windows, go to Network Connections > Change adapter options. Select Ethernet > Properties. On the Network tab, select Internet protocol, Version 4 (TCP/IPv4) > Properties. Select Use the following IP address and set the IP address.

    Example:
    • IP address: 192.168.178.100
    • Subnet mask: 255.255.255.0
    • (settings for default gateway and preferred DNS server not required)
  4. Set an IP address in the Ethernet Properties dialog of the system settings of the host controller, e.g. IP address: 192.168.178.10, subnet mask: 255.255.255.0.
  5. Start a remote desktop connection by entering “mstsc” in the Windows start menu of your PC. Enter the IP address of your host controller (e.g. 192.168.178.10) and select Connect.

Install the EtherCAT driver

One of the two Ethernet connectors of the Beckhoff C6015 host controller must be configured as an EtherCAT port. In this example we will use connector X103.

  1. In the operating system of the host controller, select Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings > Ethernet2 (Ethernet2 refers to the X103 connector of the host controller).
  2. Right-click and select Properties in the context menu.
  3. Select Configure… and go to the Driver tab.
  4. Select Update Driver.
  5. Search manually for the driver in the following location: C:\TwinCAT\3.1\Driver.
  6. Select Next to install the driver.
  7. After successful installation, select Close to finish the installation.
  8. To activate the EtherCAT driver, go to C:\TwinCAT\3.1\System and execute TcRteInstall.exe.

Set up the MINAS A6 Multi servo drive system

Use the PC configuration software PANATERM to set up the MINAS A6 Multi servo drive system.

The download links can be found under Available software.

For safety reasons, parameter Pr0.13: 1st torque limit is, by default, set to 10% of the rated motor torque. To be able to use the full range of motor torque and to avoid follow-up errors, set Pr0.13 to 300%. This will be the only setting we will make in PANATERM.

  1. Connect your PC to the USB connector X7 of the servo driver module and turn on the servo drive system.
  2. Start PANATERM.

    The software automatically detects the connected devices.

  3. Select OK to confirm the detected series.
  4. Select the Parameter tab.
  5. In the Selection of parameter to be read dialog, select Read from amplifier and select OK.
  6. Select Pr0.13: 1st torque limit from the parameter list and change the value to 300%:
  7. Transfer the new value to the driver by selecting the Trans icon:

Start drive control

Install TwinCAT 3 Engineering on your PC

To control the servo drive system, you must install the TwinCAT 3 Engineering software and the Panasonic ESI file on your PC.

We highly recommend that you use a PC without security software (e.g. McAfee) because TwinCAT 3 Engineering needs access to the kernel. Security checks could cause blue screen errors and damage to your files.

  1. Unzip the downloaded software package and execute the installation file.
  2. Reboot your PC.
  3. After the reboot, copy the Panasonic ESI file (Panasonic_MINAS_A6Multi_V*.xml) to C:\TwinCAT\3.1\Config\Io\EtherCAT on your PC.

The download links can be found under Available software.

Before starting TwinCAT 3

  1. Before you start the TwinCAT 3 Engineering software, execute the batch file C:\TwinCAT\3.1\System\win8settick.bat to avoid a system clock setup error. You must execute this file as an administrator.
  2. Reboot your PC.

Create a new TwinCAT project

Before you can connect your PC to the Beckhoff C6015 host controller, you must create a new project in TwinCAT 3.

  1. Select the TwinCAT icon in the taskbar to start the TwinCAT 3 Engineering software.
  2. Select TwinCAT XAE (VS2013).
  3. On the Start Page select New TwinCAT Project….
  4. Select TwinCAT XAE Project (XML format), enter a project, and select OK.

Connect your PC to the host controller

To establish a connection to the Beckhoff C6015 host controller, send a broadcast request for an IP address to the devices in the EtherCAT network.

  1. In the Solution Explorer, go to SYSTEM and select the Choose Target button.
  2. Select Search (Ethernet).
  3. Under Address Info, select IP Address and select the Broadcast Search button to display the connected EtherCAT devices.
  4. Select the host controller and select Add Route.
  5. Enter the login data for the host controller. The default password is "1". Select OK.

    The system is now establishing a connection to the host controller.

  6. Check the connection between your PC and the host controller: An “X” means that the PC is connected to the host controller. Select Close to close the window and confirm with OK.

Add connected devices to your project

You must add the connected devices to your TwinCAT project.

  1. In the Solution Explorer, go to I/O and right-click on Devices. Select Scan.
  2. Confirm the message that not all devices can be found automatically.
  3. When the EtherCAT master device is found, select OK.
  4. Confirm Scan for boxes with Yes.
  5. When the MINAS A6 Multi driver module is found, the following message comes up that you confirm with OK.
  6. Confirm the message Activate Free Run with No.
  7. The Solution Explorer displays the added driver module with its two connected motors under I/O > Devices. It also displays all found axes under MOTION > NC-Task 1 SAF.

Set the movement parameters

Set the movement parameters and make general settings and encoder settings for each axis.

  1. Go to Solution Explorer > MOTION > NC-Task 1 SAF > Axes > Axis 1. Select the Settings tab.
  2. In this example, change the unit to Degree.
  3. Select the Parameter tab and set the values for velocity, acceleration, deceleration, jerk, and lag error (highlighted in the screenshot in blue color).
  4. Go to Solution Explorer > MOTION > NC-Task 1 SAF > Axes > Axis 1 > Enc. Select the Parameter tab.
  5. Set the desired scaling factor for the encoder.

    For example, set 360°/8388608=0.00004291534423828125 for a motor rotation of 8388608 pulses/rotation.

  6. Repeat the steps for axis 2.
  7. Select the Activate Configuration icon from the toolbar.
  8. Confirm the message that the new configuration will be activated and old configurations will be overwritten.
  9. Confirm the message that the TwinCAT system will be restarted in run mode.

    The TwinCAT system is now in run mode and the corresponding icon is active.

    (To switch back to configuration mode, select the blue icon on the right of the green icon.)

  10. If the TwinCAT system does not switch to run mode and a system clock setup error occurs, execute the batch file win8settick.bat. Refer to Before starting TwinCAT 3 for details.

Start position control

Use the Online tab to manually start and to check the motor movement.

  1. Go to Solution Explorer > MOTION > NC-Task 1 SAF > Axes > Axis 1. Select the Online tab.
  2. Select Set and All to activate position control.
  3. From the Online tab, you can now start JOG operations, absolute value control, home return operations, etc.
  4. From the Functions tab you can test relative value control, endless movement, etc. by changing the acceleration, deceleration, and jerk values.
  5. Use the Coupling tab to test electronic coupling, cam profiles, flying saw, etc.

Create a PLC program with motion control functions (optional)

To porgram a positioning task, use one of the libraries included in TwinCAT 3.

  1. In the Solution Explorer, right-click PLC and select Add New Item.
  2. Select Standard PLC Project, enter a name for your new PLC project, and select Add.
  3. Go to Solution Explorer > PLC > First_PLC_Project. Right-click References and select Add library.
  4. Add the library Tc2_MC2.
  5. Go to Solution Explorer > PLC > First_PLC_Project > POUs > MAIN (PRG).
  6. In this example, we will enable the servo control for axis 1. Press F2 to open the Input Assistant which helps you to find the desired PLCopen function in the TwinCAT library.
  7. Select the function Tc2_MC2.MC_Power and select OK. Then add the AXIS_REF structure in the same manner.
    The example program you created should look like this:
  8. Select BUILD > Build Solution to compile the project.
  9. Assign a connection to Axis 1. Click the Link To PLC... button to select the AXISREF_Axis1 structure from your PLC program.
  10. Activate the configuration.
  11. Confirm the message that the TwinCAT system will be restarted in run mode.
  12. Select the Login icon from the toolbar.
  13. Select Yes to create port 851.

    If an error occurs, try again by selecting the Login icon.

  14. Select the highlighted Start icon to start the PLC program.
  15. Double-click on the value of bEnableAxis1 to set the variable to TRUE.
  16. Select PLC > Write values to write the value and to enable servo control of the motor.

Add visual controls to your PLC program (optional)

To enhance your PLC program, you can add visual controls, e.g. a button to enable servo control.

  1. Go to Solution Explorer > PLC > First_PLC_Project > First_PLC_Project Project. Right-click on VISUs and select Add > Visualization.
  2. Select VisuSymbols (System) and then Open.
  3. Double-click on Visualization. From the Toolbox, select Rounded Rectangle and place the form in the Visualization screen.
  4. Use the Properties window to enter a text in the rectangle and add the variable bEnableAxis1 from your main PLC program.
  5. Select the Login icon from the toolbar.
  6. If the following message appears, select Yes to create port 851.

    If an error occurs, try again by selecting the Login icon.

  7. Start the PLC program.
  8. Select Enable Power Axis 1 to enable servo control.
    Servo control for axis 1 is now enabled.

Modified on: 2024-03-20Feedback on this pagePanasonic hotline