Main Content

vrnode/sync

(To be removed) Enable or disable synchronization of fields with client

vrnode/sync will be removed in a future release. For more information, see Version History.

Syntax

sync(vrnode_object, 'field_name', 'action')

Arguments

vrnode_object

Name of a vrnode object representing the node.

field_name

Name of the field to be synchronized.

action

The action parameter determines what should be done:

  • 'on' enables synchronization of this field.

  • 'off' disables synchronization of this field.

Description

The sync method controls whether the value of a field is synchronized.

If you set the field to be synchronized to 'on', the field value is updated every time it is changed on the client computer. If you set the field to 'off', the host computer ignores the changes on the client computer.

Synchronized fields add more traffic to the network line because the value of the field must be resent by the client any time it is changed. Because of this, mark for synchronization only the fields you need to scan for changes made on clients (typically sensors). By default, fields are not synchronized and their values reflect only settings from MATLAB® or the Simulink® software.

Note

Synchronization is meaningful only for readable fields. Readable fields are of data class eventOut and exposedField. You cannot enable synchronization for eventIn or nonexposed fields.

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrnode/sync will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB and Simulink with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.

See Also

|