ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview FPGA Array in For Loop

Solved!
Go to solution

Hi Labviewers:

 

I am using a sbRIO FPGA, developing a code to calculate a matrix*vector multiplication, and the result vector i perform a sigmoidal function to each element from the vector.

 

The result i would like to insert into an output array to have all the components from the sigmoidal at the same time.

 

As you can see in the attached image, I use a for loop, to go through the array to do the sigmoidal function, the output of the function I insert into an array of the same size than the entry array.

 

The question is, how can a I pass the complete vector when the For loop finished. Actually I have tried to pass the vector using a tunneling auto-indexed but labview show me the error the FPGA can only handle a 1 size array.

 

I have used an array to cluster cause I can not pass the array directly.

 

Also I have tried to put the output array into the for loop, but the behaviour was not that i want to.

Any sugestion to do that in a best way?

 

Thank you so much.

MatrixVector_Sigmoid..JPGMatrixVector_Sigmoid_Front.JPG

0 Kudos
Message 1 of 4
(3,689 Views)
Solution
Accepted by topic author GuilleCad

Hi Cad,

 

but the behaviour was not that i want to.

Are there any problems with your code? Which "behaviour" are you talking about?

Can you provide the expected output for a certain input?

 

You should not use InsertIntoArray in the FPGA, use ReplaceArraySubset and arrays of fixed size.

This should work in the FPGA too:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(3,674 Views)

Thanks for the quick response GerdW.

 

I expect an output vector non a matrix.

 

As you can see in the image at the ouput of the for loop I need an one size array (vector) with the sigmoidal result of the each component of the input vector.

 

But the FPGA does not admit arrays of two dimensions, (but i have not 2 dimensions I just have one), or a concatenating tunnel.

 

I will try your advices, once I implemented i let you know.

 

Thankyou.

0 Kudos
Message 3 of 4
(3,647 Views)

Thanks for your advices. It works!!

0 Kudos
Message 4 of 4
(3,621 Views)