Overview
This Polymorphic VI accepts either a single Boolean input or an array of Boolean inputs and returns a Digital Waveform that can be wired to a Digital Waveform Graph. As a functional global variable, this VI can receive new data each loop iteration such that its output causes a Digital Waveform Graph to act as a chart.
Description
This example uses a functional global variable architecture to store samples in a buffer as they are queued using the Enqueue command. Using this buffer, some simple array manipulation is implemented to return a digital waveform with a specified window size (maximum number of samples). Sample rate may be optionally specified as well.
Steps to Implement or Execute Code
For an example of using this VI, please open Digital Waveform Chart Implementation.vi.
**Please note: You cannot interchange loading single elements and arrays into a polymorphic instance. You must choose one or the other (array or element) for each instance of Digital Waveform Chart Buffer (Poly).vi and stay with the same input type throughout run-time.
Requirements
Software
LabVIEW 2012 or later
Hardware
None
VI Snippet
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.