Controlling a Front Panel Control Remotely

Complete the following steps to control a front panel control from another VI.

Note  You must install the DataSocket Server to control front panel controls remotely.
  1. Open the DataSocket Server by selecting Start»Programs»National Instruments»DataSocket»DataSocket Server.
  2. Right-click a front panel object and select Data Operations»DataSocket Connection from the shortcut menu to display the DataSocket Connection dialog box.
  3. In the Connect To field in the DataSocket Connection dialog box, enter a valid URL.
  4. In the Connection Type section of the DataSocket Connection dialog box, click the Publish and Subscribe button.
  5. Click the Attach button.
  6. On the front panel of a second VI (either on your local computer or on a remote computer), right-click a front panel object and select Data Operations»DataSocket Connection from the shortcut menu to display the DataSocket Connection dialog box.
  7. Click the Browse button and select the URL you entered in Step 3 from the menu.
  8. In the Connection Type section of the DataSocket Connection dialog box, click the Publish and Subscribe button.
  9. Run or continually run both VIs. If the connection to the DataSocket Server is successful, a small green indicator appears next to the front panel object on your VI. If the connection is not successful, a small red indicator appears. If LabVIEW cannot connect to the server, a small gray indicator appears. You can hide this indicator by right-clicking the front panel object and selecting Visible Items»DataSocket LED from the shortcut menu. You also can use the LEDVisible property to hide the indicator programmatically.

The front panel control in the first VI retrieves the value the second VI passed through the DataSocket connection. When a user changes the control value in the second VI, the DataSocket connection publishes the new value to the front panel control in the first VI. You cannot manipulate the front panel control in the first VI while both VIs are running.