Changing Revolution Pi projects or the runtime system for Revolution Pi to use the generic IO provider


The access to hardware IOs of a →Revolution Pi is possible by using a generic IO provider concept of logi.CAD 3. This article informs whether and which steps are necessary for this access.

Recommended: Using the project template "Counter Project for Revolution Pi" in logi.CAD 3 version ≥ 1.120.0 and logi.RTS version ≥ 3.31.0

You do not have to do anything. Reasons:

  • The PLC-object RevolutionPi of the Revolution Pi project that has been created based on the project template Counter Project for Revolution Pi in logi.CAD 3 version ≥ 1.120.0 already contains the needed code.

  • logi.RTS for Revolution Pi, ≥ version 3.31.0 is already correctly configured.

Using other projects

If you want to use other projects (e.g. projects that have been created by using a logi.CAD 3 version 1.119.0), the following specification for IO_IMPORT is required within the PLC-object:

Example
{ IO_IMPORT PROVIDER := GenericProvider, SERVICE := RevolutionPi }
Example: Code block for a Revolution Pi configuration within an PLC-object
CONFIGURATION RevolutionPi
RESOURCE RevolutionPiResource ON RevolutionPi { ON_CHANNEL := RevolutionPiChannel}
{ IO_IMPORT PROVIDER := GenericProvider, SERVICE := RevolutionPi }
{ INCLUDE_GLOBALS hardwareConfig }
{IO} TASK DefaultTask(INTERVAL := TIME#500ms, PRIORITY := 38229);
PROGRAM CounterProgram WITH DefaultTask :
RevolutionPiCounterProgram;
END_RESOURCE
END_CONFIGURATION

Using logi.RTS configuration file from a previous logi.RTS version

It is indispensable to use logi.RTS for Revolution Pi, ≥ version 3.31.0!

If you want to go on using the logi.RTS configuration file of a previous logi.RTS version, you have to change this file.

  1. If logi.RTS is running, terminate logi.RTS.

  2. Copy the configuration file /opt/RTS/PLC/RTSIO.cfg of the previous logi.RTS version into the installation directory of the current logi.RTS version.

  3. Open the file /opt/RTS/PLC/RTSIO.cfg in a text editor.

  4. Search for the following lines:

    Existing lines
    AddSymbol IOSS.DeviceNum 1
    AddSymbol IOSS.Name[0] RTSS_REVPI_IO
    AddSymbol IOSS.SSId[0] 536870978
    AddSymbol IOSS.DeviceId[0] 1
    AddSymbol IOSS.IB[0] 4096
    AddSymbol IOSS.OB[0] 4096
    AddSymbol IOSS.MB[0] 0
    LoadLibrary RTSS_IO
    LoadLibrary RTSS_REVPI_IO
  5. Delete those lines.

  6. Paste the following lines:

    New lines
    AddSymbol RTSS_REVPI_IO.InputSize 4096
    AddSymbol RTSS_REVPI_IO.OutputSize 4096
    AddSymbol RTSS_REVPI_IO.WatchdogTimeout 1000
    LoadLibrary RTSS_REVPI_IO

    Line with

    Meaning

    Default value (1)

    RTSS_REVPI_IO.InputSize

    size of buffer for input data in bytes

    4096

    RTSS_REVPI_IO.OutputSize

    size of buffer for output data in bytes

    4096

    RTSS_REVPI_IO.WatchdogTimeout

    elapsed time for the IO watchdog for the Revolution Pis in milliseconds

    double cycle time of the IO task

    Note on the table: (1) = The default value is used, if the line is missing or the value 0 is specified.

  7. Save the changes and exit the editor.

  8. Restart logi.RTS.