To download NI software, including the products shown below, visit ni.com/downloads.
Overview
It is sometimes useful to be able to store the last value for a given item in memory. When you have updated values for the memory item, being able to replace the item in memory is helpful.
Description
This example uses a functional global variable to store the last value of a data point in memory. It uses a Name string to uniquely identify items and each item can have additional information that is stored along with it. When inserting an item into memory, the functional global checks to see if the item with the given name is already in memory. If it is, it replaces the existing item with new data values. If not, it adds the item to memory. Functionality to get the contents of memory and clear it are provided in the functional global.
To change the elements of the data to store in memory, modify the Data.ctl typedef.
Requirements
Software:
LabVIEW 2012(or compatible)
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.