04-01-2019 01:46 PM
I am trying to build a C# application that uses a waveform generator (PXI-5422) and a digitizer (PXI-5124). I am pretty new with C#, so I looked into this example as a guideline: http://www.ni.com/example/30253/en/ I tried to build it in Visual Studio 2017, but it failed since it couldn't find niFgen.cs file required for the project. Similar things happened (niFgen.vb was missing) with other examples in Visual Basic I downloaded from this support page. I tried searching for those files but they didn't show up.
I have NI-FGEN 18 on my machine. Based on this page, .NET support should already be installed. However, I can neither find the necessary drivers nor the C# and/or Visual Basic examples. I tried modifying NI-FGEN but I couldn't find a .NET-related item I missed to install (Please see the attached images for NI-FGEN in Package Manager).
Where should I look for the C# and/or Visual Basic drivers and examples that are supposed to come with NI-FGEN 18? Or how can I get them if they are not already installed for some weird reason and package manager is no help? (I would prefer a solution that does not require me to re-install NI-FGEN since I don't have the necessary permissions.)
Solved! Go to Solution.
04-02-2019 10:59 AM
Hello,
Have you tried looking into the following folder:
C:\Users\Public\Documents\National Instruments
If not, please navigate to that folder and look for the FGEN folder. You should see some examples for C# or Visual Basic there.
04-02-2019 11:47 AM
Hi shrupa123,
I tried checking that folder but there are only C examples there. I cannot see any C# or VB examples.
04-02-2019 12:08 PM
I downloaded Measurement Studio 2015, Visual Studio 2013 and followed this procedure to generate niFgen.cs:
http://www.ni.com/tutorial/4562/en/
The example code in the original post now builds successfully after I moved niFgen.cs in the project folder and commented out line 8 in Form1.cs:
using NationalInstruments.ModularInstruments.Interop