Вы находитесь на странице: 1из 76

DCS800

Application Program
IEC61131-3 Target Installation Guide and Start Up
2

Table of contents

Table of contents 3 2

Introduction to the guide 4H 5


Chapter overview ....................................................................................................................... 5 5H

Compatibility .............................................................................................................................. 5 6H

Safety instructions...................................................................................................................... 5 7H

Reader ....................................................................................................................................... 5 8H

About this manual ...................................................................................................................... 6 9H

Related publications................................................................................................................... 6 10H

Glossary ..................................................................................................................................... 6 11H

Installation of CoDeSys Program 12H 7


Chapter overview ....................................................................................................................... 7 13H

Requirements............................................................................................................................. 7 14H

CoDeSys version and further updates ....................................................................................... 7 15H

Start installation from Tools CD ROM ........................................................................................ 7 16H

Description ................................................................................................................................. 8 17H

Installation of DCS800 Target 18H15


Chapter overview ..................................................................................................................... 15 19H

DCS800 Target ........................................................................................................................ 15 20H

Start program ........................................................................................................................... 16


21H

Setting Communication Parameters 22H19


Chapter overview ..................................................................................................................... 19 23H

Create a new channel .............................................................................................................. 19 24H

Communication Parameters..................................................................................................... 21 25H

Memory Card 26H22


Chapter overview ..................................................................................................................... 22 27H

Overview .................................................................................................................................. 22
28H

Requirements........................................................................................................................... 22 29H

Plug-In / Pull-Out...................................................................................................................... 2330H

Downloading ............................................................................................................................ 2331H

Uploading................................................................................................................................. 23
32H

Saving Binary Code ................................................................................................................. 23 33H

Storing parameter .................................................................................................................... 23 34H

Start Up Application 35H24


Chapter overview ..................................................................................................................... 24 36H

Interface between DCS800 and IEC ........................................................................................ 24 37H

New project .............................................................................................................................. 24


38H

Library Manager ....................................................................................................................... 27 39H

DCS800 Drive Library .............................................................................................................. 27 40H

Table of contents

3ADW000199R0201 DCS800 Application Program e b


3

Task Configuration................................................................................................................... 28 41H

Save as template ..................................................................................................................... 29 42H

Application Source ................................................................................................................... 30 43H

New Parameter Groups ........................................................................................................... 30 44H

Parameter Manager...................................................................................................... 30 45H

Create a new list........................................................................................................... 31 46H

Create Parameter ......................................................................................................... 32 47H

Identification............................................................................................................................. 34
48H

Registration .................................................................................................................. 34
49H

Setting .......................................................................................................................... 35
50H

Protecting................................................................................................................................. 36
51H

Password for project files ............................................................................................. 36 52H

Upload Protection out of DCS800 ................................................................................ 37 53H

Build the Project ........................................................................................................... 38 54H

Create Boot Files.......................................................................................................... 39 55H

Downloading into DCS800 56H40


Chapter overview ..................................................................................................................... 40 57H

Downloading program by using CoDeSys ............................................................................... 40 58H

Downloading source by using CoDeSys .................................................................................. 42 59H

Downloading program and source by using DWL.................................................................... 42 60H

Upload from DCS800 61H44


Chapter overview ..................................................................................................................... 44 62H

General .................................................................................................................................... 44
63H

Uploading of program code...................................................................................................... 44 64H

Uploading of source code ........................................................................................................ 47 65H

Delete a program 66H51


Chapter overview ..................................................................................................................... 51 67H

General .................................................................................................................................... 51
68H

Functions ................................................................................................................................. 51
69H

Delete a program from the Memory Card ................................................................................ 52 70H

Appendix A - Libraries A1 71H

Overview about available libraries...............................................................................A 1 72H

DCS800 Drive Library..................................................................................................A 1 73H

Arithmetic.....................................................................................................................A 1 74H

Special.........................................................................................................................A 1 75H

Winder .........................................................................................................................A 1 76H

DCS800 Drive Library .............................................................................................................A 2 77H

AnIn .............................................................................................................................A 2 78H

AnOut ..........................................................................................................................A 2 79H

DigIn ............................................................................................................................A 3 80H

DigOut .........................................................................................................................A 4 81H

DriveCtrl.......................................................................................................................A 5 82H

DriveState....................................................................................................................A 7 83H

EventInit ......................................................................................................................A 9 84H

EventSet ....................................................................................................................A 10 85H

Table of contents

3ADW000199R0201 DCS800 Application Program e b


4

MulDiv........................................................................................................................A 86H12
ParGet .......................................................................................................................A 87H13
ParProtect..................................................................................................................A 88H14
ParRead ....................................................................................................................A 89H15
ParSet........................................................................................................................A 90H16
ParWrite.....................................................................................................................A 91H18
ProgProtect................................................................................................................A 92H19
SquareRoot ...............................................................................................................A 93H19
Task...........................................................................................................................A 94H20
TaskCycle..................................................................................................................A 95H20
Appendix Registration R1 96H

Registration Form ...................................................................................................................R 1 97H

Request Form .........................................................................................................................R 3 98H

Table of contents

3ADW000199R0201 DCS800 Application Program e b


5

Introduction to the guide

Chapter overview
The chapter gives general information about the documentation.

Compatibility
The PC program CoDeSys is the hardware independent
IEC 61131-3 programming system under Windows for creating con-
troller applications. ABB DC Drives is using this programming sys-
tem for DCS800.

DCS800 target files and DCS800 libraries are necessary for devel-
oping a software application. With functions out of DCS800 libraries
the software application can be connected from and to firmware pa-
rameters and firmware signals.

