To keep memory usage manageable, it is desirable to declare a chunk of memory for reuse. LabVIEW does memory management automatically. However, for very large array, extra caution is required to ensure that memory usage is efficient. In this recipe, we will develop a timer array action engine.
To create an action engine, we start by placing a while loop on a block diagram and place a case structure within the loop.
In the action engine, the Initialize case will create a user-specified number of data value references with the new data value reference node in a for loop. The created references are saved in a shift register as an array, as shown in the following screenshot:
The second case of the action engine implements the Start Timer and Unpause Timer commands. It puts the current timestamp to the reference of the specified index. The In Place Element Structure is used. It operates the values of memory locations in place without allocating extra memory, as shown...