akd profinet manual english - kollmorgen · 2017. 9. 20. · 1 tableofcontents 1 tableofcontents 3...

46
AKD ® Profinet Sample Project User Manual Programmed with TIA Portal V13 Edition: 1, August 2017 Original Documentation

Upload: others

Post on 18-Aug-2020

25 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD®

Profinet Sample Project User ManualProgrammedwith TIA Portal V13

Edition: 1, August 2017

Original Documentation

Page 2: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET |

Record of Document Revisions:

Revision Remarks0.1 07/2017, First revision.

1 08/2017, Updated for motion task editing, formatting

AKD is a registered trademark of Kollmorgen Corporation

TIA Portal is a registered trademark of SIEMENS AG

SIMATIC is a registered trademark of SIEMENS AG

PROFINET is a registered trademark of PROFIBUS and PROFINET International (PI)

Technical changes which improve the performance of the devicemay bemade without prior notice!

Printed in the United States of AmericaThis document is the intellectual property of Kollmorgen. All rights reserved. No part of this work may be repro-duced in any form (by photocopying, microfilm or any other method) or stored, processed, copied or dis-tributed by electronic means without the written permission of Kollmorgen.

2 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 3: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

1 Table of Contents

1 Table of Contents 32 Project Notes 53 Project Components 64 Introduction to the Sample Project 75 Configuration of the AKD 86 Starting with the Sample Project 96.1 Overview 96.2 GSD File Installation 96.3 PLC Device Selection 96.4 PLC IP Address 106.5 AKD Device Name 116.6 AKD IP Address 116.7 Compile and Download 126.8 Go Online 146.9 Ladder Programming 14

7 Function Block Reference 167.1 Telegram 400 Function Block 167.1.1 General Description 167.1.2 Notes 217.1.3 Detailed input description 217.1.4 Detailed output description 23

7.2 Direct Parameter Access Function Block 257.2.1 General Description 257.2.2 Notes 267.2.3 Detail input description 267.2.4 Detail output description 27

7.3 Edit Motion Task Position Function Block 287.3.1 General Description 287.3.2 Notes 297.3.3 Detail input description 307.3.4 Detail output description 30

8 Creating a New Project 318.1 PLC Device Selection 318.2 PLC IP Address 328.3 GSD File Installation 338.4 Add AKD Device 348.5 AKD Device Name 358.6 AKD IP Address 358.7 Create the Profinet Network 368.8 Add the Telegram 378.9 Telegram I/O Addresses 398.10 Compile and Download 398.11 Go Online 418.12 PLC Project Components 41

AKD PROFINET | 1   Table of Contents

Kollmorgen | kdn.kollmorgen.com | August 2017 3

Page 4: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 1   Table of Contents

8.13 Using Function Blocks in New Ladder Program 438.14 Multi-Axis 44

4 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 5: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

2 Project NotesFor better readability of the code, some variables have a prefix of a lower case letter, the definition is as fol-lowing.

Prefix Size Descriptioni Unknown Function Block Input

o Unknown Function Block Output

b 1 Bit Bool

by 8 Bit Byte

w 16 Bit Word

dw 32 Bit DoubleWord

AKD PROFINET | 2   Project Notes

Kollmorgen | kdn.kollmorgen.com | August 2017 5

Page 6: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 3   Project Components

3 Project ComponentsThe sample project contains the following components:

l Telegram 400 Function Blockl Parameter Access (PNU) Function Blockl Edit Motion Task Position Function Blockl Tag Tablesl Data type (UDT)l Ladder program

Other similar projects for AKD Profinet will have similar components, but each component may vary depend-ing on the purpose of the project.

A new project can be created using the provided project components. The function blocks can even bemod-ified to support other telegrams or added functionality. But the sample projects are provided as an initial com-plete solution, which can then bemodified by the integrator as needed.

Revision notes of the projects, components, and even this manual are listed in the ladder program propertiesof each project. This includes which revision of each component that is used in each project revision. Theserevision notes can also be found in the pdf printouts of the ladder programs.

6 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 7: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

4 Introduction to the Sample Project

This manual provides instructions and reference information for a sample project used in a Siemens PLC tocontrol the Kollmorgen AKD drive with Profinet fieldbus communications.  The system contains an S7-1200or S7-1500 PLC and an AKD-Pxxxxx-xxPN drive. The sample project applies to both the 1200 CPU and the1500 CPU.  The program code between those versions is identical. This sample project is for a single AKDaxis.  However, it can be easily modified for amulti-axis system.

All Automation functions are controlled by the PLC. The functions covered are the following:

l Initialization (Mapping Telegram 400)l SW Enable/Disablel Emergency stopl Reset of drive faultsl Jogmovel Homingl Starting of a pre-definedmotion taskl Direct motion task configuration and executionl Read / write access to drive parameters

Each function is controlled by specific bits and variables and the actual values of the drive are read back incyclic communication.

This manual should help the PLC programmer understand the communication configuration and functionblock integration, and perform some simplemotion.

The communication between the AKD (connector X11) and the PLC (connector X1P1) is handled by theProfinet RT protocol hereafter called Profinet.  The physical connection is via standard Ethernet cable.

In the PLC, the instructions DPRD_DAT and DPWR_DAT are used to exchange cyclic data between thetwo devices in “real time”. For the service channel parameter access, the instructions RDREC andWRRECare used.

At some points this manual refers to the AKD Profinet manual.  The latest manual can be found on the Koll-morgen website.

