Click here to load reader
Upload
lykien
View
355
Download
22
Embed Size (px)
Citation preview
©C
opyr
ight
4/1
6/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 1
CoDeSysBasic Training
DCS800
DC Drives
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 2
Objectives
After completing this module, you will know
the basics of the Control Builderthe features and limits
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 3
DCS800 Control Builder package
DCS800 drive includes a programming opportunity called “DCS800 Control Builder”
DCS800 Control BuilderCoDeSys software tool
Based on IEC 61131
DCS800 target
Communication interface
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 4
IEC 61131 – Concept and Basics
Based on the international standard IEC 61131 for PLC’s
Build a standardized framework for the programming of control systems
Integration of five well known and modern programming languages
Manufacturer independent
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 5
IEC 61131 – Hardware of the PLC system
Specification of the equipment for the PLCElectrical construction
Mechanical construction
Manufacturer documentation
Test procedure for PLC’s
Environment for PLC’s
PLC’s are designed to control machines or processes in an industrial environment
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 6
IEC 61131- Programming languages
CoDeSys includes 6 programming languages
Definition of programming languages:IL Instruction List (assembler)
LD Ladder Diagram (electric circuit diagram)
FBD Function Block Diagram
SFC Sequential Function Chart (phase diagram)
ST Structured Text (high level language)
CFC Continuous Function Chart (not part of IEC 61131) (fully graphical tool)
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 7
Function Block Diagram (FBD)
Example:
Network 1
Network 2
Network 3
Constant value
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 8
Continuous Function Chart (CFC)
Example:
Sheet
Connection via wiresSequence in the execution order
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 9
Structured Text (ST)
Example:
High levellanguage
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 10
IEC 61131 – Further definitions
Structure of a project
Differentiate types of building blocksOperators
Functions
Function Blocks
Declaration of blocks as instances
Declaration of variables
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 11
CoDeSys DesktopMenu bar
Tool bar
Object organizer
Message window
Editor window
Declaration window
Window change
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 12
CoDeSys windows
Object organizerAll programs, function blocks and functions are listed in this window
Editor windowHere is the program with the blocks
Declaration windowAll function blocks and variables must be declared with the used data type
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 13
CoDeSys windows
Menu barHere you can find all functions of CoDeSys
Message windowThis is an important window of CoDeSys because errors and info about the state of CoDeSys will be shown
A click to the message shows the line or network with the problem
Window changerChange to Resources for Task settings, parameter handling and trace configuration
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 14
Declaration and Variables
Function blocksInstance
VariablesData type, Class
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 15
Working with variables
Connections between blocks and programs are done with variables
Used in:
•FBD
•ST
•IL
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 16
Types of variables
Local variablesUsed in only one part of program
Global variablesUsed in several parts of programs and for user parameters
Input / Output variablesUsed for the definition offunction blocks
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 17
Available data types
Several data types are available
Standard type for DCS800 programming is integer/word because of a 16 bit processor
Further types:Boolean (1 bit)
Byte (8 bit)
Double integer/word (32 bit)
Real (32 bit)
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 18
Data types
In CoDeSys there are the following data types available
Type Minimum Maximum Short
BYTE (8 bit) 0 255 BYTE
DOUBLE INTEGER (32 bit) -2147483648 2147483647 DINT
DOUBLE WORD (32 bit) 0 4294967295 DWORD
BOOLEAN (1 bit) FALSE (0) TRUE (1) BOOL
INTEGER (16 bit) -32768 32767 INT
WORD (16 bit) 0 65535 WORD
REAL (32 bit) -… +… REAL
Internal types: Time, Date, String, etc.
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 19
Differences between DCS800 drive and a PLC
An important difference between a PLC and the DCS800 drive system is the hardware
In DCS800 all hardware devices are fixed
In external PLC’s the hardware is adjustable
DCS800 PLCParameter-Manager Hardware-Manager
New parameters can be added
Hardware is fixed!
New hardware resources can be added
Hardware is variable
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 20
Configuration of CoDeSys tool and DCS800
Configuration of CoDeSys and DCS800ABB special formatted Memory Card
I/O terminal strip of the DCS800
DCS800converter
PCusing
CoDeSysI/O pin board
RS232Memory
Card
sensors and actors
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 21
Requirements for using DCS800 Control Builder
Online connection:DCS800 drive
ABB Memory Card (SDCS-MEM-8)
Serial cable (RS232)
If necessary: adapter … RS232
Used software:CoDeSys software tool
DCS800 Target and DCS800 Library
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 22
Possibilities for serial adapters
If you don´t have a Serial communication port
USB to Serial adapter
PCMCIA card for Serial communication
Attention:Not all adapters are working properly!
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 23
With the DCS800 PLC it is possible to:
Create programs in several programming languages
Connect analog and digital signals from DCS800
Connect all firmware signals and parameters to the application program
Create new user parameters: up to 250
Create new user events: alarms, faults, notices
Work with several task cycles:5, 10, 20, 50, 100, 200, 500, 1000 ms and single actions
Use Function blocks in several libraries
Use Sampling Trace
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 24
Limitations of DCS800
Only a 16 bit processor is availableWe recommended to use no real types
Task cycle limits the number of operations in the selected task
Processor total load is limited
1. calculate firmware control structure
2. calculate both application systemsDCS800 includes only a small PLC
it cannot replace an external PLC
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 25
Configuration
Development system (CoDeSys)
Runtime system
Developmentsystem
CoDeSys
Runtimesystem
DCS800
1. Use CoDeSys to develop offline
2. Compile the CoDeSys program
3. Transmit the code to DCS800
4. Enable the application
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 26
Development System
This is the CoDeSys softwareEditor
Compiler and Debugger
Support all 6 IEC programming languages
Generate code for the CPU
This job is done directly by 3S-software(The CoDeSys software tool development)
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 27
Important definitions
CoDeSys program*.pro-file (development tool code)
Program-code*.prg-file (program)
*.chk-file (checksum)
Source-code*.src-file (real source-code)
Target file*.trg-file (defines the real-time system)
background-files!
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 28
Runtime System
This is e.g. the DCS800 CPU systemI/O update with controller cycle
Communication with the development system
Boot procedure after a power-on
Save program code (here: Memory Card)
Stand-alone system
The runtime system is developed by ABB development
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 29
Implement an application
DCS800 is programmed by parameter list
Also the digital and analog inputs and outputs will be configured by parameters
This means that the CoDeSys programmer have to set also the necessary parameters
An application consists of a CoDeSys program and the configuration of parameters outside CoDeSys program
It is important that the programmer has knowledge about CoDeSys programming and drive configuration
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 30
Professional programming
DriveWindow (DW)Set drive parameters
Monitor drive signals/parameters
Fault tracing
CoDeSys (CB)Create the program
Compile the program
Transmit to DCS800
Online signal forcing
CoDeSys V2.3.lnk
DriveWindow
Both programs can be used simultaneously
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 31
Help wizard
Tool functionality
Operators
Standard library
Errors
Hints
Support only the CoDeSys tool!
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 32
Further documentation
Application ManualSoftware installationTarget installationRequired hardwareMemory cardLibrariesError messages
Firmware ManualSignals and parametersStart-up
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 33
Summary
Key points of this module
Configuration of the runtime system
Configuration of the development system
IEC programming languages
IEC data types
Handling of the CoDeSys tool
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 34
Additional information
Links to related information3S-software.com
DC-Drive-News (Intranet, only ABB internal!)
Additional referencesApplication Manual (3ADW 000199)
Firmware Manual (3ADW 000193)
Hardware Manual (3ADW 000194)
Training Material
©C
opyr
ight
1/2
2/20
08 A
BB
. All
right
s re
serv
ed.
CO
DE
SYS
_01R
0101
pag
e 35
Glossary
CoDeSysController Development System (software tool)
Memory CardFlash memory
DriveWindow LightSoftware Tool for commissioning and maintenance using AC/DC
TargetInterface between Drive and CoDeSys tool
Control BuilderDCS800 application system
PLC_PRGMain program which is used in all applications
POUProgram Organization Unit
LibraryIncludes function blocks which are given or designed by other users