Additional libraries contain further special function blocks, which


ease creating applications.

Safety instructions
WARNING! The safety instructions for the appropriate DCS800 DC
Drive model must be studied carefully before doing program modifi-
cations or starting any work with the unit.
Neglecting the safety instructions may cause damage to the equip-
ment, physical injury or death.

Especially by doing software applications, read also the software


function specific warnings and notes before changing the default
settings of the function. For each function, the warnings and notes
are given in the Firmware Manual in the subsection describing the
related user-adjustable parameters.
Take care that the developed application will not constrain safety
functions like E Stop, Off or like monitoring functions.

Reader
The reader of the manual is expected to:
know the standard electrical wiring practices, electronic com-
ponents and electrical schematic symbols.

Introduction to the guide

3ADW000199R0201 DCS800 Application Program e b


6

About this manual


The documentation is to be used together with DCS800 firmware
manual. The firmware manual contains the basic information on the
drive parameters. This documentation gives more detailed informa-
tion about IEC programming for DCS800
How to install PC program CoDeSys
How to install target files.
How to install the Memory Card
How to start an application
How to use special features of DCS800
How to download an application into DCS800
Related publications
The user documentation of the drive also includes:
Firmware manual (3ADW 000 193)
Hardware manual (3ADW 000 194)
CoDeSys manual

Glossary
The following terms and abbreviations are used in this manual:

Binary code Compiled application program code for


downloading into DCS800. The exten-
sion is *.PRG
CoDeSys It is one of the most common IEC
61131-3 programming systems for
PLCs and industrial controllers. All five
programming languages of the stan-
dard are supported.
ControlBuilder DCS800 Software package of ABB on CD ROM;
contains programming tool CoDeSys,
plus required DCS800 target and plus
DCS800 Drive Library.
DCS800 template Basic application software for DCS800.
Download Transfer parameters or program from
user interface equipment (PC or panel)
to DCS800.
DWL Drive Window light is a personal com-
puter based commissioning and main-
tenance tool for ABB Drive products.
Project Application program of CoDeSys
Upload Transfer parameters or program from
DCS800 to user interface equipment
(PC or panel).

Introduction to the guide

3ADW000199R0201 DCS800 Application Program e b


7

Installation of CoDeSys Program

Chapter overview
The chapter describes the installation of the IEC61131-3 PC pro-
gram CoDeSys including the DCS800 target and the DCS800 basic
library.

Requirements
PC system requirements
Pentium II, 500MHz
128 MB RAM
70 MB hard disc required
Windows 98 / NT 4.0 / 2000 / XP
(MS Internet Explorer 4.0 or later required)
CD ROM drive
Free serial port (for connecting to DCS800)

DCS800 requirements
Memory Card

CoDeSys version and further updates


Before installing CoDeSys take care that no other version is in-
stalled.
Before installing a newer version please take care, that all used tar-
gets are released for a newer version.

Start installation from Tools CD ROM


Insert CD into CD ROM dive. The setup should start automatically.

If the program starts not automatically, please start the setup pro-
gram of CoDeSys installation directory from tools CD ROM.

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


8

Description
The description shows the most important windows of installation

Select a language for the setup:

Press OK.

Press Next

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


9

It is recommended to use the default “Destination Folder”. All further


instructions will describe using this default folder.
If another folder is desired, then change via “Browse…”, but re-
member always that you are using another folder.

Please use the default setting.

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


10

Accept or change the proposed program folder and then press


Next.

During installation the setup will also install Microsoft XML Parser.
Please follow these instructions.

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


11

Read the end-user license and select “I accept …”


Press Next …

Write your name and your company and then press Next.

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


12

After pressing Install the program will be installed.

Press Finish.

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


13

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


14

Before starting the program a restart of PC is necessary.

Installation of CoDeSys Program

3ADW000199R0201 DCS800 Application Program e b


15

Installation of DCS800 Target

Chapter overview
This chapter describes the installation of a target.

Please note:
After installation of DCS800 CDROM, which includes CoDeSys and
other PC tools, the DCS800 target is also installed. In this case
nothing is to do.
DCS800 Target
For DCS800 Programming the target file must be installed in addi-
tion to the programming tool.

The target file consists of two parts.

Target information for programming tool with the information of


CPU type, cycle times, RAM and FLASH size.
With the target information CoDeSys tool calculates free
memory space during compiling. The load of the cycle time is
calculated during online connection

The second part is the target (DCS800) specific library.


These function blocks are especially designed for DCS800
application programming.

Installation of DCS800 Target

3ADW000199R0201 DCS800 Application Program e b


16

Start program
Please start the program “InstallTarget” of CoDeSys tool of folder
Start programs.

For installation of e.g. DCS800 targets from DCS800 CDROM,


please press Open and look in the DCS800 subdirectory of CD-
ROM.

Installation of DCS800 Target

3ADW000199R0201 DCS800 Application Program e b


17

Select the file “DCS800_TRG.tnf” and press Open.

Installation of DCS800 Target

3ADW000199R0201 DCS800 Application Program e b


18

In window “Possible Targets” the DCS800 will be found.


Select it and press Install.
After installation the target of DCS800 will be found in window “In-
stalled Targets”.

Press Close for finishing the target installation program.

Note:
If the complete Customer CD-Rom is installed correctly, CoDeSys
and the necessary targets are installed automatically.

Installation of DCS800 Target

3ADW000199R0201 DCS800 Application Program e b


19

Setting Communication Parameters

Chapter overview
The chapter describes the setting of serial communication from PC
to DCS800.

