OpenCommissioning

This feature was added in realvirtual 6.0.8-8217 (Professional & Starter)

Overview

The OpenCommissioning interface integration bridges realvirtual components with the OpenCommissioning open-source framework. OpenCommissioning provides a standardized shared memory communication system for industrial automation simulation, enabling real-time data exchange between simulation components and external control systems. OpenCommissioning uses TwinCAT as its realtime environment, providing deterministic execution for virtual commissioning applications. Through OpenCommissioning and Beckhoff hardware, real fieldbus simulation becomes possible, allowing direct connection to actual industrial fieldbus networks.

realvirtual's OpenCommissioning integration provides 7 specialized link components that automatically connect realvirtual simulation components (drives, sensors, grippers, lamps) to OpenCommissioning's communication infrastructure. This integration enables seamless interoperability with other OpenCommissioning-compatible tools and systems.

Learn More:

Key Benefits:

  • Standardized industrial communication using open-source protocols

  • Zero-configuration integration with automatic activation

  • Real-time bidirectional data exchange with external systems

  • Compatible with existing realvirtual simulation models

OpenCommissioning demo scene showing realvirtual components integrated with OC Link components

Installation

Step 1: Install OpenCommissioning Package

Install the OpenCommissioning Unity package from GitHub using Unity Package Manager:

  1. Open Unity Package Manager (Window > Package Manager)

  2. Click the + button and select Add package from git URL

  3. Enter: https://github.com/OpenCommissioning/OC_Unity_Core.git

  4. Click Add

Step 2: Automatic Activation

Once the OpenCommissioning package is installed, realvirtual automatically activates the integration:

  • The REALVIRTUAL_OPENCOMMISSIONING compiler directive is enabled

  • OC Link components become available in the Component menu

  • No additional configuration required

Step 3: Add TcAdsClient Component

Add the TcAdsClient component to your top-level scene GameObject:

  1. Select your main scene root GameObject (e.g., "DemoCell" in the demo scene)

  2. Click Add Component and search for "TcAdsClient"

  3. Configure the TwinCAT ADS connection settings as needed

This component manages the TwinCAT ADS communication between Unity and the OpenCommissioning realtime environment.

Step 4: Verify Installation

Confirm successful installation by checking that Component > realvirtual > OpenCommissioning appears in the Unity menu with all 7 link components available.

Available Components

realvirtual provides 7 specialized link components that connect realvirtual simulation components to OpenCommissioning's shared memory system:

OpenCommissioning category in the realvirtual Component menu
All seven OC Link components available when OpenCommissioning package is installed

OC Link Cylinder Links realvirtual Drive_Cylinder components to OpenCommissioning. Provides position control and status feedback for pneumatic cylinder simulation with extend/retract commands.

OC Link Drive Position Connects position-based drives to OpenCommissioning. Enables precise position control with target position commands and current position feedback.

OC Link Drive Simple Links drives with forward/backward control to OpenCommissioning. Provides simple directional control with status feedback for basic conveyor and transport applications.

OC Link Drive Speed Connects speed-controlled drives to OpenCommissioning. Enables variable speed control with real-time speed commands and feedback.

OC Link Grip Links realvirtual Grip components to OpenCommissioning. Provides grip/release commands and status feedback for automated part handling and gripping operations.

OC Link Lamp Connects realvirtual Lamp components to OpenCommissioning. Enables remote control of indicator lamps and visual status signals.

OC Link Sensor Links realvirtual Sensor components to OpenCommissioning. Provides sensor state output to external systems for proximity detection and part presence monitoring.

Quick Start

This example demonstrates setting up an OpenCommissioning-linked conveyor with sensor control:

  1. Create or open a scene with a realvirtual Drive component (e.g., a conveyor belt with Drive_Simple)

  2. Add OC Link Drive Simple component:

    • Select the GameObject with the Drive_Simple component

    • Click Component > realvirtual > OpenCommissioning > OC Link Drive Simple

  3. Configure the link:

    • The link automatically detects the Drive_Simple component on the same GameObject

    • Set Communication Name to identify this drive in OpenCommissioning (e.g., "Conveyor_Main")

    • Enable Auto Connect to establish connection on scene start

  4. Add sensor integration:

    • Create a realvirtual Sensor component at the conveyor endpoint

    • Add OC Link Sensor component to the sensor GameObject

    • Set Communication Name to "Sensor_Endpoint"

  5. Test the integration:

    • Enter Play mode

    • Verify connection status in the Status section of OC Link inspectors

    • Control the conveyor through OpenCommissioning shared memory

    • Monitor sensor state changes in real-time

OC Link Drive Simple inspector showing Control, Status, References, Settings, Communication, and Events sections

Component Properties

All OC Link components share common properties organized into collapsible sections:

Control Section

  • Forward (button) - Manually trigger forward motion for testing

  • Backward (button) - Manually trigger backward motion for testing

  • Component-specific controls vary by link type

Status Section

  • Connection Status (indicator) - Shows OpenCommissioning connection state (green = connected, red = disconnected)

  • Current State (text) - Displays current operational state

  • Component-specific status fields

References Section

  • Linked Component (reference) - Automatically detected realvirtual component on same GameObject

  • Can be manually assigned if component is on different GameObject

Settings Section

  • Communication Name (string) - Unique identifier for OpenCommissioning shared memory mapping

  • Auto Connect (boolean) - Automatically establish connection when scene starts

  • Update Rate (float) - Communication update frequency in milliseconds

Communication Section

  • Shared Memory Address (text) - Current shared memory location (read-only)

  • Last Update Time (text) - Timestamp of most recent communication (read-only)

  • Error Count (number) - Number of communication errors since connection (read-only)

Events Section

  • On Connected (UnityEvent) - Triggered when OpenCommissioning connection established

  • On Disconnected (UnityEvent) - Triggered when connection lost

  • Component-specific events for state changes

See Also

Last updated