07-05-2012 11:46 AM
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!
Solved! Go to Solution.
07-06-2012 09:29 AM
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
07-09-2012 04:27 AM
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.