Create a new channel


After starting program CoDeSys please select “Communication Pa-
rameters” of Online menu.

If there isn´t a created communication channel available, the follow-


ing window will be opened.

Setting Communication Parameters

3ADW000199R0201 DCS800 Application Program e b


20

Press New … and in the opened window write a name for the new
channel; e.g. PC-COM1---DCS800.

Select “Serial (RS232)” and press OK.

Attention:
If there is more than one Device connection, the DCS800 target is
not installed correctly. In this case check the target installation!

Setting Communication Parameters

3ADW000199R0201 DCS800 Application Program e b


21

Communication Parameters

Change the setting by double clicking on desired value as following:

Port COM1
(or another available port)
Baudrate 38400
Parity ODD
Stop bits 1
Motorola byteorder Yes

After setting press OK.

Setting Communication Parameters

3ADW000199R0201 DCS800 Application Program e b


22

Memory Card

Chapter overview
The chapter describes the handling with the Memory Card.

Overview

Requirements
The Memory Card is used for application programming with
DCS800. The Memory Card is a Compact Flash Card, which can
be purchased from ABB only.
The application is stored on this Memory Card. If desired, the
source code and compiled code of the application can be saved on
it.

Please note:
This Memory Card is specially formatted and cannot be read or
write with PC equipments.
Writing via PC will make Memory Card useless for DCS800

Memory Card

3ADW000199R0201 DCS800 Application Program e b


23

Plug-In / Pull-Out
Switch off the electronic supply.
Plug in or pull out the Memory Card and switch on the electronic
again.

Please note:
Don’t plug-in or don’t pull-out the memory card with supplied
DCS800!

Downloading
Download an application via CoDeSys (Login of Online menu) or
download the application via DriveWindow light (DWL).

Detailed information is available in chapter “Downloading into


DCS800”.

Uploading
Binary code and source code of an application can be uploaded, if
not protected.

Detailed information is available in chapter “Uploading from


DCS800”.

Saving Binary Code


Application code will be written into memory card by “Cre-
ate boot project” of Online menu.

Detailed information is available in chapter “Downloading into


DCS800”.

As soon as an application is saved the DCS800 will show alarm 142


(MemCardMiss), if the card is not plugged in or not working prop-
erly.
If DCS800 should run without the application, then the use of appli-
cation is to be disabled by setting parameter 16.06 to DisableAppl.

Storing parameter
DCS800 parameter setting can also be saved to and be loaded
from memory card by using parameter 16.06 (ParApplSave).

Memory Card

3ADW000199R0201 DCS800 Application Program e b


24

Start Up Application

Chapter overview
This chapter describes basic setting for building up a DCS800 ap-
plication.

Interface between DCS800 and IEC


The application software is embedded in the firmware of DCS800.
Signals for the application can be read out from parameters of firm-
ware.
It is also possible to write on firmware parameters.

New project
After starting CoDeSys program a new project can be started either
as a blank new with New out of File menu.

A new project can also opened with New from template … out of
File menu, if a project with presettings is saved before.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


25

The following describes a new project without presettings.

Select DCS800 as target.

The target setting contains the default setting. Without special


knowledge please use these default values and press OK.

The basis program is called PLC_PRG. Select the type Program


and the desired language of your application.
Then press OK.

Attention:
It is necessary that one program is called PLC_PRG. Further pro-
grams can have other names!
The program PLC_PRG will be called in every cycle at first.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


26

A new program window will be opened.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


27

Library Manager
Now do the basic settings.

Select the tab Resources and then the library manager.

DCS800 Drive Library


Function blocks are especially designed for DCS800 application
programming. These blocks are predefined interface function blocks
to drive firmware and used as a template for communication to the
firmware.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


28

For adding further libraries or for deleting press e.g. the right mouse
button.

Please note:
Please see Release Note for different libriries to operate with
DCS800 target.

Task Configuration
In tab Resources there can also be found the Task Configuration.

With double click the Task Configuration window will be opened.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


29

After using the right mouse button select Append Task.

Select a desired property, e.g. “20ms cycle”, and

More available tasks are Init, 5ms, 20ms, 100ms, 500ms and some
triggered by actions.

Save as template
For getting an application template save the “project” after basis
settings for DCS800 and after adding your “personally” libraries as
project; e.g. as “MyProjectTemplate”.

A new project can be started by using a saved template by opening


“New from template …” from File menu.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


30

Application Source
Now create your application by using libraries and IEC operators.

Please note:
DCS800 firmware (parameter and signals) can han-
dle only integer types. Real types must be converted
before writing to parameter or signal.

New Parameter Groups


With application programming new parameters or signals can be
created. The new parameters are handled from control panel or PC
Tool like original firmware parameters.
The groups 60 … 69 are reserved for new parameters created by
application programming. It is strongly recommended not to create
new parameters outside groups 60…69 to avoid firmware conflicts
and upgrading problems.

Parameter Manager
To create new parameters use the function of the parameters man-
ager. The new parameters provide functions:
default
maximum
minimum
scaling / enumeration
volatile / non volatile

Start Parameter Manager in tab Resources

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


31

Create a new list


After starting List… of Insert menu …

… the “Insert List” will be opened.

Select Variables and write a name for this List.

Please note:
The name of the list will also be shown as the name of the
group in the parameter list.
So it is recommended to insert a separate list for each pa-
rameter group!
It is not possible to select other types like parameters,
template and so on!

Then click OK

A new list is created.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


32

Create Parameter
Mark a desired list (group) and insert a line.

Hex-format

Click on field of new line, beginning with group, and insert the de-
sired and correct inputs:

