172 •
Application Examples
Example
kbusdemo
WAGO-I/O-SYSTEM
750
Linux Fieldbus Coupler
The program is called directly via the console and has the following HELP
page:
Usage: ./kbusdemo OPTION [ADDRESS] [OPTION] [ADDRESS] ...
WAGO KBUS DEMO.
OPTION:
-r, --read Read Inputbyte [ADDRESS=xxx]
-n, --on Switch on Outputbit [ADDRESS=xxx.x]
-o, --off Switch off Outputbit [ADDRESS=xxx.x]
-h, --help Print this message.
ADDRESS:
xxx.x
Startaddress (Byte.Bit) from Output/Input
Proprietary.
Send bug reports to [email protected]
Via the OPTIONS of this example program it is possible to select whether to
read or to write data. The ADDRESS field determines the corresponding
address.
The addresses follow the process image. The /proc/driver/kbus/pab file of the
internal bus driver shows the configuration of the process image:
Example:
cat /proc/driver/kbus/pab
Slot Terminal
Output:
Input:
Byte.Bit Offset Byte.Bit Offset
8 750-553/000-000
0.0 x.x
9 750-559/000-000
6.0 x.x
--------------------------------------------------------------
1 750-4xx x.x 0.0
2 750-4xx x.x 0.4
3 750-4xx x.x 0.6
4 750-4xx x.x 1.0
5 750-4xx x.x 1.2
6 750-4xx x.x 1.4
7 750-4xx x.x 1.6
--------------------------------------------------------------
PAB In: 00ffe060 PAB Size: 2040 bytes
PAB Out: 00ffe858 PAB Size: 2040 bytes