Never use the sample project unchanged in an application. The Sample Project is intended as an example ofintegrating the AKD into a TIA-Project. This Sample Project must bemodified according to the real applic-ation.

KOLLMORGEN cannot be held liable for any damage caused by the use of the Sample Project or any partsof it.

This manual consists of 4major sections:

l Starting with the sample projectl Function block reference informationl Creating a new projectl Modifying the sample project for multi-axis

AKD PROFINET | 4   Introduction to the Sample Project

Kollmorgen | kdn.kollmorgen.com | August 2017 7

Page 8: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 5   Configuration of the AKD

5 Configuration of the AKD

The basic setup of the AKD has to be done inWorkbench. The Profinet andWorkbench connections can beused at the same time. The limitation is with the parameter access, as Profinet can deny access to certainparameters from outside.  The drive should be commissioned and tested prior to setting up the Profinetcommunications.  The two important settings relating to Profinet communications are the drive’s name andthe drive’s IP address.

8 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 9: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

6 Starting with the Sample Project

6.1 OverviewThe sample project is made available as a TIA archive file.  This allows the entire project to be contained in asingle file.

l Save the TIA archive project file to your PC.l In TIA Portal, open the Project View.l Click on Project / Retrieve to open the project from the archive file.

As the project opens, the GSD file will automatically be installed in your TIA system.

After opening the project, go into the “Device Configuration” screen andmake the following changes.  Thechanges should bemade in the offlinemode.  After making the changes, compile and download the project tothe PLC. 

l Change the CPU to the actual one being used.l Set the IP address you want to use for the PLC.l Set the AKD device name tomatch drive’s name that was saved inWorkbench.l Set the AKD’s IP address in the AKD Device Properties (this is the AKD’s IP address).

See detailed instructions below for each part of this setup.

The project is set up tomake some simplemotion using digital inputs on the PLC.  The ladder program usesthe inputs for the following functions, but they can bemodified to fit your specific application:

Input 0: E-Stop(Level Triggered, Normally Closed)

Input 1: Reset(Momentary, Normally Open)

Input 2: Enable(Level Triggered, Normally Open)

Input 3: Re-Initialize function block(Momentary, Normally Open)

Input 4: Start move(Momentary, Normally Open)

Input 5: Start jog(Momentary, Normally Open)

This sample project is for a single AKD drive.  You can expand it to multi-axis by duplicating the functionblocks, data blocks, and tags associated with those blocks for each axis.  See the section onMulti-axis formore details.

6.2 GSD File InstallationTo control the AKD by the PLC, the drivemust be added in the network list and be recognized as a Profinetdevice. The device configuration for the Kollmorgen AKD drive is stored in the GSDML-V2.1-Kollmorgen-AKD-20141120.xml file.

TIA Portal should install all required GSD files automatically when retrieving the archived sample project.

If the file is not installed automatically, TIA-Portal allows adding a user defined device description file underOptions -> Install general station description file (GSD). The specified file can be chosen and added to thehardware catalog.

6.3 PLC Device SelectionThe sample project is configured for a CPU 1212C DC/DC/DC.  This must be changed tomatch the actualPLC hardware that is being used. 

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Device View”.

AKD PROFINET | 6   Starting with the Sample Project

Kollmorgen | kdn.kollmorgen.com | August 2017 9

Page 10: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 6   Starting with the Sample Project

l Right-click on the image of the CPU and click “Change Device.”l Select your CPU part number.

6.4 PLC IP AddressThe sample project is configured with an IP address of 192.168.0.9 for the PLC.  Configure the PLC with anycompatible IP address that you want to use.  This is the IP address that is used for the Profinet com-munication between the PLC and the AKD drive. 

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Device View”.l Click on the image of the CPU.l Click on “Properties”. (at the bottom)l Click on “Ethernet addresses.”l Enter the IP address you want to use for the PLC.

10 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 11: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

6.5 AKD Device NameThe Profinet name of the device has tomatch the name of the AKD drive configured inWorkbench. You canset the name in either or both places. The sample project uses the name “AKD-PN” for the AKD device, sincethis is the default name specified by the GSD file.

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Topology View” tab.l Click on the icon of the AKD-Device.l Select the “Device View” tab.l Click on the icon of the AKD-Device (again).l Right-click on the device name and click “Rename”.l Enter the name you want to use.

After configuring a drive name inWorkbench and saving it, the drive needs to be rebooted in order for the PLCto recognize that new name.

6.6 AKD IP AddressThe sample project is configured with an AKD-Device IP address of 192.168.0.2.  You need to either con-figure the AKD for 192.168.0.2 static IP using the rotary switches, or configure the IP address of your choicein the TIA project. 

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Topology View” tab.

AKD PROFINET | 6   Starting with the Sample Project

Kollmorgen | kdn.kollmorgen.com | August 2017 11

Page 12: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 6   Starting with the Sample Project

l Click on the icon of the AKD-Device.l Select the “Device View” tab.l Click on the icon of the AKD-Device (again).l Click on “Properties”. (at the bottom)l Click on “Ethernet addresses”.l Enter the IP address that you want to use for the AKD drive.

This is the same IP address that is configured by either the rotary switches on the AKD drive or inWorkbench.  It needs to have the same subnet as the PLC’s IP address.

6.7 Compile and DownloadThe project must be compiled and downloaded to the PLC.

