Quick Start

A warm welcome to the RevPi community! Now that you”re here, you”ve obviously just received your RevPi Connect .

So here we go, tear open the wrapper (if you haven”t already)! You should find the following in the package:

  • 1 x RevPi Connect
  • 1 x plug for the power supply
  • 2 x PiBridge covers to protect unused PiBridge connectors

On the following pages we explain how to use CODESYS on your RevPi Connect.

This document shall just give a general overview of the Revolution Pi Library and Codesys. You can refer to a simple startup project BlinkingLight for a more detailed RevPi Connect setup with CODESYS.

If you want to know more about your device, you can find information about your here (Manuals, Videos & Downloads | Revolution Pi (kunbus.de)).

Let”s go!

  • Install the CODESYS Development System on your Windows system.
  • Open CODESYS.
  • Open the package manager under Tools/Package Manager.

The window shows all CODESYS packages that are currently installed on your system.

In the case of a new installation, it may look like this:

  • In this case, download the following two packages:
    CODESYS Control for Raspberry Pi MC SL
    Revolution Pi Library for CODESYS.
  • Install the two packages via Windows Explorer (the setup wizard will guide you through the installation process).
  • Alternatively, you can install the two packages via the CODESYS package manager (under Tools/Package Manager).
  • Click on “Install”.
  • Then select the corresponding downloaded package. (The setup wizard will guide you through the installation process.)

CODESYS displays the checksum of the respective package under Installation – License Agreement.

  • Verify if CODESYS Control for Raspberry Pi and the Revolution Pi CODESYS Packages are installed under Tools/Package Manager.
  • In CODESYS, create a new standard project with CODESYS Control for Raspberry Pi SL.
  • If your RevPi device has multi core license support, e.g. article No.100337 (Connect+ 16 GB plus CODESYS Multi Core), select CODESYS Control for Raspberry Pi MC SL.
  • Right-click on “Device” in the project tab.
  • Click on “Add Device”.

You can find the KUNBUS RevPi base modules under the following section.

  • Right-click on the base module once it is added (RevPi Connect as in this example).
  • Click on “Add Device”.

You can optionally use further KUNBUS submodules.

  • Click with the right mouse button on the base module that you added in the previous step (in this example on “Connect”).
  • Click on “Add Device”.
  • To place a sub module again select the piBridgeLeft/piBridgeRight device Interface in CODESYS.
  • Click on “Add Device”.
  • Select the appended Device.
  • Click on “Add Device”.

This displays the available modules that can be connected to the left or right side of the RevPi Core/Connect base module, e.g.:
– AIO – analog input output module
– DI – digital input module
– DIO – digital input output module
– DO – digital output module
– MIO – multi input output module

PiBridgeEnd is a virtual termination of the PiBridge indicating the end of sub modules on either left or right side of the base module. At this point, a gateway can be attached as further end device.

  • Click with the right mouse button on PiBridgeEnd.
  • Select “Plug Device…”.

You can find all RevPi Gates here.

You can find IO parameter variables e.g. for the DIO module under Revolution PI DIO Module I/O tab. In order to use a particular input/output in the Codesys task, you need to name the variable (e.g. input1, output1..).

You can start writing your own program! To help you with this, we have created some examples.
The MainTask in the following case calls a POU named PLC_PRG in a default cycle interval of 20 ms. The selected variables can be addressed in this POU where Output1 of DIO module is held high after input1 is high for 5 seconds using a TON timer.

Finding the Connected Device

  • Open the Device Communication Settings tab by double-clicking on the root device.

This can be CODESYS Control for Raspberry Pi SL or CODESYS Control for RaspberryPi MC SL, depending on whether you have selected CODESYS Control for single core or multi core support.

  • Select “Scan network”.

You will now see the devices that are on your local network.

  • Click on “Login”.

You will be prompted to download the program for the first time.

  • Wait until the download is finished.
  • Click on the start button.

The application will now be executed and the online mode for debugging will be made available.

Refer to the example BlinkingLight as a starting example with RevPi CODESYS. This example will be under the folder “%USERPROFILE%\Revolution Pi\Examples“ which is default path displayed during the installation of RevPi Codesys Library.