07-02-2012 05:06 AM
hi everyone,
I need to know if theres any trick to put delay while generating a sinewave. I need the sinewave generation in finite mode, not continuous. Which means, the sample numbers of generated sinewave is not changing with delay included. Example: generating 1k cycles of sinewaves with f=1kHz and amplitude 1V with 1 sec delay. It should be look roughly like this:
I've tried using insert to array, but doesnt work.
regards,
Yan.
07-02-2012 05:09 AM
while on delay, I need to be able to control the offset (not always zero). Is that possible? I'm generating multiple waves using daqmx board. But the basic here with delay seems difficult for me.
regards,
Yan.
07-02-2012 05:16 AM
I'm trying to get the t0 component from the waveform, and want to change it. What should I do? I tried to add a dbl constant, doesnt work.
regards,
Yan.
07-02-2012 06:18 AM - edited 07-02-2012 06:19 AM
Hi Mystogan,
what about creating two waveforms (using the same dt)?
The first one would be just zero and defines your "delay". The second one defines your sine wave.
Then you just append the 2nd to the 1st and you're done...
You can create any "delay" by just adjusting the length of the 1st waveform.
You can adjust the offset of the sine wave when using the appropriate function from the signal creation palette...
07-02-2012 06:39 AM
Hi GerdW, thanks for response.
I know the idea of yours and have tried it.
The problem is I need to generate this sinewave with delay on DAQmx board (I'm generating another signals too: DC and ramps in other channels), which means, I should not waste too much samples for delay of the sinewave (sample numbers for all channels must be the same). I've experimented, for generating 10k sinewave cycles (what I need to have), I need to have minimal 500k samples. Sample numbers I'm using is always the power of 2, 500k samples is 2^19=524288.
Is there any other way? I know that appending 2 sinewaves will only be possible using 1 sample rate only. Which means, generating 1kHz sinewave will take too much samples for delay 1 sec only.
regards,
Yan.