l Select the “PLC_1” heading or the “Program blocks” heading in the project tree.l Click the “Compile” button in the toolbar.l Wait for the compile to complete.l Click the “Download” button in the toolbar.l Select the PN/IE network and your network hardware and start the search for the PLC.l Select the PLC in the search results and click “Load”.l The software will give you some instructions or options prior to downloading (click “Load”).

12 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 13: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 6   Starting with the Sample Project

Kollmorgen | kdn.kollmorgen.com | August 2017 13

Page 14: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 6   Starting with the Sample Project

6.8 Go OnlineClick the GoOnline button on the toolbar to connect to the PLC. When the software is online, you will see theheader bars turn orange.  There are colored status indicators next to some of the entries in the Project tree andin the Network Overview.  These indicators should be green.  If the indicators are red, then an error exists.

One example of an error that is common is when the drive name has been saved inWorkbench, but the drivehas not yet been rebooted.  The PLC will not recognize the name of the drive and will indicate that an errorexists.

6.9 Ladder ProgrammingAt this point, you can start modifying and adding to the ladder program that is contained in the sample project. It is possible that you won’t need certain parts of the existing program, and it’s very likely that you will need toaddmore functionality for you application.

14 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 15: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

One item in particular that may need to be changed or removed is the homing command.  By default, the lad-der program issues the start home commandwhen the drive is enabled for the first time after the drive bootsup.  If you are using amulti-turn absolute feedback device, then you will probably want to remove the homingaltogether.  Your application will dictate how the homing should be started.  This goes for the positionmovesand jogmove as well.

The PNU read/write may or may not be needed.  If it’s not used for your application, you can remove those lad-der networks from the program.

Tag names can be changed as needed, but make sure the change is made to every instance of the tag.

Some functions in the sample project ladder program are not set up to be automated.  For example, the PNUread and writes must be activatedmanually in the program by forcing the state of the contacts.  You will needto complete the programming by providing digital inputs or other means of automation for these functions.

AKD PROFINET | 6   Starting with the Sample Project

Kollmorgen | kdn.kollmorgen.com | August 2017 15

Page 16: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

7 Function Block Reference

7.1 Telegram 400 Function Block

7.1.1 General DescriptionThe function block “AKD_PN_TG400” is used as the interface for the AKD drive in the PLC. This block sup-ports the Profinet communication between the S7-1200/S7-1500 PLC and the Kollmorgen AKD-Profinet servodrive.  It handles the configuration of Telegram 400 and uses Telegram 400 for cyclic data communication forgeneral command exchange.

16 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 17: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 17

Page 18: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

Variable Name Data Type Direction DescriptionEN Bool In Call of the DB

iID HW_IO In Hardware identifier of the used telegram

iInit Bool In Initialization of the communication with a zero tele-gram

iEStop Bool In Stop of all motion execution and disable the drive

iSW_Enable Bool In Enable the drive

iStop Bool In Stop of all motion execution

iReset Bool In Reset faults in the drive

iStart_Homing Bool In Start the homing procedure

iStart_Jog Bool In Start of a continuous motion

iStart_Move Bool In Start of a discretemotion

iMT_Pause Bool In Interrupt a discretemotion

iMT_MoveType Word In Motion task control word (MDI_MOD)

iMTNum Word In Motion task number (SATZANW)

iCmdPos DWord In Commanded positon (MDI_TARPOS)

iCmdVel DWord In Commanded speed (MDI_VELOCITY)

iCmdAcc Word In Commanded acceleration (MDI_ACC)

iCmdDec Word In Commanded deceleration (MDI_DEC)

ENO Bool Out DB call done

oInitDone Bool Out Indicates completion of Initialization process

oStatus DWord Out Actual status of the AKD Profinet connection

oPos DWord Out Actual position

oVel Word Out Actual velocity

oCurrent Word Out Actual current

oEnabled Bool Out Indicates when drive is enabled

oError Bool Out Error in Profinet connection or control

oMoving Bool Out Axis is active andmoving

oHomed Bool Out Axis is homed

oInPos Bool Out Axis is within the commanded position window

oFault Bool Out AKD drive fault condition exists

oWarning Bool Out AKD drive warning exists

TG_400 UDT_AKD_TG400

Static Profinet data

wPNReadStatus Word Static Status of the read connection 0 = OK

bPNReadError Bool Static Fault with the read connection

wPNWriteStatus Word Static Status of the write connection 0 = OK

bPNWriteError Bool Static Fault with the write connection

18 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 19: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

Variable Name Data Type Direction DescriptionbResetDone Bool Static Reset of drive faults rising edge

bHomeDone Bool Static Home start rising edge

bStartMoveDone Bool Static Start motion task rising edge

bEstop Bool Static Local flag for estop; True when Estop is active

wStartReset Word Static ZSW2 at the reset time

wStartMove Word Static ZSW2 at the start motion task time

bySDODataArray[0..63]

Byte Static Data array for the service data object exchange

SDOWrite WRREC Static Service data object write

SDORead RDREC Static Service data object read

bSDOReq Bool Static Service data object request

bSDOWriteBusy Bool Static Write active

bSDOWriteDone Bool Static Write done

bSDOWriteError Bool Static Write error

bSDOReadBusy Bool Static Read active

bSDOReadDone Bool Static Read done

bSDOReadError Bool Static Read error

wSDOReadValue Word Static Read service data object value

wSDOAddress Word Static Service data object address

bSWEnabled Bool Static Software enabled and drive active

Status Data (Telegram 400 / position mode)TG_400.Receive.

Variable Direction Size Description Bit Description Bit DescriptionZSW1 IN Int Status word 8 No following Error 0 Read to switch

