Example Code

Zero Reference Waveform

Code and Documents

Attachment

Functional Description

This polymorphic VI will set the initial time of a waveform to 0 for display on a waveform chart. It will also keep track of your timing in a looped acquisition to allow for placing multiple acquisitions on the same plot.

Zero Bias Waveform.jpg

This would be especially useful in a case where your Data Acquisition task is acquiring data every tenth of a second, but you want to chart several seconds of data. By using this subVI and a chart with the chart history length set to the correct number of waveforms and the display format set to Relative Time you can get the desired behavior. This will then allow your display to give you your time from your acquisition start rather than the absolute time of your acquired data.

Zero Bias Waveform 2.jpg

Caveats and Additional Notes

I have tested this with a variety of time-based waveforms, but I suspect that other types of waveforms could case strange behavior when used with this subVI.

Regards,
Dan King

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors