
- •1 A Brief Introduction to CoDeSys
- •1.1 What is CoDeSys
- •1.2 Overview of CoDeSys Functions...
- •1.3 Overview on the user documentation for CoDeSys
- •2 What is What in CoDeSys
- •2.1 Project Components...
- •2.2 Languages...
- •2.2.1 Instruction List (IL)...
- •2.2.2 Structured Text (ST)...
- •2.2.3 Sequential Function Chart (SFC)...
- •2.2.4 Function Block Diagram (FBD)...
- •2.2.5 The Continuous Function Chart Editor (CFC)...
- •2.2.6 Ladder Diagram (LD)...
- •2.3 Debugging, Online Functions...
- •2.4 The Standard...
- •3 We Write a Little Program
- •3.1 Controlling a Traffic Signal Unit...
- •3.2 Visualizing a Traffic Signal Unit...
- •4 The Individual Components
- •4.1 The Main Window...
- •4.3 Managing Projects...
- •4.4 Managing Objects in a Project...
- •4.5 General Editing Functions...
- •4.8 Help when you need it...
- •5 Editors in CoDeSys
- •5.1 This is for all Editors...
- •5.2 Declaration Editor...
- •5.2.1 Working in the Declaration Editor
- •5.2.3 Pragma instructions in the Declaration Editor
- •5.3 The Text Editors...
- •5.3.1 Working in text editors
- •5.3.2 The Instruction List Editor...
- •5.3.3 The Editor for Structured Text...
- •5.4 The Graphic Editors...
- •5.4.1 Working in graphic editors
- •5.4.2 The Function Block Diagram Editor...
- •5.4.3 The Ladder Editor...
- •5.4.4 The Sequential Function Chart Editor...
- •5.4.5 The Continuous Function Chart Editor (CFC)...
- •6 The Resources
- •6.1 Overview of the Resources
- •6.2 Global Variables, Variable Configuration, Document Frame
- •6.2.1 Global Variables...
- •6.2.2 Variable Configuration...
- •6.2.3 Document Frame...
- •6.3 Alarm Configuration
- •6.3.1 Overview
- •6.3.2 General information on alarms, Terms
- •6.3.3 Alarm classes
- •6.3.4 Alarm groups
- •6.3.5 Alarm saving
- •6.3.6 'Extras' Menu: Settings
- •6.4 Library Manager...
- •6.6 PLC Configuration...
- •6.6.1 Overview
- •6.6.2 Working in the PLC Configuration...
- •6.6.3 General Settings in the PLC Configuration
- •6.6.4 Custom specific parameter dialog
- •6.6.5 Configuration of an I/O Module...
- •6.6.6 Configuration of a Channel
- •6.6.7 Configuration of Profibus Modules...
- •6.6.8 Configuration of CAN modules...
- •6.6.9 Configuration of a CanDevice (CANopen Slave)
- •6.6.10 PLC Configuration in Online Mode
- •6.6.11 Hardware scan/State/Diagnosis information from the PLC
- •6.7 Task Configuration...
- •6.7.1 Working in the Task Configuration
- •6.7.2 System Events
- •6.7.3 Taskconfiguration in Online Mode
- •6.8 Watch and Receipt Manager...
- •6.8.1 Overview
- •6.8.2 Watch and Receipt Manager in the Offline Mode
- •6.8.3 Watch and Receipt Manager in the Online Mode
- •6.9 The Sampling Trace
- •6.9.1 Overview and Configuration
- •6.9.2 Display of the Sampling Trace
- •6.9.3 'Extras' 'Save Trace'
- •6.9.4 'Extras' 'External Trace Configurations'
- •6.10 Workspace
- •6.11 Parameter Manager ..
- •6.11.1 Overview, Activating
- •6.11.2 The Parameter Manager Editor, Overview
- •6.11.3 Parameter List Types and Attributes
- •6.11.4 Managing parameter lists
- •6.11.5 Editing parameter lists
- •6.11.6 Parameter Manager in Online Mode
- •6.11.7 Export / Import of parameter lists
- •6.12 Target Settings
- •6.13 The PLC-Browser
- •6.14 Tools
- •6.14.1 Properties of available Tool Shortcuts (Object Properties)
- •6.14.2 Managing Tool Shortcuts
- •6.14.3 Frequently asked questions on Tools
- •7.1 What is ENI
- •7.2 Preconditions for Working with an ENI project data base
- •7.3 Working with the ENI project data base in CoDeSys
- •7.4 Object categories concerning the project data base
- •8 DDE Interface
- •8.1 DDE interface of the CoDeSys programming system...
- •8.2 DDE communcation with the GatewayDDE Server...
- •9 The License Management in CoDeSys
- •9.1 The License Manager
- •9.1.1 Creating a licensed library in CoDeSys
- •10 APPENDIX
- •Appendix A: IEC Operators and additional norm extending functions
- •Arithmetic Operators...
- •Bitstring Operators...
- •Selection Operators
- •Comparison Operators...
- •Address Operators...
- •Calling Operators...
- •Type Conversions...
- •Numeric Operators...
- •Appendix B: Operands in CoDeSys
- •Constants
- •Variables
- •Addresses
- •Functions
- •Appendix C: Data types in CoDeSys
- •Standard data types
- •Defined data types
- •Appendix D: The CoDeSys Libaries
- •The Standard.lib library
- •String functions...
- •Bistable Function Blocks...
- •Trigger...
- •Counter...
- •Timer...
- •The Util.lib library
- •BCD Conversion
- •Bit-/Byte Functions
- •Mathematic Auxiliary Functions
- •Controllers
- •Signal Generators...
- •Function Manipulators...
- •Analog Value Processing...
- •The AnalyzationNew.lib library
- •The CoDeSys System Libraries
- •Appendix E: Operators and Library Modules Overview
- •Appendix F: Command Line-/Command File
- •Command Line Commands
- •Command File (cmdfile) Commands
- •Appendix G: Siemens Import
- •Import from a SEQ Symbol File
- •Import from a S5 Project File
- •Converting S5 to IEC 61131-3
- •Appendix H: Target Settings in Detail
- •Settings in Category Target Platform
- •Appendix I: Use of Keyboard
- •Appendix J: Compiler Errors and Warnings
- •Warnings
- •Errors

