Teilen Sie Ihre Erfahrunge und Wünsche mit uns und anderen Usern!

+1
Fixed

Error importing the Package

rexgatling1988 3 years ago in realvirtual.io Starter and Professional updated by R S 3 years ago 5

I get this error when I import the package to Unity:

Assets/game4automation/private/RuntimeUI/SceneMouseNavigation.cs(801,38): error CS0103: The name 'SpaceNavigator' does not exist in the current context

Answer
Support 3 years ago

Is fixed in latest release.

+1
Fixed

No Mutex PLCSim Advanced Interface proble

Pablo 4 years ago in realvirtual.io Starter and Professional updated by Support 3 years ago 18

Hello,

we are using the PLCSim Advanced Interface.

We can Import the PLCSignals without any Troubles:

Image 519

The first time that we start the simulation in Unity everything is working fine (COM OK).

But after we stop the unity editor and try to start again, we get “No Mutex”... so no communication is established between the plc and Unity.

We found out that creating a new PLC Instance and re-importing the signals “fix the error”... but just for the first run. Then we have to repeat the process of creating a new PLC again and again...

Could be some background process blocking the communication? Thank you in advance.

Answer
Support 3 years ago

Current working coupler.exe is available in the download area:

https://realvirtual.io/download/PLCSimAdvancedCoupler.exe

0
Answered

Modbus client support

Andreas 2 weeks ago in realvirtual.io Starter and Professional updated by Support 4 days ago 1

Hi RV.IO-Team,

I’m currently testing Modbus communication between a Siemens S7-1514 (MB_SERVER) and realvirtual.io.

The TCP connection works and the client connects successfully, but the ModbusInterface script never populates the internal register arrays (e.g. outputregisters). Because of that the signals never receive values.

In the documentation I saw the note:

“Currently realvirtual.io can only be used as a Modbus master. Client support will be added in one of the next releases.”

Does this mean the polling/reading functionality is not fully implemented yet, or is there a recommended setup for reading holding registers from a PLC?

I would like to use Modbus for simulating valves and sensors in a digital twin, so knowing the intended workflow would help a lot.

Best regards
Andreas

0
Fixed

6.3 version problem with S7 TCPIP

Adam Peter 2 weeks ago in realvirtual.io Starter and Professional updated by Support 2 days ago 6

Hi all! 

I am using the latest reavirtual. However, I am having problems with S7 TCPIP because the component displays "waiting to connect" and other error messages, and communication with S7-1200/1500 does not work, although it works with version 6.0.3. What could be the problem and what could be the solution? Thank you in advance for your hel

Answer
Support 2 days ago

Ah sorry, please check with this: S7Interface.cs

0
Fixed

realvirtualController CPU 500ms+

陈喜成 3 months ago in realvirtual.io Starter and Professional updated by Support 3 months ago 2

1.realvirtualController CPU 500ms+

private static void PreFixedUpdateCallback()
{
_fixedUpdateFrameCount++;

for (int i = 0; i < _preFixedUpdateHandlers.Count; i++)
{
if (_preFixedUpdateHandlers[i] != null)
{
try
{
_preFixedUpdateHandlers[i].PreFixedUpdate();
}
catch (System.Exception e)
{

//The performance analyzer determined that the `Object.FindFirstObjectByType()` call was taking more than 150ms++, so it was moved inside the catch block to avoid errors on every refresh.
var controllerInstance = Global.realvirtualcontroller ?? Object.FindFirstObjectByType();
Logger.Error($"Error in PreFixedUpdate: {e.Message}", controllerInstance);
}
}
}
}

//! Callback executed after FixedUpdate
private static void PostFixedUpdateCallback()
{
for (int i = 0; i < _postFixedUpdateHandlers.Count; i++)
{
if (_postFixedUpdateHandlers[i] != null)
{
try
{
_postFixedUpdateHandlers[i].PostFixedUpdate();
}
catch (System.Exception e)
{
//The performance analyzer determined that the `Object.FindFirstObjectByType()` call was taking more than 150ms++, so it was moved inside the catch block to avoid errors on every refresh.
var controllerInstance = Global.realvirtualcontroller ?? Object.FindFirstObjectByType();
Logger.Error($"Error in PostFixedUpdate: {e.Message}", controllerInstance);
}
}
}
}


2.The bug in the MQTT code has been fixed in the reply.

MQTT IN/OUTPUT ERROR [Repair] / realvirtual.io Forum / realvirtual.io (formerly game4automation)

0
Planned

HelloWindow occasionally blocks CI builds when running Unity in batchmode

Ramon Janousch 3 months ago in realvirtual.io Starter and Professional updated by Support 3 months ago 3

Hi,

when we trigger our build pipeline and run tests or build the project via script, from time to time the HelloWindow pops up and blocks the pipeline run.

Context

  • We are using realvirtual in a Unity project that we build and test via Azure DevOps.

  • Unity is started from the pipeline in batchmode (no user interaction, headless build).

  • Typical commands are like: -batchmode -projectPath <path> -runTests or -batchmode -projectPath <path> -buildWindows64Player <path> ...

Most of the time this works fine, but occasionally the HelloWindow appears during startup and seems to wait for user interaction. Since this happens on a build server without UI interaction, the process just hangs and the entire CI job times out.

Expected behavior

  • When Unity is running in batchmode (CI environment), realvirtual should not open the HelloWindow at all, or

  • There should be an option (e.g. a setting, scripting define symbol, or asset menu option) to completely disable the HelloWindow for automated builds/tests.

Actual behavior

  • Infrequently, the HelloWindow still appears during CI runs, even though Unity is started in batchmode.

  • This blocks the build/test pipeline until it times out.

