Chapter 2
Including the driver in the project
The driver is included in the project as soon as the driver is added to the project main
file and the inputs and outputs are connected in the control algorithms.
2.1 Adding the RPiDrv driver
The project main file with the RPiDrv driver included is shown in Figure 2.1.
There are 2 blocks which must be added to the project to include the driver. First the
MODULE block is attached the the Modules output of the EXEC function block. It must be
renamed to RPiDrv.
The other block of type IODRV is connected to the Drivers output of the main EXEC
block. The name of this block (RPI, see Fig. 2.1), is the prefix of all input and output
signals provided by this driver. It is recommended to name the IODRV block according
to the used platform:
•RPI – Raspberry Pi GPIO, PiFace Digital expansion board
•UNP – UniPi expansion board
•PIO – Intellisys PIO platform
The most important parameters of IODRV block are:
module – name of the module linked to the driver, in this case RPiDrv – the name is
CASE SENSITIVE!
classname – class of the driver – the name is CASE SENSITIVE!
•RPiDrv – Raspberry Pi GPIO, PiFace Digital expansion board
•UnpDrv – UniPi expansion board
•PioDrv – Intellisys PIO platform
cfgname – name of the driver configuration file, but this driver does not use any
4