Integer LabVIEW Code (Digital Filter Design Toolkit)

Digital Filter Design Toolkit

Integer LabVIEW Code (Digital Filter Design Toolkit)

In the Designing a Fixed-Point Filter tutorial, you learned the basics of designing a fixed-point filter using the LabVIEW Digital Filter Design Toolkit. After you design a fixed-point filter, you can generate integer LabVIEW code and implement the fixed-point filter on any platform that LabVIEW supports.

Note  If you did not complete the Designing a Fixed-Point Filter tutorial, refer to labview\examples\Digital Filter Design\Getting Started\Tutorials\Designing a Fixed-Point Filter\Designing a Fixed-Point Filter Part 6.vi for a completed version of the digital filter from that tutorial.

Generating Integer LabVIEW Code

Complete the following steps to generate integer LabVIEW code from a fixed-point filter by using the DFD FXP Code Generator VI.

  1. Place the DFD FXP Code Generator VI on the block diagram.

    Place  Find

  2. Wire the filter out and error out outputs of the DFD FXP Modeling VI to the filter in and error in inputs of the DFD FXP Code Generator VI.
  3. Click the polymorphic VI selector of the DFD FXP Code Generator VI and select Integer LabVIEW Code from the pull-down menu.
  4. Right-click the destination folder input of this VI and select Create»Control from the shortcut menu.

    A front panel control appears to the left of this VI. This control represents the destination folder in which this VI generates the code.
  5. Right-click the filter name input of this VI and select Create»Control from the shortcut menu.

    A front panel control appears to the left of this VI. This control represents the filter name this VI uses for the code generation.
  6. Right-click the lvproj path output of this VI and select Create»Indicator from the shortcut menu.

    A front panel indicator appears to the right of this VI. This indicator represents the path to the generated project file.

    The block diagram now resembles the following figure.

  7. Display the front panel window and click the Browse button on the destination folder control to select the folder in which this VI generates the code.
  8. Click the filter name control and enter the name for the generated code.
  9. Click the Run button to run the VI.
  10. Select File»Save As and save this VI as Generating Integer LabVIEW Code.vi in an easily accessible location
Note  Refer to labview\examples\Digital Filter Design\Getting Started\Tutorials\Generating Code\Generating Integer LabVIEW Code.vi for a completed version of the digital filter from this part of the tutorial.

Implementing Integer LabVIEW Code

After you generate integer LabVIEW code, you can implement the code on any platform or target on which you can run LabVIEW VIs.

The Digital Filter Design Toolkit uses LabVIEW projects to manage the resulting integer LabVIEW code. The following figure displays an example project file that contains integer LabVIEW code.