Writing Front Panel Data Using the dstp, opc, ftp, http, or file Protocol

Using front panel data binding to control a front panel control remotely through the Shared Variable Engine provides faster and more reliable data transmission than dstp as well as seamless connections to shared variables and NI Publish-Subscribe Protocol (NI-PSP) data items.

Complete the following steps to write front panel data 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 write front panel data using the dstp protocol. Writing data from the front panel might result in data loss. If you want to write all front panel data instead of only the most recent data, use the DataSocket Write function to write live data programmatically.
  1. 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. Launch the DataSocket Server from the National Instruments directory.
  2. Right-click a front panel object and select Properties from the shortcut menu to display the Properties dialog box for the object.
  3. On the Data Binding page of the Properties dialog box, select DataSocket from the Data Binding Selection pull-down menu.
  4. 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.
  5. Select Read/Write from the Access Type pull-down menu.
  6. Click the OK button.
  7. On the block diagram, create a While Loop to configure the VI to run continuously.
  8. Run the VI. LabVIEW writes the data from the front panel object to the server destination you entered in the URL. 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 when the VI is not running. You also can use the DataSocket:LED Visible property to hide the indicator programmatically.