Example
Group group number of parame- 60 as parameter 60.01
ter.
Index index number of parame- 01 as parameter 60.01
ter
Name Name of parameter, My First
which will also shown as
parameter name in panel
or in PC tools.
The name can get maxi-
mal 17 characters.
Var Name of Variable of pro- .iPara_First
gram. A dot before this
variable means, that it
handled as a global one
Def Default value, which is set 0
after downloading applica-
tion.
Min Minimal value -1000
Max Maximal value 1000

Note:
Global variables can be used in several programs. For new created parameters it is necessary to
define global variables.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


33

Unit Unit of this parameter, No


which has to be shown in
panel or tool.
Assortment:
No, A, V, Hz, percent, s, h,
rpm, kAh, deg, kHz, mA,
mV, KW, W, kWh, ms,
Celsius, mH, mOhm, per-
cent_ms
DispTyp Type of parameter, in Int
which the value has to be
shown.
Assortment:
Char, Byte, Int, Word
Enum, Hex, Bin.
DecPt Digits after decimal point. 0
Assortment:
0, 1, 2, 3
ReadOnly Parameter can only be not selected
read.
Parameter selected as
read only, can be handled
as signals.
NoSav Parameter will not be not selected
saved
OFF Before changing the value not selected
the drive has to be
switched off.
Result of Example:

Please note:
After e.g. parameter manager is reopened, group and in-
dex will be shown in Hex-format:
Group 60 = 16#3C and Index 01 = 16#1.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


34

Identification
CoDeSys offers the possibility to identify the developed application
by means of “Project Info”.
The first 12 characters of the fields “Title” and “Version” are shown
in the drives parameter group 4 “Information“. “Title” is written to
ApplicName (4.03) and “Version” is written to ApplicVers (4.12). So
the identification can also be read by the control panel.

At the time of developing an application the need of a long-living


identification is often not well considered.
Sooner or later the author of the application is unknown. This is no
problem as long as the drive is running. But in case of service a
proper naming and description of the application will help to avoid
problems.

Registration
Due to this fact we offer following identification possibility:

The first 2 characters of the field title contains the interna-


tional country name code of your country; e.g. US for United
States or CN for China or DE for Germany.
the next 4 characters of the field title are reserved for the
shortened name of your company; e.g. USABB_ or
DECUST
all following characters can be used at will.

Please register the first 6 characters of your personalised identifica-


tion with us. So we will be able to find information of each registered
application.
Additional we can inform you about the news of DCS800 Applica-
tion Programming.

Your application form is available in the appendix “Registration” at


the end of this manual.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


35

Setting

The project information window can be found under “Project Info


…” of Project pull down menu:

The first 12 characters of the fields “Title” and “Version” will be


shown in parameter group 4:

Title: ApplicName (4.03)


Version ApplicVer (4.12)

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


36

Protecting
Projects are to be saved on PC. Projects may be protected with two
levels of passwords for read or write protection.

The binary code is to be downloaded into Memory Card of DCS800.


But also the source code can be downloaded.

Protecting of project files and/or an upload protecting of project


code can protect against illegal using.

Please think also about the consequences:


- With an unknown or forgotten password you can never use this
application.
- With a protected project code you can never duplicate an exist-
ing memory card, which could be important in service case.

Password for project files


The CoDeSys program supports two several level of password for
protecting the program source using with PC.

Select Options ... from Project menu.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


37

Select Passwords of Category.

Choose a password and write it in the field


Password for protecting the source files. The source files can
not be opened without this password.
Write Protection Password
for write protecting the source files. The source
files can be opened without this password, but
cannot be modified.

Please note:
If it is necessary to use a password, then take care that
you cannot forget it.

Upload Protection out of DCS800


The DCS800 Drive Library contains the function block ProgProtect.
If activated, e.g. in Init task, it is not possible to upload the applica-
tion from the drive. Further it is impossible to check the downloaded
application.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


38

Build the Project


After application is completed build up the project by using Build
(F11) of Project menu

Please check in the message window that there are no error and no
warnings. Otherwise check your application.

Analyze errors:
A click to an error shows the relevant line in the program.

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


39

Create Boot Files


For downloading by using DriveWindow light (DWL) boot files are
necessary.

While logged out please select “Create boot project“ of Online


menu.

Accept with Yes.

Two files are created with the names:


<project name>.PRG Æ Boot project
<project name>.CHK Æ Checksum for boot project code

Start Up Application

3ADW000199R0201 DCS800 Application Program e b


40

Downloading into DCS800

Chapter overview
The chapter describes the possibilities of downloading software ap-
plication into DCS800 either by using CoDeSys tool or by using
Drive Window light (DWL).

Downloading program by using CoDeSys


After software application is built up without errors, it can be
downloaded into DCS800.

Start with Login of Online menu.

If program has changed, the following window appears.

After pressing Yes software application will be downloaded.

Then the tool starts downloading

If parameters are created with CoDeSys, the following window will


appear.

Downloading into DCS800

3ADW000199R0201 DCS800 Application Program e b


41

Please note that the program is still not saved.

After setting in Run (F5) mode the application software is running.

For saving in Memory Card; please select “Create boot project” of


Online menu.

The good result will be shown as:

Downloading into DCS800

3ADW000199R0201 DCS800 Application Program e b


42

Downloading source by using CoDeSys


If desired the source can also be saved into Memory Card as fol-
lowing:

Attention:
If the source code is saved on the Memory Card, it is possible to
upload the program with another PC.

Downloading program and source by using DWL


Connect the PC with the DCS800 and start the DWL program.