7 - ENI
7 ENI
7.1What is ENI
The ENI ('Engineering Interface') allows to connect the CoDeSys programming system to an external data base. There the data which are needed during creation of an automation project can be stored. The usage of an external data base guarantees the consistency of the data, which then can be shared by several users, projects and programs. Also it extends the CoDeSys functionality by making possible the following items:
•Revision control for CoDeSys projects and associated resources (shared objects): If a object has been checked out from the data base, modified and checked in again, then in the data base a new version of the object will be created, but the older versions will be kept also and can be called again on demand. For each object and for a whole project the version history will be logged. Two versions can be checked for differences.
•Multi-User Operation: The latest version of a sample of objects, e.g. of POUs of a project, can be made accessible for a group of users. Then the objects which are currently checked out by one of the users will be marked as "in the works" and not editable by the other users. Thus several users can work in parallel on the same project without risking to overwrite versions mutually.
•Access by external tools: Besides the CoDeSys programming system also other tools, which have an ENI too, can access the common data base. These might be e.g. external visualizations, ECAD systems etc., which need the data created in CoDeSys or which also produce data which are needed by other programs.
The ENI is composed of a client and a server part. So it is possible to hold the data base on a remote computer, which is required for multi-user operation. The CoDeSys programming system is a client of the independent ENI Server Process as well as another application, which needs access to the data base (Please see the separate documentation on the ENI Server).
Currently the ENI supports the data base systems 'Visual SourceSafe 6.0', 'MKS Source Intergrity', 'PVCS Version Manager' V7.5 and higher and a local file system. Objects can be stored there in different 'folders' (data base categories with different access properties). The objects can be checked out for editing and thereby will get locked for other users. The latest version of an object can be called from the data base. Further on in parallel you can store any objects just locally in the project as usual for projects without source control.
7.2Preconditions for Working with an ENI project data base
Please regard: For a guide concerning installation and usage of the ENI Server provided by 3S – Smart Software Solutions GmbH please see the separate server documentation resp. online help. There you will also find a quick start guide.
Also consider the possibility of using the ENI Explorer which allows to perform data base actions independently from the currently used data base system.
If you want to use the ENI in the CoDeSys programming system in order to manage the project objects in an external data base, the following preconditions must be fulfilled:
•the communication between CoDeSys and the ENI Server requires TCP/IP, because the ENI Server uses the HTTP-Protocol.
•an ENI Server (ENI Server Suite) must be installed and started locally or on a remote computer. A license is required to run it with one of the standard database drivers which has been installed with the server. Just the driver for a local file system can be used with a non-licensed ENI Server version.
•in the ENI Server service control tool (ENI Control) the connection to the desired data base must be configured correctly (Data base). You will automatically be asked to do this during installation, but you can modify the settings later in ENI Control.
CoDeSys V2.3 |
7-1 |

