Table of Contents • v
WAGO-I/O-SYSTEM 750
Linux Fieldbus Coupler
5 Step-by-Step Guide to your own Linux Application.............................. 96
5.1 Installation of the Development Toolchain............................................96
5.2 Unpack the Source Code ........................................................................97
5.3 Linux Kernel Compilation......................................................................98
5.4 Setup of the Development Environment ..............................................100
5.4.1 PC Terminal Program Configuration (serial) ..................................101
5.4.2 PC Terminal Program Configuration (Ethernet) .............................103
5.5 Setting the IP address of the Linux Fieldbus Coupler.......................... 104
5.6 Create your own User Space Application ............................................105
5.7 Transferring the User Space Application to the Linux Coupler...........107
5.8 Running the new Program....................................................................108
5.9 Automatic start of new Programs (inittab/startwago) .......................... 108
5.10 File System and Linux Kernel Update .................................................110
5.10.1 TFTP Server Setup ..........................................................................111
5.10.2 TFTP Client Setup........................................................................... 112
5.11 NFS Server Setup .................................................................................116
5.12 Debugging of User Space Programs ....................................................117
5.12.1 Description of the GDB................................................................... 117
5.12.2 Preparation for Using the Debugger................................................118
5.12.3 Creating a Testable User Space Application ...................................119
5.12.4 Creating an Example Application for Debugging ........................... 121
5.12.5 Debugging via the GDB Console ....................................................122
5.12.6 Debugging via the Graphical Interface DDD .................................. 125
6 Process Image .......................................................................................... 127
6.1 Basic Structure .....................................................................................127
6.2 Example for an Input Process Image....................................................128
6.3 Example for an Output Process Image.................................................129
6.4 Application Example for a Mixed Node: .............................................130
6.5 Internal Bus Driver (kbus.ko)...............................................................131
6.6 Process Image Analysis via the /proc Directory ..................................135
7 I/O Modules .............................................................................................136
7.1 Overview ..............................................................................................136
7.1.1 Digital Input Modules......................................................................136
7.1.2 Digital Output Modules...................................................................138
7.1.3 Analog Input Modules.....................................................................139
7.1.4 Analog Output Modules ..................................................................141
7.1.5 Special Modules...............................................................................142
7.1.6 System Modules ..............................................................................144
7.2 Process Data Architecture for MODBUS/TCP....................................145
7.2.1 Digital Input Modules......................................................................145
7.2.2 Digital Output Modules...................................................................147
7.2.3 Analog Input Modules.....................................................................151
7.2.4 Analog Output Modules ..................................................................152
7.2.5 Specialty Modules ...........................................................................153
7.2.6 System Modules ..............................................................................165