Change to Offline-Mode.

In Tools menu select “CoDeSys Application Download”

Attention:
The ABB Download Tool uses the same connection settings like the
DriveWindow light software. Therefore connect first the Drive Win-
dow Light parameter list with the drive and then change in Offline-
Mode.

Downloading into DCS800

3ADW000199R0201 DCS800 Application Program e b


43

Select the program file <project>.prg, which is to be downloaded.


Selection “Send Symbol File” is not supported yet.
Selection “Send Symbol File” is to be chosen if the application
source should also be saved to the memory card.
For downloading the following files are to be available:
<project>.prg
<project>.chk
<project>.src (if source saving to Memory Card is desired)
Then press Send.

During downloading the status will be shown as following:

Please note: The filenames <project>.prg and <project>.chk will be


downloaded as DEFAULT.PRG and DEFAULT.CHK.
For activating the application software set parameter
16.06 (ParApplSave) = EnableAppl

Downloading into DCS800

3ADW000199R0201 DCS800 Application Program e b


44

Upload from DCS800


Chapter overview
This chapter describes the possibilities of uploading.

General
Uploading of program code is possible with CoDeSys program, if
the code is not protected with function block ProgProtect.

Uploading of source code is possible with CoDeSys program, if


the source code is downloaded before and if not protected with
function block ProgProtect.

Uploading of any code by using DriveWindow light (DWL) is not


possible.

Uploading of program code


Because all program code files are called DEFAULT, it is recom-
mended to create a new directory before uploading.

Connect the CoDeSys program with the drive.

For setting in Login mode please open a new project,

select DCS800 as target

and select OK on New POU window.

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


45

Now Login can be done

The program will find out, that the program is different.

Please press only No!

Start “Read file from PLC” of Online menu.

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


46

Select the new directory in “Save in”.

Write DEFAULT.PRG as “File name”.

Please note: The filename of program code is only


DEFAULT.PRG in upper letters.

Press Save.

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


47

Now upload also the file of checksum.

Write DEFAULT.CHK as “File name”.

Please note: The filename of program code is only


DEFAULT.CHK in upper letters.

Press Save.

After uploading the new opened project is to be closed without sav-


ing.

Both uploaded files may be renamed for better identification.

Both uploaded files can be used for further downloading by using


CoDeSys program or by using DWL.

Uploading of source code


Provided that the source code is saved in the Memory Card it can
be uploaded as following.

It is recommended to create a new directory for better identification.

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


48

Then open a project

and select “Open project from PLC”

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


49

Select DCS800 as target.

and the communication channel.

Then press OK.

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


50

Now the project code will be uploaded …

After loading it can be saved. The found identification is the preset


of file name.

If desired change the file name and press Save.

Now you can start working with this “opened” project.

Upload from DCS800

3ADW000199R0201 DCS800 Application Program e b


51

Delete a program
Chapter overview
This chapter describes the possibilities for the erasure of a pro-
gram.

General
There are 3 possibilities to delete a program:

Reset
This command resets all variables to that specific value, with
which they have got initialized.
Reset (cold)
This command sets all variables to their initialization value. The
situation is that which occurs at the start of a program, which
has been downloaded just before to the PLC.
Reset (original)
This command resets all variables including the remanent ones
to their initialization values and erases the user program on the
controller.

Functions
Find the functions for resetting in Online-Menu. It is necessary login
the system.

Delete a program

3ADW000199R0201 DCS800 Application Program e b


52

Delete a program from the Memory Card


Login the system and choose Reset (original).

If you click Yes, the PLC will be erased.

When the program is deleted you can see the message.

Delete a program

3ADW000199R0201 DCS800 Application Program e b


A1

Appendix A - Libraries
Overview about available libraries
There are several libraries with function blocks available.
But only the DCS800 Drive Library will be shipped with the drive
and installed automatically with CDROM 3ADW000211. The other
libraries must be ordered and installed separately. Please contact
your local ABB sales office.

DCS800 Drive Library


The DCS800 Drive Library includes interface function blocks for
communication with firmware parameters. These blocks are re-
quired for parameter reading and writing, event handling and for
digital and analog interface communication.

Arithmetic
The Arithmetic Library includes function blocks for processing with
numeric values. There are an integrator, a filter and a ramp genera-
tor available. Use this library for mathematic calculations.

Special
The Special Library includes function blocks for binary operations
and especially applications. It can be used for packing and extract-
ing boolean values. Also a gear calculator is available.

Winder
The Winder Library includes function blocks for winder applications.
The several function blocks must be connected to a complete struc-
ture for winding.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A2

DCS800 Drive Library

AnIn The function block AnIn is for reading analog inputs of


DCS 800.

Name LL UL Def Scale Unit Type


iAI… -10000 10000 0 1000=1V -- INT
Value of input … ( 10000 = 100% to AI scaling parameters of firmware )
iAITac -20000 20000 0 1000=1V -- INT
Value of analog tacho (20000=speed according to speed scaling parameter of sys-
tem software)

Note:
AI5: AI1 of 1st analog I/O option module
st
AI6: AI2 of 1 analog I/O option module

AnOut The function block AnOut is for writing to an analog out-


put of DCS 800.

Name LL UL Def Scale Unit Type


wChannel 0 65535 0 -- -- WORD
Number of analog output
1: AO1 of DCS 800 CON 4
2: AO2 of DCS 800 CON 4
3: AO3 Æ AO1 of 1st analog I/O option module
4: AO4 Æ AO2 of 1st analog I/O option module
iAOut -32768 32767 0 10000=100 -- INT
%
Output value

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A3

