You can use the Instrument Control Toolbox™ to communicate with NI-FGEN function generators. You can control and configure the function generator, and perform tasks such as generating sine waves.
This feature is available through the Hardware Support Packages. Using this installation process, you download and install the following file(s) on your host computer:
MATLAB Instrument Driver for NI-FGEN support
National Instruments® driver file: NI-FGEN driver version 2.9.1
Supported Compiler Requirement
To use the NI-FGEN support package, you must have a supported compiler on your system and run the mex setup. Set up your compiler by running mex -setup, as described in the documentation for mex in the MATLAB® Function Reference. You can also use mex to choose and configure a different C compiler.
For the current list of supported compilers, see Supported and Compatible Compilers on the MathWorks® Web site.
Installing the Support Package
In MATLAB type:
to open the Support Package Installer.
You can also open the installer from MATLAB by selecting Home > Resources > Add-Ons > Get Hardware Support Packages.
On the Select an action screen, select Install from Internet and then click Next. This option is selected by default. Support Package Installer downloads and installs the support package and third-party software from the Internet.
On the Select support package to install screen, select NI-FGEN from the list.
Accept or change the Installation folder and click Next.
If you are prompted to log in to your MathWorks account, click Log In to continue.
On the MATHWORKS AUXILIARY SOFTWARE LICENSE AGREEMENT screen, select the I accept check box and click Next.
The Third-party software licenses screen displays your choice of Instrument Control Toolbox Support Package for National Instruments NI-FGEN function generators.
Review the information, including the license agreements, and click Next.
On the Confirm installation screen, Support Package Installer confirms that you are installing the support package, and lists the installation location. Confirm your selection and click Install.
After the Instrument Control Toolbox files are installed, the National Instruments installation starts. Click Next to begin the installation.
On the Features screen, select your components and click Next. Continue with the National Instruments installation wizard. A downloads status dialog box appears during the installation. This can take a long time to complete.
You can continue working in MATLAB as downloads proceed.
After the National Instruments NI-FGEN 2.9.1 installation is complete, you will see an Installation Complete screen. You are then prompted to restart your computer.
After the installation is complete you will see a confirmation message on the Support Package Installer Install/update complete screen. Click Finish to close the Support Package Installer.
You will be prompted to restart your computer. You must restart for the installation to be complete. Click OK and then restart your computer.