Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

simple question about Array creating on FPGA

Hi,

 

Can I create on FPGA Array ? I m trying it , but every time i get error !!!

I've tried this 4-solution (from Labview Help- Details ) , but does not work.

How can I set a dimension on my wire 1-2 ? or my Array ?

 

 

regards,

 

Mehmet

0 Kudos
Message 1 of 10
(5,366 Views)

There is a setting on the VI that must be selected to use arrays on FPGA. If you go to the VI Properties and then the Execution page, you will see a checkbox that says something like "Auto-preallocate arrays and strings". Check that box and hit ok and you should be good. That option essentially allows LabVIEW to precalculate all the array sizes which is a requirement for FPGA. Note, that checkbox is only visible when the VI is open under an FPGA Target.

0 Kudos
Message 2 of 10
(5,359 Views)

Hi,

 

i have done it, but is not working.

 

thank you for your Answer.

 


 

0 Kudos
Message 3 of 10
(5,349 Views)

Looking at your VI again, it looks like there may not be a way for LabVIEW to determine the array size because the shift register is uninitialized and you don't have any primitives that enforce a size. Try wiring an array constant to the init terminal of the shift register and see if that fixes it. 

0 Kudos
Message 4 of 10
(5,344 Views)

I'm wondering about why your want to create an array of your analog input values?

 

 

Christian

0 Kudos
Message 5 of 10
(5,334 Views)

I'm in the same situation. Wiring an array constant to the init terminal of the shift register doesn't work.

 

I want to save 18 bytes into array for then read from host and convert into ASCII code.

 

Help please!

0 Kudos
Message 6 of 10
(5,302 Views)

I want to find max value from Array.

0 Kudos
Message 7 of 10
(5,294 Views)

Here is a sample snippet that isn't broken. When you create the array constant, you have to right-click on it and open the "Set Dimension Size ..." dialog to change it to a fixed-size of N elements. 

 

array-in-loop.png

 

Like Christian mentioned, you may not actually want to use an array for your use case. If you are transferring data to the host, you should probably do it one point at a time through a DMA FIFO channel.

0 Kudos
Message 8 of 10
(5,283 Views)

and if you just want to find the maximum then compare the last value (stored in a shift register) with the actuale one and store the larger one in the register again. -> no array needed.

 

 

Christian

0 Kudos
Message 9 of 10
(5,262 Views)

If you changed the while loop to a for loop with a fixed number of loops, and just wire the analog out put termianl to the edge of the loop , enable indexing and connect to an indicator or max min function (aggregate type) 

 

 

0 Kudos
Message 10 of 10
(5,236 Views)