Raspberry Pi Dev: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
At this point make folder and uncompress '''PluginHeaders_2.6.2.zip''' in it. You can download the file from our site, in the Dowload section.<br>
At this point make folder and uncompress '''PluginHeaders_2.6.2.zip''' in it. You can download the file from our site, in the Dowload section.<br>
Plugin headers expose the LLExec API to interface with the runtime, they require that some defines are set in order to compile correctly. As you will see after, these defines will be already defined in the Makefile.<br>
Plugin headers expose the LLExec API to interface with the runtime, they require that some defines are set in order to compile correctly. As you will see after, these defines will be already defined in the Makefile.<br>
Now please download and uncompress the file '''LLXPlugin_PIFACE.zip''' in the previous foldere where you have already uncompress the plugin headers.
Now please download and uncompress the file '''LLXPlugin_PIFACE.zip''' in the previous foldere where you have already uncompressed the plugin headers.<br>
Please note that every release of LLExec has its own plugin header, so be shure that the release number of the headers matches with the release of LLExec installed. [[No backward compatibility is guaranted]]:please compile your plugin for a specific release of LLExec.  


=Compile the plugin=
=Compile the plugin=
In order to compile the plugin please go to the directory you have previously uncompressed, ie
/home/axel/plugin_headers_root/LLXPlugin_PIFACE
type
make
If you have done correctly all the previous steps, this will generate the file '''LLXPlugin_PIFACE.so'''
Please copy this file on the RaspberryPI in the same directory where the runtime is installed.
=Plugin concepts=
=Plugin concepts=
=Edit pll library=
=Edit pll library=

Revision as of 14:55, 21 November 2017

Summary

The purpose of this page is to allow expert Raspberry PI developers to extend the PLC runtime.
It shows up how the interface to PiFace I/O board can be implemented from scratch.
You can clone the example to implements inteface with your own I/O module.

Prerequisites

To follow this guide you need:

  • A Raspberry PI with a running and licensed PLC runtime (LLExec >= 2.6.2 is suggested).
You can install the runtime following the guide in http://www.axelsw.it/pwiki/index.php?title=Raspberry_Pi
  • A Raspbian cross-compile toolchain
You can download it from https://github.com/raspberrypi/tools

Setup your Linux machine

Please uncompress the toolchain and find the path of the compiler tools: for example suppose they are under the folder

/home/axel/toolchain_RPI_orig/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

In this case you have to edit your .profile file and add the row

export PATH=/home/axel/toolchain_RPI_orig/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH

in order to make the compiler available to the system.
At this point make folder and uncompress PluginHeaders_2.6.2.zip in it. You can download the file from our site, in the Dowload section.
Plugin headers expose the LLExec API to interface with the runtime, they require that some defines are set in order to compile correctly. As you will see after, these defines will be already defined in the Makefile.
Now please download and uncompress the file LLXPlugin_PIFACE.zip in the previous foldere where you have already uncompressed the plugin headers.
Please note that every release of LLExec has its own plugin header, so be shure that the release number of the headers matches with the release of LLExec installed. No backward compatibility is guaranted:please compile your plugin for a specific release of LLExec.

Compile the plugin

In order to compile the plugin please go to the directory you have previously uncompressed, ie

/home/axel/plugin_headers_root/LLXPlugin_PIFACE

type

make

If you have done correctly all the previous steps, this will generate the file LLXPlugin_PIFACE.so Please copy this file on the RaspberryPI in the same directory where the runtime is installed.

Plugin concepts

Edit pll library

Configure runtime

Access from LogicLab

Further readings