Setting the Size of Array Controls in LabVIEW FPGA

Updated Jan 29, 2018

Reported In

Software

  • LabVIEW FPGA Module

Other

http://zone.ni.com/reference/en-XX/help/371599N-01/lvfpgaconcepts/fpgavariablesizedarraysinvis/

Issue Details

I have an array control or indicator on the front panel of my FPGA VI, and LabVIEW FPGA requires array controls to be a fixed predetermined size, or resolvable to a fixed size by the compiler. How can I set the size so that I can compile my VI?

Solution

In your FPGA VI, create an array Control, Constant, or Indicator.

Right-click on the Index Display or the border of the array, and choose Set Size... The following dialog box will appear:

There are two options:

  1. Variable: This is the default behavior. The user can add and remove elements at will.
  2. Fixed: The array will always be the same length, preventing the user from adding or deleting array elements at any time.

For array indicators, the same options are available, and a checkbox above selects between using the default Adapt to Source Wire behavior or one of the behaviors listed above.

Additional Information

Arrays are always defined in terms of specified dimensions in FPGA, because it requires pre-allocated arrays and does not support dynamic memory allocation. FPGA VIs only support one-dimensional arrays that resolved to a fixed-size at compile time. To make this more transparent, you can restrict the size of arrays for FPGA targets.

 

WAS THIS ARTICLE HELPFUL?

Not Helpful