Migrating to Measurement Studio Network Variable from DataSocket Primary Software: Measurement Studio>>Enterprise Edition (Full Development System)Primary Software Version: 8.1 Primary Software Fixed Version: 8.1 Secondary Software: N/A
Problem: How can I migrate to Measurement Studio Network Variable from DataSocket? Solution: You can use the NetworkVariable class library or the DataSocket class library to transfer live measurement data between applications and servers over the network. You can use NetworkVariable or DataSocket to exchange different types of data between Measurement Studio, LabVIEW, LabWindows/CVI, and other applications that support NI-Publish Subscribe Protocol (psp:). NetworkVariable is the preferred method for transferring data between these applications, and, in these cases, NetworkVariable supersedes DataSocket. You can also use NetworkVariable and DataSocket to exchange different types of data between OLE for Process Control (opc:) servers. Exchanging data between Measurement Studio applications and OPC servers with NetworkVariable requires LabVIEW DSC. Use DataSocket to communicate directly with an OPC server.
The benefits to using The Note For more detailed information about network variable, refer to Key Measurement Studio Network Variable .NET Library Features in the NI Measurement Studio Help. Network Variable ReadersNetworkVariableReader<TValue>This class reads network variable on demand.NetworkVariableReader<TValue> has no direct equivalent in DataSocket. You can duplicate NetworkVariableReader<TValue> functionality in DataSocket by creating a manual reader, such as Read, calling Update, and then blocking for IsDataUpdated to become true within a certain time limit.
NetworkVariableBufferedSubscriber<TValue>This class reads network variable data from a client side buffer.
DataSocket Equivalent:[VB.NET] Dim socket As DataSocket = New DataSocket()
[C#] DataSocket socket = new DataSocket();
[VB.NET] Dim socket As DataSocket = New DataSocket()
[C#] DataSocket socket = new DataSocket();
NetworkVariableSubscriber<TValue>This class subscribes to network variable data and receives update notifications.
DataSocket Equivalent:[VB.NET] Dim socket As DataSocket = New DataSocket()
[C#] DataSocket socket = new DataSocket();
[VB.NET] Dim socket As DataSocket = New DataSocket()
[C#] DataSocket socket = new DataSocket(); Network Variable WritersNetworkVariableWriter<TValue>This class writes network variable data on demand.
DataSocket Equivalent:[VB.NET]Dim socket As DataSocket = New DataSocket()socket.AccessMode = AccessMode.Write socket.SyncWrite(2.34, 1000) [C#] DataSocket socket = new DataSocket();
NetworkVariableBufferedWriter<TValue>This class writes network variable data to a client side buffer.DataSocket does not include a direct equivalent to NetworkVariableBufferedWriter<TValue> because DataSocket does not have a writer buffer. However, you can use NetworkVariableBufferedWriter<TValue> for all DataSocket writes, except when you use SyncWrite.
Related Links: Attachments:
Report Date: 02/16/2007 Last Updated: 01/25/2008 Document ID: 46FFG05E |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
