Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate a sequence of waveforms, like first a sine wave, then a square one, and say again a sine wave?

Hi! How do I generate a sequence of different waveforms, with different attributes?
Like, i want to generate a sine wave for some time, then a square pulse of some width and then again a sine wave of some other time. Finally I want to repeat this sequence.
0 Kudos
Message 1 of 2
(2,608 Views)
Take a look at the CNiMath and CNiReal64Vector (CNiVectorT<>) classes in the Measurement Studio for Visual C++ reference. You could have one CNiReal64Vector that will contain the entire sequence, and another temporary CNiReal64Vector that will hold the segments of the sequence. Pass the temp vector to CNiMath::SineWave and then append it to the main vector via the CNiReal64Vector::Append method. Repeat with CNiMath::SquareWave, then CNiMath::SineWave again, and repeat the sequence as desired.

- Elton
Message 2 of 2
(2,608 Views)