Table of Contents 5
WAGO I/O-SYSTEM 750
I/O-IPC-C10E, CANopen Master
11 CoDeSys 2.3 Runtime Environment......................................................... 82
11.1 Syntax of Logical Addresses................................................................... 82
11.2 Access to the Process Images of the Input and Output Data
via CoDeSys 2.3...................................................................................... 83
11.3 Addressing Example ............................................................................... 85
11.4 Installing the Programming System CoDeSys 2.3
(WAGO-I/O-PRO CAA) ........................................................................ 86
11.5 The First Program with CoDeSys 2.3 ..................................................... 86
11.5.1 Start the CoDeSys Programming System........................................... 86
11.5.2 Designing a Project and Selecting the Target System........................ 87
11.5.3 Creating the PLC Configuration......................................................... 89
11.5.4 Editing a Program Function Block..................................................... 93
11.5.5 Creating a Task Configuration ........................................................... 95
11.5.5.1 Cyclical Task Priorities.................................................................. 97
11.5.5.2 Freewheeling Tasks ....................................................................... 98
11.5.6 Loading and Executing the PLC Program in Control ........................ 99
11.5.7 Creating a Boot Project .................................................................... 101
11.5.8 CoDeSys Visualization..................................................................... 102
11.5.8.1 Limitations of the CoDeSys Visualization .................................. 104
12 CANopen Master in CoDeSys 2.3........................................................... 106
12.1 CANopen I/O-IPC PLC Configuration................................................. 106
12.2 PLC Configuration Setting Choices...................................................... 110
12.2.1 CANopen Master (I/O-IPC) ............................................................. 110
12.2.2 CANopen Slaves .............................................................................. 113
12.2.3 Access to the CANopen Process Data.............................................. 120
12.2.4 Loading the Program in the I/O-IPC ................................................ 122
12.3 Diagnostics............................................................................................ 123
12.3.1 DiagGetBusState() and DiagGetState()............................................ 124
12.3.2 Creation of Diagnostic Functions in CoDeSys 2.3........................... 125
12.3.3 Assigning a Diagnostic Address to the CANopen Master ............... 127
12.3.4 Performing Bus Diagnostics via DiagGetBusState() ....................... 128
12.3.5 Performing Device Diagnostics via DiagGetState()......................... 130
12.3.6 Evaluation of the CANopen Diagnostics (Emergency Messages)... 131
12.4 Data Exchange of Simple CAN Subscribers with the I/O-IPC............. 136
13 Incorporation of C-Functions as CoDeSys Library.............................. 138
13.1 Example for Linking a Dynamic Library.............................................. 138
13.1.1 Developing and Compiling a Linux Shared Library ........................ 138
13.1.2 Creating a Description File for the CoDeSys Runtime System ....... 139
13.1.3 Copying a Library and INI File and Restarting
the CoDeSys Runtime System.......................................................... 140
13.1.4 Creating an IEC Library ................................................................... 141
13.1.5 Linking a Library to the CoDeSys Project ....................................... 143
13.2 Special Features .................................................................................... 145
13.2.1 Data Types........................................................................................ 145
13.2.2 Structures.......................................................................................... 146
13.2.3 Parameter Transfer by Reference or by Value ................................. 147
13.3 Additional Applications ........................................................................ 147