LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA optimalisation help pls

Solved!
Go to solution

Sorry,  it was really out of topic.  Could you explein the shift register in the sample, please ?

0 Kudos
Message 11 of 18
(1,637 Views)

There's nothing to explain.  Using a shift register is easier than extracting an element and then replacing that same element in the case that you don't want to calculate the derivative (the false case of the case structure).  In the false case, it's just a straight-through wire.

0 Kudos
Message 12 of 18
(1,632 Views)

Sorry, I still do not understand why the shift register is used. What would happen without it ?

 

So False case is not necessry, is it ?

0 Kudos
Message 13 of 18
(1,627 Views)

Shift registers are a basic LabVIEW concept.  If you don't understand what's happening here, put together a simple VI that you can run on your desktop - it can be identical to this one, but with a standard while loop instead of the timed loop - and play with it.  Note that the image I posted is a "snippet" - it's real code.  You can drag the image directly into a LabVIEW VI, as long as you're using LabVIEW 2009 or newer.  Depending on your web browser, you might have to drag the image to your desktop first, then drag from there into a VI.

0 Kudos
Message 14 of 18
(1,625 Views)

I am probably so stupid or tired and go to bed, because it is behind my mind....

 

I know that shift register is used to transfer data from prev. iteration to next iteration. as well as feedback node. It is writen everywhere. Nothing more. I understand it in counter but here not. In my view of understainding it should work even without Shift register but it does not as I found.Smiley Mad

0 Kudos
Message 15 of 18
(1,620 Views)

The shift register contains the entire array.  If you remove the false case, then it will calculate the derivative for every value in the array and the "Channels to Derivate" control will have no effect (because it won't be connected to anything).  In each iteration of the loop, when you calculate the derivative you update the array, so you need to keep the array in a shift register.  If you use a tunnel instead, the array is reloaded at the start of each loop iteration, discarding the changes.

0 Kudos
Message 16 of 18
(1,615 Views)

Thanks for explanation. I understood it a few minutes later I had posted the reply. ( Lying in the bed )

But  why is there only one shift register for y(k) and not another one for y(k-1) ?

0 Kudos
Message 17 of 18
(1,600 Views)

@charlie87 wrote:

Thanks for explanation. I understood it a few minutes later I had posted the reply. ( Lying in the bed )

But  why is there only one shift register for y(k) and not another one for y(k-1) ?


Sorry for the delay, perhaps you've figured this out by now.  You don't need a shift register for y(k-1) because it's not being changed in the loop.

0 Kudos
Message 18 of 18
(1,585 Views)