Note:
The result of AnOut is in parameter group 15 as CtrlWord. For connection with an
analog output of the drive, write down the CtrlWord in the belonging index of parame-
ter group 15.

Example:

Two values from analog input 1 and 2 should be subtract and write to analog output
1.

Now the result of AnOut is in parameter 15.02 stored. For connection to the physical
analog output 1 it is necessary to write the CtrlWordAO1 to the Index:
Parameter 15.01: 1502

DigIn Read digital inputs (inversion parameters of system SW


are NOT applied)

Name LL UL Def Scale Unit Type


bDI... FALSE TRUE* FALSE -- -- BOOL
State of digital input…

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A4

DigOut Write to digital outputs.

Name LL UL Def Scale Unit Type


wChannel 0 65535 0 -- -- WORD
Number of digital output…
bDOut FALSE TRUE* FALSE -- -- BOOL
Output value

Note:
DO1…8: DO´s of DCS800 CON4
DO9…10: DO´s of 1st option module
nd
DO11…12: DO´s of 2 option module

The result of DigOut will be shown in parameter 7.05 as DO CtrlWord. For connec-
tion of a digital output with the drive it is necessary to write parameter 7.05 in the be-
longing index of parameter group 14. Choose also the correct bit in parameter group
14.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A5

DriveCtrl Write to drive control parameters.

Note:
Also unconnected inputs will be written to the correspondent destination parameter,
which means that the value of zero will be written.
The destination parameter will not be written with zero, if the open input is connected
to a constant of 100 000.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A6

Name LL UL Def Scale Unit Type


wMainCW 0 65535 0 -- -- WORD
MainCtrlWord ( 7.01 )
wAuxCW 0 65535 0 -- -- WORD
AuxCtrlWord ( 7.02 )
iSpeedRef -32768 32767 0 -- -- INT
SpeedRef ( 23.01 )
iSpeedShare -32768 32767 0 -- -- INT
Speed Share ( 23.05 )
iSpeedCorr -32768 32767 0 -- -- INT
SpeedCorr ( 23.04 )
iSpeedRefSc -32768 32767 0 -- -- INT
SpeedRefScale ( 23.16 )
iSpeedScale -32768 32767 0 -- -- INT
M1 SpeedScale ( 50.01 )
iWindScale -32768 32767 0 -- -- INT
WinderScale ( 50.17 )
wKPS 0 65535 0 -- -- WORD
KpS ( 24.03 )
wTIS 0 65535 0 -- -- WORD
TiS ( 24.09 )
iTorqRefA -32768 32767 0 -- -- INT
TorqueRef A ( 25.01 )
iTorqRefB -32768 32767 0 -- -- INT
TorqueRef B ( 25.04 )
iTorqCorrect -32768 32767 0 -- -- INT
TorqueCorrect ( 26.15 )
iLoadCompe -32768 32767 0 -- -- INT
LoadComp ( 26.02 )
wTorqSelect 0 65535 0 -- -- WORD
TorqSel ( 26.01 )
iMaxTorque -32768 32767 0 -- -- INT
TorqueMax ( 20.05 )
iMinTorque -32768 32767 0 -- -- INT
TorqueMin ( 20.06 )
iCurRefExt -32768 32767 0 -- -- INT
CurRefExt ( 43.03 )
iVoltRefExt -32768 32767 0 -- -- INT
VoltRefExt ( 46.02 )
iFluxCorrect -32768 32767 0 -- -- INT
FluxCorr ( 46.09 )
iDualField- -32768 32767 0 -- -- INT
trim
FldCurTrim ( 45.17 )

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A7

DriveState Read drive status

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A8

Name LL UL Def Scale Unit Type


wMainSW 0 65535 0 -- -- WORD
MainStatWord ( 8.01 )
wAuxSW 0 65535 0 -- -- WORD
AuxStatWord ( 8.02 )
iSpeedActEMF -32768 32767 0 -- -- INT
SpeedActEMF ( 1.02 )
iSpeedRef2 -32768 32767 0 -- -- INT
SpeedRef 2 ( 2.01 )
iSpeedRef3 -32768 32767 0 -- -- INT
SpeedRef 3 ( 2.02 )
iSpeedRef4 -32768 32767 0 -- -- INT
SpeedRef 4 ( 2.18 )
iSpeedRe- -32768 32767 0 -- -- INT
fUsed
SpeedRefUsed ( 2.17 )
iProcessSpeed -32768 32767 0 -- -- INT
Process Speed ( 1.41 )
iSpeedError -32768 32767 0 -- -- INT
Speed Error ( 2.03 )
iWindScale -32768 32767 0 -- -- INT
Speed Scale Act ( 2.29 )
iTorqRef1 -32768 32767 0 -- -- INT
TorqueRef 1 ( 2.08 )
iTorqRef2 -32768 32767 0 -- -- INT
TorqueRef 2 ( 2.09 )
iTorqRef3 -32768 32767 0 -- -- INT
TorqueRef 3 ( 2.10 )
iTorqUsedRef -32768 32767 0 -- -- INT
Torque Ref Used ( 2.13 )
iMotCurAct -32768 32767 0 -- -- INT
MotCur ( 1.06 )
iMainsVoltAct -32768 32767 0 -- -- INT
MainsVoltActRel ( 1.11 )
iArmVoltAct -32768 32767 0 -- -- INT
Arm Volt Act ( 1.13 )
iEMF_VoltAct -32768 32767 0 -- -- INT
EMF Volt Act Rel ( 1.17 )
iMot1FieldCur -32768 32767 0 -- -- INT
Mot1FieldCurRel ( 1.29 )
iMot2FieldCur -32768 32767 0 -- -- INT
Mot2FieldCurRel ( 1.31 )

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A9

