NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Geoff V
Posts: 13
0 Kudos
Accepted Solution

IVI drivers

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! 

Active Participant
Charles.Tac
Posts: 434

Re: IVI drivers

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

Active Participant
Makoto
Posts: 524
0 Kudos

Re: IVI drivers

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.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page