Using Variables to Store Data (FPGA Module)

LabVIEW 2018 FPGA Module Help

Edition Date: March 2018
Part Number: 371599P-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2015 FPGA Module Help
LabVIEW 2016 FPGA Module Help
LabVIEW 2017 FPGA Module Help
LabVIEW 2018 FPGA Module Help
LabVIEW 2019 FPGA Module Help

You can use local or global variables to store data in an FPGA application. A variable stores only the latest value you write to it. If you write to a variable N times before reading from that variable, the N-1 values preceding the latest value are lost. If you do not need to use every data value you acquire, variables are a good choice because you do not need to write extra code to discard unnecessary values.

Global variables appear under the FPGA target in the Project Explorer window, and you can access them from any VI running on the FPGA target. Use global variables to store data that you need to access from multiple VIs. Use local variables for data that you only need to access from a single VI, or data that you need to maintain separately for separate instances of a reentrant subVI. You can access a local variable only from a single VI. However, when you include a local variable in a reentrant subVI, each instance of the subVI contains a new instance of the local variable.

Note  If you include multiple reads or writes to the same variable, the variable can become a shared resource. To prevent data corruption and jitter, avoid simultaneous read or write requests to a single variable.

Data Communication Methods Home


Not Helpful