Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

IVI drivers

Solved!
Go to solution

So I've read through the VISA and IVI definition/intros, and it sounds like the IVI drivers listed on NI's site would best fit our application needs. It looks like each driver is supported in one or more of the following development environments: LabVIEW, LabVIEW/CVI, Measurement Studio, or just .NET Framework. I would like to simply interact with these drivers via C# in VS2010, but the drivers I need aren't offered in the .NET Framework.

 

My question(s):

Do I need to purchase a Measurement Studio subscription for VS2010 to use the Measurement Studio drivers? I can't just use these in VS2010 without Measurement Studio?

If I do not want to purchase Measurement Studio but still want to use these devices, would the next best idea would be directly communicating with the VISA layer for these devices?

Thanks! 

0 Kudos
Message 1 of 3
(3,527 Views)
Solution
Accepted by Geoff V

Hi Geoff V,

 

To answer your first question



Do I need to purchase a Measurement Studio subscription for VS2010 to use the Measurement Studio drivers? I can't just use these in VS2010 without Measurement Studio?

 


My answer is NO! You could manipulate the managed code to native technology - PInoke or something like that.

 

Here is a simple example:

[DllImport("IviFgen.dll", EntryPoint = "IviFgen_ConfigureOutputMode", CallingConvention = CallingConvention.StdCall)]
public static extern int ConfigureOutputMode(System.Runtime.InteropServices.HandleRef Instrument_Handle, int Output_Mode);

 

After that, just use the declared function in C#.

 

Thanks,

 

Charles

Message 2 of 3
(3,502 Views)

If you can obtain IVI-COM driver for the instrument, IVI-COM is the easiest way for C# and other .NET languages. Every IVI-COM driver comes with a .NET interop assembly that bridges the native IVI-COM DLL and your .NET app. You can use the driver by just adding a reference to the interop assembly DLL in your .NET app project.

 

If the instrument only supports IVI-C driver, you still have to write PInvoke wrapper by hands.

0 Kudos
Message 3 of 3
(3,470 Views)