Writing Live Data Programmatically

Write live data programmatically to send live data updates from a VI that is not in a project, to control and view properties of the data connection, to send live data updates to other VIs without displaying the data on the front panel of the VI, or to avoid data loss that might occur if you write data from the front panel.

(Real-Time, Windows) National Instruments recommends that you use a Shared Variable node to write live data on a block diagram.

Complete the following steps to write live data programmatically.

  1. Add the DataSocket Write function to the block diagram.

    Add Find

  2. Specify a psp URL or wire a shared variable control to the connection in input of the DataSocket Write function.
  3. Wire the data you want to write to the data input of the DataSocket Write function. If another application reads the live data, convert the data to variant data.
  4. Run the VI or continually run the VI to write live data updates to the data connection.