realvirtual.io
  • Building Digital Twins with Unity and realvirtual.io
  • Basics
    • Installation
    • Demo Model
      • Old Demo Model
    • Editor User Interface
      • Hierarchy Window
      • 3D Views
      • Quick Edit
      • Move Pivot Points (Pro)
      • Selection Window (Pro)
      • Material Window (Pro)
      • Measurement (Pro)
      • Kinematic Tool (Pro)
      • Model Checker
    • Runtime UI
      • Group Manager
      • Debug Console
      • Responsiveness
      • Runtime Persistence
    • Importing and exporting
    • Folder structure
    • Tutorial
    • Physics
    • CAD import (Pro)
      • CADLink (Pro)
      • CAD Checker (Pro)
      • CAD Updater (Pro)
    • Reusable Components (Prefabs)
    • Cadenas parts4cad
    • Publishing the Digital Twin
    • Revision management
  • News
  • Login & Download Updates (Pro)
  • Components & Scripts
    • Realvirtual
      • Environment Controller
    • MU, Source and Sink
      • Source
      • Sink
    • Motion and Kinematic
      • Drive
      • Kinematic
      • Group
      • Joint
      • CAM
      • TransportSurface
      • Guided Transport
      • Drive behavior
      • Chain
      • Chain element
      • Motion for developers
    • Sensors
      • Sensor
      • Measure
      • MeasureRaycast
    • Picking and Placing MUs
      • Grip
      • Gripper
      • Fixer
      • Pattern
    • Changing MUs
      • MaterialChanger
      • PartChanger
      • Cutter
    • Scene Interaction
      • 3D Buttons
      • Screen Overlay Buttons
      • Scene Selectables
      • Lamp
      • Interact3D
      • UI components
      • HMI components (Pro)
        • Start your own HMI
        • HMI Tab
        • HMI DropDown
        • HMI Puschbutton
        • HMI Switch
        • HMI Value
        • HMI Text
        • HMI Slider
        • HMI Message
        • HMI Marker
      • ModelZoo (Pro)
    • Interfaces
      • Interface Tools
        • Signal Manager
        • Signal Importer Exporter
        • Signal Catcher
        • OnValueChangedReconnect
      • Signal Importer / Exporter
      • ABB RobotStudio (Pro)
      • Denso Robotics (Pro)
      • EthernetIP (Pro)
      • Fanuc (Pro)
      • FMI
      • Igus Rebel
      • MQTT (Pro)
      • Modbus (Pro)
      • OPCUA (Pro)
      • PLCSIM Advanced (Pro)
      • RoboDK (Pro)
      • RFSuite (Pro)
      • SEW SimInterface (Pro)
      • Siemens Simit Interface (Pro)
      • Simit Shared Memory (Pro)
      • Simulink (Pro)
      • S7 TCP
      • TwinCAT (Pro)
      • TwinCAT HMI (Pro)
      • UDP (Pro)
      • Universal Robots (Pro)
      • Wandelbots Nova (Pro)
      • Websocket (Pro)
      • Windmod Y200 (Pro)
      • Custom Interfaces
    • Performance Tools
      • Combine Meshes (Pro)
      • Create Prefab (Pro)
      • Hierarchy Cleanup (Pro)
      • Mesh Optimizer (Pro)
      • Performance Optimizer (Pro)
    • Defining Logic
      • Unity Scripting
      • Behavior Graph
      • Logicsteps
      • Unity Visual Scripting
      • Recorder
    • Robot Inverse Kinematics (Pro)
    • Volume Tracking (Pro)
  • Multiplayer (Pro)
  • Extensions
    • ModelZoo
      • Beckhoff TwinCAT
      • Siemens S7
      • Denso Cobotta 1300
      • Wandelbots Nova Fanuc CRX
      • Universal Robots UR10
      • Fanuc Roboguide
    • realvirtual.io AIBuilder
      • realvirtual.io AI Builder Overview
      • Generate AI Training Data
      • AI Training
      • Testing AI in a Digital Twin
      • Deploying the AI
    • realvirtual.io Simulation
      • Conveyor Library
      • Path System
        • Path finding
        • Line
        • Curve
        • Workstation
        • Catcher
        • Pathmover
    • realvirtual.io Industrial Metaverse
      • Setup Guide
      • VR Modules
      • AR Modules
      • Multiuser
    • AGX Physics
    • VR Builder
    • CMC ViewR
  • Advanced Topics
    • Render Pipelines
    • Mixed Reality with Meta Quest3
    • Upgrade Guide
      • Upgrade to 2022
    • Open Digital Twin Interface
    • Usefull Addons
    • Improving Performance
    • Supported Platforms
    • Compiler Defines
    • For Developers
      • Important Classes and Interfaces
      • Assembly Definitions
      • Starting your development
      • Class documentation
      • realvirtual Init Sequence
      • realvirtualBehavior Lifetime Methods
      • Testing
    • Newtonsoft JSON
    • Troubleshooting
  • Release Notes
  • AI Digital Twin Assistant (GPT4)
  • License Conditions