on

9 Controlled by mas-ter

1 Ready to operate

10 On target velocity 2 Operationenabled

11 Homed 3 Fault present

12 Move acknow-ledged

4 No coast stop

13 Drive stopped 5 No quick stop

14 Motion task active 6 Switch on inhib-ited

15 - 7 Warning present

AKTSATZ IN Int Last activemotion task

ZSW2 IN Int Status word two

XIST_A IN DInt Actual position PL.FB

NIST_A IN Int Actual velocity VL.FB (in 16-bit resolution)

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 19

Page 20: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

Variable Direction Size Description Bit Description Bit DescriptionITIST_GLATT IN Int Actual current IL.FB (in 16-bit resolution)

IDT_DATAITEM_o_7

IN Int -

IDT_DATAITEM_o_8

IN Int -

IDT_DATAITEM_o_9

IN Int -

IDT_DATAITEM_o_10

IN Int -

IDT_DATAITEM_o_11

IN Int -

IDT_DATAITEM_o_12

IN Int -

IDT_DATAITEM_o_13

IN Int -

IDT_DATAITEM_o_14

IN Int -

IDT_DATAITEM_o_15

IN Int -

Control data (Telegram 400 / position mode)TG_400.Send.

Variable Direction Size Description Bit Description Bit DescriptionSTW1 IN Int Control

word8 Jog1 0 On/Off

9 Jog 2 1 No coast stop

10 Control by PLC 2 No quick stop

11 Start home 3 Enable operation

12 Real time jog 4 DoNot reject task

13 Invert real timejog

5 No intermediatestop

14 - 6 Activate task

15 - 7 Fault reset

SATZANW IN Int Motion task number

STW2 IN Int Control word two

MDI_TARPOS IN DInt Motion task target positionMT.P*

MDI_VELOCITY IN DInt Target velocity MT.V*

MDI_ACC IN Int AccelerationMT.ACC*

MDI_DEC IN Int DecelerationMT.DEC*

MDI_MOD IN Int Motion task control wordMT.CNTL*

HOME_DIST IN DInt Home distance HOME.DIST*

20 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 21: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

Variable Direction Size Description Bit Description Bit DescriptionIDT_DATAITEM_o_12

IN Int -

IDT_DATAITEM_o_13

IN Int -

IDT_DATAITEM_o_14

IN Int -

IDT_DATAITEM_o_15

IN Int -

*The Profinet data are not mapped 1:1 into the AKD. The PROFIdrive data conversion has to be regarded.Detailed information can be found in the input description or the Profinet manual.

7.1.2 NotesThe function block uses Telegram 400 for cyclic data communication. The AKD can also be controlled by anyof the other telegrams specified in the AKD Profinet manual.

The Profinet cycle time is 16ms. A new motion task is only accepted after a completed handshake which cantake up to eight cycles.

In the function block status word, the fault number is indicated if a drive fault is active. If only a warning andno fault is active the warning number is indicated in the status double word. The number is only read on occur-rence. To reread the number an iReset has to be performed.

In the workbench setup, the drive command source DRV.CMDSOURCE has to be set to zero (Service) andthe DRV.OPMODE to two (positionmode). These settings are required for the drive to be position controlledby Telegram 400.

This project has been createdusing aSiemens CPU1212C-DC/DC/DC and an AKD-P00306-NBPN-0000with Firmware 1-16-00-002.

7.1.3 Detailed input descriptioniIDHardware identifier of the telegram of the corresponding Profinet Device (AKD). The HW_SubModule can belinked to this input or the value of the hardware identifier can be directly entered. The Value is found with theproperties of the telegram under hardware identifier.

iInitWith the iInit active the Profinet communication gets reset with an all zero send command.  Starts the pro-cess of mapping Telegram 400.  Only needs to run one time on program start to configure the data for Tele-gram 400.  Can be activated subsequent times to reinitialize the function block.  It acts as aPLC/communication reset.

iEstopExecutes an immediate QuickStop.  STW1Bit2 is set to 0. All motion is brought to halt and the drive is soft-ware disabled. This uses DRV.DISMODE and the Controlled Stop parameters.  To recover, iReset has to beexecuted once.  It inhibits all other STW1 commands until the controlled stop is complete.  Only one scan isrequired to start the controlled stop function. Multiple scans are required waiting for motion to stop, before anyother STW1 bits are valid. It sets all STW1 bits=0 whenmotion stops.

iSW_ENABLE0 = disables the AKD

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 21

Page 22: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

1 = enables the AKD

Handles the proper state machine sequence for enabling the drive.  Requires several scans depending onstatemachine.

iStop1 = Stop of all motion in progress without disabling the AKD.  Commands a stop and pause of themotion task(STW1 bits 4 and 5 = 0) and clears the bits that start jog and homemoves (STW1 bits 8, 9, 11, 12 = 0).

iReset1 = Reset of all active drive faults. The instruction gets executed once per rising edge.  It turns on STW1 bit 7and then turns it off after 3 scans. Only 1 scan required to start the reset.

iStart_Homing1= Starts the homing according to the setup done inWorkbench. The iCmdPos sets the homing distance(HOME.DIST) in the AKD, which performs an immediate absolute move after homing The instruction getsexecuted once per rising edge.

iStart_JogStarts a jogmove.  Uses iCmdVel as the jog speed, and iCmdAcc and iCmdDec for the ramps. iCmdVel,iCmdAcc, and iCmdDec must be non-zero for a jogmove to start.

