132 • Process Image
WAGO-I/O-SYSTEM
750
Linux Fieldbus Coupler
•
ioctl(iFD, IOCTL_CHANGE_UPDATE_SPEED, ulValue)
[ulValue from 1-10 is valid]
Used to set the polling interval to poll
ioctl(iFD, IOCTL_KBUSUPDATE,
&ulTmp
. The default value is 3. This value can be reduced to 1 in order to
achieve the highest possible speed of the application. However, this only
makes sense with very fast I/O modules and a very small user program.
The value can also be increased to 10 if only very slow analog I/O
modules are involved and fast updates of the process image are not
desired.
•
close(iFD)
Closes the KBus driver
Using predefined structures, it is possible to access the input or output process
image byte by byte via the following lines:
pstPabIn->uc.Pab[byteNo]
pstPabOut->uc.Pab[byteNo]
or word by word via the lines:
pstPabIn->us.Pab[wordNo]
pstPabOut->us.Pab[wordNo]
Before the input process image can be analyzed,
ioctl(iFD,
IOCTL_KBUSUPDATE,...)
must be called. After changing the output process
image, it is also required to call
ioctl(iFD, IOCTL_KBUSUPDATE,...)
in
order to send the new values to the modules.