Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

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

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!

0 Kudos
Message 1 of 1
(883 Views)