LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save several 1D arrays to an array in FPGA

Solved!
Go to solution

Hi!

 

Any advices are welcome!

 

I'd like to know

1.  how to save several 1D arrays to x-D array on each dimension.

Data type is Fixed point.

 

1st 1D array to 1st column in the array.

2nd 1D array to 2nd column in the array. 

3rd 1D array to 3rd column in the array.

4th 1D array to 4th column in the array.    .....                   in FPGA VI.

 

After creating the array in FPGA,

2. How to save the array as an excel format in RT VI?

 

 

Thank you so much.

 

0 Kudos
Message 1 of 5
(4,323 Views)

Build Array should do it for you.  Just all of the 1D arrays have to be fixed size and the same size.

 

Now for passing them up the the RT, I recommend using a DMA FIFO.  Then it should be simple to use the Write To Spreadsheet File to write a tab delimited file that Excel can read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(4,303 Views)

Thank you!!

 

Can your suggested way, Build array, arrange the my data in each different column?

 

I used the  'Insert Into Array' function and it is good to arrange the data in a VI. (Not FPGA VI)

However, in case of FPGA VI, I got some Errors " Maximum number of array dimensions exceeded."

 

Each 1-D array has 97 data points in a column.

Is that a limitation of FPGA compliation?

0 Kudos
Message 3 of 5
(4,274 Views)
Solution
Accepted by topic author catalysthw

Hi catalyst,

 

it seems the FPGA does NOT like your 2D arrays…

 

The FPGA is very limited when it comes to array handling. One limitation is: you can only use 1D-arrays, the other is the fixed array length.

This is very basic LV+FPGA stuff: did you read the LabVIEW help? Did you read the LVFPGA beginner tutorials on NIs website?

 

Each 1-D array has 97 data points in a column.

Initialize an 1D output array with 5×97= 485 elements. Use ReplaceArraySubset to replace parts of your output array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(4,246 Views)

There are two ways of combining several 1D arrays into bigger one:

1. build array, but with concatenate option enabled (just right clik on build array and check "Concatenate Inputs"). This will give you 1D array on the output with sequentially placed input arrays.

2. Use "Interleave 1D Arrays" VI. Again you will have all input arrays combined into 1D array, but in this case the samples will be interleaved

In AI We Trust
0 Kudos
Message 5 of 5
(4,209 Views)