Local Variable

Use local variables to read or write to one of the controls or indicators on the front panel of a VI.

When you create a local variable, a local variable icon for the object appears on the block diagram. Writing to a local variable is similar to passing data to any other terminal. However, you can write to a local variable even if it is a control or read from a local variable even if it is an indicator. In effect, with a local variable, you can access a front panel object as both an input and an output.


icon

Inputs/Outputs

  • cpoly.png

  • FPGA Module Details

    The following details apply when you use this object in an FPGA VI.

    Note The following details are subject to change with each version of the LabVIEW FPGA Module.
    Single-Cycle Timed Loop Supported.
    Usage Global variables use less space on the FPGA than local variables, which makes them a better choice for data you do not need to transfer to a host VI.
    Timing A local variable takes at least one clock cycle, whereas a wire takes no clock cycles. For maximum efficiency, avoid using a variable when a wire would suffice.
    Resources A local variable consumes FPGA resources in proportion to the width of the data type, plus additional overhead to facilitate communication with a host VI. Consider limiting front panel objects, including those used as local variables, to optimize the FPGA VI.