Chapter 5 Getting Started with Measurement Studio
Measurement Studio User Manual 5-58 ni.com
7. Add the following code to display the vendor and model name of your
instrument in the text boxes.
[VB.NET]
' Declare an instance of VisaTask
Dim myTask As New VisaTask()
Dim results As VisaTaskResults
'Display the data in the text boxes
results = myTask.Run()
textBox1.Text = results.Vendor
textBox2.Text = results.Device
[C#]
//Declare an instance of VisaTask
VisaTask myTask = new VisaTask();
//Display the data in the text boxes
VisaTaskResults results = myTask.Run();
textBox1.Text = results.Vendor;
textBox2.Text = results.Device;
Note Your sample code will be different depending on the instrument actually used.
8. Build and run the application.
9. Click the Button on the form to run the task. The following
screenshot shows the controls on the form, with sample returned data.
Note Although this walkthrough only covers the use of a simple Query and Parse step,
the Instrument I/O Assistant offers additional capabilities, such as independent Write and
Read and Parse steps and advanced parsing capabilities. The following screenshot shows
the IIOA’s ability to scale and parse IEEE long definite block data.