Overview
This example VI uses the FGV architecture to append individual lines of text.
Description
Common applications like Command Prompt, Linux Terminal, and Installers provide a Console Output to continuously update the user with the status of the application. This can normally be done in LabVIEW using a String Indicator. However, in larger applications, multi-loop architectures are used for simultaneous functionality. To preserve the data being sent from various loops and avoid over-writing through race conditions, a single Functional Global Variable(FGV) is used.
This example uses the FGV architecture to append individual lines of text into a shift register which can eventually output a live dump of text onto a String Indicator screen. The attached LabVIEW project demonstrates how the FGV "Queue Console (SubVI)" VI can be used in a multi-loop architecture. The architecture all takes the individual lines of text and stores into a Queue System. This allows data to be added from any location and from any VI on the same PC, as long as it has a reference to the same Queue, or have been given the same Queue name.
The main VI in the project is the standard Template for Producer/Consumer with Events found in LabVIEW. Only a third loop has been added and the Queue Console SubVI to demonstrate how to append text and how to display it to the user.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram of "Console Example MainVI Producer Consumer Events.vi"
**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.