Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

Replacing message based session.Query in new NI Visa in C# vs old VISANS

$
0
0

I am looking to convert this statement to the new NI Visa for .NET, but have yet to find any documentation. Here is the code.

 

After creating a Session to communicate with our instrument, we can start transferring data to the instrument and reading its response. The three most common operations for communicating with a message-based instrument are query, write, and read. The query operation writes a command to an instrument and reads back the response. On the other hand, the write command only sends a command to the instrument, and the read command reads information from the instrument. The following piece of code demonstrates how to use the query operation:


[C#]
string stringtext = " ";
try
{
string responseString = mbSession.Query(stringtext);
}
catch(Exception exp)
{
MessageBox.Show(exp.Message);
}

 

Thanks!


Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>