From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to give a delay values for an array?

Solved!
Go to solution

Dear all,

I am trying to give the delay value in an array, the output is not updating w.r.to to an applied delay. if anyone has any idea about this problem. In case if we want to give generalized delay to the array values.

 

ARRAY.JPG

0 Kudos
Message 1 of 23
(3,384 Views)

You are using a feedback node but you are not actually feeding any values back to it. Essentially what you have written is identical to simply wiring the array control to the array indicator. What exactly are you trying to accomplish?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 23
(3,364 Views)

@NAGINENI wrote:

Dear all,

I am trying to give the delay value in an array, the output is not updating w.r.to to an applied delay. if anyone has any idea about this problem. In case if we want to give generalized delay to the array values.

 


right-click>Properties>Configuration

0 Kudos
Message 3 of 23
(3,362 Views)

Here is an example of how to use the feedback node with a delayed output.

 

Delayed FB Node.png

 

The output array would be 0,0,1,2,3,4,5,6,7,8



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 23
(3,358 Views)

Here, I have attached the required output array. please look into it and give some suggestion

ARRAY.JPG

0 Kudos
Message 5 of 23
(3,355 Views)

See my example above. It is doing exactly that.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 23
(3,351 Views)

Thank you so much for your replay,

I have two queries about your approach,

1) For this particular example, here the output array is  0,0,1,2,3,4,5,6,7,8.

If we give the delayed by 2, the output array should be 0,0,1,2,3,4,5,6,7,8,9,10.

2) If we want to give the delay by 600, how can we proceed further?

0 Kudos
Message 7 of 23
(3,346 Views)

What is your specific use case? How are you planning on using this? Feedback nodes are generally used in a continuous, repeating process to retrieve a value from the previous execution. If you simply want to construct data data set and then use it, there are more direct ways of getting that. In my example I simply set how many times I wanted the loop to run. If you wanted all the values, simply add your delay amount to the size of the data array and the loop will execute that many times and give you the complete array with the first two initial values of 0s. To change the behavior to have a delay of 600, the array initializing the feedback node would need to be an array of 0s with 600 elements.

 

The delay setting on the feedback node is not settable programmatically so it is not very flexible in that regard.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 23
(3,334 Views)

 Firstly, I am trying to implement the 1-D transfer function with the delay node. In the future, I am planning to use this concept of delay block for the implementation of the 2-D (image) transfer function as shown here.

 

2-D IIR.JPG

Suppose if we have an image and its size is 640*480. if we want to use this image as an input to the above transfer function, how to give the delay nodes in the horizontal direction and vertical direction for getting the processed image, is there any 2-D feedback (delay node) VI available in the LabVIEW?

0 Kudos
Message 9 of 23
(3,324 Views)

A feedback node accepts arrays of any number of dimensions.

 

Your descriptions are not really clear. can you point to a website that describes the algorithm?

 

If you want a variable delay of up to 600, you need to keep that many instances of the primary data. You need to maintain a buffer (initialized with some special sentinel value, such as NaNs) and some programming to maintain information of the insert point, allowing you to calculate the index of any history value, while overwriting the oldest data as new data arrives. If the data size does not change, it can all be done in-place.

0 Kudos
Message 10 of 23
(3,301 Views)