A negative speed setpoint commands a jogmove in the negative direction.

STW1 bit12=1 is set during enable process.  STW1 bit 8 is used for the start jog command.

The axis needs to be homed to execute this command.  Requires only one scan to start or stop the jogmove. Deactivating this input will stop the jogmove.

iStart_MoveStarts amotion task positionmove. iMTNum defines whichmotion task is started. If iMTNum is set to0x8000, then the “direct motion task” configured with the iCmdxxx parameters is executed. The instruction isexecuted once per rising edge. The execution can take up to eight scans, during which time the iStart_Moveis ignored.

Turns on STW1 bit 6 to start themove, and looks for the "move acknowledgement" to turn off bit 6 after themove has started.

Requires only momentary activation of this input for one scan to start themove, assuming no stop, home, orjog commands are active.

Requires being deactivated for at least one scan after themove starts before triggering a new start move com-mand.

Note: The AKD prevents any other motion (positionmove, jog, or homing) from being started while any ofthese types of moves are in progress. The current motionmust complete prior to setting the start bits for a sub-sequent positionmove, homingmove, or jogmove.

iMT_PausePauses (temporarily interrupts) amotion task.

Activating this input sets STW1 bit 5 = 0 to pause themove.

When this input is deactivated (bit 5 set back to 1), themove will continue from where it paused. If a Stop or aSoftware disable gets executed, the continuing option is suspended.

22 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 23: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

iMT_MoveTypeSelects the type of positionmove: 0 = Relative, 1 = Absolute.

This is the telegram data referred to in the AKD Profinet manual as “MDI_MOD”.

iMTNumSelects themotion task to be executed.  This is the telegram data referred to in the AKD Profinet manual as“SATZANW”.

A value of 32768 (0x8000) selects the "Direct Motion Task", which uses theMDI profile data in the telegram(iCmdxxx inputs) to define the Direct Motion Task (Motion Task 0).

Any value from 1 to 128 selects a preconfiguredmotion task saved in the drive.

iCmdPosTarget positon/distance for the direct motion task. This is the telegram data referred to in the AKD Profinetmanual as “MDI_TARPOS”.

The position resolution is per default scaled with 2^16 counts/rev. The resolution setting can be adjusted withPNU 1002.

iCmdPos * 360° / Value PNU 1002 = Position in degrees.

It is also used for HOME.DIST (distance to bemoved after homing).

iCmdVelTarget velocity for the direct motion task or real time jog command. This is the telegram data referred to in theAKD Profinet manual as “MDI_VELOCITY”.

The velocity is scaled with 2^32 equals 12,000 rpm.

iCmdVel * 12000 rpm / 2^32 = Velocity in revolution per minute.

iCmdAccTarget acceleration for the direct motion task or real time jog command. This is the telegram data referred to inthe AKD Profinet manual as “MDI_ACC”.

The acceleration is per default scaled with 2^16 equals 50,000,000 rpm/sec. The smallest possible value foracceleration is 763 rpm/sec. To change the interpretation of an acceleration value, the PNU 1008 has to beset to the accordingminimum value.

iCmdAcc / value PNU 1008 = Acceleration in revolution per minute per second.

iCmdDecTarget deceleration for a direct motion task or real time jog command. This is the telegram data referred to inthe AKD Profinet manual as “MDI_DEC”.

The deceleration is per default scaled with 2^16 equals 50,000,000 rpm/sec. The smallest possible value foracceleration is 763 rpm/sec. To change the interpretation of a deceleration value, the PNU 1008 has to be setto the accordingminimum value.

iCmdDec / value PNU 1008 = Acceleration in revolution per minute per second.

For amore detail instructionmanual use the AKD workbench help at the designated commands.

7.1.4 Detailed output description

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 23

Page 24: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

oStatusShows the actual status word one (ZSW1) in the low word.

Shows any active fault or warning number in the high word.

oPositionActual position of the axis (XIST_A) as 32 Bit DWord. The position resolution is per default scaled with 2^16counts/rev. The resolution setting can be adjusted with PNU 1002.

oPosition * 360° / Value PNU 1002 = Position in degree.

oVelActual speed of the axis (NIST_A) as 16 Bit Word. The velocity resolution is with 2^15 equals 12000 rpmscaled.

oVel * 12000 rpm / 2^15 = Velocity in revolution per minute.

oCurrentActual current of the axis (ITIST_GLATT) as 16 Bit Word. The current resolution is with 2^14 equals themax-imum current of the drive.

oCurrent * DRV.IPEAK / 2^14 = Current in ampere.

Multiplied with the KT of themotor, this gives the actual Torque.

oEnabledIndicates that the drive is enabled.

oErrorIndicates an error in the communication or the PLC command execution.

oMovingIndicates an active discrete or continuous motion in progress, (jogging, motion task or homing).

oHomedIndicates that the homing has been done successful. This must be TRUE to start any motion task or real timejogging.

oInPosIndicates that the actual position is within MT.POSWND, of the target position, of the executingmotion task.Themovement doesn’t have to be finished at this moment. When amotion task is started, the oInPos alwaysgoes Zero for aminimum of one cycle. This also happens if themotion task called gives an error or doesn’t doany movement at all.

oFaultIndicates a fault on the AKD. The corresponding fault number is in the status word or can be read with PNU947

24 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 25: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

oWarningIndicates a warning on the AKD. The corresponding warning number is in the status word or can be read withPNU 2791-2793.

7.2 Direct Parameter Access Function Block