EventInit Declare parameters for event text definitions. With this


block it is possible to allocate texts for faults, alarms
and notices.

Name LL UL Def Scale Unit Type


byFaultTextGroup 60 69 0 -- -- BYTE
Fault Text Group
byFaultTextIndex 1 99 0 -- -- BYTE
Fault Text Index
byAlarm- 60 69 0 -- -- BYTE
TextGroup
Alarm Text Group
byAlarmTextIndex 1 99 0 -- -- BYTE
Alarm Text Index
byNo- 60 69 0 -- -- BYTE
ticeTextGroup
Notice Text Group
byNoticeTextIn- 1 99 0 -- -- BYTE
dex
Notice Text Index

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 10

EventSet Activate faults, alarms and notices.

Name LL UL Def Scale Unit Type


bActivate FALSE TRUE FALSE -- -- BOOL
Set and reset events
iEvent 310 825 0 -- -- INT
310…325: Alarm
610…625: Fault / Trip
810…825: Notice
iDelay 0 32767 0 -- ms INT
Event is delayed by the time defined at this input.
bState FALSE TRUE* FALSE -- -- BOOL
FALSE: event not active, TRUE: event activated

Example:

In this example an alarm message will be activated with a boolean value. With the
function block EventInit there is the possibility to allocate an alarm text, which is
saved in parameter 60.01. The texts, which is declared as ENUM data type can be
selected in the parameter manager under Def, Min and Max.

Now it is necessary to define a parameter in parameter manager for the text:

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 11

It is also necessary to define a global variable for the parameter manager:

Create a data type for the alarm text:

If you activate the alarm after 1000 ms the alarm switched on and you can see the
message e.g. on the panel.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 12

MulDiv Multiplication and division block with Rem output. The


block is runtime optimized.

iMul1 ⋅ iMul 2 + lAdd


iOut =
iDiv
lMulOut = iMul1 ⋅ iMul 2

Name LL UL Def Scale Unit Type


iMul1 -32768 32767 0 -- - INT

iMul2 -32768 32767 0 -- - INT

lAdd -2147483648 2147483647 0 -- -- DINT

iDiv -32768 32767 0 -- - INT

lMulOut -2147483648 2147483647 0 -- -- DINT

iOut -32768 32767 0 -- - INT

iRem -32768 32767 0 -- - INT

bOfl FALSE TRUE* FALSE -- -- BOOL


Overflow occured

Note:
Internal values 32 bit limited to +/- 32767.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 13

ParGet Cyclic reading from a parameter.

Name LL UL Def Scale Unit Type


byGroup 1 99 -- -- BYTE
Involved parameter group
byIndex 1 99 -- -- BYTE
Involved parameter index
bIndirect FALSE TRUE* FALSE -- -- BOOL
TRUE: byGroup and byIndex address a pointer parameter, which addresses
the involved parameter
FALSE: byGroup and byIndex address the involved parameter direct
wOutput 0 65535 0 -- -- WORD
Read value
iErrCode -- -- INT
0: o.k.
3: invalid group or index
4: selected index not allowed
5: no such group
8: no such index
-…: the error code isn´t related to pointer parameter, but to the index ad-
dressed by this parameter
wPointerpar 0 65535 0 -- -- WORD
Group* 100 + index

Note:
ParGet and ParSet are based on the internal scaling of Parameters; speed scaling =
20000, torque- and current-scaling = 10000.
These blocks don’t store their values into the FLASH while writing on the firmware
parameters.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 14

ParProtect Protect parameter or group.

Name LL UL Def Scale Unit Type


byGroup 1 99 -- -- BYTE
Involved parameter group
byIndex 1 99 -- -- BYTE
Involved parameter Index
bProtect FALSE TRUE* FALSE -- -- BOOL
Parameter or group write protected
bHide FALSE TRUE* FALSE -- -- BOOL
Parameter or group hidden
iErrCode 0 8 0 -- -- INT
0: o.k.
3: invalid group or index
5: no such group
8: no such index

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 15

ParRead Read a parameter

Name LL UL Def Scale Unit Type


byGroup 1 99 -- -- BYTE
Involved parameter group
byIndex 1 99 -- -- BYTE
Involved parameter index
wVal 0 65535 0 -- -- WORD
Read value
iErrCode 0 10 0 -- -- INT
0: o.k.
3: invalid group or index
4: reading not allowed
5: no such group
6: hidden group
7: extended group
8: so such index
9: hidden parameter
10: extended parameter

Note:
ParRead and ParWrite provide the same scaling as the values displayed on panel.
These blocks don’t store their values into the FLASH while writing on the firmware
parameters.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 16

ParSet Cyclic writing to parameter

Name LL UL Def Scale Unit Type


byGroup 1 99 -- -- BYTE
Involved parameter group
byIndex 1 99 -- -- BYTE
Involved parameter index
bIndirect FALSE TRUE FALSE -- -- BOOL
TRUE: byGroup and byIndex address a pointer parameter, which addresses
the involved parameter
FALSE: byGroup and byIndex address the involved parameter direct
wAND -32768 32767 -- -- WORD
Destination value = (destination value & wAND) | wOR mask input!
wOR -32768 32767 -- -- WORD
Destination value = (destination value & wAND) | wOR normal input!
iErrCode -- -- INT
0: o.k.
3: invalid group or index
4: selected index not allowed for ParSet
5: no such group
8: no such index
-…: the error code isn´t related to pointer parameter, but to the index ad-
dressed by this parameter
wPointerpar 0 65535 0 -- -- WORD
Value of pointer

