INVT GD350 Programovanie v CODESYS
INVT GD350 Programovanie v CODESYS
programming of CoDeSys
Dep.:Overseas
Name:Ryan Chen
Date:May 3rd ,2018
Content
2
一、Brief introduction of CoDeSys
3
一、Brief introduction of CoDeSys
What is CoDeSys?
CoDeSys is the complete development environment of
programmable logic controller PLC(CoDeSys is the
abbreviation of Controlled Development System ),which
is developed by 3S company in Germany(Smart Software
Solutions GmbH),and it is a soft PLC programming
system platform which is totally independent of the running
system.
CoDeSys is actually a development programming
system based on industrial automation field. Its applications
include plant automation, automotive automation,
embedded automation, process automation, building
4
automation, and so on.
一、Brief introduction of CoDeSys
5
一、CoDeSys的简单介绍
6
一、Brief introduction of CoDeSys
7
一、Brief introduction of CoDeSys
3、Good portability and powerful communication function.
CoDeSys completely supports CANopen、Profibus、 EtherCAT、
Modbus、 Ethernet/IP、serial port( RS232、 RS485 ) and so on.
Runtime System, the running system of CoDeSys, can run in
various main CPU (such as ARM、 X86、 PowerPC、 TriCore 、
DSP ),and support Windows XP、 WindowsCE、 Windows XP
Embedded、Windows 7、 Linux、 VxWorks 、 QNX operation
systems、 or architectures without operation system.
4、Powerful motion control and CNC function
Uniaxial control: current loop、 velocity loop、 position loop control
Master-slave control: The realization of electronic gear (with phase
synchronization function), electronic cam and so on.
CNC control:realize Complex multi axis motion trajectory
interpolation control , support G code.
Robot control:Complex robot control with multiple joints.
8
一、Brief introduction of CoDeSys
5、 Greatly support for third party development tools and applications.
OPC , OPC UA function
Support database of ODBC interface
6、 Support redundancy control function and customization development.
7、 Realize the safety control that conforms to TUV-SIL3 international
specification and customized development of customization security
controller.
8、 CoDeSys Application Composer can support IAP
CoDeSys Application Composer is based on IEC 61131- 3
international standard, which is perfect extension of CoDeSys. It simplifies
the technical complexity of application programming, reduce the workload
of application developers, increase the stability of software and improve
the efficiency of application programming.
9
二、Programming environment of CoDeSys
10
二、Programming environment of CoDeSys
Device file installation
Different devices need to install different device files.
Click ‘device repository’ in pull-down menu of Tools
11
二、Programming environment of CoDeSys
12
二、Programming environment of CoDeSys
Choose the device file in all files type
13
二、Programming environment of CoDeSys
14
二、Programming environment of CoDeSys
Create new project
Open the software and then create a new standard project
15
二、Programming environment of CoDeSys
Choose ‘standard project’
16
二、Programming environment of CoDeSys
Choose the device file and programming language(ST, LD or
others)
17
二、Programming environment of CoDeSys
Basic programming interface:
18
二、CoDeSys编程环境的介绍和说明
When program a new variable in programming area, and then
press ‘enter’ in the keypad. The users should define the variable in the
interface as following picture.
19
二、Programming environment of CoDeSys
You can add several POU(procedure organization unit) in one project if
needed:
20
二、Programming environment of CoDeSys
You can choose the task type and Priority in ‘MainTask’:
21
二、Programming environment of CoDeSys
22
二、Programming environment of CoDeSys
23
二、Programming environment of CoDeSys
If the device isn’t connected, we can simulate online. Choose
‘Simulation’
24
二、Programming environment of CoDeSys
Then Login,
25
二、Programming environment of CoDeSys
You can write values to test the procedure in simulation,
26
三、Function library of CoDeSys
27
三、Function library of CoDeSys
3.1 Introduction of CoDeSys function library
28
三、Function library of CoDeSys
30
三、Function library of CoDeSys
Click ‘install’ and then choose a library file
31
三、Function library of CoDeSys
After installing successfully, you can see the library as shown in
following picture
32
三、Function library of CoDeSys
Then add library in library manager
33
三、Function library of CoDeSys
Choose the library in right file selection
34
三、Function library of CoDeSys
If you add the library successfully, you can see it in library manager.
Also if you don’t need some library, you can delete it.
35
三、Function library of CoDeSys
You can see the information of library when clicking it in library
manager.
36
三、Function library of CoDeSys
3.3 Calling of function library
In programming area, press ‘F2’ or ‘Fn+F2’, or choose ‘input
assistant’ in Edit menu, or click right mouse button.
37
三、Function library of CoDeSys
Choose function block in input assistant and find
the library
38
三、Function library of CoDeSys
3.4 Creation of function library
Create empty library
39
三、Function library of CoDeSys
Choose ‘POUs’
40
三、Function library of CoDeSys
Choose ‘project information’
41
三、Function library of CoDeSys
Fill out three main information
42
三、Function library of CoDeSys
Add POU and the program
43
三、Function library of CoDeSys
Generally we choose ‘function block’
44
三、Function library of CoDeSys
Define the interface variables first, and then program
45
三、Function library of CoDeSys
After programming, check all pool objects and save it.
46
三、Function library of CoDeSys
After programming, check all pool objects and save it.
47
三、Function library of CoDeSys
After programming, check all pool objects and save it.
48