Powered by GitBook
On this page
  • How to use the signal manager
  • Component elements
  • User scripts
Edit on GitHub
  1. Components & Scripts
  2. Interfaces
  3. Interface Tools

Signal Manager

for automatically connecting signals with the model

PreviousInterface ToolsNextSignal Importer Exporter

Last updated 3 months ago

This is a function for professional users who want to manage big simulations with a big number of signals.

The Signal Manager is used to automatically link imported signals to specific PLC Signals within your realvirtual.io project. Additionally, Signals that are not linked can be deleted or deactivated. Depending on your rules for automatic connection, an appropriate script must be added. The Signal Manager also offers the possibility to automatically create signals in your realvirtual.io project if no suitable signals are found in the already existing and previously imported signals.

If you have thousands of unused and unconnected Signals in your project after importing the signals, you can significantly improve the startup time of your simulation if you disable or delete unconnected Signals.

How to use the signal manager

To use the Signal Manager, it must be added as a component to the game object that contains the imported signals as subcomponents (and usually the interface itself).

To get an overview of the number of connected and unconnected signals, you can select “Check Signals”. This will update the information displayed in the Signal Manager.

Component elements

AutoConnectLevels In the “AutoConnectLevels” list you specify for which game objects (and child objects) the signal connection should be performed. This way you avoid checking and connecting parts of the simulation model where you don’t want to perform an automatic signal creation or connection.

Check signals. Updates the signal information.

Disable unconnected signals Disables all unconnected Signals.

Enable Unconnected Signals Enables all unconnected Signals.

Delete Unconnected Signals Deletes all unconnected Signals.

Delete automatically created signals. Deletes all automatically created Signals, connected or disconnected.

Start and connect signal creation Starts the automatic connection of Signals. Signals that are not found are created automatically. To use automatic signal connection and creation, you need to define your own custom user scripts that implement your connection and naming rule (see below).

User scripts

The signal manager uses the custom script to assign the Signals. This script must be of type “AutoConnectBase”. Within the script you define how the matching should be done. One possibility is to use the definition of kinematic groups to assign the signals to a drive or a gripper, for example. The use of EditorUtility.SetDirty is necessary to update the editor. Below you will find a corresponding code example:

 namespace realvirtual.io
{
    public partial class AutoConnectExample : AutoConnectBase
    {
        public override bool AutoConnect(BehaviorInterface component)
        {
            var connected = false;
            var signalname = "";
            Debug.Log($" Checking AutoConnect for " +component.name);

            /// Here you can define your connection rules, create signals and assign them to the behavior models
            Kinematic kin = component.GetComponent<Kinematic>();

            if (component.GetType() == typeof(Gripper))
            {
                signalname = kin.GroupName + "_Oeffnen";   // define Signal name based on custom rule
                var signal = GetOrCreateSignal<PLCOutputBool>(signalname);   // create the signal if not already there
                ((Gripper)component).OpenGripper = signal; // connect the signal to the behavior model
                EditorUtility.SetDirty(component);
                connected = true;
                
                signalname= kin.GroupName + "_Schliessen";   // define Signal name based on custom rule
                signal = GetOrCreateSignal<PLCOutputBool>(signalname);   // create the signal if not already there
                ((Gripper)component).CloseGripper = signal; // connect the signal to the behavior model
                EditorUtility.SetDirty(component);
                connected = true;
            }
            if (component.GetType() == typeof(Drive_FollowPosition))
            {
                signalname = kin.GroupName + "_Position";
                var drivesignal = GetOrCreateSignal<PLCOutputFloat>(signalname);
                ((Drive_FollowPosition)component).Position = drivesignal; // connect the signal to the behavior model
                EditorUtility.SetDirty(component);
                connected = true;
            }
            return connected;
        }
    }
}

After import and matching you can check the matching it by using “Check for unconnected Signals”. According to that it is possible to delete automatically created or unconnected signals.

© 2022 in2Sight GmbH - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

https://realvirtual.io