To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI demonstrates how to flush the buffer of a buffered network shared variable and reinitialize it to a particular value.
Description
This can be a good method to begin a new testing sequence, or after recovering from some undesired state. The overall goal of the code is to clear any unwanted data out of the buffer. The code simply clears the current buffer of a shared variable in the project. Once all of the data is reinitialized, it can be safely assumed that any data other than the initial state is new and useful data.
This VI can be modified in order to add it as a SubVI. The intention of the VI as is, is demonstrative.
Requirements
LabVIEW 2012 or compatible
Steps to Implement or Execute Code
1. Run the “Write Variable to Shared Variable LV12.vi” first to add values to the Shared Variable.
2. Run the “Flush Buffer LV12.vi” in order to flush the Shared Variable.
3. You may use the highlight execution to see it mode in detail.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.