LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Delay VI

Erm.... yes i know that there is a subvi name sample delay.vi but where can i find the file to attach it? Sir, why don't u do an example for me? the example can be simple with just a analog input and delay it by 10ms then send to a analog output. waveform chart can also be use to show the signal before and after the delay. Thanks. Regards, Alan
0 Kudos
Message 11 of 21
(1,640 Views)
All you have to do is double-click on the icon in the block diagram. This will open the subVI's front panel. Now select Save As... from the file menu, this will show you the location of the file.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 21
(1,619 Views)

Hi mike,

thanks for the advise, finally found it!!

 

0 Kudos
Message 13 of 21
(1,609 Views)

Hello, 

Can you add a constant of 1000 to it will wait 1 second inside the output loop?

Juan Galindo

Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 14 of 21
(1,567 Views)
When you run your application what value are you supplying for the delay value? Accoring to the Sample Delay VI's help screen, the delay is specified in number of samples.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 21
(1,560 Views)
Hi juan, are u talking about the sample delay vi or the wait vi?
0 Kudos
Message 16 of 21
(1,553 Views)

Hi mike,

I had my analog input sample at 48khz, so for a delay of 1sec i should delay the sample by 48k times. i'm i on the right track?

0 Kudos
Message 17 of 21
(1,553 Views)
Yes, you should delay by 48,000 samples. If that's not working, I would say we need to hear from NI how this is supposed to work (it looks like it's a VI they wrote).

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 18 of 21
(1,547 Views)
i just mail NI, hopefully they will reply me soon. Wonder is there any other method i can try. I tried the wait.vi but i cant connect the wait.vi output to my analog output
0 Kudos
Message 19 of 21
(1,543 Views)

Actually, you could try building a delay function yourself, the concepts aren't very hard. You need to create a stack (a FIFO buffer really) that has the same number of elements in it as you want to delay. In your case, you want to delay the output by 1 second and you are sampling at 48000 samples per second, so you would create a buffer of 48000 elements.

You then start inserting data into this buffer as it is acquired. When the buffer gets full (contains 1 second of data or 48000 samples) start shifting data out of the buffer as necessary (oldest data first) to make room for the new data you have just acquired. This data that gets shifted out is your output.

The only tricky part is managing the array manipulations such that you aren't constyantly allocating and reallocating large chunks of memory.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 20 of 21
(1,532 Views)