Working with the ENI project data base in CoDeSys
•a project data base for which an ENI-supported driver is available, must be installed. It is reasonable to do this on the same computer, where the ENI Server is running. Alternatively a local file system can be used, for which a driver will also be provided by default.
•in the data base administration possibly the user (Client) as well as the ENI Server must be registered as valid users with access rights. Anyway this is required for the 'Visual SourceSafe', if you use another data base system, please see the corresponding documentation for information on the user configuration.
•for the current CoDeSys project the ENI interface must be activated (to be done in the CoDeSys dialog 'Project' 'Options' 'Project data base'). (It is possible to switch in a user definition in ENI, e.g. for the purpose of defining more detailed access rights as it is possible in the data base administration. But in general it is sufficient if the user who wants to log in to the data base via ENI, is registered in the data base.
•for the current CoDeSys project the connection to the data base must be configured correctly; this is to be done in the CoDeSys dialogs 'Project' 'Options' 'Project source control.
•in the current project the user must log in to the ENI Server with user name and password; this is to be done in the Login dialog, which can be opened explicitly by the command 'Project' 'Data Base Link' 'Login' resp. which will be opened automatically in case you try to access the data base without having logged in before.
7.3Working with the ENI project data base in CoDeSys
The data base commands (Get Latest Version, Check Out, Check In, Version History, Label Version etc.) which are used for managing the project objects in the ENI project data base, will be available in the current CoDeSys project as soon as the connection to the data base has been activated and configured correctly. See for this the Preconditions for Working with an ENI project data base . The commands then are disposable in the submenu 'Data Base Link' of the context menu or of the 'Project' menu and refer to the object which is currently marked in the Object Organizer.
The current assignment of an object to a data base category is shown in the Object Properties and can be modified there.
The properties of the data base categories (communication parameters, access rights, check in/check out behaviour) can be modified in the option dialogs of the project data base ('Project' 'Options' 'Project Source Control').
7.4Object categories concerning the project data base
There are four categories of objects of a CoDeSys project concerning the project source control:
•The ENI distinguishes three categories ("ENI object categories") of objects which are managed in the project data base: Project objects, Shared objects, Compile files.
•The category 'Local', to which an object will be assigned if it should not be stored in the data base. That means that it will be handled as it is known for projects without any source control.
Thus in the programming system a CoDeSys object can be assigned to one of the categories 'Project objects', 'Shared objects' or 'Local'; the 'Compile files' do not yet exist as objects within the project. Assigning an object to one of the categories is done automatically when the object is created, because this is defined in the project options dialog 'Project source control', but it can be modified anytime in the 'Object Properties' dialog.
Each ENI object category will be configured separately in the settings for the 'Project source control' which are part of the project options ('Project' 'Options'). That means that each category gets defined own parameters for the communication with the data base (directory, port, access right, user access data etc.) and concerning the behaviour at calling the latest version, checking out and checking in. These settings then will be valid for all objects belonging to the category. As a result you will have to log in to each data base category separately; this will be done via the 'Login' dialog.
7-2 |
CoDeSys V2.3 |
7 - ENI
It is advisable to create a separate folder for each object category in the data base, but it is also possible to store all objects in the same folder. (The 'category' is a property of an object, not of a folder.)
See in the following the three ENI object categories:
Project Objects: Objects which contain project specific source information, e.g. POUs which are shared in a multi-user operation. The command 'Get all latest versions' automatically will call all objects of this category from the data base to the local project; even those, which have not been there so far.
Shared Objects: Objects which are not project specific, e.g. POU libraries which normally are used in several projects.
Attention: The command 'Get all Latest Versions' only will copy those objects of this category from the project folder to the local project, which are already part of the project !
Compile files: Compile information (e.g. symbol files) which is created by CoDeSys for the current project and which may be needed by other programs too. Example: An external visualization may need not only the project variables, but also the assigned addresses. The latter will not be known until the project is compiled.
Alternatively any objects of the CoDeSys project can be excluded from the project source control and can be assigned to category 'Local', which means that they are just stored with the project as usual for projects without any source control.
CoDeSys V2.3 |
7-3 |

Object categories concerning the project data base
7-4 |
CoDeSys V2.3 |