Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use an NI4882 Task in VB.NET

I have a simple Visual Basic.NET form with a text box and an NI4882 Task. I have called the Run method for the NI4882 Task - Example: NI4881Task1.Run(). The Run method executes properly. How can I display the output of the Run method to the text box?
0 Kudos
Message 1 of 3
(7,348 Views)
Hi,

I do not have VB.NET here, but if the output is in a displayable format you should be able to do textbox.text = somevalue

Hope this helps out.

Best Regards,
Aaron K.
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(7,348 Views)
I�m not sure exactly what NI-488.2 function you are using, but I�m currently using a wrapper around the GPIB-32 functions. In C#.Net, I have declared IBRD( ) to return a string called buffer. I can then display this string as AaronK discussed � textBox1.Text = buffer. If your return value isn�t a string, you can use the ToString( ) method as shown below:
// C#.net
int number = 1;
textBox1.Text = number.ToString();

Does this help? Good luck!

Regards,
Nate D
Application Engineer
National Instruments
0 Kudos
Message 3 of 3
(7,348 Views)