Questions / requests

  • Is there a recommended way to disable the HelloWindow for CI/batchmode runs?

  • Could realvirtual internally check for Application.isBatchMode and skip showing the HelloWindow in that case?

  • If there is already a setting or flag to turn this off, could you point me to the correct configuration?

Thanks a lot in advance!

Image 1447

Answer
Support 3 months ago

RE: HelloWindow occasionally blocks CI builds when running Unity in batchmode


Hi Ramon,

Thanks for the detailed report. You're right - we check for UNITY_CLOUD_BUILD but we're missing a check for Application.isBatchMode which is why it can still appear when running Unity with -batchmode for CI pipelines.

Workarounds until the official fix:

Option 1: Add DEV define to your build command (Recommended)

Unity.exe -batchmode -projectPath C:\Project -runTests ... -defineSymbols DEV

Option 2: Set the define via script before tests run Create an editor script that runs before your tests:

[InitializeOnLoad]
public static class CISetup
{
    static CISetup()
    {
        if (Application.isBatchMode)
        {
            // Prevents HelloWindow from showing
            PlayerSettings.SetScriptingDefineSymbols(
                NamedBuildTarget.Standalone, "DEV");
        }
    }
}

Option 3: Patch locally In Assets/realvirtual/private/Editor/OnPostProcessImportAsset.cs line 142, change:

if (Game4AutomationImport && !Application.isPlaying)

to:

if (Game4AutomationImport && !Application.isPlaying && !Application.isBatchMode)

Fix: We'll include this batch mode check in the next release.

Thanks for reporting!

0
Answered

How to solve the complie error when realvirtual io package install in HDRP project

Seokhyun Lee 3 months ago in realvirtual.io Starter and Professional updated by Support 3 months ago 1

Dear,

Thanks for your support.


I have another problem when realvirtual io package install in HDRP project.


1) Unity 6 LTS Version (6000.0.62f1)

2) Create HDRP Project

3) Install Reavirtual IO Digital Twin Professional (6.0.8)

→ Compile error occurs (see image below)


4) Switch to HDRP Menu (in realvirtual menu)
※ Render Pipelines > Switch to HD render Pipeline (HDR) > Path Tracing & Ray Tracing (Both Try)

→ Compile error still occurs (see image below)


I would like to request guidance on how to resolve this issue so I can use realvirtual io in HDRP project.

Best regards,

Seokhyun Lee

Image 1444

Image 1445

Image 1446

Answer
Support 3 months ago

Hi,

usually you should not change render pipline. Some special materials for highlighting, the bottom, the fences... wont work in HDRP. If you are working with a totally new scene and taking care about the materials and rederers yourself it is ok. Also switching is a very complicated process.

I am sending you in a private message a beta of next release where the compile errors are gone away. If you are having issues when switching one project from URP to HDRP sometimes closing Unity and deleting the Library folder and restarting helps.

The private message will follow. 

Best regards
Thomas

0
Fixed

MQTT IN/OUTPUT ERROR [Repair]

陈喜成 4 months ago in realvirtual.io Starter and Professional updated by Support 2 months ago 2

0
Fixed

S7 connection - get_gameObject can only be called from the main thread.

efr 4 months ago in realvirtual.io Starter and Professional updated by Support 3 months ago 3

Hi, 

When trying to make an S7 connection (new empty scene) in the realvirtual.IO starter kit I have following issue.
The connection is OK and running in Scene mode, but once in Game mode, I see I have following error:

Connection failed: get_gameObject can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
 

In the connection view of TIA portal I see a lot of connection active.

Does anyone has any advise on how to solve this?

Unity version 

Image 1433

siemens CPU 1515-2-PN

Image 1429

Image 1430

Image 1431

Connection failed: get_gameObject can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.

Image 1432

0
Under review

How to build a gantry

Ramon Janousch 4 months ago in realvirtual.io Starter and Professional updated by Support 4 months ago 1

Hi everyone,

I’m trying to figure out the best way to model a gantry in realvirtual and I’d like to check if my approach makes sense.

Mechanical setup

  • Think of a classic gantry crane

    Image 1420

  • In my machine I have

    • Two separate X-axes at the bottom (front and back rails – green arrows).
      They can move independently in X, but in normal operation they should behave like a gantry pair.

    • On top of them sits a Y-axis stage (blue arrows) that moves sideways.

    • Image 1421
  • The Y-stage is physically connected to the X-axes via joints in Unity.

  • The CAD / Unity hierarchy is basically flat – the Y-stage is not a child of one of the X carriages, so I cannot rely on parenting to move it together with X.

Control side

  • I have separate drives / axis values for:

    • X-front

    • X-back

    • Y-stage

  • The requirement is:

    • When X moves, the whole Y-stage must move with it.

    • Y should still have its own motion relative to the gantry.

Questions

  1. What is the recommended realvirtual setup for this kind of gantry?

  2. How should I combine this with joints?

    • Should I keep the joints at all, or would you recommend a purely kinematic Axis/Drive setup for this use case?

Any hints, best practices, or “don’t do this” stories are very welcome.
Thanks in advance!

Answer
Support 4 months ago

Hi,

Thanks for reaching out!

For building hierarchical structures in your simulation, we'd recommend using parenting or Groups combined with Kinematic — you can find detailed guidance here: https://doc.realvirtual.io/components-and-scripts/motion/kinematic

One of the nice things about this approach is that it gives you flexibility regardless of how your Unity hierarchy is currently organized. Moving drives without physical joints also tends to provide better stability, which is especially helpful when you're receiving cyclic position updates from controllers.

As a tip that might simplify things: from a kinematic perspective, X-Front and X-Back effectively function as a single drive, so you may not need to model them separately — that could save you some setup work!

Let me know if you have any questions or if I can help clarify anything further.

Best regards
Thomas