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 initially converted the image into an array value and then reshape the array into a 1-D (column) array. After that I am trying to delay by 4-pixel values, an initial value begins after the 4 delay values, but the problem is the first 4 pixel values should be zero (0), where it has shown that the last 4 (four) pixel values as the first 4 values in a delayed array. Kindly give some suggestions.

 

Delay.JPG

0 Kudos
Message 11 of 23
(1,088 Views)

We cannot debug pictures, so attach the actual VI. Did you read the help about feedback node  initialization? Autoindexing an array to it makes absolutely no sense, because it only happens at first call. Maybe all you need is pre-pend a 1D array of 4 zeroes to get the desired effect. Also, if you are autoindexing, you typically don't want to wire N.

 

Why don't we start with a smaller example, e.g. with a small 2D array as follows:

 

00,01,02,03,04,05,06,07

08, ..

16, ...

24,25,26,27,28,29,30,31

 

What result are you expecting?

 

 

0 Kudos
Message 12 of 23
(1,042 Views)

Maybe something like this? I can't really see the purpose....

 

 

altenbach_0-1582478298189.png

 

 

0 Kudos
Message 13 of 23
(1,022 Views)

Thank you for your valuable inputs.

00,01,02,03,04,05,06,07

08, ..

16, ...

24,25,26,27,28,29,30,31

 

What result are you expecting?

Suppose if I delayed by 4 values, I am expecting

00,00,00,00,00,01,02,03

04,.

12,..

20,21,22,23,24,25,26,27.

Please look into the  attached VI programs

 

delayed.JPG

Download All
0 Kudos
Message 14 of 23
(976 Views)

I think the simplest solution is to use Initialise Array with length 4, and then Build Array set to Concatenate, with the 4 elements going on the top.

 

You can branch the wire before the build array if you need both the modified and unmodified arrays.


GCentral
0 Kudos
Message 15 of 23
(970 Views)

 

 

Delay_1.JPG

0 Kudos
Message 16 of 23
(957 Views)

In the image you attached, you're still autoindexing the array input to the feedback node.

Right click on that tunnel and remove the indexing mode:

indexig.png


GCentral
0 Kudos
Message 17 of 23
(951 Views)

Thank you for your inputs.

I followed the step which you mentioned about the disable indexing, still, there is no change. Please have a look into the attached VI program.

0 Kudos
Message 18 of 23
(948 Views)
Solution
Accepted by topic author NAGINENI

Right click the feedback node.

Click Move Initializer One Loop Out.

Move the wire going from what just turned into an auto-index tunnel to the initializer terminal that just appeared on the boundary of the for loop.

0 Kudos
Message 19 of 23
(945 Views)

 

Your suggestion is working on my problem. Thank you for your valuable input.

 

0 Kudos
Message 20 of 23
(941 Views)