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

6 - The Resources
"prog_x (2)" for line 2 of POU prog_x) . Below the complete call stack is shown in backward order. If you press button 'Go To', the focus will jump to that position in the POU which is currently marked in the callstack.
6.8Watch and Receipt Manager...
6.8.1Overview
With the help of the Watch and Receipt Manager you can view the values of selected variables. The Watch and Receipt Manager also makes it possible to preset the variables with definite values and transfer them as a group to the PLC ('Write Receipt'). In the same way, current PLC values can be read into and stored in the Watch and Receipt Manager ('Read Receipt'). These functions are helpful, for example, for setting and entering of control parameters.
All watch lists created ('Insert' 'New Watch List') are indicated in the left column of the Watch and Receipt Manager. These lists can be selected with a mouse click or an arrow key. In the right area of the Watch and Receipt Manager the variables applicable at any given time are indicated.
In order to work with the Watch and Receipt Manager, open the object for the Watch and Receipt Manager in the Resources register card in the Object Organizer.
6.8.2Watch and Receipt Manager in the Offline Mode
In Offline Mode, you can create several watch lists in the Watch and Receipt Manager using the 'Insert' 'New Watch List'.
For inputting the variables to be watched, you can call up a list of all variables with the Input Assistant, or you can enter the variables with the keyboard, according to the following notation:
<POUName>.<Variable Name>
With global variables, the POU Name is left out. You begin with a point. The variable name can, once again, contain multiple levels. Addresses can be entered directly.
Example of a multiple-level variable:
PLC_PRG.Instance1.Instance2.Structure.Componentname
Example of a global variable:
.global1.component1
Watch and Receipt Manager in the Offline Mode
The variables in the watch list can be preset with constant values. That means that in Online mode you can use the 'Extras' 'Write Receipt' command to write these values into the variables. To do to do must use := to assign the constant value of the variable:
CoDeSys V2.3 |
6-51 |

Watch and Receipt Manager...
Example:
PLC_PRG.TIMER:=50
In the example, the PLC_PRG.COUNTER variable is preset with the value 6.
Regard for variables of type array or structure: You must enter the particular elements explicitly in order to be able to preset them. Example: You have defined a structure with components a, b,c and you have declared a structure variable struvar in PLC_PRG. For preallocating a,b,c with values, they must be entered in the watchlist as follows:
PLC_PRG.struvar.a:=<value>
PLC_PRG.struvar.b:=<value>
PLC_PRG.struvar.c:=<value>
The presetting for the elements of an array must be done correspondingly. Example for an array variable of type ARRAY[0...6]:
PLC_PRG.arr_var[0]:=<value>
PLC_PRG.arr_var[1]:=<value>
...
Wenn ein Funktionsblock fb die Variablen x,y enthält und eine Instanzvariable fb_inst vom Typ fb in PLC_PRG deklariert ist, können x und y folgendermassen vorbelegt werden:
PLC_PRG.fb_inst.x:=<Wert>
PLC_PRG.fb_inst.y:=<Wert>
'Insert' 'New Watch List'
With this command in offline mode a new watch list can be inserted into the Watch and Receipt Manager. Enter the desired name for the watch list in the dialog box that appears.
'Extras' 'Rename Watch List'
With this command you can change the name of a watch list in the Watch and Receipt Manager. In the dialog box that appears, enter the new name of the watch list.
'Extras' 'Save Watch List'
With this command you can save a watch list. The dialog box for saving a file is opened. The file name is preset with the name of the watch list and is given the extension "*.wtc".
The saved watch list can be loaded again with 'Extras' 'Load Watch List'.
'Extras' 'Load Watch List'
With this command you can reload a saved watch list. The dialog box is opened for opening a file. Select the desired file with the "*.wtc" extension. In the dialog box that appears, you can give the watch list a new name. The file name is preset without an extension.
With 'Extras' 'Save Watch List', you can save a watch list.
6.8.3Watch and Receipt Manager in the Online Mode
In Online mode, the values of the entered variables are indicated.
Structured values (arrays, structures, or instances of function blocks) are marked by a plus sign in front of the identifier. By clicking the plus sign with the mouse or by pressing <Enter>, the variable is opened up or closed. If a function block variable is marked in the watch list, the associated context menu is expanded to include the two menu items 'Zoom' and 'Open instance'.
In order to input new variables, you can turn off the display by using the 'Extras' 'Active Monitoring' command. After the variables have been entered, you can use the same command again to activate the display of the values.
6-52 |
CoDeSys V2.3 |

6 - The Resources
Watch and Receipt Manager in the Online Mode
In the Offline Mode you can preset variables with constant values (through inputting := <value> after the variable). In the Online Mode, these values can now be written into the variables, using the 'Extras' 'Write Receipt' command.
Referring to array or structure variables please see the description in chapter 6.8.2.
With the 'Extras' 'Read Receipt' command you can replace the presetting of the variable with the present value of the variable.
Note: Only those values the watch list are loaded which was selected in the Watch and Receipt Manager!
'Extra' 'Monitoring Active'
With this command at the Watch and Receipt Manager in the Online mode the display is turned on or off. If the display is active, a check (9) will appear in front of the menu item.
In order to enter new variables or to preset a value (see Offline Mode), the display must be turned off through the command. After the variables have been entered, you can use the same command again to activate the display of the values.
'Extras' 'Write Receipt'
With this command in the Online Mode of the Watch and Receipt Manager you can write the preset values (see Offline Mode) into the variables.
Note: Only those values of the watch list are loaded which was selected in the Watch and Receipt Manager!
'Extras' 'Read Receipt'
With the command, in the Online Mode of the Watch and Receipt Manager, you can replace the presetting of the variables (see Offline Mode) with the present value of the variables.
Example:
PLC_PRG.Counter [:= <present value>] = <present value>
Note: Only the values of that watch list are loaded which was selected in the Watch and Receipt Manager!
Force values
In the Watch and Receipt Manager you can also 'Force values' and 'Write values'. If you click on the respective variable value, then a dialog box opens, in which you can enter the new value of the variable. Changed variables appear in red in the Watch and Receipt Manager.
CoDeSys V2.3 |
6-53 |