7.2.1 General DescriptionThe direct parameter access works with the second function block “AKD_PNU”. This provides access to allavailable AKD parameters that are assigned a PNU number.

Variable Name Data Type Direction DescriptionEN Bool In Call of the DB

iID HW_IO In Hardware identifier of the corresponding telegram

iStartRequest Bool In Starts a parameter request

iRequestType Bool In Request type: 0 = read, 1 = write

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 25

Page 26: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

Variable Name Data Type Direction DescriptioniFormat Int In Format of the requested parameter: 0x41, 0x42, 0x43

iPNUnumber Word In PNU address of the requested parameter

iPNUsubIndex Word In PNU address index of the requested parameter

ENO Bool Out DB call done

oActive Bool Out Request in progress

oDone Bool Out Request done

oError Bool Out Request failed

oStatus DWord Out Status of xxREC function if data exchange fails

ioData DWord In/Out iWrite = 1: data to be written

iWrite = 0: data read

PNURead RDREC Static Read function for the service data channel objects

PNUWrite WRREC Static Write function for the service data channel objects

bDoWrite Bool Static Start write command

bDoRead Bool Static Start read command

byReadArray[0..147] Byte Static Data array for the read command

byWriteArray[0..15] Byte Static Data array for the write command

bPNUWriteBusy Bool Static Write command active

bPNUWriteDone Bool Static Write command finished

bPNUWriteError Bool Static Write command failed

dwPNUWriteStatus DWord Static Write command status

bPNUReadBusy Bool Static Read command active

bPNUReadDone Bool Static Read command finished

bPNUReadError Bool Static Read command failed

dwPNUReadStatus DWord Static Read command status

wDataLenght Word Static Length of the read data

bReqActive Bool Static Rising edge of a new request

wLenght Word Static Length of the write data

byReference Byte Static Reference number of the last request

bReadActive Bool Static Read common execution

bWriteActive Bool Static Write command execution

7.2.2 NotesThe Format of the requested parameter must be 0x41, 0x42, or 0x43.

In readmode, (iRequestType = FALSE), the value of ioData always represents the last read data. In readmode, ioData is read-only.

Reference the AKD parameter “PN.POSSCALE” for information on position scaling for PNU’s with indexgreater than 2000.

7.2.3 Detail input description

26 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 27: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

iIDHardware identifier of the telegram of the corresponding Profinet Device (AKD). The HW_SubModule can belinked to this input or the value of the hardware identifier can be directly entered. The Value is found with theproperties of the telegram under hardware identifier.

iStartRequestStarts a read or write command. The instruction gets executed once per rising edge.

iRequestTypeSets themode to read or write.

0 = Read

1 = Write

iFormatSets the format (data size) of the requested parameter. If this value is outside the three possible values, anerror is indicated.

0x41 = Byte, 8Bit

0x42 = Word, 16 Bit

0x43 = DWord, 32 Bit

iPNUnumberPNU address of the requested parameter. This can be seen in the AKD Profinet manual or in theWorkbenchhelp.

iPNUsubIndexPNU subindex of the requested parameter.This can be seen in the AKD Profinet manual or in theWorkbenchhelp.

ioDataOutput of the read data if iRequestType = FALSE, the value is updated when a new request is started. Duringa request the data is zero.

Input if the data is written, iRequestType = TRUE. In write mode, the data is not changed at all in the functionblock.

7.2.4 Detail output descriptionoActiveIndicates a request in progress.

oDoneIs set TRUE with every successful request. The Data are valid form this moment. Done is reset with a newrequest or a termination of the connection.

oError

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 27

Page 28: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

Indicates an error with PNUWrite, PNURead or a validation fault. A validation fault is aninvalid input.

oStatusIndicates the PNUWrite or PNURead status, only if the function has an error.

7.3 Edit Motion Task Position Function Block

7.3.1 General DescriptionThe function block, “AKD_Edit_Motion_Task_Position”, allows editing of the position value of any savedmotion tasks in the AKD drive, other thanMotion Task 0. Themotion task must already exist and be saved inthe AKD. This function block can be used as an alternative to the PNU read/write FB to simplify the processof writing to amotion task position value.

Variable Name Data Type Direction DescriptionEN Bool In Call of the DB

iID HW_IO In Hardware identifier of the corresponding telegram

iStartRequest Bool In Starts a parameter request

iTaskNumber Word In Number of themotion task to be edited

28 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 29: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

Variable Name Data Type Direction DescriptioniPosition DWord In New position value

ENO Bool Out DB call done

oActive Bool Out Request in progress

oDone Bool Out Request done

oSuccess Bool Out Write was successful

oError Bool Out Request failed

oStatus DWord Out Status of xxREC function if data exchange fails

PNURead RDREC Static Read function for the service data channel objects

PNUWrite WRREC Static Write function for the service data channel objects

bDoWrite Bool Static Start write command

bDoRead Bool Static Start read command

byReadArray[0..147] Byte Static Data array for the read command

byWriteArray[0..15] Byte Static Data array for the write command

bPNUWriteBusy Bool Static Write command active

bPNUWriteDone Bool Static Write command finished

bPNUWriteError Bool Static Write command failed

dwPNUWriteStatus DWord Static Write command status

bPNUReadBusy Bool Static Read command active

bPNUReadDone Bool Static Read command finished

bPNUReadError Bool Static Read command failed

dwPNUReadStatus DWord Static Read command status

wDataLenght Word Static Length of the read data

bReqActive Bool Static Rising edge of a new request

