Read live data from a data connection to manipulate the data before you add it to the front panel or pass the data to a VI or function on the block diagram. (ETS, VxWorks, Windows) You also can use a Shared Variable node to read live data on a block diagram.
Complete the following steps to read live data programmatically.
- Add the DataSocket Read function to the block diagram.
- Specify a psp URL in the connection in input of the DataSocket Read function or wire a shared variable control to the connection in input.
- Wire a control or constant to the type input of the DataSocket Read function. The data type of the control or constant must match the data type of the data you expect to read. The default data type is the variant data type. If you are unsure of the data type of the data you expect to read or if another application is generating the data, use the variant data type. You can convert variant data to data that LabVIEW can manipulate.
- Run the VI or continually run the VI for live data updates.