07-25-2019 01:38 AM
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.
Solved! Go to Solution.
07-25-2019 02:05 AM
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:
07-25-2019 02:39 AM
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.
07-25-2019 05:52 AM
Thanks for your advices. It works!!