Revolution Pi I/O Configuration Example

Introduction

This example demonstrates usage of RevolutionPiIOServer. The RevolutionPiIOServer is able to read values from Revolution Pi I/O and update configured CDP channels (signals), and also write values from configured CDP channels (signals) to Revolution Pi I/O. To use RevolutionPiIOServer successfully in this example, an actual RevPi Core and RevPiDIO module must be connected to your network.

Note: See Revolution Pi setup for how to set up the revolution pi to get access to its I/O system.

Set up a test-system

First we set up a system that the component can be tested in:

  • Click Welcome mode to go to the Welcome Page
  • In the Projects tab, under Create Project, Click New Project
  • Select CDP System and click Choose...
  • Type in "RevPiTest" in the Name text-field. Click Next >
  • Click Next > to select the default Framework version
  • Choose Application Type Console and Application Name RevPiTestApp.
  • Click Finish
  • Select Configure mode.

Adding an RevolutionPiIOServer component

  • Select the RevPiTestApp that resides under RevPiTest in the Project tree.
  • Select/expand the RevolutionPiIO in the Resource tree, right-click on RevolutionPiIOServer and select Add.

Adding DIO module

  • Select the newly added RevolutionPiIOServer in the Project tree.
  • Right-click DIO in the RevolutionPiIO resource in the Resource tree and select Add.
  • If you have more I/O modules, add them in the same sequence as they are connected to RevPi Core.

Configure DIO module

  • In the Modules table, click on the arrow in front of the newly added DIO.
  • Scroll down to the Properties table.
  • Find the Position property and select Right or Left, depending on position of RevPi DIO relative to RevPi Core

Select Toolkit and Pair

  • Select RevPiTest in the Project tree.
  • In the Networks table, select the network that the RevPi device is on.
  • In the Devices table, find the IP-address of the RevPi Core.
  • Double-click on the IP-address in Name-column to rename it to RevolutionPi, then type in the Username, and select 'Pair'. Enter the password if a dialog pops up.
  • In the Applications table, select Device 'RevolutionPi' and select Raspbian Toolkit

How to Run the Tutorial

To run the tutorial from CDP Studio, select Configure mode, right click on the system project and select Run & Connect. See the Running and Connecting to the System tutorial for more information.

Verify That It Works

  • Click into RevPiTest.RevPiTestApp.RevolutionPiIOServer.
  • Set the RevPiTest.RevPiTestApp.RevolutionPiIOServer.DIO.DO00 to 1, measure that the physical output turns on with e.g. a multimeter.

To verify correct functioning of digital input and output in CDPStudio, loop a wire from the first physical digital output to the first physical digital input.

  • Add the RevPiTest.RevPiTestApp.RevolutionPiIOServer.DIO.DO00 and RevPiTest.RevPiTestApp.RevolutionPiIOServer.DIO.DI00 signals to the Plot by right-clicking and selecting 'Add to Plot...'->'Tab'->'Untitled' on each of the signals.
  • Set the value of RevPiTest.RevPiTestApp.RevolutionPiIOServer.DIO.DO00 on and off a couple of times.
  • Click on Analyze mode.
  • Scroll left in the plot, and verify that RevPiTest.RevPiTestApp.RevolutionPiIOServer.DIO.DI00 follows the signal set into RevPiTest.RevPiTestApp.RevolutionPiIOServer.DIO.DO00.