Internal Bus Driver (Kbus.ko) - WAGO 750 Series Manual

Linux fieldbus coupler
Hide thumbs Also See for 750 Series:
Table of Contents

Advertisement

6.5 Internal Bus Driver (kbus.ko)

The internal bus driver kbus is a char device driver. It is therefore possible to
access the connected I/O modules using the standard device interface. The
driver is started automatically via the /etc/startwago file when the Linux
fieldbus controller is started.
In order not to have to create definitions manually, the header file kbusapi.h
can be used in its own program. Functions that are additionally available in the
file (e.g., KbusUpdate) are no longer required and only included for
compatibility reasons.
Note:
The file kbusapi.h provides several macros that make it easier to access the
process image, however, they are not essential.
It may be beneficial to customize structures with meaningful names taken
from the control process.
Source code files:
~/uclinux-dist/user/kbusapi/kbusapi.h
Driver/Kernel module: kbus.ko (internal bus support)
Function Description
The internal bus driver can be used with the following functions:
WAGO-I/O-SYSTEM 750
Linux Fieldbus Coupler
open(„/dev/kbus", O_WRONLY)
Opens the kbus driver.
ioctl(iFD, IOCTL_KBUSUPDATE, &ulTmp)
Writes the modified data of the output process image to the modules and
simultaneously reads the current data of the input modules back in.
ioctl(iFD, IOCTL_GETBINOUTPUTOFFSET, &ulOutputOffset)
Reads out the
Offset
process image has the
digital I/O modules.
ioctl(iFD, IOCTL_GETBININPUTOFFSET, &ulInputOffset)
Reads out the
Offset
process image has the
digital I/O modules.
Internal Bus Driver (kbus.ko)
value. The first digital output module in the output
value. It is therefore easier to access the
Offset
value. The first digital input module in the input
value. It is therefore easier to access the
Offset
Process Image • 131

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

750-860

Table of Contents