LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delay for sinus generation

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:

sinusdelay.jpg

I've tried using insert to array, but doesnt work.

 

regards,

Yan.

0 Kudos
Message 1 of 5
(2,410 Views)

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.

 

 

0 Kudos
Message 2 of 5
(2,408 Views)

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. 

0 Kudos
Message 3 of 5
(2,405 Views)

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...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,395 Views)

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.

0 Kudos
Message 5 of 5
(2,387 Views)