wLenght Word Static Length of the write data

byReference Byte Static Reference number of the last request

bReadActive Bool Static Read common execution

bWriteActive Bool Static Write command execution

7.3.2 NotesThe function block performs a PNU write sequence that includes writing toMT.NUM, MT.LOAD, MT.P, andMT.SET.  It then reads the position value back from the task after issuing a new MT.LOAD command, andcompares the value with what was written.  If the values are not the same, it tries the sequence a secondtime.

If oDone is TRUE and oSuccess is FALSE, it means that the FB attempted to write the new position valuetwice and failed both times.  This can happen if themotion task was not created and saved in the AKD drive’smemory.

Reference the AKD parameter “PN.POSSCALE” for information on position scaling for PNU’s with indexgreater than 2000.

AKD PROFINET | 7   Function Block Reference

Kollmorgen | kdn.kollmorgen.com | August 2017 29

Page 30: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 7   Function Block Reference

7.3.3 Detail input descriptioniIDHardware identifier of the telegram of the corresponding Profinet Device (AKD). The HW_SubModule can belinked to this input or the value of the hardware identifier can be directly entered. The Value is found with theproperties of the telegram under hardware identifier.

iStartRequestStarts the sequence to write themotion task position. The instruction gets executed once per rising edge.

iTaskNumberSelects themotion task. Must be a value ranging from 1 to 128.

iPositionSets the value of the position to write into themotion task.

7.3.4 Detail output descriptionoActiveIndicates a request in progress.

oDoneIs set TRUEwhen the request has been completed. oDone is reset with a new request or a termination of theconnection.

oSuccessIs set TRUEwhen the position value has been written successfully. oSuccess is reset with a new request ora termination of the connection.

oErrorIndicates an error with PNUWrite, PNURead or a validation fault. A validation fault is aninvalid input.

oStatusIndicates the PNUWrite or PNURead status, only if the function has an error.

30 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 31: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

8 Creating a New ProjectPrior to creating a new project, install the GSD file for the AKD. (Under the Options menu)

After creating a new project, go into the device configuration screen to configure the PLC, AKD-Profinet-Device, and the Profinet network

See instructions below for each part of this setup.

8.1 PLC Device SelectionThe easiest way to select the PLC device is to select the entry “Unspecified CPU 1200”.

l Double-click “Add new device”.l Expand the list of S7-1200 series CPU’s.l Select “6ES7 2XX-XXXXX-XXXX” under “Unspecified CPU 1200”.l Select Version V4.0l Click the hyperlink “detect” to auto-detect the CPU.l Click “Start search”.l Click “Detect”.

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 31

Page 32: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

8.2 PLC IP AddressConfigure the PLC with any compatible IP address that you want to use.  This is the IP address that is usedfor the Profinet communication between the PLC and the AKD drive. 

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Device View”.l Click on the image of the CPU.l Click on “Properties”. (at the bottom)

32 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 33: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

l Click on “Ethernet addresses.”l Enter the IP address you want to use for the PLC.

8.3 GSD File InstallationTo control the AKD by the PLC, the drivemust be added in the network list and be recognized as a Profinetdevice. The device configuration for the Kollmorgen AKD drive is stored in theGSDML-V2.1-Kollmorgen-AKD-20141120.xml file.

TIA-Portal allows adding a user defined device description file under Options -> Install general station descrip-tion file (GSD). The specified file can be chosen and added to the hardware catalog.

If the Hardware Catalog already contains the following folders, then there is no need to install the GSD file:

l Other field devices -> PROFINET IO -> Drives -> Kollmorgen -> AKD -> Headmodulel Other field devices -> PROFINET IO -> Drives -> Kollmorgen -> AKD -> Module.

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 33

Page 34: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

8.4 Add AKD DeviceIf you created a new project or deleted the AKD device from the sample project, the AKD-Device can befound in the Hardware catalog in the category Other field devices -> PROFINET IO -> Drives -> Kollmorgen -> AKD -> Headmodule. Drag and drop the AKD-PN-DEVICE into the Network View. 

34 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 35: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

8.5 AKD Device NameThe Profinet name of the device has tomatch the name of the AKD drive configured inWorkbench. You canset the name in either or both places. The default name specified by the GSD file is “AKD-PN”.

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Topology View” tab.l Click on the icon of the AKD-Device.l Select the “Device View” tab.l Click on the icon of the AKD-Device (again).l Right-click on the device name and click “Rename”.l Enter the name you want to use.

8.6 AKD IP AddressSet the AKD drive’s IP address in the Device Properties for the AKD device. This is the same IP address thatis configured by either the rotary switches on the AKD drive or inWorkbench.  It needs to have the same sub-net as the PLC’s IP address.

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 35

Page 36: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

l Open the “Device Configuration” screen. (Expand PLC_1 in the Project Tree)l Select the “Topology View” tab.l Click on the icon of the AKD-Device.l Select the “Device View” tab.l Click on the icon of the AKD-Device (again).l Click on “Properties”. (at the bottom)l Click on “Ethernet addresses”.l Enter the IP address that you want to use for the AKD drive.

8.7 Create the Profinet NetworkLink the AKD device to the Profinet master to establish the Profinet Network (PN/IE). This is done by clickingon the blue “Not assigned” hyperlink in the AKD device icon and selecting “PLC_1.PROFINET interface_1.”

36 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 37: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

8.8 Add the Telegram