Note:
ParGet and ParSet are based on the internal scaling of Parameters; speed scaling =
20000, torque- and current-scaling = 10000.
These blocks don’t store their values into the FLASH while writing on the firmware
parameters.
If you don´t need a masking input, set wAND to 0!!!

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 17

Example:

The Main Control Word (7.01) should be set with the function block ParSet. But Bit 0
and 1 must be active all the time. In this case it is possible to use the input wAND for
the two Bits. The other Bits will be set with the input wOR.

The bits should be set like the picture above. This combination gives the Hex-Code
B8 and the Decimal-Code 184. In CoDeSys it is necessary to use the Decimal-Code!
This combination will be connected with wOR, the normal input.
Input wAND is for masking the wOR input.
In this example we set wAND to 3. That means bit 0 and 1 are set.
The result for 7.01 Main Control Word is BB or 187 in decimal.
If you change the value on the input wOR the bits 0 and 1 remain untouched.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 18

ParWrite Write to a parameter

Name LL UL Def Scale Unit Type


byGroup 1 99 -- -- BYTE
Involved parameter group
byIndex 1 99 -- -- BYTE
Involved parameter index
bSave FALSE TRUE* FALSE -- -- BOOL
Save to Flash Memory Card
wVal 0 65535 0 -- -- WORD
Written value
iErrCode -- -- INT
0: o.k.
3: invalid group or index
4: reading not allowed
5: no such group
6: hidden group
7: extended group
8: no such index
9: hidden parameter
10: extended parameter
11: read only parameter
12: writable only at standstill
13: written value below minimum
14: written value over maximum

Note:
ParRead and ParWrite provide the same scaling as the values displayed on panel.
These blocks don’t store their values into the FLASH while writing on the firmware
parameters.

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 19

ProgProtect Protect program against copying

Name LL UL Def Scale Unit Type


bProtect FALSE TRUE FALSE -- -- BOOL
FALSE: no action
TRUE: Uploading of source code to CoDeSys not possible

Note:
Add this block to your initialization task.

SquareRoot Square root function

iOut = iMul1⋅ iMul 2

Name LL UL Def Scale Unit Type


iMul1 -32768 32767 0 -- -- INT
Input 1
iMul2 -32768 32767 0 -- -- INT
Input 2
bAbs FALSE TRUE* FALSE -- -- BOOL
Negative values on iMul1 and iMul2 will be accepted as absolute number
iOut 0 32767 0 -- -- INT
Result of square root calculation

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


A 20

Task Activate user action (single shot) or freewheeling task

Name LL UL Def Scale Unit Type


byActivate 0 1 0 -- -- BYTE
0: no action
1: task action according to byAction
byAction 1 6 0 -- -- BYTE
1: start user action 1
2: start user action 2
3: start user action 3
4: start user action 4
5: start freewheeling task
6: stop freewheeling task

Note:
These tasks are definable in the CoDeSys task configuration.

TaskCycle Cycle time of the current task. It can be used for creat-
ing function blocks with discrete values like integrator.

Name LL UL Def Scale Unit Type


wTaskCycle 0 65535 0 -- ms WORD
Actual cycle time

Appendix A – Libraries

3ADW000199R0201 DCS800 Application Program e b


R1

Appendix Registration
Registration Form
For registration (see also chapter Identification on page 34) of iden-
0H 99H

tification name please send a formless e-mail or a formless fax with


the following contents.
Online registration is not installed yet.

Mail to dc-drives@de.abb.com
1H

or fax to +496203-71-7609

Subject Registration: DCS800 Application Programming

Contents (* denotes mandatory fields)


Company name *
Department
Address *

Country *

E-mail address *
Please note: Use a general e-mail address, so that a contact will also work, if any-
body is not in the office. This e-mail will be used for application requests.
Phone number

Contact person *
E-mail address *
News mails desired? Yes / No

Desired Identification *

Customers identification of 4 characters.


Which four characters do you want to use ?

International country name code.


(If not known, we will look for this.)

After checking your desired identification a confirmation will be sent to the


contact person.

Appendix Registration

3ADW000199R0201 DCS800 Application Program e b


R2

Example 1 of your CoDeSys “Title”-field:


DEABBx DrumDrive Machine B Section A
Resultant content of ApplicName (4.03) is the first 12 characters:
DEABBx DrumD
Voluntary registration; first 6 characters:
DEABBx

Example 2 of your CoDeSys “Title”-field:


USCUSTOMER Drive 12
Resultant content of ApplicName (4.03) is ; the first 12 characters:
USCUSTOMER
Voluntary registration; first 6 characters:
USCUST

Appendix Registration

3ADW000199R0201 DCS800 Application Program e b


R3

Request Form
For a request, who has done the application, please send an email with
following contents.
Your name will be forwarded to the company, who has developed the re-
quest application according identification.

Mail to 2Hdc-drives@de.abb.com

Subject Request DCS800 Application Identification

Contents

of parameter 4.03

of parameter 4.12

Your Company

Name

Department

Address

Country

Contact person

Email address

Appendix Registration

3ADW000199R0201 DCS800 Application Program e b


Ident. No.: 3ADW 000 199 R0201 Rev B

ABB Automation Products GmbH


04_2006

Wallstadter Straße 59
68526 Ladenburg • Germany
Tel: +49 (0) 62 03-71-0
Fax: +49 (0) 62 03-71-7609
www.abb.com/motors&drives *199R0201A6160000*
*199R0201A6160000*

Вам также может понравиться