Contents
1About this manual 4
1.1 Legal and copyright information...........................................................................................4
1.2 Explanation of Symbols .......................................................................................................5
1.3 Purpose of the document.....................................................................................................5
1.4 Required previous knowledge..............................................................................................5
1.5 Required software................................................................................................................6
1.6 Overview: User documentation for EC2121 ........................................................................6
1.7 Overview: documentation for CODESYS 3.n ......................................................................7
1.8 Change history.....................................................................................................................7
2Prepare the controller 8
2.1 Hardware installation ...........................................................................................................8
2.2 Install UpdateTool on the PC...............................................................................................8
2.3 Establish a connection between the controller and the PC via Ethernet.............................9
2.3.1 Connect the controller and the PC ...............................................................................................9
2.3.2 Check and set the network settings of the PC..............................................................................9
2.3.3 Test connection between the controller and PC.........................................................................11
2.4 Check and update OS version...........................................................................................12
3Installation 15
3.1 Prepare installation ............................................................................................................15
3.2 Carry out installation ..........................................................................................................17
3.2.1 Install the programming software CODESYS 3.5.......................................................................17
3.3 Start CODESYS 3.5...........................................................................................................19
3.4 Install packages .................................................................................................................20
3.4.1 Start the package manager........................................................................................................20
3.4.2 Install packages with the package manager...............................................................................20
4Features of a PLC 22
4.1 Cyclical program processing..............................................................................................22
4.2 Time response ...................................................................................................................23
4.2.1 Cycle time...................................................................................................................................23
4.2.2 Watchdog...................................................................................................................................23
4.2.3 Response time ...........................................................................................................................23
5A first program 24
5.1 Device tree.........................................................................................................................26
5.2 Connect to the device ........................................................................................................27
5.3 Create the program............................................................................................................30
5.3.1 Suppress SafetyPLC in the device tree......................................................................................30
5.3.2 Cyclical program processing ......................................................................................................30
5.3.3 Structured programming.............................................................................................................31
5.3.4 Create new block........................................................................................................................31
5.3.5 Function block diagram (FBD)....................................................................................................32
5.3.6 Program linking ..........................................................................................................................33
5.3.7 Address binary inputs and outputs.............................................................................................34
5.3.8 Call in PLC_PRG........................................................................................................................35
5.3.9 Structured text (ST)....................................................................................................................36
5.4 Transfer and test the program ...........................................................................................37
5.4.1 Transfer program........................................................................................................................37
5.4.2 Test program..............................................................................................................................38