After the Profinet network connection is defined, the appropriate telegrammust be added to the AKD-Device.Drag and drop the telegrammodule from the hardware catalog into the Device Overview, (the possible areahighlights in blue under the interface line).

The telegram can be found in the Hardware catalog in the category Other field devices -> PROFINET IO ->Drives -> Kollmorgen -> AKD -> Module.

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 37

Page 38: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

38 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 39: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

Other telegrams that are supported by the AKD drive and descriptions of the data they contain are listed in theAKD Profinet manual. The cyclic communication function block in the sample project works with Telegram400, but you can use any of the available telegrams if you create a function block to support it. Telegram 400consists of the data in telegram 9 plus some additional freemappable bytes.

8.9 Telegram I/O AddressesIt is important that the input and output start addresses of the telegram data are set to 256 or greater, oth-erwise there can be conflicts in communication.

8.10 Compile and DownloadThe project must be compiled and downloaded to the PLC.

l Select the “PLC_1” heading or the “Program blocks” heading in the project tree.l Click the “Compile” button in the toolbar.l Wait for the compile to complete.l Click the “Download” button in the toolbar.l Select the PN/IE network and your network hardware and start the search for the PLC.l Select the PLC in the search results and click “Load”.l The software will give you some instructions or options prior to downloading (click “Load”).

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 39

Page 40: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

40 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 41: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

8.11 Go OnlineClick the GoOnline button on the toolbar to connect to the PLC. When the software is online, you will see theheader bars turn orange.  There are colored status indicators next to some of the entries in the Project treeand in the Network Overview.  These indicators should be green.  If the indicators are red, then an errorexists.

One example of an error that is common is when the drive name has been saved inWorkbench, but the drivehas not yet been rebooted.  The PLC will not recognize the name of the drive and throw and error.

8.12 PLC Project ComponentsAt this point, the project is created and the Profinet network is set up, but there is no program.  You can startwriting the program from scratch, or you can import the project components from the sample project.  Import-

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 41

Page 42: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

ing from the sample project uses a global library.  A global library is a location on your PC that is accessible byany project in TIA Portal.

l Open the sample project.l Click on Libraries.l Create a new global library.l Drag and drop the following files into the “Master copies” section of the library.l Close the project.l Open your new project.l Drag and drop each file from the library into the appropriate section of the Project Tree.l Compile and download.

In order to use the function blocks from the sample project, the necessary files are:

FB1 – Function block for telegram 400

FB2 – Function block for PNU access

UDT – PLC data type file (maps the FB data to the telegram)

Optionally, you can use the ladder program from the sample project.  The files are:

Main program

DB1 –Data block for FB1

DB2 –Data block for FB2

Tag table

42 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 43: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

8.13 Using Function Blocks in New Ladder ProgramIf you don’t want to use the ladder program from the sample project, you can open any ladder program and addthe function blocks. When you place a function block into the ladder, the software will prompt you to create adata block associated with that function block.  Name it appropriately, so you can identify which functionblock and axis it is for. 

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 43

Page 44: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

AKD PROFINET | 8   Creating a New Project

The inputs and outputs of the function block must be defined.  Commonly, tags are used these.  You can dragand drop tags from the tag table or select them from the available list for each input and output on the functionblock.

The iID is the hardware submodule identification.  This tells the function block which telegram is being usedfor the AKD-Device.

8.14 Multi-Axis

44 Kollmorgen | kdn.kollmorgen.com | August 2017

Page 45: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

The sample project can be easily modified for amulti-axis system containingmultiple AKD drives by addingduplicate AKD-Devices, function blocks, data blocks, and tags for each axis. It is important to keep the nam-ing of the function blocks, data blocks, and tags in a convention that is easily understood so it is clear whichones are for which axis.

AKD PROFINET | 8   Creating a New Project

Kollmorgen | kdn.kollmorgen.com | August 2017 45

Page 46: AKD PROFINET Manual english - Kollmorgen · 2017. 9. 20. · 1 TableofContents 1 TableofContents 3 2 ProjectNotes 5 3 ProjectComponents 6 4 IntroductiontotheSampleProject 7 5 ConfigurationoftheAKD

About KOLLMORGEN 

Kollmorgen is a leading provider of motion systems and components for machine builders. Through world-classknowledge inmotion, industry-leading quality and deep expertise in linking and integrating standard and customproducts, Kollmorgen delivers breakthrough solutions that are unmatched in performance, reliability and ease-of-use, givingmachine builders an irrefutable marketplace advantage.

Join the Kollmorgen Developer Network for product support. Ask the community ques-tions, search the knowledge base for answers, get downloads, and suggest improve-ments.

North AmericaKOLLMORGEN203A West Rock RoadRadford, VA 24141USAWeb: www.kollmorgen.comMail: [email protected].:  +1 - 540 - 633 - 3545Fax:  +1 - 540 - 639 - 4162

EuropeKOLLMORGEN Europe GmbHPempelfurtstraße 140880 RatingenGermanyWeb: www.kollmorgen.comMail: [email protected].:  +49 - 2102 - 9394 - 0Fax:  +49 - 2102 - 9394 - 3155

South AmericaKOLLMORGENAvenida Tamboré, 1077 Tamboré -Barueri - SP BrasilCEP: 06460-000Web: www.kollmorgen.comTel.:  +55 11 4191-4771

China and SEAKOLLMORGENRoom 202, Building 3, Lane 168,Lin Hong Road, Changning DistrictShanghaiWeb: www.kollmorgen.cnMail: [email protected].:  +86 - 400 661 2802