
- •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

Alarm Configuration
Colors/Bitmaps for class <class name>
Each alarm class can get assigned own colors and bitmaps, which will be used for the differentiation of the alarms in the visualization element alarm table. Select a Foreground color and Background color for the possible events INTO, ACK and OUTOF (see above). The standard dialog for selecting a color will open as soon as you perform a mouse-click on the color symbol. For selecting a bitmap a mouse-click on the grey rectangle will open the standard dialog for selecting a file.
6.3.4Alarm groups
Alarm groups are used for organizing the available alarms. Each alarm is definitely assigned to right one alarm group and is managed by this group. All alarms of a group can get assigned a common deactivation variable and common parameters regarding the alarm saving. Regard that even a single alarm must be configured within an alarm group.
A hierarchical structure of alarm groups can be defined via folder elements. When a alarm group is selected in the configuration tree, automatically the dialog Alarm group will be displayed:
Configuration dialog Alarm group
In the field Description you can enter a name for the alarm group.
As Deactivation variable a boolean project variable can be defined. At a rising edge on this variable the alarm creation for all alarms of the group will be deactivate, at a falling edge it will be re-activated.
Via button Add an alarm can be added to the group. A new line in the table window will be inserted and there the following parameters are to be set:
Expression: Enter here the project variable or an expression (e.g. "a + b") to which the alarm should refer. It is recommended to use the input assistant <F2> resp. the intellisense function for an correct entry.
Type: The alarm types listed in the following can be used. For each type regard the appropriate comment resp. the definitions to be done in the area beyond the table !
DIG=0 Digital alarm, active as soon as the expression gets FALSE. DIG=1 Digital alarm, active as soon as the expression gets TRUE.
LOLO Analog alarm, active as soon as the value of the expression falls below the Value defined for Alarm type LOLO. You can define a tolerance (Deadband). As long as the expression value is within the dead band, no alarm will be activated, even if the LOLO-value has been falling below the limit.
LO corresponding to LOLO
6-14 |
CoDeSys V2.3 |

6 - The Resources
HI Analog alarm, active as soon as the expression exceeds the Value defined for Alarm type HIHI. You can define a tolerance (Deadband). As long as the expression value is within the dead band, no alarm will be activated, even if the HI value has exceeded the limit.
HIHI corresponding to HI
DEV- Deviation from the target value; Alarm gets active as soon as the value of the expression falls below the value defined for Alarm type DEV- plus the percentage deviation. Percentage deviation = target value * (deviation in %) / 100.
DEV+ Deviation from the target value); Alarm gets active expression exceeds the value defined for Alarm type DEV+ Percentage deviation = target value * (deviation in %) / 100.
as soon as the value of the plus the percentage deviation.
ROC Rate of Change per time unit; Alarm gets active as soon as the expression deviates strongly from the previous value. The limit value for activating an alarm is defined by the number of value changes (Rate of changes) per second, minute or hour (units per).
Class: Choose the desired alarm class. The selection list will offer all classes which have been defined in the alarm class configuration before the last saving of the project.
Priority: Here you can define a priority level 0-152. 0 is the highest priority. The priority will impinge on the sorting of the alarms within the alarm table.
Message: Define here the text for the message box, which will appear in case of an alarm. This box must be confirmed by the user with OK, but this OK will not automatically acknowledge the alarm ! For confirming (acknowledge) the alarm you must access the alarm table. This is possible via the visualization element alarm table or via the date of the alarm entry in the table. This date can be read from a log file which can be created optionally.
Deactivation: Here a project variable can be entered, which at a rising edge will deactivate any creation of the alarm. Regard however, that this setting will be overwritten by the entry which might be found in the field 'Deactivation variable' ! (see above).
6.3.5Alarm saving
For each alarm group a file can be defined, in which the alarm events are stored, if (!) a 'Save' action has been assigned to the class in the alarm class configuration dialog.
Select the alarm group in the configuration tree and open the dialog tab 'Alarm saving':
Configuration dialog 'Alarm saving'
The following definitions are possible:
Filepath: Directories path of the file which is defined in Filename; via button "..." you get the standard dialog for selecting a directory.
Filename: Name of the file which should save the alarm events (e.g. "alarmlog"). Automatically a file will be created which gets the name defined here plus an attached digit and which has the extension ".alm". The digit indicates the version of the log-file. The first file gets a "0"; each further file, which will be created according to the defined File change event, will be numbered with 1, 2 etc. (Examples: "alarmlog0.alm", "alarmlog1.alm).
CoDeSys V2.3 |
6-15 |