From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-07-2018 07:06 AM
Hello,
I am new to LabVIEW. I am generating Sine Wave with 12 samples/cycle. When I run VI I got 12 Samples [1 to 12]. Using for loop I want next sample window [2 to 13] and further, I want the sample window as [3 to 14] and as soon.
06-07-2018 07:17 AM
you can use Phase input
06-11-2018 10:33 AM
it is always a Good Idea to understand What it is you want to do, as this frequently informs How you do it. Let me summarize what I think you want to do:
LabVIEW provides a series of Hammers, big blunt Virtual Instruments to Encourage Doing rather than Thinking, called Express VIs, and also provides an equally Evil output often associated with these Express VIs called a Dynamic Data Wire. Your code employs both, so is unlikely to easily accomplish the task I outlined above (which, I should note, might not be what you really want to do, but it is what I understood that you wanted to do).
One thing that distinguishes LabVIEW from other programming environments is that it embodies the concept of Time as a primitive, so you can make your code run at a specific speed, allowing you to create a Virtual Instrument, something (in software) that behaves as hardware.
So let's return to the sinusoid. How do you define a sinusoid? Y(t) = a + b sin (2 pi f t + Phase) is one possibility. [Note -- some would say "- Phase"]. In the Digital world, where we deal in Samples (i), we might write Y(i) = a + b sin (2 pi i / N + Phase) and know we need to output Y(i) at an interval of T/N (where T is 1/f, the period of the Sinusoid, and N, 12 in your example, is the number of points in the sinusoid).
So can you write a loop that has the following properties:
This almost solves your problem. One thing that will be missing is limiting the display to the last 12 points, but once you get things going, this should be an easy "tweak" to implement (Famous Last Words!).
If you learn to do it "the hard way" (as I'm advocating), you will learn LabVIEW and will have a much better appreciation of what is possible and how to do it.
Bob Schor