Overview
This VI will generate a digital waveform with a given number of samples per cycle at a specified duty cycle. It shows the output of this waveform as if it were generated in continuous mode. A visual for a data pointer to elements in the waveform is also provided and is most useful for demonstrating glitches in waveform output if duty cycle is changed during generation (e.g. increase duty cycle beyond current pointer position after current cycle has already transitioned to low).
Additionally, LabVIEW does not natively provide a Digital Waveform Chart. I have implemented one in this VI so that samples can be written one at a time (per loop iteration) to a buffer, which is then written to a Digital Waveform Graph. The window size on this "chart" is adjustable. I will post this functionality separately for individual use and searchability.
Update - Digital Waveform chart functionality has been loaded here: https://decibel.ni.com/content/docs/DOC-26532
Description
There are a few sections of code in this VI:
Steps to Implement or Execute Code
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.