Complete the following steps to control a front panel control from another VI using the opc, ftp, or http protocols on Windows, and the dstp and file protocols on all LabVIEW-supported platforms.
Note You must install the DataSocket Server to control front panel controls remotely using the dstp protocol.
If you are using a dstp connection, launch and configure the DataSocket Server. If you are using an opc, ftp, http, or file connection, skip to step 2.
Open the DataSocket Server by selecting Start»All Programs»National Instruments»DataSocket»DataSocket Server.
Launch the DataSocket Server Manager by selecting Start»All Programs»National Instruments»DataSocket»DataSocket Server Manager.
Click the New Item button to create a predefined data item, and place a checkmark in the Allow Multiple Writers checkbox. Refer to the NI DataSocket Server Help for more information about configuring a connection for multiple writers.
Right-click a front panel object and select Properties from the shortcut menu to display the Properties dialog box for the object.
Click the right arrow button to navigate to the Data Binding page of the Properties dialog box.
Select DataSocket from the Data Binding Selection pull-down menu.
On Windows, enter an opc, ftp, or httpURL, or on all LabVIEW-supported platforms enter a file or dstpURL in the Path text box. You also can select DSTP Server or File System on all LabVIEW-supported platforms from the Browse pull-down menu to navigate to a URL for the predetermined data item you created in step 1c.
On the Data Binding page, select Read/Write from the Access Type pull-down menu.
Click the OK button.
Run the VI.
In a second VI (either on the local computer or on a remote computer), right-click a front panel object and select Properties from the shortcut menu to display the Properties dialog box for the object.
Click the right arrow button to navigate to the Data Binding page of the Properties dialog box.
Select DataSocket from the Data Binding Selection list.
Select DSTP Server or File System from the Browse pull-down menu to navigate to the URL you entered in step 5.
On the Data Binding page, select Read/Write from the Access Type pull-down menu.
Run or continually run both VIs. While the VI is running, if the connection to the DataSocket Server is successful, a small green indicator appears next to the front panel object on the VI. If the connection is not successful, a small red indicator appears. Before LabVIEW attempts to connect to the server, a small transparent indicator appears. A status message also appears if you move the cursor over the indicator. 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 DataSocket:LED Visible property to hide the indicator programmatically.
The front panel control in the first VI retrieves the value the second VI passes through the DataSocket connection. When a user changes the control value in the second VI, the DataSocket connection writes the new value to the front panel control in the first VI. If the front panel control has write-only access, the control writes the initial value when the VI runs or every time the VI resets if the VI runs continuously. If the front panel control has read-only or read/write access, the control reads the initial value when the VI runs.