2.1 Adding the MonarcoDrv driver

The project main file with the MonarcoDrv driver included is shown in Figure 2.1.


PIC


Figure 2.1: An example of project main file with the MonarcoDrv driver included

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 (MNR, see Fig. 2.1), is the prefix of all input and output signals provided by this driver.

The most important parameters of IODRV block are:

module
– name of the module linked to the driver, in this case MonarcoDrv – the name is CASE SENSITIVE!
classname
– class of the driver, in this case MonarcoHatDrv
cfgname
– name of the driver configuration file, e.g. monarcohat.rio
factor
– multiple of the EXEC block’s tick parameter defining the driver’s task execution period

The above mentioned parameters of the IODRV function block are configured in RexDraw program. The configuration dialog is shown also in Fig. 2.1.

The Configure button opens the configuration dialog of the MonarcoDrv driver, which is described in chapter 2.2.