How to use VIs from NI's library in C#

2.8k Views Asked by At

I'm converting my labVIEW project into C#. In my labview project i've used NI's VI . For example niModInstGet Installed Device Attribute(String).vi. For this in C# i'm using Measurement Studio and i imported the driver from IVI Foundation - > IVI - > Driver - > niModInst - > niModInst.fp. So in C# i can access this VI as a Method

Now the problem is, in LabVIEW project i'm using a VI from C:\Program Files\National Instruments\LabVIEW 2009\instr.lib\niRFSG \ niRFSGExamplesSupport.llb\nfsg_FindWaveformPAramsForFrequincy.vi

I can not find any driver file for this. Where do i find this. Or need i create my own C# function to achive this.

Please help me to dio this..

Thanks in advance

2

There are 2 best solutions below

0
On

Another approach would be to use a Build Specification to create a Shared Library (.dll). That will allow you to call any VI from C#.

Basically, in a LabVIEW Project, you would create a Build Specification for a Shared Library, then add the vi(s) to the Source Files list. When you build the .dll, it will contain entry points for each vi. Then you can call the built .dll from C#.

More information about Build Specifications in LV 2009: http://zone.ni.com/reference/en-XX/help/371361F-01/lvhowto/building_a_dll/

0
On

I am not sure if a DLL exists for the RF driver. The best way to find out is to double-click the VI and keep navigating into the subVIs to see if there is a call to the DLL using the Call Library Function Node.