Open topic with navigation
Sometimes, it is necessary to interface with external applications or devices for information or extra computational purposes. In order to allow communication with external applications or devices, you must add User Datagram Protocol (UDP) extensions to your simulation. See Network Communication Add-on for more information on how these extensions are used together.
The following UDP extensions are available:
In order to enable UDP network communication, you must first add the UDP Module to your Setup file. The UDP Module manages all UDP send and receive extensions (see below).
To add a UDP Module:
In order to receive communications from external applications or devices using UDP, you must add a UDP Receive extension to your simulation.
To add a UDP Receive extension:
In the UDP Receive extension's Properties panel, you will see the following fields.
In order to send communications to external applications or devices using UDP, you must add a UDP Send extension to your simulation.
To add a UDP Send extension:
In the UDP Send extension's Properties panel, you will see the following fields.
Network Communication Add-on is a device that allows communication with external applications or devices over User Datagram Protocol (UDP).
The Network Communication Add-on devices can be created in both the content and the application setup as a device. The protocol used is the same as the Real-Time UDP for MATLAB and Simulink.
This table shows the direct conversion between the Vortex type and the external type.
|Vortex Type||External Type||Bytes|
In order to add Network Communication as a device, the add-on needs to be configured in the application setup.
First, open the Vortex Studio Editor and create a new setup or open an existing one.
The second step is to add the UDP Module by searching in the Toolbox and double-clicking on UDP Module.
The UDP Module manages all the UDP send and receive extensions. See Network Extensions for more information.
Similarly to the module, the send and receive extensions can be added by searching UDP Send or UDP Receive in the Toolbox.
Once an extension is added, it is possible to modify its properties in the Properties panel.
In the Properties panel, you will find the following information:
The local address and port identifies the host IP address and port, while the remote address and port describes the IP address and port of the external application or device communicating with Vortex Studio Editor.
The Device ID lists the information concerning the device, which is used in order to identify the device. This will be filled automatically by the module.
The list of data to be sent or received can be found in the Outputs section when dealing with the UDP Receive extension, and Inputs panel when dealing with the UDP Send extension.
As the name suggests, the UDP Receive extension will receive data, while the UDP Send will send data according to this data list.
To add data, right-click on the extension and select Edit. This window is used to add and remove fields of data, e.g., inputs and outputs.
In the example shown above, the UDP Receive extension will receive two double values (Move and Rotate) and one int32 value (Run).
Once the communication device has been created in the application setup, it can be mapped in the Vortex Studio Player via The Control Presets tab.
Mapping allows you to connect data fields to a Control Interface, which in turn is connected to a mechanism.
In the previous image, the UDP Receive device is associated with "ControlInterfaceInputs".
Once the data fields are properly associated, the data will automatically be transmitted to the Control Interface.
It is also possible to set the communication device as a Control Interface's default device in Vortex Studio Editor. This means that the Control Interface will automatically associate this device when the content is loaded in Vortex Studio Player.
There must be a UDP Module located in the application setup file (editor.vxc) in order to make the extensions functional in the Vortex Studio Editor. The extensions are not functional when the name is grayed out.
In order to add the Network Communication device add-on to the content (mechanisms and scenese), it is first of all necessary to open Vortex Studio Editor and create/open a scene or mechanism.
Once the content file open, you can add the extension by searching in the Toolbox. The properties can then be modified accordingly.
For example, a Connection Container can be added in the same object as the UDP extension. In the same example, a Controllable Human is also added to the content in order to demonstrate data field connections.
Data fields from the Human Control are added to Connections.
Once the data fields are added to the Connections Container, the fields can be linked together, as seen in the next image.
The data sent to the external application or device will be transferred to the Controllable Human's Body Move Speed and Bode Rotate Speed.