Skip to main content

Open External Connection

SimLab Composer 14 introduces WebSocket support, enabling seamless integration with external systems allowing it to work with external hardware, co-simulation engines, and websites, unlocking numerous possibilities.

The node Open External Connection opens a WebSocket connection.

The WebSocket nodes (Open External Connection, Send Message, and Receive Message) are exclusively available in the Ultimate Edition.

Screenshot 2025-02-02 162338.jpg

Input Ports:

  • Execute
  • URL: WebSocket URL that includes the server IP address, port, channel (optional). Example: ws://server1.simlab-soft.com:8765/robots_1
  • Auto Handle Lua: Incoming messages containing Lua scripts will automatically execute those scripts If enabled (True).

Output Ports:

  • Execute
  • URL
  • Auto Handle Lua

 

OpenExternalConnection.png Open External Connection

Screenshot 2025-02-02 162338.jpg

The Open External Connection node enables the opening of a WebSocket connection to an external system. When the Auto Handle Lua is set to true, incoming messages containing Lua scripts will be automatically executed. This allows for real-time interaction between SimLab Composer and external systems, such as co-simulation engines or hardware, with the ability to dynamically execute Lua code as part of the interaction.

 


 

MessageRecieved.png On Message Received Node

image.png

The On Message Received node triggers an event when an unhandled message is received from the external connection. This node allows you to access the incoming message and take appropriate action based on its content. It is useful for responding to external data or commands and processing messages within the VR experience.

 


 

MessageSent.png Send Message Node

image.png

The Send Message node allows you to communicate with the WebSocket server by sending messages. It is essential to ensure that the message format follows the protocol that the server and other clients can process. This node enables real-time interaction with external systems, making it possible to transmit data or commands to connected servers or clients.